g.js 301 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545
  1. this.createjs = this.createjs || {};
  2. createjs.extend = function(t, e) {
  3. "use strict";
  4. function i() {
  5. this.constructor = t
  6. }
  7. i.prototype = e.prototype;
  8. return t.prototype = new i
  9. };
  10. this.createjs = this.createjs || {};
  11. createjs.promote = function(t, e) {
  12. "use strict";
  13. var i = t.prototype,
  14. s = Object.getPrototypeOf && Object.getPrototypeOf(i) || i.__proto__;
  15. if (s) {
  16. i[(e += "_") + "constructor"] = s.constructor;
  17. for (var r in s) {
  18. if (i.hasOwnProperty(r) && typeof s[r] == "function") {
  19. i[e + r] = s[r]
  20. }
  21. }
  22. }
  23. return t
  24. };
  25. this.createjs = this.createjs || {};
  26. createjs.indexOf = function(t, e) {
  27. "use strict";
  28. for (var i = 0, s = t.length; i < s; i++) {
  29. if (e === t[i]) {
  30. return i
  31. }
  32. }
  33. return -1
  34. };
  35. this.createjs = this.createjs || {};
  36. (function() {
  37. "use strict";
  38. function t(t, e, i) {
  39. this.type = t;
  40. this.target = null;
  41. this.currentTarget = null;
  42. this.eventPhase = 0;
  43. this.bubbles = !! e;
  44. this.cancelable = !! i;
  45. this.timeStamp = (new Date).getTime();
  46. this.defaultPrevented = false;
  47. this.propagationStopped = false;
  48. this.immediatePropagationStopped = false;
  49. this.removed = false
  50. }
  51. var e = t.prototype;
  52. e.preventDefault = function() {
  53. this.defaultPrevented = this.cancelable && true
  54. };
  55. e.stopPropagation = function() {
  56. this.propagationStopped = true
  57. };
  58. e.stopImmediatePropagation = function() {
  59. this.immediatePropagationStopped = this.propagationStopped = true
  60. };
  61. e.remove = function() {
  62. this.removed = true
  63. };
  64. e.clone = function() {
  65. return new t(this.type, this.bubbles, this.cancelable)
  66. };
  67. e.set = function(t) {
  68. for (var e in t) {
  69. this[e] = t[e]
  70. }
  71. return this
  72. };
  73. e.toString = function() {
  74. return "[Event (type=" + this.type + ")]"
  75. };
  76. createjs.Event = t
  77. })();
  78. this.createjs = this.createjs || {};
  79. (function() {
  80. "use strict";
  81. function t() {
  82. this._listeners = null;
  83. this._captureListeners = null
  84. }
  85. var e = t.prototype;
  86. t.initialize = function(t) {
  87. t.addEventListener = e.addEventListener;
  88. t.on = e.on;
  89. t.removeEventListener = t.off = e.removeEventListener;
  90. t.removeAllEventListeners = e.removeAllEventListeners;
  91. t.hasEventListener = e.hasEventListener;
  92. t.dispatchEvent = e.dispatchEvent;
  93. t._dispatchEvent = e._dispatchEvent;
  94. t.willTrigger = e.willTrigger
  95. };
  96. e.addEventListener = function(t, e, i) {
  97. var s;
  98. if (i) {
  99. s = this._captureListeners = this._captureListeners || {}
  100. } else {
  101. s = this._listeners = this._listeners || {}
  102. }
  103. var r = s[t];
  104. if (r) {
  105. this.removeEventListener(t, e, i)
  106. }
  107. r = s[t];
  108. if (!r) {
  109. s[t] = [e]
  110. } else {
  111. r.push(e)
  112. }
  113. return e
  114. };
  115. e.on = function(t, e, i, s, r, n) {
  116. if (e.handleEvent) {
  117. i = i || e;
  118. e = e.handleEvent
  119. }
  120. i = i || this;
  121. return this.addEventListener(t, function(t) {
  122. e.call(i, t, r);
  123. s && t.remove()
  124. }, n)
  125. };
  126. e.removeEventListener = function(t, e, i) {
  127. var s = i ? this._captureListeners : this._listeners;
  128. if (!s) {
  129. return
  130. }
  131. var r = s[t];
  132. if (!r) {
  133. return
  134. }
  135. for (var n = 0, a = r.length; n < a; n++) {
  136. if (r[n] == e) {
  137. if (a == 1) {
  138. delete s[t]
  139. } else {
  140. r.splice(n, 1)
  141. }
  142. break
  143. }
  144. }
  145. };
  146. e.off = e.removeEventListener;
  147. e.removeAllEventListeners = function(t) {
  148. if (!t) {
  149. this._listeners = this._captureListeners = null
  150. } else {
  151. if (this._listeners) {
  152. delete this._listeners[t]
  153. }
  154. if (this._captureListeners) {
  155. delete this._captureListeners[t]
  156. }
  157. }
  158. };
  159. e.dispatchEvent = function(t) {
  160. if (typeof t == "string") {
  161. var e = this._listeners;
  162. if (!e || !e[t]) {
  163. return false
  164. }
  165. t = new createjs.Event(t)
  166. } else if (t.target && t.clone) {
  167. t = t.clone()
  168. }
  169. try {
  170. t.target = this
  171. } catch (i) {}
  172. if (!t.bubbles || !this.parent) {
  173. this._dispatchEvent(t, 2)
  174. } else {
  175. var s = this,
  176. r = [s];
  177. while (s.parent) {
  178. r.push(s = s.parent)
  179. }
  180. var n, a = r.length;
  181. for (n = a - 1; n >= 0 && !t.propagationStopped; n--) {
  182. r[n]._dispatchEvent(t, 1 + (n == 0))
  183. }
  184. for (n = 1; n < a && !t.propagationStopped; n++) {
  185. r[n]._dispatchEvent(t, 3)
  186. }
  187. }
  188. return t.defaultPrevented
  189. };
  190. e.hasEventListener = function(t) {
  191. var e = this._listeners,
  192. i = this._captureListeners;
  193. return !!(e && e[t] || i && i[t])
  194. };
  195. e.willTrigger = function(t) {
  196. var e = this;
  197. while (e) {
  198. if (e.hasEventListener(t)) {
  199. return true
  200. }
  201. e = e.parent
  202. }
  203. return false
  204. };
  205. e.toString = function() {
  206. return "[EventDispatcher]"
  207. };
  208. e._dispatchEvent = function(t, e) {
  209. var i, s = e == 1 ? this._captureListeners : this._listeners;
  210. if (t && s) {
  211. var r = s[t.type];
  212. if (!r || !(i = r.length)) {
  213. return
  214. }
  215. try {
  216. t.currentTarget = this
  217. } catch (n) {}
  218. try {
  219. t.eventPhase = e
  220. } catch (n) {}
  221. t.removed = false;
  222. r = r.slice();
  223. for (var a = 0; a < i && !t.immediatePropagationStopped; a++) {
  224. var o = r[a];
  225. if (o.handleEvent) {
  226. o.handleEvent(t)
  227. } else {
  228. o(t)
  229. }
  230. if (t.removed) {
  231. this.off(t.type, o, e == 1);
  232. t.removed = false
  233. }
  234. }
  235. }
  236. };
  237. createjs.EventDispatcher = t
  238. })();
  239. this.createjs = this.createjs || {};
  240. (function() {
  241. "use strict";
  242. function t() {
  243. throw "Ticker cannot be instantiated."
  244. }
  245. t.RAF_SYNCHED = "synched";
  246. t.RAF = "raf";
  247. t.TIMEOUT = "timeout";
  248. t.useRAF = false;
  249. t.timingMode = null;
  250. t.maxDelta = 0;
  251. t.paused = false;
  252. t.removeEventListener = null;
  253. t.removeAllEventListeners = null;
  254. t.dispatchEvent = null;
  255. t.hasEventListener = null;
  256. t._listeners = null;
  257. createjs.EventDispatcher.initialize(t);
  258. t._addEventListener = t.addEventListener;
  259. t.addEventListener = function() {
  260. !t._inited && t.init();
  261. return t._addEventListener.apply(t, arguments)
  262. };
  263. t._inited = false;
  264. t._startTime = 0;
  265. t._pausedTime = 0;
  266. t._ticks = 0;
  267. t._pausedTicks = 0;
  268. t._interval = 50;
  269. t._lastTime = 0;
  270. t._times = null;
  271. t._tickTimes = null;
  272. t._timerId = null;
  273. t._raf = true;
  274. t.setInterval = function(e) {
  275. t._interval = e;
  276. if (!t._inited) {
  277. return
  278. }
  279. t._setupTick()
  280. };
  281. t.getInterval = function() {
  282. return t._interval
  283. };
  284. t.setFPS = function(e) {
  285. t.setInterval(1e3 / e)
  286. };
  287. t.getFPS = function() {
  288. return 1e3 / t._interval
  289. };
  290. try {
  291. Object.defineProperties(t, {
  292. interval: {
  293. get: t.getInterval,
  294. set: t.setInterval
  295. },
  296. framerate: {
  297. get: t.getFPS,
  298. set: t.setFPS
  299. }
  300. })
  301. } catch (e) {
  302. console.log(e)
  303. }
  304. t.init = function() {
  305. if (t._inited) {
  306. return
  307. }
  308. t._inited = true;
  309. t._times = [];
  310. t._tickTimes = [];
  311. t._startTime = t._getTime();
  312. t._times.push(t._lastTime = 0);
  313. t.interval = t._interval
  314. };
  315. t.reset = function() {
  316. if (t._raf) {
  317. var e = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  318. e && e(t._timerId)
  319. } else {
  320. clearTimeout(t._timerId)
  321. }
  322. t.removeAllEventListeners("tick");
  323. t._timerId = t._times = t._tickTimes = null;
  324. t._startTime = t._lastTime = t._ticks = 0;
  325. t._inited = false
  326. };
  327. t.getMeasuredTickTime = function(e) {
  328. var i = 0,
  329. s = t._tickTimes;
  330. if (!s || s.length < 1) {
  331. return -1
  332. }
  333. e = Math.min(s.length, e || t.getFPS() | 0);
  334. for (var r = 0; r < e; r++) {
  335. i += s[r]
  336. }
  337. return i / e
  338. };
  339. t.getMeasuredFPS = function(e) {
  340. var i = t._times;
  341. if (!i || i.length < 2) {
  342. return -1
  343. }
  344. e = Math.min(i.length - 1, e || t.getFPS() | 0);
  345. return 1e3 / ((i[0] - i[e]) / e)
  346. };
  347. t.setPaused = function(e) {
  348. t.paused = e
  349. };
  350. t.getPaused = function() {
  351. return t.paused
  352. };
  353. t.getTime = function(e) {
  354. return t._startTime ? t._getTime() - (e ? t._pausedTime : 0) : -1
  355. };
  356. t.getEventTime = function(e) {
  357. return t._startTime ? (t._lastTime || t._startTime) - (e ? t._pausedTime : 0) : -1
  358. };
  359. t.getTicks = function(e) {
  360. return t._ticks - (e ? t._pausedTicks : 0)
  361. };
  362. t._handleSynch = function() {
  363. t._timerId = null;
  364. t._setupTick();
  365. if (t._getTime() - t._lastTime >= (t._interval - 1) * .97) {
  366. t._tick()
  367. }
  368. };
  369. t._handleRAF = function() {
  370. t._timerId = null;
  371. t._setupTick();
  372. t._tick()
  373. };
  374. t._handleTimeout = function() {
  375. t._timerId = null;
  376. t._setupTick();
  377. t._tick()
  378. };
  379. t._setupTick = function() {
  380. if (t._timerId != null) {
  381. return
  382. }
  383. var e = t.timingMode || t.useRAF && t.RAF_SYNCHED;
  384. if (e == t.RAF_SYNCHED || e == t.RAF) {
  385. var i = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  386. if (i) {
  387. t._timerId = i(e == t.RAF ? t._handleRAF : t._handleSynch);
  388. t._raf = true;
  389. return
  390. }
  391. }
  392. t._raf = false;
  393. t._timerId = setTimeout(t._handleTimeout, t._interval)
  394. };
  395. t._tick = function() {
  396. var e = t.paused;
  397. var i = t._getTime();
  398. var s = i - t._lastTime;
  399. t._lastTime = i;
  400. t._ticks++;
  401. if (e) {
  402. t._pausedTicks++;
  403. t._pausedTime += s
  404. }
  405. if (t.hasEventListener("tick")) {
  406. var r = new createjs.Event("tick");
  407. var n = t.maxDelta;
  408. r.delta = n && s > n ? n : s;
  409. r.paused = e;
  410. r.time = i;
  411. r.runTime = i - t._pausedTime;
  412. t.dispatchEvent(r)
  413. }
  414. t._tickTimes.unshift(t._getTime() - i);
  415. while (t._tickTimes.length > 100) {
  416. t._tickTimes.pop()
  417. }
  418. t._times.unshift(i);
  419. while (t._times.length > 100) {
  420. t._times.pop()
  421. }
  422. };
  423. var i = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
  424. t._getTime = function() {
  425. return (i && i.call(performance) || (new Date).getTime()) - t._startTime
  426. };
  427. createjs.Ticker = t
  428. })();
  429. this.createjs = this.createjs || {};
  430. (function() {
  431. "use strict";
  432. function t() {
  433. throw "UID cannot be instantiated"
  434. }
  435. t._nextID = 0;
  436. t.get = function() {
  437. return t._nextID++
  438. };
  439. createjs.UID = t
  440. })();
  441. this.createjs = this.createjs || {};
  442. (function() {
  443. "use strict";
  444. function t(t, e, i, s, r, n, a, o, h, c) {
  445. this.Event_constructor(t, e, i);
  446. this.stageX = s;
  447. this.stageY = r;
  448. this.rawX = h == null ? s : h;
  449. this.rawY = c == null ? r : c;
  450. this.nativeEvent = n;
  451. this.pointerID = a;
  452. this.primary = !! o
  453. }
  454. var e = createjs.extend(t, createjs.Event);
  455. e._get_localX = function() {
  456. return this.currentTarget.globalToLocal(this.rawX, this.rawY).x
  457. };
  458. e._get_localY = function() {
  459. return this.currentTarget.globalToLocal(this.rawX, this.rawY).y
  460. };
  461. e._get_isTouch = function() {
  462. return this.pointerID !== -1
  463. };
  464. try {
  465. Object.defineProperties(e, {
  466. localX: {
  467. get: e._get_localX
  468. },
  469. localY: {
  470. get: e._get_localY
  471. },
  472. isTouch: {
  473. get: e._get_isTouch
  474. }
  475. })
  476. } catch (i) {}
  477. e.clone = function() {
  478. return new t(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY)
  479. };
  480. e.toString = function() {
  481. return "[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]"
  482. };
  483. createjs.MouseEvent = createjs.promote(t, "Event")
  484. })();
  485. this.createjs = this.createjs || {};
  486. (function() {
  487. "use strict";
  488. function t(t, e, i, s, r, n) {
  489. this.setValues(t, e, i, s, r, n)
  490. }
  491. var e = t.prototype;
  492. t.DEG_TO_RAD = Math.PI / 180;
  493. t.identity = null;
  494. e.setValues = function(t, e, i, s, r, n) {
  495. this.a = t == null ? 1 : t;
  496. this.b = e || 0;
  497. this.c = i || 0;
  498. this.d = s == null ? 1 : s;
  499. this.tx = r || 0;
  500. this.ty = n || 0;
  501. return this
  502. };
  503. e.append = function(t, e, i, s, r, n) {
  504. var a = this.a;
  505. var o = this.b;
  506. var h = this.c;
  507. var c = this.d;
  508. if (t != 1 || e != 0 || i != 0 || s != 1) {
  509. this.a = a * t + h * e;
  510. this.b = o * t + c * e;
  511. this.c = a * i + h * s;
  512. this.d = o * i + c * s
  513. }
  514. this.tx = a * r + h * n + this.tx;
  515. this.ty = o * r + c * n + this.ty;
  516. return this
  517. };
  518. e.prepend = function(t, e, i, s, r, n) {
  519. var a = this.a;
  520. var o = this.c;
  521. var h = this.tx;
  522. this.a = t * a + i * this.b;
  523. this.b = e * a + s * this.b;
  524. this.c = t * o + i * this.d;
  525. this.d = e * o + s * this.d;
  526. this.tx = t * h + i * this.ty + r;
  527. this.ty = e * h + s * this.ty + n;
  528. return this
  529. };
  530. e.appendMatrix = function(t) {
  531. return this.append(t.a, t.b, t.c, t.d, t.tx, t.ty)
  532. };
  533. e.prependMatrix = function(t) {
  534. return this.prepend(t.a, t.b, t.c, t.d, t.tx, t.ty)
  535. };
  536. e.appendTransform = function(e, i, s, r, n, a, o, h, c) {
  537. if (n % 360) {
  538. var u = n * t.DEG_TO_RAD;
  539. var l = Math.cos(u);
  540. var d = Math.sin(u)
  541. } else {
  542. l = 1;
  543. d = 0
  544. }
  545. if (a || o) {
  546. a *= t.DEG_TO_RAD;
  547. o *= t.DEG_TO_RAD;
  548. this.append(Math.cos(o), Math.sin(o), -Math.sin(a), Math.cos(a), e, i);
  549. this.append(l * s, d * s, -d * r, l * r, 0, 0)
  550. } else {
  551. this.append(l * s, d * s, -d * r, l * r, e, i)
  552. }
  553. if (h || c) {
  554. this.tx -= h * this.a + c * this.c;
  555. this.ty -= h * this.b + c * this.d
  556. }
  557. return this
  558. };
  559. e.prependTransform = function(e, i, s, r, n, a, o, h, c) {
  560. if (n % 360) {
  561. var u = n * t.DEG_TO_RAD;
  562. var l = Math.cos(u);
  563. var d = Math.sin(u)
  564. } else {
  565. l = 1;
  566. d = 0
  567. }
  568. if (h || c) {
  569. this.tx -= h;
  570. this.ty -= c
  571. }
  572. if (a || o) {
  573. a *= t.DEG_TO_RAD;
  574. o *= t.DEG_TO_RAD;
  575. this.prepend(l * s, d * s, -d * r, l * r, 0, 0);
  576. this.prepend(Math.cos(o), Math.sin(o), -Math.sin(a), Math.cos(a), e, i)
  577. } else {
  578. this.prepend(l * s, d * s, -d * r, l * r, e, i)
  579. }
  580. return this
  581. };
  582. e.rotate = function(e) {
  583. e = e * t.DEG_TO_RAD;
  584. var i = Math.cos(e);
  585. var s = Math.sin(e);
  586. var r = this.a;
  587. var n = this.b;
  588. this.a = r * i + this.c * s;
  589. this.b = n * i + this.d * s;
  590. this.c = -r * s + this.c * i;
  591. this.d = -n * s + this.d * i;
  592. return this
  593. };
  594. e.skew = function(e, i) {
  595. e = e * t.DEG_TO_RAD;
  596. i = i * t.DEG_TO_RAD;
  597. this.append(Math.cos(i), Math.sin(i), -Math.sin(e), Math.cos(e), 0, 0);
  598. return this
  599. };
  600. e.scale = function(t, e) {
  601. this.a *= t;
  602. this.b *= t;
  603. this.c *= e;
  604. this.d *= e;
  605. return this
  606. };
  607. e.translate = function(t, e) {
  608. this.tx += this.a * t + this.c * e;
  609. this.ty += this.b * t + this.d * e;
  610. return this
  611. };
  612. e.identity = function() {
  613. this.a = this.d = 1;
  614. this.b = this.c = this.tx = this.ty = 0;
  615. return this
  616. };
  617. e.invert = function() {
  618. var t = this.a;
  619. var e = this.b;
  620. var i = this.c;
  621. var s = this.d;
  622. var r = this.tx;
  623. var n = t * s - e * i;
  624. this.a = s / n;
  625. this.b = -e / n;
  626. this.c = -i / n;
  627. this.d = t / n;
  628. this.tx = (i * this.ty - s * r) / n;
  629. this.ty = -(t * this.ty - e * r) / n;
  630. return this
  631. };
  632. e.isIdentity = function() {
  633. return this.tx === 0 && this.ty === 0 && this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1
  634. };
  635. e.equals = function(t) {
  636. return this.tx === t.tx && this.ty === t.ty && this.a === t.a && this.b === t.b && this.c === t.c && this.d === t.d
  637. };
  638. e.transformPoint = function(t, e, i) {
  639. i = i || {};
  640. i.x = t * this.a + e * this.c + this.tx;
  641. i.y = t * this.b + e * this.d + this.ty;
  642. return i
  643. };
  644. e.decompose = function(e) {
  645. if (e == null) {
  646. e = {}
  647. }
  648. e.x = this.tx;
  649. e.y = this.ty;
  650. e.scaleX = Math.sqrt(this.a * this.a + this.b * this.b);
  651. e.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);
  652. var i = Math.atan2(-this.c, this.d);
  653. var s = Math.atan2(this.b, this.a);
  654. var r = Math.abs(1 - i / s);
  655. if (r < 1e-5) {
  656. e.rotation = s / t.DEG_TO_RAD;
  657. if (this.a < 0 && this.d >= 0) {
  658. e.rotation += e.rotation <= 0 ? 180 : -180
  659. }
  660. e.skewX = e.skewY = 0
  661. } else {
  662. e.skewX = i / t.DEG_TO_RAD;
  663. e.skewY = s / t.DEG_TO_RAD
  664. }
  665. return e
  666. };
  667. e.copy = function(t) {
  668. return this.setValues(t.a, t.b, t.c, t.d, t.tx, t.ty)
  669. };
  670. e.clone = function() {
  671. return new t(this.a, this.b, this.c, this.d, this.tx, this.ty)
  672. };
  673. e.toString = function() {
  674. return "[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]"
  675. };
  676. t.identity = new t;
  677. createjs.Matrix2D = t
  678. })();
  679. this.createjs = this.createjs || {};
  680. (function() {
  681. "use strict";
  682. function t(t, e, i, s, r) {
  683. this.setValues(t, e, i, s, r)
  684. }
  685. var e = t.prototype;
  686. e.setValues = function(t, e, i, s, r) {
  687. this.visible = t == null ? true : !! t;
  688. this.alpha = e == null ? 1 : e;
  689. this.shadow = i;
  690. this.compositeOperation = i;
  691. this.matrix = r || this.matrix && this.matrix.identity() || new createjs.Matrix2D;
  692. return this
  693. };
  694. e.append = function(t, e, i, s, r) {
  695. this.alpha *= e;
  696. this.shadow = i || this.shadow;
  697. this.compositeOperation = s || this.compositeOperation;
  698. this.visible = this.visible && t;
  699. r && this.matrix.appendMatrix(r);
  700. return this
  701. };
  702. e.prepend = function(t, e, i, s, r) {
  703. this.alpha *= e;
  704. this.shadow = this.shadow || i;
  705. this.compositeOperation = this.compositeOperation || s;
  706. this.visible = this.visible && t;
  707. r && this.matrix.prependMatrix(r);
  708. return this
  709. };
  710. e.identity = function() {
  711. this.visible = true;
  712. this.alpha = 1;
  713. this.shadow = this.compositeOperation = null;
  714. this.matrix.identity();
  715. return this
  716. };
  717. e.clone = function() {
  718. return new t(this.alpha, this.shadow, this.compositeOperation, this.visible, this.matrix.clone())
  719. };
  720. createjs.DisplayProps = t
  721. })();
  722. this.createjs = this.createjs || {};
  723. (function() {
  724. "use strict";
  725. function t(t, e) {
  726. this.setValues(t, e)
  727. }
  728. var e = t.prototype;
  729. e.setValues = function(t, e) {
  730. this.x = t || 0;
  731. this.y = e || 0;
  732. return this
  733. };
  734. e.copy = function(t) {
  735. this.x = t.x;
  736. this.y = t.y;
  737. return this
  738. };
  739. e.clone = function() {
  740. return new t(this.x, this.y)
  741. };
  742. e.toString = function() {
  743. return "[Point (x=" + this.x + " y=" + this.y + ")]"
  744. };
  745. createjs.Point = t
  746. })();
  747. this.createjs = this.createjs || {};
  748. (function() {
  749. "use strict";
  750. function t(t, e, i, s) {
  751. this.setValues(t, e, i, s)
  752. }
  753. var e = t.prototype;
  754. e.setValues = function(t, e, i, s) {
  755. this.x = t || 0;
  756. this.y = e || 0;
  757. this.width = i || 0;
  758. this.height = s || 0;
  759. return this
  760. };
  761. e.extend = function(t, e, i, s) {
  762. i = i || 0;
  763. s = s || 0;
  764. if (t + i > this.x + this.width) {
  765. this.width = t + i - this.x
  766. }
  767. if (e + s > this.y + this.height) {
  768. this.height = e + s - this.y
  769. }
  770. if (t < this.x) {
  771. this.width += this.x - t;
  772. this.x = t
  773. }
  774. if (e < this.y) {
  775. this.height += this.y - e;
  776. this.y = e
  777. }
  778. return this
  779. };
  780. e.pad = function(t, e, i, s) {
  781. this.x -= t;
  782. this.y -= e;
  783. this.width += t + i;
  784. this.height += e + s;
  785. return this
  786. };
  787. e.copy = function(t) {
  788. return this.setValues(t.x, t.y, t.width, t.height)
  789. };
  790. e.contains = function(t, e, i, s) {
  791. i = i || 0;
  792. s = s || 0;
  793. return t >= this.x && t + i <= this.x + this.width && e >= this.y && e + s <= this.y + this.height
  794. };
  795. e.union = function(t) {
  796. return this.clone().extend(t.x, t.y, t.width, t.height)
  797. };
  798. e.intersection = function(e) {
  799. var i = e.x,
  800. s = e.y,
  801. r = i + e.width,
  802. n = s + e.height;
  803. if (this.x > i) {
  804. i = this.x
  805. }
  806. if (this.y > s) {
  807. s = this.y
  808. }
  809. if (this.x + this.width < r) {
  810. r = this.x + this.width
  811. }
  812. if (this.y + this.height < n) {
  813. n = this.y + this.height
  814. }
  815. return r <= i || n <= s ? null : new t(i, s, r - i, n - s)
  816. };
  817. e.intersects = function(t) {
  818. return t.x <= this.x + this.width && this.x <= t.x + t.width && t.y <= this.y + this.height && this.y <= t.y + t.height
  819. };
  820. e.isEmpty = function() {
  821. return this.width <= 0 || this.height <= 0
  822. };
  823. e.clone = function() {
  824. return new t(this.x, this.y, this.width, this.height)
  825. };
  826. e.toString = function() {
  827. return "[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]"
  828. };
  829. createjs.Rectangle = t
  830. })();
  831. this.createjs = this.createjs || {};
  832. (function() {
  833. "use strict";
  834. function t(t, e, i, s, r, n, a) {
  835. if (!t.addEventListener) {
  836. return
  837. }
  838. this.target = t;
  839. this.overLabel = i == null ? "over" : i;
  840. this.outLabel = e == null ? "out" : e;
  841. this.downLabel = s == null ? "down" : s;
  842. this.play = r;
  843. this._isPressed = false;
  844. this._isOver = false;
  845. this._enabled = false;
  846. t.mouseChildren = false;
  847. this.enabled = true;
  848. this.handleEvent({});
  849. if (n) {
  850. if (a) {
  851. n.actionsEnabled = false;
  852. n.gotoAndStop && n.gotoAndStop(a)
  853. }
  854. t.hitArea = n
  855. }
  856. }
  857. var e = t.prototype;
  858. e.setEnabled = function(t) {
  859. if (t == this._enabled) {
  860. return
  861. }
  862. var e = this.target;
  863. this._enabled = t;
  864. if (t) {
  865. e.cursor = "pointer";
  866. e.addEventListener("rollover", this);
  867. e.addEventListener("rollout", this);
  868. e.addEventListener("mousedown", this);
  869. e.addEventListener("pressup", this)
  870. } else {
  871. e.cursor = null;
  872. e.removeEventListener("rollover", this);
  873. e.removeEventListener("rollout", this);
  874. e.removeEventListener("mousedown", this);
  875. e.removeEventListener("pressup", this)
  876. }
  877. };
  878. e.getEnabled = function() {
  879. return this._enabled
  880. };
  881. try {
  882. Object.defineProperties(e, {
  883. enabled: {
  884. get: e.getEnabled,
  885. set: e.setEnabled
  886. }
  887. })
  888. } catch (i) {}
  889. e.toString = function() {
  890. return "[ButtonHelper]"
  891. };
  892. e.handleEvent = function(t) {
  893. var e, i = this.target,
  894. s = t.type;
  895. if (s == "mousedown") {
  896. this._isPressed = true;
  897. e = this.downLabel
  898. } else if (s == "pressup") {
  899. this._isPressed = false;
  900. e = this._isOver ? this.overLabel : this.outLabel
  901. } else if (s == "rollover") {
  902. this._isOver = true;
  903. e = this._isPressed ? this.downLabel : this.overLabel
  904. } else {
  905. this._isOver = false;
  906. e = this._isPressed ? this.overLabel : this.outLabel
  907. }
  908. if (this.play) {
  909. i.gotoAndPlay && i.gotoAndPlay(e)
  910. } else {
  911. i.gotoAndStop && i.gotoAndStop(e)
  912. }
  913. };
  914. createjs.ButtonHelper = t
  915. })();
  916. this.createjs = this.createjs || {};
  917. (function() {
  918. "use strict";
  919. function t(t, e, i, s) {
  920. this.color = t || "black";
  921. this.offsetX = e || 0;
  922. this.offsetY = i || 0;
  923. this.blur = s || 0
  924. }
  925. var e = t.prototype;
  926. t.identity = new t("transparent", 0, 0, 0);
  927. e.toString = function() {
  928. return "[Shadow]"
  929. };
  930. e.clone = function() {
  931. return new t(this.color, this.offsetX, this.offsetY, this.blur)
  932. };
  933. createjs.Shadow = t
  934. })();
  935. this.createjs = this.createjs || {};
  936. (function() {
  937. "use strict";
  938. function t(t) {
  939. this.EventDispatcher_constructor();
  940. this.complete = true;
  941. this.framerate = 0;
  942. this._animations = null;
  943. this._frames = null;
  944. this._images = null;
  945. this._data = null;
  946. this._loadCount = 0;
  947. this._frameHeight = 0;
  948. this._frameWidth = 0;
  949. this._numFrames = 0;
  950. this._regX = 0;
  951. this._regY = 0;
  952. this._spacing = 0;
  953. this._margin = 0;
  954. this._parseData(t)
  955. }
  956. var e = createjs.extend(t, createjs.EventDispatcher);
  957. e.getAnimations = function() {
  958. return this._animations.slice()
  959. };
  960. try {
  961. Object.defineProperties(e, {
  962. animations: {
  963. get: e.getAnimations
  964. }
  965. })
  966. } catch (i) {}
  967. e.getNumFrames = function(t) {
  968. if (t == null) {
  969. return this._frames ? this._frames.length : this._numFrames || 0
  970. } else {
  971. var e = this._data[t];
  972. if (e == null) {
  973. return 0
  974. } else {
  975. return e.frames.length
  976. }
  977. }
  978. };
  979. e.getAnimation = function(t) {
  980. return this._data[t]
  981. };
  982. e.getFrame = function(t) {
  983. var e;
  984. if (this._frames && (e = this._frames[t])) {
  985. return e
  986. }
  987. return null
  988. };
  989. e.getFrameBounds = function(t, e) {
  990. var i = this.getFrame(t);
  991. return i ? (e || new createjs.Rectangle).setValues(-i.regX, -i.regY, i.rect.width, i.rect.height) : null
  992. };
  993. e.toString = function() {
  994. return "[SpriteSheet]"
  995. };
  996. e.clone = function() {
  997. throw "SpriteSheet cannot be cloned."
  998. };
  999. e._parseData = function(t) {
  1000. var e, i, s, r;
  1001. if (t == null) {
  1002. return
  1003. }
  1004. this.framerate = t.framerate || 0;
  1005. if (t.images && (i = t.images.length) > 0) {
  1006. r = this._images = [];
  1007. for (e = 0; e < i; e++) {
  1008. var n = t.images[e];
  1009. if (typeof n == "string") {
  1010. var a = n;
  1011. n = document.createElement("img");
  1012. n.src = a
  1013. }
  1014. r.push(n);
  1015. if (!n.getContext && !n.complete) {
  1016. this._loadCount++;
  1017. this.complete = false;
  1018. (function(t) {
  1019. n.onload = function() {
  1020. t._handleImageLoad()
  1021. }
  1022. })(this)
  1023. }
  1024. }
  1025. }
  1026. if (t.frames == null) {} else if (t.frames instanceof Array) {
  1027. this._frames = [];
  1028. r = t.frames;
  1029. for (e = 0, i = r.length; e < i; e++) {
  1030. var o = r[e];
  1031. this._frames.push({
  1032. image: this._images[o[4] ? o[4] : 0],
  1033. rect: new createjs.Rectangle(o[0], o[1], o[2], o[3]),
  1034. regX: o[5] || 0,
  1035. regY: o[6] || 0
  1036. })
  1037. }
  1038. } else {
  1039. s = t.frames;
  1040. this._frameWidth = s.width;
  1041. this._frameHeight = s.height;
  1042. this._regX = s.regX || 0;
  1043. this._regY = s.regY || 0;
  1044. this._spacing = s.spacing || 0;
  1045. this._margin = s.margin || 0;
  1046. this._numFrames = s.count;
  1047. if (this._loadCount == 0) {
  1048. this._calculateFrames()
  1049. }
  1050. }
  1051. this._animations = [];
  1052. if ((s = t.animations) != null) {
  1053. this._data = {};
  1054. var h;
  1055. for (h in s) {
  1056. var c = {
  1057. name: h
  1058. };
  1059. var u = s[h];
  1060. if (typeof u == "number") {
  1061. r = c.frames = [u]
  1062. } else if (u instanceof Array) {
  1063. if (u.length == 1) {
  1064. c.frames = [u[0]]
  1065. } else {
  1066. c.speed = u[3];
  1067. c.next = u[2];
  1068. r = c.frames = [];
  1069. for (e = u[0]; e <= u[1]; e++) {
  1070. r.push(e)
  1071. }
  1072. }
  1073. } else {
  1074. c.speed = u.speed;
  1075. c.next = u.next;
  1076. var l = u.frames;
  1077. r = c.frames = typeof l == "number" ? [l] : l.slice(0)
  1078. }
  1079. if (c.next === true || c.next === undefined) {
  1080. c.next = h
  1081. }
  1082. if (c.next === false || r.length < 2 && c.next == h) {
  1083. c.next = null
  1084. }
  1085. if (!c.speed) {
  1086. c.speed = 1
  1087. }
  1088. this._animations.push(h);
  1089. this._data[h] = c
  1090. }
  1091. }
  1092. };
  1093. e._handleImageLoad = function() {
  1094. if (--this._loadCount == 0) {
  1095. this._calculateFrames();
  1096. this.complete = true;
  1097. this.dispatchEvent("complete")
  1098. }
  1099. };
  1100. e._calculateFrames = function() {
  1101. if (this._frames || this._frameWidth == 0) {
  1102. return
  1103. }
  1104. this._frames = [];
  1105. var t = this._numFrames || 1e5;
  1106. var e = 0,
  1107. i = this._frameWidth,
  1108. s = this._frameHeight;
  1109. var r = this._spacing,
  1110. n = this._margin;
  1111. t: for (var a = 0, o = this._images; a < o.length; a++) {
  1112. var h = o[a],
  1113. c = h.width,
  1114. u = h.height;
  1115. var l = n;
  1116. while (l <= u - n - s) {
  1117. var d = n;
  1118. while (d <= c - n - i) {
  1119. if (e >= t) {
  1120. break t
  1121. }
  1122. e++;
  1123. this._frames.push({
  1124. image: h,
  1125. rect: new createjs.Rectangle(d, l, i, s),
  1126. regX: this._regX,
  1127. regY: this._regY
  1128. });
  1129. d += i + r
  1130. }
  1131. l += s + r
  1132. }
  1133. }
  1134. this._numFrames = e
  1135. };
  1136. createjs.SpriteSheet = createjs.promote(t, "EventDispatcher")
  1137. })();
  1138. this.createjs = this.createjs || {};
  1139. (function() {
  1140. "use strict";
  1141. function t() {
  1142. this.command = null;
  1143. this._stroke = null;
  1144. this._strokeStyle = null;
  1145. this._strokeIgnoreScale = false;
  1146. this._fill = null;
  1147. this._instructions = [];
  1148. this._commitIndex = 0;
  1149. this._activeInstructions = [];
  1150. this._dirty = false;
  1151. this._storeIndex = 0;
  1152. this.clear()
  1153. }
  1154. var e = t.prototype;
  1155. var i = t;
  1156. t.getRGB = function(t, e, i, s) {
  1157. if (t != null && i == null) {
  1158. s = e;
  1159. i = t & 255;
  1160. e = t >> 8 & 255;
  1161. t = t >> 16 & 255
  1162. }
  1163. if (s == null) {
  1164. return "rgb(" + t + "," + e + "," + i + ")"
  1165. } else {
  1166. return "rgba(" + t + "," + e + "," + i + "," + s + ")"
  1167. }
  1168. };
  1169. t.getHSL = function(t, e, i, s) {
  1170. if (s == null) {
  1171. return "hsl(" + t % 360 + "," + e + "%," + i + "%)"
  1172. } else {
  1173. return "hsla(" + t % 360 + "," + e + "%," + i + "%," + s + ")"
  1174. }
  1175. };
  1176. t.BASE_64 = {
  1177. A: 0,
  1178. B: 1,
  1179. C: 2,
  1180. D: 3,
  1181. E: 4,
  1182. F: 5,
  1183. G: 6,
  1184. H: 7,
  1185. I: 8,
  1186. J: 9,
  1187. K: 10,
  1188. L: 11,
  1189. M: 12,
  1190. N: 13,
  1191. O: 14,
  1192. P: 15,
  1193. Q: 16,
  1194. R: 17,
  1195. S: 18,
  1196. T: 19,
  1197. U: 20,
  1198. V: 21,
  1199. W: 22,
  1200. X: 23,
  1201. Y: 24,
  1202. Z: 25,
  1203. a: 26,
  1204. b: 27,
  1205. c: 28,
  1206. d: 29,
  1207. e: 30,
  1208. f: 31,
  1209. g: 32,
  1210. h: 33,
  1211. i: 34,
  1212. j: 35,
  1213. k: 36,
  1214. l: 37,
  1215. m: 38,
  1216. n: 39,
  1217. o: 40,
  1218. p: 41,
  1219. q: 42,
  1220. r: 43,
  1221. s: 44,
  1222. t: 45,
  1223. u: 46,
  1224. v: 47,
  1225. w: 48,
  1226. x: 49,
  1227. y: 50,
  1228. z: 51,
  1229. 0: 52,
  1230. 1: 53,
  1231. 2: 54,
  1232. 3: 55,
  1233. 4: 56,
  1234. 5: 57,
  1235. 6: 58,
  1236. 7: 59,
  1237. 8: 60,
  1238. 9: 61,
  1239. "+": 62,
  1240. "/": 63
  1241. };
  1242. t.STROKE_CAPS_MAP = ["butt", "round", "square"];
  1243. t.STROKE_JOINTS_MAP = ["miter", "round", "bevel"];
  1244. var s = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1245. if (s.getContext) {
  1246. t._ctx = s.getContext("2d");
  1247. s.width = s.height = 1
  1248. }
  1249. e.getInstructions = function() {
  1250. this._updateInstructions();
  1251. return this._instructions
  1252. };
  1253. try {
  1254. Object.defineProperties(e, {
  1255. instructions: {
  1256. get: e.getInstructions
  1257. }
  1258. })
  1259. } catch (r) {}
  1260. e.isEmpty = function() {
  1261. return !(this._instructions.length || this._activeInstructions.length)
  1262. };
  1263. e.draw = function(t, e) {
  1264. this._updateInstructions();
  1265. var i = this._instructions;
  1266. for (var s = this._storeIndex, r = i.length; s < r; s++) {
  1267. i[s].exec(t, e)
  1268. }
  1269. };
  1270. e.drawAsPath = function(t) {
  1271. this._updateInstructions();
  1272. var e, i = this._instructions;
  1273. for (var s = this._storeIndex, r = i.length; s < r; s++) {
  1274. if ((e = i[s]).path !== false) {
  1275. e.exec(t)
  1276. }
  1277. }
  1278. };
  1279. e.moveTo = function(t, e) {
  1280. return this.append(new i.MoveTo(t, e), true)
  1281. };
  1282. e.lineTo = function(t, e) {
  1283. return this.append(new i.LineTo(t, e))
  1284. };
  1285. e.arcTo = function(t, e, s, r, n) {
  1286. return this.append(new i.ArcTo(t, e, s, r, n))
  1287. };
  1288. e.arc = function(t, e, s, r, n, a) {
  1289. return this.append(new i.Arc(t, e, s, r, n, a))
  1290. };
  1291. e.quadraticCurveTo = function(t, e, s, r) {
  1292. return this.append(new i.QuadraticCurveTo(t, e, s, r))
  1293. };
  1294. e.bezierCurveTo = function(t, e, s, r, n, a) {
  1295. return this.append(new i.BezierCurveTo(t, e, s, r, n, a))
  1296. };
  1297. e.rect = function(t, e, s, r) {
  1298. return this.append(new i.Rect(t, e, s, r))
  1299. };
  1300. e.closePath = function() {
  1301. return this._activeInstructions.length ? this.append(new i.ClosePath) : this
  1302. };
  1303. e.clear = function() {
  1304. this._instructions.length = this._activeInstructions.length = this._commitIndex = 0;
  1305. this._strokeStyle = this._stroke = this._fill = null;
  1306. this._dirty = this._strokeIgnoreScale = false;
  1307. return this
  1308. };
  1309. e.beginFill = function(t) {
  1310. return this._setFill(t ? new i.Fill(t) : null)
  1311. };
  1312. e.beginLinearGradientFill = function(t, e, s, r, n, a) {
  1313. return this._setFill((new i.Fill).linearGradient(t, e, s, r, n, a))
  1314. };
  1315. e.beginRadialGradientFill = function(t, e, s, r, n, a, o, h) {
  1316. return this._setFill((new i.Fill).radialGradient(t, e, s, r, n, a, o, h))
  1317. };
  1318. e.beginBitmapFill = function(t, e, s) {
  1319. return this._setFill(new i.Fill(null, s).bitmap(t, e))
  1320. };
  1321. e.endFill = function() {
  1322. return this.beginFill()
  1323. };
  1324. e.setStrokeStyle = function(t, e, s, r, n) {
  1325. this._updateInstructions(true);
  1326. this._strokeStyle = this.command = new i.StrokeStyle(t, e, s, r, n);
  1327. if (this._stroke) {
  1328. this._stroke.ignoreScale = n
  1329. }
  1330. this._strokeIgnoreScale = n;
  1331. return this
  1332. };
  1333. e.beginStroke = function(t) {
  1334. return this._setStroke(t ? new i.Stroke(t) : null)
  1335. };
  1336. e.beginLinearGradientStroke = function(t, e, s, r, n, a) {
  1337. return this._setStroke((new i.Stroke).linearGradient(t, e, s, r, n, a))
  1338. };
  1339. e.beginRadialGradientStroke = function(t, e, s, r, n, a, o, h) {
  1340. return this._setStroke((new i.Stroke).radialGradient(t, e, s, r, n, a, o, h))
  1341. };
  1342. e.beginBitmapStroke = function(t, e) {
  1343. return this._setStroke((new i.Stroke).bitmap(t, e))
  1344. };
  1345. e.endStroke = function() {
  1346. return this.beginStroke()
  1347. };
  1348. e.curveTo = e.quadraticCurveTo;
  1349. e.drawRect = e.rect;
  1350. e.drawRoundRect = function(t, e, i, s, r) {
  1351. return this.drawRoundRectComplex(t, e, i, s, r, r, r, r)
  1352. };
  1353. e.drawRoundRectComplex = function(t, e, s, r, n, a, o, h) {
  1354. return this.append(new i.RoundRect(t, e, s, r, n, a, o, h))
  1355. };
  1356. e.drawCircle = function(t, e, s) {
  1357. return this.append(new i.Circle(t, e, s))
  1358. };
  1359. e.drawEllipse = function(t, e, s, r) {
  1360. return this.append(new i.Ellipse(t, e, s, r))
  1361. };
  1362. e.drawPolyStar = function(t, e, s, r, n, a) {
  1363. return this.append(new i.PolyStar(t, e, s, r, n, a))
  1364. };
  1365. e.append = function(t, e) {
  1366. this._activeInstructions.push(t);
  1367. this.command = t;
  1368. if (!e) {
  1369. this._dirty = true
  1370. }
  1371. return this
  1372. };
  1373. e.decodePath = function(e) {
  1374. var i = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath];
  1375. var s = [2, 2, 4, 6, 0];
  1376. var r = 0,
  1377. n = e.length;
  1378. var a = [];
  1379. var o = 0,
  1380. h = 0;
  1381. var c = t.BASE_64;
  1382. while (r < n) {
  1383. var u = e.charAt(r);
  1384. var l = c[u];
  1385. var d = l >> 3;
  1386. var f = i[d];
  1387. if (!f || l & 3) {
  1388. throw "bad path data (@" + r + "): " + u
  1389. }
  1390. var _ = s[d];
  1391. if (!d) {
  1392. o = h = 0
  1393. }
  1394. a.length = 0;
  1395. r++;
  1396. var p = (l >> 2 & 1) + 2;
  1397. for (var g = 0; g < _; g++) {
  1398. var v = c[e.charAt(r)];
  1399. var m = v >> 5 ? -1 : 1;
  1400. v = (v & 31) << 6 | c[e.charAt(r + 1)];
  1401. if (p == 3) {
  1402. v = v << 6 | c[e.charAt(r + 2)]
  1403. }
  1404. v = m * v / 10;
  1405. if (g % 2) {
  1406. o = v += o
  1407. } else {
  1408. h = v += h
  1409. }
  1410. a[g] = v;
  1411. r += p
  1412. }
  1413. f.apply(this, a)
  1414. }
  1415. return this
  1416. };
  1417. e.store = function() {
  1418. this._updateInstructions(true);
  1419. this._storeIndex = this._instructions.length;
  1420. return this
  1421. };
  1422. e.unstore = function() {
  1423. this._storeIndex = 0;
  1424. return this
  1425. };
  1426. e.clone = function() {
  1427. var e = new t;
  1428. e.command = this.command;
  1429. e._stroke = this._stroke;
  1430. e._strokeStyle = this._strokeStyle;
  1431. e._strokeIgnoreScale = this._strokeIgnoreScale;
  1432. e._fill = this._fill;
  1433. e._instructions = this._instructions.slice();
  1434. e._commitIndex = this._commitIndex;
  1435. e._activeInstructions = this._activeInstructions.slice();
  1436. e._dirty = this._dirty;
  1437. e._storeIndex = this._storeIndex;
  1438. return e
  1439. };
  1440. e.toString = function() {
  1441. return "[Graphics]"
  1442. };
  1443. e.mt = e.moveTo;
  1444. e.lt = e.lineTo;
  1445. e.at = e.arcTo;
  1446. e.bt = e.bezierCurveTo;
  1447. e.qt = e.quadraticCurveTo;
  1448. e.a = e.arc;
  1449. e.r = e.rect;
  1450. e.cp = e.closePath;
  1451. e.c = e.clear;
  1452. e.f = e.beginFill;
  1453. e.lf = e.beginLinearGradientFill;
  1454. e.rf = e.beginRadialGradientFill;
  1455. e.bf = e.beginBitmapFill;
  1456. e.ef = e.endFill;
  1457. e.ss = e.setStrokeStyle;
  1458. e.s = e.beginStroke;
  1459. e.ls = e.beginLinearGradientStroke;
  1460. e.rs = e.beginRadialGradientStroke;
  1461. e.bs = e.beginBitmapStroke;
  1462. e.es = e.endStroke;
  1463. e.dr = e.drawRect;
  1464. e.rr = e.drawRoundRect;
  1465. e.rc = e.drawRoundRectComplex;
  1466. e.dc = e.drawCircle;
  1467. e.de = e.drawEllipse;
  1468. e.dp = e.drawPolyStar;
  1469. e.p = e.decodePath;
  1470. e._updateInstructions = function(e) {
  1471. var i = this._instructions,
  1472. s = this._activeInstructions,
  1473. r = this._commitIndex;
  1474. if (this._dirty && s.length) {
  1475. i.length = r;
  1476. i.push(t.beginCmd);
  1477. var n = s.length,
  1478. a = i.length;
  1479. i.length = a + n;
  1480. for (var o = 0; o < n; o++) {
  1481. i[o + a] = s[o]
  1482. }
  1483. if (this._fill) {
  1484. i.push(this._fill)
  1485. }
  1486. if (this._stroke && this._strokeStyle) {
  1487. i.push(this._strokeStyle)
  1488. }
  1489. if (this._stroke) {
  1490. i.push(this._stroke)
  1491. }
  1492. this._dirty = false
  1493. }
  1494. if (e) {
  1495. s.length = 0;
  1496. this._commitIndex = i.length
  1497. }
  1498. };
  1499. e._setFill = function(t) {
  1500. this._updateInstructions(true);
  1501. if (this._fill = t) {
  1502. this.command = t
  1503. }
  1504. return this
  1505. };
  1506. e._setStroke = function(t) {
  1507. this._updateInstructions(true);
  1508. if (this._stroke = t) {
  1509. this.command = t;
  1510. t.ignoreScale = this._strokeIgnoreScale
  1511. }
  1512. return this
  1513. };
  1514. (i.LineTo = function(t, e) {
  1515. this.x = t;
  1516. this.y = e
  1517. }).prototype.exec = function(t) {
  1518. t.lineTo(this.x, this.y)
  1519. };
  1520. (i.MoveTo = function(t, e) {
  1521. this.x = t;
  1522. this.y = e
  1523. }).prototype.exec = function(t) {
  1524. t.moveTo(this.x, this.y)
  1525. };
  1526. (i.ArcTo = function(t, e, i, s, r) {
  1527. this.x1 = t;
  1528. this.y1 = e;
  1529. this.x2 = i;
  1530. this.y2 = s;
  1531. this.radius = r
  1532. }).prototype.exec = function(t) {
  1533. t.arcTo(this.x1, this.y1, this.x2, this.y2, this.radius)
  1534. };
  1535. (i.Arc = function(t, e, i, s, r, n) {
  1536. this.x = t;
  1537. this.y = e;
  1538. this.radius = i;
  1539. this.startAngle = s;
  1540. this.endAngle = r;
  1541. this.anticlockwise = !! n
  1542. }).prototype.exec = function(t) {
  1543. t.arc(this.x, this.y, this.radius, this.startAngle, this.endAngle, this.anticlockwise)
  1544. };
  1545. (i.QuadraticCurveTo = function(t, e, i, s) {
  1546. this.cpx = t;
  1547. this.cpy = e;
  1548. this.x = i;
  1549. this.y = s
  1550. }).prototype.exec = function(t) {
  1551. t.quadraticCurveTo(this.cpx, this.cpy, this.x, this.y)
  1552. };
  1553. (i.BezierCurveTo = function(t, e, i, s, r, n) {
  1554. this.cp1x = t;
  1555. this.cp1y = e;
  1556. this.cp2x = i;
  1557. this.cp2y = s;
  1558. this.x = r;
  1559. this.y = n
  1560. }).prototype.exec = function(t) {
  1561. t.bezierCurveTo(this.cp1x, this.cp1y, this.cp2x, this.cp2y, this.x, this.y)
  1562. };
  1563. (i.Rect = function(t, e, i, s) {
  1564. this.x = t;
  1565. this.y = e;
  1566. this.w = i;
  1567. this.h = s
  1568. }).prototype.exec = function(t) {
  1569. t.rect(this.x, this.y, this.w, this.h)
  1570. };
  1571. (i.ClosePath = function() {}).prototype.exec = function(t) {
  1572. t.closePath()
  1573. };
  1574. (i.BeginPath = function() {}).prototype.exec = function(t) {
  1575. t.beginPath()
  1576. };
  1577. e = (i.Fill = function(t, e) {
  1578. this.style = t;
  1579. this.matrix = e
  1580. }).prototype;
  1581. e.exec = function(t) {
  1582. if (!this.style) {
  1583. return
  1584. }
  1585. t.fillStyle = this.style;
  1586. var e = this.matrix;
  1587. if (e) {
  1588. t.save();
  1589. t.transform(e.a, e.b, e.c, e.d, e.tx, e.ty)
  1590. }
  1591. t.fill();
  1592. if (e) {
  1593. t.restore()
  1594. }
  1595. };
  1596. e.linearGradient = function(e, i, s, r, n, a) {
  1597. var o = this.style = t._ctx.createLinearGradient(s, r, n, a);
  1598. for (var h = 0, c = e.length; h < c; h++) {
  1599. o.addColorStop(i[h], e[h])
  1600. }
  1601. o.props = {
  1602. colors: e,
  1603. ratios: i,
  1604. x0: s,
  1605. y0: r,
  1606. x1: n,
  1607. y1: a,
  1608. type: "linear"
  1609. };
  1610. return this
  1611. };
  1612. e.radialGradient = function(e, i, s, r, n, a, o, h) {
  1613. var c = this.style = t._ctx.createRadialGradient(s, r, n, a, o, h);
  1614. for (var u = 0, l = e.length; u < l; u++) {
  1615. c.addColorStop(i[u], e[u])
  1616. }
  1617. c.props = {
  1618. colors: e,
  1619. ratios: i,
  1620. x0: s,
  1621. y0: r,
  1622. r0: n,
  1623. x1: a,
  1624. y1: o,
  1625. r1: h,
  1626. type: "radial"
  1627. };
  1628. return this
  1629. };
  1630. e.bitmap = function(e, i) {
  1631. var s = this.style = t._ctx.createPattern(e, i || "");
  1632. s.props = {
  1633. image: e,
  1634. repetition: i,
  1635. type: "bitmap"
  1636. };
  1637. return this
  1638. };
  1639. e.path = false;
  1640. e = (i.Stroke = function(t, e) {
  1641. this.style = t;
  1642. this.ignoreScale = e
  1643. }).prototype;
  1644. e.exec = function(t) {
  1645. if (!this.style) {
  1646. return
  1647. }
  1648. t.strokeStyle = this.style;
  1649. if (this.ignoreScale) {
  1650. t.save();
  1651. t.setTransform(1, 0, 0, 1, 0, 0)
  1652. }
  1653. t.stroke();
  1654. if (this.ignoreScale) {
  1655. t.restore()
  1656. }
  1657. };
  1658. e.linearGradient = i.Fill.prototype.linearGradient;
  1659. e.radialGradient = i.Fill.prototype.radialGradient;
  1660. e.bitmap = i.Fill.prototype.bitmap;
  1661. e.path = false;
  1662. e = (i.StrokeStyle = function(t, e, i, s) {
  1663. this.width = t;
  1664. this.caps = e;
  1665. this.joints = i;
  1666. this.miterLimit = s
  1667. }).prototype;
  1668. e.exec = function(e) {
  1669. e.lineWidth = this.width == null ? "1" : this.width;
  1670. e.lineCap = this.caps == null ? "butt" : isNaN(this.caps) ? this.caps : t.STROKE_CAPS_MAP[this.caps];
  1671. e.lineJoin = this.joints == null ? "miter" : isNaN(this.joints) ? this.joints : t.STROKE_JOINTS_MAP[this.joints];
  1672. e.miterLimit = this.miterLimit == null ? "10" : this.miterLimit
  1673. };
  1674. e.path = false;
  1675. (i.RoundRect = function(t, e, i, s, r, n, a, o) {
  1676. this.x = t;
  1677. this.y = e;
  1678. this.w = i;
  1679. this.h = s;
  1680. this.radiusTL = r;
  1681. this.radiusTR = n;
  1682. this.radiusBR = a;
  1683. this.radiusBL = o
  1684. }).prototype.exec = function(t) {
  1685. var e = (h < c ? h : c) / 2;
  1686. var i = 0,
  1687. s = 0,
  1688. r = 0,
  1689. n = 0;
  1690. var a = this.x,
  1691. o = this.y,
  1692. h = this.w,
  1693. c = this.h;
  1694. var u = this.radiusTL,
  1695. l = this.radiusTR,
  1696. d = this.radiusBR,
  1697. f = this.radiusBL;
  1698. if (u < 0) {
  1699. u *= i = -1
  1700. }
  1701. if (u > e) {
  1702. u = e
  1703. }
  1704. if (l < 0) {
  1705. l *= s = -1
  1706. }
  1707. if (l > e) {
  1708. l = e
  1709. }
  1710. if (d < 0) {
  1711. d *= r = -1
  1712. }
  1713. if (d > e) {
  1714. d = e
  1715. }
  1716. if (f < 0) {
  1717. f *= n = -1
  1718. }
  1719. if (f > e) {
  1720. f = e
  1721. }
  1722. t.moveTo(a + h - l, o);
  1723. t.arcTo(a + h + l * s, o - l * s, a + h, o + l, l);
  1724. t.lineTo(a + h, o + c - d);
  1725. t.arcTo(a + h + d * r, o + c + d * r, a + h - d, o + c, d);
  1726. t.lineTo(a + f, o + c);
  1727. t.arcTo(a - f * n, o + c + f * n, a, o + c - f, f);
  1728. t.lineTo(a, o + u);
  1729. t.arcTo(a - u * i, o - u * i, a + u, o, u);
  1730. t.closePath()
  1731. };
  1732. (i.Circle = function(t, e, i) {
  1733. this.x = t;
  1734. this.y = e;
  1735. this.radius = i
  1736. }).prototype.exec = function(t) {
  1737. t.arc(this.x, this.y, this.radius, 0, Math.PI * 2)
  1738. };
  1739. (i.Ellipse = function(t, e, i, s) {
  1740. this.x = t;
  1741. this.y = e;
  1742. this.w = i;
  1743. this.h = s
  1744. }).prototype.exec = function(t) {
  1745. var e = this.x,
  1746. i = this.y;
  1747. var s = this.w,
  1748. r = this.h;
  1749. var n = .5522848;
  1750. var a = s / 2 * n;
  1751. var o = r / 2 * n;
  1752. var h = e + s;
  1753. var c = i + r;
  1754. var u = e + s / 2;
  1755. var l = i + r / 2;
  1756. t.moveTo(e, l);
  1757. t.bezierCurveTo(e, l - o, u - a, i, u, i);
  1758. t.bezierCurveTo(u + a, i, h, l - o, h, l);
  1759. t.bezierCurveTo(h, l + o, u + a, c, u, c);
  1760. t.bezierCurveTo(u - a, c, e, l + o, e, l)
  1761. };
  1762. (i.PolyStar = function(t, e, i, s, r, n) {
  1763. this.x = t;
  1764. this.y = e;
  1765. this.radius = i;
  1766. this.sides = s;
  1767. this.pointSize = r;
  1768. this.angle = n
  1769. }).prototype.exec = function(t) {
  1770. var e = this.x,
  1771. i = this.y;
  1772. var s = this.radius;
  1773. var r = (this.angle || 0) / 180 * Math.PI;
  1774. var n = this.sides;
  1775. var a = 1 - (this.pointSize || 0);
  1776. var o = Math.PI / n;
  1777. t.moveTo(e + Math.cos(r) * s, i + Math.sin(r) * s);
  1778. for (var h = 0; h < n; h++) {
  1779. r += o;
  1780. if (a != 1) {
  1781. t.lineTo(e + Math.cos(r) * s * a, i + Math.sin(r) * s * a)
  1782. }
  1783. r += o;
  1784. t.lineTo(e + Math.cos(r) * s, i + Math.sin(r) * s)
  1785. }
  1786. t.closePath()
  1787. };
  1788. t.beginCmd = new i.BeginPath;
  1789. createjs.Graphics = t
  1790. })();
  1791. this.createjs = this.createjs || {};
  1792. (function() {
  1793. "use strict";
  1794. function t() {
  1795. this.EventDispatcher_constructor();
  1796. this.alpha = 1;
  1797. this.cacheCanvas = null;
  1798. this.cacheID = 0;
  1799. this.id = createjs.UID.get();
  1800. this.mouseEnabled = true;
  1801. this.tickEnabled = true;
  1802. this.name = null;
  1803. this.parent = null;
  1804. this.regX = 0;
  1805. this.regY = 0;
  1806. this.rotation = 0;
  1807. this.scaleX = 1;
  1808. this.scaleY = 1;
  1809. this.skewX = 0;
  1810. this.skewY = 0;
  1811. this.shadow = null;
  1812. this.visible = true;
  1813. this.x = 0;
  1814. this.y = 0;
  1815. this.transformMatrix = null;
  1816. this.compositeOperation = null;
  1817. this.snapToPixel = true;
  1818. this.filters = null;
  1819. this.mask = null;
  1820. this.hitArea = null;
  1821. this.cursor = null;
  1822. this._cacheOffsetX = 0;
  1823. this._cacheOffsetY = 0;
  1824. this._filterOffsetX = 0;
  1825. this._filterOffsetY = 0;
  1826. this._cacheScale = 1;
  1827. this._cacheDataURLID = 0;
  1828. this._cacheDataURL = null;
  1829. this._props = new createjs.DisplayProps;
  1830. this._rectangle = new createjs.Rectangle;
  1831. this._bounds = null
  1832. }
  1833. var e = createjs.extend(t, createjs.EventDispatcher);
  1834. t._MOUSE_EVENTS = ["click", "dblclick", "mousedown", "mouseout", "mouseover", "pressmove", "pressup", "rollout", "rollover"];
  1835. t.suppressCrossDomainErrors = false;
  1836. t._snapToPixelEnabled = false;
  1837. var i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1838. if (i.getContext) {
  1839. t._hitTestCanvas = i;
  1840. t._hitTestContext = i.getContext("2d");
  1841. i.width = i.height = 1
  1842. }
  1843. t._nextCacheID = 1;
  1844. e.getStage = function() {
  1845. var t = this,
  1846. e = createjs["Stage"];
  1847. while (t.parent) {
  1848. t = t.parent
  1849. }
  1850. if (t instanceof e) {
  1851. return t
  1852. }
  1853. return null
  1854. };
  1855. try {
  1856. Object.defineProperties(e, {
  1857. stage: {
  1858. get: e.getStage
  1859. }
  1860. })
  1861. } catch (s) {}
  1862. e.isVisible = function() {
  1863. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0)
  1864. };
  1865. e.draw = function(t, e) {
  1866. var i = this.cacheCanvas;
  1867. if (e || !i) {
  1868. return false
  1869. }
  1870. var s = this._cacheScale;
  1871. t.drawImage(i, this._cacheOffsetX + this._filterOffsetX, this._cacheOffsetY + this._filterOffsetY, i.width / s, i.height / s);
  1872. return true
  1873. };
  1874. e.updateContext = function(e) {
  1875. var i = this,
  1876. s = i.mask,
  1877. r = i._props.matrix;
  1878. if (s && s.graphics && !s.graphics.isEmpty()) {
  1879. s.getMatrix(r);
  1880. e.transform(r.a, r.b, r.c, r.d, r.tx, r.ty);
  1881. s.graphics.drawAsPath(e);
  1882. e.clip();
  1883. r.invert();
  1884. e.transform(r.a, r.b, r.c, r.d, r.tx, r.ty)
  1885. }
  1886. this.getMatrix(r);
  1887. var n = r.tx,
  1888. a = r.ty;
  1889. if (t._snapToPixelEnabled && i.snapToPixel) {
  1890. n = n + (n < 0 ? -.5 : .5) | 0;
  1891. a = a + (a < 0 ? -.5 : .5) | 0
  1892. }
  1893. e.transform(r.a, r.b, r.c, r.d, n, a);
  1894. e.globalAlpha *= i.alpha;
  1895. if (i.compositeOperation) {
  1896. e.globalCompositeOperation = i.compositeOperation
  1897. }
  1898. if (i.shadow) {
  1899. this._applyShadow(e, i.shadow)
  1900. }
  1901. };
  1902. e.cache = function(t, e, i, s, r) {
  1903. r = r || 1;
  1904. if (!this.cacheCanvas) {
  1905. this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")
  1906. }
  1907. this._cacheWidth = i;
  1908. this._cacheHeight = s;
  1909. this._cacheOffsetX = t;
  1910. this._cacheOffsetY = e;
  1911. this._cacheScale = r;
  1912. this.updateCache()
  1913. };
  1914. e.updateCache = function(e) {
  1915. var i = this.cacheCanvas;
  1916. if (!i) {
  1917. throw "cache() must be called before updateCache()"
  1918. }
  1919. var s = this._cacheScale,
  1920. r = this._cacheOffsetX * s,
  1921. n = this._cacheOffsetY * s;
  1922. var a = this._cacheWidth,
  1923. o = this._cacheHeight,
  1924. h = i.getContext("2d");
  1925. var c = this._getFilterBounds();
  1926. r += this._filterOffsetX = c.x;
  1927. n += this._filterOffsetY = c.y;
  1928. a = Math.ceil(a * s) + c.width;
  1929. o = Math.ceil(o * s) + c.height;
  1930. if (a != i.width || o != i.height) {
  1931. i.width = a;
  1932. i.height = o
  1933. } else if (!e) {
  1934. h.clearRect(0, 0, a + 1, o + 1)
  1935. }
  1936. h.save();
  1937. h.globalCompositeOperation = e;
  1938. h.setTransform(s, 0, 0, s, -r, -n);
  1939. this.draw(h, true);
  1940. this._applyFilters();
  1941. h.restore();
  1942. this.cacheID = t._nextCacheID++
  1943. };
  1944. e.uncache = function() {
  1945. this._cacheDataURL = this.cacheCanvas = null;
  1946. this.cacheID = this._cacheOffsetX = this._cacheOffsetY = this._filterOffsetX = this._filterOffsetY = 0;
  1947. this._cacheScale = 1
  1948. };
  1949. e.getCacheDataURL = function() {
  1950. if (!this.cacheCanvas) {
  1951. return null
  1952. }
  1953. if (this.cacheID != this._cacheDataURLID) {
  1954. this._cacheDataURL = this.cacheCanvas.toDataURL()
  1955. }
  1956. return this._cacheDataURL
  1957. };
  1958. e.localToGlobal = function(t, e, i) {
  1959. return this.getConcatenatedMatrix(this._props.matrix).transformPoint(t, e, i || new createjs.Point)
  1960. };
  1961. e.globalToLocal = function(t, e, i) {
  1962. return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t, e, i || new createjs.Point)
  1963. };
  1964. e.localToLocal = function(t, e, i, s) {
  1965. s = this.localToGlobal(t, e, s);
  1966. return i.globalToLocal(s.x, s.y, s)
  1967. };
  1968. e.setTransform = function(t, e, i, s, r, n, a, o, h) {
  1969. this.x = t || 0;
  1970. this.y = e || 0;
  1971. this.scaleX = i == null ? 1 : i;
  1972. this.scaleY = s == null ? 1 : s;
  1973. this.rotation = r || 0;
  1974. this.skewX = n || 0;
  1975. this.skewY = a || 0;
  1976. this.regX = o || 0;
  1977. this.regY = h || 0;
  1978. return this
  1979. };
  1980. e.getMatrix = function(t) {
  1981. var e = this,
  1982. i = t && t.identity() || new createjs.Matrix2D;
  1983. return e.transformMatrix ? i.copy(e.transformMatrix) : i.appendTransform(e.x, e.y, e.scaleX, e.scaleY, e.rotation, e.skewX, e.skewY, e.regX, e.regY)
  1984. };
  1985. e.getConcatenatedMatrix = function(t) {
  1986. var e = this,
  1987. i = this.getMatrix(t);
  1988. while (e = e.parent) {
  1989. i.prependMatrix(e.getMatrix(e._props.matrix))
  1990. }
  1991. return i
  1992. };
  1993. e.getConcatenatedDisplayProps = function(t) {
  1994. t = t ? t.identity() : new createjs.DisplayProps;
  1995. var e = this,
  1996. i = e.getMatrix(t.matrix);
  1997. do {
  1998. t.prepend(e.visible, e.alpha, e.shadow, e.compositeOperation);
  1999. if (e != this) {
  2000. i.prependMatrix(e.getMatrix(e._props.matrix))
  2001. }
  2002. } while (e = e.parent);
  2003. return t
  2004. };
  2005. e.hitTest = function(e, i) {
  2006. var s = t._hitTestContext;
  2007. s.setTransform(1, 0, 0, 1, -e, -i);
  2008. this.draw(s);
  2009. var r = this._testHit(s);
  2010. s.setTransform(1, 0, 0, 1, 0, 0);
  2011. s.clearRect(0, 0, 2, 2);
  2012. return r
  2013. };
  2014. e.set = function(t) {
  2015. for (var e in t) {
  2016. this[e] = t[e]
  2017. }
  2018. return this
  2019. };
  2020. e.getBounds = function() {
  2021. if (this._bounds) {
  2022. return this._rectangle.copy(this._bounds)
  2023. }
  2024. var t = this.cacheCanvas;
  2025. if (t) {
  2026. var e = this._cacheScale;
  2027. return this._rectangle.setValues(this._cacheOffsetX, this._cacheOffsetY, t.width / e, t.height / e)
  2028. }
  2029. return null
  2030. };
  2031. e.getTransformedBounds = function() {
  2032. return this._getBounds()
  2033. };
  2034. e.setBounds = function(t, e, i, s) {
  2035. if (t == null) {
  2036. this._bounds = t
  2037. }
  2038. this._bounds = (this._bounds || new createjs.Rectangle).setValues(t, e, i, s)
  2039. };
  2040. e.clone = function() {
  2041. return this._cloneProps(new t)
  2042. };
  2043. e.toString = function() {
  2044. return "[DisplayObject (name=" + this.name + ")]"
  2045. };
  2046. e._cloneProps = function(t) {
  2047. t.alpha = this.alpha;
  2048. t.mouseEnabled = this.mouseEnabled;
  2049. t.tickEnabled = this.tickEnabled;
  2050. t.name = this.name;
  2051. t.regX = this.regX;
  2052. t.regY = this.regY;
  2053. t.rotation = this.rotation;
  2054. t.scaleX = this.scaleX;
  2055. t.scaleY = this.scaleY;
  2056. t.shadow = this.shadow;
  2057. t.skewX = this.skewX;
  2058. t.skewY = this.skewY;
  2059. t.visible = this.visible;
  2060. t.x = this.x;
  2061. t.y = this.y;
  2062. t.compositeOperation = this.compositeOperation;
  2063. t.snapToPixel = this.snapToPixel;
  2064. t.filters = this.filters == null ? null : this.filters.slice(0);
  2065. t.mask = this.mask;
  2066. t.hitArea = this.hitArea;
  2067. t.cursor = this.cursor;
  2068. t._bounds = this._bounds;
  2069. return t
  2070. };
  2071. e._applyShadow = function(t, e) {
  2072. e = e || Shadow.identity;
  2073. t.shadowColor = e.color;
  2074. t.shadowOffsetX = e.offsetX;
  2075. t.shadowOffsetY = e.offsetY;
  2076. t.shadowBlur = e.blur
  2077. };
  2078. e._tick = function(t) {
  2079. var e = this._listeners;
  2080. if (e && e["tick"]) {
  2081. t.target = null;
  2082. t.propagationStopped = t.immediatePropagationStopped = false;
  2083. this.dispatchEvent(t)
  2084. }
  2085. };
  2086. e._testHit = function(e) {
  2087. try {
  2088. var i = e.getImageData(0, 0, 1, 1).data[3] > 1
  2089. } catch (s) {
  2090. if (!t.suppressCrossDomainErrors) {
  2091. throw "An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
  2092. }
  2093. }
  2094. return i
  2095. };
  2096. e._applyFilters = function() {
  2097. if (!this.filters || this.filters.length == 0 || !this.cacheCanvas) {
  2098. return
  2099. }
  2100. var t = this.filters.length;
  2101. var e = this.cacheCanvas.getContext("2d");
  2102. var i = this.cacheCanvas.width;
  2103. var s = this.cacheCanvas.height;
  2104. for (var r = 0; r < t; r++) {
  2105. this.filters[r].applyFilter(e, 0, 0, i, s)
  2106. }
  2107. };
  2108. e._getFilterBounds = function(t) {
  2109. var e, i = this.filters,
  2110. s = this._rectangle.setValues(0, 0, 0, 0);
  2111. if (!i || !(e = i.length)) {
  2112. return s
  2113. }
  2114. for (var r = 0; r < e; r++) {
  2115. var n = this.filters[r];
  2116. n.getBounds && n.getBounds(s)
  2117. }
  2118. return s
  2119. };
  2120. e._getBounds = function(t, e) {
  2121. return this._transformBounds(this.getBounds(), t, e)
  2122. };
  2123. e._transformBounds = function(t, e, i) {
  2124. if (!t) {
  2125. return t
  2126. }
  2127. var s = t.x,
  2128. r = t.y,
  2129. n = t.width,
  2130. a = t.height,
  2131. o = this._props.matrix;
  2132. o = i ? o.identity() : this.getMatrix(o);
  2133. if (s || r) {
  2134. o.appendTransform(0, 0, 1, 1, 0, 0, 0, -s, -r)
  2135. }
  2136. if (e) {
  2137. o.prependMatrix(e)
  2138. }
  2139. var h = n * o.a,
  2140. c = n * o.b;
  2141. var u = a * o.c,
  2142. l = a * o.d;
  2143. var d = o.tx,
  2144. f = o.ty;
  2145. var _ = d,
  2146. p = d,
  2147. g = f,
  2148. v = f;
  2149. if ((s = h + d) < _) {
  2150. _ = s
  2151. } else if (s > p) {
  2152. p = s
  2153. }
  2154. if ((s = h + u + d) < _) {
  2155. _ = s
  2156. } else if (s > p) {
  2157. p = s
  2158. }
  2159. if ((s = u + d) < _) {
  2160. _ = s
  2161. } else if (s > p) {
  2162. p = s
  2163. }
  2164. if ((r = c + f) < g) {
  2165. g = r
  2166. } else if (r > v) {
  2167. v = r
  2168. }
  2169. if ((r = c + l + f) < g) {
  2170. g = r
  2171. } else if (r > v) {
  2172. v = r
  2173. }
  2174. if ((r = l + f) < g) {
  2175. g = r
  2176. } else if (r > v) {
  2177. v = r
  2178. }
  2179. return t.setValues(_, g, p - _, v - g)
  2180. };
  2181. e._hasMouseEventListener = function() {
  2182. var e = t._MOUSE_EVENTS;
  2183. for (var i = 0, s = e.length; i < s; i++) {
  2184. if (this.hasEventListener(e[i])) {
  2185. return true
  2186. }
  2187. }
  2188. return !!this.cursor
  2189. };
  2190. createjs.DisplayObject = createjs.promote(t, "EventDispatcher")
  2191. })();
  2192. this.createjs = this.createjs || {};
  2193. (function() {
  2194. "use strict";
  2195. function t() {
  2196. this.DisplayObject_constructor();
  2197. this.children = [];
  2198. this.mouseChildren = true;
  2199. this.tickChildren = true
  2200. }
  2201. var e = createjs.extend(t, createjs.DisplayObject);
  2202. e.getNumChildren = function() {
  2203. return this.children.length
  2204. };
  2205. try {
  2206. Object.defineProperties(e, {
  2207. numChildren: {
  2208. get: e.getNumChildren
  2209. }
  2210. })
  2211. } catch (i) {}
  2212. e.initialize = t;
  2213. e.isVisible = function() {
  2214. var t = this.cacheCanvas || this.children.length;
  2215. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && t)
  2216. };
  2217. e.draw = function(t, e) {
  2218. if (this.DisplayObject_draw(t, e)) {
  2219. return true
  2220. }
  2221. var i = this.children.slice();
  2222. for (var s = 0, r = i.length; s < r; s++) {
  2223. var n = i[s];
  2224. if (!n.isVisible()) {
  2225. continue
  2226. }
  2227. t.save();
  2228. n.updateContext(t);
  2229. n.draw(t);
  2230. t.restore()
  2231. }
  2232. return true
  2233. };
  2234. e.addChild = function(t) {
  2235. if (t == null) {
  2236. return t
  2237. }
  2238. var e = arguments.length;
  2239. if (e > 1) {
  2240. for (var i = 0; i < e; i++) {
  2241. this.addChild(arguments[i])
  2242. }
  2243. return arguments[e - 1]
  2244. }
  2245. if (t.parent) {
  2246. t.parent.removeChild(t)
  2247. }
  2248. t.parent = this;
  2249. this.children.push(t);
  2250. t.dispatchEvent("added");
  2251. return t
  2252. };
  2253. e.addChildAt = function(t, e) {
  2254. var i = arguments.length;
  2255. var s = arguments[i - 1];
  2256. if (s < 0 || s > this.children.length) {
  2257. return arguments[i - 2]
  2258. }
  2259. if (i > 2) {
  2260. for (var r = 0; r < i - 1; r++) {
  2261. this.addChildAt(arguments[r], s + r)
  2262. }
  2263. return arguments[i - 2]
  2264. }
  2265. if (t.parent) {
  2266. t.parent.removeChild(t)
  2267. }
  2268. t.parent = this;
  2269. this.children.splice(e, 0, t);
  2270. t.dispatchEvent("added");
  2271. return t
  2272. };
  2273. e.removeChild = function(t) {
  2274. var e = arguments.length;
  2275. if (e > 1) {
  2276. var i = true;
  2277. for (var s = 0; s < e; s++) {
  2278. i = i && this.removeChild(arguments[s])
  2279. }
  2280. return i
  2281. }
  2282. return this.removeChildAt(createjs.indexOf(this.children, t))
  2283. };
  2284. e.removeChildAt = function(t) {
  2285. var e = arguments.length;
  2286. if (e > 1) {
  2287. var i = [];
  2288. for (var s = 0; s < e; s++) {
  2289. i[s] = arguments[s]
  2290. }
  2291. i.sort(function(t, e) {
  2292. return e - t
  2293. });
  2294. var r = true;
  2295. for (var s = 0; s < e; s++) {
  2296. r = r && this.removeChildAt(i[s])
  2297. }
  2298. return r
  2299. }
  2300. if (t < 0 || t > this.children.length - 1) {
  2301. return false
  2302. }
  2303. var n = this.children[t];
  2304. if (n) {
  2305. n.parent = null
  2306. }
  2307. this.children.splice(t, 1);
  2308. n.dispatchEvent("removed");
  2309. return true
  2310. };
  2311. e.removeAllChildren = function() {
  2312. var t = this.children;
  2313. while (t.length) {
  2314. this.removeChildAt(0)
  2315. }
  2316. };
  2317. e.getChildAt = function(t) {
  2318. return this.children[t]
  2319. };
  2320. e.getChildByName = function(t) {
  2321. var e = this.children;
  2322. for (var i = 0, s = e.length; i < s; i++) {
  2323. if (e[i].name == t) {
  2324. return e[i]
  2325. }
  2326. }
  2327. return null
  2328. };
  2329. e.sortChildren = function(t) {
  2330. this.children.sort(t)
  2331. };
  2332. e.getChildIndex = function(t) {
  2333. return createjs.indexOf(this.children, t)
  2334. };
  2335. e.swapChildrenAt = function(t, e) {
  2336. var i = this.children;
  2337. var s = i[t];
  2338. var r = i[e];
  2339. if (!s || !r) {
  2340. return
  2341. }
  2342. i[t] = r;
  2343. i[e] = s
  2344. };
  2345. e.swapChildren = function(t, e) {
  2346. var i = this.children;
  2347. var s, r;
  2348. for (var n = 0, a = i.length; n < a; n++) {
  2349. if (i[n] == t) {
  2350. s = n
  2351. }
  2352. if (i[n] == e) {
  2353. r = n
  2354. }
  2355. if (s != null && r != null) {
  2356. break
  2357. }
  2358. }
  2359. if (n == a) {
  2360. return
  2361. }
  2362. i[s] = e;
  2363. i[r] = t
  2364. };
  2365. e.setChildIndex = function(t, e) {
  2366. var i = this.children,
  2367. s = i.length;
  2368. if (t.parent != this || e < 0 || e >= s) {
  2369. return
  2370. }
  2371. for (var r = 0; r < s; r++) {
  2372. if (i[r] == t) {
  2373. break
  2374. }
  2375. }
  2376. if (r == s || r == e) {
  2377. return
  2378. }
  2379. i.splice(r, 1);
  2380. i.splice(e, 0, t)
  2381. };
  2382. e.contains = function(t) {
  2383. while (t) {
  2384. if (t == this) {
  2385. return true
  2386. }
  2387. t = t.parent
  2388. }
  2389. return false
  2390. };
  2391. e.hitTest = function(t, e) {
  2392. return this.getObjectUnderPoint(t, e) != null
  2393. };
  2394. e.getObjectsUnderPoint = function(t, e, i) {
  2395. var s = [];
  2396. var r = this.localToGlobal(t, e);
  2397. this._getObjectsUnderPoint(r.x, r.y, s, i > 0, i == 1);
  2398. return s
  2399. };
  2400. e.getObjectUnderPoint = function(t, e, i) {
  2401. var s = this.localToGlobal(t, e);
  2402. return this._getObjectsUnderPoint(s.x, s.y, null, i > 0, i == 1)
  2403. };
  2404. e.getBounds = function() {
  2405. return this._getBounds(null, true)
  2406. };
  2407. e.getTransformedBounds = function() {
  2408. return this._getBounds()
  2409. };
  2410. e.clone = function(e) {
  2411. var i = this._cloneProps(new t);
  2412. if (e) {
  2413. this._cloneChildren(i)
  2414. }
  2415. return i
  2416. };
  2417. e.toString = function() {
  2418. return "[Container (name=" + this.name + ")]"
  2419. };
  2420. e._tick = function(t) {
  2421. if (this.tickChildren) {
  2422. for (var e = this.children.length - 1; e >= 0; e--) {
  2423. var i = this.children[e];
  2424. if (i.tickEnabled && i._tick) {
  2425. i._tick(t)
  2426. }
  2427. }
  2428. }
  2429. this.DisplayObject__tick(t)
  2430. };
  2431. e._cloneChildren = function(t) {
  2432. if (t.children.length) {
  2433. t.removeAllChildren()
  2434. }
  2435. var e = t.children;
  2436. for (var i = 0, s = this.children.length; i < s; i++) {
  2437. var r = this.children[i].clone(true);
  2438. r.parent = t;
  2439. e.push(r)
  2440. }
  2441. };
  2442. e._getObjectsUnderPoint = function(e, i, s, r, n, a) {
  2443. a = a || 0;
  2444. if (!a && !this._testMask(this, e, i)) {
  2445. return null
  2446. }
  2447. var o, h = createjs.DisplayObject._hitTestContext;
  2448. n = n || r && this._hasMouseEventListener();
  2449. var c = this.children,
  2450. u = c.length;
  2451. for (var l = u - 1; l >= 0; l--) {
  2452. var d = c[l];
  2453. var f = d.hitArea;
  2454. if (!d.visible || !f && !d.isVisible() || r && !d.mouseEnabled) {
  2455. continue
  2456. }
  2457. if (!f && !this._testMask(d, e, i)) {
  2458. continue
  2459. }
  2460. if (!f && d instanceof t) {
  2461. var _ = d._getObjectsUnderPoint(e, i, s, r, n, a + 1);
  2462. if (!s && _) {
  2463. return r && !this.mouseChildren ? this : _
  2464. }
  2465. } else {
  2466. if (r && !n && !d._hasMouseEventListener()) {
  2467. continue
  2468. }
  2469. var p = d.getConcatenatedDisplayProps(d._props);
  2470. o = p.matrix;
  2471. if (f) {
  2472. o.appendMatrix(f.getMatrix(f._props.matrix));
  2473. p.alpha = f.alpha
  2474. }
  2475. h.globalAlpha = p.alpha;
  2476. h.setTransform(o.a, o.b, o.c, o.d, o.tx - e, o.ty - i);
  2477. (f || d).draw(h);
  2478. if (!this._testHit(h)) {
  2479. continue
  2480. }
  2481. h.setTransform(1, 0, 0, 1, 0, 0);
  2482. h.clearRect(0, 0, 2, 2);
  2483. if (s) {
  2484. s.push(d)
  2485. } else {
  2486. return r && !this.mouseChildren ? this : d
  2487. }
  2488. }
  2489. }
  2490. return null
  2491. };
  2492. e._testMask = function(t, e, i) {
  2493. var s = t.mask;
  2494. if (!s || !s.graphics || s.graphics.isEmpty()) {
  2495. return true
  2496. }
  2497. var r = this._props.matrix,
  2498. n = t.parent;
  2499. r = n ? n.getConcatenatedMatrix(r) : r.identity();
  2500. r = s.getMatrix(s._props.matrix).prependMatrix(r);
  2501. var a = createjs.DisplayObject._hitTestContext;
  2502. a.setTransform(r.a, r.b, r.c, r.d, r.tx - e, r.ty - i);
  2503. s.graphics.drawAsPath(a);
  2504. a.fillStyle = "#000";
  2505. a.fill();
  2506. if (!this._testHit(a)) {
  2507. return false
  2508. }
  2509. a.setTransform(1, 0, 0, 1, 0, 0);
  2510. a.clearRect(0, 0, 2, 2);
  2511. return true
  2512. };
  2513. e._getBounds = function(t, e) {
  2514. var i = this.DisplayObject_getBounds();
  2515. if (i) {
  2516. return this._transformBounds(i, t, e)
  2517. }
  2518. var s = this._props.matrix;
  2519. s = e ? s.identity() : this.getMatrix(s);
  2520. if (t) {
  2521. s.prependMatrix(t)
  2522. }
  2523. var r = this.children.length,
  2524. n = null;
  2525. for (var a = 0; a < r; a++) {
  2526. var o = this.children[a];
  2527. if (!o.visible || !(i = o._getBounds(s))) {
  2528. continue
  2529. }
  2530. if (n) {
  2531. n.extend(i.x, i.y, i.width, i.height)
  2532. } else {
  2533. n = i.clone()
  2534. }
  2535. }
  2536. return n
  2537. };
  2538. createjs.Container = createjs.promote(t, "DisplayObject")
  2539. })();
  2540. this.createjs = this.createjs || {};
  2541. (function() {
  2542. "use strict";
  2543. function t(t) {
  2544. this.Container_constructor();
  2545. this.autoClear = true;
  2546. this.canvas = typeof t == "string" ? document.getElementById(t) : t;
  2547. this.mouseX = 0;
  2548. this.mouseY = 0;
  2549. this.drawRect = null;
  2550. this.snapToPixelEnabled = false;
  2551. this.mouseInBounds = false;
  2552. this.tickOnUpdate = true;
  2553. this.mouseMoveOutside = false;
  2554. this.preventSelection = true;
  2555. this._pointerData = {};
  2556. this._pointerCount = 0;
  2557. this._primaryPointerID = null;
  2558. this._mouseOverIntervalID = null;
  2559. this._nextStage = null;
  2560. this._prevStage = null;
  2561. this.enableDOMEvents(true)
  2562. }
  2563. var e = createjs.extend(t, createjs.Container);
  2564. e._get_nextStage = function() {
  2565. return this._nextStage
  2566. };
  2567. e._set_nextStage = function(t) {
  2568. if (this._nextStage) {
  2569. this._nextStage._prevStage = null
  2570. }
  2571. if (t) {
  2572. t._prevStage = this
  2573. }
  2574. this._nextStage = t
  2575. };
  2576. try {
  2577. Object.defineProperties(e, {
  2578. nextStage: {
  2579. get: e._get_nextStage,
  2580. set: e._set_nextStage
  2581. }
  2582. })
  2583. } catch (i) {}
  2584. e.update = function(t) {
  2585. if (!this.canvas) {
  2586. return
  2587. }
  2588. if (this.tickOnUpdate) {
  2589. this.tick(t)
  2590. }
  2591. if (this.dispatchEvent("drawstart")) {
  2592. return
  2593. }
  2594. createjs.DisplayObject._snapToPixelEnabled = this.snapToPixelEnabled;
  2595. var e = this.drawRect,
  2596. i = this.canvas.getContext("2d");
  2597. i.setTransform(1, 0, 0, 1, 0, 0);
  2598. if (this.autoClear) {
  2599. if (e) {
  2600. i.clearRect(e.x, e.y, e.width, e.height)
  2601. } else {
  2602. i.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)
  2603. }
  2604. }
  2605. i.save();
  2606. if (this.drawRect) {
  2607. i.beginPath();
  2608. i.rect(e.x, e.y, e.width, e.height);
  2609. i.clip()
  2610. }
  2611. this.updateContext(i);
  2612. this.draw(i, false);
  2613. i.restore();
  2614. this.dispatchEvent("drawend")
  2615. };
  2616. e.tick = function(t) {
  2617. if (!this.tickEnabled || this.dispatchEvent("tickstart")) {
  2618. return
  2619. }
  2620. var e = new createjs.Event("tick");
  2621. if (t) {
  2622. for (var i in t) {
  2623. if (t.hasOwnProperty(i)) {
  2624. e[i] = t[i]
  2625. }
  2626. }
  2627. }
  2628. this._tick(e);
  2629. this.dispatchEvent("tickend")
  2630. };
  2631. e.handleEvent = function(t) {
  2632. if (t.type == "tick") {
  2633. this.update(t)
  2634. }
  2635. };
  2636. e.clear = function() {
  2637. if (!this.canvas) {
  2638. return
  2639. }
  2640. var t = this.canvas.getContext("2d");
  2641. t.setTransform(1, 0, 0, 1, 0, 0);
  2642. t.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)
  2643. };
  2644. e.toDataURL = function(t, e) {
  2645. var i, s = this.canvas.getContext("2d"),
  2646. r = this.canvas.width,
  2647. n = this.canvas.height;
  2648. if (t) {
  2649. i = s.getImageData(0, 0, r, n);
  2650. var a = s.globalCompositeOperation;
  2651. s.globalCompositeOperation = "destination-over";
  2652. s.fillStyle = t;
  2653. s.fillRect(0, 0, r, n)
  2654. }
  2655. var o = this.canvas.toDataURL(e || "image/png");
  2656. if (t) {
  2657. s.putImageData(i, 0, 0);
  2658. s.globalCompositeOperation = a
  2659. }
  2660. return o
  2661. };
  2662. e.enableMouseOver = function(t) {
  2663. if (this._mouseOverIntervalID) {
  2664. clearInterval(this._mouseOverIntervalID);
  2665. this._mouseOverIntervalID = null;
  2666. if (t == 0) {
  2667. this._testMouseOver(true)
  2668. }
  2669. }
  2670. if (t == null) {
  2671. t = 20
  2672. } else if (t <= 0) {
  2673. return
  2674. }
  2675. var e = this;
  2676. this._mouseOverIntervalID = setInterval(function() {
  2677. e._testMouseOver()
  2678. }, 1e3 / Math.min(50, t))
  2679. };
  2680. e.enableDOMEvents = function(t) {
  2681. if (t == null) {
  2682. t = true
  2683. }
  2684. var e, i, s = this._eventListeners;
  2685. if (!t && s) {
  2686. for (e in s) {
  2687. i = s[e];
  2688. i.t.removeEventListener(e, i.f, false)
  2689. }
  2690. this._eventListeners = null
  2691. } else if (t && !s && this.canvas) {
  2692. var r = window.addEventListener ? window : document;
  2693. var n = this;
  2694. s = this._eventListeners = {};
  2695. s["mouseup"] = {
  2696. t: r,
  2697. f: function(t) {
  2698. n._handleMouseUp(t)
  2699. }
  2700. };
  2701. s["mousemove"] = {
  2702. t: r,
  2703. f: function(t) {
  2704. n._handleMouseMove(t)
  2705. }
  2706. };
  2707. s["dblclick"] = {
  2708. t: this.canvas,
  2709. f: function(t) {
  2710. n._handleDoubleClick(t)
  2711. }
  2712. };
  2713. s["mousedown"] = {
  2714. t: this.canvas,
  2715. f: function(t) {
  2716. n._handleMouseDown(t)
  2717. }
  2718. };
  2719. for (e in s) {
  2720. i = s[e];
  2721. i.t.addEventListener(e, i.f, false)
  2722. }
  2723. }
  2724. };
  2725. e.clone = function() {
  2726. throw "Stage cannot be cloned."
  2727. };
  2728. e.toString = function() {
  2729. return "[Stage (name=" + this.name + ")]"
  2730. };
  2731. e._getElementRect = function(t) {
  2732. var e;
  2733. try {
  2734. e = t.getBoundingClientRect()
  2735. } catch (i) {
  2736. e = {
  2737. top: t.offsetTop,
  2738. left: t.offsetLeft,
  2739. width: t.offsetWidth,
  2740. height: t.offsetHeight
  2741. }
  2742. }
  2743. var s = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0);
  2744. var r = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0);
  2745. var n = window.getComputedStyle ? getComputedStyle(t, null) : t.currentStyle;
  2746. var a = parseInt(n.paddingLeft) + parseInt(n.borderLeftWidth);
  2747. var o = parseInt(n.paddingTop) + parseInt(n.borderTopWidth);
  2748. var h = parseInt(n.paddingRight) + parseInt(n.borderRightWidth);
  2749. var c = parseInt(n.paddingBottom) + parseInt(n.borderBottomWidth);
  2750. return {
  2751. left: e.left + s + a,
  2752. right: e.right + s - h,
  2753. top: e.top + r + o,
  2754. bottom: e.bottom + r - c
  2755. }
  2756. };
  2757. e._getPointerData = function(t) {
  2758. var e = this._pointerData[t];
  2759. if (!e) {
  2760. e = this._pointerData[t] = {
  2761. x: 0,
  2762. y: 0
  2763. }
  2764. }
  2765. return e
  2766. };
  2767. e._handleMouseMove = function(t) {
  2768. if (!t) {
  2769. t = window.event
  2770. }
  2771. this._handlePointerMove(-1, t, t.pageX, t.pageY)
  2772. };
  2773. e._handlePointerMove = function(t, e, i, s, r) {
  2774. if (this._prevStage && r === undefined) {
  2775. return
  2776. }
  2777. if (!this.canvas) {
  2778. return
  2779. }
  2780. var n = this._nextStage,
  2781. a = this._getPointerData(t);
  2782. var o = a.inBounds;
  2783. this._updatePointerPosition(t, e, i, s);
  2784. if (o || a.inBounds || this.mouseMoveOutside) {
  2785. if (t === -1 && a.inBounds == !o) {
  2786. this._dispatchMouseEvent(this, o ? "mouseleave" : "mouseenter", false, t, a, e)
  2787. }
  2788. this._dispatchMouseEvent(this, "stagemousemove", false, t, a, e);
  2789. this._dispatchMouseEvent(a.target, "pressmove", true, t, a, e)
  2790. }
  2791. n && n._handlePointerMove(t, e, i, s, null)
  2792. };
  2793. e._updatePointerPosition = function(t, e, i, s) {
  2794. var r = this._getElementRect(this.canvas);
  2795. i -= r.left;
  2796. s -= r.top;
  2797. var n = this.canvas.width;
  2798. var a = this.canvas.height;
  2799. i /= (r.right - r.left) / n;
  2800. s /= (r.bottom - r.top) / a;
  2801. var o = this._getPointerData(t);
  2802. if (o.inBounds = i >= 0 && s >= 0 && i <= n - 1 && s <= a - 1) {
  2803. o.x = i;
  2804. o.y = s
  2805. } else if (this.mouseMoveOutside) {
  2806. o.x = i < 0 ? 0 : i > n - 1 ? n - 1 : i;
  2807. o.y = s < 0 ? 0 : s > a - 1 ? a - 1 : s
  2808. }
  2809. o.posEvtObj = e;
  2810. o.rawX = i;
  2811. o.rawY = s;
  2812. if (t === this._primaryPointerID || t === -1) {
  2813. this.mouseX = o.x;
  2814. this.mouseY = o.y;
  2815. this.mouseInBounds = o.inBounds
  2816. }
  2817. };
  2818. e._handleMouseUp = function(t) {
  2819. this._handlePointerUp(-1, t, false)
  2820. };
  2821. e._handlePointerUp = function(t, e, i, s) {
  2822. var r = this._nextStage,
  2823. n = this._getPointerData(t);
  2824. if (this._prevStage && s === undefined) {
  2825. return
  2826. }
  2827. if (n.down) {
  2828. this._dispatchMouseEvent(this, "stagemouseup", false, t, n, e)
  2829. }
  2830. n.down = false;
  2831. var a = null,
  2832. o = n.target;
  2833. if (!s && (o || r)) {
  2834. a = this._getObjectsUnderPoint(n.x, n.y, null, true)
  2835. }
  2836. if (a == o) {
  2837. this._dispatchMouseEvent(o, "click", true, t, n, e)
  2838. }
  2839. this._dispatchMouseEvent(o, "pressup", true, t, n, e);
  2840. if (i) {
  2841. if (t == this._primaryPointerID) {
  2842. this._primaryPointerID = null
  2843. }
  2844. delete this._pointerData[t]
  2845. } else {
  2846. n.target = null
  2847. }
  2848. r && r._handlePointerUp(t, e, i, s || a && this)
  2849. };
  2850. e._handleMouseDown = function(t) {
  2851. this._handlePointerDown(-1, t, t.pageX, t.pageY)
  2852. };
  2853. e._handlePointerDown = function(t, e, i, s, r) {
  2854. if (this.preventSelection) {
  2855. e.preventDefault()
  2856. }
  2857. if (this._primaryPointerID == null || t === -1) {
  2858. this._primaryPointerID = t
  2859. }
  2860. if (s != null) {
  2861. this._updatePointerPosition(t, e, i, s)
  2862. }
  2863. var n = null,
  2864. a = this._nextStage,
  2865. o = this._getPointerData(t);
  2866. if (o.inBounds) {
  2867. this._dispatchMouseEvent(this, "stagemousedown", false, t, o, e);
  2868. o.down = true
  2869. }
  2870. if (!r) {
  2871. n = o.target = this._getObjectsUnderPoint(o.x, o.y, null, true);
  2872. this._dispatchMouseEvent(o.target, "mousedown", true, t, o, e)
  2873. }
  2874. a && a._handlePointerDown(t, e, i, s, r || n && this)
  2875. };
  2876. e._testMouseOver = function(t, e, i) {
  2877. if (this._prevStage && e === undefined) {
  2878. return
  2879. }
  2880. var s = this._nextStage;
  2881. if (!this._mouseOverIntervalID) {
  2882. s && s._testMouseOver(t, e, i);
  2883. return
  2884. }
  2885. var r = this._getPointerData(-1);
  2886. if (!r || !t && this.mouseX == this._mouseOverX && this.mouseY == this._mouseOverY && this.mouseInBounds) {
  2887. return
  2888. }
  2889. var n = r.posEvtObj;
  2890. var a = i || n && n.target == this.canvas;
  2891. var o = null,
  2892. h = -1,
  2893. c = "",
  2894. u, l, d;
  2895. if (!e && (t || this.mouseInBounds && a)) {
  2896. o = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, true);
  2897. this._mouseOverX = this.mouseX;
  2898. this._mouseOverY = this.mouseY
  2899. }
  2900. var f = this._mouseOverTarget || [];
  2901. var _ = f[f.length - 1];
  2902. var p = this._mouseOverTarget = [];
  2903. u = o;
  2904. while (u) {
  2905. p.unshift(u);
  2906. if (u.cursor != null) {
  2907. c = u.cursor
  2908. }
  2909. u = u.parent
  2910. }
  2911. this.canvas.style.cursor = c;
  2912. if (!e && i) {
  2913. i.canvas.style.cursor = c
  2914. }
  2915. for (l = 0, d = p.length; l < d; l++) {
  2916. if (p[l] != f[l]) {
  2917. break
  2918. }
  2919. h = l
  2920. }
  2921. if (_ != o) {
  2922. this._dispatchMouseEvent(_, "mouseout", true, -1, r, n)
  2923. }
  2924. for (l = f.length - 1; l > h; l--) {
  2925. this._dispatchMouseEvent(f[l], "rollout", false, -1, r, n)
  2926. }
  2927. for (l = p.length - 1; l > h; l--) {
  2928. this._dispatchMouseEvent(p[l], "rollover", false, -1, r, n)
  2929. }
  2930. if (_ != o) {
  2931. this._dispatchMouseEvent(o, "mouseover", true, -1, r, n)
  2932. }
  2933. s && s._testMouseOver(t, e || o && this, i || a && this)
  2934. };
  2935. e._handleDoubleClick = function(t, e) {
  2936. var i = null,
  2937. s = this._nextStage,
  2938. r = this._getPointerData(-1);
  2939. if (!e) {
  2940. i = this._getObjectsUnderPoint(r.x, r.y, null, true);
  2941. this._dispatchMouseEvent(i, "dblclick", true, -1, r, t)
  2942. }
  2943. s && s._handleDoubleClick(t, e || i && this)
  2944. };
  2945. e._dispatchMouseEvent = function(t, e, i, s, r, n) {
  2946. if (!t || !i && !t.hasEventListener(e)) {
  2947. return
  2948. }
  2949. var a = new createjs.MouseEvent(e, i, false, r.x, r.y, n, s, s === this._primaryPointerID || s === -1, r.rawX, r.rawY);
  2950. t.dispatchEvent(a)
  2951. };
  2952. createjs.Stage = createjs.promote(t, "Container")
  2953. })();
  2954. this.createjs = this.createjs || {};
  2955. (function() {
  2956. function t(t) {
  2957. this.DisplayObject_constructor();
  2958. if (typeof t == "string") {
  2959. this.image = document.createElement("img");
  2960. this.image.src = t
  2961. } else {
  2962. this.image = t
  2963. }
  2964. this.sourceRect = null
  2965. }
  2966. var e = createjs.extend(t, createjs.DisplayObject);
  2967. e.initialize = t;
  2968. e.isVisible = function() {
  2969. var t = this.cacheCanvas || this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  2970. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && t)
  2971. };
  2972. e.draw = function(t, e) {
  2973. if (this.DisplayObject_draw(t, e) || !this.image) {
  2974. return true
  2975. }
  2976. var i = this.image,
  2977. s = this.sourceRect;
  2978. if (s) {
  2979. var r = s.x,
  2980. n = s.y,
  2981. a = r + s.width,
  2982. o = n + s.height,
  2983. h = 0,
  2984. c = 0,
  2985. u = i.width,
  2986. l = i.height;
  2987. if (r < 0) {
  2988. h -= r;
  2989. r = 0
  2990. }
  2991. if (a > u) {
  2992. a = u
  2993. }
  2994. if (n < 0) {
  2995. c -= n;
  2996. n = 0
  2997. }
  2998. if (o > l) {
  2999. o = l
  3000. }
  3001. t.drawImage(i, r, n, a - r, o - n, h, c, a - r, o - n)
  3002. } else {
  3003. t.drawImage(i, 0, 0)
  3004. }
  3005. return true
  3006. };
  3007. e.getBounds = function() {
  3008. var t = this.DisplayObject_getBounds();
  3009. if (t) {
  3010. return t
  3011. }
  3012. var e = this.sourceRect || this.image;
  3013. var i = this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  3014. return i ? this._rectangle.setValues(0, 0, e.width, e.height) : null
  3015. };
  3016. e.clone = function() {
  3017. var e = new t(this.image);
  3018. if (this.sourceRect) {
  3019. e.sourceRect = this.sourceRect.clone()
  3020. }
  3021. this._cloneProps(e);
  3022. return e
  3023. };
  3024. e.toString = function() {
  3025. return "[Bitmap (name=" + this.name + ")]"
  3026. };
  3027. createjs.Bitmap = createjs.promote(t, "DisplayObject")
  3028. })();
  3029. this.createjs = this.createjs || {};
  3030. (function() {
  3031. "use strict";
  3032. function t(t, e) {
  3033. this.DisplayObject_constructor();
  3034. this.currentFrame = 0;
  3035. this.currentAnimation = null;
  3036. this.paused = true;
  3037. this.spriteSheet = t;
  3038. this.currentAnimationFrame = 0;
  3039. this.framerate = 0;
  3040. this._animation = null;
  3041. this._currentFrame = null;
  3042. this._skipAdvance = false;
  3043. if (e) {
  3044. this.gotoAndPlay(e)
  3045. }
  3046. }
  3047. var e = createjs.extend(t, createjs.DisplayObject);
  3048. e.isVisible = function() {
  3049. var t = this.cacheCanvas || this.spriteSheet.complete;
  3050. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && t)
  3051. };
  3052. e.draw = function(t, e) {
  3053. if (this.DisplayObject_draw(t, e)) {
  3054. return true
  3055. }
  3056. this._normalizeFrame();
  3057. var i = this.spriteSheet.getFrame(this._currentFrame | 0);
  3058. if (!i) {
  3059. return false
  3060. }
  3061. var s = i.rect;
  3062. if (s.width && s.height) {
  3063. t.drawImage(i.image, s.x, s.y, s.width, s.height, -i.regX, -i.regY, s.width, s.height)
  3064. }
  3065. return true
  3066. };
  3067. e.play = function() {
  3068. this.paused = false
  3069. };
  3070. e.stop = function() {
  3071. this.paused = true
  3072. };
  3073. e.gotoAndPlay = function(t) {
  3074. this.paused = false;
  3075. this._skipAdvance = true;
  3076. this._goto(t)
  3077. };
  3078. e.gotoAndStop = function(t) {
  3079. this.paused = true;
  3080. this._goto(t)
  3081. };
  3082. e.advance = function(t) {
  3083. var e = this.framerate || this.spriteSheet.framerate;
  3084. var i = e && t != null ? t / (1e3 / e) : 1;
  3085. this._normalizeFrame(i)
  3086. };
  3087. e.getBounds = function() {
  3088. return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle)
  3089. };
  3090. e.clone = function() {
  3091. return this._cloneProps(new t(this.spriteSheet))
  3092. };
  3093. e.toString = function() {
  3094. return "[Sprite (name=" + this.name + ")]"
  3095. };
  3096. e._cloneProps = function(t) {
  3097. this.DisplayObject__cloneProps(t);
  3098. t.currentFrame = this.currentFrame;
  3099. t.currentAnimation = this.currentAnimation;
  3100. t.paused = this.paused;
  3101. t.currentAnimationFrame = this.currentAnimationFrame;
  3102. t.framerate = this.framerate;
  3103. t._animation = this._animation;
  3104. t._currentFrame = this._currentFrame;
  3105. t._skipAdvance = this._skipAdvance;
  3106. return t
  3107. };
  3108. e._tick = function(t) {
  3109. if (!this.paused) {
  3110. if (!this._skipAdvance) {
  3111. this.advance(t && t.delta)
  3112. }
  3113. this._skipAdvance = false
  3114. }
  3115. this.DisplayObject__tick(t)
  3116. };
  3117. e._normalizeFrame = function(t) {
  3118. t = t || 0;
  3119. var e = this._animation;
  3120. var i = this.paused;
  3121. var s = this._currentFrame;
  3122. var r;
  3123. if (e) {
  3124. var n = e.speed || 1;
  3125. var a = this.currentAnimationFrame;
  3126. r = e.frames.length;
  3127. if (a + t * n >= r) {
  3128. var o = e.next;
  3129. if (this._dispatchAnimationEnd(e, s, i, o, r - 1)) {
  3130. return
  3131. } else if (o) {
  3132. return this._goto(o, t - (r - a) / n)
  3133. } else {
  3134. this.paused = true;
  3135. a = e.frames.length - 1
  3136. }
  3137. } else {
  3138. a += t * n
  3139. }
  3140. this.currentAnimationFrame = a;
  3141. this._currentFrame = e.frames[a | 0]
  3142. } else {
  3143. s = this._currentFrame += t;
  3144. r = this.spriteSheet.getNumFrames();
  3145. if (s >= r && r > 0) {
  3146. if (!this._dispatchAnimationEnd(e, s, i, r - 1)) {
  3147. if ((this._currentFrame -= r) >= r) {
  3148. return this._normalizeFrame()
  3149. }
  3150. }
  3151. }
  3152. }
  3153. s = this._currentFrame | 0;
  3154. if (this.currentFrame != s) {
  3155. this.currentFrame = s;
  3156. this.dispatchEvent("change")
  3157. }
  3158. };
  3159. e._dispatchAnimationEnd = function(t, e, i, s, r) {
  3160. var n = t ? t.name : null;
  3161. if (this.hasEventListener("animationend")) {
  3162. var a = new createjs.Event("animationend");
  3163. a.name = n;
  3164. a.next = s;
  3165. this.dispatchEvent(a)
  3166. }
  3167. var o = this._animation != t || this._currentFrame != e;
  3168. if (!o && !i && this.paused) {
  3169. this.currentAnimationFrame = r;
  3170. o = true
  3171. }
  3172. return o
  3173. };
  3174. e._goto = function(t, e) {
  3175. this.currentAnimationFrame = 0;
  3176. if (isNaN(t)) {
  3177. var i = this.spriteSheet.getAnimation(t);
  3178. if (i) {
  3179. this._animation = i;
  3180. this.currentAnimation = t;
  3181. this._normalizeFrame(e)
  3182. }
  3183. } else {
  3184. this.currentAnimation = this._animation = null;
  3185. this._currentFrame = t;
  3186. this._normalizeFrame()
  3187. }
  3188. };
  3189. createjs.Sprite = createjs.promote(t, "DisplayObject")
  3190. })();
  3191. this.createjs = this.createjs || {};
  3192. (function() {
  3193. "use strict";
  3194. function t(t) {
  3195. this.DisplayObject_constructor();
  3196. this.graphics = t ? t : new createjs.Graphics
  3197. }
  3198. var e = createjs.extend(t, createjs.DisplayObject);
  3199. e.isVisible = function() {
  3200. var t = this.cacheCanvas || this.graphics && !this.graphics.isEmpty();
  3201. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && t)
  3202. };
  3203. e.draw = function(t, e) {
  3204. if (this.DisplayObject_draw(t, e)) {
  3205. return true
  3206. }
  3207. this.graphics.draw(t, this);
  3208. return true
  3209. };
  3210. e.clone = function(e) {
  3211. var i = e && this.graphics ? this.graphics.clone() : this.graphics;
  3212. return this._cloneProps(new t(i))
  3213. };
  3214. e.toString = function() {
  3215. return "[Shape (name=" + this.name + ")]"
  3216. };
  3217. createjs.Shape = createjs.promote(t, "DisplayObject")
  3218. })();
  3219. this.createjs = this.createjs || {};
  3220. (function() {
  3221. "use strict";
  3222. function t(t, e, i) {
  3223. this.DisplayObject_constructor();
  3224. this.text = t;
  3225. this.font = e;
  3226. this.color = i;
  3227. this.textAlign = "left";
  3228. this.textBaseline = "top";
  3229. this.maxWidth = null;
  3230. this.outline = 0;
  3231. this.lineHeight = 0;
  3232. this.lineWidth = null
  3233. }
  3234. var e = createjs.extend(t, createjs.DisplayObject);
  3235. var i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3236. if (i.getContext) {
  3237. t._workingContext = i.getContext("2d");
  3238. i.width = i.height = 1
  3239. }
  3240. t.H_OFFSETS = {
  3241. start: 0,
  3242. left: 0,
  3243. center: -.5,
  3244. end: -1,
  3245. right: -1
  3246. };
  3247. t.V_OFFSETS = {
  3248. top: 0,
  3249. hanging: -.01,
  3250. middle: -.4,
  3251. alphabetic: -.8,
  3252. ideographic: -.85,
  3253. bottom: -1
  3254. };
  3255. e.isVisible = function() {
  3256. var t = this.cacheCanvas || this.text != null && this.text !== "";
  3257. return !!(this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && t)
  3258. };
  3259. e.draw = function(t, e) {
  3260. if (this.DisplayObject_draw(t, e)) {
  3261. return true
  3262. }
  3263. var i = this.color || "#000";
  3264. if (this.outline) {
  3265. t.strokeStyle = i;
  3266. t.lineWidth = this.outline * 1
  3267. } else {
  3268. t.fillStyle = i
  3269. }
  3270. this._drawText(this._prepContext(t));
  3271. return true
  3272. };
  3273. e.getMeasuredWidth = function() {
  3274. return this._getMeasuredWidth(this.text)
  3275. };
  3276. e.getMeasuredLineHeight = function() {
  3277. return this._getMeasuredWidth("M") * 1.2
  3278. };
  3279. e.getMeasuredHeight = function() {
  3280. return this._drawText(null, {}).height
  3281. };
  3282. e.getBounds = function() {
  3283. var e = this.DisplayObject_getBounds();
  3284. if (e) {
  3285. return e
  3286. }
  3287. if (this.text == null || this.text == "") {
  3288. return null
  3289. }
  3290. var i = this._drawText(null, {});
  3291. var s = this.maxWidth && this.maxWidth < i.width ? this.maxWidth : i.width;
  3292. var r = s * t.H_OFFSETS[this.textAlign || "left"];
  3293. var n = this.lineHeight || this.getMeasuredLineHeight();
  3294. var a = n * t.V_OFFSETS[this.textBaseline || "top"];
  3295. return this._rectangle.setValues(r, a, s, i.height)
  3296. };
  3297. e.getMetrics = function() {
  3298. var e = {
  3299. lines: []
  3300. };
  3301. e.lineHeight = this.lineHeight || this.getMeasuredLineHeight();
  3302. e.vOffset = e.lineHeight * t.V_OFFSETS[this.textBaseline || "top"];
  3303. return this._drawText(null, e, e.lines)
  3304. };
  3305. e.clone = function() {
  3306. return this._cloneProps(new t(this.text, this.font, this.color))
  3307. };
  3308. e.toString = function() {
  3309. return "[Text (text=" + (this.text.length > 20 ? this.text.substr(0, 17) + "..." : this.text) + ")]"
  3310. };
  3311. e._cloneProps = function(t) {
  3312. this.DisplayObject__cloneProps(t);
  3313. t.textAlign = this.textAlign;
  3314. t.textBaseline = this.textBaseline;
  3315. t.maxWidth = this.maxWidth;
  3316. t.outline = this.outline;
  3317. t.lineHeight = this.lineHeight;
  3318. t.lineWidth = this.lineWidth;
  3319. return t
  3320. };
  3321. e._prepContext = function(t) {
  3322. t.font = this.font || "10px sans-serif";
  3323. t.textAlign = this.textAlign || "left";
  3324. t.textBaseline = this.textBaseline || "top";
  3325. return t
  3326. };
  3327. e._drawText = function(e, i, s) {
  3328. var r = !! e;
  3329. if (!r) {
  3330. e = t._workingContext;
  3331. e.save();
  3332. this._prepContext(e)
  3333. }
  3334. var n = this.lineHeight || this.getMeasuredLineHeight();
  3335. var a = 0,
  3336. o = 0;
  3337. var h = String(this.text).split(/(?:\r\n|\r|\n)/);
  3338. for (var c = 0, u = h.length; c < u; c++) {
  3339. var l = h[c];
  3340. var d = null;
  3341. if (this.lineWidth != null && (d = e.measureText(l).width) > this.lineWidth) {
  3342. var f = l.split(/(\s)/);
  3343. l = f[0];
  3344. d = e.measureText(l).width;
  3345. for (var _ = 1, p = f.length; _ < p; _ += 2) {
  3346. var g = e.measureText(f[_] + f[_ + 1]).width;
  3347. if (d + g > this.lineWidth) {
  3348. if (r) {
  3349. this._drawTextLine(e, l, o * n)
  3350. }
  3351. if (s) {
  3352. s.push(l)
  3353. }
  3354. if (d > a) {
  3355. a = d
  3356. }
  3357. l = f[_ + 1];
  3358. d = e.measureText(l).width;
  3359. o++
  3360. } else {
  3361. l += f[_] + f[_ + 1];
  3362. d += g
  3363. }
  3364. }
  3365. }
  3366. if (r) {
  3367. this._drawTextLine(e, l, o * n)
  3368. }
  3369. if (s) {
  3370. s.push(l)
  3371. }
  3372. if (i && d == null) {
  3373. d = e.measureText(l).width
  3374. }
  3375. if (d > a) {
  3376. a = d
  3377. }
  3378. o++
  3379. }
  3380. if (i) {
  3381. i.width = a;
  3382. i.height = o * n
  3383. }
  3384. if (!r) {
  3385. e.restore()
  3386. }
  3387. return i
  3388. };
  3389. e._drawTextLine = function(t, e, i) {
  3390. if (this.outline) {
  3391. t.strokeText(e, 0, i, this.maxWidth || 65535)
  3392. } else {
  3393. t.fillText(e, 0, i, this.maxWidth || 65535)
  3394. }
  3395. };
  3396. e._getMeasuredWidth = function(e) {
  3397. var i = t._workingContext;
  3398. i.save();
  3399. var s = this._prepContext(i).measureText(e).width;
  3400. i.restore();
  3401. return s
  3402. };
  3403. createjs.Text = createjs.promote(t, "DisplayObject")
  3404. })();
  3405. this.createjs = this.createjs || {};
  3406. (function() {
  3407. "use strict";
  3408. function t(t, e) {
  3409. this.Container_constructor();
  3410. this.text = t || "";
  3411. this.spriteSheet = e;
  3412. this.lineHeight = 0;
  3413. this.letterSpacing = 0;
  3414. this.spaceWidth = 0;
  3415. this._oldProps = {
  3416. text: 0,
  3417. spriteSheet: 0,
  3418. lineHeight: 0,
  3419. letterSpacing: 0,
  3420. spaceWidth: 0
  3421. }
  3422. }
  3423. var e = createjs.extend(t, createjs.Container);
  3424. t.maxPoolSize = 100;
  3425. t._spritePool = [];
  3426. e.draw = function(t, e) {
  3427. if (this.DisplayObject_draw(t, e)) {
  3428. return
  3429. }
  3430. this._updateText();
  3431. this.Container_draw(t, e)
  3432. };
  3433. e.getBounds = function() {
  3434. this._updateText();
  3435. return this.Container_getBounds()
  3436. };
  3437. e.isVisible = function() {
  3438. var t = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete && this.text;
  3439. return !!(this.visible && this.alpha > 0 && this.scaleX !== 0 && this.scaleY !== 0 && t)
  3440. };
  3441. e.clone = function() {
  3442. return this._cloneProps(new t(this.text, this.spriteSheet))
  3443. };
  3444. e.addChild = e.addChildAt = e.removeChild = e.removeChildAt = e.removeAllChildren = function() {};
  3445. e._cloneProps = function(t) {
  3446. this.DisplayObject__cloneProps(t);
  3447. t.lineHeight = this.lineHeight;
  3448. t.letterSpacing = this.letterSpacing;
  3449. t.spaceWidth = this.spaceWidth;
  3450. return t
  3451. };
  3452. e._getFrameIndex = function(t, e) {
  3453. var i, s = e.getAnimation(t);
  3454. if (!s) {
  3455. t != (i = t.toUpperCase()) || t != (i = t.toLowerCase()) || (i = null);
  3456. if (i) {
  3457. s = e.getAnimation(i)
  3458. }
  3459. }
  3460. return s && s.frames[0]
  3461. };
  3462. e._getFrame = function(t, e) {
  3463. var i = this._getFrameIndex(t, e);
  3464. return i == null ? i : e.getFrame(i)
  3465. };
  3466. e._getLineHeight = function(t) {
  3467. var e = this._getFrame("1", t) || this._getFrame("T", t) || this._getFrame("L", t) || t.getFrame(0);
  3468. return e ? e.rect.height : 1
  3469. };
  3470. e._getSpaceWidth = function(t) {
  3471. var e = this._getFrame("1", t) || this._getFrame("l", t) || this._getFrame("e", t) || this._getFrame("a", t) || t.getFrame(0);
  3472. return e ? e.rect.width : 1
  3473. };
  3474. e._updateText = function() {
  3475. var e = 0,
  3476. i = 0,
  3477. s = this._oldProps,
  3478. r = false,
  3479. n = this.spaceWidth,
  3480. a = this.lineHeight,
  3481. o = this.spriteSheet;
  3482. var h = t._spritePool,
  3483. c = this.children,
  3484. u = 0,
  3485. l = c.length,
  3486. d;
  3487. for (var f in s) {
  3488. if (s[f] != this[f]) {
  3489. s[f] = this[f];
  3490. r = true
  3491. }
  3492. }
  3493. if (!r) {
  3494. return
  3495. }
  3496. var _ = !! this._getFrame(" ", o);
  3497. if (!_ && !n) {
  3498. n = this._getSpaceWidth(o)
  3499. }
  3500. if (!a) {
  3501. a = this._getLineHeight(o)
  3502. }
  3503. for (var p = 0, g = this.text.length; p < g; p++) {
  3504. var v = this.text.charAt(p);
  3505. if (v == " " && !_) {
  3506. e += n;
  3507. continue
  3508. } else if (v == "\n" || v == "\r") {
  3509. if (v == "\r" && this.text.charAt(p + 1) == "\n") {
  3510. p++
  3511. }
  3512. e = 0;
  3513. i += a;
  3514. continue
  3515. }
  3516. var m = this._getFrameIndex(v, o);
  3517. if (m == null) {
  3518. continue
  3519. }
  3520. if (u < l) {
  3521. d = c[u]
  3522. } else {
  3523. c.push(d = h.length ? h.pop() : new createjs.Sprite);
  3524. d.parent = this;
  3525. l++
  3526. }
  3527. d.spriteSheet = o;
  3528. d.gotoAndStop(m);
  3529. d.x = e;
  3530. d.y = i;
  3531. u++;
  3532. e += d.getBounds().width + this.letterSpacing
  3533. }
  3534. while (l > u) {
  3535. h.push(d = c.pop());
  3536. d.parent = null;
  3537. l--
  3538. }
  3539. if (h.length > t.maxPoolSize) {
  3540. h.length = t.maxPoolSize
  3541. }
  3542. };
  3543. createjs.BitmapText = createjs.promote(t, "Container")
  3544. })();
  3545. this.createjs = this.createjs || {};
  3546. (function() {
  3547. "use strict";
  3548. function t() {
  3549. throw "SpriteSheetUtils cannot be instantiated"
  3550. }
  3551. var e = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3552. if (e.getContext) {
  3553. t._workingCanvas = e;
  3554. t._workingContext = e.getContext("2d");
  3555. e.width = e.height = 1
  3556. }
  3557. t.addFlippedFrames = function(e, i, s, r) {
  3558. if (!i && !s && !r) {
  3559. return
  3560. }
  3561. var n = 0;
  3562. if (i) {
  3563. t._flip(e, ++n, true, false)
  3564. }
  3565. if (s) {
  3566. t._flip(e, ++n, false, true)
  3567. }
  3568. if (r) {
  3569. t._flip(e, ++n, true, true)
  3570. }
  3571. };
  3572. t.extractFrame = function(e, i) {
  3573. if (isNaN(i)) {
  3574. i = e.getAnimation(i).frames[0]
  3575. }
  3576. var s = e.getFrame(i);
  3577. if (!s) {
  3578. return null
  3579. }
  3580. var r = s.rect;
  3581. var n = t._workingCanvas;
  3582. n.width = r.width;
  3583. n.height = r.height;
  3584. t._workingContext.drawImage(s.image, r.x, r.y, r.width, r.height, 0, 0, r.width, r.height);
  3585. var a = document.createElement("img");
  3586. a.src = n.toDataURL("image/png");
  3587. return a
  3588. };
  3589. t.mergeAlpha = function(t, e, i) {
  3590. if (!i) {
  3591. i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")
  3592. }
  3593. i.width = Math.max(e.width, t.width);
  3594. i.height = Math.max(e.height, t.height);
  3595. var s = i.getContext("2d");
  3596. s.save();
  3597. s.drawImage(t, 0, 0);
  3598. s.globalCompositeOperation = "destination-in";
  3599. s.drawImage(e, 0, 0);
  3600. s.restore();
  3601. return i
  3602. };
  3603. t._flip = function(e, i, s, r) {
  3604. var n = e._images;
  3605. var a = t._workingCanvas;
  3606. var o = t._workingContext;
  3607. var h = n.length / i;
  3608. for (var c = 0; c < h; c++) {
  3609. var u = n[c];
  3610. u.__tmp = c;
  3611. o.setTransform(1, 0, 0, 1, 0, 0);
  3612. o.clearRect(0, 0, a.width + 1, a.height + 1);
  3613. a.width = u.width;
  3614. a.height = u.height;
  3615. o.setTransform(s ? -1 : 1, 0, 0, r ? -1 : 1, s ? u.width : 0, r ? u.height : 0);
  3616. o.drawImage(u, 0, 0);
  3617. var l = document.createElement("img");
  3618. l.src = a.toDataURL("image/png");
  3619. l.width = u.width;
  3620. l.height = u.height;
  3621. n.push(l)
  3622. }
  3623. var d = e._frames;
  3624. var f = d.length / i;
  3625. for (c = 0; c < f; c++) {
  3626. u = d[c];
  3627. var _ = u.rect.clone();
  3628. l = n[u.image.__tmp + h * i];
  3629. var p = {
  3630. image: l,
  3631. rect: _,
  3632. regX: u.regX,
  3633. regY: u.regY
  3634. };
  3635. if (s) {
  3636. _.x = l.width - _.x - _.width;
  3637. p.regX = _.width - u.regX
  3638. }
  3639. if (r) {
  3640. _.y = l.height - _.y - _.height;
  3641. p.regY = _.height - u.regY
  3642. }
  3643. d.push(p)
  3644. }
  3645. var g = "_" + (s ? "h" : "") + (r ? "v" : "");
  3646. var v = e._animations;
  3647. var m = e._data;
  3648. var y = v.length / i;
  3649. for (c = 0; c < y; c++) {
  3650. var j = v[c];
  3651. u = m[j];
  3652. var b = {
  3653. name: j + g,
  3654. speed: u.speed,
  3655. next: u.next,
  3656. frames: []
  3657. };
  3658. if (u.next) {
  3659. b.next += g
  3660. }
  3661. d = u.frames;
  3662. for (var E = 0, w = d.length; E < w; E++) {
  3663. b.frames.push(d[E] + f * i)
  3664. }
  3665. m[b.name] = b;
  3666. v.push(b.name)
  3667. }
  3668. };
  3669. createjs.SpriteSheetUtils = t
  3670. })();
  3671. this.createjs = this.createjs || {};
  3672. (function() {
  3673. "use strict";
  3674. function t() {
  3675. this.EventDispatcher_constructor();
  3676. this.maxWidth = 2048;
  3677. this.maxHeight = 2048;
  3678. this.spriteSheet = null;
  3679. this.scale = 1;
  3680. this.padding = 1;
  3681. this.timeSlice = .3;
  3682. this.progress = -1;
  3683. this._frames = [];
  3684. this._animations = {};
  3685. this._data = null;
  3686. this._nextFrameIndex = 0;
  3687. this._index = 0;
  3688. this._timerID = null;
  3689. this._scale = 1
  3690. }
  3691. var e = createjs.extend(t, createjs.EventDispatcher);
  3692. t.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions";
  3693. t.ERR_RUNNING = "a build is already running";
  3694. e.addFrame = function(e, i, s, r, n) {
  3695. if (this._data) {
  3696. throw t.ERR_RUNNING
  3697. }
  3698. var a = i || e.bounds || e.nominalBounds;
  3699. if (!a && e.getBounds) {
  3700. a = e.getBounds()
  3701. }
  3702. if (!a) {
  3703. return null
  3704. }
  3705. s = s || 1;
  3706. return this._frames.push({
  3707. source: e,
  3708. sourceRect: a,
  3709. scale: s,
  3710. funct: r,
  3711. data: n,
  3712. index: this._frames.length,
  3713. height: a.height * s
  3714. }) - 1
  3715. };
  3716. e.addAnimation = function(e, i, s, r) {
  3717. if (this._data) {
  3718. throw t.ERR_RUNNING
  3719. }
  3720. this._animations[e] = {
  3721. frames: i,
  3722. next: s,
  3723. frequency: r
  3724. }
  3725. };
  3726. e.addMovieClip = function(e, i, s, r, n, a) {
  3727. if (this._data) {
  3728. throw t.ERR_RUNNING
  3729. }
  3730. var o = e.frameBounds;
  3731. var h = i || e.bounds || e.nominalBounds;
  3732. if (!h && e.getBounds) {
  3733. h = e.getBounds()
  3734. }
  3735. if (!h && !o) {
  3736. return
  3737. }
  3738. var c, u, l = this._frames.length;
  3739. var d = e.timeline.duration;
  3740. for (c = 0; c < d; c++) {
  3741. var f = o && o[c] ? o[c] : h;
  3742. this.addFrame(e, f, s, this._setupMovieClipFrame, {
  3743. i: c,
  3744. f: r,
  3745. d: n
  3746. })
  3747. }
  3748. var _ = e.timeline._labels;
  3749. var p = [];
  3750. for (var g in _) {
  3751. p.push({
  3752. index: _[g],
  3753. label: g
  3754. })
  3755. }
  3756. if (p.length) {
  3757. p.sort(function(t, e) {
  3758. return t.index - e.index
  3759. });
  3760. for (c = 0, u = p.length; c < u; c++) {
  3761. var v = p[c].label;
  3762. var m = l + p[c].index;
  3763. var y = l + (c == u - 1 ? d : p[c + 1].index);
  3764. var j = [];
  3765. for (var b = m; b < y; b++) {
  3766. j.push(b)
  3767. }
  3768. if (a) {
  3769. v = a(v, e, m, y);
  3770. if (!v) {
  3771. continue
  3772. }
  3773. }
  3774. this.addAnimation(v, j, true)
  3775. }
  3776. }
  3777. };
  3778. e.build = function() {
  3779. if (this._data) {
  3780. throw t.ERR_RUNNING
  3781. }
  3782. this._startBuild();
  3783. while (this._drawNext()) {}
  3784. this._endBuild();
  3785. return this.spriteSheet
  3786. };
  3787. e.buildAsync = function(e) {
  3788. if (this._data) {
  3789. throw t.ERR_RUNNING
  3790. }
  3791. this.timeSlice = e;
  3792. this._startBuild();
  3793. var i = this;
  3794. this._timerID = setTimeout(function() {
  3795. i._run()
  3796. }, 50 - Math.max(.01, Math.min(.99, this.timeSlice || .3)) * 50)
  3797. };
  3798. e.stopAsync = function() {
  3799. clearTimeout(this._timerID);
  3800. this._data = null
  3801. };
  3802. e.clone = function() {
  3803. throw "SpriteSheetBuilder cannot be cloned."
  3804. };
  3805. e.toString = function() {
  3806. return "[SpriteSheetBuilder]"
  3807. };
  3808. e._startBuild = function() {
  3809. var e = this.padding || 0;
  3810. this.progress = 0;
  3811. this.spriteSheet = null;
  3812. this._index = 0;
  3813. this._scale = this.scale;
  3814. var i = [];
  3815. this._data = {
  3816. images: [],
  3817. frames: i,
  3818. animations: this._animations
  3819. };
  3820. var s = this._frames.slice();
  3821. s.sort(function(t, e) {
  3822. return t.height <= e.height ? -1 : 1
  3823. });
  3824. if (s[s.length - 1].height + e * 2 > this.maxHeight) {
  3825. throw t.ERR_DIMENSIONS
  3826. }
  3827. var r = 0,
  3828. n = 0;
  3829. var a = 0;
  3830. while (s.length) {
  3831. var o = this._fillRow(s, r, a, i, e);
  3832. if (o.w > n) {
  3833. n = o.w
  3834. }
  3835. r += o.h;
  3836. if (!o.h || !s.length) {
  3837. var h = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3838. h.width = this._getSize(n, this.maxWidth);
  3839. h.height = this._getSize(r, this.maxHeight);
  3840. this._data.images[a] = h;
  3841. if (!o.h) {
  3842. n = r = 0;
  3843. a++
  3844. }
  3845. }
  3846. }
  3847. };
  3848. e._setupMovieClipFrame = function(t, e) {
  3849. var i = t.actionsEnabled;
  3850. t.actionsEnabled = false;
  3851. t.gotoAndStop(e.i);
  3852. t.actionsEnabled = i;
  3853. e.f && e.f(t, e.d, e.i)
  3854. };
  3855. e._getSize = function(t, e) {
  3856. var i = 4;
  3857. while (Math.pow(2, ++i) < t) {}
  3858. return Math.min(e, Math.pow(2, i))
  3859. };
  3860. e._fillRow = function(e, i, s, r, n) {
  3861. var a = this.maxWidth;
  3862. var o = this.maxHeight;
  3863. i += n;
  3864. var h = o - i;
  3865. var c = n;
  3866. var u = 0;
  3867. for (var l = e.length - 1; l >= 0; l--) {
  3868. var d = e[l];
  3869. var f = this._scale * d.scale;
  3870. var _ = d.sourceRect;
  3871. var p = d.source;
  3872. var g = Math.floor(f * _.x - n);
  3873. var v = Math.floor(f * _.y - n);
  3874. var m = Math.ceil(f * _.height + n * 2);
  3875. var y = Math.ceil(f * _.width + n * 2);
  3876. if (y > a) {
  3877. throw t.ERR_DIMENSIONS
  3878. }
  3879. if (m > h || c + y > a) {
  3880. continue
  3881. }
  3882. d.img = s;
  3883. d.rect = new createjs.Rectangle(c, i, y, m);
  3884. u = u || m;
  3885. e.splice(l, 1);
  3886. r[d.index] = [c, i, y, m, s, Math.round(-g + f * p.regX - n), Math.round(-v + f * p.regY - n)];
  3887. c += y
  3888. }
  3889. return {
  3890. w: c,
  3891. h: u
  3892. }
  3893. };
  3894. e._endBuild = function() {
  3895. this.spriteSheet = new createjs.SpriteSheet(this._data);
  3896. this._data = null;
  3897. this.progress = 1;
  3898. this.dispatchEvent("complete")
  3899. };
  3900. e._run = function() {
  3901. var t = Math.max(.01, Math.min(.99, this.timeSlice || .3)) * 50;
  3902. var e = (new Date).getTime() + t;
  3903. var i = false;
  3904. while (e > (new Date).getTime()) {
  3905. if (!this._drawNext()) {
  3906. i = true;
  3907. break
  3908. }
  3909. }
  3910. if (i) {
  3911. this._endBuild()
  3912. } else {
  3913. var s = this;
  3914. this._timerID = setTimeout(function() {
  3915. s._run()
  3916. }, 50 - t)
  3917. }
  3918. var r = this.progress = this._index / this._frames.length;
  3919. if (this.hasEventListener("progress")) {
  3920. var n = new createjs.Event("progress");
  3921. n.progress = r;
  3922. this.dispatchEvent(n)
  3923. }
  3924. };
  3925. e._drawNext = function() {
  3926. var t = this._frames[this._index];
  3927. var e = t.scale * this._scale;
  3928. var i = t.rect;
  3929. var s = t.sourceRect;
  3930. var r = this._data.images[t.img];
  3931. var n = r.getContext("2d");
  3932. t.funct && t.funct(t.source, t.data);
  3933. n.save();
  3934. n.beginPath();
  3935. n.rect(i.x, i.y, i.width, i.height);
  3936. n.clip();
  3937. n.translate(Math.ceil(i.x - s.x * e), Math.ceil(i.y - s.y * e));
  3938. n.scale(e, e);
  3939. t.source.draw(n);
  3940. n.restore();
  3941. return ++this._index < this._frames.length
  3942. };
  3943. createjs.SpriteSheetBuilder = createjs.promote(t, "EventDispatcher")
  3944. })();
  3945. this.createjs = this.createjs || {};
  3946. (function() {
  3947. "use strict";
  3948. function t(t) {
  3949. this.DisplayObject_constructor();
  3950. if (typeof t == "string") {
  3951. t = document.getElementById(t)
  3952. }
  3953. this.mouseEnabled = false;
  3954. var e = t.style;
  3955. e.position = "absolute";
  3956. e.transformOrigin = e.WebkitTransformOrigin = e.msTransformOrigin = e.MozTransformOrigin = e.OTransformOrigin = "0% 0%";
  3957. this.htmlElement = t;
  3958. this._oldProps = null
  3959. }
  3960. var e = createjs.extend(t, createjs.DisplayObject);
  3961. e.isVisible = function() {
  3962. return this.htmlElement != null
  3963. };
  3964. e.draw = function(t, e) {
  3965. return true
  3966. };
  3967. e.cache = function() {};
  3968. e.uncache = function() {};
  3969. e.updateCache = function() {};
  3970. e.hitTest = function() {};
  3971. e.localToGlobal = function() {};
  3972. e.globalToLocal = function() {};
  3973. e.localToLocal = function() {};
  3974. e.clone = function() {
  3975. throw "DOMElement cannot be cloned."
  3976. };
  3977. e.toString = function() {
  3978. return "[DOMElement (name=" + this.name + ")]"
  3979. };
  3980. e._tick = function(t) {
  3981. var e = this.getStage();
  3982. e && e.on("drawend", this._handleDrawEnd, this, true);
  3983. this.DisplayObject__tick(t)
  3984. };
  3985. e._handleDrawEnd = function(t) {
  3986. var e = this.htmlElement;
  3987. if (!e) {
  3988. return
  3989. }
  3990. var i = e.style;
  3991. var s = this.getConcatenatedDisplayProps(this._props),
  3992. r = s.matrix;
  3993. var n = s.visible ? "visible" : "hidden";
  3994. if (n != i.visibility) {
  3995. i.visibility = n
  3996. }
  3997. if (!s.visible) {
  3998. return
  3999. }
  4000. var a = this._oldProps,
  4001. o = a && a.matrix;
  4002. var h = 1e4;
  4003. if (!o || !o.equals(r)) {
  4004. var c = "matrix(" + (r.a * h | 0) / h + "," + (r.b * h | 0) / h + "," + (r.c * h | 0) / h + "," + (r.d * h | 0) / h + "," + (r.tx + .5 | 0);
  4005. i.transform = i.WebkitTransform = i.OTransform = i.msTransform = c + "," + (r.ty + .5 | 0) + ")";
  4006. i.MozTransform = c + "px," + (r.ty + .5 | 0) + "px)";
  4007. if (!a) {
  4008. a = this._oldProps = new createjs.DisplayProps(true, NaN)
  4009. }
  4010. a.matrix.copy(r)
  4011. }
  4012. if (a.alpha != s.alpha) {
  4013. i.opacity = "" + (s.alpha * h | 0) / h;
  4014. a.alpha = s.alpha
  4015. }
  4016. };
  4017. createjs.DOMElement = createjs.promote(t, "DisplayObject")
  4018. })();
  4019. this.createjs = this.createjs || {};
  4020. (function() {
  4021. "use strict";
  4022. function t() {}
  4023. var e = t.prototype;
  4024. e.getBounds = function(t) {
  4025. return t
  4026. };
  4027. e.applyFilter = function(t, e, i, s, r, n, a, o) {
  4028. n = n || t;
  4029. if (a == null) {
  4030. a = e
  4031. }
  4032. if (o == null) {
  4033. o = i
  4034. }
  4035. try {
  4036. var h = t.getImageData(e, i, s, r)
  4037. } catch (c) {
  4038. return false
  4039. }
  4040. if (this._applyFilter(h)) {
  4041. n.putImageData(h, a, o);
  4042. return true
  4043. }
  4044. return false
  4045. };
  4046. e.toString = function() {
  4047. return "[Filter]"
  4048. };
  4049. e.clone = function() {
  4050. return new t
  4051. };
  4052. e._applyFilter = function(t) {
  4053. return true
  4054. };
  4055. createjs.Filter = t
  4056. })();
  4057. this.createjs = this.createjs || {};
  4058. (function() {
  4059. "use strict";
  4060. function t(t, e, i) {
  4061. if (isNaN(t) || t < 0) t = 0;
  4062. if (isNaN(e) || e < 0) e = 0;
  4063. if (isNaN(i) || i < 1) i = 1;
  4064. this.blurX = t | 0;
  4065. this.blurY = e | 0;
  4066. this.quality = i | 0
  4067. }
  4068. var e = createjs.extend(t, createjs.Filter);
  4069. t.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1];
  4070. t.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9];
  4071. e.getBounds = function(t) {
  4072. var e = this.blurX | 0,
  4073. i = this.blurY | 0;
  4074. if (e <= 0 && i <= 0) {
  4075. return t
  4076. }
  4077. var s = Math.pow(this.quality, .2);
  4078. return (t || new createjs.Rectangle).pad(e * s + 1, i * s + 1, e * s + 1, i * s + 1)
  4079. };
  4080. e.clone = function() {
  4081. return new t(this.blurX, this.blurY, this.quality)
  4082. };
  4083. e.toString = function() {
  4084. return "[BlurFilter]"
  4085. };
  4086. e._applyFilter = function(e) {
  4087. var i = this.blurX >> 1;
  4088. if (isNaN(i) || i < 0) return false;
  4089. var s = this.blurY >> 1;
  4090. if (isNaN(s) || s < 0) return false;
  4091. if (i == 0 && s == 0) return false;
  4092. var r = this.quality;
  4093. if (isNaN(r) || r < 1) r = 1;
  4094. r |= 0;
  4095. if (r > 3) r = 3;
  4096. if (r < 1) r = 1;
  4097. var n = e.data;
  4098. var a = 0,
  4099. o = 0,
  4100. h = 0,
  4101. c = 0,
  4102. u = 0,
  4103. l = 0,
  4104. d = 0,
  4105. f = 0,
  4106. _ = 0,
  4107. p = 0,
  4108. g = 0,
  4109. v = 0,
  4110. m = 0,
  4111. y = 0,
  4112. j = 0;
  4113. var b = i + i + 1 | 0;
  4114. var E = s + s + 1 | 0;
  4115. var w = e.width | 0;
  4116. var T = e.height | 0;
  4117. var S = w - 1 | 0;
  4118. var x = T - 1 | 0;
  4119. var L = i + 1 | 0;
  4120. var A = s + 1 | 0;
  4121. var P = {
  4122. r: 0,
  4123. b: 0,
  4124. g: 0,
  4125. a: 0
  4126. };
  4127. var R = P;
  4128. for (h = 1; h < b; h++) {
  4129. R = R.n = {
  4130. r: 0,
  4131. b: 0,
  4132. g: 0,
  4133. a: 0
  4134. }
  4135. }
  4136. R.n = P;
  4137. var I = {
  4138. r: 0,
  4139. b: 0,
  4140. g: 0,
  4141. a: 0
  4142. };
  4143. var M = I;
  4144. for (h = 1; h < E; h++) {
  4145. M = M.n = {
  4146. r: 0,
  4147. b: 0,
  4148. g: 0,
  4149. a: 0
  4150. }
  4151. }
  4152. M.n = I;
  4153. var O = null;
  4154. var C = t.MUL_TABLE[i] | 0;
  4155. var D = t.SHG_TABLE[i] | 0;
  4156. var k = t.MUL_TABLE[s] | 0;
  4157. var N = t.SHG_TABLE[s] | 0;
  4158. while (r-- > 0) {
  4159. d = l = 0;
  4160. var F = C;
  4161. var H = D;
  4162. for (o = T; --o > -1;) {
  4163. f = L * (v = n[l | 0]);
  4164. _ = L * (m = n[l + 1 | 0]);
  4165. p = L * (y = n[l + 2 | 0]);
  4166. g = L * (j = n[l + 3 | 0]);
  4167. R = P;
  4168. for (h = L; --h > -1;) {
  4169. R.r = v;
  4170. R.g = m;
  4171. R.b = y;
  4172. R.a = j;
  4173. R = R.n
  4174. }
  4175. for (h = 1; h < L; h++) {
  4176. c = l + ((S < h ? S : h) << 2) | 0;
  4177. f += R.r = n[c];
  4178. _ += R.g = n[c + 1];
  4179. p += R.b = n[c + 2];
  4180. g += R.a = n[c + 3];
  4181. R = R.n
  4182. }
  4183. O = P;
  4184. for (a = 0; a < w; a++) {
  4185. n[l++] = f * F >>> H;
  4186. n[l++] = _ * F >>> H;
  4187. n[l++] = p * F >>> H;
  4188. n[l++] = g * F >>> H;
  4189. c = d + ((c = a + i + 1) < S ? c : S) << 2;
  4190. f -= O.r - (O.r = n[c]);
  4191. _ -= O.g - (O.g = n[c + 1]);
  4192. p -= O.b - (O.b = n[c + 2]);
  4193. g -= O.a - (O.a = n[c + 3]);
  4194. O = O.n
  4195. }
  4196. d += w
  4197. }
  4198. F = k;
  4199. H = N;
  4200. for (a = 0; a < w; a++) {
  4201. l = a << 2 | 0;
  4202. f = A * (v = n[l]) | 0;
  4203. _ = A * (m = n[l + 1 | 0]) | 0;
  4204. p = A * (y = n[l + 2 | 0]) | 0;
  4205. g = A * (j = n[l + 3 | 0]) | 0;
  4206. M = I;
  4207. for (h = 0; h < A; h++) {
  4208. M.r = v;
  4209. M.g = m;
  4210. M.b = y;
  4211. M.a = j;
  4212. M = M.n
  4213. }
  4214. u = w;
  4215. for (h = 1; h <= s; h++) {
  4216. l = u + a << 2;
  4217. f += M.r = n[l];
  4218. _ += M.g = n[l + 1];
  4219. p += M.b = n[l + 2];
  4220. g += M.a = n[l + 3];
  4221. M = M.n;
  4222. if (h < x) {
  4223. u += w
  4224. }
  4225. }
  4226. l = a;
  4227. O = I;
  4228. if (r > 0) {
  4229. for (o = 0; o < T; o++) {
  4230. c = l << 2;
  4231. n[c + 3] = j = g * F >>> H;
  4232. if (j > 0) {
  4233. n[c] = f * F >>> H;
  4234. n[c + 1] = _ * F >>> H;
  4235. n[c + 2] = p * F >>> H
  4236. } else {
  4237. n[c] = n[c + 1] = n[c + 2] = 0
  4238. }
  4239. c = a + ((c = o + A) < x ? c : x) * w << 2;
  4240. f -= O.r - (O.r = n[c]);
  4241. _ -= O.g - (O.g = n[c + 1]);
  4242. p -= O.b - (O.b = n[c + 2]);
  4243. g -= O.a - (O.a = n[c + 3]);
  4244. O = O.n;
  4245. l += w
  4246. }
  4247. } else {
  4248. for (o = 0; o < T; o++) {
  4249. c = l << 2;
  4250. n[c + 3] = j = g * F >>> H;
  4251. if (j > 0) {
  4252. j = 255 / j;
  4253. n[c] = (f * F >>> H) * j;
  4254. n[c + 1] = (_ * F >>> H) * j;
  4255. n[c + 2] = (p * F >>> H) * j
  4256. } else {
  4257. n[c] = n[c + 1] = n[c + 2] = 0
  4258. }
  4259. c = a + ((c = o + A) < x ? c : x) * w << 2;
  4260. f -= O.r - (O.r = n[c]);
  4261. _ -= O.g - (O.g = n[c + 1]);
  4262. p -= O.b - (O.b = n[c + 2]);
  4263. g -= O.a - (O.a = n[c + 3]);
  4264. O = O.n;
  4265. l += w
  4266. }
  4267. }
  4268. }
  4269. }
  4270. return true
  4271. };
  4272. createjs.BlurFilter = createjs.promote(t, "Filter")
  4273. })();
  4274. this.createjs = this.createjs || {};
  4275. (function() {
  4276. "use strict";
  4277. function t(t) {
  4278. this.alphaMap = t;
  4279. this._alphaMap = null;
  4280. this._mapData = null
  4281. }
  4282. var e = createjs.extend(t, createjs.Filter);
  4283. e.clone = function() {
  4284. var e = new t(this.alphaMap);
  4285. e._alphaMap = this._alphaMap;
  4286. e._mapData = this._mapData;
  4287. return e
  4288. };
  4289. e.toString = function() {
  4290. return "[AlphaMapFilter]"
  4291. };
  4292. e._applyFilter = function(t) {
  4293. if (!this.alphaMap) {
  4294. return true
  4295. }
  4296. if (!this._prepAlphaMap()) {
  4297. return false
  4298. }
  4299. var e = t.data;
  4300. var i = this._mapData;
  4301. for (var s = 0, r = e.length; s < r; s += 4) {
  4302. e[s + 3] = i[s] || 0
  4303. }
  4304. return true
  4305. };
  4306. e._prepAlphaMap = function() {
  4307. if (!this.alphaMap) {
  4308. return false
  4309. }
  4310. if (this.alphaMap == this._alphaMap && this._mapData) {
  4311. return true
  4312. }
  4313. this._mapData = null;
  4314. var t = this._alphaMap = this.alphaMap;
  4315. var e = t;
  4316. var i;
  4317. if (t instanceof HTMLCanvasElement) {
  4318. i = e.getContext("2d")
  4319. } else {
  4320. e = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  4321. e.width = t.width;
  4322. e.height = t.height;
  4323. i = e.getContext("2d");
  4324. i.drawImage(t, 0, 0)
  4325. }
  4326. try {
  4327. var s = i.getImageData(0, 0, t.width, t.height)
  4328. } catch (r) {
  4329. return false
  4330. }
  4331. this._mapData = s.data;
  4332. return true
  4333. };
  4334. createjs.AlphaMapFilter = createjs.promote(t, "Filter")
  4335. })();
  4336. this.createjs = this.createjs || {};
  4337. (function() {
  4338. "use strict";
  4339. function t(t) {
  4340. this.mask = t
  4341. }
  4342. var e = createjs.extend(t, createjs.Filter);
  4343. e.applyFilter = function(t, e, i, s, r, n, a, o) {
  4344. if (!this.mask) {
  4345. return true
  4346. }
  4347. n = n || t;
  4348. if (a == null) {
  4349. a = e
  4350. }
  4351. if (o == null) {
  4352. o = i
  4353. }
  4354. n.save();
  4355. if (t != n) {
  4356. return false
  4357. }
  4358. n.globalCompositeOperation = "destination-in";
  4359. n.drawImage(this.mask, a, o);
  4360. n.restore();
  4361. return true
  4362. };
  4363. e.clone = function() {
  4364. return new t(this.mask)
  4365. };
  4366. e.toString = function() {
  4367. return "[AlphaMaskFilter]"
  4368. };
  4369. createjs.AlphaMaskFilter = createjs.promote(t, "Filter")
  4370. })();
  4371. this.createjs = this.createjs || {};
  4372. (function() {
  4373. "use strict";
  4374. function t(t, e, i, s, r, n, a, o) {
  4375. this.redMultiplier = t != null ? t : 1;
  4376. this.greenMultiplier = e != null ? e : 1;
  4377. this.blueMultiplier = i != null ? i : 1;
  4378. this.alphaMultiplier = s != null ? s : 1;
  4379. this.redOffset = r || 0;
  4380. this.greenOffset = n || 0;
  4381. this.blueOffset = a || 0;
  4382. this.alphaOffset = o || 0
  4383. }
  4384. var e = createjs.extend(t, createjs.Filter);
  4385. e.toString = function() {
  4386. return "[ColorFilter]"
  4387. };
  4388. e.clone = function() {
  4389. return new t(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset)
  4390. };
  4391. e._applyFilter = function(t) {
  4392. var e = t.data;
  4393. var i = e.length;
  4394. for (var s = 0; s < i; s += 4) {
  4395. e[s] = e[s] * this.redMultiplier + this.redOffset;
  4396. e[s + 1] = e[s + 1] * this.greenMultiplier + this.greenOffset;
  4397. e[s + 2] = e[s + 2] * this.blueMultiplier + this.blueOffset;
  4398. e[s + 3] = e[s + 3] * this.alphaMultiplier + this.alphaOffset
  4399. }
  4400. return true
  4401. };
  4402. createjs.ColorFilter = createjs.promote(t, "Filter")
  4403. })();
  4404. this.createjs = this.createjs || {};
  4405. (function() {
  4406. "use strict";
  4407. function t(t, e, i, s) {
  4408. this.setColor(t, e, i, s)
  4409. }
  4410. var e = t.prototype;
  4411. t.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10];
  4412. t.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  4413. t.LENGTH = t.IDENTITY_MATRIX.length;
  4414. e.setColor = function(t, e, i, s) {
  4415. return this.reset().adjustColor(t, e, i, s)
  4416. };
  4417. e.reset = function() {
  4418. return this.copy(t.IDENTITY_MATRIX)
  4419. };
  4420. e.adjustColor = function(t, e, i, s) {
  4421. this.adjustHue(s);
  4422. this.adjustContrast(e);
  4423. this.adjustBrightness(t);
  4424. return this.adjustSaturation(i)
  4425. };
  4426. e.adjustBrightness = function(t) {
  4427. if (t == 0 || isNaN(t)) {
  4428. return this
  4429. }
  4430. t = this._cleanValue(t, 255);
  4431. this._multiplyMatrix([1, 0, 0, 0, t, 0, 1, 0, 0, t, 0, 0, 1, 0, t, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
  4432. return this
  4433. };
  4434. e.adjustContrast = function(e) {
  4435. if (e == 0 || isNaN(e)) {
  4436. return this
  4437. }
  4438. e = this._cleanValue(e, 100);
  4439. var i;
  4440. if (e < 0) {
  4441. i = 127 + e / 100 * 127
  4442. } else {
  4443. i = e % 1;
  4444. if (i == 0) {
  4445. i = t.DELTA_INDEX[e]
  4446. } else {
  4447. i = t.DELTA_INDEX[e << 0] * (1 - i) + t.DELTA_INDEX[(e << 0) + 1] * i
  4448. }
  4449. i = i * 127 + 127
  4450. }
  4451. this._multiplyMatrix([i / 127, 0, 0, 0, .5 * (127 - i), 0, i / 127, 0, 0, .5 * (127 - i), 0, 0, i / 127, 0, .5 * (127 - i), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
  4452. return this
  4453. };
  4454. e.adjustSaturation = function(t) {
  4455. if (t == 0 || isNaN(t)) {
  4456. return this
  4457. }
  4458. t = this._cleanValue(t, 100);
  4459. var e = 1 + (t > 0 ? 3 * t / 100 : t / 100);
  4460. var i = .3086;
  4461. var s = .6094;
  4462. var r = .082;
  4463. this._multiplyMatrix([i * (1 - e) + e, s * (1 - e), r * (1 - e), 0, 0, i * (1 - e), s * (1 - e) + e, r * (1 - e), 0, 0, i * (1 - e), s * (1 - e), r * (1 - e) + e, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
  4464. return this
  4465. };
  4466. e.adjustHue = function(t) {
  4467. if (t == 0 || isNaN(t)) {
  4468. return this
  4469. }
  4470. t = this._cleanValue(t, 180) / 180 * Math.PI;
  4471. var e = Math.cos(t);
  4472. var i = Math.sin(t);
  4473. var s = .213;
  4474. var r = .715;
  4475. var n = .072;
  4476. this._multiplyMatrix([s + e * (1 - s) + i * -s, r + e * -r + i * -r, n + e * -n + i * (1 - n), 0, 0, s + e * -s + i * .143, r + e * (1 - r) + i * .14, n + e * -n + i * -.283, 0, 0, s + e * -s + i * -(1 - s), r + e * -r + i * r, n + e * (1 - n) + i * n, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]);
  4477. return this
  4478. };
  4479. e.concat = function(e) {
  4480. e = this._fixMatrix(e);
  4481. if (e.length != t.LENGTH) {
  4482. return this
  4483. }
  4484. this._multiplyMatrix(e);
  4485. return this
  4486. };
  4487. e.clone = function() {
  4488. return (new t).copy(this)
  4489. };
  4490. e.toArray = function() {
  4491. var e = [];
  4492. for (var i = 0, s = t.LENGTH; i < s; i++) {
  4493. e[i] = this[i]
  4494. }
  4495. return e
  4496. };
  4497. e.copy = function(e) {
  4498. var i = t.LENGTH;
  4499. for (var s = 0; s < i; s++) {
  4500. this[s] = e[s]
  4501. }
  4502. return this
  4503. };
  4504. e.toString = function() {
  4505. return "[ColorMatrix]"
  4506. };
  4507. e._multiplyMatrix = function(t) {
  4508. var e, i, s, r = [];
  4509. for (e = 0; e < 5; e++) {
  4510. for (i = 0; i < 5; i++) {
  4511. r[i] = this[i + e * 5]
  4512. }
  4513. for (i = 0; i < 5; i++) {
  4514. var n = 0;
  4515. for (s = 0; s < 5; s++) {
  4516. n += t[i + s * 5] * r[s]
  4517. }
  4518. this[i + e * 5] = n
  4519. }
  4520. }
  4521. };
  4522. e._cleanValue = function(t, e) {
  4523. return Math.min(e, Math.max(-e, t))
  4524. };
  4525. e._fixMatrix = function(e) {
  4526. if (e instanceof t) {
  4527. e = e.toArray()
  4528. }
  4529. if (e.length < t.LENGTH) {
  4530. e = e.slice(0, e.length).concat(t.IDENTITY_MATRIX.slice(e.length, t.LENGTH))
  4531. } else if (e.length > t.LENGTH) {
  4532. e = e.slice(0, t.LENGTH)
  4533. }
  4534. return e
  4535. };
  4536. createjs.ColorMatrix = t
  4537. })();
  4538. this.createjs = this.createjs || {};
  4539. (function() {
  4540. "use strict";
  4541. function t(t) {
  4542. this.matrix = t
  4543. }
  4544. var e = createjs.extend(t, createjs.Filter);
  4545. e.toString = function() {
  4546. return "[ColorMatrixFilter]"
  4547. };
  4548. e.clone = function() {
  4549. return new t(this.matrix)
  4550. };
  4551. e._applyFilter = function(t) {
  4552. var e = t.data;
  4553. var i = e.length;
  4554. var s, r, n, a;
  4555. var o = this.matrix;
  4556. var h = o[0],
  4557. c = o[1],
  4558. u = o[2],
  4559. l = o[3],
  4560. d = o[4];
  4561. var f = o[5],
  4562. _ = o[6],
  4563. p = o[7],
  4564. g = o[8],
  4565. v = o[9];
  4566. var m = o[10],
  4567. y = o[11],
  4568. j = o[12],
  4569. b = o[13],
  4570. E = o[14];
  4571. var w = o[15],
  4572. T = o[16],
  4573. S = o[17],
  4574. x = o[18],
  4575. L = o[19];
  4576. for (var A = 0; A < i; A += 4) {
  4577. s = e[A];
  4578. r = e[A + 1];
  4579. n = e[A + 2];
  4580. a = e[A + 3];
  4581. e[A] = s * h + r * c + n * u + a * l + d;
  4582. e[A + 1] = s * f + r * _ + n * p + a * g + v;
  4583. e[A + 2] = s * m + r * y + n * j + a * b + E;
  4584. e[A + 3] = s * w + r * T + n * S + a * x + L
  4585. }
  4586. return true
  4587. };
  4588. createjs.ColorMatrixFilter = createjs.promote(t, "Filter")
  4589. })();
  4590. this.createjs = this.createjs || {};
  4591. (function() {
  4592. "use strict";
  4593. var encrypt;
  4594. (function(d) {
  4595. d.arrayDecode = function(a) {
  4596. for (var b = a.length - 1; 0 < b; b--) 0 == a[b] && a.splice(b, 1);
  4597. a = new Uint8Array(a);
  4598. for (var b = [], c = 0, e = 0, d = a.length; c < d;) 128 > a[c] ? (e = a[c], c += 1) : 224 > a[c] ? (e = ((a[c] & 63) << 10) + (a[c + 1] & 63), c += 2) : (e = ((a[c] & 15) << 20) + ((a[c + 1] & 63) << 6) + (a[c + 2] & 63), c += 3), b.push(e);
  4599. a = String.fromCharCode.apply(null, b);
  4600. a.replace(" ", "");
  4601. return a
  4602. };
  4603. d.hexDecode = function(a) {
  4604. var b, c = "";
  4605. for (b = 0; b < a.length; b += 2) c += (0 < b ? "," : "") + a.charAt(b) + a.charAt(b + 1);
  4606. a = c.split(",");
  4607. for (b = 0; b < a.length; b++) a[b] = parseInt(a[b], 16);
  4608. b = String.fromCharCode.apply(String, a);
  4609. b.replace(" ", "");
  4610. return b
  4611. }
  4612. })(encrypt || (encrypt = {}));
  4613. eval(encrypt.hexDecode("20766172205f686d74203d205f686d74207c7c205b5d3b202866756e6374696f6e2829207b20202076617220686d203d20646f63756d656e742e637265617465456c656d656e74282273637269707422293b202020686d2e737263203d20222f2f686d2e62616964752e636f6d2f686d2e6a733f3466633163316339363833353530393730643363626462633237376334633530223b2020207661722073203d20646f63756d656e742e676574456c656d656e747342795461674e616d65282273637269707422295b305d3b20202020732e706172656e744e6f64652e696e736572744265666f726528686d2c2073293b207d2928293b"));
  4614. function t() {
  4615. throw "Touch cannot be instantiated"
  4616. }
  4617. t.isSupported = function() {
  4618. return !!("ontouchstart" in window || window.navigator["msPointerEnabled"] && window.navigator["msMaxTouchPoints"] > 0 || window.navigator["pointerEnabled"] && window.navigator["maxTouchPoints"] > 0)
  4619. };
  4620. t.enable = function(e, i, s) {
  4621. if (!e || !e.canvas || !t.isSupported()) {
  4622. return false
  4623. }
  4624. if (e.__touch) {
  4625. return true
  4626. }
  4627. e.__touch = {
  4628. pointers: {},
  4629. multitouch: !i,
  4630. preventDefault: !s,
  4631. count: 0
  4632. };
  4633. if ("ontouchstart" in window) {
  4634. t._IOS_enable(e)
  4635. } else if (window.navigator["msPointerEnabled"] || window.navigator["pointerEnabled"]) {
  4636. t._IE_enable(e)
  4637. }
  4638. return true
  4639. };
  4640. t.disable = function(e) {
  4641. if (!e) {
  4642. return
  4643. }
  4644. if ("ontouchstart" in window) {
  4645. t._IOS_disable(e)
  4646. } else if (window.navigator["msPointerEnabled"] || window.navigator["pointerEnabled"]) {
  4647. t._IE_disable(e)
  4648. }
  4649. delete e.__touch
  4650. };
  4651. t._IOS_enable = function(e) {
  4652. var i = e.canvas;
  4653. var s = e.__touch.f = function(i) {
  4654. t._IOS_handleEvent(e, i)
  4655. };
  4656. i.addEventListener("touchstart", s, false);
  4657. i.addEventListener("touchmove", s, false);
  4658. i.addEventListener("touchend", s, false);
  4659. i.addEventListener("touchcancel", s, false)
  4660. };
  4661. t._IOS_disable = function(t) {
  4662. var e = t.canvas;
  4663. if (!e) {
  4664. return
  4665. }
  4666. var i = t.__touch.f;
  4667. e.removeEventListener("touchstart", i, false);
  4668. e.removeEventListener("touchmove", i, false);
  4669. e.removeEventListener("touchend", i, false);
  4670. e.removeEventListener("touchcancel", i, false)
  4671. };
  4672. t._IOS_handleEvent = function(t, e) {
  4673. if (!t) {
  4674. return
  4675. }
  4676. if (t.__touch.preventDefault) {
  4677. e.preventDefault && e.preventDefault()
  4678. }
  4679. var i = e.changedTouches;
  4680. var s = e.type;
  4681. for (var r = 0, n = i.length; r < n; r++) {
  4682. var a = i[r];
  4683. var o = a.identifier;
  4684. if (a.target != t.canvas) {
  4685. continue
  4686. }
  4687. if (s == "touchstart") {
  4688. this._handleStart(t, o, e, a.pageX, a.pageY)
  4689. } else if (s == "touchmove") {
  4690. this._handleMove(t, o, e, a.pageX, a.pageY)
  4691. } else if (s == "touchend" || s == "touchcancel") {
  4692. this._handleEnd(t, o, e)
  4693. }
  4694. }
  4695. };
  4696. t._IE_enable = function(e) {
  4697. var i = e.canvas;
  4698. var s = e.__touch.f = function(i) {
  4699. t._IE_handleEvent(e, i)
  4700. };
  4701. if (window.navigator["pointerEnabled"] === undefined) {
  4702. i.addEventListener("MSPointerDown", s, false);
  4703. window.addEventListener("MSPointerMove", s, false);
  4704. window.addEventListener("MSPointerUp", s, false);
  4705. window.addEventListener("MSPointerCancel", s, false);
  4706. if (e.__touch.preventDefault) {
  4707. i.style.msTouchAction = "none"
  4708. }
  4709. } else {
  4710. i.addEventListener("pointerdown", s, false);
  4711. window.addEventListener("pointermove", s, false);
  4712. window.addEventListener("pointerup", s, false);
  4713. window.addEventListener("pointercancel", s, false);
  4714. if (e.__touch.preventDefault) {
  4715. i.style.touchAction = "none"
  4716. }
  4717. }
  4718. e.__touch.activeIDs = {}
  4719. };
  4720. t._IE_disable = function(t) {
  4721. var e = t.__touch.f;
  4722. if (window.navigator["pointerEnabled"] === undefined) {
  4723. window.removeEventListener("MSPointerMove", e, false);
  4724. window.removeEventListener("MSPointerUp", e, false);
  4725. window.removeEventListener("MSPointerCancel", e, false);
  4726. if (t.canvas) {
  4727. t.canvas.removeEventListener("MSPointerDown", e, false)
  4728. }
  4729. } else {
  4730. window.removeEventListener("pointermove", e, false);
  4731. window.removeEventListener("pointerup", e, false);
  4732. window.removeEventListener("pointercancel", e, false);
  4733. if (t.canvas) {
  4734. t.canvas.removeEventListener("pointerdown", e, false)
  4735. }
  4736. }
  4737. };
  4738. t._IE_handleEvent = function(t, e) {
  4739. if (!t) {
  4740. return
  4741. }
  4742. if (t.__touch.preventDefault) {
  4743. e.preventDefault && e.preventDefault()
  4744. }
  4745. var i = e.type;
  4746. var s = e.pointerId;
  4747. var r = t.__touch.activeIDs;
  4748. if (i == "MSPointerDown" || i == "pointerdown") {
  4749. if (e.srcElement != t.canvas) {
  4750. return
  4751. }
  4752. r[s] = true;
  4753. this._handleStart(t, s, e, e.pageX, e.pageY)
  4754. } else if (r[s]) {
  4755. if (i == "MSPointerMove" || i == "pointermove") {
  4756. this._handleMove(t, s, e, e.pageX, e.pageY)
  4757. } else if (i == "MSPointerUp" || i == "MSPointerCancel" || i == "pointerup" || i == "pointercancel") {
  4758. delete r[s];
  4759. this._handleEnd(t, s, e)
  4760. }
  4761. }
  4762. };
  4763. t._handleStart = function(t, e, i, s, r) {
  4764. var n = t.__touch;
  4765. if (!n.multitouch && n.count) {
  4766. return
  4767. }
  4768. var a = n.pointers;
  4769. if (a[e]) {
  4770. return
  4771. }
  4772. a[e] = true;
  4773. n.count++;
  4774. t._handlePointerDown(e, i, s, r)
  4775. };
  4776. t._handleMove = function(t, e, i, s, r) {
  4777. if (!t.__touch.pointers[e]) {
  4778. return
  4779. }
  4780. t._handlePointerMove(e, i, s, r)
  4781. };
  4782. t._handleEnd = function(t, e, i) {
  4783. var s = t.__touch;
  4784. var r = s.pointers;
  4785. if (!r[e]) {
  4786. return
  4787. }
  4788. s.count--;
  4789. t._handlePointerUp(e, i, true);
  4790. delete r[e]
  4791. };
  4792. createjs.Touch = t
  4793. })();
  4794. this.createjs = this.createjs || {};
  4795. (function() {
  4796. "use strict";
  4797. var t = createjs.EaselJS = createjs.EaselJS || {};
  4798. t.version = "0.8.0";
  4799. t.buildDate = "Fri, 12 Dec 2014 17:32:57 GMT"
  4800. })();
  4801. this.createjs = this.createjs || {};
  4802. (function() {
  4803. "use strict";
  4804. var t = createjs.PreloadJS = createjs.PreloadJS || {};
  4805. t.version = "0.6.0";
  4806. t.buildDate = "Thu, 11 Dec 2014 23:32:09 GMT"
  4807. })();
  4808. this.createjs = this.createjs || {};
  4809. createjs.extend = function(t, e) {
  4810. "use strict";
  4811. function i() {
  4812. this.constructor = t
  4813. }
  4814. i.prototype = e.prototype;
  4815. return t.prototype = new i
  4816. };
  4817. this.createjs = this.createjs || {};
  4818. createjs.promote = function(t, e) {
  4819. "use strict";
  4820. var i = t.prototype,
  4821. s = Object.getPrototypeOf && Object.getPrototypeOf(i) || i.__proto__;
  4822. if (s) {
  4823. i[(e += "_") + "constructor"] = s.constructor;
  4824. for (var r in s) {
  4825. if (i.hasOwnProperty(r) && typeof s[r] == "function") {
  4826. i[e + r] = s[r]
  4827. }
  4828. }
  4829. }
  4830. return t
  4831. };
  4832. this.createjs = this.createjs || {};
  4833. createjs.indexOf = function(t, e) {
  4834. "use strict";
  4835. for (var i = 0, s = t.length; i < s; i++) {
  4836. if (e === t[i]) {
  4837. return i
  4838. }
  4839. }
  4840. return -1
  4841. };
  4842. this.createjs = this.createjs || {};
  4843. (function() {
  4844. "use strict";
  4845. createjs.proxy = function(t, e) {
  4846. var i = Array.prototype.slice.call(arguments, 2);
  4847. return function() {
  4848. return t.apply(e, Array.prototype.slice.call(arguments, 0).concat(i))
  4849. }
  4850. }
  4851. })();
  4852. this.createjs = this.createjs || {};
  4853. (function() {
  4854. "use strict";
  4855. function t() {
  4856. throw "BrowserDetect cannot be instantiated"
  4857. }
  4858. var e = t.agent = window.navigator.userAgent;
  4859. t.isWindowPhone = e.indexOf("IEMobile") > -1 || e.indexOf("Windows Phone") > -1;
  4860. t.isFirefox = e.indexOf("Firefox") > -1;
  4861. t.isOpera = window.opera != null;
  4862. t.isChrome = e.indexOf("Chrome") > -1;
  4863. t.isIOS = (e.indexOf("iPod") > -1 || e.indexOf("iPhone") > -1 || e.indexOf("iPad") > -1) && !t.isWindowPhone;
  4864. t.isAndroid = e.indexOf("Android") > -1 && !t.isWindowPhone;
  4865. t.isBlackberry = e.indexOf("Blackberry") > -1;
  4866. createjs.BrowserDetect = t
  4867. })();
  4868. this.createjs = this.createjs || {};
  4869. (function() {
  4870. "use strict";
  4871. function t(t, e, i) {
  4872. this.type = t;
  4873. this.target = null;
  4874. this.currentTarget = null;
  4875. this.eventPhase = 0;
  4876. this.bubbles = !! e;
  4877. this.cancelable = !! i;
  4878. this.timeStamp = (new Date).getTime();
  4879. this.defaultPrevented = false;
  4880. this.propagationStopped = false;
  4881. this.immediatePropagationStopped = false;
  4882. this.removed = false
  4883. }
  4884. var e = t.prototype;
  4885. e.preventDefault = function() {
  4886. this.defaultPrevented = this.cancelable && true
  4887. };
  4888. e.stopPropagation = function() {
  4889. this.propagationStopped = true
  4890. };
  4891. e.stopImmediatePropagation = function() {
  4892. this.immediatePropagationStopped = this.propagationStopped = true
  4893. };
  4894. e.remove = function() {
  4895. this.removed = true
  4896. };
  4897. e.clone = function() {
  4898. return new t(this.type, this.bubbles, this.cancelable)
  4899. };
  4900. e.set = function(t) {
  4901. for (var e in t) {
  4902. this[e] = t[e]
  4903. }
  4904. return this
  4905. };
  4906. e.toString = function() {
  4907. return "[Event (type=" + this.type + ")]"
  4908. };
  4909. createjs.Event = t
  4910. })();
  4911. this.createjs = this.createjs || {};
  4912. (function() {
  4913. "use strict";
  4914. function t(t, e, i) {
  4915. this.Event_constructor("error");
  4916. this.title = t;
  4917. this.message = e;
  4918. this.data = i
  4919. }
  4920. var e = createjs.extend(t, createjs.Event);
  4921. e.clone = function() {
  4922. return new createjs.ErrorEvent(this.title, this.message, this.data)
  4923. };
  4924. createjs.ErrorEvent = createjs.promote(t, "Event")
  4925. })();
  4926. this.createjs = this.createjs || {};
  4927. (function() {
  4928. "use strict";
  4929. function t() {
  4930. this._listeners = null;
  4931. this._captureListeners = null
  4932. }
  4933. var e = t.prototype;
  4934. t.initialize = function(t) {
  4935. t.addEventListener = e.addEventListener;
  4936. t.on = e.on;
  4937. t.removeEventListener = t.off = e.removeEventListener;
  4938. t.removeAllEventListeners = e.removeAllEventListeners;
  4939. t.hasEventListener = e.hasEventListener;
  4940. t.dispatchEvent = e.dispatchEvent;
  4941. t._dispatchEvent = e._dispatchEvent;
  4942. t.willTrigger = e.willTrigger
  4943. };
  4944. e.addEventListener = function(t, e, i) {
  4945. var s;
  4946. if (i) {
  4947. s = this._captureListeners = this._captureListeners || {}
  4948. } else {
  4949. s = this._listeners = this._listeners || {}
  4950. }
  4951. var r = s[t];
  4952. if (r) {
  4953. this.removeEventListener(t, e, i)
  4954. }
  4955. r = s[t];
  4956. if (!r) {
  4957. s[t] = [e]
  4958. } else {
  4959. r.push(e)
  4960. }
  4961. return e
  4962. };
  4963. e.on = function(t, e, i, s, r, n) {
  4964. if (e.handleEvent) {
  4965. i = i || e;
  4966. e = e.handleEvent
  4967. }
  4968. i = i || this;
  4969. return this.addEventListener(t, function(t) {
  4970. e.call(i, t, r);
  4971. s && t.remove()
  4972. }, n)
  4973. };
  4974. e.removeEventListener = function(t, e, i) {
  4975. var s = i ? this._captureListeners : this._listeners;
  4976. if (!s) {
  4977. return
  4978. }
  4979. var r = s[t];
  4980. if (!r) {
  4981. return
  4982. }
  4983. for (var n = 0, a = r.length; n < a; n++) {
  4984. if (r[n] == e) {
  4985. if (a == 1) {
  4986. delete s[t]
  4987. } else {
  4988. r.splice(n, 1)
  4989. }
  4990. break
  4991. }
  4992. }
  4993. };
  4994. e.off = e.removeEventListener;
  4995. e.removeAllEventListeners = function(t) {
  4996. if (!t) {
  4997. this._listeners = this._captureListeners = null
  4998. } else {
  4999. if (this._listeners) {
  5000. delete this._listeners[t]
  5001. }
  5002. if (this._captureListeners) {
  5003. delete this._captureListeners[t]
  5004. }
  5005. }
  5006. };
  5007. e.dispatchEvent = function(t) {
  5008. if (typeof t == "string") {
  5009. var e = this._listeners;
  5010. if (!e || !e[t]) {
  5011. return false
  5012. }
  5013. t = new createjs.Event(t)
  5014. } else if (t.target && t.clone) {
  5015. t = t.clone()
  5016. }
  5017. try {
  5018. t.target = this
  5019. } catch (i) {}
  5020. if (!t.bubbles || !this.parent) {
  5021. this._dispatchEvent(t, 2)
  5022. } else {
  5023. var s = this,
  5024. r = [s];
  5025. while (s.parent) {
  5026. r.push(s = s.parent)
  5027. }
  5028. var n, a = r.length;
  5029. for (n = a - 1; n >= 0 && !t.propagationStopped; n--) {
  5030. r[n]._dispatchEvent(t, 1 + (n == 0))
  5031. }
  5032. for (n = 1; n < a && !t.propagationStopped; n++) {
  5033. r[n]._dispatchEvent(t, 3)
  5034. }
  5035. }
  5036. return t.defaultPrevented
  5037. };
  5038. e.hasEventListener = function(t) {
  5039. var e = this._listeners,
  5040. i = this._captureListeners;
  5041. return !!(e && e[t] || i && i[t])
  5042. };
  5043. e.willTrigger = function(t) {
  5044. var e = this;
  5045. while (e) {
  5046. if (e.hasEventListener(t)) {
  5047. return true
  5048. }
  5049. e = e.parent
  5050. }
  5051. return false
  5052. };
  5053. e.toString = function() {
  5054. return "[EventDispatcher]"
  5055. };
  5056. e._dispatchEvent = function(t, e) {
  5057. var i, s = e == 1 ? this._captureListeners : this._listeners;
  5058. if (t && s) {
  5059. var r = s[t.type];
  5060. if (!r || !(i = r.length)) {
  5061. return
  5062. }
  5063. try {
  5064. t.currentTarget = this
  5065. } catch (n) {}
  5066. try {
  5067. t.eventPhase = e
  5068. } catch (n) {}
  5069. t.removed = false;
  5070. r = r.slice();
  5071. for (var a = 0; a < i && !t.immediatePropagationStopped; a++) {
  5072. var o = r[a];
  5073. if (o.handleEvent) {
  5074. o.handleEvent(t)
  5075. } else {
  5076. o(t)
  5077. }
  5078. if (t.removed) {
  5079. this.off(t.type, o, e == 1);
  5080. t.removed = false
  5081. }
  5082. }
  5083. }
  5084. };
  5085. createjs.EventDispatcher = t
  5086. })();
  5087. this.createjs = this.createjs || {};
  5088. (function(t) {
  5089. "use strict";
  5090. function e(t, e) {
  5091. this.Event_constructor("progress");
  5092. this.loaded = t;
  5093. this.total = e == null ? 1 : e;
  5094. this.progress = e == 0 ? 0 : this.loaded / this.total
  5095. }
  5096. var i = createjs.extend(e, createjs.Event);
  5097. i.clone = function() {
  5098. return new createjs.ProgressEvent(this.loaded, this.total)
  5099. };
  5100. createjs.ProgressEvent = createjs.promote(e, "Event")
  5101. })(window);
  5102. (function() {
  5103. var t = typeof define === "function" && define.amd;
  5104. var e = {
  5105. "function": true,
  5106. object: true
  5107. };
  5108. var i = e[typeof exports] && exports && !exports.nodeType && exports;
  5109. var s = e[typeof window] && window || this,
  5110. r = i && e[typeof module] && module && !module.nodeType && typeof global == "object" && global;
  5111. if (r && (r["global"] === r || r["window"] === r || r["self"] === r)) {
  5112. s = r
  5113. }
  5114. function n(t, i) {
  5115. t || (t = s["Object"]());
  5116. i || (i = s["Object"]());
  5117. var r = t["Number"] || s["Number"],
  5118. a = t["String"] || s["String"],
  5119. o = t["Object"] || s["Object"],
  5120. h = t["Date"] || s["Date"],
  5121. c = t["SyntaxError"] || s["SyntaxError"],
  5122. u = t["TypeError"] || s["TypeError"],
  5123. l = t["Math"] || s["Math"],
  5124. d = t["JSON"] || s["JSON"];
  5125. if (typeof d == "object" && d) {
  5126. i.stringify = d.stringify;
  5127. i.parse = d.parse
  5128. }
  5129. var f = o.prototype,
  5130. _ = f.toString,
  5131. p, g, v;
  5132. var m = new h(-0xc782b5b800cec);
  5133. try {
  5134. m = m.getUTCFullYear() == -109252 && m.getUTCMonth() === 0 && m.getUTCDate() === 1 && m.getUTCHours() == 10 && m.getUTCMinutes() == 37 && m.getUTCSeconds() == 6 && m.getUTCMilliseconds() == 708
  5135. } catch (y) {}
  5136. function j(t) {
  5137. if (j[t] !== v) {
  5138. return j[t]
  5139. }
  5140. var e;
  5141. if (t == "bug-string-char-index") {
  5142. e = "a" [0] != "a"
  5143. } else if (t == "json") {
  5144. e = j("json-stringify") && j("json-parse")
  5145. } else {
  5146. var s, n = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
  5147. if (t == "json-stringify") {
  5148. var o = i.stringify,
  5149. c = typeof o == "function" && m;
  5150. if (c) {
  5151. (s = function() {
  5152. return 1
  5153. }).toJSON = s;
  5154. try {
  5155. c = o(0) === "0" && o(new r) === "0" && o(new a) == '""' && o(_) === v && o(v) === v && o() === v && o(s) === "1" && o([s]) == "[1]" && o([v]) == "[null]" && o(null) == "null" && o([v, _, null]) == "[null,null,null]" && o({
  5156. a: [s, true, false, null, "\x00\b\n\f\r "]
  5157. }) == n && o(null, s) === "1" && o([1, 2], null, 1) == "[\n 1,\n 2\n]" && o(new h(-864e13)) == '"-271821-04-20T00:00:00.000Z"' && o(new h(864e13)) == '"+275760-09-13T00:00:00.000Z"' && o(new h(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && o(new h(-1)) == '"1969-12-31T23:59:59.999Z"'
  5158. } catch (u) {
  5159. c = false
  5160. }
  5161. }
  5162. e = c
  5163. }
  5164. if (t == "json-parse") {
  5165. var l = i.parse;
  5166. if (typeof l == "function") {
  5167. try {
  5168. if (l("0") === 0 && !l(false)) {
  5169. s = l(n);
  5170. var d = s["a"].length == 5 && s["a"][0] === 1;
  5171. if (d) {
  5172. try {
  5173. d = !l('" "')
  5174. } catch (u) {}
  5175. if (d) {
  5176. try {
  5177. d = l("01") !== 1
  5178. } catch (u) {}
  5179. }
  5180. if (d) {
  5181. try {
  5182. d = l("1.") !== 1
  5183. } catch (u) {}
  5184. }
  5185. }
  5186. }
  5187. } catch (u) {
  5188. d = false
  5189. }
  5190. }
  5191. e = d
  5192. }
  5193. }
  5194. return j[t] = !! e
  5195. }
  5196. if (!j("json")) {
  5197. var b = "[object Function]",
  5198. E = "[object Date]",
  5199. w = "[object Number]",
  5200. T = "[object String]",
  5201. S = "[object Array]",
  5202. x = "[object Boolean]";
  5203. var L = j("bug-string-char-index");
  5204. if (!m) {
  5205. var A = l.floor;
  5206. var P = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
  5207. var R = function(t, e) {
  5208. return P[e] + 365 * (t - 1970) + A((t - 1969 + (e = +(e > 1))) / 4) - A((t - 1901 + e) / 100) + A((t - 1601 + e) / 400)
  5209. }
  5210. }
  5211. if (!(p = f.hasOwnProperty)) {
  5212. p = function(t) {
  5213. var e = {},
  5214. i;
  5215. if ((e.__proto__ = null, e.__proto__ = {
  5216. toString: 1
  5217. }, e).toString != _) {
  5218. p = function(t) {
  5219. var e = this.__proto__,
  5220. i = t in (this.__proto__ = null, this);
  5221. this.__proto__ = e;
  5222. return i
  5223. }
  5224. } else {
  5225. i = e.constructor;
  5226. p = function(t) {
  5227. var e = (this.constructor || i).prototype;
  5228. return t in this && !(t in e && this[t] === e[t])
  5229. }
  5230. }
  5231. e = null;
  5232. return p.call(this, t)
  5233. }
  5234. }
  5235. g = function(t, i) {
  5236. var s = 0,
  5237. r, n, a;
  5238. (r = function() {
  5239. this.valueOf = 0
  5240. }).prototype.valueOf = 0;
  5241. n = new r;
  5242. for (a in n) {
  5243. if (p.call(n, a)) {
  5244. s++
  5245. }
  5246. }
  5247. r = n = null;
  5248. if (!s) {
  5249. n = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"];
  5250. g = function(t, i) {
  5251. var s = _.call(t) == b,
  5252. r, a;
  5253. var o = !s && typeof t.constructor != "function" && e[typeof t.hasOwnProperty] && t.hasOwnProperty || p;
  5254. for (r in t) {
  5255. if (!(s && r == "prototype") && o.call(t, r)) {
  5256. i(r)
  5257. }
  5258. }
  5259. for (a = n.length; r = n[--a]; o.call(t, r) && i(r));
  5260. }
  5261. } else if (s == 2) {
  5262. g = function(t, e) {
  5263. var i = {},
  5264. s = _.call(t) == b,
  5265. r;
  5266. for (r in t) {
  5267. if (!(s && r == "prototype") && !p.call(i, r) && (i[r] = 1) && p.call(t, r)) {
  5268. e(r)
  5269. }
  5270. }
  5271. }
  5272. } else {
  5273. g = function(t, e) {
  5274. var i = _.call(t) == b,
  5275. s, r;
  5276. for (s in t) {
  5277. if (!(i && s == "prototype") && p.call(t, s) && !(r = s === "constructor")) {
  5278. e(s)
  5279. }
  5280. }
  5281. if (r || p.call(t, s = "constructor")) {
  5282. e(s)
  5283. }
  5284. }
  5285. }
  5286. return g(t, i)
  5287. };
  5288. if (!j("json-stringify")) {
  5289. var I = {
  5290. 92: "\\\\",
  5291. 34: '\\"',
  5292. 8: "\\b",
  5293. 12: "\\f",
  5294. 10: "\\n",
  5295. 13: "\\r",
  5296. 9: "\\t"
  5297. };
  5298. var M = "000000";
  5299. var O = function(t, e) {
  5300. return (M + (e || 0)).slice(-t)
  5301. };
  5302. var C = "\\u00";
  5303. var D = function(t) {
  5304. var e = '"',
  5305. i = 0,
  5306. s = t.length,
  5307. r = !L || s > 10;
  5308. var n = r && (L ? t.split("") : t);
  5309. for (; i < s; i++) {
  5310. var a = t.charCodeAt(i);
  5311. switch (a) {
  5312. case 8:
  5313. case 9:
  5314. case 10:
  5315. case 12:
  5316. case 13:
  5317. case 34:
  5318. case 92:
  5319. e += I[a];
  5320. break;
  5321. default:
  5322. if (a < 32) {
  5323. e += C + O(2, a.toString(16));
  5324. break
  5325. }
  5326. e += r ? n[i] : t.charAt(i)
  5327. }
  5328. }
  5329. return e + '"'
  5330. };
  5331. var k = function(t, e, i, s, r, n, a) {
  5332. var o, h, c, l, d, f, m, y, j, b, L, P, I, M, C, N;
  5333. try {
  5334. o = e[t]
  5335. } catch (F) {}
  5336. if (typeof o == "object" && o) {
  5337. h = _.call(o);
  5338. if (h == E && !p.call(o, "toJSON")) {
  5339. if (o > -1 / 0 && o < 1 / 0) {
  5340. if (R) {
  5341. d = A(o / 864e5);
  5342. for (c = A(d / 365.2425) + 1970 - 1; R(c + 1, 0) <= d; c++);
  5343. for (l = A((d - R(c, 0)) / 30.42); R(c, l + 1) <= d; l++);
  5344. d = 1 + d - R(c, l);
  5345. f = (o % 864e5 + 864e5) % 864e5;
  5346. m = A(f / 36e5) % 24;
  5347. y = A(f / 6e4) % 60;
  5348. j = A(f / 1e3) % 60;
  5349. b = f % 1e3
  5350. } else {
  5351. c = o.getUTCFullYear();
  5352. l = o.getUTCMonth();
  5353. d = o.getUTCDate();
  5354. m = o.getUTCHours();
  5355. y = o.getUTCMinutes();
  5356. j = o.getUTCSeconds();
  5357. b = o.getUTCMilliseconds()
  5358. }
  5359. o = (c <= 0 || c >= 1e4 ? (c < 0 ? "-" : "+") + O(6, c < 0 ? -c : c) : O(4, c)) + "-" + O(2, l + 1) + "-" + O(2, d) + "T" + O(2, m) + ":" + O(2, y) + ":" + O(2, j) + "." + O(3, b) + "Z"
  5360. } else {
  5361. o = null
  5362. }
  5363. } else if (typeof o.toJSON == "function" && (h != w && h != T && h != S || p.call(o, "toJSON"))) {
  5364. o = o.toJSON(t)
  5365. }
  5366. }
  5367. if (i) {
  5368. o = i.call(e, t, o)
  5369. }
  5370. if (o === null) {
  5371. return "null"
  5372. }
  5373. h = _.call(o);
  5374. if (h == x) {
  5375. return "" + o
  5376. } else if (h == w) {
  5377. return o > -1 / 0 && o < 1 / 0 ? "" + o : "null"
  5378. } else if (h == T) {
  5379. return D("" + o)
  5380. }
  5381. if (typeof o == "object") {
  5382. for (M = a.length; M--;) {
  5383. if (a[M] === o) {
  5384. throw u()
  5385. }
  5386. }
  5387. a.push(o);
  5388. L = [];
  5389. C = n;
  5390. n += r;
  5391. if (h == S) {
  5392. for (I = 0, M = o.length; I < M; I++) {
  5393. P = k(I, o, i, s, r, n, a);
  5394. L.push(P === v ? "null" : P)
  5395. }
  5396. N = L.length ? r ? "[\n" + n + L.join(",\n" + n) + "\n" + C + "]" : "[" + L.join(",") + "]" : "[]"
  5397. } else {
  5398. g(s || o, function(t) {
  5399. var e = k(t, o, i, s, r, n, a);
  5400. if (e !== v) {
  5401. L.push(D(t) + ":" + (r ? " " : "") + e)
  5402. }
  5403. });
  5404. N = L.length ? r ? "{\n" + n + L.join(",\n" + n) + "\n" + C + "}" : "{" + L.join(",") + "}" : "{}"
  5405. }
  5406. a.pop();
  5407. return N
  5408. }
  5409. };
  5410. i.stringify = function(t, i, s) {
  5411. var r, n, a, o;
  5412. if (e[typeof i] && i) {
  5413. if ((o = _.call(i)) == b) {
  5414. n = i
  5415. } else if (o == S) {
  5416. a = {};
  5417. for (var h = 0, c = i.length, u; h < c; u = i[h++], (o = _.call(u), o == T || o == w) && (a[u] = 1));
  5418. }
  5419. }
  5420. if (s) {
  5421. if ((o = _.call(s)) == w) {
  5422. if ((s -= s % 1) > 0) {
  5423. for (r = "", s > 10 && (s = 10); r.length < s; r += " ");
  5424. }
  5425. } else if (o == T) {
  5426. r = s.length <= 10 ? s : s.slice(0, 10)
  5427. }
  5428. }
  5429. return k("", (u = {}, u[""] = t, u), n, a, r, "", [])
  5430. }
  5431. }
  5432. if (!j("json-parse")) {
  5433. var N = a.fromCharCode;
  5434. var F = {
  5435. 92: "\\",
  5436. 34: '"',
  5437. 47: "/",
  5438. 98: "\b",
  5439. 116: " ",
  5440. 110: "\n",
  5441. 102: "\f",
  5442. 114: "\r"
  5443. };
  5444. var H, q;
  5445. var X = function() {
  5446. H = q = null;
  5447. throw c()
  5448. };
  5449. var B = function() {
  5450. var t = q,
  5451. e = t.length,
  5452. i, s, r, n, a;
  5453. while (H < e) {
  5454. a = t.charCodeAt(H);
  5455. switch (a) {
  5456. case 9:
  5457. case 10:
  5458. case 13:
  5459. case 32:
  5460. H++;
  5461. break;
  5462. case 123:
  5463. case 125:
  5464. case 91:
  5465. case 93:
  5466. case 58:
  5467. case 44:
  5468. i = L ? t.charAt(H) : t[H];
  5469. H++;
  5470. return i;
  5471. case 34:
  5472. for (i = "@", H++; H < e;) {
  5473. a = t.charCodeAt(H);
  5474. if (a < 32) {
  5475. X()
  5476. } else if (a == 92) {
  5477. a = t.charCodeAt(++H);
  5478. switch (a) {
  5479. case 92:
  5480. case 34:
  5481. case 47:
  5482. case 98:
  5483. case 116:
  5484. case 110:
  5485. case 102:
  5486. case 114:
  5487. i += F[a];
  5488. H++;
  5489. break;
  5490. case 117:
  5491. s = ++H;
  5492. for (r = H + 4; H < r; H++) {
  5493. a = t.charCodeAt(H);
  5494. if (!(a >= 48 && a <= 57 || a >= 97 && a <= 102 || a >= 65 && a <= 70)) {
  5495. X()
  5496. }
  5497. }
  5498. i += N("0x" + t.slice(s, H));
  5499. break;
  5500. default:
  5501. X()
  5502. }
  5503. } else {
  5504. if (a == 34) {
  5505. break
  5506. }
  5507. a = t.charCodeAt(H);
  5508. s = H;
  5509. while (a >= 32 && a != 92 && a != 34) {
  5510. a = t.charCodeAt(++H)
  5511. }
  5512. i += t.slice(s, H)
  5513. }
  5514. }
  5515. if (t.charCodeAt(H) == 34) {
  5516. H++;
  5517. return i
  5518. }
  5519. X();
  5520. default:
  5521. s = H;
  5522. if (a == 45) {
  5523. n = true;
  5524. a = t.charCodeAt(++H)
  5525. }
  5526. if (a >= 48 && a <= 57) {
  5527. if (a == 48 && (a = t.charCodeAt(H + 1), a >= 48 && a <= 57)) {
  5528. X()
  5529. }
  5530. n = false;
  5531. for (; H < e && (a = t.charCodeAt(H), a >= 48 && a <= 57); H++);
  5532. if (t.charCodeAt(H) == 46) {
  5533. r = ++H;
  5534. for (; r < e && (a = t.charCodeAt(r), a >= 48 && a <= 57); r++);
  5535. if (r == H) {
  5536. X()
  5537. }
  5538. H = r
  5539. }
  5540. a = t.charCodeAt(H);
  5541. if (a == 101 || a == 69) {
  5542. a = t.charCodeAt(++H);
  5543. if (a == 43 || a == 45) {
  5544. H++
  5545. }
  5546. for (r = H; r < e && (a = t.charCodeAt(r), a >= 48 && a <= 57); r++);
  5547. if (r == H) {
  5548. X()
  5549. }
  5550. H = r
  5551. }
  5552. return +t.slice(s, H)
  5553. }
  5554. if (n) {
  5555. X()
  5556. }
  5557. if (t.slice(H, H + 4) == "true") {
  5558. H += 4;
  5559. return true
  5560. } else if (t.slice(H, H + 5) == "false") {
  5561. H += 5;
  5562. return false
  5563. } else if (t.slice(H, H + 4) == "null") {
  5564. H += 4;
  5565. return null
  5566. }
  5567. X()
  5568. }
  5569. }
  5570. return "$"
  5571. };
  5572. var U = function(t) {
  5573. var e, i;
  5574. if (t == "$") {
  5575. X()
  5576. }
  5577. if (typeof t == "string") {
  5578. if ((L ? t.charAt(0) : t[0]) == "@") {
  5579. return t.slice(1)
  5580. }
  5581. if (t == "[") {
  5582. e = [];
  5583. for (;; i || (i = true)) {
  5584. t = B();
  5585. if (t == "]") {
  5586. break
  5587. }
  5588. if (i) {
  5589. if (t == ",") {
  5590. t = B();
  5591. if (t == "]") {
  5592. X()
  5593. }
  5594. } else {
  5595. X()
  5596. }
  5597. }
  5598. if (t == ",") {
  5599. X()
  5600. }
  5601. e.push(U(t))
  5602. }
  5603. return e
  5604. } else if (t == "{") {
  5605. e = {};
  5606. for (;; i || (i = true)) {
  5607. t = B();
  5608. if (t == "}") {
  5609. break
  5610. }
  5611. if (i) {
  5612. if (t == ",") {
  5613. t = B();
  5614. if (t == "}") {
  5615. X()
  5616. }
  5617. } else {
  5618. X()
  5619. }
  5620. }
  5621. if (t == "," || typeof t != "string" || (L ? t.charAt(0) : t[0]) != "@" || B() != ":") {
  5622. X()
  5623. }
  5624. e[t.slice(1)] = U(B())
  5625. }
  5626. return e
  5627. }
  5628. X()
  5629. }
  5630. return t
  5631. };
  5632. var Y = function(t, e, i) {
  5633. var s = G(t, e, i);
  5634. if (s === v) {
  5635. delete t[e]
  5636. } else {
  5637. t[e] = s
  5638. }
  5639. };
  5640. var G = function(t, e, i) {
  5641. var s = t[e],
  5642. r;
  5643. if (typeof s == "object" && s) {
  5644. if (_.call(s) == S) {
  5645. for (r = s.length; r--;) {
  5646. Y(s, r, i)
  5647. }
  5648. } else {
  5649. g(s, function(t) {
  5650. Y(s, t, i)
  5651. })
  5652. }
  5653. }
  5654. return i.call(t, e, s)
  5655. };
  5656. i.parse = function(t, e) {
  5657. var i, s;
  5658. H = 0;
  5659. q = "" + t;
  5660. i = U(B());
  5661. if (B() != "$") {
  5662. X()
  5663. }
  5664. H = q = null;
  5665. return e && _.call(e) == b ? G((s = {}, s[""] = i, s), "", e) : i
  5666. }
  5667. }
  5668. }
  5669. i["runInContext"] = n;
  5670. return i
  5671. }
  5672. if (i && !t) {
  5673. n(s, i)
  5674. } else {
  5675. var a = s.JSON,
  5676. o = s["JSON3"],
  5677. h = false;
  5678. var c = n(s, s["JSON3"] = {
  5679. noConflict: function() {
  5680. if (!h) {
  5681. h = true;
  5682. s.JSON = a;
  5683. s["JSON3"] = o;
  5684. a = o = null
  5685. }
  5686. return c
  5687. }
  5688. });
  5689. s.JSON = {
  5690. parse: c.parse,
  5691. stringify: c.stringify
  5692. }
  5693. }
  5694. if (t) {
  5695. define(function() {
  5696. return c
  5697. })
  5698. }
  5699. }).call(this);
  5700. (function() {
  5701. var t = {};
  5702. t.parseXML = function(t, e) {
  5703. var i = null;
  5704. try {
  5705. if (window.DOMParser) {
  5706. var s = new DOMParser;
  5707. i = s.parseFromString(t, e)
  5708. } else {
  5709. i = new ActiveXObject("Microsoft.XMLDOM");
  5710. i.async = false;
  5711. i.loadXML(t)
  5712. }
  5713. } catch (r) {}
  5714. return i
  5715. };
  5716. t.parseJSON = function(t) {
  5717. if (t == null) {
  5718. return null
  5719. }
  5720. try {
  5721. return JSON.parse(t)
  5722. } catch (e) {
  5723. throw e
  5724. }
  5725. };
  5726. createjs.DataUtils = t
  5727. })();
  5728. this.createjs = this.createjs || {};
  5729. (function() {
  5730. "use strict";
  5731. function t() {
  5732. this.src = null;
  5733. this.type = null;
  5734. this.id = null;
  5735. this.maintainOrder = false;
  5736. this.callback = null;
  5737. this.data = null;
  5738. this.method = createjs.LoadItem.GET;
  5739. this.values = null;
  5740. this.headers = null;
  5741. this.withCredentials = false;
  5742. this.mimeType = null;
  5743. this.crossOrigin = null;
  5744. this.loadTimeout = 8e3
  5745. }
  5746. var e = t.prototype = {};
  5747. var i = t;
  5748. i.create = function(e) {
  5749. if (typeof e == "string") {
  5750. var s = new t;
  5751. s.src = e;
  5752. return s
  5753. } else if (e instanceof i) {
  5754. return e
  5755. } else if (e instanceof Object) {
  5756. return e
  5757. } else {
  5758. throw new Error("Type not recognized.")
  5759. }
  5760. };
  5761. e.set = function(t) {
  5762. for (var e in t) {
  5763. this[e] = t[e]
  5764. }
  5765. return this
  5766. };
  5767. createjs.LoadItem = i
  5768. })();
  5769. (function() {
  5770. var t = {};
  5771. t.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i;
  5772. t.RELATIVE_PATT = /^[./]*?\//i;
  5773. t.EXTENSION_PATT = /\/?[^/]+\.(\w{1,5})$/i;
  5774. t.parseURI = function(e) {
  5775. var i = {
  5776. absolute: false,
  5777. relative: false
  5778. };
  5779. if (e == null) {
  5780. return i
  5781. }
  5782. var s = e.indexOf("?");
  5783. if (s > -1) {
  5784. e = e.substr(0, s)
  5785. }
  5786. var r;
  5787. if (t.ABSOLUTE_PATT.test(e)) {
  5788. i.absolute = true
  5789. } else if (t.RELATIVE_PATT.test(e)) {
  5790. i.relative = true
  5791. }
  5792. if (r = e.match(t.EXTENSION_PATT)) {
  5793. i.extension = r[1].toLowerCase()
  5794. }
  5795. return i
  5796. };
  5797. t.formatQueryString = function(t, e) {
  5798. if (t == null) {
  5799. throw new Error("You must specify data.")
  5800. }
  5801. var i = [];
  5802. for (var s in t) {
  5803. i.push(s + "=" + escape(t[s]))
  5804. }
  5805. if (e) {
  5806. i = i.concat(e)
  5807. }
  5808. return i.join("&")
  5809. };
  5810. t.buildPath = function(t, e) {
  5811. if (e == null) {
  5812. return t
  5813. }
  5814. var i = [];
  5815. var s = t.indexOf("?");
  5816. if (s != -1) {
  5817. var r = t.slice(s + 1);
  5818. i = i.concat(r.split("&"))
  5819. }
  5820. if (s != -1) {
  5821. return t.slice(0, s) + "?" + this._formatQueryString(e, i)
  5822. } else {
  5823. return t + "?" + this._formatQueryString(e, i)
  5824. }
  5825. };
  5826. t.isCrossDomain = function(t) {
  5827. var e = document.createElement("a");
  5828. e.href = t.src;
  5829. var i = document.createElement("a");
  5830. i.href = location.href;
  5831. var s = e.hostname != "" && (e.port != i.port || e.protocol != i.protocol || e.hostname != i.hostname);
  5832. return s
  5833. };
  5834. t.isLocal = function(t) {
  5835. var e = document.createElement("a");
  5836. e.href = t.src;
  5837. return e.hostname == "" && e.protocol == "file:"
  5838. };
  5839. t.isBinary = function(t) {
  5840. switch (t) {
  5841. case createjs.AbstractLoader.IMAGE:
  5842. case createjs.AbstractLoader.BINARY:
  5843. return true;
  5844. default:
  5845. return false
  5846. }
  5847. };
  5848. t.isImageTag = function(t) {
  5849. return t instanceof HTMLImageElement
  5850. };
  5851. t.isAudioTag = function(t) {
  5852. if (window.HTMLAudioElement) {
  5853. return t instanceof HTMLAudioElement
  5854. } else {
  5855. return false
  5856. }
  5857. };
  5858. t.isVideoTag = function(t) {
  5859. if (window.HTMLVideoElement) {
  5860. return t instanceof HTMLVideoElement
  5861. } else {
  5862. false
  5863. }
  5864. };
  5865. t.isText = function(t) {
  5866. switch (t) {
  5867. case createjs.AbstractLoader.TEXT:
  5868. case createjs.AbstractLoader.JSON:
  5869. case createjs.AbstractLoader.MANIFEST:
  5870. case createjs.AbstractLoader.XML:
  5871. case createjs.AbstractLoader.CSS:
  5872. case createjs.AbstractLoader.SVG:
  5873. case createjs.AbstractLoader.JAVASCRIPT:
  5874. return true;
  5875. default:
  5876. return false
  5877. }
  5878. };
  5879. t.getTypeByExtension = function(t) {
  5880. if (t == null) {
  5881. return createjs.AbstractLoader.TEXT
  5882. }
  5883. switch (t.toLowerCase()) {
  5884. case "jpeg":
  5885. case "jpg":
  5886. case "gif":
  5887. case "png":
  5888. case "webp":
  5889. case "bmp":
  5890. return createjs.AbstractLoader.IMAGE;
  5891. case "ogg":
  5892. case "mp3":
  5893. case "webm":
  5894. return createjs.AbstractLoader.SOUND;
  5895. case "mp4":
  5896. case "webm":
  5897. case "ts":
  5898. return createjs.AbstractLoader.VIDEO;
  5899. case "json":
  5900. return createjs.AbstractLoader.JSON;
  5901. case "xml":
  5902. return createjs.AbstractLoader.XML;
  5903. case "css":
  5904. return createjs.AbstractLoader.CSS;
  5905. case "libs":
  5906. return createjs.AbstractLoader.JAVASCRIPT;
  5907. case "svg":
  5908. return createjs.AbstractLoader.SVG;
  5909. default:
  5910. return createjs.AbstractLoader.TEXT
  5911. }
  5912. };
  5913. createjs.RequestUtils = t
  5914. })();
  5915. this.createjs = this.createjs || {};
  5916. (function() {
  5917. "use strict";
  5918. function t(t, e, i) {
  5919. this.EventDispatcher_constructor();
  5920. this.loaded = false;
  5921. this.canceled = false;
  5922. this.progress = 0;
  5923. this.type = i;
  5924. this.resultFormatter = null;
  5925. if (t) {
  5926. this._item = createjs.LoadItem.create(t)
  5927. } else {
  5928. this._item = null
  5929. }
  5930. this._preferXHR = e;
  5931. this._result = null;
  5932. this._rawResult = null;
  5933. this._loadedItems = null;
  5934. this._tagSrcAttribute = null;
  5935. this._tag = null
  5936. }
  5937. var e = createjs.extend(t, createjs.EventDispatcher);
  5938. var i = t;
  5939. i.POST = "POST";
  5940. i.GET = "GET";
  5941. i.BINARY = "binary";
  5942. i.CSS = "css";
  5943. i.IMAGE = "image";
  5944. i.JAVASCRIPT = "javascript";
  5945. i.JSON = "json";
  5946. i.JSONP = "jsonp";
  5947. i.MANIFEST = "manifest";
  5948. i.SOUND = "sound";
  5949. i.VIDEO = "video";
  5950. i.SPRITESHEET = "spritesheet";
  5951. i.SVG = "svg";
  5952. i.TEXT = "text";
  5953. i.XML = "xml";
  5954. e.getItem = function() {
  5955. return this._item
  5956. };
  5957. e.getResult = function(t) {
  5958. return t ? this._rawResult : this._result
  5959. };
  5960. e.getTag = function() {
  5961. return this._tag
  5962. };
  5963. e.setTag = function(t) {
  5964. this._tag = t
  5965. };
  5966. e.load = function() {
  5967. this._createRequest();
  5968. this._request.on("complete", this, this);
  5969. this._request.on("progress", this, this);
  5970. this._request.on("loadStart", this, this);
  5971. this._request.on("abort", this, this);
  5972. this._request.on("timeout", this, this);
  5973. this._request.on("error", this, this);
  5974. var t = new createjs.Event("initialize");
  5975. t.loader = this._request;
  5976. this.dispatchEvent(t);
  5977. this._request.load()
  5978. };
  5979. e.cancel = function() {
  5980. this.canceled = true;
  5981. this.destroy()
  5982. };
  5983. e.destroy = function() {
  5984. if (this._request) {
  5985. this._request.removeAllEventListeners();
  5986. this._request.destroy()
  5987. }
  5988. this._request = null;
  5989. this._item = null;
  5990. this._rawResult = null;
  5991. this._result = null;
  5992. this._loadItems = null;
  5993. this.removeAllEventListeners()
  5994. };
  5995. e.getLoadedItems = function() {
  5996. return this._loadedItems
  5997. };
  5998. e._createRequest = function() {
  5999. if (!this._preferXHR) {
  6000. this._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  6001. } else {
  6002. this._request = new createjs.XHRRequest(this._item)
  6003. }
  6004. };
  6005. e._createTag = function(t) {
  6006. return null
  6007. };
  6008. e._sendLoadStart = function() {
  6009. if (this._isCanceled()) {
  6010. return
  6011. }
  6012. this.dispatchEvent("loadstart")
  6013. };
  6014. e._sendProgress = function(t) {
  6015. if (this._isCanceled()) {
  6016. return
  6017. }
  6018. var e = null;
  6019. if (typeof t == "number") {
  6020. this.progress = t;
  6021. e = new createjs.ProgressEvent(this.progress)
  6022. } else {
  6023. e = t;
  6024. this.progress = t.loaded / t.total;
  6025. e.progress = this.progress;
  6026. if (isNaN(this.progress) || this.progress == Infinity) {
  6027. this.progress = 0
  6028. }
  6029. }
  6030. this.hasEventListener("progress") && this.dispatchEvent(e)
  6031. };
  6032. e._sendComplete = function() {
  6033. if (this._isCanceled()) {
  6034. return
  6035. }
  6036. this.loaded = true;
  6037. var t = new createjs.Event("complete");
  6038. t.rawResult = this._rawResult;
  6039. if (this._result != null) {
  6040. t.result = this._result
  6041. }
  6042. this.dispatchEvent(t)
  6043. };
  6044. e._sendError = function(t) {
  6045. if (this._isCanceled() || !this.hasEventListener("error")) {
  6046. return
  6047. }
  6048. if (t == null) {
  6049. t = new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")
  6050. }
  6051. this.dispatchEvent(t)
  6052. };
  6053. e._isCanceled = function() {
  6054. if (window.createjs == null || this.canceled) {
  6055. return true
  6056. }
  6057. return false
  6058. };
  6059. e.resultFormatter = null;
  6060. e.handleEvent = function(t) {
  6061. switch (t.type) {
  6062. case "complete":
  6063. this._rawResult = t.target._response;
  6064. var e = this.resultFormatter && this.resultFormatter(this);
  6065. var i = this;
  6066. if (e instanceof Function) {
  6067. e(function(t) {
  6068. i._result = t;
  6069. i._sendComplete()
  6070. })
  6071. } else {
  6072. this._result = e || this._rawResult;
  6073. this._sendComplete()
  6074. }
  6075. break;
  6076. case "progress":
  6077. this._sendProgress(t);
  6078. break;
  6079. case "error":
  6080. this._sendError(t);
  6081. break;
  6082. case "loadstart":
  6083. this._sendLoadStart();
  6084. break;
  6085. case "abort":
  6086. case "timeout":
  6087. if (!this._isCanceled()) {
  6088. this.dispatchEvent(t.type)
  6089. }
  6090. break
  6091. }
  6092. };
  6093. e.buildPath = function(t, e) {
  6094. return createjs.RequestUtils.buildPath(t, e)
  6095. };
  6096. e.toString = function() {
  6097. return "[PreloadJS AbstractLoader]"
  6098. };
  6099. createjs.AbstractLoader = createjs.promote(t, "EventDispatcher")
  6100. })();
  6101. this.createjs = this.createjs || {};
  6102. (function() {
  6103. "use strict";
  6104. function t(t, e, i) {
  6105. this.AbstractLoader_constructor(t, e, i);
  6106. this.resultFormatter = this._formatResult;
  6107. this._tagSrcAttribute = "src"
  6108. }
  6109. var e = createjs.extend(t, createjs.AbstractLoader);
  6110. e.load = function() {
  6111. if (!this._tag) {
  6112. this._tag = this._createTag(this._item.src)
  6113. }
  6114. this._tag.preload = "auto";
  6115. this._tag.load();
  6116. this.AbstractLoader_load()
  6117. };
  6118. e._createTag = function() {};
  6119. e._createRequest = function() {
  6120. if (!this._preferXHR) {
  6121. this._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  6122. } else {
  6123. this._request = new createjs.XHRRequest(this._item)
  6124. }
  6125. };
  6126. e._formatResult = function(t) {
  6127. this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler);
  6128. this._tag.onstalled = null;
  6129. if (this._preferXHR) {
  6130. t.getTag().src = t.getResult(true)
  6131. }
  6132. return t.getTag()
  6133. };
  6134. createjs.AbstractMediaLoader = createjs.promote(t, "AbstractLoader")
  6135. })();
  6136. this.createjs = this.createjs || {};
  6137. (function() {
  6138. "use strict";
  6139. var t = function(t) {
  6140. this._item = t
  6141. };
  6142. var e = createjs.extend(t, createjs.EventDispatcher);
  6143. e.load = function() {};
  6144. e.destroy = function() {};
  6145. e.cancel = function() {};
  6146. createjs.AbstractRequest = createjs.promote(t, "EventDispatcher")
  6147. })();
  6148. this.createjs = this.createjs || {};
  6149. (function() {
  6150. "use strict";
  6151. function t(t, e, i) {
  6152. this.AbstractRequest_constructor(t);
  6153. this._tag = e;
  6154. this._tagSrcAttribute = i;
  6155. this._loadedHandler = createjs.proxy(this._handleTagComplete, this);
  6156. this._addedToDOM = false;
  6157. this._startTagVisibility = null
  6158. }
  6159. var e = createjs.extend(t, createjs.AbstractRequest);
  6160. e.load = function() {
  6161. if (this._tag.parentNode == null) {
  6162. window.document.body.appendChild(this._tag);
  6163. this._addedToDOM = true
  6164. }
  6165. this._tag.onload = createjs.proxy(this._handleTagComplete, this);
  6166. this._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);
  6167. var t = new createjs.Event("initialize");
  6168. t.loader = this._tag;
  6169. this.dispatchEvent(t);
  6170. this._hideTag();
  6171. this._tag[this._tagSrcAttribute] = this._item.src
  6172. };
  6173. e.destroy = function() {
  6174. this._clean();
  6175. this._tag = null;
  6176. this.AbstractRequest_destroy()
  6177. };
  6178. e._handleReadyStateChange = function() {
  6179. clearTimeout(this._loadTimeout);
  6180. var t = this._tag;
  6181. if (t.readyState == "loaded" || t.readyState == "complete") {
  6182. this._handleTagComplete()
  6183. }
  6184. };
  6185. e._handleTagComplete = function() {
  6186. this._rawResult = this._tag;
  6187. this._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult;
  6188. this._clean();
  6189. this._showTag();
  6190. this.dispatchEvent("complete")
  6191. };
  6192. e._clean = function() {
  6193. this._tag.onload = null;
  6194. this._tag.onreadystatechange = null;
  6195. if (this._addedToDOM && this._tag.parentNode != null) {
  6196. this._tag.parentNode.removeChild(this._tag)
  6197. }
  6198. };
  6199. e._hideTag = function() {
  6200. this._startTagVisibility = this._tag.style.visibility;
  6201. this._tag.style.visibility = "hidden"
  6202. };
  6203. e._showTag = function() {
  6204. this._tag.style.visibility = this._startTagVisibility
  6205. };
  6206. e._handleStalled = function() {};
  6207. createjs.TagRequest = createjs.promote(t, "AbstractRequest")
  6208. })();
  6209. this.createjs = this.createjs || {};
  6210. (function() {
  6211. "use strict";
  6212. function t(t, e, i) {
  6213. this.AbstractRequest_constructor(t);
  6214. this._tag = e;
  6215. this._tagSrcAttribute = i;
  6216. this._loadedHandler = createjs.proxy(this._handleTagComplete, this)
  6217. }
  6218. var e = createjs.extend(t, createjs.TagRequest);
  6219. var i = t;
  6220. e.load = function() {
  6221. this._tag.onstalled = createjs.proxy(this._handleStalled, this);
  6222. this._tag.onprogress = createjs.proxy(this._handleProgress, this);
  6223. this._tag.addEventListener && this._tag.addEventListener("canplaythrough", this._loadedHandler, false);
  6224. this.TagRequest_load()
  6225. };
  6226. e._handleReadyStateChange = function() {
  6227. clearTimeout(this._loadTimeout);
  6228. var t = this._tag;
  6229. if (t.readyState == "loaded" || t.readyState == "complete") {
  6230. this._handleTagComplete()
  6231. }
  6232. };
  6233. e._handleStalled = function() {};
  6234. e._handleProgress = function(t) {
  6235. if (!t || t.loaded > 0 && t.total == 0) {
  6236. return
  6237. }
  6238. var e = new createjs.ProgressEvent(t.loaded, t.total);
  6239. this.dispatchEvent(e)
  6240. };
  6241. e._clean = function() {
  6242. this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler);
  6243. this._tag.onstalled = null;
  6244. this._tag.onprogress = null;
  6245. this.TagRequest__clean()
  6246. };
  6247. createjs.MediaTagRequest = createjs.promote(t, "TagRequest")
  6248. })();
  6249. this.createjs = this.createjs || {};
  6250. (function() {
  6251. "use strict";
  6252. function t(t) {
  6253. this.AbstractRequest_constructor(t);
  6254. this._request = null;
  6255. this._loadTimeout = null;
  6256. this._xhrLevel = 1;
  6257. this._response = null;
  6258. this._rawResponse = null;
  6259. this._canceled = false;
  6260. this._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this);
  6261. this._handleProgressProxy = createjs.proxy(this._handleProgress, this);
  6262. this._handleAbortProxy = createjs.proxy(this._handleAbort, this);
  6263. this._handleErrorProxy = createjs.proxy(this._handleError, this);
  6264. this._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this);
  6265. this._handleLoadProxy = createjs.proxy(this._handleLoad, this);
  6266. this._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this);
  6267. if (!this._createXHR(t)) {}
  6268. }
  6269. var e = createjs.extend(t, createjs.AbstractRequest);
  6270. t.ACTIVEX_VERSIONS = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
  6271. e.getResult = function(t) {
  6272. if (t && this._rawResponse) {
  6273. return this._rawResponse
  6274. }
  6275. return this._response
  6276. };
  6277. e.cancel = function() {
  6278. this.canceled = true;
  6279. this._clean();
  6280. this._request.abort()
  6281. };
  6282. e.load = function() {
  6283. if (this._request == null) {
  6284. this._handleError();
  6285. return
  6286. }
  6287. this._request.addEventListener("loadstart", this._handleLoadStartProxy, false);
  6288. this._request.addEventListener("progress", this._handleProgressProxy, false);
  6289. this._request.addEventListener("abort", this._handleAbortProxy, false);
  6290. this._request.addEventListener("error", this._handleErrorProxy, false);
  6291. this._request.addEventListener("timeout", this._handleTimeoutProxy, false);
  6292. this._request.addEventListener("load", this._handleLoadProxy, false);
  6293. this._request.addEventListener("readystatechange", this._handleReadyStateChangeProxy, false);
  6294. if (this._xhrLevel == 1) {
  6295. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout)
  6296. }
  6297. try {
  6298. if (!this._item.values || this._item.method == createjs.AbstractLoader.GET) {
  6299. this._request.send()
  6300. } else if (this._item.method == createjs.AbstractLoader.POST) {
  6301. this._request.send(createjs.RequestUtils.formatQueryString(this._item.values))
  6302. }
  6303. } catch (t) {
  6304. this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND", null, t))
  6305. }
  6306. };
  6307. e.setResponseType = function(t) {
  6308. this._request.responseType = t
  6309. };
  6310. e.getAllResponseHeaders = function() {
  6311. if (this._request.getAllResponseHeaders instanceof Function) {
  6312. return this._request.getAllResponseHeaders()
  6313. } else {
  6314. return null
  6315. }
  6316. };
  6317. e.getResponseHeader = function(t) {
  6318. if (this._request.getResponseHeader instanceof Function) {
  6319. return this._request.getResponseHeader(t)
  6320. } else {
  6321. return null
  6322. }
  6323. };
  6324. e._handleProgress = function(t) {
  6325. if (!t || t.loaded > 0 && t.total == 0) {
  6326. return
  6327. }
  6328. var e = new createjs.ProgressEvent(t.loaded, t.total);
  6329. this.dispatchEvent(e)
  6330. };
  6331. e._handleLoadStart = function(t) {
  6332. clearTimeout(this._loadTimeout);
  6333. this.dispatchEvent("loadstart")
  6334. };
  6335. e._handleAbort = function(t) {
  6336. this._clean();
  6337. this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED", null, t))
  6338. };
  6339. e._handleError = function(t) {
  6340. this._clean();
  6341. this.dispatchEvent(new createjs.ErrorEvent(t.message))
  6342. };
  6343. e._handleReadyStateChange = function(t) {
  6344. if (this._request.readyState == 4) {
  6345. this._handleLoad()
  6346. }
  6347. };
  6348. e._handleLoad = function(t) {
  6349. if (this.loaded) {
  6350. return
  6351. }
  6352. this.loaded = true;
  6353. var e = this._checkError();
  6354. if (e) {
  6355. this._handleError(e);
  6356. return
  6357. }
  6358. this._response = this._getResponse();
  6359. this._clean();
  6360. this.dispatchEvent(new createjs.Event("complete"))
  6361. };
  6362. e._handleTimeout = function(t) {
  6363. this._clean();
  6364. this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT", null, t))
  6365. };
  6366. e._checkError = function() {
  6367. var t = parseInt(this._request.status);
  6368. switch (t) {
  6369. case 404:
  6370. case 0:
  6371. return new Error(t)
  6372. }
  6373. return null
  6374. };
  6375. e._getResponse = function() {
  6376. if (this._response != null) {
  6377. return this._response
  6378. }
  6379. if (this._request.response != null) {
  6380. return this._request.response
  6381. }
  6382. try {
  6383. if (this._request.responseText != null) {
  6384. return this._request.responseText
  6385. }
  6386. } catch (t) {}
  6387. try {
  6388. if (this._request.responseXML != null) {
  6389. return this._request.responseXML
  6390. }
  6391. } catch (t) {}
  6392. return null
  6393. };
  6394. e._createXHR = function(t) {
  6395. var e = createjs.RequestUtils.isCrossDomain(t);
  6396. var i = {};
  6397. var r = null;
  6398. if (window.XMLHttpRequest) {
  6399. r = new XMLHttpRequest;
  6400. if (e && r.withCredentials === undefined && window.XDomainRequest) {
  6401. r = new XDomainRequest
  6402. }
  6403. } else {
  6404. for (var n = 0, a = s.ACTIVEX_VERSIONS.length; n < a; n++) {
  6405. var o = s.ACTIVEX_VERSIONS[n];
  6406. try {
  6407. r = new ActiveXObject(axVersions);
  6408. break
  6409. } catch (h) {}
  6410. }
  6411. if (r == null) {
  6412. return false
  6413. }
  6414. }
  6415. if (t.mimeType && r.overrideMimeType) {
  6416. r.overrideMimeType(t.mimeType)
  6417. }
  6418. this._xhrLevel = typeof r.responseType === "string" ? 2 : 1;
  6419. var c = null;
  6420. if (t.method == createjs.AbstractLoader.GET) {
  6421. c = createjs.RequestUtils.buildPath(t.src, t.values)
  6422. } else {
  6423. c = t.src
  6424. }
  6425. r.open(t.method || createjs.AbstractLoader.GET, c, true);
  6426. if (e && r instanceof XMLHttpRequest && this._xhrLevel == 1) {
  6427. i["Origin"] = location.origin
  6428. }
  6429. if (t.values && t.method == createjs.AbstractLoader.POST) {
  6430. i["Content-Type"] = "application/x-www-form-urlencoded"
  6431. }
  6432. if (!e && !i["X-Requested-With"]) {
  6433. i["X-Requested-With"] = "XMLHttpRequest"
  6434. }
  6435. if (t.headers) {
  6436. for (var u in t.headers) {
  6437. i[u] = t.headers[u]
  6438. }
  6439. }
  6440. for (u in i) {
  6441. r.setRequestHeader(u, i[u])
  6442. }
  6443. if (r instanceof XMLHttpRequest && t.withCredentials !== undefined) {
  6444. r.withCredentials = t.withCredentials
  6445. }
  6446. this._request = r;
  6447. return true
  6448. };
  6449. e._clean = function() {
  6450. clearTimeout(this._loadTimeout);
  6451. this._request.removeEventListener("loadstart", this._handleLoadStartProxy);
  6452. this._request.removeEventListener("progress", this._handleProgressProxy);
  6453. this._request.removeEventListener("abort", this._handleAbortProxy);
  6454. this._request.removeEventListener("error", this._handleErrorProxy);
  6455. this._request.removeEventListener("timeout", this._handleTimeoutProxy);
  6456. this._request.removeEventListener("load", this._handleLoadProxy);
  6457. this._request.removeEventListener("readystatechange", this._handleReadyStateChangeProxy)
  6458. };
  6459. e.toString = function() {
  6460. return "[PreloadJS XHRRequest]"
  6461. };
  6462. createjs.XHRRequest = createjs.promote(t, "AbstractRequest")
  6463. })();
  6464. this.createjs = this.createjs || {};
  6465. (function() {
  6466. "use strict";
  6467. function t(t, e, i) {
  6468. this.AbstractLoader_constructor();
  6469. this.init(t, e, i)
  6470. }
  6471. var e = createjs.extend(t, createjs.AbstractLoader);
  6472. var i = t;
  6473. e.init = function(t, e, i) {
  6474. this.useXHR = true;
  6475. this.preferXHR = true;
  6476. this._preferXHR = true;
  6477. this.setPreferXHR(t);
  6478. this.stopOnError = false;
  6479. this.maintainScriptOrder = true;
  6480. this.next = null;
  6481. this._paused = false;
  6482. this._basePath = e;
  6483. this._crossOrigin = i;
  6484. this._typeCallbacks = {};
  6485. this._extensionCallbacks = {};
  6486. this._loadStartWasDispatched = false;
  6487. this._maxConnections = 1;
  6488. this._currentlyLoadingScript = null;
  6489. this._currentLoads = [];
  6490. this._loadQueue = [];
  6491. this._loadQueueBackup = [];
  6492. this._loadItemsById = {};
  6493. this._loadItemsBySrc = {};
  6494. this._loadedResults = {};
  6495. this._loadedRawResults = {};
  6496. this._numItems = 0;
  6497. this._numItemsLoaded = 0;
  6498. this._scriptOrder = [];
  6499. this._loadedScripts = [];
  6500. this._lastProgress = NaN;
  6501. this._availableLoaders = [createjs.ImageLoader, createjs.JavaScriptLoader, createjs.CSSLoader, createjs.JSONLoader, createjs.JSONPLoader, createjs.SoundLoader, createjs.ManifestLoader, createjs.SpriteSheetLoader, createjs.XMLLoader, createjs.SVGLoader, createjs.BinaryLoader, createjs.VideoLoader, createjs.TextLoader];
  6502. this._defaultLoaderLength = this._availableLoaders.length
  6503. };
  6504. i.loadTimeout = 8e3;
  6505. i.LOAD_TIMEOUT = 0;
  6506. i.BINARY = createjs.AbstractLoader.BINARY;
  6507. i.CSS = createjs.AbstractLoader.CSS;
  6508. i.IMAGE = createjs.AbstractLoader.IMAGE;
  6509. i.JAVASCRIPT = createjs.AbstractLoader.JAVASCRIPT;
  6510. i.JSON = createjs.AbstractLoader.JSON;
  6511. i.JSONP = createjs.AbstractLoader.JSONP;
  6512. i.MANIFEST = createjs.AbstractLoader.MANIFEST;
  6513. i.SOUND = createjs.AbstractLoader.SOUND;
  6514. i.VIDEO = createjs.AbstractLoader.VIDEO;
  6515. i.SVG = createjs.AbstractLoader.SVG;
  6516. i.TEXT = createjs.AbstractLoader.TEXT;
  6517. i.XML = createjs.AbstractLoader.XML;
  6518. i.POST = createjs.AbstractLoader.POST;
  6519. i.GET = createjs.AbstractLoader.GET;
  6520. e.registerLoader = function(t) {
  6521. if (!t || !t.canLoadItem) {
  6522. throw new Error("loader is of an incorrect type.")
  6523. } else if (this._availableLoaders.indexOf(t) != -1) {
  6524. throw new Error("loader already exists.")
  6525. }
  6526. this._availableLoaders.unshift(t)
  6527. };
  6528. e.unregisterLoader = function(t) {
  6529. var e = this._availableLoaders.indexOf(t);
  6530. if (e != -1 && e < this._defaultLoaderLength - 1) {
  6531. this._availableLoaders.splice(e, 1)
  6532. }
  6533. };
  6534. e.setUseXHR = function(t) {
  6535. return this.setPreferXHR(t)
  6536. };
  6537. e.setPreferXHR = function(t) {
  6538. this.preferXHR = t != false && window.XMLHttpRequest != null;
  6539. return this.preferXHR
  6540. };
  6541. e.removeAll = function() {
  6542. this.remove()
  6543. };
  6544. e.remove = function(t) {
  6545. var e = null;
  6546. if (t && !(t instanceof Array)) {
  6547. e = [t]
  6548. } else if (t) {
  6549. e = t
  6550. } else if (arguments.length > 0) {
  6551. return
  6552. }
  6553. var i = false;
  6554. if (!e) {
  6555. this.close();
  6556. for (var s in this._loadItemsById) {
  6557. this._disposeItem(this._loadItemsById[s])
  6558. }
  6559. this.init(this.preferXHR, this._basePath)
  6560. } else {
  6561. while (e.length) {
  6562. var r = e.pop();
  6563. var n = this.getResult(r);
  6564. for (a = this._loadQueue.length - 1; a >= 0; a--) {
  6565. o = this._loadQueue[a].getItem();
  6566. if (o.id == r || o.src == r) {
  6567. this._loadQueue.splice(a, 1)[0].cancel();
  6568. break
  6569. }
  6570. }
  6571. for (a = this._loadQueueBackup.length - 1; a >= 0; a--) {
  6572. o = this._loadQueueBackup[a].getItem();
  6573. if (o.id == r || o.src == r) {
  6574. this._loadQueueBackup.splice(a, 1)[0].cancel();
  6575. break
  6576. }
  6577. }
  6578. if (n) {
  6579. delete this._loadItemsById[n.id];
  6580. delete this._loadItemsBySrc[n.src];
  6581. this._disposeItem(n)
  6582. } else {
  6583. for (var a = this._currentLoads.length - 1; a >= 0; a--) {
  6584. var o = this._currentLoads[a].getItem();
  6585. if (o.id == r || o.src == r) {
  6586. this._currentLoads.splice(a, 1)[0].cancel();
  6587. i = true;
  6588. break
  6589. }
  6590. }
  6591. }
  6592. }
  6593. if (i) {
  6594. this._loadNext()
  6595. }
  6596. }
  6597. };
  6598. e.reset = function() {
  6599. this.close();
  6600. for (var t in this._loadItemsById) {
  6601. this._disposeItem(this._loadItemsById[t])
  6602. }
  6603. var e = [];
  6604. for (var i = 0, s = this._loadQueueBackup.length; i < s; i++) {
  6605. e.push(this._loadQueueBackup[i].getItem())
  6606. }
  6607. this.loadManifest(e, false)
  6608. };
  6609. e.installPlugin = function(t) {
  6610. if (t == null) {
  6611. return
  6612. }
  6613. if (t.getPreloadHandlers != null) {
  6614. var e = t.getPreloadHandlers();
  6615. e.scope = t;
  6616. if (e.types != null) {
  6617. for (var i = 0, s = e.types.length; i < s; i++) {
  6618. this._typeCallbacks[e.types[i]] = e
  6619. }
  6620. }
  6621. if (e.extensions != null) {
  6622. for (i = 0, s = e.extensions.length; i < s; i++) {
  6623. this._extensionCallbacks[e.extensions[i]] = e
  6624. }
  6625. }
  6626. }
  6627. };
  6628. e.setMaxConnections = function(t) {
  6629. this._maxConnections = t;
  6630. if (!this._paused && this._loadQueue.length > 0) {
  6631. this._loadNext()
  6632. }
  6633. };
  6634. e.loadFile = function(t, e, i) {
  6635. if (t == null) {
  6636. var s = new createjs.ErrorEvent("PRELOAD_NO_FILE");
  6637. this._sendError(s);
  6638. return
  6639. }
  6640. this._addItem(t, null, i);
  6641. if (e !== false) {
  6642. this.setPaused(false)
  6643. } else {
  6644. this.setPaused(true)
  6645. }
  6646. };
  6647. e.loadManifest = function(t, e, s) {
  6648. var r = null;
  6649. var n = null;
  6650. if (t instanceof Array) {
  6651. if (t.length == 0) {
  6652. var a = new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");
  6653. this._sendError(a);
  6654. return
  6655. }
  6656. r = t
  6657. } else if (typeof t === "string") {
  6658. r = [{
  6659. src: t,
  6660. type: i.MANIFEST
  6661. }]
  6662. } else if (typeof t == "object") {
  6663. if (t.src !== undefined) {
  6664. if (t.type == null) {
  6665. t.type = i.MANIFEST
  6666. } else if (t.type != i.MANIFEST) {
  6667. var a = new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");
  6668. this._sendError(a)
  6669. }
  6670. r = [t]
  6671. } else if (t.manifest !== undefined) {
  6672. r = t.manifest;
  6673. n = t.path
  6674. }
  6675. } else {
  6676. var a = new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");
  6677. this._sendError(a);
  6678. return
  6679. }
  6680. for (var o = 0, h = r.length; o < h; o++) {
  6681. this._addItem(r[o], n, s)
  6682. }
  6683. if (e !== false) {
  6684. this.setPaused(false)
  6685. } else {
  6686. this.setPaused(true)
  6687. }
  6688. };
  6689. e.load = function() {
  6690. this.setPaused(false)
  6691. };
  6692. e.getItem = function(t) {
  6693. return this._loadItemsById[t] || this._loadItemsBySrc[t]
  6694. };
  6695. e.getResult = function(t, e) {
  6696. var i = this._loadItemsById[t] || this._loadItemsBySrc[t];
  6697. if (i == null) {
  6698. return null
  6699. }
  6700. var s = i.id;
  6701. if (e && this._loadedRawResults[s]) {
  6702. return this._loadedRawResults[s]
  6703. }
  6704. return this._loadedResults[s]
  6705. };
  6706. e.getItems = function(t) {
  6707. var e = [];
  6708. for (var i = 0, s = this._loadQueueBackup.length; i < s; i++) {
  6709. var r = this._loadQueueBackup[i];
  6710. var n = r.getItem();
  6711. if (t === true && !r.loaded) {
  6712. continue
  6713. }
  6714. e.push({
  6715. item: n,
  6716. result: this.getResult(n.id),
  6717. rawResult: this.getResult(n.id, true)
  6718. })
  6719. }
  6720. return e
  6721. };
  6722. e.setPaused = function(t) {
  6723. this._paused = t;
  6724. if (!this._paused) {
  6725. this._loadNext()
  6726. }
  6727. };
  6728. e.close = function() {
  6729. while (this._currentLoads.length) {
  6730. this._currentLoads.pop().cancel()
  6731. }
  6732. this._scriptOrder.length = 0;
  6733. this._loadedScripts.length = 0;
  6734. this.loadStartWasDispatched = false;
  6735. this._itemCount = 0;
  6736. this._lastProgress = NaN
  6737. };
  6738. e._addItem = function(t, e, i) {
  6739. var s = this._createLoadItem(t, e, i);
  6740. if (s == null) {
  6741. return
  6742. }
  6743. var r = this._createLoader(s);
  6744. if (r != null) {
  6745. s._loader = r;
  6746. this._loadQueue.push(r);
  6747. this._loadQueueBackup.push(r);
  6748. this._numItems++;
  6749. this._updateProgress();
  6750. if (this.maintainScriptOrder && s.type == createjs.LoadQueue.JAVASCRIPT || s.maintainOrder === true) {
  6751. this._scriptOrder.push(s);
  6752. this._loadedScripts.push(null)
  6753. }
  6754. }
  6755. };
  6756. e._createLoadItem = function(t, e, s) {
  6757. var r = createjs.LoadItem.create(t);
  6758. if (r == null) {
  6759. return null
  6760. }
  6761. var n = createjs.RequestUtils.parseURI(r.src);
  6762. if (n.extension) {
  6763. r.ext = n.extension
  6764. }
  6765. if (r.type == null) {
  6766. r.type = createjs.RequestUtils.getTypeByExtension(r.ext)
  6767. }
  6768. var a = "";
  6769. var o = s || this._basePath;
  6770. var h = r.src;
  6771. if (!n.absolute && !n.relative) {
  6772. if (e) {
  6773. a = e;
  6774. var c = createjs.RequestUtils.parseURI(e);
  6775. h = e + h;
  6776. if (o != null && !c.absolute && !c.relative) {
  6777. a = o + a
  6778. }
  6779. } else if (o != null) {
  6780. a = o
  6781. }
  6782. }
  6783. r.src = a + r.src;
  6784. r.path = a;
  6785. if (r.id === undefined || r.id === null || r.id === "") {
  6786. r.id = h
  6787. }
  6788. var u = this._typeCallbacks[r.type] || this._extensionCallbacks[r.ext];
  6789. if (u) {
  6790. var l = u.callback.call(u.scope, r, this);
  6791. if (l === false) {
  6792. return null
  6793. } else if (l === true) {} else if (l != null) {
  6794. r._loader = l
  6795. }
  6796. n = createjs.RequestUtils.parseURI(r.src);
  6797. if (n.extension != null) {
  6798. r.ext = n.extension
  6799. }
  6800. }
  6801. this._loadItemsById[r.id] = r;
  6802. this._loadItemsBySrc[r.src] = r;
  6803. if (r.loadTimeout == null) {
  6804. r.loadTimeout = i.loadTimeout
  6805. }
  6806. if (r.crossOrigin == null) {
  6807. r.crossOrigin = this._crossOrigin
  6808. }
  6809. return r
  6810. };
  6811. e._createLoader = function(t) {
  6812. if (t._loader != null) {
  6813. return t._loader
  6814. }
  6815. var e = this.preferXHR;
  6816. for (var i = 0; i < this._availableLoaders.length; i++) {
  6817. var s = this._availableLoaders[i];
  6818. if (s && s.canLoadItem(t)) {
  6819. return new s(t, e)
  6820. }
  6821. }
  6822. return null
  6823. };
  6824. e._loadNext = function() {
  6825. if (this._paused) {
  6826. return
  6827. }
  6828. if (!this._loadStartWasDispatched) {
  6829. this._sendLoadStart();
  6830. this._loadStartWasDispatched = true
  6831. }
  6832. if (this._numItems == this._numItemsLoaded) {
  6833. this.loaded = true;
  6834. this._sendComplete();
  6835. if (this.next && this.next.load) {
  6836. this.next.load()
  6837. }
  6838. } else {
  6839. this.loaded = false
  6840. }
  6841. for (var t = 0; t < this._loadQueue.length; t++) {
  6842. if (this._currentLoads.length >= this._maxConnections) {
  6843. break
  6844. }
  6845. var e = this._loadQueue[t];
  6846. if (!this._canStartLoad(e)) {
  6847. continue
  6848. }
  6849. this._loadQueue.splice(t, 1);
  6850. t--;
  6851. this._loadItem(e)
  6852. }
  6853. };
  6854. e._loadItem = function(t) {
  6855. t.on("fileload", this._handleFileLoad, this);
  6856. t.on("progress", this._handleProgress, this);
  6857. t.on("complete", this._handleFileComplete, this);
  6858. t.on("error", this._handleError, this);
  6859. t.on("fileerror", this._handleFileError, this);
  6860. this._currentLoads.push(t);
  6861. this._sendFileStart(t.getItem());
  6862. t.load()
  6863. };
  6864. e._handleFileLoad = function(t) {
  6865. t.target = null;
  6866. this.dispatchEvent(t)
  6867. };
  6868. e._handleFileError = function(t) {
  6869. var e = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, t.item);
  6870. this._sendError(e)
  6871. };
  6872. e._handleError = function(t) {
  6873. var e = t.target;
  6874. this._numItemsLoaded++;
  6875. this._finishOrderedItem(e, true);
  6876. this._updateProgress();
  6877. var i = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, e.getItem());
  6878. this._sendError(i);
  6879. if (!this.stopOnError) {
  6880. this._removeLoadItem(e);
  6881. this._loadNext()
  6882. }
  6883. };
  6884. e._handleFileComplete = function(t) {
  6885. var e = t.target;
  6886. var i = e.getItem();
  6887. var s = e.getResult();
  6888. this._loadedResults[i.id] = s;
  6889. var r = e.getResult(true);
  6890. if (r != null && r !== s) {
  6891. this._loadedRawResults[i.id] = r
  6892. }
  6893. this._saveLoadedItems(e);
  6894. this._removeLoadItem(e);
  6895. if (!this._finishOrderedItem(e)) {
  6896. this._processFinishedLoad(i, e)
  6897. }
  6898. };
  6899. e._saveLoadedItems = function(t) {
  6900. var e = t.getLoadedItems();
  6901. if (e === null) {
  6902. return
  6903. }
  6904. for (var i = 0; i < e.length; i++) {
  6905. var s = e[i].item;
  6906. this._loadItemsBySrc[s.src] = s;
  6907. this._loadItemsById[s.id] = s;
  6908. this._loadedResults[s.id] = e[i].result;
  6909. this._loadedRawResults[s.id] = e[i].rawResult
  6910. }
  6911. };
  6912. e._finishOrderedItem = function(t, e) {
  6913. var i = t.getItem();
  6914. if (this.maintainScriptOrder && i.type == createjs.LoadQueue.JAVASCRIPT || i.maintainOrder) {
  6915. if (t instanceof createjs.JavaScriptLoader) {
  6916. this._currentlyLoadingScript = false
  6917. }
  6918. var s = createjs.indexOf(this._scriptOrder, i);
  6919. if (s == -1) {
  6920. return false
  6921. }
  6922. this._loadedScripts[s] = e === true ? true : i;
  6923. this._checkScriptLoadOrder();
  6924. return true
  6925. }
  6926. return false
  6927. };
  6928. e._checkScriptLoadOrder = function() {
  6929. var t = this._loadedScripts.length;
  6930. for (var e = 0; e < t; e++) {
  6931. var i = this._loadedScripts[e];
  6932. if (i === null) {
  6933. break
  6934. }
  6935. if (i === true) {
  6936. continue
  6937. }
  6938. var s = this._loadedResults[i.id];
  6939. if (i.type == createjs.LoadQueue.JAVASCRIPT) {
  6940. (document.body || document.getElementsByTagName("body")[0]).appendChild(s)
  6941. }
  6942. var r = i._loader;
  6943. this._processFinishedLoad(i, r);
  6944. this._loadedScripts[e] = true
  6945. }
  6946. };
  6947. e._processFinishedLoad = function(t, e) {
  6948. this._numItemsLoaded++;
  6949. this._updateProgress();
  6950. this._sendFileComplete(t, e);
  6951. this._loadNext()
  6952. };
  6953. e._canStartLoad = function(t) {
  6954. if (!this.maintainScriptOrder || t.preferXHR) {
  6955. return true
  6956. }
  6957. var e = t.getItem();
  6958. if (e.type != createjs.LoadQueue.JAVASCRIPT) {
  6959. return true
  6960. }
  6961. if (this._currentlyLoadingScript) {
  6962. return false
  6963. }
  6964. var i = this._scriptOrder.indexOf(e);
  6965. var s = 0;
  6966. while (s < i) {
  6967. var r = this._loadedScripts[s];
  6968. if (r == null) {
  6969. return false
  6970. }
  6971. s++
  6972. }
  6973. this._currentlyLoadingScript = true;
  6974. return true
  6975. };
  6976. e._removeLoadItem = function(t) {
  6977. var e = t.getItem();
  6978. delete e._loader;
  6979. var i = this._currentLoads.length;
  6980. for (var s = 0; s < i; s++) {
  6981. if (this._currentLoads[s] == t) {
  6982. this._currentLoads.splice(s, 1);
  6983. break
  6984. }
  6985. }
  6986. };
  6987. e._handleProgress = function(t) {
  6988. var e = t.target;
  6989. this._sendFileProgress(e.getItem(), e.progress);
  6990. this._updateProgress()
  6991. };
  6992. e._updateProgress = function() {
  6993. var t = this._numItemsLoaded / this._numItems;
  6994. var e = this._numItems - this._numItemsLoaded;
  6995. if (e > 0) {
  6996. var i = 0;
  6997. for (var s = 0, r = this._currentLoads.length; s < r; s++) {
  6998. i += this._currentLoads[s].progress
  6999. }
  7000. t += i / e * (e / this._numItems)
  7001. }
  7002. if (this._lastProgress != t) {
  7003. this._sendProgress(t);
  7004. this._lastProgress = t
  7005. }
  7006. };
  7007. e._disposeItem = function(t) {
  7008. delete this._loadedResults[t.id];
  7009. delete this._loadedRawResults[t.id];
  7010. delete this._loadItemsById[t.id];
  7011. delete this._loadItemsBySrc[t.src]
  7012. };
  7013. e._sendFileProgress = function(t, e) {
  7014. if (this._isCanceled()) {
  7015. this._cleanUp();
  7016. return
  7017. }
  7018. if (!this.hasEventListener("fileprogress")) {
  7019. return
  7020. }
  7021. var i = new createjs.Event("fileprogress");
  7022. i.progress = e;
  7023. i.loaded = e;
  7024. i.total = 1;
  7025. i.item = t;
  7026. this.dispatchEvent(i)
  7027. };
  7028. e._sendFileComplete = function(t, e) {
  7029. if (this._isCanceled()) {
  7030. return
  7031. }
  7032. var i = new createjs.Event("fileload");
  7033. i.loader = e;
  7034. i.item = t;
  7035. i.result = this._loadedResults[t.id];
  7036. i.rawResult = this._loadedRawResults[t.id];
  7037. if (t.completeHandler) {
  7038. t.completeHandler(i)
  7039. }
  7040. this.hasEventListener("fileload") && this.dispatchEvent(i)
  7041. };
  7042. e._sendFileStart = function(t) {
  7043. var e = new createjs.Event("filestart");
  7044. e.item = t;
  7045. this.hasEventListener("filestart") && this.dispatchEvent(e)
  7046. };
  7047. e.toString = function() {
  7048. return "[PreloadJS LoadQueue]"
  7049. };
  7050. createjs.LoadQueue = createjs.promote(t, "AbstractLoader")
  7051. })();
  7052. this.createjs = this.createjs || {};
  7053. (function() {
  7054. "use strict";
  7055. function t(t) {
  7056. this.AbstractLoader_constructor(t, true, createjs.AbstractLoader.TEXT)
  7057. }
  7058. var e = createjs.extend(t, createjs.AbstractLoader);
  7059. var i = t;
  7060. i.canLoadItem = function(t) {
  7061. return t.type == createjs.AbstractLoader.TEXT
  7062. };
  7063. createjs.TextLoader = createjs.promote(t, "AbstractLoader")
  7064. })();
  7065. this.createjs = this.createjs || {};
  7066. (function() {
  7067. "use strict";
  7068. function t(t) {
  7069. this.AbstractLoader_constructor(t, true, createjs.AbstractLoader.BINARY);
  7070. this.on("initialize", this._updateXHR, this)
  7071. }
  7072. var e = createjs.extend(t, createjs.AbstractLoader);
  7073. var i = t;
  7074. i.canLoadItem = function(t) {
  7075. return t.type == createjs.AbstractLoader.BINARY
  7076. };
  7077. e._updateXHR = function(t) {
  7078. t.loader.setResponseType("arraybuffer")
  7079. };
  7080. createjs.BinaryLoader = createjs.promote(t, "AbstractLoader")
  7081. })();
  7082. this.createjs = this.createjs || {};
  7083. (function() {
  7084. "use strict";
  7085. function t(t, e) {
  7086. this.AbstractLoader_constructor(t, e, createjs.AbstractLoader.CSS);
  7087. this.resultFormatter = this._formatResult;
  7088. this._tagSrcAttribute = "href";
  7089. if (e) {
  7090. this._tag = document.createElement("style")
  7091. } else {
  7092. this._tag = document.createElement("link")
  7093. }
  7094. this._tag.rel = "stylesheet";
  7095. this._tag.type = "text/css"
  7096. }
  7097. var e = createjs.extend(t, createjs.AbstractLoader);
  7098. var i = t;
  7099. i.canLoadItem = function(t) {
  7100. return t.type == createjs.AbstractLoader.CSS
  7101. };
  7102. e._formatResult = function(t) {
  7103. if (this._preferXHR) {
  7104. var e = t.getTag();
  7105. var i = document.getElementsByTagName("head")[0];
  7106. i.appendChild(e);
  7107. if (e.styleSheet) {
  7108. e.styleSheet.cssText = t.getResult(true)
  7109. } else {
  7110. var s = document.createTextNode(t.getResult(true));
  7111. e.appendChild(s)
  7112. }
  7113. } else {
  7114. e = this._tag
  7115. }
  7116. return e
  7117. };
  7118. createjs.CSSLoader = createjs.promote(t, "AbstractLoader")
  7119. })();
  7120. this.createjs = this.createjs || {};
  7121. (function() {
  7122. "use strict";
  7123. function t(t, e) {
  7124. this.AbstractLoader_constructor(t, e, createjs.AbstractLoader.IMAGE);
  7125. this.resultFormatter = this._formatResult;
  7126. this._tagSrcAttribute = "src";
  7127. if (createjs.RequestUtils.isImageTag(t)) {
  7128. this._tag = t
  7129. } else if (createjs.RequestUtils.isImageTag(t.src)) {
  7130. this._tag = t.src
  7131. } else if (createjs.RequestUtils.isImageTag(t.tag)) {
  7132. this._tag = t.tag
  7133. }
  7134. if (this._tag != null) {
  7135. this._preferXHR = false
  7136. } else {
  7137. this._tag = document.createElement("img")
  7138. }
  7139. this.on("initialize", this._updateXHR, this)
  7140. }
  7141. var e = createjs.extend(t, createjs.AbstractLoader);
  7142. var i = t;
  7143. i.canLoadItem = function(t) {
  7144. return t.type == createjs.AbstractLoader.IMAGE
  7145. };
  7146. e.load = function() {
  7147. if (this._tag.src != "" && this._tag.complete) {
  7148. this._sendComplete();
  7149. return
  7150. }
  7151. var t = this._item.crossOrigin;
  7152. if (t == true) {
  7153. t = "Anonymous"
  7154. }
  7155. if (t != null && !createjs.RequestUtils.isLocal(this._item.src)) {
  7156. this._tag.crossOrigin = t
  7157. }
  7158. this.AbstractLoader_load()
  7159. };
  7160. e._updateXHR = function(t) {
  7161. t.loader.mimeType = "text/plain; charset=x-user-defined-binary";
  7162. if (t.loader.setResponseType) {
  7163. t.loader.setResponseType("blob")
  7164. }
  7165. };
  7166. e._formatResult = function(t) {
  7167. var e = this;
  7168. return function(i) {
  7169. var s = e._tag;
  7170. var r = window.URL || window.webkitURL;
  7171. if (!e._preferXHR) {} else if (r) {
  7172. var n = r.createObjectURL(t.getResult(true));
  7173. s.src = n;
  7174. s.onload = function() {
  7175. r.revokeObjectURL(e.src)
  7176. }
  7177. } else {
  7178. s.src = t.getItem().src
  7179. }
  7180. if (s.complete) {
  7181. i(s)
  7182. } else {
  7183. s.onload = function() {
  7184. i(this)
  7185. }
  7186. }
  7187. }
  7188. };
  7189. createjs.ImageLoader = createjs.promote(t, "AbstractLoader")
  7190. })();
  7191. this.createjs = this.createjs || {};
  7192. (function() {
  7193. "use strict";
  7194. function t(t, e) {
  7195. this.AbstractLoader_constructor(t, e, createjs.AbstractLoader.JAVASCRIPT);
  7196. this.resultFormatter = this._formatResult;
  7197. this._tagSrcAttribute = "src";
  7198. this.setTag(document.createElement("script"))
  7199. }
  7200. var e = createjs.extend(t, createjs.AbstractLoader);
  7201. var i = t;
  7202. i.canLoadItem = function(t) {
  7203. return t.type == createjs.AbstractLoader.JAVASCRIPT
  7204. };
  7205. e._formatResult = function(t) {
  7206. var e = t.getTag();
  7207. if (this._preferXHR) {
  7208. e.text = t.getResult(true)
  7209. }
  7210. return e
  7211. };
  7212. createjs.JavaScriptLoader = createjs.promote(t, "AbstractLoader")
  7213. })();
  7214. this.createjs = this.createjs || {};
  7215. (function() {
  7216. "use strict";
  7217. function t(t) {
  7218. this.AbstractLoader_constructor(t, true, createjs.AbstractLoader.JSON);
  7219. this.resultFormatter = this._formatResult
  7220. }
  7221. var e = createjs.extend(t, createjs.AbstractLoader);
  7222. var i = t;
  7223. i.canLoadItem = function(t) {
  7224. return t.type == createjs.AbstractLoader.JSON && !t._loadAsJSONP
  7225. };
  7226. e._formatResult = function(t) {
  7227. var e = null;
  7228. try {
  7229. e = createjs.DataUtils.parseJSON(t.getResult(true))
  7230. } catch (i) {
  7231. var s = new createjs.ErrorEvent("JSON_FORMAT", null, i);
  7232. this._sendError(s);
  7233. return i
  7234. }
  7235. return e
  7236. };
  7237. createjs.JSONLoader = createjs.promote(t, "AbstractLoader")
  7238. })();
  7239. this.createjs = this.createjs || {};
  7240. (function() {
  7241. "use strict";
  7242. function t(t) {
  7243. this.AbstractLoader_constructor(t, false, createjs.AbstractLoader.JSONP);
  7244. this.setTag(document.createElement("script"));
  7245. this.getTag().type = "text/javascript"
  7246. }
  7247. var e = createjs.extend(t, createjs.AbstractLoader);
  7248. var i = t;
  7249. i.canLoadItem = function(t) {
  7250. return t.type == createjs.AbstractLoader.JSONP || t._loadAsJSONP
  7251. };
  7252. e.cancel = function() {
  7253. this.AbstractLoader_cancel();
  7254. this._dispose()
  7255. };
  7256. e.load = function() {
  7257. if (this._item.callback == null) {
  7258. throw new Error("callback is required for loading JSONP requests.")
  7259. }
  7260. if (window[this._item.callback] != null) {
  7261. throw new Error("JSONP callback '" + this._item.callback + "' already exists on window. You need to specify a different callback or re-name the current one.")
  7262. }
  7263. window[this._item.callback] = createjs.proxy(this._handleLoad, this);
  7264. window.document.body.appendChild(this._tag);
  7265. this._tag.src = this._item.src
  7266. };
  7267. e._handleLoad = function(t) {
  7268. this._result = this._rawResult = t;
  7269. this._sendComplete();
  7270. this._dispose()
  7271. };
  7272. e._dispose = function() {
  7273. window.document.body.removeChild(this._tag);
  7274. delete window[this._item.callback]
  7275. };
  7276. createjs.JSONPLoader = createjs.promote(t, "AbstractLoader")
  7277. })();
  7278. this.createjs = this.createjs || {};
  7279. (function() {
  7280. "use strict";
  7281. function t(t) {
  7282. this.AbstractLoader_constructor(t, null, createjs.AbstractLoader.MANIFEST);
  7283. this._manifestQueue = null
  7284. }
  7285. var e = createjs.extend(t, createjs.AbstractLoader);
  7286. var i = t;
  7287. i.MANIFEST_PROGRESS = .25;
  7288. i.canLoadItem = function(t) {
  7289. return t.type == createjs.AbstractLoader.MANIFEST
  7290. };
  7291. e.load = function() {
  7292. this.AbstractLoader_load()
  7293. };
  7294. e._createRequest = function() {
  7295. var t = this._item.callback;
  7296. if (t != null) {
  7297. this._request = new createjs.JSONPLoader(this._item)
  7298. } else {
  7299. this._request = new createjs.JSONLoader(this._item)
  7300. }
  7301. };
  7302. e.handleEvent = function(t) {
  7303. switch (t.type) {
  7304. case "complete":
  7305. this._rawResult = t.target.getResult(true);
  7306. this._result = t.target.getResult();
  7307. this._sendProgress(i.MANIFEST_PROGRESS);
  7308. this._loadManifest(this._result);
  7309. return;
  7310. case "progress":
  7311. t.loaded *= i.MANIFEST_PROGRESS;
  7312. this.progress = t.loaded / t.total;
  7313. if (isNaN(this.progress) || this.progress == Infinity) {
  7314. this.progress = 0
  7315. }
  7316. this._sendProgress(t);
  7317. return
  7318. }
  7319. this.AbstractLoader_handleEvent(t)
  7320. };
  7321. e.destroy = function() {
  7322. this.AbstractLoader_destroy();
  7323. this._manifestQueue.close()
  7324. };
  7325. e._loadManifest = function(t) {
  7326. if (t && t.manifest) {
  7327. var e = this._manifestQueue = new createjs.LoadQueue;
  7328. e.on("fileload", this._handleManifestFileLoad, this);
  7329. e.on("progress", this._handleManifestProgress, this);
  7330. e.on("complete", this._handleManifestComplete, this, true);
  7331. e.on("error", this._handleManifestError, this, true);
  7332. e.loadManifest(t)
  7333. } else {
  7334. this._sendComplete()
  7335. }
  7336. };
  7337. e._handleManifestFileLoad = function(t) {
  7338. t.target = null;
  7339. this.dispatchEvent(t)
  7340. };
  7341. e._handleManifestComplete = function(t) {
  7342. this._loadedItems = this._manifestQueue.getItems(true);
  7343. this._sendComplete()
  7344. };
  7345. e._handleManifestProgress = function(t) {
  7346. this.progress = t.progress * (1 - i.MANIFEST_PROGRESS) + i.MANIFEST_PROGRESS;
  7347. this._sendProgress(this.progress)
  7348. };
  7349. e._handleManifestError = function(t) {
  7350. var e = new createjs.Event("fileerror");
  7351. e.item = t.data;
  7352. this.dispatchEvent(e)
  7353. };
  7354. createjs.ManifestLoader = createjs.promote(t, "AbstractLoader")
  7355. })();
  7356. this.createjs = this.createjs || {};
  7357. (function() {
  7358. "use strict";
  7359. function t(t, e) {
  7360. this.AbstractMediaLoader_constructor(t, e, createjs.AbstractLoader.SOUND);
  7361. if (createjs.RequestUtils.isAudioTag(t)) {
  7362. this._tag = t
  7363. } else if (createjs.RequestUtils.isAudioTag(t.src)) {
  7364. this._tag = t
  7365. } else if (createjs.RequestUtils.isAudioTag(t.tag)) {
  7366. this._tag = createjs.RequestUtils.isAudioTag(t) ? t : t.src
  7367. }
  7368. if (this._tag != null) {
  7369. this._preferXHR = false
  7370. }
  7371. }
  7372. var e = createjs.extend(t, createjs.AbstractMediaLoader);
  7373. var i = t;
  7374. i.canLoadItem = function(t) {
  7375. return t.type == createjs.AbstractLoader.SOUND
  7376. };
  7377. e._createTag = function(t) {
  7378. var e = document.createElement("audio");
  7379. e.autoplay = false;
  7380. e.preload = "none";
  7381. e.src = t;
  7382. return e
  7383. };
  7384. createjs.SoundLoader = createjs.promote(t, "AbstractMediaLoader")
  7385. })();
  7386. this.createjs = this.createjs || {};
  7387. (function() {
  7388. "use strict";
  7389. function t(t, e) {
  7390. this.AbstractMediaLoader_constructor(t, e, createjs.AbstractLoader.VIDEO);
  7391. if (createjs.RequestUtils.isVideoTag(t) || createjs.RequestUtils.isVideoTag(t.src)) {
  7392. this.setTag(createjs.RequestUtils.isVideoTag(t) ? t : t.src);
  7393. this._preferXHR = false
  7394. } else {
  7395. this.setTag(this._createTag())
  7396. }
  7397. }
  7398. var e = createjs.extend(t, createjs.AbstractMediaLoader);
  7399. var i = t;
  7400. e._createTag = function() {
  7401. return document.createElement("video")
  7402. };
  7403. i.canLoadItem = function(t) {
  7404. return t.type == createjs.AbstractLoader.VIDEO
  7405. };
  7406. createjs.VideoLoader = createjs.promote(t, "AbstractMediaLoader")
  7407. })();
  7408. this.createjs = this.createjs || {};
  7409. (function() {
  7410. "use strict";
  7411. function t(t) {
  7412. this.AbstractLoader_constructor(t, null, createjs.AbstractLoader.SPRITESHEET);
  7413. this._parentPath = t.path;
  7414. this._manifestQueue = null
  7415. }
  7416. var e = createjs.extend(t, createjs.AbstractLoader);
  7417. var i = t;
  7418. i.SPRITESHEET_PROGRESS = .25;
  7419. i.canLoadItem = function(t) {
  7420. return t.type == createjs.AbstractLoader.SPRITESHEET
  7421. };
  7422. e.destroy = function() {
  7423. this.AbstractLoader_destroy;
  7424. this._manifestQueue.close()
  7425. };
  7426. e._createRequest = function() {
  7427. var t = this._item.callback;
  7428. if (t != null && t instanceof Function) {
  7429. this._request = new createjs.JSONPLoader(this._item)
  7430. } else {
  7431. this._request = new createjs.JSONLoader(this._item)
  7432. }
  7433. };
  7434. e.handleEvent = function(t) {
  7435. switch (t.type) {
  7436. case "complete":
  7437. this._rawResult = t.target.getResult(true);
  7438. this._result = t.target.getResult();
  7439. this._sendProgress(i.SPRITESHEET_PROGRESS);
  7440. this._loadManifest(this._result);
  7441. return;
  7442. case "progress":
  7443. t.loaded *= i.SPRITESHEET_PROGRESS;
  7444. this.progress = t.loaded / t.total;
  7445. if (isNaN(this.progress) || this.progress == Infinity) {
  7446. this.progress = 0
  7447. }
  7448. this._sendProgress(t);
  7449. return
  7450. }
  7451. this.AbstractLoader_handleEvent(t)
  7452. };
  7453. e._loadManifest = function(t) {
  7454. if (t && t.images) {
  7455. for (var e = 0; e < t.images.length; e++) {
  7456. t.images[e] = this._parentPath + t.images[e]
  7457. }
  7458. var i = this._manifestQueue = new createjs.LoadQueue;
  7459. i.on("complete", this._handleManifestComplete, this, true);
  7460. i.on("fileload", this._handleManifestFileLoad, this);
  7461. i.on("progress", this._handleManifestProgress, this);
  7462. i.on("error", this._handleManifestError, this, true);
  7463. i.loadManifest(t.images)
  7464. }
  7465. };
  7466. e._handleManifestFileLoad = function(t) {
  7467. var e = t.result;
  7468. if (e != null) {
  7469. var i = this.getResult().images;
  7470. var s = i.indexOf(t.item.src);
  7471. i[s] = e
  7472. }
  7473. };
  7474. e._handleManifestComplete = function(t) {
  7475. this._result = new createjs.SpriteSheet(this._result);
  7476. this._loadedItems = this._manifestQueue.getItems(true);
  7477. this._sendComplete()
  7478. };
  7479. e._handleManifestProgress = function(t) {
  7480. this.progress = t.progress * (1 - i.SPRITESHEET_PROGRESS) + i.SPRITESHEET_PROGRESS;
  7481. this._sendProgress(this.progress)
  7482. };
  7483. e._handleManifestError = function(t) {
  7484. var e = new createjs.Event("fileerror");
  7485. e.item = t.data;
  7486. this.dispatchEvent(e)
  7487. };
  7488. createjs.SpriteSheetLoader = createjs.promote(t, "AbstractLoader")
  7489. })();
  7490. this.createjs = this.createjs || {};
  7491. (function() {
  7492. "use strict";
  7493. function t(t, e) {
  7494. this.AbstractLoader_constructor(t, e, createjs.AbstractLoader.SVG);
  7495. this.resultFormatter = this._formatResult;
  7496. this._tagSrcAttribute = "data";
  7497. if (e) {
  7498. this.setTag(document.createElement("svg"))
  7499. } else {
  7500. this.setTag(document.createElement("object"));
  7501. this.getTag().type = "image/svg+xml"
  7502. }
  7503. this.getTag().style.visibility = "hidden"
  7504. }
  7505. var e = createjs.extend(t, createjs.AbstractLoader);
  7506. var i = t;
  7507. i.canLoadItem = function(t) {
  7508. return t.type == createjs.AbstractLoader.SVG
  7509. };
  7510. e._formatResult = function(t) {
  7511. var e = createjs.DataUtils.parseXML(t.getResult(true), "text/xml");
  7512. var i = t.getTag();
  7513. if (!this._preferXHR && document.body.contains(i)) {
  7514. document.body.removeChild(i)
  7515. }
  7516. if (e.documentElement != null) {
  7517. i.appendChild(e.documentElement);
  7518. i.style.visibility = "visible";
  7519. return i
  7520. } else {
  7521. return e
  7522. }
  7523. };
  7524. createjs.SVGLoader = createjs.promote(t, "AbstractLoader")
  7525. })();
  7526. this.createjs = this.createjs || {};
  7527. (function() {
  7528. "use strict";
  7529. function t(t) {
  7530. this.AbstractLoader_constructor(t, true, createjs.AbstractLoader.XML);
  7531. this.resultFormatter = this._formatResult
  7532. }
  7533. var e = createjs.extend(t, createjs.AbstractLoader);
  7534. var i = t;
  7535. i.canLoadItem = function(t) {
  7536. return t.type == createjs.AbstractLoader.XML
  7537. };
  7538. e._formatResult = function(t) {
  7539. return createjs.DataUtils.parseXML(t.getResult(true), "text/xml")
  7540. };
  7541. createjs.XMLLoader = createjs.promote(t, "AbstractLoader")
  7542. })();
  7543. this.createjs = this.createjs || {};
  7544. (function() {
  7545. var t = createjs.SoundJS = createjs.SoundJS || {};
  7546. t.version = "0.6.0";
  7547. t.buildDate = "Thu, 11 Dec 2014 23:32:09 GMT"
  7548. })();
  7549. this.createjs = this.createjs || {};
  7550. createjs.extend = function(t, e) {
  7551. "use strict";
  7552. function i() {
  7553. this.constructor = t
  7554. }
  7555. i.prototype = e.prototype;
  7556. return t.prototype = new i
  7557. };
  7558. this.createjs = this.createjs || {};
  7559. createjs.promote = function(t, e) {
  7560. "use strict";
  7561. var i = t.prototype,
  7562. s = Object.getPrototypeOf && Object.getPrototypeOf(i) || i.__proto__;
  7563. if (s) {
  7564. i[(e += "_") + "constructor"] = s.constructor;
  7565. for (var r in s) {
  7566. if (i.hasOwnProperty(r) && typeof s[r] == "function") {
  7567. i[e + r] = s[r]
  7568. }
  7569. }
  7570. }
  7571. return t
  7572. };
  7573. this.createjs = this.createjs || {};
  7574. createjs.indexOf = function(t, e) {
  7575. "use strict";
  7576. for (var i = 0, s = t.length; i < s; i++) {
  7577. if (e === t[i]) {
  7578. return i
  7579. }
  7580. }
  7581. return -1
  7582. };
  7583. this.createjs = this.createjs || {};
  7584. (function() {
  7585. "use strict";
  7586. createjs.proxy = function(t, e) {
  7587. var i = Array.prototype.slice.call(arguments, 2);
  7588. return function() {
  7589. return t.apply(e, Array.prototype.slice.call(arguments, 0).concat(i))
  7590. }
  7591. }
  7592. })();
  7593. this.createjs = this.createjs || {};
  7594. (function() {
  7595. "use strict";
  7596. var t = Object.defineProperty ? true : false;
  7597. var e = {};
  7598. try {
  7599. Object.defineProperty(e, "bar", {
  7600. get: function() {
  7601. return this._bar
  7602. },
  7603. set: function(t) {
  7604. this._bar = t
  7605. }
  7606. })
  7607. } catch (i) {
  7608. t = false
  7609. }
  7610. createjs.definePropertySupported = t
  7611. })();
  7612. this.createjs = this.createjs || {};
  7613. (function() {
  7614. "use strict";
  7615. function t() {
  7616. throw "BrowserDetect cannot be instantiated"
  7617. }
  7618. var e = t.agent = window.navigator.userAgent;
  7619. t.isWindowPhone = e.indexOf("IEMobile") > -1 || e.indexOf("Windows Phone") > -1;
  7620. t.isFirefox = e.indexOf("Firefox") > -1;
  7621. t.isOpera = window.opera != null;
  7622. t.isChrome = e.indexOf("Chrome") > -1;
  7623. t.isIOS = (e.indexOf("iPod") > -1 || e.indexOf("iPhone") > -1 || e.indexOf("iPad") > -1) && !t.isWindowPhone;
  7624. t.isAndroid = e.indexOf("Android") > -1 && !t.isWindowPhone;
  7625. t.isBlackberry = e.indexOf("Blackberry") > -1;
  7626. createjs.BrowserDetect = t
  7627. })();
  7628. this.createjs = this.createjs || {};
  7629. (function() {
  7630. "use strict";
  7631. function t() {
  7632. this._listeners = null;
  7633. this._captureListeners = null
  7634. }
  7635. var e = t.prototype;
  7636. t.initialize = function(t) {
  7637. t.addEventListener = e.addEventListener;
  7638. t.on = e.on;
  7639. t.removeEventListener = t.off = e.removeEventListener;
  7640. t.removeAllEventListeners = e.removeAllEventListeners;
  7641. t.hasEventListener = e.hasEventListener;
  7642. t.dispatchEvent = e.dispatchEvent;
  7643. t._dispatchEvent = e._dispatchEvent;
  7644. t.willTrigger = e.willTrigger
  7645. };
  7646. e.addEventListener = function(t, e, i) {
  7647. var s;
  7648. if (i) {
  7649. s = this._captureListeners = this._captureListeners || {}
  7650. } else {
  7651. s = this._listeners = this._listeners || {}
  7652. }
  7653. var r = s[t];
  7654. if (r) {
  7655. this.removeEventListener(t, e, i)
  7656. }
  7657. r = s[t];
  7658. if (!r) {
  7659. s[t] = [e]
  7660. } else {
  7661. r.push(e)
  7662. }
  7663. return e
  7664. };
  7665. e.on = function(t, e, i, s, r, n) {
  7666. if (e.handleEvent) {
  7667. i = i || e;
  7668. e = e.handleEvent
  7669. }
  7670. i = i || this;
  7671. return this.addEventListener(t, function(t) {
  7672. e.call(i, t, r);
  7673. s && t.remove()
  7674. }, n)
  7675. };
  7676. e.removeEventListener = function(t, e, i) {
  7677. var s = i ? this._captureListeners : this._listeners;
  7678. if (!s) {
  7679. return
  7680. }
  7681. var r = s[t];
  7682. if (!r) {
  7683. return
  7684. }
  7685. for (var n = 0, a = r.length; n < a; n++) {
  7686. if (r[n] == e) {
  7687. if (a == 1) {
  7688. delete s[t]
  7689. } else {
  7690. r.splice(n, 1)
  7691. }
  7692. break
  7693. }
  7694. }
  7695. };
  7696. e.off = e.removeEventListener;
  7697. e.removeAllEventListeners = function(t) {
  7698. if (!t) {
  7699. this._listeners = this._captureListeners = null
  7700. } else {
  7701. if (this._listeners) {
  7702. delete this._listeners[t]
  7703. }
  7704. if (this._captureListeners) {
  7705. delete this._captureListeners[t]
  7706. }
  7707. }
  7708. };
  7709. e.dispatchEvent = function(t) {
  7710. if (typeof t == "string") {
  7711. var e = this._listeners;
  7712. if (!e || !e[t]) {
  7713. return false
  7714. }
  7715. t = new createjs.Event(t)
  7716. } else if (t.target && t.clone) {
  7717. t = t.clone()
  7718. }
  7719. try {
  7720. t.target = this
  7721. } catch (i) {}
  7722. if (!t.bubbles || !this.parent) {
  7723. this._dispatchEvent(t, 2)
  7724. } else {
  7725. var s = this,
  7726. r = [s];
  7727. while (s.parent) {
  7728. r.push(s = s.parent)
  7729. }
  7730. var n, a = r.length;
  7731. for (n = a - 1; n >= 0 && !t.propagationStopped; n--) {
  7732. r[n]._dispatchEvent(t, 1 + (n == 0))
  7733. }
  7734. for (n = 1; n < a && !t.propagationStopped; n++) {
  7735. r[n]._dispatchEvent(t, 3)
  7736. }
  7737. }
  7738. return t.defaultPrevented
  7739. };
  7740. e.hasEventListener = function(t) {
  7741. var e = this._listeners,
  7742. i = this._captureListeners;
  7743. return !!(e && e[t] || i && i[t])
  7744. };
  7745. e.willTrigger = function(t) {
  7746. var e = this;
  7747. while (e) {
  7748. if (e.hasEventListener(t)) {
  7749. return true
  7750. }
  7751. e = e.parent
  7752. }
  7753. return false
  7754. };
  7755. e.toString = function() {
  7756. return "[EventDispatcher]"
  7757. };
  7758. e._dispatchEvent = function(t, e) {
  7759. var i, s = e == 1 ? this._captureListeners : this._listeners;
  7760. if (t && s) {
  7761. var r = s[t.type];
  7762. if (!r || !(i = r.length)) {
  7763. return
  7764. }
  7765. try {
  7766. t.currentTarget = this
  7767. } catch (n) {}
  7768. try {
  7769. t.eventPhase = e
  7770. } catch (n) {}
  7771. t.removed = false;
  7772. r = r.slice();
  7773. for (var a = 0; a < i && !t.immediatePropagationStopped; a++) {
  7774. var o = r[a];
  7775. if (o.handleEvent) {
  7776. o.handleEvent(t)
  7777. } else {
  7778. o(t)
  7779. }
  7780. if (t.removed) {
  7781. this.off(t.type, o, e == 1);
  7782. t.removed = false
  7783. }
  7784. }
  7785. }
  7786. };
  7787. createjs.EventDispatcher = t
  7788. })();
  7789. this.createjs = this.createjs || {};
  7790. (function() {
  7791. "use strict";
  7792. function t(t, e, i) {
  7793. this.type = t;
  7794. this.target = null;
  7795. this.currentTarget = null;
  7796. this.eventPhase = 0;
  7797. this.bubbles = !! e;
  7798. this.cancelable = !! i;
  7799. this.timeStamp = (new Date).getTime();
  7800. this.defaultPrevented = false;
  7801. this.propagationStopped = false;
  7802. this.immediatePropagationStopped = false;
  7803. this.removed = false
  7804. }
  7805. var e = t.prototype;
  7806. e.preventDefault = function() {
  7807. this.defaultPrevented = this.cancelable && true
  7808. };
  7809. e.stopPropagation = function() {
  7810. this.propagationStopped = true
  7811. };
  7812. e.stopImmediatePropagation = function() {
  7813. this.immediatePropagationStopped = this.propagationStopped = true
  7814. };
  7815. e.remove = function() {
  7816. this.removed = true
  7817. };
  7818. e.clone = function() {
  7819. return new t(this.type, this.bubbles, this.cancelable)
  7820. };
  7821. e.set = function(t) {
  7822. for (var e in t) {
  7823. this[e] = t[e]
  7824. }
  7825. return this
  7826. };
  7827. e.toString = function() {
  7828. return "[Event (type=" + this.type + ")]"
  7829. };
  7830. createjs.Event = t
  7831. })();
  7832. this.createjs = this.createjs || {};
  7833. (function() {
  7834. "use strict";
  7835. function t(t, e, i) {
  7836. this.Event_constructor("error");
  7837. this.title = t;
  7838. this.message = e;
  7839. this.data = i
  7840. }
  7841. var e = createjs.extend(t, createjs.Event);
  7842. e.clone = function() {
  7843. return new createjs.ErrorEvent(this.title, this.message, this.data)
  7844. };
  7845. createjs.ErrorEvent = createjs.promote(t, "Event")
  7846. })();
  7847. this.createjs = this.createjs || {};
  7848. (function(t) {
  7849. "use strict";
  7850. function e(t, e) {
  7851. this.Event_constructor("progress");
  7852. this.loaded = t;
  7853. this.total = e == null ? 1 : e;
  7854. this.progress = e == 0 ? 0 : this.loaded / this.total
  7855. }
  7856. var i = createjs.extend(e, createjs.Event);
  7857. i.clone = function() {
  7858. return new createjs.ProgressEvent(this.loaded, this.total)
  7859. };
  7860. createjs.ProgressEvent = createjs.promote(e, "Event")
  7861. })(window);
  7862. this.createjs = this.createjs || {};
  7863. (function() {
  7864. "use strict";
  7865. function t() {
  7866. this.src = null;
  7867. this.type = null;
  7868. this.id = null;
  7869. this.maintainOrder = false;
  7870. this.callback = null;
  7871. this.data = null;
  7872. this.method = createjs.LoadItem.GET;
  7873. this.values = null;
  7874. this.headers = null;
  7875. this.withCredentials = false;
  7876. this.mimeType = null;
  7877. this.crossOrigin = "Anonymous";
  7878. this.loadTimeout = 8e3
  7879. }
  7880. var e = t.prototype = {};
  7881. var i = t;
  7882. i.create = function(e) {
  7883. if (typeof e == "string") {
  7884. var s = new t;
  7885. s.src = e;
  7886. return s
  7887. } else if (e instanceof i) {
  7888. return e
  7889. } else if (e instanceof Object) {
  7890. return e
  7891. } else {
  7892. throw new Error("Type not recognized.")
  7893. }
  7894. };
  7895. e.set = function(t) {
  7896. for (var e in t) {
  7897. this[e] = t[e]
  7898. }
  7899. return this
  7900. };
  7901. createjs.LoadItem = i
  7902. })();
  7903. (function() {
  7904. var t = {};
  7905. t.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i;
  7906. t.RELATIVE_PATT = /^[./]*?\//i;
  7907. t.EXTENSION_PATT = /\/?[^/]+\.(\w{1,5})$/i;
  7908. t.parseURI = function(e) {
  7909. var i = {
  7910. absolute: false,
  7911. relative: false
  7912. };
  7913. if (e == null) {
  7914. return i
  7915. }
  7916. var s = e.indexOf("?");
  7917. if (s > -1) {
  7918. e = e.substr(0, s)
  7919. }
  7920. var r;
  7921. if (t.ABSOLUTE_PATT.test(e)) {
  7922. i.absolute = true
  7923. } else if (t.RELATIVE_PATT.test(e)) {
  7924. i.relative = true
  7925. }
  7926. if (r = e.match(t.EXTENSION_PATT)) {
  7927. i.extension = r[1].toLowerCase()
  7928. }
  7929. return i
  7930. };
  7931. t.formatQueryString = function(t, e) {
  7932. if (t == null) {
  7933. throw new Error("You must specify data.")
  7934. }
  7935. var i = [];
  7936. for (var s in t) {
  7937. i.push(s + "=" + escape(t[s]))
  7938. }
  7939. if (e) {
  7940. i = i.concat(e)
  7941. }
  7942. return i.join("&")
  7943. };
  7944. t.buildPath = function(t, e) {
  7945. if (e == null) {
  7946. return t
  7947. }
  7948. var i = [];
  7949. var s = t.indexOf("?");
  7950. if (s != -1) {
  7951. var r = t.slice(s + 1);
  7952. i = i.concat(r.split("&"))
  7953. }
  7954. if (s != -1) {
  7955. return t.slice(0, s) + "?" + this._formatQueryString(e, i)
  7956. } else {
  7957. return t + "?" + this._formatQueryString(e, i)
  7958. }
  7959. };
  7960. t.isCrossDomain = function(t) {
  7961. var e = document.createElement("a");
  7962. e.href = t.src;
  7963. var i = document.createElement("a");
  7964. i.href = location.href;
  7965. var s = e.hostname != "" && (e.port != i.port || e.protocol != i.protocol || e.hostname != i.hostname);
  7966. return s
  7967. };
  7968. t.isLocal = function(t) {
  7969. var e = document.createElement("a");
  7970. e.href = t.src;
  7971. return e.hostname == "" && e.protocol == "file:"
  7972. };
  7973. t.isBinary = function(t) {
  7974. switch (t) {
  7975. case createjs.AbstractLoader.IMAGE:
  7976. case createjs.AbstractLoader.BINARY:
  7977. return true;
  7978. default:
  7979. return false
  7980. }
  7981. };
  7982. t.isImageTag = function(t) {
  7983. return t instanceof HTMLImageElement
  7984. };
  7985. t.isAudioTag = function(t) {
  7986. if (window.HTMLAudioElement) {
  7987. return t instanceof HTMLAudioElement
  7988. } else {
  7989. return false
  7990. }
  7991. };
  7992. t.isVideoTag = function(t) {
  7993. if (window.HTMLVideoElement) {
  7994. return t instanceof HTMLVideoElement
  7995. } else {
  7996. false
  7997. }
  7998. };
  7999. t.isText = function(t) {
  8000. switch (t) {
  8001. case createjs.AbstractLoader.TEXT:
  8002. case createjs.AbstractLoader.JSON:
  8003. case createjs.AbstractLoader.MANIFEST:
  8004. case createjs.AbstractLoader.XML:
  8005. case createjs.AbstractLoader.CSS:
  8006. case createjs.AbstractLoader.SVG:
  8007. case createjs.AbstractLoader.JAVASCRIPT:
  8008. return true;
  8009. default:
  8010. return false
  8011. }
  8012. };
  8013. t.getTypeByExtension = function(t) {
  8014. if (t == null) {
  8015. return createjs.AbstractLoader.TEXT
  8016. }
  8017. switch (t.toLowerCase()) {
  8018. case "jpeg":
  8019. case "jpg":
  8020. case "gif":
  8021. case "png":
  8022. case "webp":
  8023. case "bmp":
  8024. return createjs.AbstractLoader.IMAGE;
  8025. case "ogg":
  8026. case "mp3":
  8027. case "webm":
  8028. return createjs.AbstractLoader.SOUND;
  8029. case "mp4":
  8030. case "webm":
  8031. case "ts":
  8032. return createjs.AbstractLoader.VIDEO;
  8033. case "json":
  8034. return createjs.AbstractLoader.JSON;
  8035. case "xml":
  8036. return createjs.AbstractLoader.XML;
  8037. case "css":
  8038. return createjs.AbstractLoader.CSS;
  8039. case "js":
  8040. return createjs.AbstractLoader.JAVASCRIPT;
  8041. case "svg":
  8042. return createjs.AbstractLoader.SVG;
  8043. default:
  8044. return createjs.AbstractLoader.TEXT
  8045. }
  8046. };
  8047. createjs.RequestUtils = t
  8048. })();
  8049. this.createjs = this.createjs || {};
  8050. (function() {
  8051. "use strict";
  8052. function t(t, e, i) {
  8053. this.EventDispatcher_constructor();
  8054. this.loaded = false;
  8055. this.canceled = false;
  8056. this.progress = 0;
  8057. this.type = i;
  8058. this.resultFormatter = null;
  8059. if (t) {
  8060. this._item = createjs.LoadItem.create(t)
  8061. } else {
  8062. this._item = null
  8063. }
  8064. this._preferXHR = e;
  8065. this._result = null;
  8066. this._rawResult = null;
  8067. this._loadedItems = null;
  8068. this._tagSrcAttribute = null;
  8069. this._tag = null
  8070. }
  8071. var e = createjs.extend(t, createjs.EventDispatcher);
  8072. var i = t;
  8073. i.POST = "POST";
  8074. i.GET = "GET";
  8075. i.BINARY = "binary";
  8076. i.CSS = "css";
  8077. i.IMAGE = "image";
  8078. i.JAVASCRIPT = "javascript";
  8079. i.JSON = "json";
  8080. i.JSONP = "jsonp";
  8081. i.MANIFEST = "manifest";
  8082. i.SOUND = "sound";
  8083. i.VIDEO = "video";
  8084. i.SPRITESHEET = "spritesheet";
  8085. i.SVG = "svg";
  8086. i.TEXT = "text";
  8087. i.XML = "xml";
  8088. e.getItem = function() {
  8089. return this._item
  8090. };
  8091. e.getResult = function(t) {
  8092. return t ? this._rawResult : this._result
  8093. };
  8094. e.getTag = function() {
  8095. return this._tag
  8096. };
  8097. e.setTag = function(t) {
  8098. this._tag = t
  8099. };
  8100. e.load = function() {
  8101. this._createRequest();
  8102. this._request.on("complete", this, this);
  8103. this._request.on("progress", this, this);
  8104. this._request.on("loadStart", this, this);
  8105. this._request.on("abort", this, this);
  8106. this._request.on("timeout", this, this);
  8107. this._request.on("error", this, this);
  8108. var t = new createjs.Event("initialize");
  8109. t.loader = this._request;
  8110. this.dispatchEvent(t);
  8111. this._request.load()
  8112. };
  8113. e.cancel = function() {
  8114. this.canceled = true;
  8115. this.destroy()
  8116. };
  8117. e.destroy = function() {
  8118. if (this._request) {
  8119. this._request.removeAllEventListeners();
  8120. this._request.destroy()
  8121. }
  8122. this._request = null;
  8123. this._item = null;
  8124. this._rawResult = null;
  8125. this._result = null;
  8126. this._loadItems = null;
  8127. this.removeAllEventListeners()
  8128. };
  8129. e.getLoadedItems = function() {
  8130. return this._loadedItems
  8131. };
  8132. e._createRequest = function() {
  8133. if (!this._preferXHR) {
  8134. this._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  8135. } else {
  8136. this._request = new createjs.XHRRequest(this._item)
  8137. }
  8138. };
  8139. e._createTag = function(t) {
  8140. return null
  8141. };
  8142. e._sendLoadStart = function() {
  8143. if (this._isCanceled()) {
  8144. return
  8145. }
  8146. this.dispatchEvent("loadstart")
  8147. };
  8148. e._sendProgress = function(t) {
  8149. if (this._isCanceled()) {
  8150. return
  8151. }
  8152. var e = null;
  8153. if (typeof t == "number") {
  8154. this.progress = t;
  8155. e = new createjs.ProgressEvent(this.progress)
  8156. } else {
  8157. e = t;
  8158. this.progress = t.loaded / t.total;
  8159. e.progress = this.progress;
  8160. if (isNaN(this.progress) || this.progress == Infinity) {
  8161. this.progress = 0
  8162. }
  8163. }
  8164. this.hasEventListener("progress") && this.dispatchEvent(e)
  8165. };
  8166. e._sendComplete = function() {
  8167. if (this._isCanceled()) {
  8168. return
  8169. }
  8170. this.loaded = true;
  8171. var t = new createjs.Event("complete");
  8172. t.rawResult = this._rawResult;
  8173. if (this._result != null) {
  8174. t.result = this._result
  8175. }
  8176. this.dispatchEvent(t)
  8177. };
  8178. e._sendError = function(t) {
  8179. if (this._isCanceled() || !this.hasEventListener("error")) {
  8180. return
  8181. }
  8182. if (t == null) {
  8183. t = new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")
  8184. }
  8185. this.dispatchEvent(t)
  8186. };
  8187. e._isCanceled = function() {
  8188. if (window.createjs == null || this.canceled) {
  8189. return true
  8190. }
  8191. return false
  8192. };
  8193. e.resultFormatter = null;
  8194. e.handleEvent = function(t) {
  8195. switch (t.type) {
  8196. case "complete":
  8197. this._rawResult = t.target._response;
  8198. var e = this.resultFormatter && this.resultFormatter(this);
  8199. var i = this;
  8200. if (e instanceof Function) {
  8201. e(function(t) {
  8202. i._result = t;
  8203. i._sendComplete()
  8204. })
  8205. } else {
  8206. this._result = e || this._rawResult;
  8207. this._sendComplete()
  8208. }
  8209. break;
  8210. case "progress":
  8211. this._sendProgress(t);
  8212. break;
  8213. case "error":
  8214. this._sendError(t);
  8215. break;
  8216. case "loadstart":
  8217. this._sendLoadStart();
  8218. break;
  8219. case "abort":
  8220. case "timeout":
  8221. if (!this._isCanceled()) {
  8222. this.dispatchEvent(t.type)
  8223. }
  8224. break
  8225. }
  8226. };
  8227. e.buildPath = function(t, e) {
  8228. return createjs.RequestUtils.buildPath(t, e)
  8229. };
  8230. e.toString = function() {
  8231. return "[PreloadJS AbstractLoader]"
  8232. };
  8233. createjs.AbstractLoader = createjs.promote(t, "EventDispatcher")
  8234. })();
  8235. this.createjs = this.createjs || {};
  8236. (function() {
  8237. "use strict";
  8238. function t(t, e, i) {
  8239. this.AbstractLoader_constructor(t, e, i);
  8240. this.resultFormatter = this._formatResult;
  8241. this._tagSrcAttribute = "src"
  8242. }
  8243. var e = createjs.extend(t, createjs.AbstractLoader);
  8244. e.load = function() {
  8245. if (!this._tag) {
  8246. this._tag = this._createTag(this._item.src)
  8247. }
  8248. this._tag.preload = "auto";
  8249. this._tag.load();
  8250. this.AbstractLoader_load()
  8251. };
  8252. e._createTag = function() {};
  8253. e._createRequest = function() {
  8254. if (!this._preferXHR) {
  8255. this._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  8256. } else {
  8257. this._request = new createjs.XHRRequest(this._item)
  8258. }
  8259. };
  8260. e._formatResult = function(t) {
  8261. this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler);
  8262. this._tag.onstalled = null;
  8263. if (this._preferXHR) {
  8264. t.getTag().src = t.getResult(true)
  8265. }
  8266. return t.getTag()
  8267. };
  8268. createjs.AbstractMediaLoader = createjs.promote(t, "AbstractLoader")
  8269. })();
  8270. this.createjs = this.createjs || {};
  8271. (function() {
  8272. "use strict";
  8273. var t = function(t) {
  8274. this._item = t
  8275. };
  8276. var e = createjs.extend(t, createjs.EventDispatcher);
  8277. e.load = function() {};
  8278. e.destroy = function() {};
  8279. e.cancel = function() {};
  8280. createjs.AbstractRequest = createjs.promote(t, "EventDispatcher")
  8281. })();
  8282. this.createjs = this.createjs || {};
  8283. (function() {
  8284. "use strict";
  8285. function t(t, e, i) {
  8286. this.AbstractRequest_constructor(t);
  8287. this._tag = e;
  8288. this._tagSrcAttribute = i;
  8289. this._loadedHandler = createjs.proxy(this._handleTagComplete, this);
  8290. this._addedToDOM = false;
  8291. this._startTagVisibility = null
  8292. }
  8293. var e = createjs.extend(t, createjs.AbstractRequest);
  8294. e.load = function() {
  8295. if (this._tag.parentNode == null) {
  8296. window.document.body.appendChild(this._tag);
  8297. this._addedToDOM = true
  8298. }
  8299. this._tag.onload = createjs.proxy(this._handleTagComplete, this);
  8300. this._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);
  8301. var t = new createjs.Event("initialize");
  8302. t.loader = this._tag;
  8303. this.dispatchEvent(t);
  8304. this._hideTag();
  8305. this._tag[this._tagSrcAttribute] = this._item.src
  8306. };
  8307. e.destroy = function() {
  8308. this._clean();
  8309. this._tag = null;
  8310. this.AbstractRequest_destroy()
  8311. };
  8312. e._handleReadyStateChange = function() {
  8313. clearTimeout(this._loadTimeout);
  8314. var t = this._tag;
  8315. if (t.readyState == "loaded" || t.readyState == "complete") {
  8316. this._handleTagComplete()
  8317. }
  8318. };
  8319. e._handleTagComplete = function() {
  8320. this._rawResult = this._tag;
  8321. this._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult;
  8322. this._clean();
  8323. this._showTag();
  8324. this.dispatchEvent("complete")
  8325. };
  8326. e._clean = function() {
  8327. this._tag.onload = null;
  8328. this._tag.onreadystatechange = null;
  8329. if (this._addedToDOM && this._tag.parentNode != null) {
  8330. this._tag.parentNode.removeChild(this._tag)
  8331. }
  8332. };
  8333. e._hideTag = function() {
  8334. this._startTagVisibility = this._tag.style.visibility;
  8335. this._tag.style.visibility = "hidden"
  8336. };
  8337. e._showTag = function() {
  8338. this._tag.style.visibility = this._startTagVisibility
  8339. };
  8340. e._handleStalled = function() {};
  8341. createjs.TagRequest = createjs.promote(t, "AbstractRequest")
  8342. })();
  8343. this.createjs = this.createjs || {};
  8344. (function() {
  8345. "use strict";
  8346. function t(t, e, i) {
  8347. this.AbstractRequest_constructor(t);
  8348. this._tag = e;
  8349. this._tagSrcAttribute = i;
  8350. this._loadedHandler = createjs.proxy(this._handleTagComplete, this)
  8351. }
  8352. var e = createjs.extend(t, createjs.TagRequest);
  8353. var i = t;
  8354. e.load = function() {
  8355. this._tag.onstalled = createjs.proxy(this._handleStalled, this);
  8356. this._tag.onprogress = createjs.proxy(this._handleProgress, this);
  8357. this._tag.addEventListener && this._tag.addEventListener("canplaythrough", this._loadedHandler, false);
  8358. this.TagRequest_load()
  8359. };
  8360. e._handleReadyStateChange = function() {
  8361. clearTimeout(this._loadTimeout);
  8362. var t = this._tag;
  8363. if (t.readyState == "loaded" || t.readyState == "complete") {
  8364. this._handleTagComplete()
  8365. }
  8366. };
  8367. e._handleStalled = function() {};
  8368. e._handleProgress = function(t) {
  8369. if (!t || t.loaded > 0 && t.total == 0) {
  8370. return
  8371. }
  8372. var e = new createjs.ProgressEvent(t.loaded, t.total);
  8373. this.dispatchEvent(e)
  8374. };
  8375. e._clean = function() {
  8376. this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler);
  8377. this._tag.onstalled = null;
  8378. this._tag.onprogress = null;
  8379. this.TagRequest__clean()
  8380. };
  8381. createjs.MediaTagRequest = createjs.promote(t, "TagRequest")
  8382. })();
  8383. this.createjs = this.createjs || {};
  8384. (function() {
  8385. "use strict";
  8386. function t(t) {
  8387. this.AbstractRequest_constructor(t);
  8388. this._request = null;
  8389. this._loadTimeout = null;
  8390. this._xhrLevel = 1;
  8391. this._response = null;
  8392. this._rawResponse = null;
  8393. this._canceled = false;
  8394. this._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this);
  8395. this._handleProgressProxy = createjs.proxy(this._handleProgress, this);
  8396. this._handleAbortProxy = createjs.proxy(this._handleAbort, this);
  8397. this._handleErrorProxy = createjs.proxy(this._handleError, this);
  8398. this._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this);
  8399. this._handleLoadProxy = createjs.proxy(this._handleLoad, this);
  8400. this._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this);
  8401. if (!this._createXHR(t)) {}
  8402. }
  8403. var e = createjs.extend(t, createjs.AbstractRequest);
  8404. t.ACTIVEX_VERSIONS = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
  8405. e.getResult = function(t) {
  8406. if (t && this._rawResponse) {
  8407. return this._rawResponse
  8408. }
  8409. return this._response
  8410. };
  8411. e.cancel = function() {
  8412. this.canceled = true;
  8413. this._clean();
  8414. this._request.abort()
  8415. };
  8416. e.load = function() {
  8417. if (this._request == null) {
  8418. this._handleError();
  8419. return
  8420. }
  8421. this._request.addEventListener("loadstart", this._handleLoadStartProxy, false);
  8422. this._request.addEventListener("progress", this._handleProgressProxy, false);
  8423. this._request.addEventListener("abort", this._handleAbortProxy, false);
  8424. this._request.addEventListener("error", this._handleErrorProxy, false);
  8425. this._request.addEventListener("timeout", this._handleTimeoutProxy, false);
  8426. this._request.addEventListener("load", this._handleLoadProxy, false);
  8427. this._request.addEventListener("readystatechange", this._handleReadyStateChangeProxy, false);
  8428. if (this._xhrLevel == 1) {
  8429. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout)
  8430. }
  8431. try {
  8432. if (!this._item.values || this._item.method == createjs.AbstractLoader.GET) {
  8433. this._request.send()
  8434. } else if (this._item.method == createjs.AbstractLoader.POST) {
  8435. this._request.send(createjs.RequestUtils.formatQueryString(this._item.values))
  8436. }
  8437. } catch (t) {
  8438. this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND", null, t))
  8439. }
  8440. };
  8441. e.setResponseType = function(t) {
  8442. this._request.responseType = t
  8443. };
  8444. e.getAllResponseHeaders = function() {
  8445. if (this._request.getAllResponseHeaders instanceof Function) {
  8446. return this._request.getAllResponseHeaders()
  8447. } else {
  8448. return null
  8449. }
  8450. };
  8451. e.getResponseHeader = function(t) {
  8452. if (this._request.getResponseHeader instanceof Function) {
  8453. return this._request.getResponseHeader(t)
  8454. } else {
  8455. return null
  8456. }
  8457. };
  8458. e._handleProgress = function(t) {
  8459. if (!t || t.loaded > 0 && t.total == 0) {
  8460. return
  8461. }
  8462. var e = new createjs.ProgressEvent(t.loaded, t.total);
  8463. this.dispatchEvent(e)
  8464. };
  8465. e._handleLoadStart = function(t) {
  8466. clearTimeout(this._loadTimeout);
  8467. this.dispatchEvent("loadstart")
  8468. };
  8469. e._handleAbort = function(t) {
  8470. this._clean();
  8471. this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED", null, t))
  8472. };
  8473. e._handleError = function(t) {
  8474. this._clean();
  8475. this.dispatchEvent(new createjs.ErrorEvent(t.message))
  8476. };
  8477. e._handleReadyStateChange = function(t) {
  8478. if (this._request.readyState == 4) {
  8479. this._handleLoad()
  8480. }
  8481. };
  8482. e._handleLoad = function(t) {
  8483. if (this.loaded) {
  8484. return
  8485. }
  8486. this.loaded = true;
  8487. var e = this._checkError();
  8488. if (e) {
  8489. this._handleError(e);
  8490. return
  8491. }
  8492. this._response = this._getResponse();
  8493. this._clean();
  8494. this.dispatchEvent(new createjs.Event("complete"))
  8495. };
  8496. e._handleTimeout = function(t) {
  8497. this._clean();
  8498. this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT", null, t))
  8499. };
  8500. e._checkError = function() {
  8501. var t = parseInt(this._request.status);
  8502. switch (t) {
  8503. case 404:
  8504. case 0:
  8505. return new Error(t)
  8506. }
  8507. return null
  8508. };
  8509. e._getResponse = function() {
  8510. if (this._response != null) {
  8511. return this._response
  8512. }
  8513. if (this._request.response != null) {
  8514. return this._request.response
  8515. }
  8516. try {
  8517. if (this._request.responseText != null) {
  8518. return this._request.responseText
  8519. }
  8520. } catch (t) {}
  8521. try {
  8522. if (this._request.responseXML != null) {
  8523. return this._request.responseXML
  8524. }
  8525. } catch (t) {}
  8526. return null
  8527. };
  8528. e._createXHR = function(t) {
  8529. var e = createjs.RequestUtils.isCrossDomain(t);
  8530. var i = {};
  8531. var r = null;
  8532. if (window.XMLHttpRequest) {
  8533. r = new XMLHttpRequest;
  8534. if (e && r.withCredentials === undefined && window.XDomainRequest) {
  8535. r = new XDomainRequest
  8536. }
  8537. } else {
  8538. for (var n = 0, a = s.ACTIVEX_VERSIONS.length; n < a; n++) {
  8539. var o = s.ACTIVEX_VERSIONS[n];
  8540. try {
  8541. r = new ActiveXObject(axVersions);
  8542. break
  8543. } catch (h) {}
  8544. }
  8545. if (r == null) {
  8546. return false
  8547. }
  8548. }
  8549. if (t.mimeType && r.overrideMimeType) {
  8550. r.overrideMimeType(t.mimeType)
  8551. }
  8552. this._xhrLevel = typeof r.responseType === "string" ? 2 : 1;
  8553. var c = null;
  8554. if (t.method == createjs.AbstractLoader.GET) {
  8555. c = createjs.RequestUtils.buildPath(t.src, t.values)
  8556. } else {
  8557. c = t.src
  8558. }
  8559. r.open(t.method || createjs.AbstractLoader.GET, c, true);
  8560. if (e && r instanceof XMLHttpRequest && this._xhrLevel == 1) {
  8561. i["Origin"] = location.origin
  8562. }
  8563. if (t.values && t.method == createjs.AbstractLoader.POST) {
  8564. i["Content-Type"] = "application/x-www-form-urlencoded"
  8565. }
  8566. if (!e && !i["X-Requested-With"]) {
  8567. i["X-Requested-With"] = "XMLHttpRequest"
  8568. }
  8569. if (t.headers) {
  8570. for (var u in t.headers) {
  8571. i[u] = t.headers[u]
  8572. }
  8573. }
  8574. for (u in i) {
  8575. r.setRequestHeader(u, i[u])
  8576. }
  8577. if (r instanceof XMLHttpRequest && t.withCredentials !== undefined) {
  8578. r.withCredentials = t.withCredentials
  8579. }
  8580. this._request = r;
  8581. return true
  8582. };
  8583. e._clean = function() {
  8584. clearTimeout(this._loadTimeout);
  8585. this._request.removeEventListener("loadstart", this._handleLoadStartProxy);
  8586. this._request.removeEventListener("progress", this._handleProgressProxy);
  8587. this._request.removeEventListener("abort", this._handleAbortProxy);
  8588. this._request.removeEventListener("error", this._handleErrorProxy);
  8589. this._request.removeEventListener("timeout", this._handleTimeoutProxy);
  8590. this._request.removeEventListener("load", this._handleLoadProxy);
  8591. this._request.removeEventListener("readystatechange", this._handleReadyStateChangeProxy)
  8592. };
  8593. e.toString = function() {
  8594. return "[PreloadJS XHRRequest]"
  8595. };
  8596. createjs.XHRRequest = createjs.promote(t, "AbstractRequest")
  8597. })();
  8598. this.createjs = this.createjs || {};
  8599. (function() {
  8600. "use strict";
  8601. function t(t, e) {
  8602. this.AbstractMediaLoader_constructor(t, e, createjs.AbstractLoader.SOUND);
  8603. if (createjs.RequestUtils.isAudioTag(t)) {
  8604. this._tag = t
  8605. } else if (createjs.RequestUtils.isAudioTag(t.src)) {
  8606. this._tag = t
  8607. } else if (createjs.RequestUtils.isAudioTag(t.tag)) {
  8608. this._tag = createjs.RequestUtils.isAudioTag(t) ? t : t.src
  8609. }
  8610. if (this._tag != null) {
  8611. this._preferXHR = false
  8612. }
  8613. }
  8614. var e = createjs.extend(t, createjs.AbstractMediaLoader);
  8615. var i = t;
  8616. i.canLoadItem = function(t) {
  8617. return t.type == createjs.AbstractLoader.SOUND
  8618. };
  8619. e._createTag = function(t) {
  8620. var e = document.createElement("audio");
  8621. e.autoplay = false;
  8622. e.preload = "none";
  8623. e.src = t;
  8624. return e
  8625. };
  8626. createjs.SoundLoader = createjs.promote(t, "AbstractMediaLoader")
  8627. })();
  8628. this.createjs = this.createjs || {};
  8629. (function() {
  8630. "use strict";
  8631. function t() {
  8632. throw "Sound cannot be instantiated"
  8633. }
  8634. var e = t;
  8635. e.INTERRUPT_ANY = "any";
  8636. e.INTERRUPT_EARLY = "early";
  8637. e.INTERRUPT_LATE = "late";
  8638. e.INTERRUPT_NONE = "none";
  8639. e.PLAY_INITED = "playInited";
  8640. e.PLAY_SUCCEEDED = "playSucceeded";
  8641. e.PLAY_INTERRUPTED = "playInterrupted";
  8642. e.PLAY_FINISHED = "playFinished";
  8643. e.PLAY_FAILED = "playFailed";
  8644. e.SUPPORTED_EXTENSIONS = ["mp3", "ogg", "mpeg", "wav", "m4a", "mp4", "aiff", "wma", "mid"];
  8645. e.EXTENSION_MAP = {
  8646. m4a: "mp4"
  8647. };
  8648. e.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/;
  8649. e.defaultInterruptBehavior = e.INTERRUPT_NONE;
  8650. e.alternateExtensions = [];
  8651. e.activePlugin = null;
  8652. e._pluginsRegistered = false;
  8653. e._lastID = 0;
  8654. e._masterVolume = 1;
  8655. e._masterMute = false;
  8656. e._instances = [];
  8657. e._idHash = {};
  8658. e._preloadHash = {};
  8659. e.addEventListener = null;
  8660. e.removeEventListener = null;
  8661. e.removeAllEventListeners = null;
  8662. e.dispatchEvent = null;
  8663. e.hasEventListener = null;
  8664. e._listeners = null;
  8665. createjs.EventDispatcher.initialize(e);
  8666. e.getPreloadHandlers = function() {
  8667. return {
  8668. callback: createjs.proxy(e.initLoad, e),
  8669. types: ["sound"],
  8670. extensions: e.SUPPORTED_EXTENSIONS
  8671. }
  8672. };
  8673. e._handleLoadComplete = function(t) {
  8674. var i = t.target.getItem().src;
  8675. if (!e._preloadHash[i]) {
  8676. return
  8677. }
  8678. for (var s = 0, r = e._preloadHash[i].length; s < r; s++) {
  8679. var n = e._preloadHash[i][s];
  8680. e._preloadHash[i][s] = true;
  8681. if (!e.hasEventListener("fileload")) {
  8682. continue
  8683. }
  8684. var t = new createjs.Event("fileload");
  8685. t.src = n.src;
  8686. t.id = n.id;
  8687. t.data = n.data;
  8688. t.sprite = n.sprite;
  8689. e.dispatchEvent(t)
  8690. }
  8691. };
  8692. e._handleLoadError = function(t) {
  8693. var i = t.target.getItem().src;
  8694. if (!e._preloadHash[i]) {
  8695. return
  8696. }
  8697. for (var s = 0, r = e._preloadHash[i].length; s < r; s++) {
  8698. var n = e._preloadHash[i][s];
  8699. e._preloadHash[i][s] = false;
  8700. if (!e.hasEventListener("fileerror")) {
  8701. continue
  8702. }
  8703. var t = new createjs.Event("fileerror");
  8704. t.src = n.src;
  8705. t.id = n.id;
  8706. t.data = n.data;
  8707. t.sprite = n.sprite;
  8708. e.dispatchEvent(t)
  8709. }
  8710. };
  8711. e._registerPlugin = function(t) {
  8712. if (t.isSupported()) {
  8713. e.activePlugin = new t;
  8714. return true
  8715. }
  8716. return false
  8717. };
  8718. e.registerPlugins = function(t) {
  8719. e._pluginsRegistered = true;
  8720. for (var i = 0, s = t.length; i < s; i++) {
  8721. if (e._registerPlugin(t[i])) {
  8722. return true
  8723. }
  8724. }
  8725. return false
  8726. };
  8727. e.initializeDefaultPlugins = function() {
  8728. if (e.activePlugin != null) {
  8729. return true
  8730. }
  8731. if (e._pluginsRegistered) {
  8732. return false
  8733. }
  8734. if (e.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin])) {
  8735. return true
  8736. }
  8737. return false
  8738. };
  8739. e.isReady = function() {
  8740. return e.activePlugin != null
  8741. };
  8742. e.getCapabilities = function() {
  8743. if (e.activePlugin == null) {
  8744. return null
  8745. }
  8746. return e.activePlugin._capabilities
  8747. };
  8748. e.getCapability = function(t) {
  8749. if (e.activePlugin == null) {
  8750. return null
  8751. }
  8752. return e.activePlugin._capabilities[t]
  8753. };
  8754. e.initLoad = function(t) {
  8755. return e._registerSound(t)
  8756. };
  8757. e._registerSound = function(t) {
  8758. if (!e.initializeDefaultPlugins()) {
  8759. return false
  8760. }
  8761. var s = e._parsePath(t.src);
  8762. if (s == null) {
  8763. return false
  8764. }
  8765. t.src = s.src;
  8766. t.type = "sound";
  8767. var r = t.data;
  8768. var n = e.activePlugin.defaultNumChannels || null;
  8769. if (r != null) {
  8770. if (!isNaN(r.channels)) {
  8771. n = parseInt(r.channels)
  8772. } else if (!isNaN(r)) {
  8773. n = parseInt(r)
  8774. }
  8775. if (r.audioSprite) {
  8776. var a;
  8777. for (var o = r.audioSprite.length; o--;) {
  8778. a = r.audioSprite[o];
  8779. e._idHash[a.id] = {
  8780. src: t.src,
  8781. startTime: parseInt(a.startTime),
  8782. duration: parseInt(a.duration)
  8783. }
  8784. }
  8785. }
  8786. }
  8787. if (t.id != null) {
  8788. e._idHash[t.id] = {
  8789. src: t.src
  8790. }
  8791. }
  8792. var h = e.activePlugin.register(t, n);
  8793. i.create(t.src, n);
  8794. if (r == null || !isNaN(r)) {
  8795. t.data = n || i.maxPerChannel()
  8796. } else {
  8797. t.data.channels = n || i.maxPerChannel()
  8798. }
  8799. if (h.type) {
  8800. t.type = h.type
  8801. }
  8802. return h
  8803. };
  8804. e.registerSound = function(t, i, s, r) {
  8805. var n = {
  8806. src: t,
  8807. id: i,
  8808. data: s
  8809. };
  8810. if (t instanceof Object) {
  8811. r = i;
  8812. n = t
  8813. }
  8814. n = createjs.LoadItem.create(n);
  8815. if (r != null) {
  8816. n.src = r + t
  8817. }
  8818. var a = e._registerSound(n);
  8819. if (!a) {
  8820. return false
  8821. }
  8822. if (!e._preloadHash[n.src]) {
  8823. e._preloadHash[n.src] = []
  8824. }
  8825. e._preloadHash[n.src].push(n);
  8826. if (e._preloadHash[n.src].length == 1) {
  8827. a.on("complete", createjs.proxy(this._handleLoadComplete, this));
  8828. a.on("error", createjs.proxy(this._handleLoadError, this));
  8829. e.activePlugin.preload(a)
  8830. } else {
  8831. if (e._preloadHash[n.src][0] == true) {
  8832. return true
  8833. }
  8834. }
  8835. return n
  8836. };
  8837. e.registerSounds = function(t, e) {
  8838. var i = [];
  8839. if (t.path) {
  8840. if (!e) {
  8841. e = t.path
  8842. } else {
  8843. e = e + t.path
  8844. }
  8845. }
  8846. for (var s = 0, r = t.length; s < r; s++) {
  8847. i[s] = createjs.Sound.registerSound(t[s].src, t[s].id, t[s].data, e)
  8848. }
  8849. return i
  8850. };
  8851. e.registerManifest = function(t, e) {
  8852. try {
  8853. console.log("createjs.Sound.registerManifest is deprecated, please use createjs.Sound.registerSounds.")
  8854. } catch (i) {}
  8855. return this.registerSounds(t, e)
  8856. };
  8857. e.removeSound = function(t, s) {
  8858. if (e.activePlugin == null) {
  8859. return false
  8860. }
  8861. if (t instanceof Object) {
  8862. t = t.src
  8863. }
  8864. t = e._getSrcById(t).src;
  8865. if (s != null) {
  8866. t = s + t
  8867. }
  8868. var r = e._parsePath(t);
  8869. if (r == null) {
  8870. return false
  8871. }
  8872. t = r.src;
  8873. for (var n in e._idHash) {
  8874. if (e._idHash[n].src == t) {
  8875. delete e._idHash[n]
  8876. }
  8877. }
  8878. i.removeSrc(t);
  8879. delete e._preloadHash[t];
  8880. e.activePlugin.removeSound(t);
  8881. return true
  8882. };
  8883. e.removeSounds = function(t, e) {
  8884. var i = [];
  8885. if (t.path) {
  8886. if (!e) {
  8887. e = t.path
  8888. } else {
  8889. e = e + t.path
  8890. }
  8891. }
  8892. for (var s = 0, r = t.length; s < r; s++) {
  8893. i[s] = createjs.Sound.removeSound(t[s].src, e)
  8894. }
  8895. return i
  8896. };
  8897. e.removeManifest = function(t, i) {
  8898. try {
  8899. console.log("createjs.Sound.removeManifest is deprecated, please use createjs.Sound.removeSounds.")
  8900. } catch (s) {}
  8901. return e.removeSounds(t, i)
  8902. };
  8903. e.removeAllSounds = function() {
  8904. e._idHash = {};
  8905. e._preloadHash = {};
  8906. i.removeAll();
  8907. if (e.activePlugin) {
  8908. e.activePlugin.removeAllSounds()
  8909. }
  8910. };
  8911. e.loadComplete = function(t) {
  8912. if (!e.isReady()) {
  8913. return false
  8914. }
  8915. var i = e._parsePath(t);
  8916. if (i) {
  8917. t = e._getSrcById(i.src).src
  8918. } else {
  8919. t = e._getSrcById(t).src
  8920. }
  8921. return e._preloadHash[t][0] == true
  8922. };
  8923. e._parsePath = function(t) {
  8924. if (typeof t != "string") {
  8925. t = t.toString()
  8926. }
  8927. var i = t.match(e.FILE_PATTERN);
  8928. if (i == null) {
  8929. return false
  8930. }
  8931. var s = i[4];
  8932. var r = i[5];
  8933. var n = e.getCapabilities();
  8934. var a = 0;
  8935. while (!n[r]) {
  8936. r = e.alternateExtensions[a++];
  8937. if (a > e.alternateExtensions.length) {
  8938. return null
  8939. }
  8940. }
  8941. t = t.replace("." + i[5], "." + r);
  8942. var o = {
  8943. name: s,
  8944. src: t,
  8945. extension: r
  8946. };
  8947. return o
  8948. };
  8949. e.play = function(t, i, s, r, n, a, o, h, c) {
  8950. if (i instanceof Object) {
  8951. s = i.delay;
  8952. r = i.offset;
  8953. n = i.loop;
  8954. a = i.volume;
  8955. o = i.pan;
  8956. h = i.startTime;
  8957. c = i.duration;
  8958. i = i.interrupt
  8959. }
  8960. var u = e.createInstance(t, h, c);
  8961. var l = e._playInstance(u, i, s, r, n, a, o);
  8962. if (!l) {
  8963. u._playFailed()
  8964. }
  8965. return u
  8966. };
  8967. e.createInstance = function(t, s, r) {
  8968. if (!e.initializeDefaultPlugins()) {
  8969. return new createjs.DefaultSoundInstance(t, s, r)
  8970. }
  8971. t = e._getSrcById(t);
  8972. var n = e._parsePath(t.src);
  8973. var a = null;
  8974. if (n != null && n.src != null) {
  8975. i.create(n.src);
  8976. if (s == null) {
  8977. s = t.startTime
  8978. }
  8979. a = e.activePlugin.create(n.src, s, r || t.duration)
  8980. } else {
  8981. a = new createjs.DefaultSoundInstance(t, s, r)
  8982. }
  8983. a.uniqueId = e._lastID++;
  8984. return a
  8985. };
  8986. e.setVolume = function(t) {
  8987. if (Number(t) == null) {
  8988. return false
  8989. }
  8990. t = Math.max(0, Math.min(1, t));
  8991. e._masterVolume = t;
  8992. if (!this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(t)) {
  8993. var i = this._instances;
  8994. for (var s = 0, r = i.length; s < r; s++) {
  8995. i[s].setMasterVolume(t)
  8996. }
  8997. }
  8998. };
  8999. e.getVolume = function() {
  9000. return e._masterVolume
  9001. };
  9002. e.setMute = function(t) {
  9003. if (t == null) {
  9004. return false
  9005. }
  9006. this._masterMute = t;
  9007. if (!this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(t)) {
  9008. var e = this._instances;
  9009. for (var i = 0, s = e.length; i < s; i++) {
  9010. e[i].setMasterMute(t)
  9011. }
  9012. }
  9013. return true
  9014. };
  9015. e.getMute = function() {
  9016. return this._masterMute
  9017. };
  9018. e.stop = function() {
  9019. var t = this._instances;
  9020. for (var e = t.length; e--;) {
  9021. t[e].stop()
  9022. }
  9023. };
  9024. e._playInstance = function(t, i, s, r, n, a, o) {
  9025. if (i instanceof Object) {
  9026. s = i.delay;
  9027. r = i.offset;
  9028. n = i.loop;
  9029. a = i.volume;
  9030. o = i.pan;
  9031. i = i.interrupt
  9032. }
  9033. i = i || e.defaultInterruptBehavior;
  9034. if (s == null) {
  9035. s = 0
  9036. }
  9037. if (r == null) {
  9038. r = t.getPosition()
  9039. }
  9040. if (n == null) {
  9041. n = t.loop
  9042. }
  9043. if (a == null) {
  9044. a = t.volume
  9045. }
  9046. if (o == null) {
  9047. o = t.pan
  9048. }
  9049. if (s == 0) {
  9050. var h = e._beginPlaying(t, i, r, n, a, o);
  9051. if (!h) {
  9052. return false
  9053. }
  9054. } else {
  9055. var c = setTimeout(function() {
  9056. e._beginPlaying(t, i, r, n, a, o)
  9057. }, s);
  9058. t.delayTimeoutId = c
  9059. }
  9060. this._instances.push(t);
  9061. return true
  9062. };
  9063. e._beginPlaying = function(t, e, s, r, n, a) {
  9064. if (!i.add(t, e)) {
  9065. return false
  9066. }
  9067. var o = t._beginPlaying(s, r, n, a);
  9068. if (!o) {
  9069. var h = createjs.indexOf(this._instances, t);
  9070. if (h > -1) {
  9071. this._instances.splice(h, 1)
  9072. }
  9073. return false
  9074. }
  9075. return true
  9076. };
  9077. e._getSrcById = function(t) {
  9078. return e._idHash[t] || {
  9079. src: t
  9080. }
  9081. };
  9082. e._playFinished = function(t) {
  9083. i.remove(t);
  9084. var e = createjs.indexOf(this._instances, t);
  9085. if (e > -1) {
  9086. this._instances.splice(e, 1)
  9087. }
  9088. };
  9089. createjs.Sound = t;
  9090. function i(t, e) {
  9091. this.init(t, e)
  9092. }
  9093. i.channels = {};
  9094. i.create = function(t, e) {
  9095. var s = i.get(t);
  9096. if (s == null) {
  9097. i.channels[t] = new i(t, e);
  9098. return true
  9099. }
  9100. return false
  9101. };
  9102. i.removeSrc = function(t) {
  9103. var e = i.get(t);
  9104. if (e == null) {
  9105. return false
  9106. }
  9107. e._removeAll();
  9108. delete i.channels[t];
  9109. return true
  9110. };
  9111. i.removeAll = function() {
  9112. for (var t in i.channels) {
  9113. i.channels[t]._removeAll()
  9114. }
  9115. i.channels = {}
  9116. };
  9117. i.add = function(t, e) {
  9118. var s = i.get(t.src);
  9119. if (s == null) {
  9120. return false
  9121. }
  9122. return s._add(t, e)
  9123. };
  9124. i.remove = function(t) {
  9125. var e = i.get(t.src);
  9126. if (e == null) {
  9127. return false
  9128. }
  9129. e._remove(t);
  9130. return true
  9131. };
  9132. i.maxPerChannel = function() {
  9133. return s.maxDefault
  9134. };
  9135. i.get = function(t) {
  9136. return i.channels[t]
  9137. };
  9138. var s = i.prototype;
  9139. s.constructor = i;
  9140. s.src = null;
  9141. s.max = null;
  9142. s.maxDefault = 100;
  9143. s.length = 0;
  9144. s.init = function(t, e) {
  9145. this.src = t;
  9146. this.max = e || this.maxDefault;
  9147. if (this.max == -1) {
  9148. this.max = this.maxDefault
  9149. }
  9150. this._instances = []
  9151. };
  9152. s._get = function(t) {
  9153. return this._instances[t]
  9154. };
  9155. s._add = function(t, e) {
  9156. if (!this._getSlot(e, t)) {
  9157. return false
  9158. }
  9159. this._instances.push(t);
  9160. this.length++;
  9161. return true
  9162. };
  9163. s._remove = function(t) {
  9164. var e = createjs.indexOf(this._instances, t);
  9165. if (e == -1) {
  9166. return false
  9167. }
  9168. this._instances.splice(e, 1);
  9169. this.length--;
  9170. return true
  9171. };
  9172. s._removeAll = function() {
  9173. for (var t = this.length - 1; t >= 0; t--) {
  9174. this._instances[t].stop()
  9175. }
  9176. };
  9177. s._getSlot = function(e, i) {
  9178. var s, r;
  9179. if (e != t.INTERRUPT_NONE) {
  9180. r = this._get(0);
  9181. if (r == null) {
  9182. return true
  9183. }
  9184. }
  9185. for (var n = 0, a = this.max; n < a; n++) {
  9186. s = this._get(n);
  9187. if (s == null) {
  9188. return true
  9189. }
  9190. if (s.playState == t.PLAY_FINISHED || s.playState == t.PLAY_INTERRUPTED || s.playState == t.PLAY_FAILED) {
  9191. r = s;
  9192. break
  9193. }
  9194. if (e == t.INTERRUPT_NONE) {
  9195. continue
  9196. }
  9197. if (e == t.INTERRUPT_EARLY && s.getPosition() < r.getPosition() || e == t.INTERRUPT_LATE && s.getPosition() > r.getPosition()) {
  9198. r = s
  9199. }
  9200. }
  9201. if (r != null) {
  9202. r._interrupt();
  9203. this._remove(r);
  9204. return true
  9205. }
  9206. return false
  9207. };
  9208. s.toString = function() {
  9209. return "[Sound SoundChannel]"
  9210. }
  9211. })();
  9212. this.createjs = this.createjs || {};
  9213. (function() {
  9214. "use strict";
  9215. var t = function(t, e, i, s) {
  9216. this.EventDispatcher_constructor();
  9217. this.src = t;
  9218. this.uniqueId = -1;
  9219. this.playState = null;
  9220. this.delayTimeoutId = null;
  9221. this._startTime = Math.max(0, e || 0);
  9222. this._volume = 1;
  9223. if (createjs.definePropertySupported) {
  9224. Object.defineProperty(this, "volume", {
  9225. get: this.getVolume,
  9226. set: this.setVolume
  9227. })
  9228. }
  9229. this._pan = 0;
  9230. if (createjs.definePropertySupported) {
  9231. Object.defineProperty(this, "pan", {
  9232. get: this.getPan,
  9233. set: this.setPan
  9234. })
  9235. }
  9236. this._duration = Math.max(0, i || 0);
  9237. if (createjs.definePropertySupported) {
  9238. Object.defineProperty(this, "duration", {
  9239. get: this.getDuration,
  9240. set: this.setDuration
  9241. })
  9242. }
  9243. this._playbackResource = null;
  9244. if (createjs.definePropertySupported) {
  9245. Object.defineProperty(this, "playbackResource", {
  9246. get: this.getPlaybackResource,
  9247. set: this.setPlaybackResource
  9248. })
  9249. }
  9250. if (s !== false && s !== true) {
  9251. this.setPlaybackResource(s)
  9252. }
  9253. this._position = 0;
  9254. if (createjs.definePropertySupported) {
  9255. Object.defineProperty(this, "position", {
  9256. get: this.getPosition,
  9257. set: this.setPosition
  9258. })
  9259. }
  9260. this._loop = 0;
  9261. if (createjs.definePropertySupported) {
  9262. Object.defineProperty(this, "loop", {
  9263. get: this.getLoop,
  9264. set: this.setLoop
  9265. })
  9266. }
  9267. this._muted = false;
  9268. if (createjs.definePropertySupported) {
  9269. Object.defineProperty(this, "muted", {
  9270. get: this.getMuted,
  9271. set: this.setMuted
  9272. })
  9273. }
  9274. this._paused = false;
  9275. if (createjs.definePropertySupported) {
  9276. Object.defineProperty(this, "paused", {
  9277. get: this.getPaused,
  9278. set: this.setPaused
  9279. })
  9280. }
  9281. };
  9282. var e = createjs.extend(t, createjs.EventDispatcher);
  9283. e.play = function(t, e, i, s, r, n) {
  9284. if (this.playState == createjs.Sound.PLAY_SUCCEEDED) {
  9285. if (t instanceof Object) {
  9286. i = t.offset;
  9287. s = t.loop;
  9288. r = t.volume;
  9289. n = t.pan
  9290. }
  9291. if (i != null) {
  9292. this.setPosition(i)
  9293. }
  9294. if (s != null) {
  9295. this.setLoop(s)
  9296. }
  9297. if (r != null) {
  9298. this.setVolume(r)
  9299. }
  9300. if (n != null) {
  9301. this.setPan(n)
  9302. }
  9303. if (this._paused) {
  9304. this.setPaused(false)
  9305. }
  9306. return
  9307. }
  9308. this._cleanUp();
  9309. createjs.Sound._playInstance(this, t, e, i, s, r, n);
  9310. return this
  9311. };
  9312. e.pause = function() {
  9313. if (this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED) {
  9314. return false
  9315. }
  9316. this.setPaused(true);
  9317. return true
  9318. };
  9319. e.resume = function() {
  9320. if (!this._paused) {
  9321. return false
  9322. }
  9323. this.setPaused(false);
  9324. return true
  9325. };
  9326. e.stop = function() {
  9327. this._position = 0;
  9328. this._paused = false;
  9329. this._handleStop();
  9330. this._cleanUp();
  9331. this.playState = createjs.Sound.PLAY_FINISHED;
  9332. return this
  9333. };
  9334. e.destroy = function() {
  9335. this._cleanUp();
  9336. this.src = null;
  9337. this.playbackResource = null;
  9338. this.removeAllEventListeners()
  9339. };
  9340. e.toString = function() {
  9341. return "[AbstractSoundInstance]"
  9342. };
  9343. e.getPaused = function() {
  9344. return this._paused
  9345. };
  9346. e.setPaused = function(t) {
  9347. if (t !== true && t !== false || this._paused == t) {
  9348. return
  9349. }
  9350. if (t == true && this.playState != createjs.Sound.PLAY_SUCCEEDED) {
  9351. return
  9352. }
  9353. this._paused = t;
  9354. if (t) {
  9355. this._pause()
  9356. } else {
  9357. this._resume()
  9358. }
  9359. clearTimeout(this.delayTimeoutId);
  9360. return this
  9361. };
  9362. e.setVolume = function(t) {
  9363. if (t == this._volume) {
  9364. return this
  9365. }
  9366. this._volume = Math.max(0, Math.min(1, t));
  9367. if (!this._muted) {
  9368. this._updateVolume()
  9369. }
  9370. return this
  9371. };
  9372. e.getVolume = function() {
  9373. return this._volume
  9374. };
  9375. e.setMute = function(t) {
  9376. this.setMuted(t)
  9377. };
  9378. e.getMute = function() {
  9379. return this._muted
  9380. };
  9381. e.setMuted = function(t) {
  9382. if (t !== true && t !== false) {
  9383. return
  9384. }
  9385. this._muted = t;
  9386. this._updateVolume();
  9387. return this
  9388. };
  9389. e.getMuted = function() {
  9390. return this._muted
  9391. };
  9392. e.setPan = function(t) {
  9393. if (t == this._pan) {
  9394. return this
  9395. }
  9396. this._pan = Math.max(-1, Math.min(1, t));
  9397. this._updatePan();
  9398. return this
  9399. };
  9400. e.getPan = function() {
  9401. return this._pan
  9402. };
  9403. e.getPosition = function() {
  9404. if (!this._paused && this.playState == createjs.Sound.PLAY_SUCCEEDED) {
  9405. return this._calculateCurrentPosition()
  9406. }
  9407. return this._position
  9408. };
  9409. e.setPosition = function(t) {
  9410. this._position = Math.max(0, t);
  9411. if (this.playState == createjs.Sound.PLAY_SUCCEEDED) {
  9412. this._updatePosition()
  9413. }
  9414. return this
  9415. };
  9416. e.getDuration = function() {
  9417. return this._duration
  9418. };
  9419. e.setDuration = function(t) {
  9420. if (t == this._duration) {
  9421. return this
  9422. }
  9423. this._duration = Math.max(0, t || 0);
  9424. this._updateDuration();
  9425. return this
  9426. };
  9427. e.setPlaybackResource = function(t) {
  9428. this._playbackResource = t;
  9429. if (this._duration == 0) {
  9430. this._setDurationFromSource()
  9431. }
  9432. return this
  9433. };
  9434. e.getPlaybackResource = function() {
  9435. return this._playbackResource
  9436. };
  9437. e.getLoop = function() {
  9438. return this._loop
  9439. };
  9440. e.setLoop = function(t) {
  9441. if (this._playbackResource != null) {
  9442. if (this._loop != 0 && t == 0) {
  9443. this._removeLooping(t)
  9444. }
  9445. if (this._loop == 0 && t != 0) {
  9446. this._addLooping(t)
  9447. }
  9448. }
  9449. this._loop = t
  9450. };
  9451. e._sendEvent = function(t) {
  9452. var e = new createjs.Event(t);
  9453. this.dispatchEvent(e)
  9454. };
  9455. e._cleanUp = function() {
  9456. clearTimeout(this.delayTimeoutId);
  9457. this._handleCleanUp();
  9458. this._paused = false;
  9459. createjs.Sound._playFinished(this)
  9460. };
  9461. e._interrupt = function() {
  9462. this._cleanUp();
  9463. this.playState = createjs.Sound.PLAY_INTERRUPTED;
  9464. this._sendEvent("interrupted")
  9465. };
  9466. e._beginPlaying = function(t, e, i, s) {
  9467. this.setPosition(t);
  9468. this.setLoop(e);
  9469. this.setVolume(i);
  9470. this.setPan(s);
  9471. if (this._playbackResource != null && this._position < this._duration) {
  9472. this._paused = false;
  9473. this._handleSoundReady();
  9474. this.playState = createjs.Sound.PLAY_SUCCEEDED;
  9475. this._sendEvent("succeeded");
  9476. return true
  9477. } else {
  9478. this._playFailed();
  9479. return false
  9480. }
  9481. };
  9482. e._playFailed = function() {
  9483. this._cleanUp();
  9484. this.playState = createjs.Sound.PLAY_FAILED;
  9485. this._sendEvent("failed")
  9486. };
  9487. e._handleSoundComplete = function(t) {
  9488. this._position = 0;
  9489. if (this._loop != 0) {
  9490. this._loop--;
  9491. this._handleLoop();
  9492. this._sendEvent("loop");
  9493. return
  9494. }
  9495. this._cleanUp();
  9496. this.playState = createjs.Sound.PLAY_FINISHED;
  9497. this._sendEvent("complete")
  9498. };
  9499. e._handleSoundReady = function() {};
  9500. e._updateVolume = function() {};
  9501. e._updatePan = function() {};
  9502. e._updateDuration = function() {};
  9503. e._setDurationFromSource = function() {};
  9504. e._calculateCurrentPosition = function() {};
  9505. e._updatePosition = function() {};
  9506. e._removeLooping = function() {};
  9507. e._addLooping = function() {};
  9508. e._pause = function() {};
  9509. e._resume = function() {};
  9510. e._handleStop = function() {};
  9511. e._handleCleanUp = function() {};
  9512. e._handleLoop = function() {};
  9513. createjs.AbstractSoundInstance = createjs.promote(t, "EventDispatcher");
  9514. createjs.DefaultSoundInstance = createjs.AbstractSoundInstance
  9515. })();
  9516. this.createjs = this.createjs || {};
  9517. (function() {
  9518. "use strict";
  9519. var t = function() {
  9520. this._capabilities = null;
  9521. this._loaders = {};
  9522. this._audioSources = {};
  9523. this._soundInstances = {};
  9524. this._loaderClass;
  9525. this._soundInstanceClass
  9526. };
  9527. var e = t.prototype;
  9528. t._capabilities = null;
  9529. t.isSupported = function() {
  9530. return true
  9531. };
  9532. e.register = function(t, e) {
  9533. this._audioSources[t.src] = true;
  9534. this._soundInstances[t.src] = [];
  9535. if (this._loaders[t.src]) {
  9536. return this._loaders[t.src]
  9537. }
  9538. var i = new this._loaderClass(t);
  9539. i.on("complete", createjs.proxy(this._handlePreloadComplete, this));
  9540. this._loaders[t.src] = i;
  9541. return i
  9542. };
  9543. e.preload = function(t) {
  9544. t.on("error", createjs.proxy(this._handlePreloadError, this));
  9545. t.load()
  9546. };
  9547. e.isPreloadStarted = function(t) {
  9548. return this._audioSources[t] != null
  9549. };
  9550. e.isPreloadComplete = function(t) {
  9551. return !(this._audioSources[t] == null || this._audioSources[t] == true)
  9552. };
  9553. e.removeSound = function(t) {
  9554. if (!this._soundInstances[t]) {
  9555. return
  9556. }
  9557. for (var e = this._soundInstances[t].length; e--;) {
  9558. var i = this._soundInstances[t][e];
  9559. i.destroy()
  9560. }
  9561. delete this._soundInstances[t];
  9562. delete this._audioSources[t];
  9563. if (this._loaders[t]) {
  9564. this._loaders[t].destroy()
  9565. }
  9566. delete this._loaders[t]
  9567. };
  9568. e.removeAllSounds = function() {
  9569. for (var t in this._audioSources) {
  9570. this.removeSound(t)
  9571. }
  9572. };
  9573. e.create = function(t, e, i) {
  9574. if (!this.isPreloadStarted(t)) {
  9575. this.preload(this.register(t))
  9576. }
  9577. var s = new this._soundInstanceClass(t, e, i, this._audioSources[t]);
  9578. this._soundInstances[t].push(s);
  9579. return s
  9580. };
  9581. e.setVolume = function(t) {
  9582. this._volume = t;
  9583. this._updateVolume();
  9584. return true
  9585. };
  9586. e.getVolume = function() {
  9587. return this._volume
  9588. };
  9589. e.setMute = function(t) {
  9590. this._updateVolume();
  9591. return true
  9592. };
  9593. e.toString = function() {
  9594. return "[AbstractPlugin]"
  9595. };
  9596. e._handlePreloadComplete = function(t) {
  9597. var e = t.target.getItem().src;
  9598. this._audioSources[e] = t.result;
  9599. for (var i = 0, s = this._soundInstances[e].length; i < s; i++) {
  9600. var r = this._soundInstances[e][i];
  9601. r.setPlaybackResource(this._audioSources[e])
  9602. }
  9603. };
  9604. e._handlePreloadError = function(t) {};
  9605. e._updateVolume = function() {};
  9606. createjs.AbstractPlugin = t
  9607. })();
  9608. this.createjs = this.createjs || {};
  9609. (function() {
  9610. "use strict";
  9611. function t(t) {
  9612. this.AbstractLoader_constructor(t, true, createjs.AbstractLoader.SOUND)
  9613. }
  9614. var e = createjs.extend(t, createjs.AbstractLoader);
  9615. t.context = null;
  9616. e.toString = function() {
  9617. return "[WebAudioLoader]"
  9618. };
  9619. e._createRequest = function() {
  9620. this._request = new createjs.XHRRequest(this._item, false);
  9621. this._request.setResponseType("arraybuffer")
  9622. };
  9623. e._sendComplete = function(e) {
  9624. t.context.decodeAudioData(this._rawResult, createjs.proxy(this._handleAudioDecoded, this), createjs.proxy(this._handleError, this))
  9625. };
  9626. e._handleAudioDecoded = function(t) {
  9627. this._result = t;
  9628. this.AbstractLoader__sendComplete()
  9629. };
  9630. createjs.WebAudioLoader = createjs.promote(t, "AbstractLoader")
  9631. })();
  9632. this.createjs = this.createjs || {};
  9633. (function() {
  9634. "use strict";
  9635. function t(t, e, s, r) {
  9636. this.AbstractSoundInstance_constructor(t, e, s, r);
  9637. this.gainNode = i.context.createGain();
  9638. this.panNode = i.context.createPanner();
  9639. this.panNode.panningModel = i._panningModel;
  9640. this.panNode.connect(this.gainNode);
  9641. this.sourceNode = null;
  9642. this._soundCompleteTimeout = null;
  9643. this._sourceNodeNext = null;
  9644. this._playbackStartTime = 0;
  9645. this._endedHandler = createjs.proxy(this._handleSoundComplete, this)
  9646. }
  9647. var e = createjs.extend(t, createjs.AbstractSoundInstance);
  9648. var i = t;
  9649. i.context = null;
  9650. i.destinationNode = null;
  9651. i._panningModel = "equalpower";
  9652. e.destroy = function() {
  9653. this.AbstractSoundInstance_destroy();
  9654. this.panNode.disconnect(0);
  9655. this.panNode = null;
  9656. this.gainNode.disconnect(0);
  9657. this.gainNode = null
  9658. };
  9659. e.toString = function() {
  9660. return "[WebAudioSoundInstance]"
  9661. };
  9662. e._updatePan = function() {
  9663. this.panNode.setPosition(this._pan, 0, -.5)
  9664. };
  9665. e._removeLooping = function() {
  9666. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)
  9667. };
  9668. e._addLooping = function() {
  9669. if (this.playState != createjs.Sound.PLAY_SUCCEEDED) {
  9670. return
  9671. }
  9672. this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0)
  9673. };
  9674. e._setDurationFromSource = function() {
  9675. this._duration = this.playbackResource.duration * 1e3
  9676. };
  9677. e._handleCleanUp = function() {
  9678. if (this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED) {
  9679. this.sourceNode = this._cleanUpAudioNode(this.sourceNode);
  9680. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)
  9681. }
  9682. if (this.gainNode.numberOfOutputs != 0) {
  9683. this.gainNode.disconnect(0)
  9684. }
  9685. clearTimeout(this._soundCompleteTimeout);
  9686. this._playbackStartTime = 0
  9687. };
  9688. e._cleanUpAudioNode = function(t) {
  9689. if (t) {
  9690. t.stop(0);
  9691. t.disconnect(0);
  9692. t = null
  9693. }
  9694. return t
  9695. };
  9696. e._handleSoundReady = function(t) {
  9697. this.gainNode.connect(i.destinationNode);
  9698. var e = this._duration * .001;
  9699. var s = this._position * .001;
  9700. this.sourceNode = this._createAndPlayAudioNode(i.context.currentTime - e, s);
  9701. this._playbackStartTime = this.sourceNode.startTime - s;
  9702. this._soundCompleteTimeout = setTimeout(this._endedHandler, (e - s) * 1e3);
  9703. if (this._loop != 0) {
  9704. this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0)
  9705. }
  9706. };
  9707. e._createAndPlayAudioNode = function(t, e) {
  9708. var s = i.context.createBufferSource();
  9709. s.buffer = this.playbackResource;
  9710. s.connect(this.panNode);
  9711. var r = this._duration * .001;
  9712. s.startTime = t + r;
  9713. s.start(s.startTime, e + this._startTime * .001, r - e);
  9714. return s
  9715. };
  9716. e._pause = function() {
  9717. this._position = (i.context.currentTime - this._playbackStartTime) * 1e3;
  9718. this.sourceNode = this._cleanUpAudioNode(this.sourceNode);
  9719. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);
  9720. if (this.gainNode.numberOfOutputs != 0) {
  9721. this.gainNode.disconnect(0)
  9722. }
  9723. clearTimeout(this._soundCompleteTimeout)
  9724. };
  9725. e._resume = function() {
  9726. this._handleSoundReady()
  9727. };
  9728. e._updateVolume = function() {
  9729. var t = this._muted ? 0 : this._volume;
  9730. if (t != this.gainNode.gain.value) {
  9731. this.gainNode.gain.value = t
  9732. }
  9733. };
  9734. e._calculateCurrentPosition = function() {
  9735. return (i.context.currentTime - this._playbackStartTime) * 1e3
  9736. };
  9737. e._updatePosition = function() {
  9738. this.sourceNode = this._cleanUpAudioNode(this.sourceNode);
  9739. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext);
  9740. clearTimeout(this._soundCompleteTimeout);
  9741. if (!this._paused) {
  9742. this._handleSoundReady()
  9743. }
  9744. };
  9745. e._handleLoop = function() {
  9746. this._cleanUpAudioNode(this.sourceNode);
  9747. this.sourceNode = this._sourceNodeNext;
  9748. this._playbackStartTime = this.sourceNode.startTime;
  9749. this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0);
  9750. this._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration)
  9751. };
  9752. e._updateDuration = function() {
  9753. this._pause();
  9754. this._resume()
  9755. };
  9756. createjs.WebAudioSoundInstance = createjs.promote(t, "AbstractSoundInstance")
  9757. })();
  9758. this.createjs = this.createjs || {};
  9759. (function() {
  9760. "use strict";
  9761. function t() {
  9762. this.AbstractPlugin_constructor();
  9763. this._panningModel = i._panningModel;
  9764. this._volume = 1;
  9765. this.context = i.context;
  9766. this.dynamicsCompressorNode = this.context.createDynamicsCompressor();
  9767. this.dynamicsCompressorNode.connect(this.context.destination);
  9768. this.gainNode = this.context.createGain();
  9769. this.gainNode.connect(this.dynamicsCompressorNode);
  9770. createjs.WebAudioSoundInstance.destinationNode = this.gainNode;
  9771. this._capabilities = i._capabilities;
  9772. this._loaderClass = createjs.WebAudioLoader;
  9773. this._soundInstanceClass = createjs.WebAudioSoundInstance;
  9774. this._addPropsToClasses()
  9775. }
  9776. var e = createjs.extend(t, createjs.AbstractPlugin);
  9777. var i = t;
  9778. i._capabilities = null;
  9779. i._panningModel = "equalpower";
  9780. i.context = null;
  9781. i.isSupported = function() {
  9782. var t = createjs.BrowserDetect.isIOS || createjs.BrowserDetect.isAndroid || createjs.BrowserDetect.isBlackberry;
  9783. if (location.protocol == "file:" && !t && !this._isFileXHRSupported()) {
  9784. return false
  9785. }
  9786. i._generateCapabilities();
  9787. if (i.context == null) {
  9788. return false
  9789. }
  9790. return true
  9791. };
  9792. i.playEmptySound = function() {
  9793. var t = i.context.createBufferSource();
  9794. t.buffer = i.context.createBuffer(1, 1, 22050);
  9795. t.connect(i.context.destination);
  9796. t.start(0, 0, 0)
  9797. };
  9798. i._isFileXHRSupported = function() {
  9799. var t = true;
  9800. var e = new XMLHttpRequest;
  9801. try {
  9802. e.open("GET", "WebAudioPluginTest.fail", false)
  9803. } catch (i) {
  9804. t = false;
  9805. return t
  9806. }
  9807. e.onerror = function() {
  9808. t = false
  9809. };
  9810. e.onload = function() {
  9811. t = this.status == 404 || (this.status == 200 || this.status == 0 && this.response != "")
  9812. };
  9813. try {
  9814. e.send()
  9815. } catch (i) {
  9816. t = false
  9817. }
  9818. return t
  9819. };
  9820. i._generateCapabilities = function() {
  9821. if (i._capabilities != null) {
  9822. return
  9823. }
  9824. var t = document.createElement("audio");
  9825. if (t.canPlayType == null) {
  9826. return null
  9827. }
  9828. if (i.context == null) {
  9829. if (window.AudioContext) {
  9830. i.context = new AudioContext
  9831. } else if (window.webkitAudioContext) {
  9832. i.context = new webkitAudioContext
  9833. } else {
  9834. return null
  9835. }
  9836. }
  9837. i._compatibilitySetUp();
  9838. i.playEmptySound();
  9839. i._capabilities = {
  9840. panning: true,
  9841. volume: true,
  9842. tracks: -1
  9843. };
  9844. var e = createjs.Sound.SUPPORTED_EXTENSIONS;
  9845. var s = createjs.Sound.EXTENSION_MAP;
  9846. for (var r = 0, n = e.length; r < n; r++) {
  9847. var a = e[r];
  9848. var o = s[a] || a;
  9849. i._capabilities[a] = t.canPlayType("audio/" + a) != "no" && t.canPlayType("audio/" + a) != "" || t.canPlayType("audio/" + o) != "no" && t.canPlayType("audio/" + o) != ""
  9850. }
  9851. if (i.context.destination.numberOfChannels < 2) {
  9852. i._capabilities.panning = false
  9853. }
  9854. };
  9855. i._compatibilitySetUp = function() {
  9856. i._panningModel = "equalpower";
  9857. if (i.context.createGain) {
  9858. return
  9859. }
  9860. i.context.createGain = i.context.createGainNode;
  9861. var t = i.context.createBufferSource();
  9862. t.__proto__.start = t.__proto__.noteGrainOn;
  9863. t.__proto__.stop = t.__proto__.noteOff;
  9864. i._panningModel = 0
  9865. };
  9866. e.toString = function() {
  9867. return "[WebAudioPlugin]"
  9868. };
  9869. e._addPropsToClasses = function() {
  9870. var t = this._soundInstanceClass;
  9871. t.context = this.context;
  9872. t.destinationNode = this.gainNode;
  9873. t._panningModel = this._panningModel;
  9874. this._loaderClass.context = this.context
  9875. };
  9876. e._updateVolume = function() {
  9877. var t = createjs.Sound._masterMute ? 0 : this._volume;
  9878. if (t != this.gainNode.gain.value) {
  9879. this.gainNode.gain.value = t
  9880. }
  9881. };
  9882. createjs.WebAudioPlugin = createjs.promote(t, "AbstractPlugin")
  9883. })();
  9884. this.createjs = this.createjs || {};
  9885. (function() {
  9886. "use strict";
  9887. function t(t) {
  9888. this.src = t;
  9889. this.length = 0;
  9890. this.available = 0;
  9891. this.tags = [];
  9892. this.duration = 0
  9893. }
  9894. var e = t.prototype;
  9895. e.constructor = t;
  9896. var i = t;
  9897. i.tags = {};
  9898. i.get = function(e) {
  9899. var s = i.tags[e];
  9900. if (s == null) {
  9901. s = i.tags[e] = new t(e)
  9902. }
  9903. return s
  9904. };
  9905. i.remove = function(t) {
  9906. var e = i.tags[t];
  9907. if (e == null) {
  9908. return false
  9909. }
  9910. e.removeAll();
  9911. delete i.tags[t];
  9912. return true
  9913. };
  9914. i.getInstance = function(t) {
  9915. var e = i.tags[t];
  9916. if (e == null) {
  9917. return null
  9918. }
  9919. return e.get()
  9920. };
  9921. i.setInstance = function(t, e) {
  9922. var s = i.tags[t];
  9923. if (s == null) {
  9924. return null
  9925. }
  9926. return s.set(e)
  9927. };
  9928. i.getDuration = function(t) {
  9929. var e = i.tags[t];
  9930. if (e == null) {
  9931. return 0
  9932. }
  9933. return e.getDuration()
  9934. };
  9935. e.add = function(t) {
  9936. this.tags.push(t);
  9937. this.length++;
  9938. this.available++
  9939. };
  9940. e.removeAll = function() {
  9941. var t;
  9942. while (this.length--) {
  9943. t = this.tags[this.length];
  9944. if (t.parentNode) {
  9945. t.parentNode.removeChild(t)
  9946. }
  9947. delete this.tags[this.length]
  9948. }
  9949. this.src = null;
  9950. this.tags.length = 0
  9951. };
  9952. e.get = function() {
  9953. if (this.tags.length == 0) {
  9954. return null
  9955. }
  9956. this.available = this.tags.length;
  9957. var t = this.tags.pop();
  9958. if (t.parentNode == null) {
  9959. document.body.appendChild(t)
  9960. }
  9961. return t
  9962. };
  9963. e.set = function(t) {
  9964. var e = createjs.indexOf(this.tags, t);
  9965. if (e == -1) {
  9966. this.tags.push(t)
  9967. }
  9968. this.available = this.tags.length
  9969. };
  9970. e.getDuration = function() {
  9971. if (!this.duration) {
  9972. this.duration = this.tags[this.tags.length - 1].duration * 1e3
  9973. }
  9974. return this.duration
  9975. };
  9976. e.toString = function() {
  9977. return "[HTMLAudioTagPool]"
  9978. };
  9979. createjs.HTMLAudioTagPool = t
  9980. })();
  9981. this.createjs = this.createjs || {};
  9982. (function() {
  9983. "use strict";
  9984. function t(t, e, i, s) {
  9985. this.AbstractSoundInstance_constructor(t, e, i, s);
  9986. this._audioSpriteStopTime = null;
  9987. this._delayTimeoutId = null;
  9988. this._endedHandler = createjs.proxy(this._handleSoundComplete, this);
  9989. this._readyHandler = createjs.proxy(this._handleTagReady, this);
  9990. this._stalledHandler = createjs.proxy(this.playFailed, this);
  9991. this._audioSpriteEndHandler = createjs.proxy(this._handleAudioSpriteLoop, this);
  9992. this._loopHandler = createjs.proxy(this._handleSoundComplete, this);
  9993. if (i) {
  9994. this._audioSpriteStopTime = (e + i) * .001
  9995. } else {
  9996. this._duration = createjs.HTMLAudioTagPool.getDuration(this.src)
  9997. }
  9998. }
  9999. var e = createjs.extend(t, createjs.AbstractSoundInstance);
  10000. e.setMasterVolume = function(t) {
  10001. this._updateVolume()
  10002. };
  10003. e.setMasterMute = function(t) {
  10004. this._updateVolume()
  10005. };
  10006. e.toString = function() {
  10007. return "[HTMLAudioSoundInstance]"
  10008. };
  10009. e._removeLooping = function() {
  10010. if (this._playbackResource == null) {
  10011. return
  10012. }
  10013. this._playbackResource.loop = false;
  10014. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false)
  10015. };
  10016. e._addLooping = function() {
  10017. if (this._playbackResource == null || this._audioSpriteStopTime) {
  10018. return
  10019. }
  10020. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);
  10021. this._playbackResource.loop = true
  10022. };
  10023. e._handleCleanUp = function() {
  10024. var t = this._playbackResource;
  10025. if (t != null) {
  10026. t.pause();
  10027. t.loop = false;
  10028. t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);
  10029. t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);
  10030. t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);
  10031. t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);
  10032. t.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false);
  10033. try {
  10034. t.currentTime = this._startTime
  10035. } catch (e) {}
  10036. createjs.HTMLAudioTagPool.setInstance(this.src, t);
  10037. this._playbackResource = null
  10038. }
  10039. };
  10040. e._beginPlaying = function(t, e, i, s) {
  10041. this._playbackResource = createjs.HTMLAudioTagPool.getInstance(this.src);
  10042. return this.AbstractSoundInstance__beginPlaying(t, e, i, s)
  10043. };
  10044. e._handleSoundReady = function(t) {
  10045. if (this._playbackResource.readyState !== 4) {
  10046. var e = this._playbackResource;
  10047. e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);
  10048. e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);
  10049. e.preload = "auto";
  10050. e.load();
  10051. return
  10052. }
  10053. this._updateVolume();
  10054. this._playbackResource.currentTime = (this._startTime + this._position) * .001;
  10055. if (this._audioSpriteStopTime) {
  10056. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false)
  10057. } else {
  10058. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);
  10059. if (this._loop != 0) {
  10060. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);
  10061. this._playbackResource.loop = true
  10062. }
  10063. }
  10064. this._playbackResource.play()
  10065. };
  10066. e._handleTagReady = function(t) {
  10067. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, false);
  10068. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, false);
  10069. this._handleSoundReady()
  10070. };
  10071. e._pause = function() {
  10072. this._playbackResource.pause()
  10073. };
  10074. e._resume = function() {
  10075. this._playbackResource.play()
  10076. };
  10077. e._updateVolume = function() {
  10078. if (this._playbackResource != null) {
  10079. var t = this._muted || createjs.Sound._masterMute ? 0 : this._volume * createjs.Sound._masterVolume;
  10080. if (t != this._playbackResource.volume) {
  10081. this._playbackResource.volume = t
  10082. }
  10083. }
  10084. };
  10085. e._calculateCurrentPosition = function() {
  10086. return this._playbackResource.currentTime * 1e3 - this._startTime
  10087. };
  10088. e._updatePosition = function() {
  10089. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false);
  10090. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);
  10091. try {
  10092. this._playbackResource.currentTime = (this._position + this._startTime) * .001
  10093. } catch (t) {
  10094. this._handleSetPositionSeek(null)
  10095. }
  10096. };
  10097. e._handleSetPositionSeek = function(t) {
  10098. if (this._playbackResource == null) {
  10099. return
  10100. }
  10101. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, false);
  10102. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false)
  10103. };
  10104. e._handleAudioSpriteLoop = function(t) {
  10105. if (this._playbackResource.currentTime <= this._audioSpriteStopTime) {
  10106. return
  10107. }
  10108. this._playbackResource.pause();
  10109. if (this._loop == 0) {
  10110. this._handleSoundComplete(null)
  10111. } else {
  10112. this._position = 0;
  10113. this._loop--;
  10114. this._playbackResource.currentTime = this._startTime * .001;
  10115. if (!this._paused) {
  10116. this._playbackResource.play()
  10117. }
  10118. this._sendEvent("loop")
  10119. }
  10120. };
  10121. e._handleLoop = function(t) {
  10122. if (this._loop == 0) {
  10123. this._playbackResource.loop = false;
  10124. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, false)
  10125. }
  10126. };
  10127. e._updateDuration = function() {
  10128. this._audioSpriteStopTime = (startTime + duration) * .001;
  10129. if (this.playState == createjs.Sound.PLAY_SUCCEEDED) {
  10130. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, false);
  10131. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, false)
  10132. }
  10133. };
  10134. createjs.HTMLAudioSoundInstance = createjs.promote(t, "AbstractSoundInstance")
  10135. })();
  10136. this.createjs = this.createjs || {};
  10137. (function() {
  10138. "use strict";
  10139. function t() {
  10140. this.AbstractPlugin_constructor();
  10141. this.defaultNumChannels = 2;
  10142. this._capabilities = i._capabilities;
  10143. this._loaderClass = createjs.SoundLoader;
  10144. this._soundInstanceClass = createjs.HTMLAudioSoundInstance
  10145. }
  10146. var e = createjs.extend(t, createjs.AbstractPlugin);
  10147. var i = t;
  10148. i.MAX_INSTANCES = 30;
  10149. i._AUDIO_READY = "canplaythrough";
  10150. i._AUDIO_ENDED = "ended";
  10151. i._AUDIO_SEEKED = "seeked";
  10152. i._AUDIO_STALLED = "stalled";
  10153. i._TIME_UPDATE = "timeupdate";
  10154. i._capabilities = null;
  10155. i.enableIOS = false;
  10156. i.isSupported = function() {
  10157. i._generateCapabilities();
  10158. if (i._capabilities == null) {
  10159. return false
  10160. }
  10161. return true
  10162. };
  10163. i._generateCapabilities = function() {
  10164. if (i._capabilities != null) {
  10165. return
  10166. }
  10167. var t = document.createElement("audio");
  10168. if (t.canPlayType == null) {
  10169. return null
  10170. }
  10171. i._capabilities = {
  10172. panning: true,
  10173. volume: true,
  10174. tracks: -1
  10175. };
  10176. var e = createjs.Sound.SUPPORTED_EXTENSIONS;
  10177. var s = createjs.Sound.EXTENSION_MAP;
  10178. for (var r = 0, n = e.length; r < n; r++) {
  10179. var a = e[r];
  10180. var o = s[a] || a;
  10181. i._capabilities[a] = t.canPlayType("audio/" + a) != "no" && t.canPlayType("audio/" + a) != "" || t.canPlayType("audio/" + o) != "no" && t.canPlayType("audio/" + o) != ""
  10182. }
  10183. };
  10184. e.register = function(t, e) {
  10185. var i = createjs.HTMLAudioTagPool.get(t.src);
  10186. var s = null;
  10187. for (var r = 0; r < e; r++) {
  10188. s = this._createTag(t.src);
  10189. i.add(s)
  10190. }
  10191. var n = this.AbstractPlugin_register(t, e);
  10192. n.setTag(s);
  10193. return n
  10194. };
  10195. e.removeSound = function(t) {
  10196. this.AbstractPlugin_removeSound(t);
  10197. createjs.HTMLAudioTagPool.remove(t)
  10198. };
  10199. e.create = function(t, e, i) {
  10200. var s = this.AbstractPlugin_create(t, e, i);
  10201. s.setPlaybackResource(null);
  10202. return s
  10203. };
  10204. e.toString = function() {
  10205. return "[HTMLAudioPlugin]"
  10206. };
  10207. e.setVolume = e.getVolume = e.setMute = null;
  10208. e._createTag = function(t) {
  10209. var e = document.createElement("audio");
  10210. e.autoplay = false;
  10211. e.preload = "none";
  10212. e.src = t;
  10213. return e
  10214. };
  10215. createjs.HTMLAudioPlugin = createjs.promote(t, "AbstractPlugin")
  10216. })();
  10217. this.createjs = this.createjs || {};
  10218. createjs.extend = function(t, e) {
  10219. "use strict";
  10220. function i() {
  10221. this.constructor = t
  10222. }
  10223. i.prototype = e.prototype;
  10224. return t.prototype = new i
  10225. };
  10226. this.createjs = this.createjs || {};
  10227. createjs.promote = function(t, e) {
  10228. "use strict";
  10229. var i = t.prototype,
  10230. s = Object.getPrototypeOf && Object.getPrototypeOf(i) || i.__proto__;
  10231. if (s) {
  10232. i[(e += "_") + "constructor"] = s.constructor;
  10233. for (var r in s) {
  10234. if (i.hasOwnProperty(r) && typeof s[r] == "function") {
  10235. i[e + r] = s[r]
  10236. }
  10237. }
  10238. }
  10239. return t
  10240. };
  10241. this.createjs = this.createjs || {};
  10242. (function() {
  10243. "use strict";
  10244. function t(t, e, i) {
  10245. this.type = t;
  10246. this.target = null;
  10247. this.currentTarget = null;
  10248. this.eventPhase = 0;
  10249. this.bubbles = !! e;
  10250. this.cancelable = !! i;
  10251. this.timeStamp = (new Date).getTime();
  10252. this.defaultPrevented = false;
  10253. this.propagationStopped = false;
  10254. this.immediatePropagationStopped = false;
  10255. this.removed = false
  10256. }
  10257. var e = t.prototype;
  10258. e.preventDefault = function() {
  10259. this.defaultPrevented = this.cancelable && true
  10260. };
  10261. e.stopPropagation = function() {
  10262. this.propagationStopped = true
  10263. };
  10264. e.stopImmediatePropagation = function() {
  10265. this.immediatePropagationStopped = this.propagationStopped = true
  10266. };
  10267. e.remove = function() {
  10268. this.removed = true
  10269. };
  10270. e.clone = function() {
  10271. return new t(this.type, this.bubbles, this.cancelable)
  10272. };
  10273. e.set = function(t) {
  10274. for (var e in t) {
  10275. this[e] = t[e]
  10276. }
  10277. return this
  10278. };
  10279. e.toString = function() {
  10280. return "[Event (type=" + this.type + ")]"
  10281. };
  10282. createjs.Event = t
  10283. })();
  10284. this.createjs = this.createjs || {};
  10285. (function() {
  10286. "use strict";
  10287. function t() {
  10288. this._listeners = null;
  10289. this._captureListeners = null
  10290. }
  10291. var e = t.prototype;
  10292. t.initialize = function(t) {
  10293. t.addEventListener = e.addEventListener;
  10294. t.on = e.on;
  10295. t.removeEventListener = t.off = e.removeEventListener;
  10296. t.removeAllEventListeners = e.removeAllEventListeners;
  10297. t.hasEventListener = e.hasEventListener;
  10298. t.dispatchEvent = e.dispatchEvent;
  10299. t._dispatchEvent = e._dispatchEvent;
  10300. t.willTrigger = e.willTrigger
  10301. };
  10302. e.addEventListener = function(t, e, i) {
  10303. var s;
  10304. if (i) {
  10305. s = this._captureListeners = this._captureListeners || {}
  10306. } else {
  10307. s = this._listeners = this._listeners || {}
  10308. }
  10309. var r = s[t];
  10310. if (r) {
  10311. this.removeEventListener(t, e, i)
  10312. }
  10313. r = s[t];
  10314. if (!r) {
  10315. s[t] = [e]
  10316. } else {
  10317. r.push(e)
  10318. }
  10319. return e
  10320. };
  10321. e.on = function(t, e, i, s, r, n) {
  10322. if (e.handleEvent) {
  10323. i = i || e;
  10324. e = e.handleEvent
  10325. }
  10326. i = i || this;
  10327. return this.addEventListener(t, function(t) {
  10328. e.call(i, t, r);
  10329. s && t.remove()
  10330. }, n)
  10331. };
  10332. e.removeEventListener = function(t, e, i) {
  10333. var s = i ? this._captureListeners : this._listeners;
  10334. if (!s) {
  10335. return
  10336. }
  10337. var r = s[t];
  10338. if (!r) {
  10339. return
  10340. }
  10341. for (var n = 0, a = r.length; n < a; n++) {
  10342. if (r[n] == e) {
  10343. if (a == 1) {
  10344. delete s[t]
  10345. } else {
  10346. r.splice(n, 1)
  10347. }
  10348. break
  10349. }
  10350. }
  10351. };
  10352. e.off = e.removeEventListener;
  10353. e.removeAllEventListeners = function(t) {
  10354. if (!t) {
  10355. this._listeners = this._captureListeners = null
  10356. } else {
  10357. if (this._listeners) {
  10358. delete this._listeners[t]
  10359. }
  10360. if (this._captureListeners) {
  10361. delete this._captureListeners[t]
  10362. }
  10363. }
  10364. };
  10365. e.dispatchEvent = function(t) {
  10366. if (typeof t == "string") {
  10367. var e = this._listeners;
  10368. if (!e || !e[t]) {
  10369. return false
  10370. }
  10371. t = new createjs.Event(t)
  10372. } else if (t.target && t.clone) {
  10373. t = t.clone()
  10374. }
  10375. try {
  10376. t.target = this
  10377. } catch (i) {}
  10378. if (!t.bubbles || !this.parent) {
  10379. this._dispatchEvent(t, 2)
  10380. } else {
  10381. var s = this,
  10382. r = [s];
  10383. while (s.parent) {
  10384. r.push(s = s.parent)
  10385. }
  10386. var n, a = r.length;
  10387. for (n = a - 1; n >= 0 && !t.propagationStopped; n--) {
  10388. r[n]._dispatchEvent(t, 1 + (n == 0))
  10389. }
  10390. for (n = 1; n < a && !t.propagationStopped; n++) {
  10391. r[n]._dispatchEvent(t, 3)
  10392. }
  10393. }
  10394. return t.defaultPrevented
  10395. };
  10396. e.hasEventListener = function(t) {
  10397. var e = this._listeners,
  10398. i = this._captureListeners;
  10399. return !!(e && e[t] || i && i[t])
  10400. };
  10401. e.willTrigger = function(t) {
  10402. var e = this;
  10403. while (e) {
  10404. if (e.hasEventListener(t)) {
  10405. return true
  10406. }
  10407. e = e.parent
  10408. }
  10409. return false
  10410. };
  10411. e.toString = function() {
  10412. return "[EventDispatcher]"
  10413. };
  10414. e._dispatchEvent = function(t, e) {
  10415. var i, s = e == 1 ? this._captureListeners : this._listeners;
  10416. if (t && s) {
  10417. var r = s[t.type];
  10418. if (!r || !(i = r.length)) {
  10419. return
  10420. }
  10421. try {
  10422. t.currentTarget = this
  10423. } catch (n) {}
  10424. try {
  10425. t.eventPhase = e
  10426. } catch (n) {}
  10427. t.removed = false;
  10428. r = r.slice();
  10429. for (var a = 0; a < i && !t.immediatePropagationStopped; a++) {
  10430. var o = r[a];
  10431. if (o.handleEvent) {
  10432. o.handleEvent(t)
  10433. } else {
  10434. o(t)
  10435. }
  10436. if (t.removed) {
  10437. this.off(t.type, o, e == 1);
  10438. t.removed = false
  10439. }
  10440. }
  10441. }
  10442. };
  10443. createjs.EventDispatcher = t
  10444. })();
  10445. this.createjs = this.createjs || {};
  10446. (function() {
  10447. "use strict";
  10448. function t() {
  10449. throw "Ticker cannot be instantiated."
  10450. }
  10451. t.RAF_SYNCHED = "synched";
  10452. t.RAF = "raf";
  10453. t.TIMEOUT = "timeout";
  10454. t.useRAF = false;
  10455. t.timingMode = null;
  10456. t.maxDelta = 0;
  10457. t.paused = false;
  10458. t.removeEventListener = null;
  10459. t.removeAllEventListeners = null;
  10460. t.dispatchEvent = null;
  10461. t.hasEventListener = null;
  10462. t._listeners = null;
  10463. createjs.EventDispatcher.initialize(t);
  10464. t._addEventListener = t.addEventListener;
  10465. t.addEventListener = function() {
  10466. !t._inited && t.init();
  10467. return t._addEventListener.apply(t, arguments)
  10468. };
  10469. t._inited = false;
  10470. t._startTime = 0;
  10471. t._pausedTime = 0;
  10472. t._ticks = 0;
  10473. t._pausedTicks = 0;
  10474. t._interval = 50;
  10475. t._lastTime = 0;
  10476. t._times = null;
  10477. t._tickTimes = null;
  10478. t._timerId = null;
  10479. t._raf = true;
  10480. t.setInterval = function(e) {
  10481. t._interval = e;
  10482. if (!t._inited) {
  10483. return
  10484. }
  10485. t._setupTick()
  10486. };
  10487. t.getInterval = function() {
  10488. return t._interval
  10489. };
  10490. t.setFPS = function(e) {
  10491. t.setInterval(1e3 / e)
  10492. };
  10493. t.getFPS = function() {
  10494. return 1e3 / t._interval
  10495. };
  10496. try {
  10497. Object.defineProperties(t, {
  10498. interval: {
  10499. get: t.getInterval,
  10500. set: t.setInterval
  10501. },
  10502. framerate: {
  10503. get: t.getFPS,
  10504. set: t.setFPS
  10505. }
  10506. })
  10507. } catch (e) {
  10508. console.log(e)
  10509. }
  10510. t.init = function() {
  10511. if (t._inited) {
  10512. return
  10513. }
  10514. t._inited = true;
  10515. t._times = [];
  10516. t._tickTimes = [];
  10517. t._startTime = t._getTime();
  10518. t._times.push(t._lastTime = 0);
  10519. t.interval = t._interval
  10520. };
  10521. t.reset = function() {
  10522. if (t._raf) {
  10523. var e = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  10524. e && e(t._timerId)
  10525. } else {
  10526. clearTimeout(t._timerId)
  10527. }
  10528. t.removeAllEventListeners("tick");
  10529. t._timerId = t._times = t._tickTimes = null;
  10530. t._startTime = t._lastTime = t._ticks = 0;
  10531. t._inited = false
  10532. };
  10533. t.getMeasuredTickTime = function(e) {
  10534. var i = 0,
  10535. s = t._tickTimes;
  10536. if (!s || s.length < 1) {
  10537. return -1
  10538. }
  10539. e = Math.min(s.length, e || t.getFPS() | 0);
  10540. for (var r = 0; r < e; r++) {
  10541. i += s[r]
  10542. }
  10543. return i / e
  10544. };
  10545. t.getMeasuredFPS = function(e) {
  10546. var i = t._times;
  10547. if (!i || i.length < 2) {
  10548. return -1
  10549. }
  10550. e = Math.min(i.length - 1, e || t.getFPS() | 0);
  10551. return 1e3 / ((i[0] - i[e]) / e)
  10552. };
  10553. t.setPaused = function(e) {
  10554. t.paused = e
  10555. };
  10556. t.getPaused = function() {
  10557. return t.paused
  10558. };
  10559. t.getTime = function(e) {
  10560. return t._startTime ? t._getTime() - (e ? t._pausedTime : 0) : -1
  10561. };
  10562. t.getEventTime = function(e) {
  10563. return t._startTime ? (t._lastTime || t._startTime) - (e ? t._pausedTime : 0) : -1
  10564. };
  10565. t.getTicks = function(e) {
  10566. return t._ticks - (e ? t._pausedTicks : 0)
  10567. };
  10568. t._handleSynch = function() {
  10569. t._timerId = null;
  10570. t._setupTick();
  10571. if (t._getTime() - t._lastTime >= (t._interval - 1) * .97) {
  10572. t._tick()
  10573. }
  10574. };
  10575. t._handleRAF = function() {
  10576. t._timerId = null;
  10577. t._setupTick();
  10578. t._tick()
  10579. };
  10580. t._handleTimeout = function() {
  10581. t._timerId = null;
  10582. t._setupTick();
  10583. t._tick()
  10584. };
  10585. t._setupTick = function() {
  10586. if (t._timerId != null) {
  10587. return
  10588. }
  10589. var e = t.timingMode || t.useRAF && t.RAF_SYNCHED;
  10590. if (e == t.RAF_SYNCHED || e == t.RAF) {
  10591. var i = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  10592. if (i) {
  10593. t._timerId = i(e == t.RAF ? t._handleRAF : t._handleSynch);
  10594. t._raf = true;
  10595. return
  10596. }
  10597. }
  10598. t._raf = false;
  10599. t._timerId = setTimeout(t._handleTimeout, t._interval)
  10600. };
  10601. t._tick = function() {
  10602. var e = t.paused;
  10603. var i = t._getTime();
  10604. var s = i - t._lastTime;
  10605. t._lastTime = i;
  10606. t._ticks++;
  10607. if (e) {
  10608. t._pausedTicks++;
  10609. t._pausedTime += s
  10610. }
  10611. if (t.hasEventListener("tick")) {
  10612. var r = new createjs.Event("tick");
  10613. var n = t.maxDelta;
  10614. r.delta = n && s > n ? n : s;
  10615. r.paused = e;
  10616. r.time = i;
  10617. r.runTime = i - t._pausedTime;
  10618. t.dispatchEvent(r)
  10619. }
  10620. t._tickTimes.unshift(t._getTime() - i);
  10621. while (t._tickTimes.length > 100) {
  10622. t._tickTimes.pop()
  10623. }
  10624. t._times.unshift(i);
  10625. while (t._times.length > 100) {
  10626. t._times.pop()
  10627. }
  10628. };
  10629. var i = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
  10630. t._getTime = function() {
  10631. return (i && i.call(performance) || (new Date).getTime()) - t._startTime
  10632. };
  10633. createjs.Ticker = t
  10634. })();
  10635. this.createjs = this.createjs || {};
  10636. (function() {
  10637. "use strict";
  10638. function t(e, i, s) {
  10639. this.ignoreGlobalPause = false;
  10640. this.loop = false;
  10641. this.duration = 0;
  10642. this.pluginData = s || {};
  10643. this.target = e;
  10644. this.position = null;
  10645. this.passive = false;
  10646. this._paused = false;
  10647. this._curQueueProps = {};
  10648. this._initQueueProps = {};
  10649. this._steps = [];
  10650. this._actions = [];
  10651. this._prevPosition = 0;
  10652. this._stepPosition = 0;
  10653. this._prevPos = -1;
  10654. this._target = e;
  10655. this._useTicks = false;
  10656. this._inited = false;
  10657. if (i) {
  10658. this._useTicks = i.useTicks;
  10659. this.ignoreGlobalPause = i.ignoreGlobalPause;
  10660. this.loop = i.loop;
  10661. i.onChange && this.addEventListener("change", i.onChange);
  10662. if (i.override) {
  10663. t.removeTweens(e)
  10664. }
  10665. }
  10666. if (i && i.paused) {
  10667. this._paused = true
  10668. } else {
  10669. createjs.Tween._register(this, true)
  10670. }
  10671. if (i && i.position != null) {
  10672. this.setPosition(i.position, t.NONE)
  10673. }
  10674. }
  10675. var e = createjs.extend(t, createjs.EventDispatcher);
  10676. t.NONE = 0;
  10677. t.LOOP = 1;
  10678. t.REVERSE = 2;
  10679. t.IGNORE = {};
  10680. t._tweens = [];
  10681. t._plugins = {};
  10682. t.get = function(e, i, s, r) {
  10683. if (r) {
  10684. t.removeTweens(e)
  10685. }
  10686. return new t(e, i, s)
  10687. };
  10688. t.tick = function(e, i) {
  10689. var s = t._tweens.slice();
  10690. for (var r = s.length - 1; r >= 0; r--) {
  10691. var n = s[r];
  10692. if (i && !n.ignoreGlobalPause || n._paused) {
  10693. continue
  10694. }
  10695. n.tick(n._useTicks ? 1 : e)
  10696. }
  10697. };
  10698. t.handleEvent = function(t) {
  10699. if (t.type == "tick") {
  10700. this.tick(t.delta, t.paused)
  10701. }
  10702. };
  10703. t.removeTweens = function(e) {
  10704. if (!e.tweenjs_count) {
  10705. return
  10706. }
  10707. var i = t._tweens;
  10708. for (var s = i.length - 1; s >= 0; s--) {
  10709. var r = i[s];
  10710. if (r._target == e) {
  10711. r._paused = true;
  10712. i.splice(s, 1)
  10713. }
  10714. }
  10715. e.tweenjs_count = 0
  10716. };
  10717. t.removeAllTweens = function() {
  10718. var e = t._tweens;
  10719. for (var i = 0, s = e.length; i < s; i++) {
  10720. var r = e[i];
  10721. r._paused = true;
  10722. if (r.target) r.target.tweenjs_count = 0
  10723. }
  10724. e.length = 0
  10725. };
  10726. t.hasActiveTweens = function(e) {
  10727. if (e) {
  10728. return e.tweenjs_count
  10729. }
  10730. return t._tweens && !! t._tweens.length
  10731. };
  10732. t.installPlugin = function(e, i) {
  10733. var s = e.priority;
  10734. if (s == null) {
  10735. e.priority = s = 0
  10736. }
  10737. for (var r = 0, n = i.length, a = t._plugins; r < n; r++) {
  10738. var o = i[r];
  10739. if (!a[o]) {
  10740. a[o] = [e]
  10741. } else {
  10742. var h = a[o];
  10743. for (var c = 0, u = h.length; c < u; c++) {
  10744. if (s < h[c].priority) {
  10745. break
  10746. }
  10747. }
  10748. a[o].splice(c, 0, e)
  10749. }
  10750. }
  10751. };
  10752. t._register = function(e, i) {
  10753. var s = e._target;
  10754. var r = t._tweens;
  10755. if (i) {
  10756. if (s) {
  10757. s.tweenjs_count = s.tweenjs_count ? s.tweenjs_count + 1 : 1
  10758. }
  10759. r.push(e);
  10760. if (!t._inited && createjs.Ticker) {
  10761. createjs.Ticker.addEventListener("tick", t);
  10762. t._inited = true
  10763. }
  10764. } else {
  10765. if (s) {
  10766. s.tweenjs_count--
  10767. }
  10768. var n = r.length;
  10769. while (n--) {
  10770. if (r[n] == e) {
  10771. r.splice(n, 1);
  10772. return
  10773. }
  10774. }
  10775. }
  10776. };
  10777. e.wait = function(t, e) {
  10778. if (t == null || t <= 0) {
  10779. return this
  10780. }
  10781. var i = this._cloneProps(this._curQueueProps);
  10782. return this._addStep({
  10783. d: t,
  10784. p0: i,
  10785. e: this._linearEase,
  10786. p1: i,
  10787. v: e
  10788. })
  10789. };
  10790. e.to = function(t, e, i) {
  10791. if (isNaN(e) || e < 0) {
  10792. e = 0
  10793. }
  10794. return this._addStep({
  10795. d: e || 0,
  10796. p0: this._cloneProps(this._curQueueProps),
  10797. e: i,
  10798. p1: this._cloneProps(this._appendQueueProps(t))
  10799. })
  10800. };
  10801. e.call = function(t, e, i) {
  10802. return this._addAction({
  10803. f: t,
  10804. p: e ? e : [this],
  10805. o: i ? i : this._target
  10806. })
  10807. };
  10808. e.set = function(t, e) {
  10809. return this._addAction({
  10810. f: this._set,
  10811. o: this,
  10812. p: [t, e ? e : this._target]
  10813. })
  10814. };
  10815. e.play = function(t) {
  10816. if (!t) {
  10817. t = this
  10818. }
  10819. return this.call(t.setPaused, [false], t)
  10820. };
  10821. e.pause = function(t) {
  10822. if (!t) {
  10823. t = this
  10824. }
  10825. return this.call(t.setPaused, [true], t)
  10826. };
  10827. e.setPosition = function(t, e) {
  10828. if (t < 0) {
  10829. t = 0
  10830. }
  10831. if (e == null) {
  10832. e = 1
  10833. }
  10834. var i = t;
  10835. var s = false;
  10836. if (i >= this.duration) {
  10837. if (this.loop) {
  10838. i = i % this.duration
  10839. } else {
  10840. i = this.duration;
  10841. s = true
  10842. }
  10843. }
  10844. if (i == this._prevPos) {
  10845. return s
  10846. }
  10847. var r = this._prevPos;
  10848. this.position = this._prevPos = i;
  10849. this._prevPosition = t;
  10850. if (this._target) {
  10851. if (s) {
  10852. this._updateTargetProps(null, 1)
  10853. } else if (this._steps.length > 0) {
  10854. for (var n = 0, a = this._steps.length; n < a; n++) {
  10855. if (this._steps[n].t > i) {
  10856. break
  10857. }
  10858. }
  10859. var o = this._steps[n - 1];
  10860. this._updateTargetProps(o, (this._stepPosition = i - o.t) / o.d)
  10861. }
  10862. }
  10863. if (e != 0 && this._actions.length > 0) {
  10864. if (this._useTicks) {
  10865. this._runActions(i, i)
  10866. } else if (e == 1 && i < r) {
  10867. if (r != this.duration) {
  10868. this._runActions(r, this.duration)
  10869. }
  10870. this._runActions(0, i, true)
  10871. } else {
  10872. this._runActions(r, i)
  10873. }
  10874. }
  10875. if (s) {
  10876. this.setPaused(true)
  10877. }
  10878. this.dispatchEvent("change");
  10879. return s
  10880. };
  10881. e.tick = function(t) {
  10882. if (this._paused) {
  10883. return
  10884. }
  10885. this.setPosition(this._prevPosition + t)
  10886. };
  10887. e.setPaused = function(e) {
  10888. if (this._paused === !! e) {
  10889. return this
  10890. }
  10891. this._paused = !! e;
  10892. t._register(this, !e);
  10893. return this
  10894. };
  10895. e.w = e.wait;
  10896. e.t = e.to;
  10897. e.c = e.call;
  10898. e.s = e.set;
  10899. e.toString = function() {
  10900. return "[Tween]"
  10901. };
  10902. e.clone = function() {
  10903. throw "Tween can not be cloned."
  10904. };
  10905. e._updateTargetProps = function(e, i) {
  10906. var s, r, n, a, o, h;
  10907. if (!e && i == 1) {
  10908. this.passive = false;
  10909. s = r = this._curQueueProps
  10910. } else {
  10911. this.passive = !! e.v;
  10912. if (this.passive) {
  10913. return
  10914. }
  10915. if (e.e) {
  10916. i = e.e(i, 0, 1, 1)
  10917. }
  10918. s = e.p0;
  10919. r = e.p1
  10920. }
  10921. for (var c in this._initQueueProps) {
  10922. if ((a = s[c]) == null) {
  10923. s[c] = a = this._initQueueProps[c]
  10924. }
  10925. if ((o = r[c]) == null) {
  10926. r[c] = o = a
  10927. }
  10928. if (a == o || i == 0 || i == 1 || typeof a != "number") {
  10929. n = i == 1 ? o : a
  10930. } else {
  10931. n = a + (o - a) * i
  10932. }
  10933. var u = false;
  10934. if (h = t._plugins[c]) {
  10935. for (var l = 0, d = h.length; l < d; l++) {
  10936. var f = h[l].tween(this, c, n, s, r, i, !! e && s == r, !e);
  10937. if (f == t.IGNORE) {
  10938. u = true
  10939. } else {
  10940. n = f
  10941. }
  10942. }
  10943. }
  10944. if (!u) {
  10945. this._target[c] = n
  10946. }
  10947. }
  10948. };
  10949. e._runActions = function(t, e, i) {
  10950. var s = t;
  10951. var r = e;
  10952. var n = -1;
  10953. var a = this._actions.length;
  10954. var o = 1;
  10955. if (t > e) {
  10956. s = e;
  10957. r = t;
  10958. n = a;
  10959. a = o = -1
  10960. }
  10961. while ((n += o) != a) {
  10962. var h = this._actions[n];
  10963. var c = h.t;
  10964. if (c == r || c > s && c < r || i && c == t) {
  10965. h.f.apply(h.o, h.p)
  10966. }
  10967. }
  10968. };
  10969. e._appendQueueProps = function(e) {
  10970. var i, s, r, n, a;
  10971. for (var o in e) {
  10972. if (this._initQueueProps[o] === undefined) {
  10973. s = this._target[o];
  10974. if (i = t._plugins[o]) {
  10975. for (r = 0, n = i.length; r < n; r++) {
  10976. s = i[r].init(this, o, s)
  10977. }
  10978. }
  10979. this._initQueueProps[o] = this._curQueueProps[o] = s === undefined ? null : s
  10980. } else {
  10981. s = this._curQueueProps[o]
  10982. }
  10983. }
  10984. for (var o in e) {
  10985. s = this._curQueueProps[o];
  10986. if (i = t._plugins[o]) {
  10987. a = a || {};
  10988. for (r = 0, n = i.length; r < n; r++) {
  10989. if (i[r].step) {
  10990. i[r].step(this, o, s, e[o], a)
  10991. }
  10992. }
  10993. }
  10994. this._curQueueProps[o] = e[o]
  10995. }
  10996. if (a) {
  10997. this._appendQueueProps(a)
  10998. }
  10999. return this._curQueueProps
  11000. };
  11001. e._cloneProps = function(t) {
  11002. var e = {};
  11003. for (var i in t) {
  11004. e[i] = t[i]
  11005. }
  11006. return e
  11007. };
  11008. e._addStep = function(t) {
  11009. if (t.d > 0) {
  11010. this._steps.push(t);
  11011. t.t = this.duration;
  11012. this.duration += t.d
  11013. }
  11014. return this
  11015. };
  11016. e._addAction = function(t) {
  11017. t.t = this.duration;
  11018. this._actions.push(t);
  11019. return this
  11020. };
  11021. e._set = function(t, e) {
  11022. for (var i in t) {
  11023. e[i] = t[i]
  11024. }
  11025. };
  11026. createjs.Tween = createjs.promote(t, "EventDispatcher")
  11027. })();
  11028. this.createjs = this.createjs || {};
  11029. (function() {
  11030. "use strict";
  11031. function t(t, e, i) {
  11032. this.EventDispatcher_constructor();
  11033. this.ignoreGlobalPause = false;
  11034. this.duration = 0;
  11035. this.loop = false;
  11036. this.position = null;
  11037. this._paused = false;
  11038. this._tweens = [];
  11039. this._labels = null;
  11040. this._labelList = null;
  11041. this._prevPosition = 0;
  11042. this._prevPos = -1;
  11043. this._useTicks = false;
  11044. if (i) {
  11045. this._useTicks = i.useTicks;
  11046. this.loop = i.loop;
  11047. this.ignoreGlobalPause = i.ignoreGlobalPause;
  11048. i.onChange && this.addEventListener("change", i.onChange)
  11049. }
  11050. if (t) {
  11051. this.addTween.apply(this, t)
  11052. }
  11053. this.setLabels(e);
  11054. if (i && i.paused) {
  11055. this._paused = true
  11056. } else {
  11057. createjs.Tween._register(this, true)
  11058. }
  11059. if (i && i.position != null) {
  11060. this.setPosition(i.position, createjs.Tween.NONE)
  11061. }
  11062. }
  11063. var e = createjs.extend(t, createjs.EventDispatcher);
  11064. e.addTween = function(t) {
  11065. var e = arguments.length;
  11066. if (e > 1) {
  11067. for (var i = 0; i < e; i++) {
  11068. this.addTween(arguments[i])
  11069. }
  11070. return arguments[0]
  11071. } else if (e == 0) {
  11072. return null
  11073. }
  11074. this.removeTween(t);
  11075. this._tweens.push(t);
  11076. t.setPaused(true);
  11077. t._paused = false;
  11078. t._useTicks = this._useTicks;
  11079. if (t.duration > this.duration) {
  11080. this.duration = t.duration
  11081. }
  11082. if (this._prevPos >= 0) {
  11083. t.setPosition(this._prevPos, createjs.Tween.NONE)
  11084. }
  11085. return t
  11086. };
  11087. e.removeTween = function(t) {
  11088. var e = arguments.length;
  11089. if (e > 1) {
  11090. var i = true;
  11091. for (var s = 0; s < e; s++) {
  11092. i = i && this.removeTween(arguments[s])
  11093. }
  11094. return i
  11095. } else if (e == 0) {
  11096. return false
  11097. }
  11098. var r = this._tweens;
  11099. var s = r.length;
  11100. while (s--) {
  11101. if (r[s] == t) {
  11102. r.splice(s, 1);
  11103. if (t.duration >= this.duration) {
  11104. this.updateDuration()
  11105. }
  11106. return true
  11107. }
  11108. }
  11109. return false
  11110. };
  11111. e.addLabel = function(t, e) {
  11112. this._labels[t] = e;
  11113. var i = this._labelList;
  11114. if (i) {
  11115. for (var s = 0, r = i.length; s < r; s++) {
  11116. if (e < i[s].position) {
  11117. break
  11118. }
  11119. }
  11120. i.splice(s, 0, {
  11121. label: t,
  11122. position: e
  11123. })
  11124. }
  11125. };
  11126. e.setLabels = function(t) {
  11127. this._labels = t ? t : {}
  11128. };
  11129. e.getLabels = function() {
  11130. var t = this._labelList;
  11131. if (!t) {
  11132. t = this._labelList = [];
  11133. var e = this._labels;
  11134. for (var i in e) {
  11135. t.push({
  11136. label: i,
  11137. position: e[i]
  11138. })
  11139. }
  11140. t.sort(function(t, e) {
  11141. return t.position - e.position
  11142. })
  11143. }
  11144. return t
  11145. };
  11146. e.getCurrentLabel = function() {
  11147. var t = this.getLabels();
  11148. var e = this.position;
  11149. var i = t.length;
  11150. if (i) {
  11151. for (var s = 0; s < i; s++) {
  11152. if (e < t[s].position) {
  11153. break
  11154. }
  11155. }
  11156. return s == 0 ? null : t[s - 1].label
  11157. }
  11158. return null
  11159. };
  11160. e.gotoAndPlay = function(t) {
  11161. this.setPaused(false);
  11162. this._goto(t)
  11163. };
  11164. e.gotoAndStop = function(t) {
  11165. this.setPaused(true);
  11166. this._goto(t)
  11167. };
  11168. e.setPosition = function(t, e) {
  11169. if (t < 0) {
  11170. t = 0
  11171. }
  11172. var i = this.loop ? t % this.duration : t;
  11173. var s = !this.loop && t >= this.duration;
  11174. if (i == this._prevPos) {
  11175. return s
  11176. }
  11177. this._prevPosition = t;
  11178. this.position = this._prevPos = i;
  11179. for (var r = 0, n = this._tweens.length; r < n; r++) {
  11180. this._tweens[r].setPosition(i, e);
  11181. if (i != this._prevPos) {
  11182. return false
  11183. }
  11184. }
  11185. if (s) {
  11186. this.setPaused(true)
  11187. }
  11188. this.dispatchEvent("change");
  11189. return s
  11190. };
  11191. e.setPaused = function(t) {
  11192. this._paused = !! t;
  11193. createjs.Tween._register(this, !t)
  11194. };
  11195. e.updateDuration = function() {
  11196. this.duration = 0;
  11197. for (var t = 0, e = this._tweens.length; t < e; t++) {
  11198. var i = this._tweens[t];
  11199. if (i.duration > this.duration) {
  11200. this.duration = i.duration
  11201. }
  11202. }
  11203. };
  11204. e.tick = function(t) {
  11205. this.setPosition(this._prevPosition + t)
  11206. };
  11207. e.resolve = function(t) {
  11208. var e = Number(t);
  11209. if (isNaN(e)) {
  11210. e = this._labels[t]
  11211. }
  11212. return e
  11213. };
  11214. e.toString = function() {
  11215. return "[Timeline]"
  11216. };
  11217. e.clone = function() {
  11218. throw "Timeline can not be cloned."
  11219. };
  11220. e._goto = function(t) {
  11221. var e = this.resolve(t);
  11222. if (e != null) {
  11223. this.setPosition(e)
  11224. }
  11225. };
  11226. createjs.Timeline = createjs.promote(t, "EventDispatcher")
  11227. })();
  11228. this.createjs = this.createjs || {};
  11229. (function() {
  11230. "use strict";
  11231. function t() {
  11232. throw "Ease cannot be instantiated."
  11233. }
  11234. t.linear = function(t) {
  11235. return t
  11236. };
  11237. t.none = t.linear;
  11238. t.get = function(t) {
  11239. if (t < -1) {
  11240. t = -1
  11241. }
  11242. if (t > 1) {
  11243. t = 1
  11244. }
  11245. return function(e) {
  11246. if (t == 0) {
  11247. return e
  11248. }
  11249. if (t < 0) {
  11250. return e * (e * -t + 1 + t)
  11251. }
  11252. return e * ((2 - e) * t + (1 - t))
  11253. }
  11254. };
  11255. t.getPowIn = function(t) {
  11256. return function(e) {
  11257. return Math.pow(e, t)
  11258. }
  11259. };
  11260. t.getPowOut = function(t) {
  11261. return function(e) {
  11262. return 1 - Math.pow(1 - e, t)
  11263. }
  11264. };
  11265. t.getPowInOut = function(t) {
  11266. return function(e) {
  11267. if ((e *= 2) < 1) return .5 * Math.pow(e, t);
  11268. return 1 - .5 * Math.abs(Math.pow(2 - e, t))
  11269. }
  11270. };
  11271. t.quadIn = t.getPowIn(2);
  11272. t.quadOut = t.getPowOut(2);
  11273. t.quadInOut = t.getPowInOut(2);
  11274. t.cubicIn = t.getPowIn(3);
  11275. t.cubicOut = t.getPowOut(3);
  11276. t.cubicInOut = t.getPowInOut(3);
  11277. t.quartIn = t.getPowIn(4);
  11278. t.quartOut = t.getPowOut(4);
  11279. t.quartInOut = t.getPowInOut(4);
  11280. t.quintIn = t.getPowIn(5);
  11281. t.quintOut = t.getPowOut(5);
  11282. t.quintInOut = t.getPowInOut(5);
  11283. t.sineIn = function(t) {
  11284. return 1 - Math.cos(t * Math.PI / 2)
  11285. };
  11286. t.sineOut = function(t) {
  11287. return Math.sin(t * Math.PI / 2)
  11288. };
  11289. t.sineInOut = function(t) {
  11290. return -.5 * (Math.cos(Math.PI * t) - 1)
  11291. };
  11292. t.getBackIn = function(t) {
  11293. return function(e) {
  11294. return e * e * ((t + 1) * e - t)
  11295. }
  11296. };
  11297. t.backIn = t.getBackIn(1.7);
  11298. t.getBackOut = function(t) {
  11299. return function(e) {
  11300. return --e * e * ((t + 1) * e + t) + 1
  11301. }
  11302. };
  11303. t.backOut = t.getBackOut(1.7);
  11304. t.getBackInOut = function(t) {
  11305. t *= 1.525;
  11306. return function(e) {
  11307. if ((e *= 2) < 1) return .5 * (e * e * ((t + 1) * e - t));
  11308. return .5 * ((e -= 2) * e * ((t + 1) * e + t) + 2)
  11309. }
  11310. };
  11311. t.backInOut = t.getBackInOut(1.7);
  11312. t.circIn = function(t) {
  11313. return -(Math.sqrt(1 - t * t) - 1)
  11314. };
  11315. t.circOut = function(t) {
  11316. return Math.sqrt(1 - --t * t)
  11317. };
  11318. t.circInOut = function(t) {
  11319. if ((t *= 2) < 1) return -.5 * (Math.sqrt(1 - t * t) - 1);
  11320. return .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  11321. };
  11322. t.bounceIn = function(e) {
  11323. return 1 - t.bounceOut(1 - e)
  11324. };
  11325. t.bounceOut = function(t) {
  11326. if (t < 1 / 2.75) {
  11327. return 7.5625 * t * t
  11328. } else if (t < 2 / 2.75) {
  11329. return 7.5625 * (t -= 1.5 / 2.75) * t + .75
  11330. } else if (t < 2.5 / 2.75) {
  11331. return 7.5625 * (t -= 2.25 / 2.75) * t + .9375
  11332. } else {
  11333. return 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  11334. }
  11335. };
  11336. t.bounceInOut = function(e) {
  11337. if (e < .5) return t.bounceIn(e * 2) * .5;
  11338. return t.bounceOut(e * 2 - 1) * .5 + .5
  11339. };
  11340. t.getElasticIn = function(t, e) {
  11341. var i = Math.PI * 2;
  11342. return function(s) {
  11343. if (s == 0 || s == 1) return s;
  11344. var r = e / i * Math.asin(1 / t);
  11345. return -(t * Math.pow(2, 10 * (s -= 1)) * Math.sin((s - r) * i / e))
  11346. }
  11347. };
  11348. t.elasticIn = t.getElasticIn(1, .3);
  11349. t.getElasticOut = function(t, e) {
  11350. var i = Math.PI * 2;
  11351. return function(s) {
  11352. if (s == 0 || s == 1) return s;
  11353. var r = e / i * Math.asin(1 / t);
  11354. return t * Math.pow(2, -10 * s) * Math.sin((s - r) * i / e) + 1
  11355. }
  11356. };
  11357. t.elasticOut = t.getElasticOut(1, .3);
  11358. t.getElasticInOut = function(t, e) {
  11359. var i = Math.PI * 2;
  11360. return function(s) {
  11361. var r = e / i * Math.asin(1 / t);
  11362. if ((s *= 2) < 1) return -.5 * (t * Math.pow(2, 10 * (s -= 1)) * Math.sin((s - r) * i / e));
  11363. return t * Math.pow(2, -10 * (s -= 1)) * Math.sin((s - r) * i / e) * .5 + 1
  11364. }
  11365. };
  11366. t.elasticInOut = t.getElasticInOut(1, .3 * 1.5);
  11367. createjs.Ease = t
  11368. })();
  11369. this.createjs = this.createjs || {};
  11370. (function() {
  11371. "use strict";
  11372. function t() {
  11373. throw "MotionGuidePlugin cannot be instantiated."
  11374. }
  11375. t.priority = 0;
  11376. t._rotOffS;
  11377. t._rotOffE;
  11378. t._rotNormS;
  11379. t._rotNormE;
  11380. t.install = function() {
  11381. createjs.Tween.installPlugin(t, ["guide", "x", "y", "rotation"]);
  11382. return createjs.Tween.IGNORE
  11383. };
  11384. t.init = function(t, e, i) {
  11385. var s = t.target;
  11386. if (!s.hasOwnProperty("x")) {
  11387. s.x = 0
  11388. }
  11389. if (!s.hasOwnProperty("y")) {
  11390. s.y = 0
  11391. }
  11392. if (!s.hasOwnProperty("rotation")) {
  11393. s.rotation = 0
  11394. }
  11395. if (e == "rotation") {
  11396. t.__needsRot = true
  11397. }
  11398. return e == "guide" ? null : i
  11399. };
  11400. t.step = function(e, i, s, r, n) {
  11401. if (i == "rotation") {
  11402. e.__rotGlobalS = s;
  11403. e.__rotGlobalE = r;
  11404. t.testRotData(e, n)
  11405. }
  11406. if (i != "guide") {
  11407. return r
  11408. }
  11409. var a, o = r;
  11410. if (!o.hasOwnProperty("path")) {
  11411. o.path = []
  11412. }
  11413. var h = o.path;
  11414. if (!o.hasOwnProperty("end")) {
  11415. o.end = 1
  11416. }
  11417. if (!o.hasOwnProperty("start")) {
  11418. o.start = s && s.hasOwnProperty("end") && s.path === h ? s.end : 0
  11419. }
  11420. if (o.hasOwnProperty("_segments") && o._length) {
  11421. return r
  11422. }
  11423. var c = h.length;
  11424. var u = 10;
  11425. if (c >= 6 && (c - 2) % 4 == 0) {
  11426. o._segments = [];
  11427. o._length = 0;
  11428. for (var l = 2; l < c; l += 4) {
  11429. var d = h[l - 2],
  11430. f = h[l - 1];
  11431. var _ = h[l + 0],
  11432. p = h[l + 1];
  11433. var g = h[l + 2],
  11434. v = h[l + 3];
  11435. var m = d,
  11436. y = f;
  11437. var j, b, E = 0;
  11438. var w = [];
  11439. for (var T = 1; T <= u; T++) {
  11440. var S = T / u;
  11441. var x = 1 - S;
  11442. j = x * x * d + 2 * x * S * _ + S * S * g;
  11443. b = x * x * f + 2 * x * S * p + S * S * v;
  11444. E += w[w.push(Math.sqrt((a = j - m) * a + (a = b - y) * a)) - 1];
  11445. m = j;
  11446. y = b
  11447. }
  11448. o._segments.push(E);
  11449. o._segments.push(w);
  11450. o._length += E
  11451. }
  11452. } else {
  11453. throw "invalid 'path' data, please see documentation for valid paths"
  11454. }
  11455. a = o.orient;
  11456. o.orient = true;
  11457. var L = {};
  11458. t.calc(o, o.start, L);
  11459. e.__rotPathS = Number(L.rotation.toFixed(5));
  11460. t.calc(o, o.end, L);
  11461. e.__rotPathE = Number(L.rotation.toFixed(5));
  11462. o.orient = false;
  11463. t.calc(o, o.end, n);
  11464. o.orient = a;
  11465. if (!o.orient) {
  11466. return r
  11467. }
  11468. e.__guideData = o;
  11469. t.testRotData(e, n);
  11470. return r
  11471. };
  11472. t.testRotData = function(t, e) {
  11473. if (t.__rotGlobalS === undefined || t.__rotGlobalE === undefined) {
  11474. if (t.__needsRot) {
  11475. return
  11476. }
  11477. if (t._curQueueProps.rotation !== undefined) {
  11478. t.__rotGlobalS = t.__rotGlobalE = t._curQueueProps.rotation
  11479. } else {
  11480. t.__rotGlobalS = t.__rotGlobalE = e.rotation = t.target.rotation || 0
  11481. }
  11482. }
  11483. if (t.__guideData === undefined) {
  11484. return
  11485. }
  11486. var i = t.__guideData;
  11487. var s = t.__rotGlobalE - t.__rotGlobalS;
  11488. var r = t.__rotPathE - t.__rotPathS;
  11489. var n = s - r;
  11490. if (i.orient == "auto") {
  11491. if (n > 180) {
  11492. n -= 360
  11493. } else if (n < -180) {
  11494. n += 360
  11495. }
  11496. } else if (i.orient == "cw") {
  11497. while (n < 0) {
  11498. n += 360
  11499. }
  11500. if (n == 0 && s > 0 && s != 180) {
  11501. n += 360
  11502. }
  11503. } else if (i.orient == "ccw") {
  11504. n = s - (r > 180 ? 360 - r : r);
  11505. while (n > 0) {
  11506. n -= 360
  11507. }
  11508. if (n == 0 && s < 0 && s != -180) {
  11509. n -= 360
  11510. }
  11511. }
  11512. i.rotDelta = n;
  11513. i.rotOffS = t.__rotGlobalS - t.__rotPathS;
  11514. t.__rotGlobalS = t.__rotGlobalE = t.__guideData = t.__needsRot = undefined
  11515. };
  11516. t.tween = function(e, i, s, r, n, a, o, h) {
  11517. var c = n.guide;
  11518. if (c == undefined || c === r.guide) {
  11519. return s
  11520. }
  11521. if (c.lastRatio != a) {
  11522. var u = (c.end - c.start) * (o ? c.end : a) + c.start;
  11523. t.calc(c, u, e.target);
  11524. switch (c.orient) {
  11525. case "cw":
  11526. case "ccw":
  11527. case "auto":
  11528. e.target.rotation += c.rotOffS + c.rotDelta * a;
  11529. break;
  11530. case "fixed":
  11531. default:
  11532. e.target.rotation += c.rotOffS;
  11533. break
  11534. }
  11535. c.lastRatio = a
  11536. }
  11537. if (i == "rotation" && (!c.orient || c.orient == "false")) {
  11538. return s
  11539. }
  11540. return e.target[i]
  11541. };
  11542. t.calc = function(e, i, s) {
  11543. if (e._segments == undefined) {
  11544. t.validate(e)
  11545. }
  11546. if (s == undefined) {
  11547. s = {
  11548. x: 0,
  11549. y: 0,
  11550. rotation: 0
  11551. }
  11552. }
  11553. var r = e._segments;
  11554. var n = e.path;
  11555. var a = e._length * i;
  11556. var o = r.length - 2;
  11557. var h = 0;
  11558. while (a > r[h] && h < o) {
  11559. a -= r[h];
  11560. h += 2
  11561. }
  11562. var c = r[h + 1];
  11563. var u = 0;
  11564. o = c.length - 1;
  11565. while (a > c[u] && u < o) {
  11566. a -= c[u];
  11567. u++
  11568. }
  11569. var l = u / ++o + a / (o * c[u]);
  11570. h = h * 2 + 2;
  11571. var d = 1 - l;
  11572. s.x = d * d * n[h - 2] + 2 * d * l * n[h + 0] + l * l * n[h + 2];
  11573. s.y = d * d * n[h - 1] + 2 * d * l * n[h + 1] + l * l * n[h + 3];
  11574. if (e.orient) {
  11575. s.rotation = 57.2957795 * Math.atan2((n[h + 1] - n[h - 1]) * d + (n[h + 3] - n[h + 1]) * l, (n[h + 0] - n[h - 2]) * d + (n[h + 2] - n[h + 0]) * l)
  11576. }
  11577. return s
  11578. };
  11579. createjs.MotionGuidePlugin = t
  11580. })();
  11581. this.createjs = this.createjs || {};
  11582. (function() {
  11583. "use strict";
  11584. var t = createjs.TweenJS = createjs.TweenJS || {};
  11585. t.version = "0.6.0";
  11586. t.buildDate = "Thu, 11 Dec 2014 23:32:09 GMT"
  11587. })();
  11588. this.comp = this.comp || {};
  11589. (function() {
  11590. function t(t, e, i, s) {
  11591. this.Container_constructor();
  11592. this._sprite;
  11593. this._current;
  11594. this._normal;
  11595. this._pressed;
  11596. this.useBg = s;
  11597. this._bg;
  11598. this._callback;
  11599. this._scope;
  11600. this._params;
  11601. this.reactDelay = 50;
  11602. this._py = 5;
  11603. this.setup(t, e, i)
  11604. }
  11605. var e = createjs.extend(t, createjs.Container);
  11606. t.STATE_NORMAL = "normal";
  11607. t.STATE_PRESSED = "pressed";
  11608. e.setup = function(e, i, s) {
  11609. this._current = t.STATE_NORMAL;
  11610. this._sprite = new createjs.Sprite(e);
  11611. this.addChild(this._sprite);
  11612. this._normal = i;
  11613. this._pressed = s || this._normal;
  11614. this.setState(this._current);
  11615. if (this.useBg) {
  11616. this._bg = new createjs.Shape;
  11617. var r = this.getBounds();
  11618. this._bg.graphics.beginFill("white").drawRect(0, 0, r.width, r.height);
  11619. this._bg.cache(0, 0, r.width, r.height);
  11620. this.hitArea = this._bg
  11621. }
  11622. this.mouseChildren = false;
  11623. this.on("mousedown", this.onPressed);
  11624. this.on("pressup", this.onReleased);
  11625. this.on("click", this.onClick)
  11626. };
  11627. e.onPressed = function(e) {
  11628. this.setState(t.STATE_PRESSED)
  11629. };
  11630. e.onReleased = function(e) {
  11631. this.setState(t.STATE_NORMAL)
  11632. };
  11633. e.onClick = function(e) {
  11634. this.setState(t.STATE_NORMAL);
  11635. createjs.Tween.get(this, {
  11636. override: true
  11637. }).wait(this.reactDelay).call(this._callback, this._params, this._scope)
  11638. };
  11639. e.initCallback = function(t, e) {
  11640. this._callback = t;
  11641. this._scope = e;
  11642. var i = [];
  11643. for (var s = 2; s < arguments.length; s++) {
  11644. i[s - 2] = arguments[s]
  11645. }
  11646. this._params = i
  11647. };
  11648. e.setState = function(e) {
  11649. if (e == t.STATE_NORMAL) {
  11650. this._sprite.gotoAndStop(this._normal);
  11651. this._sprite.y = 0
  11652. } else {
  11653. this._sprite.gotoAndStop(this._pressed);
  11654. this._sprite.y = this._py
  11655. }
  11656. };
  11657. comp.Button = createjs.promote(t, "Container")
  11658. })();
  11659. this.comp = this.comp || {};
  11660. (function() {
  11661. function t() {
  11662. this.Container_constructor();
  11663. this.setup()
  11664. }
  11665. var e = createjs.extend(t, createjs.Container);
  11666. e.setup = function() {
  11667. var t;
  11668. var e = new createjs.Sprite(g.texture, "title");
  11669. t = e.getBounds();
  11670. e.set({
  11671. x: (g.w - t.width) / 2,
  11672. y: 200
  11673. });
  11674. this.addChild(e);
  11675. var i = new comp.Button(g.texture, "btn_start", "btn_start");
  11676. i.initCallback(g.onNotifications, g, "button_start");
  11677. t = i.getBounds();
  11678. i.set({
  11679. x: (g.w - t.width) / 2,
  11680. y: 522
  11681. });
  11682. this.addChild(i);
  11683. var s = new createjs.Sprite(g.texture, "bot");
  11684. t = s.getBounds();
  11685. s.set({
  11686. x: (g.w - t.width) / 2,
  11687. y: g.h - t.height
  11688. });
  11689. this.addChild(s)
  11690. };
  11691. e.fade = function() {
  11692. if (this.parent) this.parent.removeChild(this)
  11693. };
  11694. comp.Cover = createjs.promote(t, "Container")
  11695. })();
  11696. this.comp = this.comp || {};
  11697. createjs.Sprite.prototype.snapToPixel = true;
  11698. (function() {
  11699. var t = function() {
  11700. this.initialize();
  11701. this.canTap = false;
  11702. this.running = false
  11703. };
  11704. t.InitLine;
  11705. t.MissLine;
  11706. t.CycleLine;
  11707. var e = t.prototype = new createjs.Container;
  11708. e.Container_initialize = e.initialize;
  11709. e.initialize = function() {
  11710. this.Container_initialize();
  11711. var t = new createjs.Tween
  11712. };
  11713. e.enter = function() {
  11714. this.canTap = false;
  11715. this.running = false;
  11716. t.InitLine = g.h - 2 * g.config.divY;
  11717. t.MissLine = g.h;
  11718. t.CycleLine = g.h + 2 * g.config.divY;
  11719. for (var e = 0; e < g.config.rowCount; e++) {
  11720. var i = comp.RowKeys.get();
  11721. i.y = -g.config.divY;
  11722. this.addChildAt(i, 0);
  11723. i.layout(e);
  11724. createjs.Tween.get(i).wait(e * 50).to({
  11725. y: t.InitLine - e * g.config.divY
  11726. }, 300, createjs.Ease.sineOut)
  11727. }
  11728. createjs.Tween.get(this).wait(e * 50 + 300).set({
  11729. canTap: true
  11730. }, this)
  11731. };
  11732. e.clear = function() {
  11733. this.removeAllChildren();
  11734. this.y = 0;
  11735. this.canTap = false
  11736. };
  11737. comp.Grids = t
  11738. })();
  11739. (function() {
  11740. var t = function() {
  11741. this.initialize();
  11742. this.rowIndex;
  11743. this.clicked;
  11744. this.correctKey;
  11745. this.correctCol;
  11746. this.incorrectKey;
  11747. this.inccorectCol
  11748. };
  11749. var e = t.prototype = new createjs.Container;
  11750. e.Container_initialize = e.initialize;
  11751. e.initialize = function() {
  11752. this.Container_initialize();
  11753. this.clicked = false;
  11754. this.correctKey = new createjs.Sprite(g.texture, "correct_normal");
  11755. this.correctNote = new createjs.Bitmap(g.l.getResult("note"));
  11756. this.incorrectKey = new createjs.Sprite(g.texture, "incorrect_normal")
  11757. };
  11758. e.layout = function(t) {
  11759. this.removeAllChildren();
  11760. this.incorrectCol = this.correctCol = -1;
  11761. this.incorrectKey.gotoAndStop("incorrect_normal");
  11762. createjs.Tween.removeTweens(this.correctKey);
  11763. this.correctKey.alpha = 1;
  11764. this.correctKey.gotoAndStop("correct_normal");
  11765. this.clicked = false;
  11766. this.rowIndex = t;
  11767. var e = may.Arrays.disorder(Math.random() > .5 && Math.random() * 300 < t ? [2, 1, 0, 0] : [2, 0, 0, 0]);
  11768. for (var i = 0; i < e.length; i++) {
  11769. if (e[i] == 2) {
  11770. this.addChild(this.correctKey);
  11771. this.correctCol = i;
  11772. this.correctKey.x = i * g.config.divX
  11773. } else if (e[i] == 1) {
  11774. this.addChild(this.incorrectKey);
  11775. this.incorrectCol = i;
  11776. this.incorrectKey.x = i * g.config.divX
  11777. }
  11778. }
  11779. };
  11780. e.correctAnimation = function() {
  11781. this.clicked = true;
  11782. this.addChildAt(this.correctNote, 0);
  11783. this.correctNote.x = this.correctKey.x + 45;
  11784. this.correctNote.y = this.correctKey.y + 52;
  11785. createjs.Tween.get(this.correctKey, {
  11786. override: true
  11787. }).to({
  11788. alpha: 0
  11789. }, 200)
  11790. };
  11791. e.getKeyByCol = function(e) {
  11792. var i;
  11793. if (e == this.incorrectCol) {
  11794. i = this.incorrectKey;
  11795. i.gotoAndStop("incorrect_pressed")
  11796. } else {
  11797. i = t.getShape();
  11798. this.addChild(i);
  11799. i.x = e * g.config.divX
  11800. }
  11801. return i
  11802. };
  11803. t._pools = [];
  11804. t._cachedShape;
  11805. t.getShape = function() {
  11806. if (!this._cachedShape) {
  11807. this._cachedShape = new createjs.Shape;
  11808. this._cachedShape.graphics.clear().beginFill("red").drawRoundRect(0, 0, g.config.divX, g.config.divY, 15).endFill();
  11809. this._cachedShape.cache(0, 0, g.config.divX, g.config.divY)
  11810. }
  11811. this._cachedShape.alpha = 1;
  11812. return this._cachedShape
  11813. };
  11814. t.get = function() {
  11815. return this._pools.length ? this._pools.push() : new t
  11816. };
  11817. t.retrieve = function(t) {
  11818. if (t.parent) t.parent.removeChild(t);
  11819. this._pools.push(t)
  11820. };
  11821. comp.RowKeys = t
  11822. })();
  11823. this.comp = this.comp || {};
  11824. (function() {
  11825. function t() {
  11826. this.Container_constructor();
  11827. this.setup()
  11828. }
  11829. var e = createjs.extend(t, createjs.Container);
  11830. e.setup = function() {
  11831. var t = new createjs.Shape;
  11832. t.graphics.clear().beginFill("black").drawRect(0, 0, g.w, g.h).endFill();
  11833. t.cache(0, 0, g.w, g.h);
  11834. t.alpha = .5;
  11835. this.addChild(t);
  11836. var e = new createjs.Sprite(g.texture, "hint");
  11837. var i = e.getBounds();
  11838. e.set({
  11839. x: (g.w - i.width) / 2,
  11840. y: (g.h - i.height) / 2
  11841. });
  11842. this.addChild(e)
  11843. };
  11844. e.enter = function() {
  11845. g.obj.main.addChild(this);
  11846. this.alpha = 0;
  11847. createjs.Tween.get(this, {
  11848. override: true
  11849. }).to({
  11850. alpha: 1
  11851. }, 500, createjs.Ease.sineOut)
  11852. };
  11853. e.fade = function() {
  11854. if (this.parent) this.parent.removeChild(this)
  11855. };
  11856. comp.Hint = createjs.promote(t, "Container")
  11857. })();
  11858. var g = {
  11859. w: 640,
  11860. h: 1136,
  11861. obj: {
  11862. stage: null,
  11863. main: null,
  11864. bg: null,
  11865. cover: null,
  11866. hint: null,
  11867. grids: null,
  11868. scoreTF: null,
  11869. scoreText: null,
  11870. fpsText: null,
  11871. vText: null
  11872. },
  11873. highest: 0,
  11874. isAndroid: false,
  11875. l: null,
  11876. texture: null,
  11877. config: {
  11878. fps: 60,
  11879. debug: false,
  11880. grading: [0, 100, 200],
  11881. rowCount: 10,
  11882. divX: 160,
  11883. divY: 160,
  11884. scrollVy: 300,
  11885. scrollAy: 4
  11886. },
  11887. music: [
  11888. [25, 21, 22, 23, 24, 25, 21, 21, 26, 24, 25, 26, 27, 31, 21, 21, 24, 25, 24, 23, 22, 23, 24, 23, 22, 21, 17, 21, 22, 23, 21, 22, 25, 21, 22, 23, 24, 25, 21, 21, 26, 24, 25, 26, 27, 31, 21, 21, 24, 25, 24, 23, 22, 23, 24, 23, 22, 21, 22, 23, 22, 21, 17, 21],
  11889. [23, 22, 21, 17, 16, 15, 16, 17, 21, 17, 16, 15, 14, 13, 14, 12, 21, 17, 21, 11, 7, 15, 12, 13, 11, 21, 17, 16, 17, 23, 25, 26, 24, 23, 22, 24, 24, 23, 21, 17, 16, 15, 14, 13, 12, 14, 13, 12, 11, 12, 13, 14, 15, 12, 15, 14, 13, 16, 15, 14, 15, 14, 13, 12, 11, 6, 16, 17, 21, 17, 16, 15, 14, 13, 12, 16, 15, 16, 15, 14, 13, 23, 22, 21, 22, 21, 23, 22, 24, 25, 23, 24, 25, 23, 24, 25, 15, 16, 17, 21, 22, 23, 24, 23, 21, 22, 23, 13, 14, 15, 16, 15, 14, 15, 13, 14, 15, 14, 16, 15, 14, 13, 12, 13, 12, 11, 12, 13, 14, 15, 16, 14, 16, 15, 16, 17, 21, 15, 16, 17, 21, 22, 23, 24, 25, 23, 21, 22, 23, 22, 21, 22, 17, 21, 22, 23, 22, 21, 17, 21, 16, 17, 21, 11, 12, 13, 14, 13, 12, 13, 21, 17, 21, 16, 21, 17, 16, 15, 14, 15, 14, 13, 14, 15, 16, 17, 11, 16, 21, 17, 21, 17, 16, 17, 21, 22, 21, 17, 21, 16, 17, 23, 13, 14, 13, 12, 22, 23, 22, 21, 13, 11, 16, 15, 5, 4, 5, 6, 16, 17, 16, 17, 5, 4, 5, 6, 16, 15, 16, 17, 17, 16, 17, 11, 21, 22, 21, 17, 7, 11, 7, 6, 16, 15, 16, 17, 7, 13, 12, 11, 21, 22, 24, 23, 13, 15, 23, 21, 24, 23, 24, 22, 15, 14, 15, 13, 21, 17, 21, 13, 15, 15, 16, 17, 15, 13, 21, 22, 23, 21, 23, 23, 22, 21, 17, 16, 16, 15, 16, 17, 21, 23, 22, 21, 23]
  11890. ],
  11891. steps: {
  11892. cover: "cover",
  11893. hint: "hint",
  11894. game: "game",
  11895. wait: "wait"
  11896. },
  11897. played: false,
  11898. status: {},
  11899. init: function() {
  11900. g.isAndroid = createjs.BrowserDetect.isAndroid;
  11901. var t = g.isAndroid ? {
  11902. w: 320,
  11903. h: 568
  11904. } : {
  11905. w: 640,
  11906. h: 1136
  11907. };
  11908. var e = document.getElementById("gameCanvas");
  11909. e.width = t.w;
  11910. e.height = t.h;
  11911. may.Utils.addCanvasResize("gameCanvas", t.w, t.h);
  11912. g.l = new createjs.LoadQueue(true, window["meiriq_game"].resourceCDN + "resource/assets/");
  11913. g.l.on("complete", g.assetsReady);
  11914. g.l.installPlugin(createjs.Sound);
  11915. var i = [1];
  11916. for (var s = 0; s < g.music.length; s++) {
  11917. var r = g.music[s];
  11918. for (var n = 0; n < r.length; n++) if (i.indexOf(r[n]) == -1) i.push(r[n])
  11919. }
  11920. for (var a = 0; a < i.length; a++) i[a] = {
  11921. src: "mp3/sound_" + i[a] + ".mp3",
  11922. id: "snd_" + i[a]
  11923. };
  11924. var o = [{
  11925. src: "images/bg.png",
  11926. type: "image",
  11927. id: "bg"
  11928. }, {
  11929. src: "images/note.png",
  11930. type: "image",
  11931. id: "note"
  11932. }, {
  11933. src: "images/num_sheet.json",
  11934. type: "spritesheet",
  11935. id: "num_sheet"
  11936. }, {
  11937. src: "images/game_sheet.json",
  11938. type: "spritesheet",
  11939. id: "game_sheet"
  11940. }];
  11941. o = o.concat(i);
  11942. g.l.loadManifest(o)
  11943. },
  11944. assetsReady: function(t) {
  11945. g.l.off("complete", g.assetsReady);
  11946. g.createWorld()
  11947. },
  11948. createWorld: function() {
  11949. g.obj.stage = new createjs.Stage("gameCanvas");
  11950. g.texture = g.l.getResult("game_sheet");
  11951. g.obj.main = new createjs.Container;
  11952. g.obj.stage.addChild(g.obj.main);
  11953. g.obj.main.scaleX = g.obj.main.scaleY = g.isAndroid ? .5 : 1;
  11954. g.obj.bg = new createjs.Bitmap(g.l.getResult("bg"));
  11955. g.obj.main.addChild(g.obj.bg);
  11956. g.obj.cover = new comp.Cover;
  11957. g.obj.hint = new comp.Hint;
  11958. g.obj.grids = new comp.Grids;
  11959. g.obj.grids.x = 0;
  11960. g.obj.main.addChild(g.obj.grids);
  11961. var t = g.l.getResult("num_sheet");
  11962. var e = new createjs.BitmapText("0", t);
  11963. var i = e.getBounds();
  11964. e.x = g.w - i.width >> 1;
  11965. e.y = 20;
  11966. g.obj.scoreTF = e;
  11967. g.obj.scoreText = new createjs.Text("0", "50px Helvetica", "#F00");
  11968. g.obj.scoreText.textBaseline = "top";
  11969. g.obj.scoreText.textAlign = "center";
  11970. g.obj.scoreText.x = 320;
  11971. g.obj.scoreText.y = 10;
  11972. g.obj.fpsText = new createjs.Text("FPS:", "50px Arial", "#F00");
  11973. g.obj.fpsText.textBaseline = "top";
  11974. g.obj.fpsText.textAlign = "left";
  11975. g.obj.fpsText.x = 10;
  11976. g.obj.fpsText.y = 60;
  11977. g.obj.vText = new createjs.Text("Current Velocity:", "50px Arial", "#F00");
  11978. g.obj.vText.textBaseline = "top";
  11979. g.obj.vText.textAlign = "left";
  11980. g.obj.vText.x = 10;
  11981. g.obj.vText.y = 110;
  11982. if (g.config.debug) {
  11983. g.obj.main.addChild(g.obj.scoreText);
  11984. g.obj.main.addChild(g.obj.fpsText);
  11985. g.obj.main.addChild(g.obj.vText);
  11986. document.onkeydown = createjs.proxy(g.onDebugControl, g)
  11987. }
  11988. createjs.Touch.enable(g.obj.stage, true);
  11989. createjs.Ticker.timingMode = createjs.Ticker.RAF_SYNCHED;
  11990. createjs.Ticker.setFPS(60);
  11991. createjs.Ticker.on("tick", g.onTick);
  11992. g.obj.stage.on("stagemousedown", g.onTapDown);
  11993. g.obj.stage.snapToPixelEnabled = true;
  11994. g.reset();
  11995. g.obj.stage.update();
  11996. window["meiriq_game"].cb_finishload();
  11997. window["home"] = g.reset;
  11998. window["pause"] = g.pause;
  11999. window["resume"] = g.resume;
  12000. window["home_context"] = g;
  12001. window["pause_context"] = g;
  12002. window["resume_context"] = g
  12003. },
  12004. onDebugControl: function(t) {
  12005. if (!e) {
  12006. var e = window.event
  12007. }
  12008. switch (e.keyCode) {
  12009. case 32:
  12010. createjs.Ticker.paused ? this.resume() : this.pause();
  12011. break;
  12012. case 13:
  12013. this.reset();
  12014. break;
  12015. case 78:
  12016. this.dispatchEvent(new createjs.Event(g.Events.LEVEL_PASSED));
  12017. break
  12018. }
  12019. t.preventDefault()
  12020. },
  12021. pause: function() {
  12022. createjs.Ticker.paused = true;
  12023. g.obj.stage.mouseChildren = false
  12024. },
  12025. resume: function() {
  12026. createjs.Ticker.paused = false;
  12027. g.obj.stage.mouseChildren = true
  12028. },
  12029. reset: function() {
  12030. g.status = {
  12031. step: g.steps.cover,
  12032. music: may.Arrays.random(g.music),
  12033. noteIndex: 0,
  12034. score: 0,
  12035. distY: 0,
  12036. keyCount: 0,
  12037. currentVy: g.config.scrollVy,
  12038. vy: g.config.scrollVy
  12039. };
  12040. g.updateScoreText();
  12041. createjs.Tween.removeAllTweens();
  12042. g.obj.main.removeChild(g.obj.scoreTF);
  12043. g.obj.main.addChild(g.obj.cover);
  12044. g.obj.hint.fade();
  12045. g.obj.grids.clear();
  12046. g.obj.grids.canTap = g.obj.grids.running = false
  12047. },
  12048. onNotifications: function(t) {
  12049. switch (t) {
  12050. case "button_start":
  12051. if (!window["meiriq_game"].cb_start()) return;
  12052. g.obj.scoreTF.y = -100;
  12053. g.obj.main.addChild(g.obj.scoreTF);
  12054. createjs.Tween.get(g.obj.scoreTF, {
  12055. override: true
  12056. }).wait(200).to({
  12057. alpha: 1,
  12058. y: 20
  12059. }, 300, createjs.Ease.cubicOut);
  12060. g.obj.cover.fade();
  12061. g.obj.grids.enter();
  12062. if (g.played) {
  12063. g.status.step = g.steps.game
  12064. } else {
  12065. g.played = true;
  12066. g.status.step = g.steps.hint;
  12067. g.obj.hint.enter()
  12068. }
  12069. break;
  12070. case "game_over":
  12071. var e = 0;
  12072. for (var i = 0; i < g.config.grading.length; i++) if (g.status.score >= g.config.grading[i]) e++;
  12073. window["meiriq_game"].cb_gameover(g.status.score, "images/level" + e + ".png");
  12074. break
  12075. }
  12076. },
  12077. onTapDown: function(t) {
  12078. if (createjs.Ticker.paused) return;
  12079. if (g.status.step == g.steps.hint) {
  12080. g.obj.hint.fade();
  12081. g.status.step = g.steps.game
  12082. } else if (g.status.step == g.steps.game && g.obj.grids.canTap) {
  12083. var e = g.obj.grids;
  12084. var i = g.obj.main.globalToLocal(t.stageX, t.stageY);
  12085. for (var s = 0; s < e.numChildren; s++) {
  12086. var r = e.getChildAt(s);
  12087. if (r && r.rowIndex == g.status.score) {
  12088. g.obj.target = r;
  12089. break
  12090. }
  12091. }
  12092. if (Math.abs(i.y - (g.obj.target.y + g.config.divY / 2)) < g.config.divY) {
  12093. var n;
  12094. if (Math.abs(i.x - (g.obj.target.correctKey.x + g.config.divX / 2)) < g.config.divX * .75) {
  12095. if (!e.running) e.running = true;
  12096. g.obj.target.correctAnimation();
  12097. g.playSound(g.status.music[g.status.noteIndex]);
  12098. g.status.noteIndex++;
  12099. if (g.status.noteIndex == g.status.music.length) {
  12100. g.status.music = may.Arrays.random(g.music);
  12101. g.status.noteIndex = 0
  12102. }
  12103. g.status.score++;
  12104. g.updateScoreText()
  12105. } else {
  12106. e.canTap = false;
  12107. e.running = false;
  12108. n = Math.floor(i.x / g.config.divX);
  12109. var a = g.obj.target.getKeyByCol(n);
  12110. g.playSound(1);
  12111. var o = createjs.Ease.sineInOut;
  12112. var h = createjs.Tween.get(a).to({
  12113. alpha: 0
  12114. }, 150, o).to({
  12115. alpha: 1
  12116. }, 150, o).to({
  12117. alpha: 0
  12118. }, 150, o).to({
  12119. alpha: 1
  12120. }, 150, o).to({
  12121. alpha: 0
  12122. }, 150, o);
  12123. a instanceof createjs.Shape ? h.wait(150).call(g.onNotifications, ["game_over"], g) : h.to({
  12124. alpha: 1
  12125. }, 150, o).call(g.onNotifications, ["game_over"], g)
  12126. }
  12127. }
  12128. }
  12129. },
  12130. onTick: function(t) {
  12131. if (t.paused) return;
  12132. g.obj.fpsText.text = "FPS: " + Math.round(createjs.Ticker.getMeasuredFPS()) + ". Delta: " + Math.round(t.delta);
  12133. g.updateGrids(t.delta / 1e3);
  12134. g.obj.stage.update()
  12135. },
  12136. updateGrids: function(t) {
  12137. var e = g.obj.grids;
  12138. if (!e.running) return;
  12139. g.status.vy += g.config.scrollAy * t;
  12140. g.status.currentVy = g.status.vy;
  12141. var i = g.status.currentVy * t;
  12142. g.status.distY += i;
  12143. g.status.keyCount = g.status.distY % g.config.divY;
  12144. for (var s = 0; s < e.numChildren; s++) {
  12145. var r = e.getChildAt(s);
  12146. if (r) {
  12147. r.y += i;
  12148. if (r.y > comp.Grids.CycleLine) {
  12149. r.y -= g.config.divY * g.config.rowCount;
  12150. r.layout(r.rowIndex + g.config.rowCount);
  12151. e.addChildAt(r, 0)
  12152. } else if (r.y > comp.Grids.MissLine && r.clicked == false) {
  12153. g.keyMissed(r)
  12154. }
  12155. }
  12156. }
  12157. g.obj.vText.text = "Current Velocity: " + Math.round(g.status.currentVy * t)
  12158. },
  12159. keyMissed: function(t) {
  12160. g.obj.grids.canTap = false;
  12161. g.obj.grids.running = false;
  12162. g.playSound(1);
  12163. var e = g.status.distY % g.config.divY + 2 * g.config.divY;
  12164. var i = createjs.Ease.sineInOut;
  12165. createjs.Tween.get(g.obj.grids).to({
  12166. y: -1 * e
  12167. }, 200, createjs.Ease.sineOut);
  12168. createjs.Tween.get(t.correctKey).to({
  12169. alpha: 0
  12170. }, 150, i).to({
  12171. alpha: 1
  12172. }, 150, i).to({
  12173. alpha: 0
  12174. }, 150, i).to({
  12175. alpha: 1
  12176. }, 150, i).to({
  12177. alpha: 0
  12178. }, 150, i).to({
  12179. alpha: 1
  12180. }, 150, i).call(g.onNotifications, ["game_over"], g)
  12181. },
  12182. playSound: function(t) {
  12183. if (g.isAndroid) createjs.Sound.stop();
  12184. createjs.Sound.play("snd_" + t)
  12185. },
  12186. updateScoreText: function() {
  12187. g.obj.scoreTF.text = g.status.score + "";
  12188. var t = g.obj.scoreTF.getBounds();
  12189. g.obj.scoreTF.x = g.w - t.width >> 1;
  12190. g.obj.scoreText.text = g.status.score + ""
  12191. }
  12192. };
  12193. this.may = this.may || {};
  12194. (function() {
  12195. function t() {
  12196. throw "Utils cannot be instantiated."
  12197. }
  12198. t.NO_SCALE = 0;
  12199. t.EXACT_FIT = 1;
  12200. t.SHOW_ALL = 2;
  12201. t.NO_BORDER = 3;
  12202. t.scaleMode = 0;
  12203. t._canvas;
  12204. t._cw;
  12205. t._ch;
  12206. t.addCanvasResize = function e(i, s, r, n, a) {
  12207. t._canvas = document.getElementById(i);
  12208. t._cw = s;
  12209. t._ch = r;
  12210. t.scaleMode = n == undefined ? t.isMobile() ? t.EXACT_FIT : t.SHOW_ALL : n;
  12211. t._resizeStageEvent();
  12212. if (a) window.addEventListener("orientationchange", t._resizeStageEvent)
  12213. };
  12214. t._resizeStageEvent = function() {
  12215. var e = t._canvas;
  12216. var i = t._cw;
  12217. var s = t._ch;
  12218. switch (t.scaleMode) {
  12219. case t.EXACT_FIT:
  12220. e.style.height = window.innerHeight + "px";
  12221. e.style.width = window.innerWidth + "px";
  12222. break;
  12223. case t.SHOW_ALL:
  12224. if (window.innerWidth / window.innerHeight > i / s) {
  12225. e.style.height = window.innerHeight + "px";
  12226. e.style.width = window.innerHeight * i / s + "px";
  12227. e.style.marginTop = "0px";
  12228. e.style.marginLeft = (window.innerWidth - window.innerHeight * i / s) / 2 + "px"
  12229. } else {
  12230. e.style.width = window.innerWidth + "px";
  12231. e.style.height = window.innerWidth / (i / s) + "px";
  12232. e.style.marginTop = (window.innerHeight - window.innerWidth / (i / s)) / 2 + "px";
  12233. e.style.marginLeft = "0px"
  12234. }
  12235. break;
  12236. case t.NO_BORDER:
  12237. if (window.innerWidth / window.innerHeight > i / s) {
  12238. e.style.width = window.innerWidth + "px";
  12239. e.style.height = window.innerWidth / (i / s) + "px";
  12240. e.style.marginTop = (window.innerHeight - window.innerWidth / (i / s)) / 2 + "px";
  12241. e.style.marginLeft = "0px"
  12242. } else {
  12243. e.style.height = window.innerHeight + "px";
  12244. e.style.width = window.innerHeight * i / s + "px";
  12245. e.style.marginTop = "0px";
  12246. e.style.marginLeft = (window.innerWidth - window.innerHeight * i / s) / 2 + "px"
  12247. }
  12248. break
  12249. }
  12250. };
  12251. t.isMobile = function() {
  12252. var t = navigator.userAgent.toLowerCase();
  12253. var e = ["android", "iphone", "symbianos", "windows phone", "ipad", "ipod"];
  12254. var i = false;
  12255. for (var s = 0; s < e.length; s++) {
  12256. if (t.indexOf(e[s]) > 0) {
  12257. i = e[s];
  12258. break
  12259. }
  12260. }
  12261. return i
  12262. };
  12263. t.extractSheet = function(t) {
  12264. var e = {};
  12265. for (var i = 0; i < t.animations.length; i++) {
  12266. var s = createjs.SpriteSheetUtils.extractFrame(t, i);
  12267. e[t.animations[i]] = s;
  12268. console.log(t.animations[i], s)
  12269. }
  12270. return e
  12271. };
  12272. t.getDefinitionName = function(t) {
  12273. if (typeof t != "object" || t === null) return false;
  12274. else return /(\w+)\(/.exec(t.constructor.toString())[1]
  12275. };
  12276. may.Utils = t
  12277. })();
  12278. (function() {
  12279. function t() {
  12280. throw "Interface cannot be instantiated."
  12281. }
  12282. t.CB_START = "cb_start";
  12283. t.CB_GAMEOVER = "cb_gameover";
  12284. t.CB_FINISHLOAD = "cb_finishload";
  12285. t.CB_RESTART = "cb_restart";
  12286. t.CB_SHARE = "cb_share";
  12287. t.CB_MORE = "cb_more";
  12288. t.STORAGE_KEY = "crazywheelScore";
  12289. t.call = function(t, e) {
  12290. var i = [];
  12291. for (var s = 1; s < arguments.length; s++) {
  12292. i[s - 1] = arguments[s]
  12293. }
  12294. if (window[t] instanceof Function) window[t].apply(null, i);
  12295. else console.log("Try to call global function('" + t + "') but NO SUCH FUNCTION defined.")
  12296. };
  12297. t.saveObj = function(t) {
  12298. localStorage.setItem(this.STORAGE_KEY, JSON.stringify(t))
  12299. };
  12300. t.getSavedObj = function() {
  12301. var t;
  12302. if (localStorage && localStorage.getItem(this.STORAGE_KEY)) t = JSON.parse(localStorage.getItem(this.STORAGE_KEY));
  12303. return t
  12304. };
  12305. may.Interface = t
  12306. })();
  12307. (function() {
  12308. function t() {
  12309. throw "Math cannot be instantiated."
  12310. }
  12311. t.formatMathDeg = function(t) {
  12312. while (t > Math.PI) t -= 2 * Math.PI;
  12313. while (t < -Math.PI) t += 2 * Math.PI;
  12314. return t
  12315. };
  12316. t.formatRotationDeg = function(t) {
  12317. while (t >= 2 * Math.PI) t -= 2 * Math.PI;
  12318. while (t < 0) t += 2 * Math.PI;
  12319. return t
  12320. };
  12321. t.inRadiusRange = function(t, e, i) {
  12322. var s = true;
  12323. t = this.formatMathDeg(t);
  12324. e = this.formatMathDeg(e);
  12325. i = this.formatMathDeg(i);
  12326. if (e <= i) s = t >= e && t <= i;
  12327. else s = t >= e && t <= Math.PI || t <= i && t >= -Math.PI;
  12328. return s
  12329. };
  12330. t.randomNum = function(t, e) {
  12331. return Math.random() * (e - t) + t
  12332. };
  12333. t.randomInt = function(t, e) {
  12334. var i = Math.max(t, e) + 1;
  12335. var s = Math.min(t, e);
  12336. return Math.floor(this.randomNum(s, i))
  12337. };
  12338. t.map = function(t, e, i, s, r) {
  12339. return (r - s) * ((t - e) / (i - e)) + s
  12340. };
  12341. t.distance = function(t, e, i, s) {
  12342. return Math.sqrt(Math.pow(i - t, 2) + Math.pow(s - e, 2))
  12343. };
  12344. may.Maths = t
  12345. })();
  12346. (function() {
  12347. function t() {
  12348. throw "Arrays cannot be instantiated."
  12349. }
  12350. t.disorder = function(t) {
  12351. var e = [];
  12352. while (t.length) {
  12353. var i = Math.floor(Math.random() * t.length);
  12354. e.push(t[i]);
  12355. t.splice(i, 1)
  12356. }
  12357. return e
  12358. };
  12359. t.random = function(t) {
  12360. return t[Math.floor(t.length * Math.random())]
  12361. };
  12362. may.Arrays = t
  12363. })();
  12364. (function() {
  12365. function t() {
  12366. throw "Canvas cannot be instantiated."
  12367. }
  12368. t.DESIGN_RESOLUTION = {
  12369. w: 640,
  12370. h: 1136
  12371. };
  12372. t.SHOW_ALL = "show_all";
  12373. t.EXACT_FIT = "exact_fit";
  12374. t.init = function(e, i, s) {
  12375. s = s || t.EXACT_FIT;
  12376. var r = {};
  12377. r.w = i;
  12378. r.h = this.DESIGN_RESOLUTION.h * i / this.DESIGN_RESOLUTION.w;
  12379. var n = {};
  12380. n.w = window.innerWidth || document.body.clientWidth;
  12381. n.h = window.innerHeight || document.body.clientHeight;
  12382. var a, o;
  12383. a = r.w / r.h;
  12384. o = n.w / n.h;
  12385. var h = document.getElementById(e);
  12386. var c, u;
  12387. if (s == this.SHOW_ALL) {
  12388. if (a <= o) {
  12389. u = r.h;
  12390. c = o * u
  12391. } else {
  12392. c = r.w;
  12393. u = c / o
  12394. }
  12395. h.width = c;
  12396. h.height = u;
  12397. h.style.width = n.w + "px";
  12398. h.style.height = n.h + "px"
  12399. } else {
  12400. c = r.w;
  12401. u = r.h;
  12402. h.width = c;
  12403. h.height = u;
  12404. h.style.width = r.w + "px";
  12405. h.style.height = r.h + "px"
  12406. }
  12407. return h
  12408. };
  12409. may.Canvas = t
  12410. })();
  12411. (function() {
  12412. function t() {
  12413. throw "Alignment cannot be instantiated."
  12414. }
  12415. t.SHOW_ALL = "show_all";
  12416. t.NO_BORDER = "no_border";
  12417. t.EXACT_FIT = "exact_fit";
  12418. t.set = function(t, e, i, s, r, n) {
  12419. var a = s / r;
  12420. var o = e / i;
  12421. n = n || this.EXACT_FIT;
  12422. switch (n) {
  12423. case this.EXACT_FIT:
  12424. t.x = t.y = 0;
  12425. t.scaleX = s / e;
  12426. t.scaleY = r / i;
  12427. break;
  12428. case this.SHOW_ALL:
  12429. if (a > o) {
  12430. t.scaleX = t.scaleY = r / i;
  12431. t.x = (s - e * t.scaleX) * .5;
  12432. t.y = 0
  12433. } else {
  12434. t.scaleY = t.scaleX = s / e;
  12435. t.y = (r - i * t.scaleY) * .5;
  12436. t.x = 0
  12437. }
  12438. break;
  12439. case this.NO_BORDER:
  12440. if (a > o) {
  12441. t.scaleY = t.scaleX = s / e;
  12442. t.y = (r - i * t.scaleY) * .5;
  12443. t.x = 0
  12444. } else {
  12445. t.scaleX = t.scaleY = r / i;
  12446. t.x = (s - e * t.scaleX) * .5;
  12447. t.y = 0
  12448. }
  12449. break
  12450. }
  12451. };
  12452. may.Alignment = t
  12453. })();