all.js 248 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368
  1. (function(j, m) {
  2. function s(e) {
  3. return c.isWindow(e) ? e: 9 === e.nodeType ? e.defaultView || e.parentWindow: !1
  4. }
  5. function x(e) {
  6. if (!Xa[e]) {
  7. var n = o.body,
  8. b = c("<" + e + ">").appendTo(n),
  9. a = b.css("display");
  10. b.remove();
  11. if ("none" === a || "" === a) {
  12. da || (da = o.createElement("iframe"), da.frameBorder = da.width = da.height = 0);
  13. n.appendChild(da);
  14. if (!na || !da.createElement) na = (da.contentWindow || da.contentDocument).document,
  15. na.write(("CSS1Compat" === o.compatMode ? "<!doctype html>": "") + "<html><body>"),
  16. na.close();
  17. b = na.createElement(e);
  18. na.body.appendChild(b);
  19. a = c.css(b, "display");
  20. n.removeChild(da)
  21. }
  22. Xa[e] = a
  23. }
  24. return Xa[e]
  25. }
  26. function y(e, n) {
  27. var b = {};
  28. c.each(mb.concat.apply([], mb.slice(0, n)),
  29. function() {
  30. b[this] = e
  31. });
  32. return b
  33. }
  34. function u() {
  35. Da = m
  36. }
  37. function r() {
  38. setTimeout(u, 0);
  39. return Da = c.now()
  40. }
  41. function q() {
  42. try {
  43. return new j.XMLHttpRequest
  44. } catch(e) {}
  45. }
  46. function N(e, n, b, a) {
  47. if (c.isArray(n)) c.each(n,
  48. function(n, d) {
  49. b || Sb.test(e) ? a(e, d) : N(e + "[" + ("object" == typeof d || c.isArray(d) ? n: "") + "]", d, b, a)
  50. });
  51. else if (!b && null != n && "object" == typeof n) for (var d in n) N(e + "[" + d + "]", n[d], b, a);
  52. else a(e, n)
  53. }
  54. function L(e, n) {
  55. var b, a, d = c.ajaxSettings.flatOptions || {};
  56. for (b in n) n[b] !== m && ((d[b] ? e: a || (a = {}))[b] = n[b]);
  57. a && c.extend(!0, e, a)
  58. }
  59. function J(e, n, c, b, a, d) {
  60. a = a || n.dataTypes[0];
  61. d = d || {};
  62. d[a] = !0;
  63. for (var a = e[a], h = 0, g = a ? a.length: 0, l = e === Ya, f; h < g && (l || !f); h++) f = a[h](n, c, b),
  64. "string" == typeof f && (!l || d[f] ? f = m: (n.dataTypes.unshift(f), f = J(e, n, c, b, f, d))); (l || !f) && !d["*"] && (f = J(e, n, c, b, "*", d));
  65. return f
  66. }
  67. function K(e) {
  68. return function(n, b) {
  69. "string" != typeof n && (b = n, n = "*");
  70. if (c.isFunction(b)) for (var a = n.toLowerCase().split(nb), d = 0, h = a.length, g, l; d < h; d++) g = a[d],
  71. (l = /^\+/.test(g)) && (g = g.substr(1) || "*"),
  72. g = e[g] = e[g] || [],
  73. g[l ? "unshift": "push"](b)
  74. }
  75. }
  76. function Q(e, n, b) {
  77. var a = "width" === n ? e.offsetWidth: e.offsetHeight,
  78. d = "width" === n ? Tb: Ub;
  79. if (0 < a) return "border" !== b && c.each(d,
  80. function() {
  81. b || (a -= parseFloat(c.css(e, "padding" + this)) || 0);
  82. "margin" === b ? a += parseFloat(c.css(e, b + this)) || 0 : a -= parseFloat(c.css(e, "border" + this + "Width")) || 0
  83. }),
  84. a + "px";
  85. a = oa(e, n, n);
  86. if (0 > a || null == a) a = e.style[n] || 0;
  87. a = parseFloat(a) || 0;
  88. b && c.each(d,
  89. function() {
  90. a += parseFloat(c.css(e, "padding" + this)) || 0;
  91. "padding" !== b && (a += parseFloat(c.css(e, "border" + this + "Width")) || 0);
  92. "margin" === b && (a += parseFloat(c.css(e, b + this)) || 0)
  93. });
  94. return a + "px"
  95. }
  96. function Y(e, n) {
  97. n.src ? c.ajax({
  98. url: n.src,
  99. async: !1,
  100. dataType: "script"
  101. }) : c.globalEval((n.text || n.textContent || n.innerHTML || "").replace(Vb, "/*$0*/"));
  102. n.parentNode && n.parentNode.removeChild(n)
  103. }
  104. function ea(e) {
  105. var n = (e.nodeName || "").toLowerCase();
  106. "input" === n ? S(e) : "script" !== n && "undefined" != typeof e.getElementsByTagName && c.grep(e.getElementsByTagName("input"), S)
  107. }
  108. function S(e) {
  109. if ("checkbox" === e.type || "radio" === e.type) e.defaultChecked = e.checked
  110. }
  111. function C(e) {
  112. return "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName("*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll("*") : []
  113. }
  114. function V(e, n) {
  115. var a;
  116. if (1 === n.nodeType) {
  117. n.clearAttributes && n.clearAttributes();
  118. n.mergeAttributes && n.mergeAttributes(e);
  119. a = n.nodeName.toLowerCase();
  120. if ("object" === a) n.outerHTML = e.outerHTML;
  121. else if ("input" !== a || "checkbox" !== e.type && "radio" !== e.type) if ("option" === a) n.selected = e.defaultSelected;
  122. else {
  123. if ("input" === a || "textarea" === a) n.defaultValue = e.defaultValue
  124. } else e.checked && (n.defaultChecked = n.checked = e.checked),
  125. n.value !== e.value && (n.value = e.value);
  126. n.removeAttribute(c.expando)
  127. }
  128. }
  129. function D(e, n) {
  130. if (1 === n.nodeType && c.hasData(e)) {
  131. var a, b, d;
  132. b = c._data(e);
  133. var h = c._data(n, b),
  134. g = b.events;
  135. if (g) for (a in delete h.handle, h.events = {},
  136. g) {
  137. b = 0;
  138. for (d = g[a].length; b < d; b++) c.event.add(n, a + (g[a][b].namespace ? ".": "") + g[a][b].namespace, g[a][b], g[a][b].data)
  139. }
  140. h.data && (h.data = c.extend({},
  141. h.data))
  142. }
  143. }
  144. function w(e) {
  145. var n = ob.split(" "),
  146. e = e.createDocumentFragment();
  147. if (e.createElement) for (; n.length;) e.createElement(n.pop());
  148. return e
  149. }
  150. function aa(e, n, a) {
  151. n = n || 0;
  152. if (c.isFunction(n)) return c.grep(e,
  153. function(e, b) {
  154. return !! n.call(e, b, e) === a
  155. });
  156. if (n.nodeType) return c.grep(e,
  157. function(e) {
  158. return e === n === a
  159. });
  160. if ("string" == typeof n) {
  161. var b = c.grep(e,
  162. function(e) {
  163. return 1 === e.nodeType
  164. });
  165. if (Wb.test(n)) return c.filter(n, b, !a);
  166. n = c.filter(n, b)
  167. }
  168. return c.grep(e,
  169. function(e) {
  170. return 0 <= c.inArray(e, n) === a
  171. })
  172. }
  173. function k() {
  174. return ! 0
  175. }
  176. function B() {
  177. return ! 1
  178. }
  179. function U(e, n, a) {
  180. var b = n + "defer",
  181. d = n + "queue",
  182. h = n + "mark",
  183. g = c._data(e, b);
  184. g && ("queue" === a || !c._data(e, d)) && ("mark" === a || !c._data(e, h)) && setTimeout(function() { ! c._data(e, d) && !c._data(e, h) && (c.removeData(e, b, !0), g.fire())
  185. },
  186. 0)
  187. }
  188. function R(e) {
  189. for (var n in e) if (! ("data" === n && c.isEmptyObject(e[n])) && "toJSON" !== n) return ! 1;
  190. return ! 0
  191. }
  192. function M(e, n, a) {
  193. if (a === m && 1 === e.nodeType) if (a = "data-" + n.replace(Xb, "-$1").toLowerCase(), a = e.getAttribute(a), "string" == typeof a) {
  194. try {
  195. a = "true" === a ? !0 : "false" === a ? !1 : "null" === a ? null: c.isNumeric(a) ? parseFloat(a) : Yb.test(a) ? c.parseJSON(a) : a
  196. } catch(b) {}
  197. c.data(e, n, a)
  198. } else a = m;
  199. return a
  200. }
  201. var o = j.document,
  202. F = j.location,
  203. c, i = function() {
  204. if (!f.isReady) {
  205. try {
  206. o.documentElement.doScroll("left")
  207. } catch(e) {
  208. setTimeout(i, 1);
  209. return
  210. }
  211. f.ready()
  212. }
  213. },
  214. f = function(e, n) {
  215. return new f.fn.init(e, n, b)
  216. },
  217. p = j.jQuery,
  218. v = j.$,
  219. b,
  220. d = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
  221. a = /\S/,
  222. h = /^\s+/,
  223. g = /\s+$/,
  224. l = /\d/,
  225. t = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
  226. z = /^[\],:{}\s]*$/,
  227. ya = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
  228. ja = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  229. I = /(?:^|:|,)(?:\s*\[)+/g,
  230. Zb = /(webkit)[ \/]([\w.]+)/,
  231. $b = /(opera)(?:.*version)?[ \/]([\w.]+)/,
  232. ac = /(msie) ([\w.]+)/,
  233. bc = /(mozilla)(?:.*? rv:([\w.]+))?/,
  234. cc = /-([a-z]|[0-9])/ig,
  235. E = /^-ms-/,
  236. dc = function(e, n) {
  237. return (n + "").toUpperCase()
  238. },
  239. ec = j.navigator.userAgent,
  240. Ea,
  241. Fa,
  242. O,
  243. fc = Object.prototype.toString,
  244. Za = Object.prototype.hasOwnProperty,
  245. P = Array.prototype.push,
  246. fa = Array.prototype.slice,
  247. ha = String.prototype.trim,
  248. pa = Array.prototype.indexOf,
  249. ga = {};
  250. f.fn = f.prototype = {
  251. constructor: f,
  252. init: function(e, n, a) {
  253. var b, c;
  254. if (!e) return this;
  255. if (e.nodeType) return this.context = this[0] = e,
  256. this.length = 1,
  257. this;
  258. if ("body" === e && !n && o.body) return this.context = o,
  259. this[0] = o.body,
  260. this.selector = e,
  261. this.length = 1,
  262. this;
  263. if ("string" == typeof e) {
  264. "<" !== e.charAt(0) || ">" !== e.charAt(e.length - 1) || 3 > e.length ? b = d.exec(e) : b = [null, e, null];
  265. if (b && (b[1] || !n)) {
  266. if (b[1]) return c = (n = n instanceof f ? n[0] : n) ? n.ownerDocument || n: o,
  267. (a = t.exec(e)) ? f.isPlainObject(n) ? (e = [o.createElement(a[1])], f.fn.attr.call(e, n, !0)) : e = [c.createElement(a[1])] : (a = f.buildFragment([b[1]], [c]), e = (a.cacheable ? f.clone(a.fragment) : a.fragment).childNodes),
  268. f.merge(this, e);
  269. if ((n = o.getElementById(b[2])) && n.parentNode) {
  270. if (n.id !== b[2]) return a.find(e);
  271. this.length = 1;
  272. this[0] = n
  273. }
  274. this.context = o;
  275. this.selector = e;
  276. return this
  277. }
  278. return ! n || n.jquery ? (n || a).find(e) : this.constructor(n).find(e)
  279. }
  280. if (f.isFunction(e)) return a.ready(e);
  281. e.selector !== m && (this.selector = e.selector, this.context = e.context);
  282. return f.makeArray(e, this)
  283. },
  284. selector: "",
  285. jquery: "1.7",
  286. length: 0,
  287. size: function() {
  288. return this.length
  289. },
  290. toArray: function() {
  291. return fa.call(this, 0)
  292. },
  293. get: function(e) {
  294. return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e]
  295. },
  296. pushStack: function(e, n, a) {
  297. var b = this.constructor();
  298. f.isArray(e) ? P.apply(b, e) : f.merge(b, e);
  299. b.prevObject = this;
  300. b.context = this.context;
  301. "find" === n ? b.selector = this.selector + (this.selector ? " ": "") + a: n && (b.selector = this.selector + "." + n + "(" + a + ")");
  302. return b
  303. },
  304. each: function(e, n) {
  305. return f.each(this, e, n)
  306. },
  307. ready: function(e) {
  308. f.bindReady();
  309. Fa.add(e);
  310. return this
  311. },
  312. eq: function(e) {
  313. return - 1 === e ? this.slice(e) : this.slice(e, +e + 1)
  314. },
  315. first: function() {
  316. return this.eq(0)
  317. },
  318. last: function() {
  319. return this.eq( - 1)
  320. },
  321. slice: function() {
  322. return this.pushStack(fa.apply(this, arguments), "slice", fa.call(arguments).join(","))
  323. },
  324. map: function(e) {
  325. return this.pushStack(f.map(this,
  326. function(n, a) {
  327. return e.call(n, a, n)
  328. }))
  329. },
  330. end: function() {
  331. return this.prevObject || this.constructor(null)
  332. },
  333. push: P,
  334. sort: [].sort,
  335. splice: [].splice
  336. };
  337. f.fn.init.prototype = f.fn;
  338. f.extend = f.fn.extend = function() {
  339. var e, n, a, b, c, d, h = arguments[0] || {},
  340. g = 1,
  341. l = arguments.length,
  342. i = !1;
  343. "boolean" == typeof h && (i = h, h = arguments[1] || {},
  344. g = 2);
  345. "object" != typeof h && !f.isFunction(h) && (h = {});
  346. for (l === g && (h = this, --g); g < l; g++) if (null != (e = arguments[g])) for (n in e) a = h[n],
  347. b = e[n],
  348. h !== b && (i && b && (f.isPlainObject(b) || (c = f.isArray(b))) ? (c ? (c = !1, d = a && f.isArray(a) ? a: []) : d = a && f.isPlainObject(a) ? a: {},
  349. h[n] = f.extend(i, d, b)) : b !== m && (h[n] = b));
  350. return h
  351. };
  352. f.extend({
  353. noConflict: function(e) {
  354. j.$ === f && (j.$ = v);
  355. e && j.jQuery === f && (j.jQuery = p);
  356. return f
  357. },
  358. isReady: !1,
  359. readyWait: 1,
  360. holdReady: function(e) {
  361. e ? f.readyWait++:f.ready(!0)
  362. },
  363. ready: function(e) {
  364. if (!0 === e && !--f.readyWait || !0 !== e && !f.isReady) {
  365. if (!o.body) return setTimeout(f.ready, 1);
  366. f.isReady = !0; ! 0 !== e && 0 < --f.readyWait || (Fa.fireWith(o, [f]), f.fn.trigger && f(o).trigger("ready").unbind("ready"))
  367. }
  368. },
  369. bindReady: function() {
  370. if (!Fa) {
  371. Fa = f.Callbacks("once memory");
  372. if ("complete" === o.readyState) return setTimeout(f.ready, 1);
  373. if (o.addEventListener) o.addEventListener("DOMContentLoaded", O, !1),
  374. j.addEventListener("load", f.ready, !1);
  375. else if (o.attachEvent) {
  376. o.attachEvent("onreadystatechange", O);
  377. j.attachEvent("onload", f.ready);
  378. var e = !1;
  379. try {
  380. e = null == j.frameElement
  381. } catch(n) {}
  382. o.documentElement.doScroll && e && i()
  383. }
  384. }
  385. },
  386. isFunction: function(e) {
  387. return "function" === f.type(e)
  388. },
  389. isArray: Array.isArray ||
  390. function(e) {
  391. return "array" === f.type(e)
  392. },
  393. isWindow: function(e) {
  394. return e && "object" == typeof e && "setInterval" in e
  395. },
  396. isNumeric: function(e) {
  397. return null != e && l.test(e) && !isNaN(e)
  398. },
  399. type: function(e) {
  400. return null == e ? String(e) : ga[fc.call(e)] || "object"
  401. },
  402. isPlainObject: function(e) {
  403. if (!e || "object" !== f.type(e) || e.nodeType || f.isWindow(e)) return ! 1;
  404. try {
  405. if (e.constructor && !Za.call(e, "constructor") && !Za.call(e.constructor.prototype, "isPrototypeOf")) return ! 1
  406. } catch(n) {
  407. return ! 1
  408. }
  409. for (var a in e);
  410. return a === m || Za.call(e, a)
  411. },
  412. isEmptyObject: function(e) {
  413. for (var n in e) return ! 1;
  414. return ! 0
  415. },
  416. error: function(e) {
  417. throw e;
  418. },
  419. parseJSON: function(e) {
  420. if ("string" != typeof e || !e) return null;
  421. e = f.trim(e);
  422. if (j.JSON && j.JSON.parse) return j.JSON.parse(e);
  423. if (z.test(e.replace(ya, "@").replace(ja, "]").replace(I, ""))) return (new Function("return " + e))();
  424. f.error("Invalid JSON: " + e)
  425. },
  426. parseXML: function(e) {
  427. var n, a;
  428. try {
  429. j.DOMParser ? (a = new DOMParser, n = a.parseFromString(e, "text/xml")) : (n = new ActiveXObject("Microsoft.XMLDOM"), n.async = "false", n.loadXML(e))
  430. } catch(b) {
  431. n = m
  432. } (!n || !n.documentElement || n.getElementsByTagName("parsererror").length) && f.error("Invalid XML: " + e);
  433. return n
  434. },
  435. noop: function() {},
  436. globalEval: function(e) {
  437. e && a.test(e) && (j.execScript ||
  438. function(e) {
  439. j.eval.call(j, e)
  440. })(e)
  441. },
  442. camelCase: function(e) {
  443. return e.replace(E, "ms-").replace(cc, dc)
  444. },
  445. nodeName: function(e, n) {
  446. return e.nodeName && e.nodeName.toUpperCase() === n.toUpperCase()
  447. },
  448. each: function(e, n, a) {
  449. var b, c = 0,
  450. d = e.length,
  451. h = d === m || f.isFunction(e);
  452. if (a) if (h) for (b in e) {
  453. if (!1 === n.apply(e[b], a)) break
  454. } else for (; c < d && !1 !== n.apply(e[c++], a););
  455. else if (h) for (b in e) {
  456. if (!1 === n.call(e[b], b, e[b])) break
  457. } else for (; c < d && !1 !== n.call(e[c], c, e[c++]););
  458. return e
  459. },
  460. trim: ha ?
  461. function(e) {
  462. return null == e ? "": ha.call(e)
  463. }: function(e) {
  464. return null == e ? "": (e + "").replace(h, "").replace(g, "")
  465. },
  466. makeArray: function(e, n) {
  467. var a = n || [];
  468. if (null != e) {
  469. var b = f.type(e);
  470. null == e.length || "string" === b || "function" === b || "regexp" === b || f.isWindow(e) ? P.call(a, e) : f.merge(a, e)
  471. }
  472. return a
  473. },
  474. inArray: function(e, n, a) {
  475. var b;
  476. if (n) {
  477. if (pa) return pa.call(n, e, a);
  478. b = n.length;
  479. for (a = a ? 0 > a ? Math.max(0, b + a) : a: 0; a < b; a++) if (a in n && n[a] === e) return a
  480. }
  481. return - 1
  482. },
  483. merge: function(e, a) {
  484. var b = e.length,
  485. c = 0;
  486. if ("number" == typeof a.length) for (var d = a.length; c < d; c++) e[b++] = a[c];
  487. else for (; a[c] !== m;) e[b++] = a[c++];
  488. e.length = b;
  489. return e
  490. },
  491. grep: function(e, a, b) {
  492. for (var c = [], d, b = !!b, h = 0, g = e.length; h < g; h++) d = !!a(e[h], h),
  493. b !== d && c.push(e[h]);
  494. return c
  495. },
  496. map: function(e, a, b) {
  497. var c, d, h = [],
  498. g = 0,
  499. l = e.length;
  500. if (e instanceof f || l !== m && "number" == typeof l && (0 < l && e[0] && e[l - 1] || 0 === l || f.isArray(e))) for (; g < l; g++) c = a(e[g], g, b),
  501. null != c && (h[h.length] = c);
  502. else for (d in e) c = a(e[d], d, b),
  503. null != c && (h[h.length] = c);
  504. return h.concat.apply([], h)
  505. },
  506. guid: 1,
  507. proxy: function(e, a) {
  508. if ("string" == typeof a) var b = e[a],
  509. a = e,
  510. e = b;
  511. if (!f.isFunction(e)) return m;
  512. var c = fa.call(arguments, 2),
  513. b = function() {
  514. return e.apply(a, c.concat(fa.call(arguments)))
  515. };
  516. b.guid = e.guid = e.guid || b.guid || f.guid++;
  517. return b
  518. },
  519. access: function(e, a, b, c, d, h) {
  520. var g = e.length;
  521. if ("object" == typeof a) {
  522. for (var l in a) f.access(e, l, a[l], c, d, b);
  523. return e
  524. }
  525. if (b !== m) {
  526. c = !h && c && f.isFunction(b);
  527. for (l = 0; l < g; l++) d(e[l], a, c ? b.call(e[l], l, d(e[l], a)) : b, h);
  528. return e
  529. }
  530. return g ? d(e[0], a) : m
  531. },
  532. now: function() {
  533. return (new Date).getTime()
  534. },
  535. uaMatch: function(e) {
  536. e = e.toLowerCase();
  537. e = Zb.exec(e) || $b.exec(e) || ac.exec(e) || 0 > e.indexOf("compatible") && bc.exec(e) || [];
  538. return {
  539. browser: e[1] || "",
  540. version: e[2] || "0"
  541. }
  542. },
  543. sub: function() {
  544. function e(a, b) {
  545. return new e.fn.init(a, b)
  546. }
  547. f.extend(!0, e, this);
  548. e.superclass = this;
  549. e.fn = e.prototype = this();
  550. e.fn.constructor = e;
  551. e.sub = this.sub;
  552. e.fn.init = function(b, c) {
  553. c && c instanceof f && !(c instanceof e) && (c = e(c));
  554. return f.fn.init.call(this, b, c, a)
  555. };
  556. e.fn.init.prototype = e.fn;
  557. var a = e(o);
  558. return e
  559. },
  560. browser: {}
  561. });
  562. f.each("Boolean Number String Function Array Date RegExp Object".split(" "),
  563. function(e, a) {
  564. ga["[object " + a + "]"] = a.toLowerCase()
  565. });
  566. Ea = f.uaMatch(ec);
  567. Ea.browser && (f.browser[Ea.browser] = !0, f.browser.version = Ea.version);
  568. f.browser.webkit && (f.browser.safari = !0);
  569. a.test("\u00a0") && (h = /^[\s\xA0]+/, g = /[\s\xA0]+$/);
  570. b = f(o);
  571. o.addEventListener ? O = function() {
  572. o.removeEventListener("DOMContentLoaded", O, !1);
  573. f.ready()
  574. }: o.attachEvent && (O = function() {
  575. "complete" === o.readyState && (o.detachEvent("onreadystatechange", O), f.ready())
  576. });
  577. "function" == typeof define && define.amd && define.amd.jQuery && define("jquery", [],
  578. function() {
  579. return f
  580. });
  581. c = f;
  582. var pb = {};
  583. c.Callbacks = function(e) {
  584. var a;
  585. if (e) {
  586. if (! (a = pb[e])) {
  587. a = e;
  588. var b = pb[a] = {},
  589. d,
  590. h;
  591. a = a.split(/\s+/);
  592. d = 0;
  593. for (h = a.length; d < h; d++) b[a[d]] = !0;
  594. a = b
  595. }
  596. } else a = {};
  597. var e = a,
  598. g = [],
  599. l = [],
  600. f,
  601. i,
  602. j,
  603. t,
  604. k,
  605. z = function(a) {
  606. var b, n, d, h;
  607. b = 0;
  608. for (n = a.length; b < n; b++) d = a[b],
  609. h = c.type(d),
  610. "array" === h ? z(d) : "function" === h && (!e.unique || !v.has(d)) && g.push(d)
  611. },
  612. p = function(a, b) {
  613. b = b || [];
  614. f = !e.memory || [a, b];
  615. i = !0;
  616. k = j || 0;
  617. j = 0;
  618. for (t = g.length; g && k < t; k++) if (!1 === g[k].apply(a, b) && e.stopOnFalse) {
  619. f = !0;
  620. break
  621. }
  622. i = !1;
  623. g && (e.once ? !0 === f ? v.disable() : g = [] : l && l.length && (f = l.shift(), v.fireWith(f[0], f[1])))
  624. },
  625. v = {
  626. add: function() {
  627. if (g) {
  628. var e = g.length;
  629. z(arguments);
  630. i ? t = g.length: f && !0 !== f && (j = e, p(f[0], f[1]))
  631. }
  632. return this
  633. },
  634. remove: function() {
  635. if (g) for (var a = arguments,
  636. b = 0,
  637. n = a.length; b < n; b++) for (var c = 0; c < g.length && !(a[b] === g[c] && (i && c <= t && (t--, c <= k && k--), g.splice(c--, 1), e.unique)); c++);
  638. return this
  639. },
  640. has: function(e) {
  641. if (g) for (var a = 0,
  642. b = g.length; a < b; a++) if (e === g[a]) return ! 0;
  643. return ! 1
  644. },
  645. empty: function() {
  646. g = [];
  647. return this
  648. },
  649. disable: function() {
  650. g = l = f = m;
  651. return this
  652. },
  653. disabled: function() {
  654. return ! g
  655. },
  656. lock: function() {
  657. l = m; (!f || !0 === f) && v.disable();
  658. return this
  659. },
  660. locked: function() {
  661. return ! l
  662. },
  663. fireWith: function(a, b) {
  664. l && (i ? e.once || l.push([a, b]) : (!e.once || !f) && p(a, b));
  665. return this
  666. },
  667. fire: function() {
  668. v.fireWith(this, arguments);
  669. return this
  670. },
  671. fired: function() {
  672. return !! f
  673. }
  674. };
  675. return v
  676. };
  677. var $a = [].slice;
  678. c.extend({
  679. Deferred: function(e) {
  680. var a = c.Callbacks("once memory"),
  681. b = c.Callbacks("once memory"),
  682. d = c.Callbacks("memory"),
  683. h = "pending",
  684. g = {
  685. resolve: a,
  686. reject: b,
  687. notify: d
  688. },
  689. l = {
  690. done: a.add,
  691. fail: b.add,
  692. progress: d.add,
  693. state: function() {
  694. return h
  695. },
  696. isResolved: a.fired,
  697. isRejected: b.fired,
  698. then: function(e, a, b) {
  699. f.done(e).fail(a).progress(b);
  700. return this
  701. },
  702. always: function() {
  703. return f.done.apply(f, arguments).fail.apply(f, arguments)
  704. },
  705. pipe: function(e, a, b) {
  706. return c.Deferred(function(n) {
  707. c.each({
  708. done: [e, "resolve"],
  709. fail: [a, "reject"],
  710. progress: [b, "notify"]
  711. },
  712. function(e, a) {
  713. var b = a[0],
  714. d = a[1],
  715. h;
  716. c.isFunction(b) ? f[e](function() { (h = b.apply(this, arguments)) && c.isFunction(h.promise) ? h.promise().then(n.resolve, n.reject, n.notify) : n[d + "With"](this === f ? n: this, [h])
  717. }) : f[e](n[d])
  718. })
  719. }).promise()
  720. },
  721. promise: function(e) {
  722. if (null == e) e = l;
  723. else for (var a in l) e[a] = l[a];
  724. return e
  725. }
  726. },
  727. f = l.promise({}),
  728. i;
  729. for (i in g) f[i] = g[i].fire,
  730. f[i + "With"] = g[i].fireWith;
  731. f.done(function() {
  732. h = "resolved"
  733. },
  734. b.disable, d.lock).fail(function() {
  735. h = "rejected"
  736. },
  737. a.disable, d.lock);
  738. e && e.call(f, f);
  739. return f
  740. },
  741. when: function(e) {
  742. function a(e) {
  743. return function(a) {
  744. l[e] = 1 < arguments.length ? $a.call(arguments, 0) : a;
  745. i.notifyWith(j, l)
  746. }
  747. }
  748. function b(e) {
  749. return function(a) {
  750. d[e] = 1 < arguments.length ? $a.call(arguments, 0) : a; --f || i.resolveWith(i, d)
  751. }
  752. }
  753. var d = $a.call(arguments, 0),
  754. h = 0,
  755. g = d.length,
  756. l = Array(g),
  757. f = g,
  758. i = 1 >= g && e && c.isFunction(e.promise) ? e: c.Deferred(),
  759. j = i.promise();
  760. if (1 < g) {
  761. for (; h < g; h++) d[h] && d[h].promise && c.isFunction(d[h].promise) ? d[h].promise().then(b(h), i.reject, a(h)) : --f;
  762. f || i.resolveWith(i, d)
  763. } else i !== e && i.resolveWith(i, g ? [e] : []);
  764. return j
  765. }
  766. });
  767. var gc = c,
  768. ab;
  769. var G = o.createElement("div"),
  770. hc = o.documentElement,
  771. bb,
  772. qa,
  773. Ga,
  774. Ha,
  775. Z,
  776. ra,
  777. T,
  778. Ia,
  779. ba,
  780. Ja,
  781. W,
  782. Ka,
  783. za,
  784. La,
  785. sa,
  786. Aa;
  787. G.setAttribute("className", "t");
  788. G.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";
  789. bb = G.getElementsByTagName("*");
  790. qa = G.getElementsByTagName("a")[0];
  791. if (!bb || !bb.length || !qa) ab = {};
  792. else {
  793. Ga = o.createElement("select");
  794. Ha = Ga.appendChild(o.createElement("option"));
  795. Z = G.getElementsByTagName("input")[0];
  796. T = {
  797. leadingWhitespace: 3 === G.firstChild.nodeType,
  798. tbody: !G.getElementsByTagName("tbody").length,
  799. htmlSerialize: !!G.getElementsByTagName("link").length,
  800. style: /top/.test(qa.getAttribute("style")),
  801. hrefNormalized: "/a" === qa.getAttribute("href"),
  802. opacity: /^0.55/.test(qa.style.opacity),
  803. cssFloat: !!qa.style.cssFloat,
  804. unknownElems: !!G.getElementsByTagName("nav").length,
  805. checkOn: "on" === Z.value,
  806. optSelected: Ha.selected,
  807. getSetAttribute: "t" !== G.className,
  808. enctype: !!o.createElement("form").enctype,
  809. submitBubbles: !0,
  810. changeBubbles: !0,
  811. focusinBubbles: !1,
  812. deleteExpando: !0,
  813. noCloneEvent: !0,
  814. inlineBlockNeedsLayout: !1,
  815. shrinkWrapBlocks: !1,
  816. reliableMarginRight: !0
  817. };
  818. Z.checked = !0;
  819. T.noCloneChecked = Z.cloneNode(!0).checked;
  820. Ga.disabled = !0;
  821. T.optDisabled = !Ha.disabled;
  822. try {
  823. delete G.test
  824. } catch($c) {
  825. T.deleteExpando = !1
  826. } ! G.addEventListener && G.attachEvent && G.fireEvent && (G.attachEvent("onclick",
  827. function() {
  828. T.noCloneEvent = !1
  829. }), G.cloneNode(!0).fireEvent("onclick"));
  830. Z = o.createElement("input");
  831. Z.value = "t";
  832. Z.setAttribute("type", "radio");
  833. T.radioValue = "t" === Z.value;
  834. Z.setAttribute("checked", "checked");
  835. G.appendChild(Z);
  836. Ia = o.createDocumentFragment();
  837. Ia.appendChild(G.lastChild);
  838. T.checkClone = Ia.cloneNode(!0).cloneNode(!0).lastChild.checked;
  839. G.innerHTML = "";
  840. G.style.width = G.style.paddingLeft = "1px";
  841. ba = o.getElementsByTagName("body")[0];
  842. W = o.createElement(ba ? "div": "body");
  843. Ka = {
  844. visibility: "hidden",
  845. width: 0,
  846. height: 0,
  847. border: 0,
  848. margin: 0,
  849. background: "none"
  850. };
  851. ba && c.extend(Ka, {
  852. position: "absolute",
  853. left: "-999px",
  854. top: "-999px"
  855. });
  856. for (sa in Ka) W.style[sa] = Ka[sa];
  857. W.appendChild(G);
  858. Ja = ba || hc;
  859. Ja.insertBefore(W, Ja.firstChild);
  860. T.appendChecked = Z.checked;
  861. T.boxModel = 2 === G.offsetWidth;
  862. "zoom" in G.style && (G.style.display = "inline", G.style.zoom = 1, T.inlineBlockNeedsLayout = 2 === G.offsetWidth, G.style.display = "", G.innerHTML = "<div style='width:4px;'></div>", T.shrinkWrapBlocks = 2 !== G.offsetWidth);
  863. G.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
  864. za = G.getElementsByTagName("td");
  865. Aa = 0 === za[0].offsetHeight;
  866. za[0].style.display = "";
  867. za[1].style.display = "none";
  868. T.reliableHiddenOffsets = Aa && 0 === za[0].offsetHeight;
  869. G.innerHTML = "";
  870. o.defaultView && o.defaultView.getComputedStyle && (ra = o.createElement("div"), ra.style.width = "0", ra.style.marginRight = "0", G.appendChild(ra), T.reliableMarginRight = 0 === (parseInt((o.defaultView.getComputedStyle(ra, null) || {
  871. marginRight: 0
  872. }).marginRight, 10) || 0));
  873. if (G.attachEvent) for (sa in {
  874. submit: 1,
  875. change: 1,
  876. focusin: 1
  877. }) La = "on" + sa,
  878. (Aa = La in G) || (G.setAttribute(La, "return;"), Aa = "function" == typeof G[La]),
  879. T[sa + "Bubbles"] = Aa;
  880. c(function() {
  881. var e, a, b, d, h;
  882. ba = o.getElementsByTagName("body")[0]; ! ba || (e = o.createElement("div"), e.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", ba.insertBefore(e, ba.firstChild), W = o.createElement("div"), W.style.cssText = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;", W.innerHTML = "<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>", e.appendChild(W), a = W.firstChild, b = a.firstChild, d = a.nextSibling.firstChild.firstChild, h = {
  883. doesNotAddBorder: 5 !== b.offsetTop,
  884. doesAddBorderForTableAndCells: 5 === d.offsetTop
  885. },
  886. b.style.position = "fixed", b.style.top = "20px", h.fixedPosition = 20 === b.offsetTop || 15 === b.offsetTop, b.style.position = b.style.top = "", a.style.overflow = "hidden", a.style.position = "relative", h.subtractsBorderForOverflowNotVisible = -5 === b.offsetTop, h.doesNotIncludeMarginInBodyOffset = 1 !== ba.offsetTop, ba.removeChild(e), W = null, c.extend(T, h))
  887. });
  888. W.innerHTML = "";
  889. Ja.removeChild(W);
  890. W = Ia = Ga = Ha = ba = ra = G = Z = null;
  891. ab = T
  892. }
  893. gc.support = ab;
  894. c.boxModel = c.support.boxModel;
  895. var Yb = /^(?:\{.*\}|\[.*\])$/,
  896. Xb = /([A-Z])/g;
  897. c.extend({
  898. cache: {},
  899. uuid: 0,
  900. expando: "jQuery" + (c.fn.jquery + Math.random()).replace(/\D/g, ""),
  901. noData: {
  902. embed: !0,
  903. object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
  904. applet: !0
  905. },
  906. hasData: function(e) {
  907. e = e.nodeType ? c.cache[e[c.expando]] : e[c.expando];
  908. return !! e && !R(e)
  909. },
  910. data: function(e, a, b, d) {
  911. if (c.acceptData(e)) {
  912. var h, g, l = "string" == typeof a,
  913. f = (h = e.nodeType) ? c.cache: e,
  914. i = h ? e[c.expando] : e[c.expando] && c.expando,
  915. j = "events" === a;
  916. if (i && f[i] && (j || d || f[i].data) || !(l && b === m)) {
  917. i || (h ? e[c.expando] = i = ++c.uuid: i = c.expando);
  918. f[i] || (f[i] = {},
  919. h || (f[i].toJSON = c.noop));
  920. if ("object" == typeof a || "function" == typeof a) d ? f[i] = c.extend(f[i], a) : f[i].data = c.extend(f[i].data, a);
  921. e = h = f[i];
  922. d || (h.data || (h.data = {}), h = h.data);
  923. b !== m && (h[c.camelCase(a)] = b);
  924. if (j && !h[a]) return e.events;
  925. l ? (g = h[a], null == g && (g = h[c.camelCase(a)])) : g = h;
  926. return g
  927. }
  928. }
  929. },
  930. removeData: function(e, a, b) {
  931. if (c.acceptData(e)) {
  932. var d, h, g, l = e.nodeType,
  933. f = l ? c.cache: e,
  934. i = l ? e[c.expando] : c.expando;
  935. if (f[i]) {
  936. if (a && (d = b ? f[i] : f[i].data)) {
  937. c.isArray(a) || (a in d ? a = [a] : (a = c.camelCase(a), a in d ? a = [a] : a = a.split(" ")));
  938. h = 0;
  939. for (g = a.length; h < g; h++) delete d[a[h]];
  940. if (! (b ? R: c.isEmptyObject)(d)) return
  941. }
  942. if (!b && (delete f[i].data, !R(f[i]))) return;
  943. c.support.deleteExpando || !f.setInterval ? delete f[i] : f[i] = null;
  944. l && (c.support.deleteExpando ? delete e[c.expando] : e.removeAttribute ? e.removeAttribute(c.expando) : e[c.expando] = null)
  945. }
  946. }
  947. },
  948. _data: function(e, a, b) {
  949. return c.data(e, a, b, !0)
  950. },
  951. acceptData: function(e) {
  952. if (e.nodeName) {
  953. var a = c.noData[e.nodeName.toLowerCase()];
  954. if (a) return ! 0 !== a && e.getAttribute("classid") === a
  955. }
  956. return ! 0
  957. }
  958. });
  959. c.fn.extend({
  960. data: function(e, a) {
  961. var b, d, h, g = null;
  962. if ("undefined" == typeof e) {
  963. if (this.length && (g = c.data(this[0]), 1 === this[0].nodeType && !c._data(this[0], "parsedAttrs"))) {
  964. d = this[0].attributes;
  965. for (var l = 0,
  966. f = d.length; l < f; l++) h = d[l].name,
  967. 0 === h.indexOf("data-") && (h = c.camelCase(h.substring(5)), M(this[0], h, g[h]));
  968. c._data(this[0], "parsedAttrs", !0)
  969. }
  970. return g
  971. }
  972. if ("object" == typeof e) return this.each(function() {
  973. c.data(this, e)
  974. });
  975. b = e.split(".");
  976. b[1] = b[1] ? "." + b[1] : "";
  977. return a === m ? (g = this.triggerHandler("getData" + b[1] + "!", [b[0]]), g === m && this.length && (g = c.data(this[0], e), g = M(this[0], e, g)), g === m && b[1] ? this.data(b[0]) : g) : this.each(function() {
  978. var d = c(this),
  979. h = [b[0], a];
  980. d.triggerHandler("setData" + b[1] + "!", h);
  981. c.data(this, e, a);
  982. d.triggerHandler("changeData" + b[1] + "!", h)
  983. })
  984. },
  985. removeData: function(e) {
  986. return this.each(function() {
  987. c.removeData(this, e)
  988. })
  989. }
  990. });
  991. c.extend({
  992. _mark: function(e, a) {
  993. e && (a = (a || "fx") + "mark", c._data(e, a, (c._data(e, a) || 0) + 1))
  994. },
  995. _unmark: function(e, a, b) { ! 0 !== e && (b = a, a = e, e = !1);
  996. if (a) {
  997. var b = b || "fx",
  998. d = b + "mark"; (e = e ? 0 : (c._data(a, d) || 1) - 1) ? c._data(a, d, e) : (c.removeData(a, d, !0), U(a, b, "mark"))
  999. }
  1000. },
  1001. queue: function(e, a, b) {
  1002. var d;
  1003. if (e) return a = (a || "fx") + "queue",
  1004. d = c._data(e, a),
  1005. b && (!d || c.isArray(b) ? d = c._data(e, a, c.makeArray(b)) : d.push(b)),
  1006. d || []
  1007. },
  1008. dequeue: function(e, a) {
  1009. var a = a || "fx",
  1010. b = c.queue(e, a),
  1011. d = b.shift(),
  1012. h = {};
  1013. "inprogress" === d && (d = b.shift());
  1014. d && ("fx" === a && b.unshift("inprogress"), c._data(e, a + ".run", h), d.call(e,
  1015. function() {
  1016. c.dequeue(e, a)
  1017. },
  1018. h));
  1019. b.length || (c.removeData(e, a + "queue " + a + ".run", !0), U(e, a, "queue"))
  1020. }
  1021. });
  1022. c.fn.extend({
  1023. queue: function(e, a) {
  1024. "string" != typeof e && (a = e, e = "fx");
  1025. return a === m ? c.queue(this[0], e) : this.each(function() {
  1026. var b = c.queue(this, e, a);
  1027. "fx" === e && "inprogress" !== b[0] && c.dequeue(this, e)
  1028. })
  1029. },
  1030. dequeue: function(e) {
  1031. return this.each(function() {
  1032. c.dequeue(this, e)
  1033. })
  1034. },
  1035. delay: function(e, a) {
  1036. e = c.fx ? c.fx.speeds[e] || e: e;
  1037. return this.queue(a || "fx",
  1038. function(a, b) {
  1039. var c = setTimeout(a, e);
  1040. b.stop = function() {
  1041. clearTimeout(c)
  1042. }
  1043. })
  1044. },
  1045. clearQueue: function(e) {
  1046. return this.queue(e || "fx", [])
  1047. },
  1048. promise: function(e) {
  1049. function a() {--g || b.resolveWith(d, [d])
  1050. }
  1051. "string" != typeof e && (e = m);
  1052. for (var e = e || "fx",
  1053. b = c.Deferred(), d = this, h = d.length, g = 1, l = e + "defer", f = e + "queue", e = e + "mark", i; h--;) if (i = c.data(d[h], l, m, !0) || (c.data(d[h], f, m, !0) || c.data(d[h], e, m, !0)) && c.data(d[h], l, c.Callbacks("once memory"), !0)) g++,
  1054. i.add(a);
  1055. a();
  1056. return b.promise()
  1057. }
  1058. });
  1059. var qb = /[\n\t\r]/g,
  1060. Ma = /\s+/,
  1061. ic = /\r/g,
  1062. jc = /^(?:button|input)$/i,
  1063. kc = /^(?:button|input|object|select|textarea)$/i,
  1064. lc = /^a(?:rea)?$/i,
  1065. rb = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  1066. sb = c.support.getSetAttribute,
  1067. ia, tb, ub;
  1068. c.fn.extend({
  1069. attr: function(e, a) {
  1070. return c.access(this, e, a, !0, c.attr)
  1071. },
  1072. removeAttr: function(e) {
  1073. return this.each(function() {
  1074. c.removeAttr(this, e)
  1075. })
  1076. },
  1077. prop: function(e, a) {
  1078. return c.access(this, e, a, !0, c.prop)
  1079. },
  1080. removeProp: function(e) {
  1081. e = c.propFix[e] || e;
  1082. return this.each(function() {
  1083. try {
  1084. this[e] = m,
  1085. delete this[e]
  1086. } catch(a) {}
  1087. })
  1088. },
  1089. addClass: function(e) {
  1090. var a, b, d, h, g, l, f;
  1091. if (c.isFunction(e)) return this.each(function(a) {
  1092. c(this).addClass(e.call(this, a, this.className))
  1093. });
  1094. if (e && "string" == typeof e) {
  1095. a = e.split(Ma);
  1096. b = 0;
  1097. for (d = this.length; b < d; b++) if (h = this[b], 1 === h.nodeType) if (!h.className && 1 === a.length) h.className = e;
  1098. else {
  1099. g = " " + h.className + " ";
  1100. l = 0;
  1101. for (f = a.length; l < f; l++)~g.indexOf(" " + a[l] + " ") || (g += a[l] + " ");
  1102. h.className = c.trim(g)
  1103. }
  1104. }
  1105. return this
  1106. },
  1107. removeClass: function(e) {
  1108. var a, b, d, h, g, l, f;
  1109. if (c.isFunction(e)) return this.each(function(a) {
  1110. c(this).removeClass(e.call(this, a, this.className))
  1111. });
  1112. if (e && "string" == typeof e || e === m) {
  1113. a = (e || "").split(Ma);
  1114. b = 0;
  1115. for (d = this.length; b < d; b++) if (h = this[b], 1 === h.nodeType && h.className) if (e) {
  1116. g = (" " + h.className + " ").replace(qb, " ");
  1117. l = 0;
  1118. for (f = a.length; l < f; l++) g = g.replace(" " + a[l] + " ", " ");
  1119. h.className = c.trim(g)
  1120. } else h.className = ""
  1121. }
  1122. return this
  1123. },
  1124. toggleClass: function(e, a) {
  1125. var b = typeof e,
  1126. d = "boolean" == typeof a;
  1127. return c.isFunction(e) ? this.each(function(b) {
  1128. c(this).toggleClass(e.call(this, b, this.className, a), a)
  1129. }) : this.each(function() {
  1130. if ("string" === b) for (var h, g = 0,
  1131. l = c(this), f = a, i = e.split(Ma); h = i[g++];) f = d ? f: !l.hasClass(h),
  1132. l[f ? "addClass": "removeClass"](h);
  1133. else if ("undefined" === b || "boolean" === b) this.className && c._data(this, "__className__", this.className),
  1134. this.className = this.className || !1 === e ? "": c._data(this, "__className__") || ""
  1135. })
  1136. },
  1137. hasClass: function(e) {
  1138. for (var e = " " + e + " ",
  1139. a = 0,
  1140. b = this.length; a < b; a++) if (1 === this[a].nodeType && -1 < (" " + this[a].className + " ").replace(qb, " ").indexOf(e)) return ! 0;
  1141. return ! 1
  1142. },
  1143. val: function(e) {
  1144. var a, b, d, h = this[0];
  1145. if (!arguments.length) {
  1146. if (h) {
  1147. if ((a = c.valHooks[h.nodeName.toLowerCase()] || c.valHooks[h.type]) && "get" in a && (b = a.get(h, "value")) !== m) return b;
  1148. b = h.value;
  1149. return "string" == typeof b ? b.replace(ic, "") : null == b ? "": b
  1150. }
  1151. return m
  1152. }
  1153. d = c.isFunction(e);
  1154. return this.each(function(b) {
  1155. var h = c(this),
  1156. g;
  1157. if (1 === this.nodeType && (d ? g = e.call(this, b, h.val()) : g = e, null == g ? g = "": "number" == typeof g ? g += "": c.isArray(g) && (g = c.map(g,
  1158. function(e) {
  1159. return e == null ? "": e + ""
  1160. })), a = c.valHooks[this.nodeName.toLowerCase()] || c.valHooks[this.type], !a || !("set" in a) || a.set(this, g, "value") === m)) this.value = g
  1161. })
  1162. }
  1163. });
  1164. c.extend({
  1165. valHooks: {
  1166. option: {
  1167. get: function(e) {
  1168. var a = e.attributes.value;
  1169. return ! a || a.specified ? e.value: e.text
  1170. }
  1171. },
  1172. select: {
  1173. get: function(e) {
  1174. var a, b, d = e.selectedIndex,
  1175. h = [],
  1176. g = e.options,
  1177. l = "select-one" === e.type;
  1178. if (0 > d) return null;
  1179. e = l ? d: 0;
  1180. for (b = l ? d + 1 : g.length; e < b; e++) if (a = g[e], a.selected && (c.support.optDisabled ? !a.disabled: null === a.getAttribute("disabled")) && (!a.parentNode.disabled || !c.nodeName(a.parentNode, "optgroup"))) {
  1181. a = c(a).val();
  1182. if (l) return a;
  1183. h.push(a)
  1184. }
  1185. return l && !h.length && g.length ? c(g[d]).val() : h
  1186. },
  1187. set: function(e, a) {
  1188. var b = c.makeArray(a);
  1189. c(e).find("option").each(function() {
  1190. this.selected = 0 <= c.inArray(c(this).val(), b)
  1191. });
  1192. b.length || (e.selectedIndex = -1);
  1193. return b
  1194. }
  1195. }
  1196. },
  1197. attrFn: {
  1198. val: !0,
  1199. css: !0,
  1200. html: !0,
  1201. text: !0,
  1202. data: !0,
  1203. width: !0,
  1204. height: !0,
  1205. offset: !0
  1206. },
  1207. attr: function(e, a, b, d) {
  1208. var h, g, l = e.nodeType;
  1209. if (!e || 3 === l || 8 === l || 2 === l) return m;
  1210. if (d && a in c.attrFn) return c(e)[a](b);
  1211. if (! ("getAttribute" in e)) return c.prop(e, a, b); (d = 1 !== l || !c.isXMLDoc(e)) && (a = a.toLowerCase(), g = c.attrHooks[a] || (rb.test(a) ? tb: ia));
  1212. if (b !== m) {
  1213. if (null === b) return c.removeAttr(e, a),
  1214. m;
  1215. if (g && "set" in g && d && (h = g.set(e, b, a)) !== m) return h;
  1216. e.setAttribute(a, "" + b);
  1217. return b
  1218. }
  1219. if (g && "get" in g && d && null !== (h = g.get(e, a))) return h;
  1220. h = e.getAttribute(a);
  1221. return null === h ? m: h
  1222. },
  1223. removeAttr: function(e, a) {
  1224. var b, d, h, g, l = 0;
  1225. if (1 === e.nodeType) {
  1226. d = (a || "").split(Ma);
  1227. for (g = d.length; l < g; l++) h = d[l].toLowerCase(),
  1228. b = c.propFix[h] || h,
  1229. c.attr(e, h, ""),
  1230. e.removeAttribute(sb ? h: b),
  1231. rb.test(h) && b in e && (e[b] = !1)
  1232. }
  1233. },
  1234. attrHooks: {
  1235. type: {
  1236. set: function(e, a) {
  1237. if (jc.test(e.nodeName) && e.parentNode) c.error("type property can't be changed");
  1238. else if (!c.support.radioValue && "radio" === a && c.nodeName(e, "input")) {
  1239. var b = e.value;
  1240. e.setAttribute("type", a);
  1241. b && (e.value = b);
  1242. return a
  1243. }
  1244. }
  1245. },
  1246. value: {
  1247. get: function(e, a) {
  1248. return ia && c.nodeName(e, "button") ? ia.get(e, a) : a in e ? e.value: null
  1249. },
  1250. set: function(e, a, b) {
  1251. if (ia && c.nodeName(e, "button")) return ia.set(e, a, b);
  1252. e.value = a
  1253. }
  1254. }
  1255. },
  1256. propFix: {
  1257. tabindex: "tabIndex",
  1258. readonly: "readOnly",
  1259. "for": "htmlFor",
  1260. "class": "className",
  1261. maxlength: "maxLength",
  1262. cellspacing: "cellSpacing",
  1263. cellpadding: "cellPadding",
  1264. rowspan: "rowSpan",
  1265. colspan: "colSpan",
  1266. usemap: "useMap",
  1267. frameborder: "frameBorder",
  1268. contenteditable: "contentEditable"
  1269. },
  1270. prop: function(e, a, b) {
  1271. var d, h, g = e.nodeType;
  1272. if (!e || 3 === g || 8 === g || 2 === g) return m; (1 !== g || !c.isXMLDoc(e)) && (a = c.propFix[a] || a, h = c.propHooks[a]);
  1273. return b !== m ? h && "set" in h && (d = h.set(e, b, a)) !== m ? d: e[a] = b: h && "get" in h && null !== (d = h.get(e, a)) ? d: e[a]
  1274. },
  1275. propHooks: {
  1276. tabIndex: {
  1277. get: function(e) {
  1278. var a = e.getAttributeNode("tabindex");
  1279. return a && a.specified ? parseInt(a.value, 10) : kc.test(e.nodeName) || lc.test(e.nodeName) && e.href ? 0 : m
  1280. }
  1281. }
  1282. }
  1283. });
  1284. c.attrHooks.tabindex = c.propHooks.tabIndex;
  1285. tb = {
  1286. get: function(e, a) {
  1287. var b, d = c.prop(e, a);
  1288. return ! 0 === d || "boolean" != typeof d && (b = e.getAttributeNode(a)) && !1 !== b.nodeValue ? a.toLowerCase() : m
  1289. },
  1290. set: function(e, a, b) {
  1291. var d; ! 1 === a ? c.removeAttr(e, b) : (d = c.propFix[b] || b, d in e && (e[d] = !0), e.setAttribute(b, b.toLowerCase()));
  1292. return b
  1293. }
  1294. };
  1295. sb || (ub = {
  1296. name: !0,
  1297. id: !0
  1298. },
  1299. ia = c.valHooks.button = {
  1300. get: function(e, a) {
  1301. var b;
  1302. return (b = e.getAttributeNode(a)) && (ub[a] ? "" !== b.nodeValue: b.specified) ? b.nodeValue: m
  1303. },
  1304. set: function(e, a, b) {
  1305. var c = e.getAttributeNode(b);
  1306. c || (c = o.createAttribute(b), e.setAttributeNode(c));
  1307. return c.nodeValue = a + ""
  1308. }
  1309. },
  1310. c.attrHooks.tabindex.set = ia.set, c.each(["width", "height"],
  1311. function(e, a) {
  1312. c.attrHooks[a] = c.extend(c.attrHooks[a], {
  1313. set: function(e, b) {
  1314. if ("" === b) return e.setAttribute(a, "auto"),
  1315. b
  1316. }
  1317. })
  1318. }), c.attrHooks.contenteditable = {
  1319. get: ia.get,
  1320. set: function(e, a, b) {
  1321. "" === a && (a = "false");
  1322. ia.set(e, a, b)
  1323. }
  1324. });
  1325. c.support.hrefNormalized || c.each(["href", "src", "width", "height"],
  1326. function(e, a) {
  1327. c.attrHooks[a] = c.extend(c.attrHooks[a], {
  1328. get: function(e) {
  1329. e = e.getAttribute(a, 2);
  1330. return null === e ? m: e
  1331. }
  1332. })
  1333. });
  1334. c.support.style || (c.attrHooks.style = {
  1335. get: function(e) {
  1336. return e.style.cssText.toLowerCase() || m
  1337. },
  1338. set: function(e, a) {
  1339. return e.style.cssText = "" + a
  1340. }
  1341. });
  1342. c.support.optSelected || (c.propHooks.selected = c.extend(c.propHooks.selected, {
  1343. get: function(e) {
  1344. e = e.parentNode;
  1345. e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex);
  1346. return null
  1347. }
  1348. }));
  1349. c.support.enctype || (c.propFix.enctype = "encoding");
  1350. c.support.checkOn || c.each(["radio", "checkbox"],
  1351. function() {
  1352. c.valHooks[this] = {
  1353. get: function(e) {
  1354. return null === e.getAttribute("value") ? "on": e.value
  1355. }
  1356. }
  1357. });
  1358. c.each(["radio", "checkbox"],
  1359. function() {
  1360. c.valHooks[this] = c.extend(c.valHooks[this], {
  1361. set: function(e, a) {
  1362. if (c.isArray(a)) return e.checked = 0 <= c.inArray(c(e).val(), a)
  1363. }
  1364. })
  1365. });
  1366. var cb = /^(?:textarea|input|select)$/i,
  1367. vb = /^([^\.]*)?(?:\.(.+))?$/,
  1368. mc = /\bhover(\.\S+)?/,
  1369. nc = /^key/,
  1370. oc = /^(?:mouse|contextmenu)|click/,
  1371. pc = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
  1372. wb = function(e) {
  1373. return c.event.special.hover ? e: e.replace(mc, "mouseenter$1 mouseleave$1")
  1374. };
  1375. c.event = {
  1376. add: function(e, a, b, d, h) {
  1377. var g, l, f, i, j, t, k, z, p;
  1378. if (! (3 === e.nodeType || 8 === e.nodeType || !a || !b || !(g = c._data(e)))) {
  1379. b.handler && (k = b, b = k.handler);
  1380. b.guid || (b.guid = c.guid++); (f = g.events) || (g.events = f = {}); (l = g.handle) || (g.handle = l = function(e) {
  1381. return "undefined" != typeof c && (!e || c.event.triggered !== e.type) ? c.event.dispatch.apply(l.elem, arguments) : m
  1382. },
  1383. l.elem = e);
  1384. a = wb(a).split(" ");
  1385. for (g = 0; g < a.length; g++) {
  1386. i = vb.exec(a[g]) || [];
  1387. j = i[1];
  1388. t = (i[2] || "").split(".").sort();
  1389. p = c.event.special[j] || {};
  1390. j = (h ? p.delegateType: p.bindType) || j;
  1391. p = c.event.special[j] || {};
  1392. i = c.extend({
  1393. type: j,
  1394. origType: i[1],
  1395. data: d,
  1396. handler: b,
  1397. guid: b.guid,
  1398. selector: h,
  1399. namespace: t.join(".")
  1400. },
  1401. k);
  1402. if (h) {
  1403. z = i;
  1404. var v = pc.exec(h);
  1405. v && (v[1] = (v[1] || "").toLowerCase(), v[3] = v[3] && RegExp("(?:^|\\s)" + v[3] + "(?:\\s|$)"));
  1406. z.quick = v; ! i.quick && c.expr.match.POS.test(h) && (i.isPositional = !0)
  1407. }
  1408. z = f[j];
  1409. if (!z && (z = f[j] = [], z.delegateCount = 0, !p.setup || !1 === p.setup.call(e, d, t, l))) e.addEventListener ? e.addEventListener(j, l, !1) : e.attachEvent && e.attachEvent("on" + j, l);
  1410. p.add && (p.add.call(e, i), i.handler.guid || (i.handler.guid = b.guid));
  1411. h ? z.splice(z.delegateCount++, 0, i) : z.push(i);
  1412. c.event.global[j] = !0
  1413. }
  1414. e = null
  1415. }
  1416. },
  1417. global: {},
  1418. remove: function(e, a, b, d) {
  1419. var h = c.hasData(e) && c._data(e),
  1420. g,
  1421. l,
  1422. f,
  1423. i,
  1424. j,
  1425. t,
  1426. k,
  1427. z,
  1428. p,
  1429. m;
  1430. if (h && (t = h.events)) {
  1431. a = wb(a || "").split(" ");
  1432. for (g = 0; g < a.length; g++) {
  1433. l = vb.exec(a[g]) || [];
  1434. f = l[1];
  1435. l = l[2];
  1436. if (!f) {
  1437. l = l ? "." + l: "";
  1438. for (j in t) c.event.remove(e, j + l, b, d);
  1439. return
  1440. }
  1441. k = c.event.special[f] || {};
  1442. f = (d ? k.delegateType: k.bindType) || f;
  1443. p = t[f] || [];
  1444. i = p.length;
  1445. l = l ? RegExp("(^|\\.)" + l.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
  1446. if (b || l || d || k.remove) for (j = 0; j < p.length; j++) {
  1447. if (m = p[j], !b || b.guid === m.guid) if (!l || l.test(m.namespace)) if (!d || d === m.selector || "**" === d && m.selector) p.splice(j--, 1),
  1448. m.selector && p.delegateCount--,
  1449. k.remove && k.remove.call(e, m)
  1450. } else p.length = 0;
  1451. 0 === p.length && i !== p.length && ((!k.teardown || !1 === k.teardown.call(e, l)) && c.removeEvent(e, f, h.handle), delete t[f])
  1452. }
  1453. c.isEmptyObject(t) && (z = h.handle, z && (z.elem = null), c.removeData(e, ["events", "handle"], !0))
  1454. }
  1455. },
  1456. customEvent: {
  1457. getData: !0,
  1458. setData: !0,
  1459. changeData: !0
  1460. },
  1461. trigger: function(e, a, b, d) {
  1462. if (!b || 3 !== b.nodeType && 8 !== b.nodeType) {
  1463. var h = e.type || e,
  1464. g = [],
  1465. l,
  1466. f,
  1467. i,
  1468. t,
  1469. k;
  1470. 0 <= h.indexOf("!") && (h = h.slice(0, -1), l = !0);
  1471. 0 <= h.indexOf(".") && (g = h.split("."), h = g.shift(), g.sort());
  1472. if (b && !c.event.customEvent[h] || c.event.global[h]) if (e = "object" == typeof e ? e[c.expando] ? e: new c.Event(h, e) : new c.Event(h), e.type = h, e.isTrigger = !0, e.exclusive = l, e.namespace = g.join("."), e.namespace_re = e.namespace ? RegExp("(^|\\.)" + g.join("\\.(?:.*\\.)?") + "(\\.|$)") : null, g = 0 > h.indexOf(":") ? "on" + h: "", (d || !b) && e.preventDefault(), b) {
  1473. if (e.result = m, e.target || (e.target = b), a = null != a ? c.makeArray(a) : [], a.unshift(e), l = c.event.special[h] || {},
  1474. !(l.trigger && !1 === l.trigger.apply(b, a))) {
  1475. k = [[b, l.bindType || h]];
  1476. if (!d && !l.noBubble && !c.isWindow(b)) {
  1477. f = l.delegateType || h;
  1478. i = null;
  1479. for (d = b.parentNode; d; d = d.parentNode) k.push([d, f]),
  1480. i = d;
  1481. i && i === b.ownerDocument && k.push([i.defaultView || i.parentWindow || j, f])
  1482. }
  1483. for (f = 0; f < k.length && !(d = k[f][0], e.type = k[f][1], (t = (c._data(d, "events") || {})[e.type] && c._data(d, "handle")) && t.apply(d, a), (t = g && d[g]) && c.acceptData(d) && t.apply(d, a), e.isPropagationStopped()); f++);
  1484. e.type = h;
  1485. e.isDefaultPrevented() || (!l._default || !1 === l._default.apply(b.ownerDocument, a)) && ("click" !== h || !c.nodeName(b, "a")) && c.acceptData(b) && g && b[h] && ("focus" !== h && "blur" !== h || 0 !== e.target.offsetWidth) && !c.isWindow(b) && (i = b[g], i && (b[g] = null), c.event.triggered = h, b[h](), c.event.triggered = m, i && (b[g] = i));
  1486. return e.result
  1487. }
  1488. } else for (f in b = c.cache, b) b[f].events && b[f].events[h] && c.event.trigger(e, a, b[f].handle.elem, !0)
  1489. }
  1490. },
  1491. dispatch: function(e) {
  1492. var e = c.event.fix(e || j.event),
  1493. a = (c._data(this, "events") || {})[e.type] || [],
  1494. b = a.delegateCount,
  1495. d = [].slice.call(arguments, 0),
  1496. h = !e.exclusive && !e.namespace,
  1497. g = (c.event.special[e.type] || {}).handle,
  1498. l = [],
  1499. f,
  1500. i,
  1501. t,
  1502. k,
  1503. z,
  1504. p,
  1505. v;
  1506. d[0] = e;
  1507. e.delegateTarget = this;
  1508. if (b && !e.target.disabled && (!e.button || "click" !== e.type)) for (i = e.target; i != this; i = i.parentNode || this) {
  1509. k = {};
  1510. z = [];
  1511. for (f = 0; f < b; f++) t = a[f],
  1512. p = t.selector,
  1513. v = k[p],
  1514. t.isPositional ? v = 0 <= (v || (k[p] = c(p))).index(i) : v === m && (v = k[p] = t.quick ? (!t.quick[1] || i.nodeName.toLowerCase() === t.quick[1]) && (!t.quick[2] || i.id === t.quick[2]) && (!t.quick[3] || t.quick[3].test(i.className)) : c(i).is(p)),
  1515. v && z.push(t);
  1516. z.length && l.push({
  1517. elem: i,
  1518. matches: z
  1519. })
  1520. }
  1521. a.length > b && l.push({
  1522. elem: this,
  1523. matches: a.slice(b)
  1524. });
  1525. for (f = 0; f < l.length && !e.isPropagationStopped(); f++) {
  1526. b = l[f];
  1527. e.currentTarget = b.elem;
  1528. for (a = 0; a < b.matches.length && !e.isImmediatePropagationStopped(); a++) if (t = b.matches[a], h || !e.namespace && !t.namespace || e.namespace_re && e.namespace_re.test(t.namespace)) e.data = t.data,
  1529. e.handleObj = t,
  1530. t = (g || t.handler).apply(b.elem, d),
  1531. t !== m && (e.result = t, !1 === t && (e.preventDefault(), e.stopPropagation()))
  1532. }
  1533. return e.result
  1534. },
  1535. props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  1536. fixHooks: {},
  1537. keyHooks: {
  1538. props: ["char", "charCode", "key", "keyCode"],
  1539. filter: function(e, a) {
  1540. null == e.which && (e.which = null != a.charCode ? a.charCode: a.keyCode);
  1541. return e
  1542. }
  1543. },
  1544. mouseHooks: {
  1545. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),
  1546. filter: function(e, a) {
  1547. var b, c, d, h = a.button,
  1548. g = a.fromElement;
  1549. null == e.pageX && null != a.clientX && (b = e.target.ownerDocument || o, c = b.documentElement, d = b.body, e.pageX = a.clientX + (c && c.scrollLeft || d && d.scrollLeft || 0) - (c && c.clientLeft || d && d.clientLeft || 0), e.pageY = a.clientY + (c && c.scrollTop || d && d.scrollTop || 0) - (c && c.clientTop || d && d.clientTop || 0)); ! e.relatedTarget && g && (e.relatedTarget = g === e.target ? a.toElement: g); ! e.which && h !== m && (e.which = h & 1 ? 1 : h & 2 ? 3 : h & 4 ? 2 : 0);
  1550. return e
  1551. }
  1552. },
  1553. fix: function(e) {
  1554. if (e[c.expando]) return e;
  1555. var a, b, d = e,
  1556. h = c.event.fixHooks[e.type] || {},
  1557. g = h.props ? this.props.concat(h.props) : this.props,
  1558. e = c.Event(d);
  1559. for (a = g.length; a;) b = g[--a],
  1560. e[b] = d[b];
  1561. e.target || (e.target = d.srcElement || o);
  1562. 3 === e.target.nodeType && (e.target = e.target.parentNode);
  1563. e.metaKey === m && (e.metaKey = e.ctrlKey);
  1564. return h.filter ? h.filter(e, d) : e
  1565. },
  1566. special: {
  1567. ready: {
  1568. setup: c.bindReady
  1569. },
  1570. focus: {
  1571. delegateType: "focusin",
  1572. noBubble: !0
  1573. },
  1574. blur: {
  1575. delegateType: "focusout",
  1576. noBubble: !0
  1577. },
  1578. beforeunload: {
  1579. setup: function(e, a, b) {
  1580. c.isWindow(this) && (this.onbeforeunload = b)
  1581. },
  1582. teardown: function(e, a) {
  1583. this.onbeforeunload === a && (this.onbeforeunload = null)
  1584. }
  1585. }
  1586. },
  1587. simulate: function(e, a, b, d) {
  1588. e = c.extend(new c.Event, b, {
  1589. type: e,
  1590. isSimulated: !0,
  1591. originalEvent: {}
  1592. });
  1593. d ? c.event.trigger(e, null, a) : c.event.dispatch.call(a, e);
  1594. e.isDefaultPrevented() && b.preventDefault()
  1595. }
  1596. };
  1597. c.event.handle = c.event.dispatch;
  1598. c.removeEvent = o.removeEventListener ?
  1599. function(e, a, b) {
  1600. e.removeEventListener && e.removeEventListener(a, b, !1)
  1601. }: function(e, a, b) {
  1602. e.detachEvent && e.detachEvent("on" + a, b)
  1603. };
  1604. c.Event = function(e, a) {
  1605. if (! (this instanceof c.Event)) return new c.Event(e, a);
  1606. e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || !1 === e.returnValue || e.getPreventDefault && e.getPreventDefault() ? k: B) : this.type = e;
  1607. a && c.extend(this, a);
  1608. this.timeStamp = e && e.timeStamp || c.now();
  1609. this[c.expando] = !0
  1610. };
  1611. c.Event.prototype = {
  1612. preventDefault: function() {
  1613. this.isDefaultPrevented = k;
  1614. var e = this.originalEvent; ! e || (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
  1615. },
  1616. stopPropagation: function() {
  1617. this.isPropagationStopped = k;
  1618. var e = this.originalEvent; ! e || (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)
  1619. },
  1620. stopImmediatePropagation: function() {
  1621. this.isImmediatePropagationStopped = k;
  1622. this.stopPropagation()
  1623. },
  1624. isDefaultPrevented: B,
  1625. isPropagationStopped: B,
  1626. isImmediatePropagationStopped: B
  1627. };
  1628. c.each({
  1629. mouseenter: "mouseover",
  1630. mouseleave: "mouseout"
  1631. },
  1632. function(e, a) {
  1633. c.event.special[e] = c.event.special[a] = {
  1634. delegateType: a,
  1635. bindType: a,
  1636. handle: function(e) {
  1637. var a = e.relatedTarget,
  1638. b = e.handleObj,
  1639. d;
  1640. if (!a || b.origType === e.type || a !== this && !c.contains(this, a)) a = e.type,
  1641. e.type = b.origType,
  1642. d = b.handler.apply(this, arguments),
  1643. e.type = a;
  1644. return d
  1645. }
  1646. }
  1647. });
  1648. c.support.submitBubbles || (c.event.special.submit = {
  1649. setup: function() {
  1650. if (c.nodeName(this, "form")) return ! 1;
  1651. c.event.add(this, "click._submit keypress._submit",
  1652. function(e) {
  1653. e = e.target; (e = c.nodeName(e, "input") || c.nodeName(e, "button") ? e.form: m) && !e._submit_attached && (c.event.add(e, "submit._submit",
  1654. function(e) {
  1655. this.parentNode && c.event.simulate("submit", this.parentNode, e, !0)
  1656. }), e._submit_attached = !0)
  1657. })
  1658. },
  1659. teardown: function() {
  1660. if (c.nodeName(this, "form")) return ! 1;
  1661. c.event.remove(this, "._submit")
  1662. }
  1663. });
  1664. c.support.changeBubbles || (c.event.special.change = {
  1665. setup: function() {
  1666. if (cb.test(this.nodeName)) {
  1667. if ("checkbox" === this.type || "radio" === this.type) c.event.add(this, "propertychange._change",
  1668. function(e) {
  1669. "checked" === e.originalEvent.propertyName && (this._just_changed = !0)
  1670. }),
  1671. c.event.add(this, "click._change",
  1672. function(e) {
  1673. this._just_changed && (this._just_changed = !1, c.event.simulate("change", this, e, !0))
  1674. });
  1675. return ! 1
  1676. }
  1677. c.event.add(this, "beforeactivate._change",
  1678. function(e) {
  1679. e = e.target;
  1680. cb.test(e.nodeName) && !e._change_attached && (c.event.add(e, "change._change",
  1681. function(e) {
  1682. this.parentNode && !e.isSimulated && c.event.simulate("change", this.parentNode, e, !0)
  1683. }), e._change_attached = !0)
  1684. })
  1685. },
  1686. handle: function(e) {
  1687. var a = e.target;
  1688. if (this !== a || e.isSimulated || e.isTrigger || "radio" !== a.type && "checkbox" !== a.type) return e.handleObj.handler.apply(this, arguments)
  1689. },
  1690. teardown: function() {
  1691. c.event.remove(this, "._change");
  1692. return cb.test(this.nodeName)
  1693. }
  1694. });
  1695. c.support.focusinBubbles || c.each({
  1696. focus: "focusin",
  1697. blur: "focusout"
  1698. },
  1699. function(e, a) {
  1700. var b = 0,
  1701. d = function(e) {
  1702. c.event.simulate(a, e.target, c.event.fix(e), !0)
  1703. };
  1704. c.event.special[a] = {
  1705. setup: function() {
  1706. 0 === b++&&o.addEventListener(e, d, !0)
  1707. },
  1708. teardown: function() {
  1709. 0 === --b && o.removeEventListener(e, d, !0)
  1710. }
  1711. }
  1712. });
  1713. c.fn.extend({
  1714. on: function(e, a, b, d, h) {
  1715. var g, l;
  1716. if ("object" == typeof e) {
  1717. "string" != typeof a && (b = a, a = m);
  1718. for (l in e) this.on(l, a, b, e[l], h);
  1719. return this
  1720. }
  1721. null == b && null == d ? (d = a, b = a = m) : null == d && ("string" == typeof a ? (d = b, b = m) : (d = b, b = a, a = m));
  1722. if (!1 === d) d = B;
  1723. else if (!d) return this;
  1724. 1 === h && (g = d, d = function(e) {
  1725. c().off(e);
  1726. return g.apply(this, arguments)
  1727. },
  1728. d.guid = g.guid || (g.guid = c.guid++));
  1729. return this.each(function() {
  1730. c.event.add(this, e, d, b, a)
  1731. })
  1732. },
  1733. one: function(e, a, b, d) {
  1734. return this.on.call(this, e, a, b, d, 1)
  1735. },
  1736. off: function(e, a, b) {
  1737. if (e && e.preventDefault && e.handleObj) {
  1738. var d = e.handleObj;
  1739. c(e.delegateTarget).off(d.namespace ? d.type + "." + d.namespace: d.type, d.selector, d.handler);
  1740. return this
  1741. }
  1742. if ("object" == typeof e) {
  1743. for (d in e) this.off(d, a, e[d]);
  1744. return this
  1745. }
  1746. if (!1 === a || "function" == typeof a) b = a,
  1747. a = m; ! 1 === b && (b = B);
  1748. return this.each(function() {
  1749. c.event.remove(this, e, b, a)
  1750. })
  1751. },
  1752. bind: function(e, a, b) {
  1753. return this.on(e, null, a, b)
  1754. },
  1755. unbind: function(e, a) {
  1756. return this.off(e, null, a)
  1757. },
  1758. live: function(e, a, b) {
  1759. c(this.context).on(e, this.selector, a, b);
  1760. return this
  1761. },
  1762. die: function(e, a) {
  1763. c(this.context).off(e, this.selector || "**", a);
  1764. return this
  1765. },
  1766. delegate: function(e, a, b, d) {
  1767. return this.on(a, e, b, d)
  1768. },
  1769. undelegate: function(e, a, b) {
  1770. return 1 == arguments.length ? this.off(e, "**") : this.off(a, e, b)
  1771. },
  1772. trigger: function(e, a) {
  1773. return this.each(function() {
  1774. c.event.trigger(e, a, this)
  1775. })
  1776. },
  1777. triggerHandler: function(e, a) {
  1778. if (this[0]) return c.event.trigger(e, a, this[0], !0)
  1779. },
  1780. toggle: function(e) {
  1781. var a = arguments,
  1782. b = e.guid || c.guid++,
  1783. d = 0,
  1784. h = function(b) {
  1785. var h = (c._data(this, "lastToggle" + e.guid) || 0) % d;
  1786. c._data(this, "lastToggle" + e.guid, h + 1);
  1787. b.preventDefault();
  1788. return a[h].apply(this, arguments) || !1
  1789. };
  1790. for (h.guid = b; d < a.length;) a[d++].guid = b;
  1791. return this.click(h)
  1792. },
  1793. hover: function(e, a) {
  1794. return this.mouseenter(e).mouseleave(a || e)
  1795. }
  1796. });
  1797. c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
  1798. function(e, a) {
  1799. c.fn[a] = function(e, b) {
  1800. b == null && (b = e, e = null);
  1801. return arguments.length > 0 ? this.bind(a, e, b) : this.trigger(a)
  1802. };
  1803. c.attrFn && (c.attrFn[a] = true);
  1804. nc.test(a) && (c.event.fixHooks[a] = c.event.keyHooks);
  1805. oc.test(a) && (c.event.fixHooks[a] = c.event.mouseHooks)
  1806. });
  1807. var xb = function(e, a, b, d, c, h) {
  1808. for (var c = 0,
  1809. g = d.length; c < g; c++) {
  1810. var l = d[c];
  1811. if (l) {
  1812. for (var f = !1,
  1813. l = l[e]; l;) {
  1814. if (l[ta] === b) {
  1815. f = d[l.sizset];
  1816. break
  1817. }
  1818. if (1 === l.nodeType) if (h || (l[ta] = b, l.sizset = c), "string" != typeof a) {
  1819. if (l === a) {
  1820. f = !0;
  1821. break
  1822. }
  1823. } else if (0 < A.filter(a, [l]).length) {
  1824. f = l;
  1825. break
  1826. }
  1827. l = l[e]
  1828. }
  1829. d[c] = f
  1830. }
  1831. }
  1832. },
  1833. yb = function(e, a, b, d, c, h) {
  1834. for (var c = 0,
  1835. g = d.length; c < g; c++) {
  1836. var l = d[c];
  1837. if (l) {
  1838. for (var f = !1,
  1839. l = l[e]; l;) {
  1840. if (l[ta] === b) {
  1841. f = d[l.sizset];
  1842. break
  1843. }
  1844. 1 === l.nodeType && !h && (l[ta] = b, l.sizset = c);
  1845. if (l.nodeName.toLowerCase() === a) {
  1846. f = l;
  1847. break
  1848. }
  1849. l = l[e]
  1850. }
  1851. d[c] = f
  1852. }
  1853. }
  1854. },
  1855. db = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
  1856. ta = "sizcache" + (Math.random() + "").replace(".", ""),
  1857. eb = 0,
  1858. zb = Object.prototype.toString,
  1859. Na = !1,
  1860. Ab = !0,
  1861. ua = /\\/g,
  1862. qc = /\r\n/g,
  1863. Oa = /\W/; [0, 0].sort(function() {
  1864. Ab = !1;
  1865. return 0
  1866. });
  1867. var A = function(e, a, b, d) {
  1868. var b = b || [],
  1869. c = a = a || o;
  1870. if (1 !== a.nodeType && 9 !== a.nodeType) return [];
  1871. if (!e || "string" != typeof e) return b;
  1872. var h, g, l, f, i, t, j = !0,
  1873. k = A.isXML(a),
  1874. z = [],
  1875. p = e;
  1876. do
  1877. if (db.exec(""), h = db.exec(p)) if (p = h[3], z.push(h[1]), h[2]) {
  1878. f = h[3];
  1879. break
  1880. }
  1881. while (h);
  1882. if (1 < z.length && rc.exec(e)) if (2 === z.length && H.relative[z[0]]) g = Bb(z[0] + z[1], a, d);
  1883. else for (g = H.relative[z[0]] ? [a] : A(z.shift(), a); z.length;) e = z.shift(),
  1884. H.relative[e] && (e += z.shift()),
  1885. g = Bb(e, g, d);
  1886. else if (!d && 1 < z.length && 9 === a.nodeType && !k && H.match.ID.test(z[0]) && !H.match.ID.test(z[z.length - 1]) && (i = A.find(z.shift(), a, k), a = i.expr ? A.filter(i.expr, i.set)[0] : i.set[0]), a) {
  1887. i = d ? {
  1888. expr: z.pop(),
  1889. set: ca(d)
  1890. }: A.find(z.pop(), 1 === z.length && ("~" === z[0] || "+" === z[0]) && a.parentNode ? a.parentNode: a, k);
  1891. g = i.expr ? A.filter(i.expr, i.set) : i.set;
  1892. for (0 < z.length ? l = ca(g) : j = !1; z.length;) h = t = z.pop(),
  1893. H.relative[t] ? h = z.pop() : t = "",
  1894. null == h && (h = a),
  1895. H.relative[t](l, h, k)
  1896. } else l = [];
  1897. l || (l = g);
  1898. l || A.error(t || e);
  1899. if ("[object Array]" === zb.call(l)) if (j) if (a && 1 === a.nodeType) for (e = 0; null != l[e]; e++) l[e] && (!0 === l[e] || 1 === l[e].nodeType && A.contains(a, l[e])) && b.push(g[e]);
  1900. else for (e = 0; null != l[e]; e++) l[e] && 1 === l[e].nodeType && b.push(g[e]);
  1901. else b.push.apply(b, l);
  1902. else ca(l, b);
  1903. f && (A(f, c, b, d), A.uniqueSort(b));
  1904. return b
  1905. };
  1906. A.uniqueSort = function(e) {
  1907. if (Pa && (Na = Ab, e.sort(Pa), Na)) for (var a = 1; a < e.length; a++) e[a] === e[a - 1] && e.splice(a--, 1);
  1908. return e
  1909. };
  1910. A.matches = function(e, a) {
  1911. return A(e, null, null, a)
  1912. };
  1913. A.matchesSelector = function(e, a) {
  1914. return 0 < A(a, null, null, [e]).length
  1915. };
  1916. A.find = function(e, a, b) {
  1917. var d, c, h, g, l, f;
  1918. if (!e) return [];
  1919. c = 0;
  1920. for (h = H.order.length; c < h; c++) if (l = H.order[c], g = H.leftMatch[l].exec(e)) if (f = g[1], g.splice(1, 1), "\\" !== f.substr(f.length - 1) && (g[1] = (g[1] || "").replace(ua, ""), d = H.find[l](g, a, b), null != d)) {
  1921. e = e.replace(H.match[l], "");
  1922. break
  1923. }
  1924. d || (d = "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName("*") : []);
  1925. return {
  1926. set: d,
  1927. expr: e
  1928. }
  1929. };
  1930. A.filter = function(e, a, b, d) {
  1931. for (var c, h, g, l, f, i, t, j, k = e,
  1932. z = [], p = a, v = a && a[0] && A.isXML(a[0]); e && a.length;) {
  1933. for (g in H.filter) if (null != (c = H.leftMatch[g].exec(e)) && c[2]) if (i = H.filter[g], f = c[1], h = !1, c.splice(1, 1), "\\" !== f.substr(f.length - 1)) {
  1934. p === z && (z = []);
  1935. if (H.preFilter[g]) if (c = H.preFilter[g](c, p, b, z, d, v)) {
  1936. if (!0 === c) continue
  1937. } else h = l = !0;
  1938. if (c) for (t = 0; null != (f = p[t]); t++) f && (l = i(f, c, t, p), j = d ^ l, b && null != l ? j ? h = !0 : p[t] = !1 : j && (z.push(f), h = !0));
  1939. if (l !== m) {
  1940. b || (p = z);
  1941. e = e.replace(H.match[g], "");
  1942. if (!h) return [];
  1943. break
  1944. }
  1945. }
  1946. if (e === k) if (null == h) A.error(e);
  1947. else break;
  1948. k = e
  1949. }
  1950. return p
  1951. };
  1952. A.error = function(e) {
  1953. throw "Syntax error, unrecognized expression: " + e;
  1954. };
  1955. var fb = A.getText = function(e) {
  1956. var a, b;
  1957. a = e.nodeType;
  1958. var d = "";
  1959. if (a) if (1 === a) {
  1960. if ("string" == typeof e.textContent) return e.textContent;
  1961. if ("string" == typeof e.innerText) return e.innerText.replace(qc, "");
  1962. for (e = e.firstChild; e; e = e.nextSibling) d += fb(e)
  1963. } else {
  1964. if (3 === a || 4 === a) return e.nodeValue
  1965. } else for (a = 0; b = e[a]; a++) 8 !== b.nodeType && (d += fb(b));
  1966. return d
  1967. },
  1968. H = A.selectors = {
  1969. order: ["ID", "NAME", "TAG"],
  1970. match: {
  1971. ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  1972. CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  1973. NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
  1974. ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
  1975. TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
  1976. CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
  1977. POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
  1978. PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
  1979. },
  1980. leftMatch: {},
  1981. attrMap: {
  1982. "class": "className",
  1983. "for": "htmlFor"
  1984. },
  1985. attrHandle: {
  1986. href: function(e) {
  1987. return e.getAttribute("href")
  1988. },
  1989. type: function(e) {
  1990. return e.getAttribute("type")
  1991. }
  1992. },
  1993. relative: {
  1994. "+": function(e, a) {
  1995. var b = "string" == typeof a,
  1996. d = b && !Oa.test(a),
  1997. b = b && !d;
  1998. d && (a = a.toLowerCase());
  1999. for (var d = 0,
  2000. c = e.length,
  2001. h; d < c; d++) if (h = e[d]) {
  2002. for (; (h = h.previousSibling) && 1 !== h.nodeType;);
  2003. e[d] = b || h && h.nodeName.toLowerCase() === a ? h || !1 : h === a
  2004. }
  2005. b && A.filter(a, e, !0)
  2006. },
  2007. ">": function(e, a) {
  2008. var b, d = "string" == typeof a,
  2009. c = 0,
  2010. h = e.length;
  2011. if (d && !Oa.test(a)) for (a = a.toLowerCase(); c < h; c++) {
  2012. if (b = e[c]) b = b.parentNode,
  2013. e[c] = b.nodeName.toLowerCase() === a ? b: !1
  2014. } else {
  2015. for (; c < h; c++)(b = e[c]) && (e[c] = d ? b.parentNode: b.parentNode === a);
  2016. d && A.filter(a, e, !0)
  2017. }
  2018. },
  2019. "": function(e, a, b) {
  2020. var d, c = eb++,
  2021. h = xb;
  2022. "string" == typeof a && !Oa.test(a) && (a = a.toLowerCase(), d = a, h = yb);
  2023. h("parentNode", a, c, e, d, b)
  2024. },
  2025. "~": function(e, a, b) {
  2026. var d, c = eb++,
  2027. h = xb;
  2028. "string" == typeof a && !Oa.test(a) && (a = a.toLowerCase(), d = a, h = yb);
  2029. h("previousSibling", a, c, e, d, b)
  2030. }
  2031. },
  2032. find: {
  2033. ID: function(e, a, b) {
  2034. if ("undefined" != typeof a.getElementById && !b) return (e = a.getElementById(e[1])) && e.parentNode ? [e] : []
  2035. },
  2036. NAME: function(e, a) {
  2037. if ("undefined" != typeof a.getElementsByName) {
  2038. for (var b = [], d = a.getElementsByName(e[1]), c = 0, h = d.length; c < h; c++) d[c].getAttribute("name") === e[1] && b.push(d[c]);
  2039. return 0 === b.length ? null: b
  2040. }
  2041. },
  2042. TAG: function(e, a) {
  2043. if ("undefined" != typeof a.getElementsByTagName) return a.getElementsByTagName(e[1])
  2044. }
  2045. },
  2046. preFilter: {
  2047. CLASS: function(e, a, b, d, c, h) {
  2048. e = " " + e[1].replace(ua, "") + " ";
  2049. if (h) return e;
  2050. for (var h = 0,
  2051. g; null != (g = a[h]); h++) g && (c ^ (g.className && 0 <= (" " + g.className + " ").replace(/[\t\n\r]/g, " ").indexOf(e)) ? b || d.push(g) : b && (a[h] = !1));
  2052. return ! 1
  2053. },
  2054. ID: function(e) {
  2055. return e[1].replace(ua, "")
  2056. },
  2057. TAG: function(e) {
  2058. return e[1].replace(ua, "").toLowerCase()
  2059. },
  2060. CHILD: function(e) {
  2061. if ("nth" === e[1]) {
  2062. e[2] || A.error(e[0]);
  2063. e[2] = e[2].replace(/^\+|\s*/g, "");
  2064. var a = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even" === e[2] && "2n" || "odd" === e[2] && "2n+1" || !/\D/.test(e[2]) && "0n+" + e[2] || e[2]);
  2065. e[2] = a[1] + (a[2] || 1) - 0;
  2066. e[3] = a[3] - 0
  2067. } else e[2] && A.error(e[0]);
  2068. e[0] = eb++;
  2069. return e
  2070. },
  2071. ATTR: function(e, a, b, d, c, h) {
  2072. a = e[1] = e[1].replace(ua, ""); ! h && H.attrMap[a] && (e[1] = H.attrMap[a]);
  2073. e[4] = (e[4] || e[5] || "").replace(ua, "");
  2074. "~=" === e[2] && (e[4] = " " + e[4] + " ");
  2075. return e
  2076. },
  2077. PSEUDO: function(e, a, b, d, c) {
  2078. if ("not" === e[1]) if (1 < (db.exec(e[3]) || "").length || /^\w/.test(e[3])) e[3] = A(e[3], null, null, a);
  2079. else return e = A.filter(e[3], a, b, 1 ^ c),
  2080. b || d.push.apply(d, e),
  2081. !1;
  2082. else if (H.match.POS.test(e[0]) || H.match.CHILD.test(e[0])) return ! 0;
  2083. return e
  2084. },
  2085. POS: function(e) {
  2086. e.unshift(!0);
  2087. return e
  2088. }
  2089. },
  2090. filters: {
  2091. enabled: function(e) {
  2092. return ! 1 === e.disabled && "hidden" !== e.type
  2093. },
  2094. disabled: function(e) {
  2095. return ! 0 === e.disabled
  2096. },
  2097. checked: function(e) {
  2098. return ! 0 === e.checked
  2099. },
  2100. selected: function(e) {
  2101. e.parentNode && e.parentNode.selectedIndex;
  2102. return ! 0 === e.selected
  2103. },
  2104. parent: function(e) {
  2105. return !! e.firstChild
  2106. },
  2107. empty: function(e) {
  2108. return ! e.firstChild
  2109. },
  2110. has: function(e, a, b) {
  2111. return !! A(b[3], e).length
  2112. },
  2113. header: function(e) {
  2114. return /h\d/i.test(e.nodeName)
  2115. },
  2116. text: function(e) {
  2117. var a = e.getAttribute("type"),
  2118. b = e.type;
  2119. return "input" === e.nodeName.toLowerCase() && "text" === b && (a === b || null === a)
  2120. },
  2121. radio: function(e) {
  2122. return "input" === e.nodeName.toLowerCase() && "radio" === e.type
  2123. },
  2124. checkbox: function(e) {
  2125. return "input" === e.nodeName.toLowerCase() && "checkbox" === e.type
  2126. },
  2127. file: function(e) {
  2128. return "input" === e.nodeName.toLowerCase() && "file" === e.type
  2129. },
  2130. password: function(e) {
  2131. return "input" === e.nodeName.toLowerCase() && "password" === e.type
  2132. },
  2133. submit: function(e) {
  2134. var a = e.nodeName.toLowerCase();
  2135. return ("input" === a || "button" === a) && "submit" === e.type
  2136. },
  2137. image: function(e) {
  2138. return "input" === e.nodeName.toLowerCase() && "image" === e.type
  2139. },
  2140. reset: function(e) {
  2141. var a = e.nodeName.toLowerCase();
  2142. return ("input" === a || "button" === a) && "reset" === e.type
  2143. },
  2144. button: function(e) {
  2145. var a = e.nodeName.toLowerCase();
  2146. return "input" === a && "button" === e.type || "button" === a
  2147. },
  2148. input: function(e) {
  2149. return /input|select|textarea|button/i.test(e.nodeName)
  2150. },
  2151. focus: function(e) {
  2152. return e === e.ownerDocument.activeElement
  2153. }
  2154. },
  2155. setFilters: {
  2156. first: function(e, a) {
  2157. return 0 === a
  2158. },
  2159. last: function(a, b, d, c) {
  2160. return b === c.length - 1
  2161. },
  2162. even: function(a, b) {
  2163. return 0 === b % 2
  2164. },
  2165. odd: function(a, b) {
  2166. return 1 === b % 2
  2167. },
  2168. lt: function(a, b, d) {
  2169. return b < d[3] - 0
  2170. },
  2171. gt: function(a, b, d) {
  2172. return b > d[3] - 0
  2173. },
  2174. nth: function(a, b, d) {
  2175. return d[3] - 0 === b
  2176. },
  2177. eq: function(a, b, d) {
  2178. return d[3] - 0 === b
  2179. }
  2180. },
  2181. filter: {
  2182. PSEUDO: function(a, b, d, c) {
  2183. var h = b[1],
  2184. g = H.filters[h];
  2185. if (g) return g(a, d, b, c);
  2186. if ("contains" === h) return 0 <= (a.textContent || a.innerText || fb([a]) || "").indexOf(b[3]);
  2187. if ("not" === h) {
  2188. b = b[3];
  2189. d = 0;
  2190. for (c = b.length; d < c; d++) if (b[d] === a) return ! 1;
  2191. return ! 0
  2192. }
  2193. A.error(h)
  2194. },
  2195. CHILD: function(a, b) {
  2196. var d, c, h, g, l, f;
  2197. d = b[1];
  2198. f = a;
  2199. switch (d) {
  2200. case "only":
  2201. case "first":
  2202. for (; f = f.previousSibling;) if (1 === f.nodeType) return ! 1;
  2203. if ("first" === d) return ! 0;
  2204. f = a;
  2205. case "last":
  2206. for (; f = f.nextSibling;) if (1 === f.nodeType) return ! 1;
  2207. return ! 0;
  2208. case "nth":
  2209. d = b[2];
  2210. c = b[3];
  2211. if (1 === d && 0 === c) return ! 0;
  2212. h = b[0];
  2213. if ((g = a.parentNode) && (g[ta] !== h || !a.nodeIndex)) {
  2214. l = 0;
  2215. for (f = g.firstChild; f; f = f.nextSibling) 1 === f.nodeType && (f.nodeIndex = ++l);
  2216. g[ta] = h
  2217. }
  2218. f = a.nodeIndex - c;
  2219. return 0 === d ? 0 === f: 0 === f % d && 0 <= f / d
  2220. }
  2221. },
  2222. ID: function(a, b) {
  2223. return 1 === a.nodeType && a.getAttribute("id") === b
  2224. },
  2225. TAG: function(a, b) {
  2226. return "*" === b && 1 === a.nodeType || !!a.nodeName && a.nodeName.toLowerCase() === b
  2227. },
  2228. CLASS: function(a, b) {
  2229. return - 1 < (" " + (a.className || a.getAttribute("class")) + " ").indexOf(b)
  2230. },
  2231. ATTR: function(a, b) {
  2232. var d = b[1],
  2233. d = A.attr ? A.attr(a, d) : H.attrHandle[d] ? H.attrHandle[d](a) : null != a[d] ? a[d] : a.getAttribute(d),
  2234. c = d + "",
  2235. h = b[2],
  2236. g = b[4];
  2237. return null == d ? "!=" === h: !h && A.attr ? null != d: "=" === h ? c === g: "*=" === h ? 0 <= c.indexOf(g) : "~=" === h ? 0 <= (" " + c + " ").indexOf(g) : g ? "!=" === h ? c !== g: "^=" === h ? 0 === c.indexOf(g) : "$=" === h ? c.substr(c.length - g.length) === g: "|=" === h ? c === g || c.substr(0, g.length + 1) === g + "-": !1 : c && !1 !== d
  2238. },
  2239. POS: function(a, b, d, c) {
  2240. var h = H.setFilters[b[2]];
  2241. if (h) return h(a, d, b, c)
  2242. }
  2243. }
  2244. },
  2245. rc = H.match.POS,
  2246. sc = function(a, b) {
  2247. return "\\" + (b - 0 + 1)
  2248. },
  2249. Ba;
  2250. for (Ba in H.match) H.match[Ba] = RegExp(H.match[Ba].source + /(?![^\[]*\])(?![^\(]*\))/.source),
  2251. H.leftMatch[Ba] = RegExp(/(^(?:.|\r|\n)*?)/.source + H.match[Ba].source.replace(/\\(\d+)/g, sc));
  2252. var ca = function(a, b) {
  2253. a = Array.prototype.slice.call(a, 0);
  2254. return b ? (b.push.apply(b, a), b) : a
  2255. };
  2256. try {
  2257. Array.prototype.slice.call(o.documentElement.childNodes, 0)[0].nodeType
  2258. } catch(ad) {
  2259. ca = function(a, b) {
  2260. var d = 0,
  2261. c = b || [];
  2262. if ("[object Array]" === zb.call(a)) Array.prototype.push.apply(c, a);
  2263. else if ("number" == typeof a.length) for (var h = a.length; d < h; d++) c.push(a[d]);
  2264. else for (; a[d]; d++) c.push(a[d]);
  2265. return c
  2266. }
  2267. }
  2268. var Pa, Ca;
  2269. o.documentElement.compareDocumentPosition ? Pa = function(a, b) {
  2270. return a === b ? (Na = !0, 0) : !a.compareDocumentPosition || !b.compareDocumentPosition ? a.compareDocumentPosition ? -1 : 1 : a.compareDocumentPosition(b) & 4 ? -1 : 1
  2271. }: (Pa = function(a, b) {
  2272. if (a === b) return Na = !0,
  2273. 0;
  2274. if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex;
  2275. var d, c, h = [],
  2276. g = [];
  2277. d = a.parentNode;
  2278. c = b.parentNode;
  2279. var l = d;
  2280. if (d === c) return Ca(a, b);
  2281. if (!d) return - 1;
  2282. if (!c) return 1;
  2283. for (; l;) h.unshift(l),
  2284. l = l.parentNode;
  2285. for (l = c; l;) g.unshift(l),
  2286. l = l.parentNode;
  2287. d = h.length;
  2288. c = g.length;
  2289. for (l = 0; l < d && l < c; l++) if (h[l] !== g[l]) return Ca(h[l], g[l]);
  2290. return l === d ? Ca(a, g[l], -1) : Ca(h[l], b, 1)
  2291. },
  2292. Ca = function(a, b, d) {
  2293. if (a === b) return d;
  2294. for (a = a.nextSibling; a;) {
  2295. if (a === b) return - 1;
  2296. a = a.nextSibling
  2297. }
  2298. return 1
  2299. });
  2300. var Qa = o.createElement("div"),
  2301. Cb = "script" + (new Date).getTime(),
  2302. Ra = o.documentElement;
  2303. Qa.innerHTML = "<a name='" + Cb + "'/>";
  2304. Ra.insertBefore(Qa, Ra.firstChild);
  2305. o.getElementById(Cb) && (H.find.ID = function(a, b, d) {
  2306. if ("undefined" != typeof b.getElementById && !d) return (b = b.getElementById(a[1])) ? b.id === a[1] || "undefined" != typeof b.getAttributeNode && b.getAttributeNode("id").nodeValue === a[1] ? [b] : m: []
  2307. },
  2308. H.filter.ID = function(a, b) {
  2309. var d = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");
  2310. return 1 === a.nodeType && d && d.nodeValue === b
  2311. });
  2312. Ra.removeChild(Qa);
  2313. var Ra = Qa = null,
  2314. ka = o.createElement("div");
  2315. ka.appendChild(o.createComment(""));
  2316. 0 < ka.getElementsByTagName("*").length && (H.find.TAG = function(a, b) {
  2317. var d = b.getElementsByTagName(a[1]);
  2318. if ("*" === a[1]) {
  2319. for (var c = [], h = 0; d[h]; h++) 1 === d[h].nodeType && c.push(d[h]);
  2320. d = c
  2321. }
  2322. return d
  2323. });
  2324. ka.innerHTML = "<a href='#'></a>";
  2325. ka.firstChild && "undefined" != typeof ka.firstChild.getAttribute && "#" !== ka.firstChild.getAttribute("href") && (H.attrHandle.href = function(a) {
  2326. return a.getAttribute("href", 2)
  2327. });
  2328. ka = null;
  2329. if (o.querySelectorAll) {
  2330. var gb = A,
  2331. Sa = o.createElement("div");
  2332. Sa.innerHTML = "<p class='TEST'></p>";
  2333. if (!Sa.querySelectorAll || 0 !== Sa.querySelectorAll(".TEST").length) {
  2334. var A = function(a, b, d, c) {
  2335. b = b || o;
  2336. if (!c && !A.isXML(b)) {
  2337. var h = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);
  2338. if (h && (1 === b.nodeType || 9 === b.nodeType)) {
  2339. if (h[1]) return ca(b.getElementsByTagName(a), d);
  2340. if (h[2] && H.find.CLASS && b.getElementsByClassName) return ca(b.getElementsByClassName(h[2]), d)
  2341. }
  2342. if (9 === b.nodeType) {
  2343. if ("body" === a && b.body) return ca([b.body], d);
  2344. if (h && h[3]) {
  2345. var g = b.getElementById(h[3]);
  2346. if (!g || !g.parentNode) return ca([], d);
  2347. if (g.id === h[3]) return ca([g], d)
  2348. }
  2349. try {
  2350. return ca(b.querySelectorAll(a), d)
  2351. } catch(l) {}
  2352. } else if (1 === b.nodeType && "object" !== b.nodeName.toLowerCase()) {
  2353. var h = b,
  2354. f = (g = b.getAttribute("id")) || "__sizzle__",
  2355. i = b.parentNode,
  2356. t = /^\s*[+~]/.test(a);
  2357. g ? f = f.replace(/'/g, "\\$&") : b.setAttribute("id", f);
  2358. t && i && (b = b.parentNode);
  2359. try {
  2360. if (!t || i) return ca(b.querySelectorAll("[id='" + f + "'] " + a), d)
  2361. } catch(j) {} finally {
  2362. g || h.removeAttribute("id")
  2363. }
  2364. }
  2365. }
  2366. return gb(a, b, d, c)
  2367. },
  2368. hb;
  2369. for (hb in gb) A[hb] = gb[hb];
  2370. Sa = null
  2371. }
  2372. }
  2373. var Ta = o.documentElement,
  2374. Ua = Ta.matchesSelector || Ta.mozMatchesSelector || Ta.webkitMatchesSelector || Ta.msMatchesSelector;
  2375. if (Ua) {
  2376. var tc = !Ua.call(o.createElement("div"), "div"),
  2377. Db = !1;
  2378. try {
  2379. Ua.call(o.documentElement, "[test!='']:sizzle")
  2380. } catch(bd) {
  2381. Db = !0
  2382. }
  2383. A.matchesSelector = function(a, b) {
  2384. b = b.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
  2385. if (!A.isXML(a)) try {
  2386. if (Db || !H.match.PSEUDO.test(b) && !/!=/.test(b)) {
  2387. var d = Ua.call(a, b);
  2388. if (d || !tc || a.document && 11 !== a.document.nodeType) return d
  2389. }
  2390. } catch(c) {}
  2391. return 0 < A(b, null, null, [a]).length
  2392. }
  2393. }
  2394. var va = o.createElement("div");
  2395. va.innerHTML = "<div class='test e'></div><div class='test'></div>";
  2396. va.getElementsByClassName && 0 !== va.getElementsByClassName("e").length && (va.lastChild.className = "e", 1 !== va.getElementsByClassName("e").length && (H.order.splice(1, 0, "CLASS"), H.find.CLASS = function(a, b, d) {
  2397. if ("undefined" != typeof b.getElementsByClassName && !d) return b.getElementsByClassName(a[1])
  2398. },
  2399. va = null));
  2400. o.documentElement.contains ? A.contains = function(a, b) {
  2401. return a !== b && (a.contains ? a.contains(b) : true)
  2402. }: o.documentElement.compareDocumentPosition ? A.contains = function(a, b) {
  2403. return !! (a.compareDocumentPosition(b) & 16)
  2404. }: A.contains = function() {
  2405. return false
  2406. };
  2407. A.isXML = function(a) {
  2408. return (a = (a ? a.ownerDocument || a: 0).documentElement) ? a.nodeName !== "HTML": false
  2409. };
  2410. var Bb = function(a, b, d) {
  2411. for (var c, h = [], g = "", b = b.nodeType ? [b] : b; c = H.match.PSEUDO.exec(a);) {
  2412. g = g + c[0];
  2413. a = a.replace(H.match.PSEUDO, "")
  2414. }
  2415. a = H.relative[a] ? a + "*": a;
  2416. c = 0;
  2417. for (var l = b.length; c < l; c++) A(a, b[c], h, d);
  2418. return A.filter(g, h)
  2419. };
  2420. A.attr = c.attr;
  2421. A.selectors.attrMap = {};
  2422. c.find = A;
  2423. c.expr = A.selectors;
  2424. c.expr[":"] = c.expr.filters;
  2425. c.unique = A.uniqueSort;
  2426. c.text = A.getText;
  2427. c.isXMLDoc = A.isXML;
  2428. c.contains = A.contains;
  2429. var uc = /Until$/,
  2430. vc = /^(?:parents|prevUntil|prevAll)/,
  2431. wc = /,/,
  2432. Wb = /^.[^:#\[\.,]*$/,
  2433. xc = Array.prototype.slice,
  2434. Eb = c.expr.match.POS,
  2435. yc = {
  2436. children: !0,
  2437. contents: !0,
  2438. next: !0,
  2439. prev: !0
  2440. };
  2441. c.fn.extend({
  2442. find: function(a) {
  2443. var b = this,
  2444. d, h;
  2445. if (typeof a != "string") return c(a).filter(function() {
  2446. d = 0;
  2447. for (h = b.length; d < h; d++) if (c.contains(b[d], this)) return true
  2448. });
  2449. var g = this.pushStack("", "find", a),
  2450. l,
  2451. f,
  2452. i;
  2453. d = 0;
  2454. for (h = this.length; d < h; d++) {
  2455. l = g.length;
  2456. c.find(a, this[d], g);
  2457. if (d > 0) for (f = l; f < g.length; f++) for (i = 0; i < l; i++) if (g[i] === g[f]) {
  2458. g.splice(f--, 1);
  2459. break
  2460. }
  2461. }
  2462. return g
  2463. },
  2464. has: function(a) {
  2465. var b = c(a);
  2466. return this.filter(function() {
  2467. for (var a = 0,
  2468. e = b.length; a < e; a++) if (c.contains(this, b[a])) return true
  2469. })
  2470. },
  2471. not: function(a) {
  2472. return this.pushStack(aa(this, a, false), "not", a)
  2473. },
  2474. filter: function(a) {
  2475. return this.pushStack(aa(this, a, true), "filter", a)
  2476. },
  2477. is: function(a) {
  2478. return !! a && (typeof a == "string" ? Eb.test(a) ? c(a, this.context).index(this[0]) >= 0 : c.filter(a, this).length > 0 : this.filter(a).length > 0)
  2479. },
  2480. closest: function(a, b) {
  2481. var d = [],
  2482. h,
  2483. g,
  2484. l = this[0];
  2485. if (c.isArray(a)) {
  2486. for (g = 1; l && l.ownerDocument && l !== b;) {
  2487. for (h = 0; h < a.length; h++) c(l).is(a[h]) && d.push({
  2488. selector: a[h],
  2489. elem: l,
  2490. level: g
  2491. });
  2492. l = l.parentNode;
  2493. g++
  2494. }
  2495. return d
  2496. }
  2497. var f = Eb.test(a) || typeof a != "string" ? c(a, b || this.context) : 0;
  2498. h = 0;
  2499. for (g = this.length; h < g; h++) for (l = this[h]; l;) {
  2500. if (f ? f.index(l) > -1 : c.find.matchesSelector(l, a)) {
  2501. d.push(l);
  2502. break
  2503. }
  2504. l = l.parentNode;
  2505. if (!l || !l.ownerDocument || l === b || l.nodeType === 11) break
  2506. }
  2507. d = d.length > 1 ? c.unique(d) : d;
  2508. return this.pushStack(d, "closest", a)
  2509. },
  2510. index: function(a) {
  2511. return ! a ? this[0] && this[0].parentNode ? this.prevAll().length: -1 : typeof a == "string" ? c.inArray(this[0], c(a)) : c.inArray(a.jquery ? a[0] : a, this)
  2512. },
  2513. add: function(a, b) {
  2514. var d = typeof a == "string" ? c(a, b) : c.makeArray(a && a.nodeType ? [a] : a),
  2515. h = c.merge(this.get(), d);
  2516. return this.pushStack(!d[0] || !d[0].parentNode || d[0].parentNode.nodeType === 11 || !h[0] || !h[0].parentNode || h[0].parentNode.nodeType === 11 ? h: c.unique(h))
  2517. },
  2518. andSelf: function() {
  2519. return this.add(this.prevObject)
  2520. }
  2521. });
  2522. c.each({
  2523. parent: function(a) {
  2524. return (a = a.parentNode) && a.nodeType !== 11 ? a: null
  2525. },
  2526. parents: function(a) {
  2527. return c.dir(a, "parentNode")
  2528. },
  2529. parentsUntil: function(a, b, d) {
  2530. return c.dir(a, "parentNode", d)
  2531. },
  2532. next: function(a) {
  2533. return c.nth(a, 2, "nextSibling")
  2534. },
  2535. prev: function(a) {
  2536. return c.nth(a, 2, "previousSibling")
  2537. },
  2538. nextAll: function(a) {
  2539. return c.dir(a, "nextSibling")
  2540. },
  2541. prevAll: function(a) {
  2542. return c.dir(a, "previousSibling")
  2543. },
  2544. nextUntil: function(a, b, d) {
  2545. return c.dir(a, "nextSibling", d)
  2546. },
  2547. prevUntil: function(a, b, d) {
  2548. return c.dir(a, "previousSibling", d)
  2549. },
  2550. siblings: function(a) {
  2551. return c.sibling(a.parentNode.firstChild, a)
  2552. },
  2553. children: function(a) {
  2554. return c.sibling(a.firstChild)
  2555. },
  2556. contents: function(a) {
  2557. return c.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document: c.makeArray(a.childNodes)
  2558. }
  2559. },
  2560. function(a, b) {
  2561. c.fn[a] = function(d, h) {
  2562. var g = c.map(this, b, d),
  2563. l = xc.call(arguments);
  2564. uc.test(a) || (h = d);
  2565. h && typeof h == "string" && (g = c.filter(h, g));
  2566. g = this.length > 1 && !yc[a] ? c.unique(g) : g; (this.length > 1 || wc.test(h)) && vc.test(a) && (g = g.reverse());
  2567. return this.pushStack(g, a, l.join(","))
  2568. }
  2569. });
  2570. c.extend({
  2571. filter: function(a, b, d) {
  2572. d && (a = ":not(" + a + ")");
  2573. return b.length === 1 ? c.find.matchesSelector(b[0], a) ? [b[0]] : [] : c.find.matches(a, b)
  2574. },
  2575. dir: function(a, b, d) {
  2576. for (var h = [], a = a[b]; a && a.nodeType !== 9 && (d === m || a.nodeType !== 1 || !c(a).is(d));) {
  2577. a.nodeType === 1 && h.push(a);
  2578. a = a[b]
  2579. }
  2580. return h
  2581. },
  2582. nth: function(a, b, d) {
  2583. for (var b = b || 1,
  2584. c = 0; a; a = a[d]) if (a.nodeType === 1 && ++c === b) break;
  2585. return a
  2586. },
  2587. sibling: function(a, b) {
  2588. for (var d = []; a; a = a.nextSibling) a.nodeType === 1 && a !== b && d.push(a);
  2589. return d
  2590. }
  2591. });
  2592. var ob = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
  2593. zc = / jQuery\d+="(?:\d+|null)"/g,
  2594. ib = /^\s+/,
  2595. Fb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
  2596. Gb = /<([\w:]+)/,
  2597. Ac = /<tbody/i,
  2598. Bc = /<|&#?\w+;/,
  2599. Cc = /<(?:script|style)/i,
  2600. Dc = /<(?:script|object|embed|option|style)/i,
  2601. Ec = RegExp("<(?:" + ob.replace(" ", "|") + ")", "i"),
  2602. Hb = /checked\s*(?:[^=]|=\s*.checked.)/i,
  2603. Fc = /\/(java|ecma)script/i,
  2604. Vb = /^\s*<!(?:\[CDATA\[|\-\-)/,
  2605. X = {
  2606. option: [1, "<select multiple='multiple'>", "</select>"],
  2607. legend: [1, "<fieldset>", "</fieldset>"],
  2608. thead: [1, "<table>", "</table>"],
  2609. tr: [2, "<table><tbody>", "</tbody></table>"],
  2610. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2611. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  2612. area: [1, "<map>", "</map>"],
  2613. _default: [0, "", ""]
  2614. },
  2615. Gc = w(o);
  2616. X.optgroup = X.option;
  2617. X.tbody = X.tfoot = X.colgroup = X.caption = X.thead;
  2618. X.th = X.td;
  2619. c.support.htmlSerialize || (X._default = [1, "div<div>", "</div>"]);
  2620. c.fn.extend({
  2621. text: function(a) {
  2622. return c.isFunction(a) ? this.each(function(b) {
  2623. var d = c(this);
  2624. d.text(a.call(this, b, d.text()))
  2625. }) : typeof a != "object" && a !== m ? this.empty().append((this[0] && this[0].ownerDocument || o).createTextNode(a)) : c.text(this)
  2626. },
  2627. wrapAll: function(a) {
  2628. if (c.isFunction(a)) return this.each(function(b) {
  2629. c(this).wrapAll(a.call(this, b))
  2630. });
  2631. if (this[0]) {
  2632. var b = c(a, this[0].ownerDocument).eq(0).clone(true);
  2633. this[0].parentNode && b.insertBefore(this[0]);
  2634. b.map(function() {
  2635. for (var a = this; a.firstChild && a.firstChild.nodeType === 1;) a = a.firstChild;
  2636. return a
  2637. }).append(this)
  2638. }
  2639. return this
  2640. },
  2641. wrapInner: function(a) {
  2642. return c.isFunction(a) ? this.each(function(b) {
  2643. c(this).wrapInner(a.call(this, b))
  2644. }) : this.each(function() {
  2645. var b = c(this),
  2646. d = b.contents();
  2647. d.length ? d.wrapAll(a) : b.append(a)
  2648. })
  2649. },
  2650. wrap: function(a) {
  2651. return this.each(function() {
  2652. c(this).wrapAll(a)
  2653. })
  2654. },
  2655. unwrap: function() {
  2656. return this.parent().each(function() {
  2657. c.nodeName(this, "body") || c(this).replaceWith(this.childNodes)
  2658. }).end()
  2659. },
  2660. append: function() {
  2661. return this.domManip(arguments, true,
  2662. function(a) {
  2663. this.nodeType === 1 && this.appendChild(a)
  2664. })
  2665. },
  2666. prepend: function() {
  2667. return this.domManip(arguments, true,
  2668. function(a) {
  2669. this.nodeType === 1 && this.insertBefore(a, this.firstChild)
  2670. })
  2671. },
  2672. before: function() {
  2673. if (this[0] && this[0].parentNode) return this.domManip(arguments, false,
  2674. function(a) {
  2675. this.parentNode.insertBefore(a, this)
  2676. });
  2677. if (arguments.length) {
  2678. var a = c(arguments[0]);
  2679. a.push.apply(a, this.toArray());
  2680. return this.pushStack(a, "before", arguments)
  2681. }
  2682. },
  2683. after: function() {
  2684. if (this[0] && this[0].parentNode) return this.domManip(arguments, false,
  2685. function(a) {
  2686. this.parentNode.insertBefore(a, this.nextSibling)
  2687. });
  2688. if (arguments.length) {
  2689. var a = this.pushStack(this, "after", arguments);
  2690. a.push.apply(a, c(arguments[0]).toArray());
  2691. return a
  2692. }
  2693. },
  2694. remove: function(a, b) {
  2695. for (var d = 0,
  2696. h; (h = this[d]) != null; d++) if (!a || c.filter(a, [h]).length) { ! b && h.nodeType === 1 && (c.cleanData(h.getElementsByTagName("*")), c.cleanData([h]));
  2697. h.parentNode && h.parentNode.removeChild(h)
  2698. }
  2699. return this
  2700. },
  2701. empty: function() {
  2702. for (var a = 0,
  2703. b; (b = this[a]) != null; a++) for (b.nodeType === 1 && c.cleanData(b.getElementsByTagName("*")); b.firstChild;) b.removeChild(b.firstChild);
  2704. return this
  2705. },
  2706. clone: function(a, b) {
  2707. a = a == null ? false: a;
  2708. b = b == null ? a: b;
  2709. return this.map(function() {
  2710. return c.clone(this, a, b)
  2711. })
  2712. },
  2713. html: function(a) {
  2714. if (a === m) return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(zc, "") : null;
  2715. if (typeof a == "string" && !Cc.test(a) && (c.support.leadingWhitespace || !ib.test(a)) && !X[(Gb.exec(a) || ["", ""])[1].toLowerCase()]) {
  2716. a = a.replace(Fb, "<$1></$2>");
  2717. try {
  2718. for (var b = 0,
  2719. d = this.length; b < d; b++) this[b].nodeType === 1 && (c.cleanData(this[b].getElementsByTagName("*")), this[b].innerHTML = a)
  2720. } catch(h) {
  2721. this.empty().append(a)
  2722. }
  2723. } else c.isFunction(a) ? this.each(function(b) {
  2724. var d = c(this);
  2725. d.html(a.call(this, b, d.html()))
  2726. }) : this.empty().append(a);
  2727. return this
  2728. },
  2729. replaceWith: function(a) {
  2730. if (this[0] && this[0].parentNode) {
  2731. if (c.isFunction(a)) return this.each(function(b) {
  2732. var d = c(this),
  2733. h = d.html();
  2734. d.replaceWith(a.call(this, b, h))
  2735. });
  2736. typeof a != "string" && (a = c(a).detach());
  2737. return this.each(function() {
  2738. var b = this.nextSibling,
  2739. d = this.parentNode;
  2740. c(this).remove();
  2741. b ? c(b).before(a) : c(d).append(a)
  2742. })
  2743. }
  2744. return this.length ? this.pushStack(c(c.isFunction(a) ? a() : a), "replaceWith", a) : this
  2745. },
  2746. detach: function(a) {
  2747. return this.remove(a, true)
  2748. },
  2749. domManip: function(a, b, d) {
  2750. var h, g, l, f = a[0],
  2751. i = [];
  2752. if (!c.support.checkClone && arguments.length === 3 && typeof f == "string" && Hb.test(f)) return this.each(function() {
  2753. c(this).domManip(a, b, d, true)
  2754. });
  2755. if (c.isFunction(f)) return this.each(function(h) {
  2756. var g = c(this);
  2757. a[0] = f.call(this, h, b ? g.html() : m);
  2758. g.domManip(a, b, d)
  2759. });
  2760. if (this[0]) {
  2761. l = f && f.parentNode;
  2762. c.support.parentNode && l && l.nodeType === 11 && l.childNodes.length === this.length ? h = {
  2763. fragment: l
  2764. }: h = c.buildFragment(a, this, i);
  2765. l = h.fragment;
  2766. l.childNodes.length === 1 ? g = l = l.firstChild: g = l.firstChild;
  2767. if (g) {
  2768. b = b && c.nodeName(g, "tr");
  2769. g = 0;
  2770. for (var t = this.length,
  2771. j = t - 1; g < t; g++) d.call(b ? c.nodeName(this[g], "table") ? this[g].getElementsByTagName("tbody")[0] || this[g].appendChild(this[g].ownerDocument.createElement("tbody")) : this[g] : this[g], h.cacheable || t > 1 && g < j ? c.clone(l, true, true) : l)
  2772. }
  2773. i.length && c.each(i, Y)
  2774. }
  2775. return this
  2776. }
  2777. });
  2778. c.buildFragment = function(a, b, d) {
  2779. var h, g, l, f, i = a[0];
  2780. b && b[0] && (f = b[0].ownerDocument || b[0]);
  2781. f.createDocumentFragment || (f = o);
  2782. a.length === 1 && typeof i == "string" && i.length < 512 && f === o && i.charAt(0) === "<" && !Dc.test(i) && (c.support.checkClone || !Hb.test(i)) && !c.support.unknownElems && Ec.test(i) && (g = true, l = c.fragments[i], l && l !== 1 && (h = l));
  2783. h || (h = f.createDocumentFragment(), c.clean(a, f, h, d));
  2784. g && (c.fragments[i] = l ? h: 1);
  2785. return {
  2786. fragment: h,
  2787. cacheable: g
  2788. }
  2789. };
  2790. c.fragments = {};
  2791. c.each({
  2792. appendTo: "append",
  2793. prependTo: "prepend",
  2794. insertBefore: "before",
  2795. insertAfter: "after",
  2796. replaceAll: "replaceWith"
  2797. },
  2798. function(a, b) {
  2799. c.fn[a] = function(d) {
  2800. var h = [],
  2801. d = c(d),
  2802. g = this.length === 1 && this[0].parentNode;
  2803. if (g && g.nodeType === 11 && g.childNodes.length === 1 && d.length === 1) {
  2804. d[b](this[0]);
  2805. return this
  2806. }
  2807. for (var g = 0,
  2808. l = d.length; g < l; g++) {
  2809. var f = (g > 0 ? this.clone(true) : this).get();
  2810. c(d[g])[b](f);
  2811. h = h.concat(f)
  2812. }
  2813. return this.pushStack(h, a, d.selector)
  2814. }
  2815. });
  2816. c.extend({
  2817. clone: function(a, b, d) {
  2818. var h = a.cloneNode(true),
  2819. g,
  2820. l,
  2821. f;
  2822. if ((!c.support.noCloneEvent || !c.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !c.isXMLDoc(a)) {
  2823. V(a, h);
  2824. g = C(a);
  2825. l = C(h);
  2826. for (f = 0; g[f]; ++f) l[f] && V(g[f], l[f])
  2827. }
  2828. if (b) {
  2829. D(a, h);
  2830. if (d) {
  2831. g = C(a);
  2832. l = C(h);
  2833. for (f = 0; g[f]; ++f) D(g[f], l[f])
  2834. }
  2835. }
  2836. return h
  2837. },
  2838. clean: function(a, b, d, h) {
  2839. b = b || o;
  2840. typeof b.createElement == "undefined" && (b = b.ownerDocument || b[0] && b[0].ownerDocument || o);
  2841. for (var g = [], l, f = 0, i; (i = a[f]) != null; f++) {
  2842. typeof i == "number" && (i = i + "");
  2843. if (i) {
  2844. if (typeof i == "string") if (Bc.test(i)) {
  2845. i = i.replace(Fb, "<$1></$2>");
  2846. l = (Gb.exec(i) || ["", ""])[1].toLowerCase();
  2847. var t = X[l] || X._default,
  2848. j = t[0],
  2849. k = b.createElement("div");
  2850. b === o ? Gc.appendChild(k) : w(b).appendChild(k);
  2851. for (k.innerHTML = t[1] + i + t[2]; j--;) k = k.lastChild;
  2852. if (!c.support.tbody) {
  2853. j = Ac.test(i);
  2854. t = l === "table" && !j ? k.firstChild && k.firstChild.childNodes: t[1] === "<table>" && !j ? k.childNodes: [];
  2855. for (l = t.length - 1; l >= 0; --l) c.nodeName(t[l], "tbody") && !t[l].childNodes.length && t[l].parentNode.removeChild(t[l])
  2856. } ! c.support.leadingWhitespace && ib.test(i) && k.insertBefore(b.createTextNode(ib.exec(i)[0]), k.firstChild);
  2857. i = k.childNodes
  2858. } else i = b.createTextNode(i);
  2859. var z;
  2860. if (!c.support.appendChecked) if (i[0] && typeof(z = i.length) == "number") for (l = 0; l < z; l++) ea(i[l]);
  2861. else ea(i);
  2862. i.nodeType ? g.push(i) : g = c.merge(g, i)
  2863. }
  2864. }
  2865. if (d) {
  2866. a = function(a) {
  2867. return ! a.type || Fc.test(a.type)
  2868. };
  2869. for (f = 0; g[f]; f++) if (h && c.nodeName(g[f], "script") && (!g[f].type || g[f].type.toLowerCase() === "text/javascript")) h.push(g[f].parentNode ? g[f].parentNode.removeChild(g[f]) : g[f]);
  2870. else {
  2871. if (g[f].nodeType === 1) {
  2872. b = c.grep(g[f].getElementsByTagName("script"), a);
  2873. g.splice.apply(g, [f + 1, 0].concat(b))
  2874. }
  2875. d.appendChild(g[f])
  2876. }
  2877. }
  2878. return g
  2879. },
  2880. cleanData: function(a) {
  2881. for (var b, d, h = c.cache,
  2882. g = c.event.special,
  2883. l = c.support.deleteExpando,
  2884. f = 0,
  2885. i; (i = a[f]) != null; f++) if (!i.nodeName || !c.noData[i.nodeName.toLowerCase()]) if (d = i[c.expando]) {
  2886. if ((b = h[d]) && b.events) {
  2887. for (var t in b.events) g[t] ? c.event.remove(i, t) : c.removeEvent(i, t, b.handle);
  2888. b.handle && (b.handle.elem = null)
  2889. }
  2890. l ? delete i[c.expando] : i.removeAttribute && i.removeAttribute(c.expando);
  2891. delete h[d]
  2892. }
  2893. }
  2894. });
  2895. var jb = /alpha\([^)]*\)/i,
  2896. Hc = /opacity=([^)]*)/,
  2897. Ic = /([A-Z]|^ms)/g,
  2898. Ib = /^-?\d+(?:px)?$/i,
  2899. Jc = /^-?\d/,
  2900. Kc = /^([\-+])=([\-+.\de]+)/,
  2901. Lc = {
  2902. position: "absolute",
  2903. visibility: "hidden",
  2904. display: "block"
  2905. },
  2906. Tb = ["Left", "Right"],
  2907. Ub = ["Top", "Bottom"],
  2908. oa,
  2909. Jb,
  2910. Kb;
  2911. c.fn.css = function(a, b) {
  2912. return arguments.length === 2 && b === m ? this: c.access(this, a, b, true,
  2913. function(a, b, d) {
  2914. return d !== m ? c.style(a, b, d) : c.css(a, b)
  2915. })
  2916. };
  2917. c.extend({
  2918. cssHooks: {
  2919. opacity: {
  2920. get: function(a, b) {
  2921. if (b) {
  2922. var d = oa(a, "opacity", "opacity");
  2923. return d === "" ? "1": d
  2924. }
  2925. return a.style.opacity
  2926. }
  2927. }
  2928. },
  2929. cssNumber: {
  2930. fillOpacity: !0,
  2931. fontWeight: !0,
  2932. lineHeight: !0,
  2933. opacity: !0,
  2934. orphans: !0,
  2935. widows: !0,
  2936. zIndex: !0,
  2937. zoom: !0
  2938. },
  2939. cssProps: {
  2940. "float": c.support.cssFloat ? "cssFloat": "styleFloat"
  2941. },
  2942. style: function(a, b, d, h) {
  2943. if (a && a.nodeType !== 3 && a.nodeType !== 8 && a.style) {
  2944. var g, l = c.camelCase(b),
  2945. f = a.style,
  2946. i = c.cssHooks[l],
  2947. b = c.cssProps[l] || l;
  2948. if (d === m) return i && "get" in i && (g = i.get(a, false, h)) !== m ? g: f[b];
  2949. h = typeof d;
  2950. h === "string" && (g = Kc.exec(d)) && (d = +(g[1] + 1) * +g[2] + parseFloat(c.css(a, b)), h = "number");
  2951. if (! (d == null || h === "number" && isNaN(d))) {
  2952. h === "number" && !c.cssNumber[l] && (d = d + "px");
  2953. if (!i || !("set" in i) || (d = i.set(a, d)) !== m) try {
  2954. f[b] = d
  2955. } catch(t) {}
  2956. }
  2957. }
  2958. },
  2959. css: function(a, b, d) {
  2960. var h, g, b = c.camelCase(b);
  2961. g = c.cssHooks[b];
  2962. b = c.cssProps[b] || b;
  2963. b === "cssFloat" && (b = "float");
  2964. if (g && "get" in g && (h = g.get(a, true, d)) !== m) return h;
  2965. if (oa) return oa(a, b)
  2966. },
  2967. swap: function(a, b, d) {
  2968. var c = {},
  2969. h;
  2970. for (h in b) {
  2971. c[h] = a.style[h];
  2972. a.style[h] = b[h]
  2973. }
  2974. d.call(a);
  2975. for (h in b) a.style[h] = c[h]
  2976. }
  2977. });
  2978. c.curCSS = c.css;
  2979. c.each(["height", "width"],
  2980. function(a, b) {
  2981. c.cssHooks[b] = {
  2982. get: function(a, d, e) {
  2983. var h;
  2984. if (d) {
  2985. if (a.offsetWidth !== 0) return Q(a, b, e);
  2986. c.swap(a, Lc,
  2987. function() {
  2988. h = Q(a, b, e)
  2989. });
  2990. return h
  2991. }
  2992. },
  2993. set: function(a, b) {
  2994. if (!Ib.test(b)) return b;
  2995. b = parseFloat(b);
  2996. if (b >= 0) return b + "px"
  2997. }
  2998. }
  2999. });
  3000. c.support.opacity || (c.cssHooks.opacity = {
  3001. get: function(a, b) {
  3002. return Hc.test((b && a.currentStyle ? a.currentStyle.filter: a.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "": b ? "1": ""
  3003. },
  3004. set: function(a, b) {
  3005. var d = a.style,
  3006. h = a.currentStyle,
  3007. g = c.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")": "",
  3008. l = h && h.filter || d.filter || "";
  3009. d.zoom = 1;
  3010. if (b >= 1 && c.trim(l.replace(jb, "")) === "") {
  3011. d.removeAttribute("filter");
  3012. if (h && !h.filter) return
  3013. }
  3014. d.filter = jb.test(l) ? l.replace(jb, g) : l + " " + g
  3015. }
  3016. });
  3017. c(function() {
  3018. c.support.reliableMarginRight || (c.cssHooks.marginRight = {
  3019. get: function(a, b) {
  3020. var d;
  3021. c.swap(a, {
  3022. display: "inline-block"
  3023. },
  3024. function() {
  3025. b ? d = oa(a, "margin-right", "marginRight") : d = a.style.marginRight
  3026. });
  3027. return d
  3028. }
  3029. })
  3030. });
  3031. o.defaultView && o.defaultView.getComputedStyle && (Jb = function(a, b) {
  3032. var d, h, b = b.replace(Ic, "-$1").toLowerCase();
  3033. if (! (h = a.ownerDocument.defaultView)) return m;
  3034. if (h = h.getComputedStyle(a, null)) {
  3035. d = h.getPropertyValue(b);
  3036. d === "" && !c.contains(a.ownerDocument.documentElement, a) && (d = c.style(a, b))
  3037. }
  3038. return d
  3039. });
  3040. o.documentElement.currentStyle && (Kb = function(a, b) {
  3041. var d, c, h, g = a.currentStyle && a.currentStyle[b],
  3042. l = a.style;
  3043. g === null && l && (h = l[b]) && (g = h); ! Ib.test(g) && Jc.test(g) && (d = l.left, c = a.runtimeStyle && a.runtimeStyle.left, c && (a.runtimeStyle.left = a.currentStyle.left), l.left = b === "fontSize" ? "1em": g || 0, g = l.pixelLeft + "px", l.left = d, c && (a.runtimeStyle.left = c));
  3044. return g === "" ? "auto": g
  3045. });
  3046. oa = Jb || Kb;
  3047. c.expr && c.expr.filters && (c.expr.filters.hidden = function(a) {
  3048. var b = a.offsetHeight;
  3049. return a.offsetWidth === 0 && b === 0 || !c.support.reliableHiddenOffsets && (a.style && a.style.display || c.css(a, "display")) === "none"
  3050. },
  3051. c.expr.filters.visible = function(a) {
  3052. return ! c.expr.filters.hidden(a)
  3053. });
  3054. var Mc = /%20/g,
  3055. Sb = /\[\]$/,
  3056. Lb = /\r?\n/g,
  3057. Nc = /#.*$/,
  3058. Oc = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
  3059. Pc = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
  3060. Qc = /^(?:GET|HEAD)$/,
  3061. Rc = /^\/\//,
  3062. Mb = /\?/,
  3063. Sc = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
  3064. Tc = /^(?:select|textarea)/i,
  3065. nb = /\s+/,
  3066. Uc = /([?&])_=[^&]*/,
  3067. Nb = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
  3068. Ob = c.fn.load,
  3069. Ya = {},
  3070. Pb = {},
  3071. la, ma, Qb = ["*/"] + ["*"];
  3072. try {
  3073. la = F.href
  3074. } catch(cd) {
  3075. la = o.createElement("a"),
  3076. la.href = "",
  3077. la = la.href
  3078. }
  3079. ma = Nb.exec(la.toLowerCase()) || [];
  3080. c.fn.extend({
  3081. load: function(a, b, d) {
  3082. if (typeof a != "string" && Ob) return Ob.apply(this, arguments);
  3083. if (!this.length) return this;
  3084. var h = a.indexOf(" ");
  3085. if (h >= 0) var g = a.slice(h, a.length),
  3086. a = a.slice(0, h);
  3087. h = "GET";
  3088. b && (c.isFunction(b) ? (d = b, b = m) : typeof b == "object" && (b = c.param(b, c.ajaxSettings.traditional), h = "POST"));
  3089. var l = this;
  3090. c.ajax({
  3091. url: a,
  3092. type: h,
  3093. dataType: "html",
  3094. data: b,
  3095. complete: function(a, b, e) {
  3096. e = a.responseText;
  3097. a.isResolved() && (a.done(function(a) {
  3098. e = a
  3099. }), l.html(g ? c("<div>").append(e.replace(Sc, "")).find(g) : e));
  3100. d && l.each(d, [e, b, a])
  3101. }
  3102. });
  3103. return this
  3104. },
  3105. serialize: function() {
  3106. return c.param(this.serializeArray())
  3107. },
  3108. serializeArray: function() {
  3109. return this.map(function() {
  3110. return this.elements ? c.makeArray(this.elements) : this
  3111. }).filter(function() {
  3112. return this.name && !this.disabled && (this.checked || Tc.test(this.nodeName) || Pc.test(this.type))
  3113. }).map(function(a, b) {
  3114. var d = c(this).val();
  3115. return d == null ? null: c.isArray(d) ? c.map(d,
  3116. function(a) {
  3117. return {
  3118. name: b.name,
  3119. value: a.replace(Lb, "\r\n")
  3120. }
  3121. }) : {
  3122. name: b.name,
  3123. value: d.replace(Lb, "\r\n")
  3124. }
  3125. }).get()
  3126. }
  3127. });
  3128. c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
  3129. function(a, b) {
  3130. c.fn[b] = function(a) {
  3131. return this.bind(b, a)
  3132. }
  3133. });
  3134. c.each(["get", "post"],
  3135. function(a, b) {
  3136. c[b] = function(a, d, e, h) {
  3137. c.isFunction(d) && (h = h || e, e = d, d = m);
  3138. return c.ajax({
  3139. type: b,
  3140. url: a,
  3141. data: d,
  3142. success: e,
  3143. dataType: h
  3144. })
  3145. }
  3146. });
  3147. c.extend({
  3148. getScript: function(a, b) {
  3149. return c.get(a, m, b, "script")
  3150. },
  3151. getJSON: function(a, b, d) {
  3152. return c.get(a, b, d, "json")
  3153. },
  3154. ajaxSetup: function(a, b) {
  3155. b ? L(a, c.ajaxSettings) : (b = a, a = c.ajaxSettings);
  3156. L(a, b);
  3157. return a
  3158. },
  3159. ajaxSettings: {
  3160. url: la,
  3161. isLocal: /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ma[1]),
  3162. global: !0,
  3163. type: "GET",
  3164. contentType: "application/x-www-form-urlencoded",
  3165. processData: !0,
  3166. async: !0,
  3167. accepts: {
  3168. xml: "application/xml, text/xml",
  3169. html: "text/html",
  3170. text: "text/plain",
  3171. json: "application/json, text/javascript",
  3172. "*": Qb
  3173. },
  3174. contents: {
  3175. xml: /xml/,
  3176. html: /html/,
  3177. json: /json/
  3178. },
  3179. responseFields: {
  3180. xml: "responseXML",
  3181. text: "responseText"
  3182. },
  3183. converters: {
  3184. "* text": j.String,
  3185. "text html": !0,
  3186. "text json": c.parseJSON,
  3187. "text xml": c.parseXML
  3188. },
  3189. flatOptions: {
  3190. context: !0,
  3191. url: !0
  3192. }
  3193. },
  3194. ajaxPrefilter: K(Ya),
  3195. ajaxTransport: K(Pb),
  3196. ajax: function(a, b) {
  3197. function d(a, b, e, n) {
  3198. if (r !== 2) {
  3199. r = 2;
  3200. ya && clearTimeout(ya);
  3201. o = m;
  3202. p = n || "";
  3203. I.readyState = a > 0 ? 4 : 0;
  3204. var k, z, v, n = b;
  3205. if (e) {
  3206. var xa = h,
  3207. q = I,
  3208. s = xa.contents,
  3209. u = xa.dataTypes,
  3210. K = xa.responseFields,
  3211. A, w, x, Q;
  3212. for (w in K) w in e && (q[K[w]] = e[w]);
  3213. for (; u[0] === "*";) {
  3214. u.shift();
  3215. A === m && (A = xa.mimeType || q.getResponseHeader("content-type"))
  3216. }
  3217. if (A) for (w in s) if (s[w] && s[w].test(A)) {
  3218. u.unshift(w);
  3219. break
  3220. }
  3221. if (u[0] in e) x = u[0];
  3222. else {
  3223. for (w in e) {
  3224. if (!u[0] || xa.converters[w + " " + u[0]]) {
  3225. x = w;
  3226. break
  3227. }
  3228. Q || (Q = w)
  3229. }
  3230. x = x || Q
  3231. }
  3232. if (x) {
  3233. x !== u[0] && u.unshift(x);
  3234. e = e[x]
  3235. } else e = void 0
  3236. } else e = m;
  3237. if (a >= 200 && a < 300 || a === 304) {
  3238. if (h.ifModified) {
  3239. if (A = I.getResponseHeader("Last-Modified")) c.lastModified[j] = A;
  3240. if (A = I.getResponseHeader("Etag")) c.etag[j] = A
  3241. }
  3242. if (a === 304) {
  3243. n = "notmodified";
  3244. k = true
  3245. } else try {
  3246. A = h;
  3247. A.dataFilter && (e = A.dataFilter(e, A.dataType));
  3248. var C = A.dataTypes;
  3249. w = {};
  3250. var G, fa, H = C.length,
  3251. B, E = C[0],
  3252. y,
  3253. pa,
  3254. D,
  3255. ga,
  3256. ha;
  3257. for (G = 1; G < H; G++) {
  3258. if (G === 1) for (fa in A.converters) typeof fa == "string" && (w[fa.toLowerCase()] = A.converters[fa]);
  3259. y = E;
  3260. E = C[G];
  3261. if (E === "*") E = y;
  3262. else if (y !== "*" && y !== E) {
  3263. pa = y + " " + E;
  3264. D = w[pa] || w["* " + E];
  3265. if (!D) {
  3266. ha = m;
  3267. for (ga in w) {
  3268. B = ga.split(" ");
  3269. if (B[0] === y || B[0] === "*") if (ha = w[B[1] + " " + E]) {
  3270. ga = w[ga];
  3271. ga === true ? D = ha: ha === true && (D = ga);
  3272. break
  3273. }
  3274. }
  3275. } ! D && !ha && c.error("No conversion from " + pa.replace(" ", " to "));
  3276. D !== true && (e = D ? D(e) : ha(ga(e)))
  3277. }
  3278. }
  3279. z = e;
  3280. n = "success";
  3281. k = true
  3282. } catch(Y) {
  3283. n = "parsererror";
  3284. v = Y
  3285. }
  3286. } else {
  3287. v = n;
  3288. if (!n || a) {
  3289. n = "error";
  3290. a < 0 && (a = 0)
  3291. }
  3292. }
  3293. I.status = a;
  3294. I.statusText = "" + (b || n);
  3295. k ? f.resolveWith(g, [z, n, I]) : f.rejectWith(g, [I, n, v]);
  3296. I.statusCode(t);
  3297. t = m;
  3298. ja && l.trigger("ajax" + (k ? "Success": "Error"), [I, h, k ? z: v]);
  3299. i.fireWith(g, [I, n]);
  3300. ja && (l.trigger("ajaxComplete", [I, h]), --c.active || c.event.trigger("ajaxStop"))
  3301. }
  3302. }
  3303. typeof a == "object" && (b = a, a = m);
  3304. var b = b || {},
  3305. h = c.ajaxSetup({},
  3306. b),
  3307. g = h.context || h,
  3308. l = g !== h && (g.nodeType || g instanceof c) ? c(g) : c.event,
  3309. f = c.Deferred(),
  3310. i = c.Callbacks("once memory"),
  3311. t = h.statusCode || {},
  3312. j,
  3313. k = {},
  3314. z = {},
  3315. p,
  3316. v,
  3317. o,
  3318. ya,
  3319. q,
  3320. r = 0,
  3321. ja,
  3322. s,
  3323. I = {
  3324. readyState: 0,
  3325. setRequestHeader: function(a, b) {
  3326. if (!r) {
  3327. var d = a.toLowerCase(),
  3328. a = z[d] = z[d] || a;
  3329. k[a] = b
  3330. }
  3331. return this
  3332. },
  3333. getAllResponseHeaders: function() {
  3334. return r === 2 ? p: null
  3335. },
  3336. getResponseHeader: function(a) {
  3337. var b;
  3338. if (r === 2) {
  3339. if (!v) for (v = {}; b = Oc.exec(p);) v[b[1].toLowerCase()] = b[2];
  3340. b = v[a.toLowerCase()]
  3341. }
  3342. return b === m ? null: b
  3343. },
  3344. overrideMimeType: function(a) {
  3345. r || (h.mimeType = a);
  3346. return this
  3347. },
  3348. abort: function(a) {
  3349. a = a || "abort";
  3350. o && o.abort(a);
  3351. d(0, a);
  3352. return this
  3353. }
  3354. };
  3355. f.promise(I);
  3356. I.success = I.done;
  3357. I.error = I.fail;
  3358. I.complete = i.add;
  3359. I.statusCode = function(a) {
  3360. if (a) {
  3361. var b;
  3362. if (r < 2) for (b in a) t[b] = [t[b], a[b]];
  3363. else {
  3364. b = a[I.status];
  3365. I.then(b, b)
  3366. }
  3367. }
  3368. return this
  3369. };
  3370. h.url = ((a || h.url) + "").replace(Nc, "").replace(Rc, ma[1] + "//");
  3371. h.dataTypes = c.trim(h.dataType || "*").toLowerCase().split(nb);
  3372. h.crossDomain == null && (q = Nb.exec(h.url.toLowerCase()), h.crossDomain = !(!q || q[1] == ma[1] && q[2] == ma[2] && (q[3] || (q[1] === "http:" ? 80 : 443)) == (ma[3] || (ma[1] === "http:" ? 80 : 443))));
  3373. h.data && h.processData && typeof h.data != "string" && (h.data = c.param(h.data, h.traditional));
  3374. J(Ya, h, b, I);
  3375. if (r === 2) return false;
  3376. ja = h.global;
  3377. h.type = h.type.toUpperCase();
  3378. h.hasContent = !Qc.test(h.type);
  3379. ja && c.active++===0 && c.event.trigger("ajaxStart");
  3380. if (!h.hasContent) {
  3381. h.data && (h.url = h.url + ((Mb.test(h.url) ? "&": "?") + h.data), delete h.data);
  3382. j = h.url;
  3383. if (h.cache === false) {
  3384. q = c.now();
  3385. var u = h.url.replace(Uc, "$1_=" + q);
  3386. h.url = u + (u === h.url ? (Mb.test(h.url) ? "&": "?") + "_=" + q: "")
  3387. }
  3388. } (h.data && h.hasContent && h.contentType !== false || b.contentType) && I.setRequestHeader("Content-Type", h.contentType);
  3389. h.ifModified && (j = j || h.url, c.lastModified[j] && I.setRequestHeader("If-Modified-Since", c.lastModified[j]), c.etag[j] && I.setRequestHeader("If-None-Match", c.etag[j]));
  3390. I.setRequestHeader("Accept", h.dataTypes[0] && h.accepts[h.dataTypes[0]] ? h.accepts[h.dataTypes[0]] + (h.dataTypes[0] !== "*" ? ", " + Qb + "; q=0.01": "") : h.accepts["*"]);
  3391. for (s in h.headers) I.setRequestHeader(s, h.headers[s]);
  3392. if (h.beforeSend && (h.beforeSend.call(g, I, h) === false || r === 2)) {
  3393. I.abort();
  3394. return false
  3395. }
  3396. for (s in {
  3397. success: 1,
  3398. error: 1,
  3399. complete: 1
  3400. }) I[s](h[s]);
  3401. if (o = J(Pb, h, b, I)) {
  3402. I.readyState = 1;
  3403. ja && l.trigger("ajaxSend", [I, h]);
  3404. h.async && h.timeout > 0 && (ya = setTimeout(function() {
  3405. I.abort("timeout")
  3406. },
  3407. h.timeout));
  3408. try {
  3409. r = 1;
  3410. o.send(k, d)
  3411. } catch(K) {
  3412. r < 2 ? d( - 1, K) : c.error(K)
  3413. }
  3414. } else d( - 1, "No Transport");
  3415. return I
  3416. },
  3417. param: function(a, b) {
  3418. var d = [],
  3419. h = function(a, b) {
  3420. b = c.isFunction(b) ? b() : b;
  3421. d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
  3422. };
  3423. b === m && (b = c.ajaxSettings.traditional);
  3424. if (c.isArray(a) || a.jquery && !c.isPlainObject(a)) c.each(a,
  3425. function() {
  3426. h(this.name, this.value)
  3427. });
  3428. else for (var g in a) N(g, a[g], b, h);
  3429. return d.join("&").replace(Mc, "+")
  3430. }
  3431. });
  3432. c.extend({
  3433. active: 0,
  3434. lastModified: {},
  3435. etag: {}
  3436. });
  3437. var Vc = c.now(),
  3438. Va = /(\=)\?(&|$)|\?\?/i;
  3439. c.ajaxSetup({
  3440. jsonp: "callback",
  3441. jsonpCallback: function() {
  3442. return c.expando + "_" + Vc++
  3443. }
  3444. });
  3445. c.ajaxPrefilter("json jsonp",
  3446. function(a, b, d) {
  3447. b = a.contentType === "application/x-www-form-urlencoded" && typeof a.data == "string";
  3448. if (a.dataTypes[0] === "jsonp" || a.jsonp !== false && (Va.test(a.url) || b && Va.test(a.data))) {
  3449. var h, g = a.jsonpCallback = c.isFunction(a.jsonpCallback) ? a.jsonpCallback() : a.jsonpCallback,
  3450. l = j[g],
  3451. f = a.url,
  3452. i = a.data,
  3453. t = "$1" + g + "$2";
  3454. a.jsonp !== false && (f = f.replace(Va, t), a.url === f && (b && (i = i.replace(Va, t)), a.data === i && (f = f + ((/\?/.test(f) ? "&": "?") + a.jsonp + "=" + g))));
  3455. a.url = f;
  3456. a.data = i;
  3457. j[g] = function(a) {
  3458. h = [a]
  3459. };
  3460. d.always(function() {
  3461. j[g] = l;
  3462. h && c.isFunction(l) && j[g](h[0])
  3463. });
  3464. a.converters["script json"] = function() {
  3465. h || c.error(g + " was not called");
  3466. return h[0]
  3467. };
  3468. a.dataTypes[0] = "json";
  3469. return "script"
  3470. }
  3471. });
  3472. c.ajaxSetup({
  3473. accepts: {
  3474. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  3475. },
  3476. contents: {
  3477. script: /javascript|ecmascript/
  3478. },
  3479. converters: {
  3480. "text script": function(a) {
  3481. c.globalEval(a);
  3482. return a
  3483. }
  3484. }
  3485. });
  3486. c.ajaxPrefilter("script",
  3487. function(a) {
  3488. a.cache === m && (a.cache = false);
  3489. a.crossDomain && (a.type = "GET", a.global = false)
  3490. });
  3491. c.ajaxTransport("script",
  3492. function(a) {
  3493. if (a.crossDomain) {
  3494. var b, d = o.head || o.getElementsByTagName("head")[0] || o.documentElement;
  3495. return {
  3496. send: function(h, c) {
  3497. b = o.createElement("script");
  3498. b.async = "async";
  3499. a.scriptCharset && (b.charset = a.scriptCharset);
  3500. b.src = a.url;
  3501. b.onload = b.onreadystatechange = function(a, h) {
  3502. if (h || !b.readyState || /loaded|complete/.test(b.readyState)) {
  3503. b.onload = b.onreadystatechange = null;
  3504. d && b.parentNode && d.removeChild(b);
  3505. b = m;
  3506. h || c(200, "success")
  3507. }
  3508. };
  3509. d.insertBefore(b, d.firstChild)
  3510. },
  3511. abort: function() {
  3512. b && b.onload(0, 1)
  3513. }
  3514. }
  3515. }
  3516. });
  3517. var kb = j.ActiveXObject ?
  3518. function() {
  3519. for (var a in wa) wa[a](0, 1)
  3520. }: !1,
  3521. Wc = 0,
  3522. wa;
  3523. c.ajaxSettings.xhr = j.ActiveXObject ?
  3524. function() {
  3525. var a;
  3526. if (! (a = !this.isLocal && q())) a: {
  3527. try {
  3528. a = new j.ActiveXObject("Microsoft.XMLHTTP");
  3529. break a
  3530. } catch(b) {}
  3531. a = void 0
  3532. }
  3533. return a
  3534. }: q;
  3535. var lb = c.ajaxSettings.xhr();
  3536. c.extend(c.support, {
  3537. ajax: !!lb,
  3538. cors: !!lb && "withCredentials" in lb
  3539. });
  3540. c.support.ajax && c.ajaxTransport(function(a) {
  3541. if (!a.crossDomain || c.support.cors) {
  3542. var b;
  3543. return {
  3544. send: function(d, h) {
  3545. var g = a.xhr(),
  3546. l,
  3547. f;
  3548. a.username ? g.open(a.type, a.url, a.async, a.username, a.password) : g.open(a.type, a.url, a.async);
  3549. if (a.xhrFields) for (f in a.xhrFields) g[f] = a.xhrFields[f];
  3550. a.mimeType && g.overrideMimeType && g.overrideMimeType(a.mimeType); ! a.crossDomain && !d["X-Requested-With"] && (d["X-Requested-With"] = "XMLHttpRequest");
  3551. try {
  3552. for (f in d) g.setRequestHeader(f, d[f])
  3553. } catch(i) {}
  3554. g.send(a.hasContent && a.data || null);
  3555. b = function(d, f) {
  3556. var i, t, j, k, z;
  3557. try {
  3558. if (b && (f || g.readyState === 4)) {
  3559. b = m;
  3560. l && (g.onreadystatechange = c.noop, kb && delete wa[l]);
  3561. if (f) g.readyState !== 4 && g.abort();
  3562. else {
  3563. i = g.status;
  3564. j = g.getAllResponseHeaders();
  3565. k = {}; (z = g.responseXML) && z.documentElement && (k.xml = z);
  3566. k.text = g.responseText;
  3567. try {
  3568. t = g.statusText
  3569. } catch(p) {
  3570. t = ""
  3571. } ! i && a.isLocal && !a.crossDomain ? i = k.text ? 200 : 404 : i === 1223 && (i = 204)
  3572. }
  3573. }
  3574. } catch(v) {
  3575. f || h( - 1, v)
  3576. }
  3577. k && h(i, t, k, j)
  3578. }; ! a.async || g.readyState === 4 ? b() : (l = ++Wc, kb && (wa || (wa = {},
  3579. c(j).unload(kb)), wa[l] = b), g.onreadystatechange = b)
  3580. },
  3581. abort: function() {
  3582. b && b(0, 1)
  3583. }
  3584. }
  3585. }
  3586. });
  3587. var Xa = {},
  3588. da, na, Xc = /^(?:toggle|show|hide)$/,
  3589. Yc = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
  3590. Wa, mb = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]],
  3591. Da;
  3592. c.fn.extend({
  3593. show: function(a, b, d) {
  3594. var h;
  3595. if (a || a === 0) return this.animate(y("show", 3), a, b, d);
  3596. b = 0;
  3597. for (d = this.length; b < d; b++) {
  3598. a = this[b];
  3599. a.style && (h = a.style.display, !c._data(a, "olddisplay") && h === "none" && (h = a.style.display = ""), h === "" && c.css(a, "display") === "none" && c._data(a, "olddisplay", x(a.nodeName)))
  3600. }
  3601. for (b = 0; b < d; b++) {
  3602. a = this[b];
  3603. if (a.style) {
  3604. h = a.style.display;
  3605. if (h === "" || h === "none") a.style.display = c._data(a, "olddisplay") || ""
  3606. }
  3607. }
  3608. return this
  3609. },
  3610. hide: function(a, b, d) {
  3611. if (a || a === 0) return this.animate(y("hide", 3), a, b, d);
  3612. for (var h, b = 0,
  3613. d = this.length; b < d; b++) {
  3614. a = this[b];
  3615. a.style && (h = c.css(a, "display"), h !== "none" && !c._data(a, "olddisplay") && c._data(a, "olddisplay", h))
  3616. }
  3617. for (b = 0; b < d; b++) this[b].style && (this[b].style.display = "none");
  3618. return this
  3619. },
  3620. _toggle: c.fn.toggle,
  3621. toggle: function(a, b, d) {
  3622. var h = typeof a == "boolean";
  3623. c.isFunction(a) && c.isFunction(b) ? this._toggle.apply(this, arguments) : a == null || h ? this.each(function() {
  3624. var b = h ? a: c(this).is(":hidden");
  3625. c(this)[b ? "show": "hide"]()
  3626. }) : this.animate(y("toggle", 3), a, b, d);
  3627. return this
  3628. },
  3629. fadeTo: function(a, b, d, h) {
  3630. return this.filter(":hidden").css("opacity", 0).show().end().animate({
  3631. opacity: b
  3632. },
  3633. a, d, h)
  3634. },
  3635. animate: function(a, b, d, h) {
  3636. function g() {
  3637. l.queue === false && c._mark(this);
  3638. var b = c.extend({},
  3639. l),
  3640. d = this.nodeType === 1,
  3641. h = d && c(this).is(":hidden"),
  3642. f,
  3643. i,
  3644. t,
  3645. j,
  3646. k,
  3647. n,
  3648. z,
  3649. p;
  3650. b.animatedProperties = {};
  3651. for (t in a) {
  3652. f = c.camelCase(t);
  3653. t !== f && (a[f] = a[t], delete a[t]);
  3654. i = a[f];
  3655. c.isArray(i) ? (b.animatedProperties[f] = i[1], i = a[f] = i[0]) : b.animatedProperties[f] = b.specialEasing && b.specialEasing[f] || b.easing || "swing";
  3656. if (i === "hide" && h || i === "show" && !h) return b.complete.call(this);
  3657. d && (f === "height" || f === "width") && (b.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], c.css(this, "display") === "inline" && c.css(this, "float") === "none" && (!c.support.inlineBlockNeedsLayout || x(this.nodeName) === "inline" ? this.style.display = "inline-block": this.style.zoom = 1))
  3658. }
  3659. b.overflow != null && (this.style.overflow = "hidden");
  3660. for (t in a) {
  3661. d = new c.fx(this, b, t);
  3662. i = a[t];
  3663. Xc.test(i) ? (p = c._data(this, "toggle" + t) || (i === "toggle" ? h ? "show": "hide": 0), p ? (c._data(this, "toggle" + t, p === "show" ? "hide": "show"), d[p]()) : d[i]()) : (j = Yc.exec(i), k = d.cur(), j ? (n = parseFloat(j[2]), z = j[3] || (c.cssNumber[t] ? "": "px"), z !== "px" && (c.style(this, t, (n || 1) + z), k = (n || 1) / d.cur() * k, c.style(this, t, k + z)), j[1] && (n = (j[1] === "-=" ? -1 : 1) * n + k), d.custom(k, n, z)) : d.custom(k, i, ""))
  3664. }
  3665. return true
  3666. }
  3667. var l = c.speed(b, d, h);
  3668. if (c.isEmptyObject(a)) return this.each(l.complete, [false]);
  3669. a = c.extend({},
  3670. a);
  3671. return l.queue === false ? this.each(g) : this.queue(l.queue, g)
  3672. },
  3673. stop: function(a, b, d) {
  3674. typeof a != "string" && (d = b, b = a, a = m);
  3675. b && a !== false && this.queue(a || "fx", []);
  3676. return this.each(function() {
  3677. var b, h = false,
  3678. g = c.timers,
  3679. l = c._data(this);
  3680. d || c._unmark(true, this);
  3681. if (a == null) for (b in l) {
  3682. if (l[b].stop && b.indexOf(".run") === b.length - 4) {
  3683. var f = l[b];
  3684. c.removeData(this, b, true);
  3685. f.stop(d)
  3686. }
  3687. } else if (l[b = a + ".run"] && l[b].stop) {
  3688. l = l[b];
  3689. c.removeData(this, b, true);
  3690. l.stop(d)
  3691. }
  3692. for (b = g.length; b--;) g[b].elem === this && (a == null || g[b].queue === a) && (d ? g[b](true) : g[b].saveState(), h = true, g.splice(b, 1)); (!d || !h) && c.dequeue(this, a)
  3693. })
  3694. }
  3695. });
  3696. c.each({
  3697. slideDown: y("show", 1),
  3698. slideUp: y("hide", 1),
  3699. slideToggle: y("toggle", 1),
  3700. fadeIn: {
  3701. opacity: "show"
  3702. },
  3703. fadeOut: {
  3704. opacity: "hide"
  3705. },
  3706. fadeToggle: {
  3707. opacity: "toggle"
  3708. }
  3709. },
  3710. function(a, b) {
  3711. c.fn[a] = function(a, d, h) {
  3712. return this.animate(b, a, d, h)
  3713. }
  3714. });
  3715. c.extend({
  3716. speed: function(a, b, d) {
  3717. var h = a && typeof a == "object" ? c.extend({},
  3718. a) : {
  3719. complete: d || !d && b || c.isFunction(a) && a,
  3720. duration: a,
  3721. easing: d && b || b && !c.isFunction(b) && b
  3722. };
  3723. h.duration = c.fx.off ? 0 : typeof h.duration == "number" ? h.duration: h.duration in c.fx.speeds ? c.fx.speeds[h.duration] : c.fx.speeds._default;
  3724. if (h.queue == null || h.queue === true) h.queue = "fx";
  3725. h.old = h.complete;
  3726. h.complete = function(a) {
  3727. c.isFunction(h.old) && h.old.call(this);
  3728. h.queue ? c.dequeue(this, h.queue) : a !== false && c._unmark(this)
  3729. };
  3730. return h
  3731. },
  3732. easing: {
  3733. linear: function(a, b, d, h) {
  3734. return d + h * a
  3735. },
  3736. swing: function(a, b, d, h) {
  3737. return ( - Math.cos(a * Math.PI) / 2 + 0.5) * h + d
  3738. }
  3739. },
  3740. timers: [],
  3741. fx: function(a, b, d) {
  3742. this.options = b;
  3743. this.elem = a;
  3744. this.prop = d;
  3745. b.orig = b.orig || {}
  3746. }
  3747. });
  3748. c.fx.prototype = {
  3749. update: function() {
  3750. this.options.step && this.options.step.call(this.elem, this.now, this); (c.fx.step[this.prop] || c.fx.step._default)(this)
  3751. },
  3752. cur: function() {
  3753. if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) return this.elem[this.prop];
  3754. var a, b = c.css(this.elem, this.prop);
  3755. return isNaN(a = parseFloat(b)) ? !b || b === "auto" ? 0 : b: a
  3756. },
  3757. custom: function(a, b, d) {
  3758. function h(a) {
  3759. return g.step(a)
  3760. }
  3761. var g = this,
  3762. l = c.fx;
  3763. this.startTime = Da || r();
  3764. this.end = b;
  3765. this.now = this.start = a;
  3766. this.pos = this.state = 0;
  3767. this.unit = d || this.unit || (c.cssNumber[this.prop] ? "": "px");
  3768. h.queue = this.options.queue;
  3769. h.elem = this.elem;
  3770. h.saveState = function() {
  3771. g.options.hide && c._data(g.elem, "fxshow" + g.prop) === m && c._data(g.elem, "fxshow" + g.prop, g.start)
  3772. };
  3773. h() && c.timers.push(h) && !Wa && (Wa = setInterval(l.tick, l.interval))
  3774. },
  3775. show: function() {
  3776. var a = c._data(this.elem, "fxshow" + this.prop);
  3777. this.options.orig[this.prop] = a || c.style(this.elem, this.prop);
  3778. this.options.show = true;
  3779. a !== m ? this.custom(this.cur(), a) : this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
  3780. c(this.elem).show()
  3781. },
  3782. hide: function() {
  3783. this.options.orig[this.prop] = c._data(this.elem, "fxshow" + this.prop) || c.style(this.elem, this.prop);
  3784. this.options.hide = true;
  3785. this.custom(this.cur(), 0)
  3786. },
  3787. step: function(a) {
  3788. var b, d, h = Da || r(),
  3789. g = true,
  3790. l = this.elem,
  3791. f = this.options;
  3792. if (a || h >= f.duration + this.startTime) {
  3793. this.now = this.end;
  3794. this.pos = this.state = 1;
  3795. this.update();
  3796. f.animatedProperties[this.prop] = true;
  3797. for (b in f.animatedProperties) f.animatedProperties[b] !== true && (g = false);
  3798. if (g) {
  3799. f.overflow != null && !c.support.shrinkWrapBlocks && c.each(["", "X", "Y"],
  3800. function(a, b) {
  3801. l.style["overflow" + b] = f.overflow[a]
  3802. });
  3803. f.hide && c(l).hide();
  3804. if (f.hide || f.show) for (b in f.animatedProperties) {
  3805. c.style(l, b, f.orig[b]);
  3806. c.removeData(l, "fxshow" + b, true);
  3807. c.removeData(l, "toggle" + b, true)
  3808. } (a = f.complete) && (f.complete = false, a.call(l))
  3809. }
  3810. return false
  3811. }
  3812. f.duration == Infinity ? this.now = h: (d = h - this.startTime, this.state = d / f.duration, this.pos = c.easing[f.animatedProperties[this.prop]](this.state, d, 0, 1, f.duration), this.now = this.start + (this.end - this.start) * this.pos);
  3813. this.update();
  3814. return true
  3815. }
  3816. };
  3817. c.extend(c.fx, {
  3818. tick: function() {
  3819. for (var a, b = c.timers,
  3820. d = 0; d < b.length; d++) {
  3821. a = b[d]; ! a() && b[d] === a && b.splice(d--, 1)
  3822. }
  3823. b.length || c.fx.stop()
  3824. },
  3825. interval: 13,
  3826. stop: function() {
  3827. clearInterval(Wa);
  3828. Wa = null
  3829. },
  3830. speeds: {
  3831. slow: 600,
  3832. fast: 200,
  3833. _default: 400
  3834. },
  3835. step: {
  3836. opacity: function(a) {
  3837. c.style(a.elem, "opacity", a.now)
  3838. },
  3839. _default: function(a) {
  3840. a.elem.style && a.elem.style[a.prop] != null ? a.elem.style[a.prop] = a.now + a.unit: a.elem[a.prop] = a.now
  3841. }
  3842. }
  3843. });
  3844. c.each(["width", "height"],
  3845. function(a, b) {
  3846. c.fx.step[b] = function(a) {
  3847. c.style(a.elem, b, Math.max(0, a.now))
  3848. }
  3849. });
  3850. c.expr && c.expr.filters && (c.expr.filters.animated = function(a) {
  3851. return c.grep(c.timers,
  3852. function(b) {
  3853. return a === b.elem
  3854. }).length
  3855. });
  3856. var Zc = /^t(?:able|d|h)$/i,
  3857. Rb = /^(?:body|html)$/i;
  3858. "getBoundingClientRect" in o.documentElement ? c.fn.offset = function(a) {
  3859. var b = this[0],
  3860. d;
  3861. if (a) return this.each(function(b) {
  3862. c.offset.setOffset(this, a, b)
  3863. });
  3864. if (!b || !b.ownerDocument) return null;
  3865. if (b === b.ownerDocument.body) return c.offset.bodyOffset(b);
  3866. try {
  3867. d = b.getBoundingClientRect()
  3868. } catch(h) {}
  3869. var g = b.ownerDocument,
  3870. l = g.documentElement;
  3871. if (!d || !c.contains(l, b)) return d ? {
  3872. top: d.top,
  3873. left: d.left
  3874. }: {
  3875. top: 0,
  3876. left: 0
  3877. };
  3878. b = g.body;
  3879. g = s(g);
  3880. return {
  3881. top: d.top + (g.pageYOffset || c.support.boxModel && l.scrollTop || b.scrollTop) - (l.clientTop || b.clientTop || 0),
  3882. left: d.left + (g.pageXOffset || c.support.boxModel && l.scrollLeft || b.scrollLeft) - (l.clientLeft || b.clientLeft || 0)
  3883. }
  3884. }: c.fn.offset = function(a) {
  3885. var b = this[0];
  3886. if (a) return this.each(function(b) {
  3887. c.offset.setOffset(this, a, b)
  3888. });
  3889. if (!b || !b.ownerDocument) return null;
  3890. if (b === b.ownerDocument.body) return c.offset.bodyOffset(b);
  3891. var d, h = b.offsetParent,
  3892. g = b.ownerDocument,
  3893. l = g.documentElement,
  3894. f = g.body;
  3895. d = (g = g.defaultView) ? g.getComputedStyle(b, null) : b.currentStyle;
  3896. for (var i = b.offsetTop,
  3897. t = b.offsetLeft; (b = b.parentNode) && b !== f && b !== l;) {
  3898. if (c.support.fixedPosition && d.position === "fixed") break;
  3899. d = g ? g.getComputedStyle(b, null) : b.currentStyle;
  3900. i = i - b.scrollTop;
  3901. t = t - b.scrollLeft;
  3902. b === h && (i = i + b.offsetTop, t = t + b.offsetLeft, c.support.doesNotAddBorder && (!c.support.doesAddBorderForTableAndCells || !Zc.test(b.nodeName)) && (i = i + (parseFloat(d.borderTopWidth) || 0), t = t + (parseFloat(d.borderLeftWidth) || 0)), h = b.offsetParent);
  3903. c.support.subtractsBorderForOverflowNotVisible && d.overflow !== "visible" && (i = i + (parseFloat(d.borderTopWidth) || 0), t = t + (parseFloat(d.borderLeftWidth) || 0))
  3904. }
  3905. if (d.position === "relative" || d.position === "static") {
  3906. i = i + f.offsetTop;
  3907. t = t + f.offsetLeft
  3908. }
  3909. c.support.fixedPosition && d.position === "fixed" && (i = i + Math.max(l.scrollTop, f.scrollTop), t = t + Math.max(l.scrollLeft, f.scrollLeft));
  3910. return {
  3911. top: i,
  3912. left: t
  3913. }
  3914. };
  3915. c.offset = {
  3916. bodyOffset: function(a) {
  3917. var b = a.offsetTop,
  3918. d = a.offsetLeft;
  3919. c.support.doesNotIncludeMarginInBodyOffset && (b = b + (parseFloat(c.css(a, "marginTop")) || 0), d = d + (parseFloat(c.css(a, "marginLeft")) || 0));
  3920. return {
  3921. top: b,
  3922. left: d
  3923. }
  3924. },
  3925. setOffset: function(a, b, d) {
  3926. var h = c.css(a, "position");
  3927. h === "static" && (a.style.position = "relative");
  3928. var g = c(a),
  3929. l = g.offset(),
  3930. f = c.css(a, "top"),
  3931. i = c.css(a, "left"),
  3932. t = {},
  3933. j = {},
  3934. k,
  3935. z; (h === "absolute" || h === "fixed") && c.inArray("auto", [f, i]) > -1 ? (j = g.position(), k = j.top, z = j.left) : (k = parseFloat(f) || 0, z = parseFloat(i) || 0);
  3936. c.isFunction(b) && (b = b.call(a, d, l));
  3937. b.top != null && (t.top = b.top - l.top + k);
  3938. b.left != null && (t.left = b.left - l.left + z);
  3939. "using" in b ? b.using.call(a, t) : g.css(t)
  3940. }
  3941. };
  3942. c.fn.extend({
  3943. position: function() {
  3944. if (!this[0]) return null;
  3945. var a = this[0],
  3946. b = this.offsetParent(),
  3947. d = this.offset(),
  3948. h = Rb.test(b[0].nodeName) ? {
  3949. top: 0,
  3950. left: 0
  3951. }: b.offset();
  3952. d.top = d.top - (parseFloat(c.css(a, "marginTop")) || 0);
  3953. d.left = d.left - (parseFloat(c.css(a, "marginLeft")) || 0);
  3954. h.top = h.top + (parseFloat(c.css(b[0], "borderTopWidth")) || 0);
  3955. h.left = h.left + (parseFloat(c.css(b[0], "borderLeftWidth")) || 0);
  3956. return {
  3957. top: d.top - h.top,
  3958. left: d.left - h.left
  3959. }
  3960. },
  3961. offsetParent: function() {
  3962. return this.map(function() {
  3963. for (var a = this.offsetParent || o.body; a && !Rb.test(a.nodeName) && c.css(a, "position") === "static";) a = a.offsetParent;
  3964. return a
  3965. })
  3966. }
  3967. });
  3968. c.each(["Left", "Top"],
  3969. function(a, b) {
  3970. var d = "scroll" + b;
  3971. c.fn[d] = function(b) {
  3972. var h, g;
  3973. if (b === m) {
  3974. h = this[0];
  3975. if (!h) return null;
  3976. return (g = s(h)) ? "pageXOffset" in g ? g[a ? "pageYOffset": "pageXOffset"] : c.support.boxModel && g.document.documentElement[d] || g.document.body[d] : h[d]
  3977. }
  3978. return this.each(function() { (g = s(this)) ? g.scrollTo(a ? c(g).scrollLeft() : b, a ? b: c(g).scrollTop()) : this[d] = b
  3979. })
  3980. }
  3981. });
  3982. c.each(["Height", "Width"],
  3983. function(a, b) {
  3984. var d = b.toLowerCase();
  3985. c.fn["inner" + b] = function() {
  3986. var a = this[0];
  3987. return a ? a.style ? parseFloat(c.css(a, d, "padding")) : this[d]() : null
  3988. };
  3989. c.fn["outer" + b] = function(a) {
  3990. var b = this[0];
  3991. return b ? b.style ? parseFloat(c.css(b, d, a ? "margin": "border")) : this[d]() : null
  3992. };
  3993. c.fn[d] = function(a) {
  3994. var h = this[0];
  3995. if (!h) return a == null ? null: this;
  3996. if (c.isFunction(a)) return this.each(function(b) {
  3997. var h = c(this);
  3998. h[d](a.call(this, b, h[d]()))
  3999. });
  4000. if (c.isWindow(h)) {
  4001. var e = h.document.documentElement["client" + b],
  4002. g = h.document.body;
  4003. return h.document.compatMode === "CSS1Compat" && e || g && g["client" + b] || e
  4004. }
  4005. if (h.nodeType === 9) return Math.max(h.documentElement["client" + b], h.body["scroll" + b], h.documentElement["scroll" + b], h.body["offset" + b], h.documentElement["offset" + b]);
  4006. if (a === m) {
  4007. h = c.css(h, d);
  4008. e = parseFloat(h);
  4009. return c.isNumeric(e) ? e: h
  4010. }
  4011. return this.css(d, typeof a == "string" ? a: a + "px")
  4012. }
  4013. });
  4014. j.jQuery = j.$ = c
  4015. })(window); (function(j) {
  4016. function m(j) {
  4017. var m = this.data("tEvents");
  4018. m || (m = {
  4019. dispatch: {}
  4020. },
  4021. Object.defineProperty(this.data(), "tEvents", {
  4022. value: m,
  4023. enumerable: !1,
  4024. writable: !0,
  4025. configurable: !0
  4026. }));
  4027. m.events = m.events || 0;
  4028. m.dispatch[j] = !0;
  4029. 0 === m.events && (N ? (this.bind("touchstart", x), this.bind("touchmove", y)) : (this.bind("mousedown", x), this.bind("mousemove", y)));
  4030. m.events += 1
  4031. }
  4032. function s() {
  4033. var m = this.data("tEvents");
  4034. m && (m.events = Math.max(0, m.events - 1), 0 === m.events && (N ? (this.unbind("touchstart", x), this.unbind("touchmove", y), m.eventUpHandler && j("body").unbind("touchend", m.eventUpHandler)) : (this.unbind("mousedown", x), this.unbind("mousemove", y), m.eventUpHandler && j("body").unbind("mouseup", m.eventUpHandler))))
  4035. }
  4036. function x(m) {
  4037. var r = j(this),
  4038. s = r.data("tEvents"),
  4039. u = q(m),
  4040. x = r.offset(),
  4041. C = !1;
  4042. x && (C = (C = (C = (C = u.x > x.left) && u.y > x.top) && u.x < x.left + r.width()) && u.y < x.top + r.height());
  4043. if (C || this == document) s.currentEvent = u,
  4044. s.initialEvent = u,
  4045. -1 == L.indexOf(this) && L.push(this),
  4046. s.dispatch.press && (r = j.event.fix(m), r.type = "press", j(m.target).trigger(r))
  4047. }
  4048. function y(m) {
  4049. var r = j(this),
  4050. s = r.data("tEvents"),
  4051. u;
  4052. if (s.currentEvent) {
  4053. u = j(s.currentEvent.target || r);
  4054. var x = j.extend({},
  4055. s.currentEvent);
  4056. s.currentEvent = q(m);
  4057. s.prevEvent = x;
  4058. if (s.dispatch.pinching && N) {
  4059. var C = m.originalEvent.touches;
  4060. if (2 == C.length) {
  4061. var x = C[1].pageX / 2 + C[0].pageX / 2,
  4062. y = C[1].pageY / 2 + C[0].pageY / 2,
  4063. D = j.Event("pinching"),
  4064. w = C[1].pageX - C[0].pageX,
  4065. C = C[1].pageY - C[0].pageY,
  4066. w = Math.sqrt(w * w + C * C);
  4067. s.fingerDistance || (s.fingerDistance = w);
  4068. D.pageX = x;
  4069. D.pageY = y;
  4070. D.target = m.target;
  4071. D.factor = w / s.fingerDistance;
  4072. u.trigger(D)
  4073. }
  4074. }
  4075. }
  4076. s.dispatch.moving && (m = j.event.fix(m), m.type = "moving", r.trigger(m))
  4077. }
  4078. function u(m) {
  4079. for (var q = !0,
  4080. r = !0,
  4081. s = !0,
  4082. u = !0,
  4083. x = 0; x < L.length; x++) {
  4084. var y = L[x],
  4085. D = j(y),
  4086. w = D.data("tEvents");
  4087. if (w.currentEvent) {
  4088. var J = !1,
  4089. k = (D = j(w.currentEvent.target || D)) ? D.offset() : null;
  4090. if (w.prevEvent && w.dispatch.swipe) {
  4091. var B = (w.currentEvent.x - w.prevEvent.x) / (w.currentEvent.time - w.prevEvent.time);
  4092. if (q && ( - 1 > B || 1 < B)) {
  4093. var U = j.Event("swipe"),
  4094. q = !1;
  4095. D.trigger(U, [B])
  4096. }
  4097. }
  4098. w.dispatch.unpress && u && (B = j.event.fix(m), B.type = "unpress", u = !1, j(w.initialEvent.target).trigger(B));
  4099. k && (J = (J = (J = (J = w.currentEvent.x >= k.left) && w.currentEvent.y >= k.top) && w.currentEvent.x <= k.left + D.width()) && w.currentEvent.y <= k.top + D.height());
  4100. if (!w.prevEvent && (J || y == document)) if (w.dispatch.tap && s && (y = j.event.fix(m), y.type = "tap", s = !1, y.pageX = w.currentEvent.x, y.pageY = w.currentEvent.y, D.trigger(y)), w.dispatch.doubleTap && r) if (w.taps || (w.taps = [0, 0]), w.taps.splice(0, 1), w.taps.push((new Date).getTime()), 300 > w.taps[1] - w.taps[0]) y = j.event.fix(m),
  4101. y.type = "doubleTap",
  4102. r = !1,
  4103. y.pageX = w.currentEvent.x,
  4104. y.pageY = w.currentEvent.y,
  4105. D.trigger(y);
  4106. N ? j("body").unbind("touchend", w.eventUpHandler) : j("body").unbind("mouseup", w.eventUpHandler);
  4107. delete w.eventUpHandler;
  4108. delete w.currentEvent;
  4109. delete w.prevEvent;
  4110. delete w.initialEvent;
  4111. delete w.fingerDistance
  4112. }
  4113. L.slice(x, 1)
  4114. }
  4115. }
  4116. function r(q) {
  4117. j.event.special[q] = {
  4118. setup: function() {
  4119. m.call(j(this), q)
  4120. },
  4121. teardown: function() {
  4122. s.call(j(this))
  4123. }
  4124. }
  4125. }
  4126. function q(j) {
  4127. var m = N ? {
  4128. x: j.originalEvent.touches[0].pageX,
  4129. y: j.originalEvent.touches[0].pageY
  4130. }: {
  4131. x: j.pageX,
  4132. y: j.pageY
  4133. };
  4134. m.time = (new Date).getTime();
  4135. m.target = j.target;
  4136. return m
  4137. }
  4138. var N = j.isTouch || "ontouchstart" in window,
  4139. L = [];
  4140. Object.defineProperty || (Object.prototype.defineProperty = function(j, m, q) {
  4141. j[m] = q.value
  4142. });
  4143. N ? j(document).bind("touchend", u) : j(document).bind("mouseup", u);
  4144. for (var J = "swipe tap doubleTap pinching press unpress moving".split(" "); J.length;) r(J.pop())
  4145. })(jQuery); (function() {
  4146. var j = this,
  4147. m = j._,
  4148. s = {},
  4149. x = Array.prototype,
  4150. y = Object.prototype,
  4151. u = x.push,
  4152. r = x.slice,
  4153. q = x.concat,
  4154. N = y.toString,
  4155. L = y.hasOwnProperty,
  4156. J = x.forEach,
  4157. K = x.map,
  4158. Q = x.reduce,
  4159. Y = x.reduceRight,
  4160. ea = x.filter,
  4161. S = x.every,
  4162. C = x.some,
  4163. V = x.indexOf,
  4164. D = x.lastIndexOf,
  4165. y = Array.isArray,
  4166. w = Object.keys,
  4167. aa = Function.prototype.bind,
  4168. k = function(a) {
  4169. return a instanceof k ? a: this instanceof k ? (this._wrapped = a, void 0) : new k(a)
  4170. };
  4171. "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = k), exports._ = k) : j._ = k;
  4172. k.VERSION = "1.4.3";
  4173. var B = k.each = k.forEach = function(a, b, d) {
  4174. if (null != a) if (J && a.forEach === J) a.forEach(b, d);
  4175. else if (a.length === +a.length) for (var c = 0,
  4176. f = a.length; f > c && b.call(d, a[c], c, a) !== s; c++);
  4177. else for (c in a) if (k.has(a, c) && b.call(d, a[c], c, a) === s) break
  4178. };
  4179. k.map = k.collect = function(a, b, d) {
  4180. var c = [];
  4181. return null == a ? c: K && a.map === K ? a.map(b, d) : (B(a,
  4182. function(a, f, i) {
  4183. c[c.length] = b.call(d, a, f, i)
  4184. }), c)
  4185. };
  4186. k.reduce = k.foldl = k.inject = function(a, b, d, c) {
  4187. var f = 2 < arguments.length;
  4188. if (null == a && (a = []), Q && a.reduce === Q) return c && (b = k.bind(b, c)),
  4189. f ? a.reduce(b, d) : a.reduce(b);
  4190. if (B(a,
  4191. function(a, i, j) {
  4192. f ? d = b.call(c, d, a, i, j) : (d = a, f = !0)
  4193. }), !f) throw new TypeError("Reduce of empty array with no initial value");
  4194. return d
  4195. };
  4196. k.reduceRight = k.foldr = function(a, b, d, c) {
  4197. var f = 2 < arguments.length;
  4198. if (null == a && (a = []), Y && a.reduceRight === Y) return c && (b = k.bind(b, c)),
  4199. f ? a.reduceRight(b, d) : a.reduceRight(b);
  4200. var i = a.length;
  4201. if (i !== +i) var j = k.keys(a),
  4202. i = j.length;
  4203. if (B(a,
  4204. function(k, p, m) {
  4205. p = j ? j[--i] : --i;
  4206. f ? d = b.call(c, d, a[p], p, m) : (d = a[p], f = !0)
  4207. }), !f) throw new TypeError("Reduce of empty array with no initial value");
  4208. return d
  4209. };
  4210. k.find = k.detect = function(a, b, d) {
  4211. var c;
  4212. return U(a,
  4213. function(a, f, i) {
  4214. return b.call(d, a, f, i) ? (c = a, !0) : void 0
  4215. }),
  4216. c
  4217. };
  4218. k.filter = k.select = function(a, b, d) {
  4219. var c = [];
  4220. return null == a ? c: ea && a.filter === ea ? a.filter(b, d) : (B(a,
  4221. function(a, f, i) {
  4222. b.call(d, a, f, i) && (c[c.length] = a)
  4223. }), c)
  4224. };
  4225. k.reject = function(a, b, d) {
  4226. return k.filter(a,
  4227. function(a, c, f) {
  4228. return ! b.call(d, a, c, f)
  4229. },
  4230. d)
  4231. };
  4232. k.every = k.all = function(a, b, d) {
  4233. b || (b = k.identity);
  4234. var c = !0;
  4235. return null == a ? c: S && a.every === S ? a.every(b, d) : (B(a,
  4236. function(a, f, i) {
  4237. return (c = c && b.call(d, a, f, i)) ? void 0 : s
  4238. }), !!c)
  4239. };
  4240. var U = k.some = k.any = function(a, b, d) {
  4241. b || (b = k.identity);
  4242. var c = !1;
  4243. return null == a ? c: C && a.some === C ? a.some(b, d) : (B(a,
  4244. function(a, f, i) {
  4245. return c || (c = b.call(d, a, f, i)) ? s: void 0
  4246. }), !!c)
  4247. };
  4248. k.contains = k.include = function(a, b) {
  4249. return null == a ? !1 : V && a.indexOf === V ? -1 != a.indexOf(b) : U(a,
  4250. function(a) {
  4251. return a === b
  4252. })
  4253. };
  4254. k.invoke = function(a, b) {
  4255. var d = r.call(arguments, 2);
  4256. return k.map(a,
  4257. function(a) {
  4258. return (k.isFunction(b) ? b: a[b]).apply(a, d)
  4259. })
  4260. };
  4261. k.pluck = function(a, b) {
  4262. return k.map(a,
  4263. function(a) {
  4264. return a[b]
  4265. })
  4266. };
  4267. k.where = function(a, b) {
  4268. return k.isEmpty(b) ? [] : k.filter(a,
  4269. function(a) {
  4270. for (var d in b) if (b[d] !== a[d]) return ! 1;
  4271. return ! 0
  4272. })
  4273. };
  4274. k.max = function(a, b, d) {
  4275. if (!b && k.isArray(a) && a[0] === +a[0] && 65535 > a.length) return Math.max.apply(Math, a);
  4276. if (!b && k.isEmpty(a)) return - 1 / 0;
  4277. var c = {
  4278. computed: -1 / 0,
  4279. value: -1 / 0
  4280. };
  4281. return B(a,
  4282. function(a, f, i) {
  4283. f = b ? b.call(d, a, f, i) : a;
  4284. f >= c.computed && (c = {
  4285. value: a,
  4286. computed: f
  4287. })
  4288. }),
  4289. c.value
  4290. };
  4291. k.min = function(a, b, d) {
  4292. if (!b && k.isArray(a) && a[0] === +a[0] && 65535 > a.length) return Math.min.apply(Math, a);
  4293. if (!b && k.isEmpty(a)) return 1 / 0;
  4294. var c = {
  4295. computed: 1 / 0,
  4296. value: 1 / 0
  4297. };
  4298. return B(a,
  4299. function(a, f, i) {
  4300. f = b ? b.call(d, a, f, i) : a;
  4301. c.computed > f && (c = {
  4302. value: a,
  4303. computed: f
  4304. })
  4305. }),
  4306. c.value
  4307. };
  4308. k.shuffle = function(a) {
  4309. var b, d = 0,
  4310. c = [];
  4311. return B(a,
  4312. function(a) {
  4313. b = k.random(d++);
  4314. c[d - 1] = c[b];
  4315. c[b] = a
  4316. }),
  4317. c
  4318. };
  4319. var R = function(a) {
  4320. return k.isFunction(a) ? a: function(b) {
  4321. return b[a]
  4322. }
  4323. };
  4324. k.sortBy = function(a, b, d) {
  4325. var c = R(b);
  4326. return k.pluck(k.map(a,
  4327. function(a, b, h) {
  4328. return {
  4329. value: a,
  4330. index: b,
  4331. criteria: c.call(d, a, b, h)
  4332. }
  4333. }).sort(function(a, b) {
  4334. var d = a.criteria,
  4335. h = b.criteria;
  4336. if (d !== h) {
  4337. if (d > h || void 0 === d) return 1;
  4338. if (h > d || void 0 === h) return - 1
  4339. }
  4340. return a.index < b.index ? -1 : 1
  4341. }), "value")
  4342. };
  4343. var M = function(a, b, d, c) {
  4344. var f = {},
  4345. i = R(b || k.identity);
  4346. return B(a,
  4347. function(b, h) {
  4348. var j = i.call(d, b, h, a);
  4349. c(f, j, b)
  4350. }),
  4351. f
  4352. };
  4353. k.groupBy = function(a, b, d) {
  4354. return M(a, b, d,
  4355. function(a, b, d) { (k.has(a, b) ? a[b] : a[b] = []).push(d)
  4356. })
  4357. };
  4358. k.countBy = function(a, b, d) {
  4359. return M(a, b, d,
  4360. function(a, b) {
  4361. k.has(a, b) || (a[b] = 0);
  4362. a[b]++
  4363. })
  4364. };
  4365. k.sortedIndex = function(a, b, d, c) {
  4366. for (var d = null == d ? k.identity: R(d), b = d.call(c, b), f = 0, i = a.length; i > f;) {
  4367. var j = f + i >>> 1;
  4368. b > d.call(c, a[j]) ? f = j + 1 : i = j
  4369. }
  4370. return f
  4371. };
  4372. k.toArray = function(a) {
  4373. return a ? k.isArray(a) ? r.call(a) : a.length === +a.length ? k.map(a, k.identity) : k.values(a) : []
  4374. };
  4375. k.size = function(a) {
  4376. return null == a ? 0 : a.length === +a.length ? a.length: k.keys(a).length
  4377. };
  4378. k.first = k.head = k.take = function(a, b, d) {
  4379. return null == a ? void 0 : null == b || d ? a[0] : r.call(a, 0, b)
  4380. };
  4381. k.initial = function(a, b, d) {
  4382. return r.call(a, 0, a.length - (null == b || d ? 1 : b))
  4383. };
  4384. k.last = function(a, b, d) {
  4385. return null == a ? void 0 : null == b || d ? a[a.length - 1] : r.call(a, Math.max(a.length - b, 0))
  4386. };
  4387. k.rest = k.tail = k.drop = function(a, b, d) {
  4388. return r.call(a, null == b || d ? 1 : b)
  4389. };
  4390. k.compact = function(a) {
  4391. return k.filter(a, k.identity)
  4392. };
  4393. var o = function(a, b, d) {
  4394. return B(a,
  4395. function(a) {
  4396. k.isArray(a) ? b ? u.apply(d, a) : o(a, b, d) : d.push(a)
  4397. }),
  4398. d
  4399. };
  4400. k.flatten = function(a, b) {
  4401. return o(a, b, [])
  4402. };
  4403. k.without = function(a) {
  4404. return k.difference(a, r.call(arguments, 1))
  4405. };
  4406. k.uniq = k.unique = function(a, b, d, c) {
  4407. k.isFunction(b) && (c = d, d = b, b = !1);
  4408. var d = d ? k.map(a, d, c) : a,
  4409. f = [],
  4410. i = [];
  4411. return B(d,
  4412. function(d, c) { (b ? c && i[i.length - 1] === d: k.contains(i, d)) || (i.push(d), f.push(a[c]))
  4413. }),
  4414. f
  4415. };
  4416. k.union = function() {
  4417. return k.uniq(q.apply(x, arguments))
  4418. };
  4419. k.intersection = function(a) {
  4420. var b = r.call(arguments, 1);
  4421. return k.filter(k.uniq(a),
  4422. function(a) {
  4423. return k.every(b,
  4424. function(b) {
  4425. return 0 <= k.indexOf(b, a)
  4426. })
  4427. })
  4428. };
  4429. k.difference = function(a) {
  4430. var b = q.apply(x, r.call(arguments, 1));
  4431. return k.filter(a,
  4432. function(a) {
  4433. return ! k.contains(b, a)
  4434. })
  4435. };
  4436. k.zip = function() {
  4437. for (var a = r.call(arguments), b = k.max(k.pluck(a, "length")), d = Array(b), c = 0; b > c; c++) d[c] = k.pluck(a, "" + c);
  4438. return d
  4439. };
  4440. k.object = function(a, b) {
  4441. if (null == a) return {};
  4442. for (var d = {},
  4443. c = 0,
  4444. f = a.length; f > c; c++) b ? d[a[c]] = b[c] : d[a[c][0]] = a[c][1];
  4445. return d
  4446. };
  4447. k.indexOf = function(a, b, d) {
  4448. if (null == a) return - 1;
  4449. var c = 0,
  4450. f = a.length;
  4451. if (d) {
  4452. if ("number" != typeof d) return c = k.sortedIndex(a, b),
  4453. a[c] === b ? c: -1;
  4454. c = 0 > d ? Math.max(0, f + d) : d
  4455. }
  4456. if (V && a.indexOf === V) return a.indexOf(b, d);
  4457. for (; f > c; c++) if (a[c] === b) return c;
  4458. return - 1
  4459. };
  4460. k.lastIndexOf = function(a, b, d) {
  4461. if (null == a) return - 1;
  4462. var c = null != d;
  4463. if (D && a.lastIndexOf === D) return c ? a.lastIndexOf(b, d) : a.lastIndexOf(b);
  4464. for (d = c ? d: a.length; d--;) if (a[d] === b) return d;
  4465. return - 1
  4466. };
  4467. k.range = function(a, b, d) {
  4468. 1 >= arguments.length && (b = a || 0, a = 0);
  4469. for (var d = arguments[2] || 1, c = Math.max(Math.ceil((b - a) / d), 0), f = 0, i = Array(c); c > f;) i[f++] = a,
  4470. a += d;
  4471. return i
  4472. };
  4473. var F = function() {};
  4474. k.bind = function(a, b) {
  4475. var d, c;
  4476. if (a.bind === aa && aa) return aa.apply(a, r.call(arguments, 1));
  4477. if (!k.isFunction(a)) throw new TypeError;
  4478. return d = r.call(arguments, 2),
  4479. c = function() {
  4480. if (! (this instanceof c)) return a.apply(b, d.concat(r.call(arguments)));
  4481. F.prototype = a.prototype;
  4482. var f = new F;
  4483. F.prototype = null;
  4484. var i = a.apply(f, d.concat(r.call(arguments)));
  4485. return Object(i) === i ? i: f
  4486. }
  4487. };
  4488. k.bindAll = function(a) {
  4489. var b = r.call(arguments, 1);
  4490. return 0 == b.length && (b = k.functions(a)),
  4491. B(b,
  4492. function(b) {
  4493. a[b] = k.bind(a[b], a)
  4494. }),
  4495. a
  4496. };
  4497. k.memoize = function(a, b) {
  4498. var d = {};
  4499. return b || (b = k.identity),
  4500. function() {
  4501. var c = b.apply(this, arguments);
  4502. return k.has(d, c) ? d[c] : d[c] = a.apply(this, arguments)
  4503. }
  4504. };
  4505. k.delay = function(a, b) {
  4506. var d = r.call(arguments, 2);
  4507. return setTimeout(function() {
  4508. return a.apply(null, d)
  4509. },
  4510. b)
  4511. };
  4512. k.defer = function(a) {
  4513. return k.delay.apply(k, [a, 1].concat(r.call(arguments, 1)))
  4514. };
  4515. k.throttle = function(a, b) {
  4516. var d, c, f, i, j = 0,
  4517. k = function() {
  4518. j = new Date;
  4519. f = null;
  4520. i = a.apply(d, c)
  4521. };
  4522. return function() {
  4523. var p = new Date,
  4524. m = b - (p - j);
  4525. return d = this,
  4526. c = arguments,
  4527. 0 >= m ? (clearTimeout(f), f = null, j = p, i = a.apply(d, c)) : f || (f = setTimeout(k, m)),
  4528. i
  4529. }
  4530. };
  4531. k.debounce = function(a, b, d) {
  4532. var c, f;
  4533. return function() {
  4534. var i = this,
  4535. j = arguments,
  4536. k = d && !c;
  4537. return clearTimeout(c),
  4538. c = setTimeout(function() {
  4539. c = null;
  4540. d || (f = a.apply(i, j))
  4541. },
  4542. b),
  4543. k && (f = a.apply(i, j)),
  4544. f
  4545. }
  4546. };
  4547. k.once = function(a) {
  4548. var b, d = !1;
  4549. return function() {
  4550. return d ? b: (d = !0, b = a.apply(this, arguments), a = null, b)
  4551. }
  4552. };
  4553. k.wrap = function(a, b) {
  4554. return function() {
  4555. var d = [a];
  4556. return u.apply(d, arguments),
  4557. b.apply(this, d)
  4558. }
  4559. };
  4560. k.compose = function() {
  4561. var a = arguments;
  4562. return function() {
  4563. for (var b = arguments,
  4564. d = a.length - 1; 0 <= d; d--) b = [a[d].apply(this, b)];
  4565. return b[0]
  4566. }
  4567. };
  4568. k.after = function(a, b) {
  4569. return 0 >= a ? b() : function() {
  4570. return 1 > --a ? b.apply(this, arguments) : void 0
  4571. }
  4572. };
  4573. k.keys = w ||
  4574. function(a) {
  4575. if (a !== Object(a)) throw new TypeError("Invalid object");
  4576. var b = [],
  4577. d;
  4578. for (d in a) k.has(a, d) && (b[b.length] = d);
  4579. return b
  4580. };
  4581. k.values = function(a) {
  4582. var b = [],
  4583. d;
  4584. for (d in a) k.has(a, d) && b.push(a[d]);
  4585. return b
  4586. };
  4587. k.pairs = function(a) {
  4588. var b = [],
  4589. d;
  4590. for (d in a) k.has(a, d) && b.push([d, a[d]]);
  4591. return b
  4592. };
  4593. k.invert = function(a) {
  4594. var b = {},
  4595. d;
  4596. for (d in a) k.has(a, d) && (b[a[d]] = d);
  4597. return b
  4598. };
  4599. k.functions = k.methods = function(a) {
  4600. var b = [],
  4601. d;
  4602. for (d in a) k.isFunction(a[d]) && b.push(d);
  4603. return b.sort()
  4604. };
  4605. k.extend = function(a) {
  4606. return B(r.call(arguments, 1),
  4607. function(b) {
  4608. if (b) for (var d in b) a[d] = b[d]
  4609. }),
  4610. a
  4611. };
  4612. k.pick = function(a) {
  4613. var b = {},
  4614. d = q.apply(x, r.call(arguments, 1));
  4615. return B(d,
  4616. function(d) {
  4617. d in a && (b[d] = a[d])
  4618. }),
  4619. b
  4620. };
  4621. k.omit = function(a) {
  4622. var b = {},
  4623. d = q.apply(x, r.call(arguments, 1)),
  4624. c;
  4625. for (c in a) k.contains(d, c) || (b[c] = a[c]);
  4626. return b
  4627. };
  4628. k.defaults = function(a) {
  4629. return B(r.call(arguments, 1),
  4630. function(b) {
  4631. if (b) for (var d in b) null == a[d] && (a[d] = b[d])
  4632. }),
  4633. a
  4634. };
  4635. k.clone = function(a) {
  4636. return k.isObject(a) ? k.isArray(a) ? a.slice() : k.extend({},
  4637. a) : a
  4638. };
  4639. k.tap = function(a, b) {
  4640. return b(a),
  4641. a
  4642. };
  4643. var c = function(a, b, d, f) {
  4644. if (a === b) return 0 !== a || 1 / a == 1 / b;
  4645. if (null == a || null == b) return a === b;
  4646. a instanceof k && (a = a._wrapped);
  4647. b instanceof k && (b = b._wrapped);
  4648. var i = N.call(a);
  4649. if (i != N.call(b)) return ! 1;
  4650. switch (i) {
  4651. case "[object String]":
  4652. return a == b + "";
  4653. case "[object Number]":
  4654. return a != +a ? b != +b: 0 == a ? 1 / a == 1 / b: a == +b;
  4655. case "[object Date]":
  4656. case "[object Boolean]":
  4657. return + a == +b;
  4658. case "[object RegExp]":
  4659. return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase
  4660. }
  4661. if ("object" != typeof a || "object" != typeof b) return ! 1;
  4662. for (var j = d.length; j--;) if (d[j] == a) return f[j] == b;
  4663. d.push(a);
  4664. f.push(b);
  4665. var j = 0,
  4666. p = !0;
  4667. if ("[object Array]" == i) {
  4668. if (j = a.length, p = j == b.length) for (; j--&&(p = c(a[j], b[j], d, f)););
  4669. } else {
  4670. var i = a.constructor,
  4671. m = b.constructor;
  4672. if (i !== m && (!k.isFunction(i) || !(i instanceof i && k.isFunction(m) && m instanceof m))) return ! 1;
  4673. for (var v in a) if (k.has(a, v) && (j++, !(p = k.has(b, v) && c(a[v], b[v], d, f)))) break;
  4674. if (p) {
  4675. for (v in b) if (k.has(b, v) && !j--) break;
  4676. p = !j
  4677. }
  4678. }
  4679. return d.pop(),
  4680. f.pop(),
  4681. p
  4682. };
  4683. k.isEqual = function(a, b) {
  4684. return c(a, b, [], [])
  4685. };
  4686. k.isEmpty = function(a) {
  4687. if (null == a) return ! 0;
  4688. if (k.isArray(a) || k.isString(a)) return 0 === a.length;
  4689. for (var b in a) if (k.has(a, b)) return ! 1;
  4690. return ! 0
  4691. };
  4692. k.isElement = function(a) {
  4693. return ! (!a || 1 !== a.nodeType)
  4694. };
  4695. k.isArray = y ||
  4696. function(a) {
  4697. return "[object Array]" == N.call(a)
  4698. };
  4699. k.isObject = function(a) {
  4700. return a === Object(a)
  4701. };
  4702. B("Arguments Function String Number Date RegExp".split(" "),
  4703. function(a) {
  4704. k["is" + a] = function(b) {
  4705. return N.call(b) == "[object " + a + "]"
  4706. }
  4707. });
  4708. k.isArguments(arguments) || (k.isArguments = function(a) {
  4709. return ! (!a || !k.has(a, "callee"))
  4710. });
  4711. k.isFunction = function(a) {
  4712. return "function" == typeof a
  4713. };
  4714. k.isFinite = function(a) {
  4715. return isFinite(a) && !isNaN(parseFloat(a))
  4716. };
  4717. k.isNaN = function(a) {
  4718. return k.isNumber(a) && a != +a
  4719. };
  4720. k.isBoolean = function(a) {
  4721. return ! 0 === a || !1 === a || "[object Boolean]" == N.call(a)
  4722. };
  4723. k.isNull = function(a) {
  4724. return null === a
  4725. };
  4726. k.isUndefined = function(a) {
  4727. return void 0 === a
  4728. };
  4729. k.has = function(a, b) {
  4730. return L.call(a, b)
  4731. };
  4732. k.noConflict = function() {
  4733. return j._ = m,
  4734. this
  4735. };
  4736. k.identity = function(a) {
  4737. return a
  4738. };
  4739. k.times = function(a, b, d) {
  4740. for (var c = Array(a), f = 0; a > f; f++) c[f] = b.call(d, f);
  4741. return c
  4742. };
  4743. k.random = function(a, b) {
  4744. return null == b && (b = a, a = 0),
  4745. a + (0 | Math.random() * (b - a + 1))
  4746. };
  4747. var i = {
  4748. escape: {
  4749. "&": "&amp;",
  4750. "<": "&lt;",
  4751. ">": "&gt;",
  4752. '"': "&quot;",
  4753. "'": "&#x27;",
  4754. "/": "&#x2F;"
  4755. }
  4756. };
  4757. i.unescape = k.invert(i.escape);
  4758. var f = {
  4759. escape: RegExp("[" + k.keys(i.escape).join("") + "]", "g"),
  4760. unescape: RegExp("(" + k.keys(i.unescape).join("|") + ")", "g")
  4761. };
  4762. k.each(["escape", "unescape"],
  4763. function(a) {
  4764. k[a] = function(b) {
  4765. return null == b ? "": ("" + b).replace(f[a],
  4766. function(b) {
  4767. return i[a][b]
  4768. })
  4769. }
  4770. });
  4771. k.result = function(a, b) {
  4772. if (null == a) return null;
  4773. var d = a[b];
  4774. return k.isFunction(d) ? d.call(a) : d
  4775. };
  4776. k.mixin = function(a) {
  4777. B(k.functions(a),
  4778. function(b) {
  4779. var d = k[b] = a[b];
  4780. k.prototype[b] = function() {
  4781. var a = [this._wrapped];
  4782. u.apply(a, arguments);
  4783. a = d.apply(k, a);
  4784. return this._chain ? k(a).chain() : a
  4785. }
  4786. })
  4787. };
  4788. var p = 0;
  4789. k.uniqueId = function(a) {
  4790. var b = "" + ++p;
  4791. return a ? a + b: b
  4792. };
  4793. k.templateSettings = {
  4794. evaluate: /<%([\s\S]+?)%>/g,
  4795. interpolate: /<%=([\s\S]+?)%>/g,
  4796. escape: /<%-([\s\S]+?)%>/g
  4797. };
  4798. var v = /(.)^/,
  4799. b = {
  4800. "'": "'",
  4801. "\\": "\\",
  4802. "\r": "r",
  4803. "\n": "n",
  4804. "\t": "t",
  4805. "\u2028": "u2028",
  4806. "\u2029": "u2029"
  4807. },
  4808. d = /\\|'|\r|\n|\t|\u2028|\u2029/g;
  4809. k.template = function(a, c, g) {
  4810. var g = k.defaults({},
  4811. g, k.templateSettings),
  4812. f = RegExp([(g.escape || v).source, (g.interpolate || v).source, (g.evaluate || v).source].join("|") + "|$", "g"),
  4813. i = 0,
  4814. j = "__p+='";
  4815. a.replace(f,
  4816. function(c, h, g, f, l) {
  4817. return j += a.slice(i, l).replace(d,
  4818. function(a) {
  4819. return "\\" + b[a]
  4820. }),
  4821. h && (j += "'+\n((__t=(" + h + "))==null?'':_.escape(__t))+\n'"),
  4822. g && (j += "'+\n((__t=(" + g + "))==null?'':__t)+\n'"),
  4823. f && (j += "';\n" + f + "\n__p+='"),
  4824. i = l + c.length,
  4825. c
  4826. });
  4827. j += "';\n";
  4828. g.variable || (j = "with(obj||{}){\n" + j + "}\n");
  4829. j = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + j + "return __p;\n";
  4830. try {
  4831. var p = Function(g.variable || "obj", "_", j)
  4832. } catch(m) {
  4833. throw m.source = j,
  4834. m;
  4835. }
  4836. if (c) return p(c, k);
  4837. c = function(a) {
  4838. return p.call(this, a, k)
  4839. };
  4840. return c.source = "function(" + (g.variable || "obj") + "){\n" + j + "}",
  4841. c
  4842. };
  4843. k.chain = function(a) {
  4844. return k(a).chain()
  4845. };
  4846. k.mixin(k);
  4847. B("pop push reverse shift sort splice unshift".split(" "),
  4848. function(a) {
  4849. var b = x[a];
  4850. k.prototype[a] = function() {
  4851. var d = this._wrapped;
  4852. return b.apply(d, arguments),
  4853. "shift" != a && "splice" != a || 0 !== d.length || delete d[0],
  4854. this._chain ? k(d).chain() : d
  4855. }
  4856. });
  4857. B(["concat", "join", "slice"],
  4858. function(a) {
  4859. var b = x[a];
  4860. k.prototype[a] = function() {
  4861. var a = b.apply(this._wrapped, arguments);
  4862. return this._chain ? k(a).chain() : a
  4863. }
  4864. });
  4865. k.extend(k.prototype, {
  4866. chain: function() {
  4867. return this._chain = !0,
  4868. this
  4869. },
  4870. value: function() {
  4871. return this._wrapped
  4872. }
  4873. })
  4874. }).call(this); (function() {
  4875. var j = this,
  4876. m = j.Backbone,
  4877. s = [],
  4878. x = s.push,
  4879. y = s.slice,
  4880. u = s.splice,
  4881. r;
  4882. r = "undefined" !== typeof exports ? exports: j.Backbone = {};
  4883. r.VERSION = "0.9.10";
  4884. var q = j._; ! q && "undefined" !== typeof require && (q = require("underscore"));
  4885. r.$ = j.jQuery || j.Zepto || j.ender;
  4886. r.noConflict = function() {
  4887. j.Backbone = m;
  4888. return this
  4889. };
  4890. r.emulateHTTP = !1;
  4891. r.emulateJSON = !1;
  4892. var N = /\s+/,
  4893. L = function(c, i, f, j) {
  4894. if (!f) return ! 0;
  4895. if ("object" === typeof f) for (var k in f) c[i].apply(c, [k, f[k]].concat(j));
  4896. else if (N.test(f)) {
  4897. f = f.split(N);
  4898. k = 0;
  4899. for (var b = f.length; k < b; k++) c[i].apply(c, [f[k]].concat(j))
  4900. } else return ! 0
  4901. },
  4902. J = function(c, i) {
  4903. var f, j = -1,
  4904. k = c.length;
  4905. switch (i.length) {
  4906. case 0:
  4907. for (; ++j < k;)(f = c[j]).callback.call(f.ctx);
  4908. break;
  4909. case 1:
  4910. for (; ++j < k;)(f = c[j]).callback.call(f.ctx, i[0]);
  4911. break;
  4912. case 2:
  4913. for (; ++j < k;)(f = c[j]).callback.call(f.ctx, i[0], i[1]);
  4914. break;
  4915. case 3:
  4916. for (; ++j < k;)(f = c[j]).callback.call(f.ctx, i[0], i[1], i[2]);
  4917. break;
  4918. default:
  4919. for (; ++j < k;)(f = c[j]).callback.apply(f.ctx, i)
  4920. }
  4921. },
  4922. s = r.Events = {
  4923. on: function(c, i, f) {
  4924. if (!L(this, "on", c, [i, f]) || !i) return this;
  4925. this._events || (this._events = {}); (this._events[c] || (this._events[c] = [])).push({
  4926. callback: i,
  4927. context: f,
  4928. ctx: f || this
  4929. });
  4930. return this
  4931. },
  4932. once: function(c, i, f) {
  4933. if (!L(this, "once", c, [i, f]) || !i) return this;
  4934. var j = this,
  4935. k = q.once(function() {
  4936. j.off(c, k);
  4937. i.apply(this, arguments)
  4938. });
  4939. k._callback = i;
  4940. this.on(c, k, f);
  4941. return this
  4942. },
  4943. off: function(c, i, f) {
  4944. var j, k, b, d, a, h, g, l;
  4945. if (!this._events || !L(this, "off", c, [i, f])) return this;
  4946. if (!c && !i && !f) return this._events = {},
  4947. this;
  4948. d = c ? [c] : q.keys(this._events);
  4949. a = 0;
  4950. for (h = d.length; a < h; a++) if (c = d[a], j = this._events[c]) {
  4951. b = [];
  4952. if (i || f) {
  4953. g = 0;
  4954. for (l = j.length; g < l; g++) k = j[g],
  4955. (i && i !== k.callback && i !== k.callback._callback || f && f !== k.context) && b.push(k)
  4956. }
  4957. this._events[c] = b
  4958. }
  4959. return this
  4960. },
  4961. trigger: function(c) {
  4962. if (!this._events) return this;
  4963. var i = y.call(arguments, 1);
  4964. if (!L(this, "trigger", c, i)) return this;
  4965. var f = this._events[c],
  4966. j = this._events.all;
  4967. f && J(f, i);
  4968. j && J(j, arguments);
  4969. return this
  4970. },
  4971. listenTo: function(c, i, f) {
  4972. var j = this._listeners || (this._listeners = {}),
  4973. k = c._listenerId || (c._listenerId = q.uniqueId("l"));
  4974. j[k] = c;
  4975. c.on(i, "object" === typeof i ? this: f, this);
  4976. return this
  4977. },
  4978. stopListening: function(c, i, f) {
  4979. var j = this._listeners;
  4980. if (j) {
  4981. if (c) c.off(i, "object" === typeof i ? this: f, this),
  4982. !i && !f && delete j[c._listenerId];
  4983. else {
  4984. "object" === typeof i && (f = this);
  4985. for (var k in j) j[k].off(i, f, this);
  4986. this._listeners = {}
  4987. }
  4988. return this
  4989. }
  4990. }
  4991. };
  4992. s.bind = s.on;
  4993. s.unbind = s.off;
  4994. q.extend(r, s);
  4995. var K = r.Model = function(c, i) {
  4996. var f, j = c || {};
  4997. this.cid = q.uniqueId("c");
  4998. this.attributes = {};
  4999. i && i.collection && (this.collection = i.collection);
  5000. i && i.parse && (j = this.parse(j, i) || {});
  5001. if (f = q.result(this, "defaults")) j = q.defaults({},
  5002. j, f);
  5003. this.set(j, i);
  5004. this.changed = {};
  5005. this.initialize.apply(this, arguments)
  5006. };
  5007. q.extend(K.prototype, s, {
  5008. changed: null,
  5009. idAttribute: "id",
  5010. initialize: function() {},
  5011. toJSON: function() {
  5012. return q.clone(this.attributes)
  5013. },
  5014. sync: function() {
  5015. return r.sync.apply(this, arguments)
  5016. },
  5017. get: function(c) {
  5018. return this.attributes[c]
  5019. },
  5020. escape: function(c) {
  5021. return q.escape(this.get(c))
  5022. },
  5023. has: function(c) {
  5024. return null != this.get(c)
  5025. },
  5026. set: function(c, i, f) {
  5027. var j, k, b, d, a, h, g;
  5028. if (null == c) return this;
  5029. "object" === typeof c ? (k = c, f = i) : (k = {})[c] = i;
  5030. f || (f = {});
  5031. if (!this._validate(k, f)) return ! 1;
  5032. b = f.unset;
  5033. d = f.silent;
  5034. c = [];
  5035. a = this._changing;
  5036. this._changing = !0;
  5037. a || (this._previousAttributes = q.clone(this.attributes), this.changed = {});
  5038. g = this.attributes;
  5039. h = this._previousAttributes;
  5040. this.idAttribute in k && (this.id = k[this.idAttribute]);
  5041. for (j in k) i = k[j],
  5042. q.isEqual(g[j], i) || c.push(j),
  5043. q.isEqual(h[j], i) ? delete this.changed[j] : this.changed[j] = i,
  5044. b ? delete g[j] : g[j] = i;
  5045. if (!d) {
  5046. c.length && (this._pending = !0);
  5047. i = 0;
  5048. for (j = c.length; i < j; i++) this.trigger("change:" + c[i], this, g[c[i]], f)
  5049. }
  5050. if (a) return this;
  5051. if (!d) for (; this._pending;) this._pending = !1,
  5052. this.trigger("change", this, f);
  5053. this._changing = this._pending = !1;
  5054. return this
  5055. },
  5056. unset: function(c, i) {
  5057. return this.set(c, void 0, q.extend({},
  5058. i, {
  5059. unset: !0
  5060. }))
  5061. },
  5062. clear: function(c) {
  5063. var i = {},
  5064. f;
  5065. for (f in this.attributes) i[f] = void 0;
  5066. return this.set(i, q.extend({},
  5067. c, {
  5068. unset: !0
  5069. }))
  5070. },
  5071. hasChanged: function(c) {
  5072. return null == c ? !q.isEmpty(this.changed) : q.has(this.changed, c)
  5073. },
  5074. changedAttributes: function(c) {
  5075. if (!c) return this.hasChanged() ? q.clone(this.changed) : !1;
  5076. var i, f = !1,
  5077. j = this._changing ? this._previousAttributes: this.attributes,
  5078. k;
  5079. for (k in c) if (!q.isEqual(j[k], i = c[k]))(f || (f = {}))[k] = i;
  5080. return f
  5081. },
  5082. previous: function(c) {
  5083. return null == c || !this._previousAttributes ? null: this._previousAttributes[c]
  5084. },
  5085. previousAttributes: function() {
  5086. return q.clone(this._previousAttributes)
  5087. },
  5088. fetch: function(c) {
  5089. c = c ? q.clone(c) : {};
  5090. void 0 === c.parse && (c.parse = !0);
  5091. var i = c.success;
  5092. c.success = function(c, j, k) {
  5093. if (!c.set(c.parse(j, k), k)) return ! 1;
  5094. i && i(c, j, k)
  5095. };
  5096. return this.sync("read", this, c)
  5097. },
  5098. save: function(c, i, f) {
  5099. var j, k, b = this.attributes;
  5100. null == c || "object" === typeof c ? (j = c, f = i) : (j = {})[c] = i;
  5101. if (j && (!f || !f.wait) && !this.set(j, f)) return ! 1;
  5102. f = q.extend({
  5103. validate: !0
  5104. },
  5105. f);
  5106. if (!this._validate(j, f)) return ! 1;
  5107. j && f.wait && (this.attributes = q.extend({},
  5108. b, j));
  5109. void 0 === f.parse && (f.parse = !0);
  5110. k = f.success;
  5111. f.success = function(d, a, c) {
  5112. d.attributes = b;
  5113. var g = d.parse(a, c);
  5114. c.wait && (g = q.extend(j || {},
  5115. g));
  5116. if (q.isObject(g) && !d.set(g, c)) return ! 1;
  5117. k && k(d, a, c)
  5118. };
  5119. c = this.isNew() ? "create": f.patch ? "patch": "update";
  5120. "patch" === c && (f.attrs = j);
  5121. c = this.sync(c, this, f);
  5122. j && f.wait && (this.attributes = b);
  5123. return c
  5124. },
  5125. destroy: function(c) {
  5126. var c = c ? q.clone(c) : {},
  5127. i = this,
  5128. f = c.success,
  5129. j = function() {
  5130. i.trigger("destroy", i, i.collection, c)
  5131. };
  5132. c.success = function(b, d, a) { (a.wait || b.isNew()) && j();
  5133. f && f(b, d, a)
  5134. };
  5135. if (this.isNew()) return c.success(this, null, c),
  5136. !1;
  5137. var k = this.sync("delete", this, c);
  5138. c.wait || j();
  5139. return k
  5140. },
  5141. url: function() {
  5142. var c = q.result(this, "urlRoot") || q.result(this.collection, "url") || F();
  5143. return this.isNew() ? c: c + ("/" === c.charAt(c.length - 1) ? "": "/") + encodeURIComponent(this.id)
  5144. },
  5145. parse: function(c) {
  5146. return c
  5147. },
  5148. clone: function() {
  5149. return new this.constructor(this.attributes)
  5150. },
  5151. isNew: function() {
  5152. return null == this.id
  5153. },
  5154. isValid: function(c) {
  5155. return ! this.validate || !this.validate(this.attributes, c)
  5156. },
  5157. _validate: function(c, i) {
  5158. if (!i.validate || !this.validate) return ! 0;
  5159. var c = q.extend({},
  5160. this.attributes, c),
  5161. f = this.validationError = this.validate(c, i) || null;
  5162. if (!f) return ! 0;
  5163. this.trigger("invalid", this, f, i || {});
  5164. return ! 1
  5165. }
  5166. });
  5167. var Q = r.Collection = function(c, i) {
  5168. i || (i = {});
  5169. i.model && (this.model = i.model);
  5170. void 0 !== i.comparator && (this.comparator = i.comparator);
  5171. this.models = [];
  5172. this._reset();
  5173. this.initialize.apply(this, arguments);
  5174. c && this.reset(c, q.extend({
  5175. silent: !0
  5176. },
  5177. i))
  5178. };
  5179. q.extend(Q.prototype, s, {
  5180. model: K,
  5181. initialize: function() {},
  5182. toJSON: function(c) {
  5183. return this.map(function(i) {
  5184. return i.toJSON(c)
  5185. })
  5186. },
  5187. sync: function() {
  5188. return r.sync.apply(this, arguments)
  5189. },
  5190. add: function(c, i) {
  5191. c = q.isArray(c) ? c.slice() : [c];
  5192. i || (i = {});
  5193. var f, j, k, b, d, a, h, g, l, t;
  5194. h = [];
  5195. g = i.at;
  5196. l = this.comparator && null == g && !1 != i.sort;
  5197. t = q.isString(this.comparator) ? this.comparator: null;
  5198. f = 0;
  5199. for (j = c.length; f < j; f++)(k = this._prepareModel(b = c[f], i)) ? (d = this.get(k)) ? i.merge && (d.set(b === k ? k.attributes: b, i), l && !a && d.hasChanged(t) && (a = !0)) : (h.push(k), k.on("all", this._onModelEvent, this), this._byId[k.cid] = k, null != k.id && (this._byId[k.id] = k)) : this.trigger("invalid", this, b, i);
  5200. h.length && (l && (a = !0), this.length += h.length, null != g ? u.apply(this.models, [g, 0].concat(h)) : x.apply(this.models, h));
  5201. a && this.sort({
  5202. silent: !0
  5203. });
  5204. if (i.silent) return this;
  5205. f = 0;
  5206. for (j = h.length; f < j; f++)(k = h[f]).trigger("add", k, this, i);
  5207. a && this.trigger("sort", this, i);
  5208. return this
  5209. },
  5210. remove: function(c, i) {
  5211. c = q.isArray(c) ? c.slice() : [c];
  5212. i || (i = {});
  5213. var f, j, k, b;
  5214. f = 0;
  5215. for (j = c.length; f < j; f++) if (b = this.get(c[f])) delete this._byId[b.id],
  5216. delete this._byId[b.cid],
  5217. k = this.indexOf(b),
  5218. this.models.splice(k, 1),
  5219. this.length--,
  5220. i.silent || (i.index = k, b.trigger("remove", b, this, i)),
  5221. this._removeReference(b);
  5222. return this
  5223. },
  5224. push: function(c, i) {
  5225. c = this._prepareModel(c, i);
  5226. this.add(c, q.extend({
  5227. at: this.length
  5228. },
  5229. i));
  5230. return c
  5231. },
  5232. pop: function(c) {
  5233. var i = this.at(this.length - 1);
  5234. this.remove(i, c);
  5235. return i
  5236. },
  5237. unshift: function(c, i) {
  5238. c = this._prepareModel(c, i);
  5239. this.add(c, q.extend({
  5240. at: 0
  5241. },
  5242. i));
  5243. return c
  5244. },
  5245. shift: function(c) {
  5246. var i = this.at(0);
  5247. this.remove(i, c);
  5248. return i
  5249. },
  5250. slice: function(c, i) {
  5251. return this.models.slice(c, i)
  5252. },
  5253. get: function(c) {
  5254. if (null != c) return this._idAttr || (this._idAttr = this.model.prototype.idAttribute),
  5255. this._byId[c.id || c.cid || c[this._idAttr] || c]
  5256. },
  5257. at: function(c) {
  5258. return this.models[c]
  5259. },
  5260. where: function(c) {
  5261. return q.isEmpty(c) ? [] : this.filter(function(i) {
  5262. for (var f in c) if (c[f] !== i.get(f)) return ! 1;
  5263. return ! 0
  5264. })
  5265. },
  5266. sort: function(c) {
  5267. if (!this.comparator) throw Error("Cannot sort a set without a comparator");
  5268. c || (c = {});
  5269. q.isString(this.comparator) || 1 === this.comparator.length ? this.models = this.sortBy(this.comparator, this) : this.models.sort(q.bind(this.comparator, this));
  5270. c.silent || this.trigger("sort", this, c);
  5271. return this
  5272. },
  5273. pluck: function(c) {
  5274. return q.invoke(this.models, "get", c)
  5275. },
  5276. update: function(c, i) {
  5277. i = q.extend({
  5278. add: !0,
  5279. merge: !0,
  5280. remove: !0
  5281. },
  5282. i);
  5283. i.parse && (c = this.parse(c, i));
  5284. var f, j, k, b, d = [],
  5285. a = [],
  5286. h = {};
  5287. q.isArray(c) || (c = c ? [c] : []);
  5288. if (i.add && !i.remove) return this.add(c, i);
  5289. j = 0;
  5290. for (k = c.length; j < k; j++) f = c[j],
  5291. b = this.get(f),
  5292. i.remove && b && (h[b.cid] = !0),
  5293. (i.add && !b || i.merge && b) && d.push(f);
  5294. if (i.remove) {
  5295. j = 0;
  5296. for (k = this.models.length; j < k; j++) f = this.models[j],
  5297. h[f.cid] || a.push(f)
  5298. }
  5299. a.length && this.remove(a, i);
  5300. d.length && this.add(d, i);
  5301. return this
  5302. },
  5303. reset: function(c, i) {
  5304. i || (i = {});
  5305. i.parse && (c = this.parse(c, i));
  5306. for (var f = 0,
  5307. j = this.models.length; f < j; f++) this._removeReference(this.models[f]);
  5308. i.previousModels = this.models.slice();
  5309. this._reset();
  5310. c && this.add(c, q.extend({
  5311. silent: !0
  5312. },
  5313. i));
  5314. i.silent || this.trigger("reset", this, i);
  5315. return this
  5316. },
  5317. fetch: function(c) {
  5318. c = c ? q.clone(c) : {};
  5319. void 0 === c.parse && (c.parse = !0);
  5320. var i = c.success;
  5321. c.success = function(c, j, k) {
  5322. c[k.update ? "update": "reset"](j, k);
  5323. i && i(c, j, k)
  5324. };
  5325. return this.sync("read", this, c)
  5326. },
  5327. create: function(c, i) {
  5328. i = i ? q.clone(i) : {};
  5329. if (! (c = this._prepareModel(c, i))) return ! 1;
  5330. i.wait || this.add(c, i);
  5331. var f = this,
  5332. j = i.success;
  5333. i.success = function(c, b, d) {
  5334. d.wait && f.add(c, d);
  5335. j && j(c, b, d)
  5336. };
  5337. c.save(null, i);
  5338. return c
  5339. },
  5340. parse: function(c) {
  5341. return c
  5342. },
  5343. clone: function() {
  5344. return new this.constructor(this.models)
  5345. },
  5346. _reset: function() {
  5347. this.length = 0;
  5348. this.models.length = 0;
  5349. this._byId = {}
  5350. },
  5351. _prepareModel: function(c, i) {
  5352. if (c instanceof K) return c.collection || (c.collection = this),
  5353. c;
  5354. i || (i = {});
  5355. i.collection = this;
  5356. var f = new this.model(c, i);
  5357. return ! f._validate(c, i) ? !1 : f
  5358. },
  5359. _removeReference: function(c) {
  5360. this === c.collection && delete c.collection;
  5361. c.off("all", this._onModelEvent, this)
  5362. },
  5363. _onModelEvent: function(c, i, f, j) { ("add" === c || "remove" === c) && f !== this || ("destroy" === c && this.remove(i, j), i && c === "change:" + i.idAttribute && (delete this._byId[i.previous(i.idAttribute)], null != i.id && (this._byId[i.id] = i)), this.trigger.apply(this, arguments))
  5364. },
  5365. sortedIndex: function(c, i, f) {
  5366. i || (i = this.comparator);
  5367. var j = q.isFunction(i) ? i: function(c) {
  5368. return c.get(i)
  5369. };
  5370. return q.sortedIndex(this.models, c, j, f)
  5371. }
  5372. });
  5373. q.each("forEach each map collect reduce foldl inject reduceRight foldr find detect filter select reject every all some any include contains invoke max min toArray size first head take initial rest tail drop last without indexOf shuffle lastIndexOf isEmpty chain".split(" "),
  5374. function(c) {
  5375. Q.prototype[c] = function() {
  5376. var i = y.call(arguments);
  5377. i.unshift(this.models);
  5378. return q[c].apply(q, i)
  5379. }
  5380. });
  5381. q.each(["groupBy", "countBy", "sortBy"],
  5382. function(c) {
  5383. Q.prototype[c] = function(i, f) {
  5384. var j = q.isFunction(i) ? i: function(c) {
  5385. return c.get(i)
  5386. };
  5387. return q[c](this.models, j, f)
  5388. }
  5389. });
  5390. var Y = r.Router = function(c) {
  5391. c || (c = {});
  5392. c.routes && (this.routes = c.routes);
  5393. this._bindRoutes();
  5394. this.initialize.apply(this, arguments)
  5395. },
  5396. ea = /\((.*?)\)/g,
  5397. S = /(\(\?)?:\w+/g,
  5398. C = /\*\w+/g,
  5399. V = /[\-{}\[\]+?.,\\\^$|#\s]/g;
  5400. q.extend(Y.prototype, s, {
  5401. initialize: function() {},
  5402. route: function(c, i, f) {
  5403. q.isRegExp(c) || (c = this._routeToRegExp(c));
  5404. f || (f = this[i]);
  5405. r.history.route(c, q.bind(function(j) {
  5406. j = this._extractParameters(c, j);
  5407. f && f.apply(this, j);
  5408. this.trigger.apply(this, ["route:" + i].concat(j));
  5409. this.trigger("route", i, j);
  5410. r.history.trigger("route", this, i, j)
  5411. },
  5412. this));
  5413. return this
  5414. },
  5415. navigate: function(c, i) {
  5416. r.history.navigate(c, i);
  5417. return this
  5418. },
  5419. _bindRoutes: function() {
  5420. if (this.routes) for (var c, i = q.keys(this.routes); null != (c = i.pop());) this.route(c, this.routes[c])
  5421. },
  5422. _routeToRegExp: function(c) {
  5423. c = c.replace(V, "\\$&").replace(ea, "(?:$1)?").replace(S,
  5424. function(c, f) {
  5425. return f ? c: "([^/]+)"
  5426. }).replace(C, "(.*?)");
  5427. return RegExp("^" + c + "$")
  5428. },
  5429. _extractParameters: function(c, i) {
  5430. return c.exec(i).slice(1)
  5431. }
  5432. });
  5433. var D = r.History = function() {
  5434. this.handlers = [];
  5435. q.bindAll(this, "checkUrl");
  5436. "undefined" !== typeof window && (this.location = window.location, this.history = window.history)
  5437. },
  5438. w = /^[#\/]|\s+$/g,
  5439. aa = /^\/+|\/+$/g,
  5440. k = /msie [\w.]+/,
  5441. B = /\/$/;
  5442. D.started = !1;
  5443. q.extend(D.prototype, s, {
  5444. interval: 50,
  5445. getHash: function(c) {
  5446. return (c = (c || this).location.href.match(/#(.*)$/)) ? c[1] : ""
  5447. },
  5448. getFragment: function(c, i) {
  5449. if (null == c) if (this._hasPushState || !this._wantsHashChange || i) {
  5450. var c = this.location.pathname,
  5451. f = this.root.replace(B, "");
  5452. c.indexOf(f) || (c = c.substr(f.length))
  5453. } else c = this.getHash();
  5454. return c.replace(w, "")
  5455. },
  5456. start: function(c) {
  5457. if (D.started) throw Error("Backbone.history has already been started");
  5458. D.started = !0;
  5459. this.options = q.extend({},
  5460. {
  5461. root: "/"
  5462. },
  5463. this.options, c);
  5464. this.root = this.options.root;
  5465. this._wantsHashChange = !1 !== this.options.hashChange;
  5466. this._wantsPushState = !!this.options.pushState;
  5467. this._hasPushState = !(!this.options.pushState || !this.history || !this.history.pushState);
  5468. var c = this.getFragment(),
  5469. i = document.documentMode,
  5470. i = k.exec(navigator.userAgent.toLowerCase()) && (!i || 7 >= i);
  5471. this.root = ("/" + this.root + "/").replace(aa, "/");
  5472. i && this._wantsHashChange && (this.iframe = r.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow, this.navigate(c));
  5473. if (this._hasPushState) r.$(window).on("popstate", this.checkUrl);
  5474. else if (this._wantsHashChange && "onhashchange" in window && !i) r.$(window).on("hashchange", this.checkUrl);
  5475. else this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval));
  5476. this.fragment = c;
  5477. c = this.location;
  5478. i = c.pathname.replace(/[^\/]$/, "$&/") === this.root;
  5479. if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !i) return this.fragment = this.getFragment(null, !0),
  5480. this.location.replace(this.root + this.location.search + "#" + this.fragment),
  5481. !0;
  5482. this._wantsPushState && this._hasPushState && (i && c.hash) && (this.fragment = this.getHash().replace(w, ""), this.history.replaceState({},
  5483. document.title, this.root + this.fragment + c.search));
  5484. if (!this.options.silent) return this.loadUrl()
  5485. },
  5486. stop: function() {
  5487. r.$(window).off("popstate", this.checkUrl).off("hashchange", this.checkUrl);
  5488. clearInterval(this._checkUrlInterval);
  5489. D.started = !1
  5490. },
  5491. route: function(c, i) {
  5492. this.handlers.unshift({
  5493. route: c,
  5494. callback: i
  5495. })
  5496. },
  5497. checkUrl: function() {
  5498. var c = this.getFragment();
  5499. c === this.fragment && this.iframe && (c = this.getFragment(this.getHash(this.iframe)));
  5500. if (c === this.fragment) return ! 1;
  5501. this.iframe && this.navigate(c);
  5502. this.loadUrl() || this.loadUrl(this.getHash())
  5503. },
  5504. loadUrl: function(c) {
  5505. var i = this.fragment = this.getFragment(c);
  5506. return q.any(this.handlers,
  5507. function(c) {
  5508. if (c.route.test(i)) return c.callback(i),
  5509. !0
  5510. })
  5511. },
  5512. navigate: function(c, i) {
  5513. if (!D.started) return ! 1;
  5514. if (!i || !0 === i) i = {
  5515. trigger: i
  5516. };
  5517. c = this.getFragment(c || "");
  5518. if (this.fragment !== c) {
  5519. this.fragment = c;
  5520. var f = this.root + c;
  5521. if (this._hasPushState) this.history[!i.replace ? "replaceState": "pushState"]({},
  5522. document.title, f);
  5523. else if (this._wantsHashChange) this._updateHash(this.location, c, i.replace),
  5524. this.iframe && c !== this.getFragment(this.getHash(this.iframe)) && (i.replace || this.iframe.document.open().close(), this._updateHash(this.iframe.location, c, i.replace));
  5525. else return this.location.assign(f);
  5526. i.trigger && this.loadUrl(c)
  5527. }
  5528. },
  5529. _updateHash: function(c, i, f) {
  5530. f ? (f = c.href.replace(/(javascript:|#).*$/, ""), c.replace(f + "#" + i)) : c.hash = "#" + i
  5531. }
  5532. });
  5533. r.history = new D;
  5534. var U = r.View = function(c) {
  5535. this.cid = q.uniqueId("view");
  5536. this._configure(c || {});
  5537. this._ensureElement();
  5538. this.initialize.apply(this, arguments);
  5539. this.delegateEvents()
  5540. },
  5541. R = /^(\S+)\s*(.*)$/,
  5542. M = "model collection el id attributes className tagName events".split(" ");
  5543. q.extend(U.prototype, s, {
  5544. tagName: "div",
  5545. $: function(c) {
  5546. return this.$el.find(c)
  5547. },
  5548. initialize: function() {},
  5549. render: function() {
  5550. return this
  5551. },
  5552. remove: function() {
  5553. this.$el.remove();
  5554. this.stopListening();
  5555. return this
  5556. },
  5557. setElement: function(c, i) {
  5558. this.$el && this.undelegateEvents();
  5559. this.$el = c instanceof r.$ ? c: r.$(c);
  5560. this.el = this.$el[0]; ! 1 !== i && this.delegateEvents();
  5561. return this
  5562. },
  5563. delegateEvents: function(c) {
  5564. if (c || (c = q.result(this, "events"))) {
  5565. this.undelegateEvents();
  5566. for (var i in c) {
  5567. var f = c[i];
  5568. q.isFunction(f) || (f = this[c[i]]);
  5569. if (!f) throw Error('Method "' + c[i] + '" does not exist');
  5570. var j = i.match(R),
  5571. k = j[1],
  5572. j = j[2],
  5573. f = q.bind(f, this),
  5574. k = k + (".delegateEvents" + this.cid);
  5575. if ("" === j) this.$el.on(k, f);
  5576. else this.$el.on(k, j, f)
  5577. }
  5578. }
  5579. },
  5580. undelegateEvents: function() {
  5581. this.$el.off(".delegateEvents" + this.cid)
  5582. },
  5583. _configure: function(c) {
  5584. this.options && (c = q.extend({},
  5585. q.result(this, "options"), c));
  5586. q.extend(this, q.pick(c, M));
  5587. this.options = c
  5588. },
  5589. _ensureElement: function() {
  5590. if (this.el) this.setElement(q.result(this, "el"), !1);
  5591. else {
  5592. var c = q.extend({},
  5593. q.result(this, "attributes"));
  5594. this.id && (c.id = q.result(this, "id"));
  5595. this.className && (c["class"] = q.result(this, "className"));
  5596. c = r.$("<" + q.result(this, "tagName") + ">").attr(c);
  5597. this.setElement(c, !1)
  5598. }
  5599. }
  5600. });
  5601. var o = {
  5602. create: "POST",
  5603. update: "PUT",
  5604. patch: "PATCH",
  5605. "delete": "DELETE",
  5606. read: "GET"
  5607. };
  5608. r.sync = function(c, i, f) {
  5609. var j = o[c];
  5610. q.defaults(f || (f = {}), {
  5611. emulateHTTP: r.emulateHTTP,
  5612. emulateJSON: r.emulateJSON
  5613. });
  5614. var k = {
  5615. type: j,
  5616. dataType: "json"
  5617. };
  5618. f.url || (k.url = q.result(i, "url") || F());
  5619. if (null == f.data && i && ("create" === c || "update" === c || "patch" === c)) k.contentType = "application/json",
  5620. k.data = JSON.stringify(f.attrs || i.toJSON(f));
  5621. f.emulateJSON && (k.contentType = "application/x-www-form-urlencoded", k.data = k.data ? {
  5622. model: k.data
  5623. }: {});
  5624. if (f.emulateHTTP && ("PUT" === j || "DELETE" === j || "PATCH" === j)) {
  5625. k.type = "POST";
  5626. f.emulateJSON && (k.data._method = j);
  5627. var b = f.beforeSend;
  5628. f.beforeSend = function(a) {
  5629. a.setRequestHeader("X-HTTP-Method-Override", j);
  5630. if (b) return b.apply(this, arguments)
  5631. }
  5632. }
  5633. "GET" !== k.type && !f.emulateJSON && (k.processData = !1);
  5634. var d = f.success;
  5635. f.success = function(a) {
  5636. d && d(i, a, f);
  5637. i.trigger("sync", i, a, f)
  5638. };
  5639. var a = f.error;
  5640. f.error = function(b) {
  5641. a && a(i, b, f);
  5642. i.trigger("error", i, b, f)
  5643. };
  5644. c = f.xhr = r.ajax(q.extend(k, f));
  5645. i.trigger("request", i, c, f);
  5646. return c
  5647. };
  5648. r.ajax = function() {
  5649. return r.$.ajax.apply(r.$, arguments)
  5650. };
  5651. K.extend = Q.extend = Y.extend = U.extend = D.extend = function(c, i) {
  5652. var f = this,
  5653. j;
  5654. j = c && q.has(c, "constructor") ? c.constructor: function() {
  5655. return f.apply(this, arguments)
  5656. };
  5657. q.extend(j, f, i);
  5658. var k = function() {
  5659. this.constructor = j
  5660. };
  5661. k.prototype = f.prototype;
  5662. j.prototype = new k;
  5663. c && q.extend(j.prototype, c);
  5664. j.__super__ = f.prototype;
  5665. return j
  5666. };
  5667. var F = function() {
  5668. throw Error('A "url" property or function must be specified');
  5669. }
  5670. }).call(this); (function(j) {
  5671. function m(b, d, a) {
  5672. if (!a[0] || "object" == typeof a[0]) return d.init.apply(b, a);
  5673. if (d[a[0]]) return d[a[0]].apply(b, Array.prototype.slice.call(a, 1));
  5674. throw C(a[0] + " is not a method or property");
  5675. }
  5676. function s(b, d, a, c) {
  5677. return {
  5678. css: {
  5679. position: "absolute",
  5680. top: b,
  5681. left: d,
  5682. overflow: c || "hidden",
  5683. zIndex: a || "auto"
  5684. }
  5685. }
  5686. }
  5687. function x(b, d, a) {
  5688. var c = 1 - d,
  5689. g = c * c * c,
  5690. f = d * d * d;
  5691. return y(a, Math.round(g * b[0].x + 3 * d * c * c * b[1].x + 3 * d * d * c * b[2].x + f * b[3].x), Math.round(g * b[0].y + 3 * d * c * c * b[1].y + 3 * d * d * c * b[2].y + f * b[3].y))
  5692. }
  5693. function y(b, d, a) {
  5694. return {
  5695. corner: b,
  5696. x: d,
  5697. y: a
  5698. }
  5699. }
  5700. function u(b, d) {
  5701. return {
  5702. x: b,
  5703. y: d
  5704. }
  5705. }
  5706. function r(b, d, a) {
  5707. return w && a ? " translate3d(" + b + "px," + d + "px, 0px) ": " translate(" + b + "px, " + d + "px) "
  5708. }
  5709. function q(b, d, a) {
  5710. return w && a ? " scale3d(" + b + "," + d + ", 1) ": " scale(" + b + ", " + d + ") "
  5711. }
  5712. function N(b) {
  5713. return " rotate(" + b + "deg) "
  5714. }
  5715. function L(b, d) {
  5716. return Object.prototype.hasOwnProperty.call(d, b)
  5717. }
  5718. function J() {
  5719. for (var b = ["Moz", "Webkit", "Khtml", "O", "ms"], d = b.length, a = ""; d--;) b[d] + "Transform" in document.body.style && (a = "-" + b[d].toLowerCase() + "-");
  5720. return a
  5721. }
  5722. function K(b) {
  5723. var d = R ? u(b.originalEvent.touches[0].pageX, b.originalEvent.touches[0].pageY) : u(b.pageX, b.pageY);
  5724. d.time = (new Date).getTime();
  5725. d.target = b.target;
  5726. return d
  5727. }
  5728. function Q() {
  5729. return "WebKitCSSMatrix" in window || "MozPerspective" in document.body.style
  5730. }
  5731. function Y(b, d) {
  5732. var a, c, g = document.createElement("fakeelement"),
  5733. f = {
  5734. transition: "transitionend",
  5735. OTransition: "oTransitionEnd",
  5736. MSTransition: "transitionend",
  5737. MozTransition: "transitionend",
  5738. WebkitTransition: "webkitTransitionEnd"
  5739. };
  5740. for (a in f) if (void 0 !== g.style[a]) {
  5741. c = f[a];
  5742. break
  5743. }
  5744. b && (c ? b.bind(c,
  5745. function() {
  5746. b.unbind(c);
  5747. d.call(b)
  5748. }) : setTimeout(function() {
  5749. d.call(b)
  5750. },
  5751. Math.ceil(1E3 * parseFloat(b.css(J() + "transition-duration")))));
  5752. return c
  5753. }
  5754. function ea(b) {
  5755. var d;
  5756. "-webkit-" == k ? d = b ? "-webkit-gradient(linear, left top, right top,color-stop(0, rgba(0,0,0,0)),color-stop(0.3, rgba(0,0,0, 0.3)),color-stop(0.5, rgba(0,0,0, 0.8))": "-webkit-gradient(linear, left top, right top,color-stop(0, rgba(0,0,0,0)),color-stop(0.2, rgba(0,0,0,0.5)),color-stop(0.2, rgba(0,0,0,0.6)),color-stop(0.4, rgba(0,0,0,0.2)),color-stop(1, rgba(0,0,0,0))": (d = k + "linear-gradient(left, ", d = b ? d + "rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 30%,rgba(0,0,0,0.8) 50%": d + "rgba(0,0,0,0) 0%,rgba(0,0,0,0.2) 20%,rgba(0,0,0,0.6) 20%,rgba(0,0,0,0.2) 40%,rgba(0,0,0,0) 100%");
  5757. return d + ")"
  5758. }
  5759. function S(b, d, a) {
  5760. b = j.Event(b);
  5761. d.trigger(b, a);
  5762. return b.isDefaultPrevented() ? c.prevented: b.isPropagationStopped() ? c.stopped: ""
  5763. }
  5764. function C(b) {
  5765. function d(a) {
  5766. this.name = "TurnJsError";
  5767. this.message = a
  5768. }
  5769. d.prototype = Error();
  5770. d.prototype.constructor = d;
  5771. return new d(b)
  5772. }
  5773. function V(b) {
  5774. var d = {
  5775. width: b.width,
  5776. height: b.height
  5777. };
  5778. if (d.width > b.boundWidth || d.height > b.boundHeight) {
  5779. var a = d.width / d.height;
  5780. b.boundWidth / a > b.boundHeight && b.boundHeight * a <= b.boundWidth ? (d.width = Math.round(b.boundHeight * a), d.height = b.boundHeight) : (d.width = b.boundWidth, d.height = Math.round(b.boundWidth / a))
  5781. }
  5782. return d
  5783. }
  5784. function D(b, d, a) {
  5785. var c = b.data("events")[d],
  5786. g = [];
  5787. j.each(c,
  5788. function(a, b) {
  5789. g.push(b.handler)
  5790. });
  5791. a && b.unbind(d);
  5792. return g
  5793. }
  5794. var w, aa, k, B = Math.PI,
  5795. U = B / 2,
  5796. R = "ontouchstart" in window,
  5797. M = {
  5798. backward: ["bl", "tl", "l"],
  5799. forward: ["br", "tr", "r"],
  5800. all: "tl bl tr br l r".split(" ")
  5801. },
  5802. o = {
  5803. single: 1,
  5804. "double": 2
  5805. },
  5806. F = {
  5807. ltr: 1,
  5808. rtl: 2
  5809. },
  5810. c = {
  5811. prevented: 1,
  5812. stopped: 2
  5813. },
  5814. i = {
  5815. acceleration: !0,
  5816. autoScroll: !0,
  5817. cacheSize: 6,
  5818. cornerSize: 50,
  5819. cornerPosition: "50px 50px",
  5820. defaultZoomMargin: "0px 0px",
  5821. display: "double",
  5822. duration: 600,
  5823. easing: function(b, d, a, c) {
  5824. var c = (b /= c) * b,
  5825. g = c * b;
  5826. return d + a * ( - 1.95 * g * c + 7.8 * c * c + -10.7 * g + 4.8 * c + 1.05 * b)
  5827. },
  5828. elevation: "10%",
  5829. hover: !0,
  5830. ignoreElements: "[ignore=1]",
  5831. page: 1,
  5832. smartFlip: !1,
  5833. swipe: !0,
  5834. responsive: !1,
  5835. gradients: !0,
  5836. turnCorners: "bl,br",
  5837. events: null
  5838. },
  5839. f = {
  5840. init: function(b) {
  5841. if (this.turn("is")) return this.turn("options", b);
  5842. w = Q();
  5843. var d;
  5844. aa = (d = /AppleWebkit\/([0-9\.]+)/i.exec(navigator.userAgent)) ? 534.3 < parseFloat(d[1]) : !0;
  5845. k = J();
  5846. d = {};
  5847. var a = this.children(),
  5848. c = 0,
  5849. b = j.extend({
  5850. width: this.width(),
  5851. height: this.height(),
  5852. direction: this.attr("dir") || this.css("direction") || "ltr",
  5853. viewer: this.parent()
  5854. },
  5855. i, b),
  5856. g = b.cornerPosition.split(" ");
  5857. b.cornerPosition = u(parseInt(g[0], 10), parseInt(g[1], 10));
  5858. d.options = b;
  5859. d.dynamicMode = !1;
  5860. d.turningPage = !1;
  5861. d.pageObjs = {};
  5862. d.pages = {};
  5863. d.pageWrap = {};
  5864. d.pageMv = [];
  5865. d.front = [];
  5866. d.scroll = {
  5867. left: 0,
  5868. top: 0
  5869. };
  5870. d.margins = [0, 0, 0, 0];
  5871. d.zoom = 1;
  5872. d.totalPages = b.pages || 0;
  5873. d.eventHandlers = {
  5874. touchMove: j.proxy(f._touchMove, this),
  5875. touchEnd: j.proxy(f._touchEnd, this),
  5876. start: j.proxy(f._eventStart, this)
  5877. };
  5878. this.data("t", d);
  5879. b.when && (b.events = b.when);
  5880. if (b.events) for (var l in b.events) L(l, b.events) && this.bind(l, b.events[l]);
  5881. this.css({
  5882. position: "relative",
  5883. width: b.width,
  5884. height: b.height
  5885. });
  5886. R ? this.addClass("touch") : this.addClass("no-touch");
  5887. this.turn("display", b.display);
  5888. "" !== b.direction && this.turn("direction", b.direction);
  5889. for (l = 0; l < a.length; l++) j(a[l]).is(b.ignoreElements) || this.turn("addPage", a[l], ++c);
  5890. d.dynamicMode = 0 === c;
  5891. this.bind("press", f._touchStart).bind("end", f._eventEnd).bind("swipe", f._eventSwipe).bind("flip", f._eventFlip);
  5892. this.parent().bind("start", d.eventHandlers.start);
  5893. j(document).bind("moving", d.eventHandlers.touchMove).bind("unpress", d.eventHandlers.touchEnd);
  5894. f._resizeObserver.call(this);
  5895. this.turn("page", b.page);
  5896. d.done = !0;
  5897. b.slider && (b.events && b.events.newThumbnail && (j(b.slider).bind("newThumbnail", b.events.newThumbnail), delete b.events.newThumbnail), d.slider = b.slider, j(b.slider).tslider({
  5898. flipbook: this
  5899. }));
  5900. return this
  5901. },
  5902. addPage: function(b, d, a) {
  5903. var c, g = !1,
  5904. l = this.data("t"),
  5905. i = l.totalPages + 1;
  5906. if (l.destroying) return null;
  5907. if (c = /\bp([0-9]+)\b/.exec(j(b).attr("class"))) d = parseInt(c[1], 10);
  5908. if (d) if (d == i) g = !0;
  5909. else {
  5910. if (d > i) throw C('Page "' + d + '" cannot be inserted');
  5911. } else d = i,
  5912. g = !0;
  5913. 1 <= d && d <= i && (c = l.display == o["double"] ? d % 2 ? " odd": " even": " odd", d in l.pageObjs && f._movePages.call(this, d, 1), g && (l.totalPages = i), l.pageObjs[d] = j(b).css({
  5914. "float": "left"
  5915. }).addClass("page p" + d + c), a && l.pageObjs[d].data({
  5916. f: a
  5917. }), -1 != navigator.userAgent.indexOf("MSIE 9.0") && l.pageObjs[d].hasClass("hard") && l.pageObjs[d].removeClass("hard"), f._addPage.call(this, d), f._removeFromDOM.call(this));
  5918. return this
  5919. },
  5920. _backPage: function(b) {
  5921. var d = this.data("t");
  5922. b ? d.pageObjs[0] || (b = j("<div />"), d.pageObjs[0] = j(b).css({
  5923. "float": "left"
  5924. }).addClass("page p0"), f._addPage.call(this, 0)) : d.pageObjs[0] && f._removePageFromDOM.call(this, 0, !0)
  5925. },
  5926. _addPage: function(b) {
  5927. var d = this.data("t"),
  5928. a = d.pageObjs[b];
  5929. if (a && f._necessPage.call(this, b)) {
  5930. if (!d.pageWrap[b]) {
  5931. d.pageWrap[b] = j("<div/>", {
  5932. "class": "page-wrapper",
  5933. page: b,
  5934. css: {
  5935. position: "absolute",
  5936. overflow: "hidden"
  5937. }
  5938. });
  5939. this.append(d.pageWrap[b]);
  5940. d.pageObjs[b].appendTo(d.pageWrap[b]);
  5941. var c = f._pageSize.call(this, b, !0);
  5942. a.css({
  5943. width: c.width,
  5944. height: c.height
  5945. });
  5946. d.pageWrap[b].css(c)
  5947. }
  5948. f._makeFlip.call(this, b)
  5949. }
  5950. },
  5951. addHtml: function() {
  5952. if (!window.Regions) throw C("Regions has not been loaded yet");
  5953. },
  5954. hasPage: function(b) {
  5955. return L(b, this.data("t").pageObjs)
  5956. },
  5957. center: function(b) {
  5958. var d = this.data("t"),
  5959. a = j(this).turn("size"),
  5960. c = 0;
  5961. d.noCenter || (d.display == o["double"] && (b = this.turn("view", b || d.tpage || d.page), d.direction == F.ltr ? b[0] ? b[1] || (c += a.width / 4) : c -= a.width / 4 : b[0] ? b[1] || (c -= a.width / 4) : c += a.width / 4), j(this).css({
  5962. marginLeft: c
  5963. }));
  5964. return this
  5965. },
  5966. destroy: function() {
  5967. var b = this,
  5968. d = this.data("t"),
  5969. a = "end first flip last start turning turned zooming missing".split(" ");
  5970. if (S("destroy", this) != c.prevented) {
  5971. d.destroying = !0;
  5972. j.each(a,
  5973. function(a, d) {
  5974. b.unbind(d)
  5975. });
  5976. this.unbind("press", f._touchStart);
  5977. this.parent().unbind("start", d.eventHandlers.start);
  5978. for (j(document).unbind("moving", d.eventHandlers.touchMove).unbind("unpress", d.eventHandlers.touchEnd); 0 !== d.totalPages;) this.turn("removePage", d.totalPages);
  5979. d.fparent && d.fparent.remove();
  5980. d.shadow && d.shadow.remove();
  5981. this.removeData();
  5982. d = null
  5983. }
  5984. return this
  5985. },
  5986. effect: function(b, d) {
  5987. var a = this.data("t"),
  5988. c;
  5989. if (c = a.pageObjs[b]) {
  5990. if (void 0 === d) return c.hasClass("hard") ? "hard": "sheet";
  5991. var g = a.dynamicMode;
  5992. a.dynamicMode = !1;
  5993. switch (d) {
  5994. case "hard":
  5995. c.removeClass("sheet");
  5996. c.addClass("hard");
  5997. f._removePageFromDOM.call(this, b);
  5998. break;
  5999. case "sheet":
  6000. c.removeClass("hard"),
  6001. c.addClass("sheet"),
  6002. f._removePageFromDOM.call(this, b)
  6003. }
  6004. a.dynamicMode = g;
  6005. f._necessPage.call(this, b) && f._addPage.call(this, b);
  6006. return this
  6007. }
  6008. throw C('Page "' + b + '" is not loaded yet');
  6009. },
  6010. is: function() {
  6011. return "object" == typeof this.data("t")
  6012. },
  6013. _pageSize: function(b, d) {
  6014. var a = this.data("t"),
  6015. c = {};
  6016. if (a.display == o.single) c.width = this.width(),
  6017. c.height = this.height(),
  6018. d && (c.top = 0, c.left = 0, c.right = "auto");
  6019. else {
  6020. var g = Math.floor(this.width() / 2),
  6021. f = this.height();
  6022. a.pageObjs[b].hasClass("own-size") ? (c.width = a.pageObjs[b].width(), c.height = a.pageObjs[b].height()) : (c.width = g, c.height = f);
  6023. if (d) {
  6024. var i = b % 2;
  6025. c.top = (f - c.height) / 2;
  6026. a.direction == F.ltr ? (c[i ? "right": "left"] = g - c.width, c[i ? "left": "right"] = "auto") : (c[i ? "left": "right"] = g - c.width, c[i ? "right": "left"] = "auto")
  6027. }
  6028. }
  6029. return c
  6030. },
  6031. _makeFlip: function(b) {
  6032. var d = this.data("t");
  6033. if (!d.pages[b]) {
  6034. var a = d.display == o.single,
  6035. c = b % 2;
  6036. d.pages[b] = d.pageObjs[b].css(f._pageSize.call(this, b)).flip({
  6037. page: b,
  6038. next: c || a ? b + 1 : b - 1
  6039. });
  6040. d.disabled && d.pages[b].flip("disable", !0);
  6041. f._setPageLoc.call(this, b)
  6042. }
  6043. return d.pages[b]
  6044. },
  6045. _makeRange: function() {
  6046. var b, d;
  6047. if (! (1 > this.data("t").totalPages)) {
  6048. d = this.turn("range");
  6049. for (b = d[0]; b <= d[1]; b++) f._addPage.call(this, b)
  6050. }
  6051. },
  6052. range: function(b) {
  6053. var d, a, c, g = this.data("t"),
  6054. b = b || g.tpage || g.page || 1;
  6055. c = f._view.call(this, b);
  6056. if (1 > b || b > g.totalPages) throw C('"' + b + '" is not a valid page');
  6057. c[1] = c[1] || c[0];
  6058. 1 <= c[0] && c[1] <= g.totalPages ? (b = Math.floor((g.options.cacheSize - 2) / 2), g.totalPages - c[1] > c[0] ? (d = Math.min(c[0] - 1, b), a = 2 * b - d) : (a = Math.min(g.totalPages - c[1], b), d = 2 * b - a)) : (d = g.options.cacheSize - 1, a = g.options.cacheSize - 1);
  6059. return [Math.max(1, c[0] - d), Math.min(g.totalPages, c[1] + a)]
  6060. },
  6061. _necessPage: function(b) {
  6062. if (0 === b) return ! 0;
  6063. var d = this.data("t"),
  6064. a = d.range || this.turn("range");
  6065. return d.pageObjs[b].hasClass("fixed") || -1 != d.pageMv.indexOf(b) || -1 != d.front.indexOf(b) || b >= a[0] && b <= a[1]
  6066. },
  6067. _removeFromDOM: function() {
  6068. if (!this.turn("animating")) {
  6069. var b = this.data("t"),
  6070. d;
  6071. for (d in b.pageWrap) L(d, b.pageWrap) && (f._necessPage.call(this, parseInt(d, 10)) || f._removePageFromDOM.call(this, d))
  6072. }
  6073. },
  6074. pageData: function(b, d) {
  6075. var a = this.data("t");
  6076. if (void 0 === d) return a.pageObjs[b].data("f");
  6077. a.pageObjs[b].data("f", d)
  6078. },
  6079. _removePageFromDOM: function(b, d) {
  6080. var a = this.data("t"),
  6081. h = a.pageObjs,
  6082. g = a.pages;
  6083. if (!b || S("removePage", this, [b, h[b]]) != c.prevented) {
  6084. if (a.pages[b]) {
  6085. p._bringClipToFront.call(g[b], !1);
  6086. var f = a.pages[b].data();
  6087. f.f && f.f.clip && f.f.clip.remove();
  6088. g[b].removeData();
  6089. g[b].detach();
  6090. delete g[b]
  6091. }
  6092. h[b] && h[b].detach();
  6093. a.pageWrap[b] && (a.pageWrap[b].remove(), delete a.pageWrap[b]); (a.dynamicMode || d) && delete h[b];
  6094. return ! 0
  6095. }
  6096. return ! 1
  6097. },
  6098. removePage: function(b) {
  6099. var d = this.data("t");
  6100. if ("*" == b) for (; 0 !== d.totalPages;) this.turn("removePage", d.totalPages);
  6101. else {
  6102. if (1 > b || b > d.totalPages) throw C("The page " + b + " doesn't exist");
  6103. if (d.pageObjs[b] && (this.turn("stop"), !f._removePageFromDOM.call(this, b, !0))) return ! 1;
  6104. f._movePages.call(this, b, -1);
  6105. d.totalPages -= 1;
  6106. d.page > d.totalPages ? (d.page = null, f._fitPage.call(this, d.totalPages)) : (f._makeRange.call(this), this.turn("update"))
  6107. }
  6108. return this
  6109. },
  6110. _movePages: function(b, d) {
  6111. var a, c = this,
  6112. g = this.data("t"),
  6113. l = g.display == o.single,
  6114. i = function(a) {
  6115. var b = a + d,
  6116. i = b % 2,
  6117. j = i ? " odd ": " even ";
  6118. g.pageObjs[a] && (g.pageObjs[b] = g.pageObjs[a].removeClass("p" + a + " odd even").addClass("p" + b + j));
  6119. if (g.pageWrap[a] && (g.pageWrap[b] = g.pageObjs[b].hasClass("fixed") ? g.pageWrap[a].attr("page", b) : g.pageWrap[a].css(f._pageSize.call(c, b, !0)).attr("page", b), g.pages[a] && (g.pages[b] = g.pages[a], g.pages[b].data("f").page = b, g.pages[b].data("f").next = l || i ? b + 1 : b - 1), d)) delete g.pages[a],
  6120. delete g.pageObjs[a],
  6121. delete g.pageWrap[a]
  6122. };
  6123. if (0 < d) for (a = g.totalPages; a >= b; a--) i(a);
  6124. else for (a = b; a <= g.totalPages; a++) i(a)
  6125. },
  6126. display: function(b) {
  6127. var d = this.data("t"),
  6128. a;
  6129. d.display && (a = 1 == d.display ? "single": "double");
  6130. if (void 0 === b) return a;
  6131. if (1 == d.zoom && b != a) {
  6132. if (!o[b]) throw C('"' + b + '" is not a value for display');
  6133. var h = S("changeDisplay", this, [b, a]);
  6134. if (!d.done || h != c.prevented) {
  6135. switch (b) {
  6136. case "single":
  6137. f._backPage.call(this, !0);
  6138. this.addClass("shadow");
  6139. break;
  6140. case "double":
  6141. f._backPage.call(this, !1),
  6142. this.removeClass("shadow")
  6143. }
  6144. d.display = o[b];
  6145. a && (h = this.turn("size"), f._movePages.call(this, 1, 0), this.turn("size", h.width, h.height), this.turn("update"), this.removeClass(a))
  6146. }
  6147. this.addClass(b);
  6148. f._cloneView.call(this, !1);
  6149. d.slider && v._resize.call(j(d.slider));
  6150. return this
  6151. }
  6152. },
  6153. direction: function(b) {
  6154. var d = this.data("t"),
  6155. a;
  6156. d.direction && (a = 1 == d.direction ? "ltr": "rtl");
  6157. if (void 0 === b) return a;
  6158. b = b.toLowerCase();
  6159. if (!F[b]) throw C('"' + b + '" is not a value for direction');
  6160. "rtl" == b && j(this).attr("dir", "ltr").css({
  6161. direction: "ltr"
  6162. });
  6163. d.direction = F[b];
  6164. d.done && this.turn("size", j(this).width(), j(this).height());
  6165. return this
  6166. },
  6167. animating: function() {
  6168. var b = this.data("t");
  6169. return 0 < b.pageMv.length || "turning" == b.status
  6170. },
  6171. isFlipping: function() {
  6172. var b = this.data("t"),
  6173. d;
  6174. for (d in b.pages) if (L(d, b.pages) && b.pages[d].flip("isTurning")) return ! 0;
  6175. return ! 1
  6176. },
  6177. corner: function() {
  6178. return this.data("t").corner || null
  6179. },
  6180. data: function() {
  6181. return this.data("t")
  6182. },
  6183. disable: function(b) {
  6184. var d, a = this.data("t"),
  6185. c = this.turn("view");
  6186. a.disabled = void 0 === b || !0 === b;
  6187. for (d in a.pages) L(d, a.pages) && a.pages[d].flip("disable", a.disabled ? !0 : -1 == j.inArray(parseInt(d, 10), c));
  6188. return this
  6189. },
  6190. disabled: function(b) {
  6191. return void 0 === b ? !0 === this.data("t").disabled: this.turn("disable", b)
  6192. },
  6193. viewSize: function() {
  6194. var b = this.turn("size");
  6195. if (this.turn("display") == o["double"]) {
  6196. var d = this.turn("view");
  6197. if (!d[0] || !d[1]) b.width = Math.floor(b.width / 2)
  6198. }
  6199. return b
  6200. },
  6201. size: function(b, d) {
  6202. if (void 0 === b || void 0 === d) return {
  6203. width: this.width(),
  6204. height: this.height()
  6205. };
  6206. var a = this.data("t"),
  6207. c,
  6208. g;
  6209. this.turn("stop");
  6210. this.css({
  6211. width: b,
  6212. height: d
  6213. });
  6214. if (1 < a.zoom) for (var l = this.turn("view"), i = 0; i < l.length; i++) {
  6215. if (c = l[i]) g = f._pageSize.call(this, c, !0),
  6216. a.pageObjs[c].css({
  6217. width: g.width,
  6218. height: g.height
  6219. }),
  6220. a.pageWrap[c].css(g),
  6221. a.pages[c] && (p._restoreClip.call(a.pages[c], !1, !0), a.pages[c].flip("resize").css({
  6222. width: g.width,
  6223. height: g.height
  6224. }))
  6225. } else for (c in a.pageWrap) L(c, a.pageWrap) && (g = f._pageSize.call(this, c, !0), a.pageObjs[c].css({
  6226. width: g.width,
  6227. height: g.height
  6228. }), a.pageWrap[c].css(g), a.pages[c] && (p._restoreClip.call(a.pages[c]), a.pages[c].flip("resize").css({
  6229. width: g.width,
  6230. height: g.height
  6231. })));
  6232. a.pages[0] && (a.pageWrap[0].css({
  6233. left: -this.width()
  6234. }), a.pages[0].flip("resize"));
  6235. f._updateShadow.call(this);
  6236. a.options.autoCenter && this.turn("center");
  6237. this.css(f._position.call(this));
  6238. a.pages[0] && (c = a.pages[0].data("f").tPage) && a.pageObjs[0].children().eq(0).css({
  6239. width: a.pageObjs[c].width(),
  6240. height: a.pageObjs[c].height()
  6241. });
  6242. a.peel && this.turn("peel", a.peel.corner, a.peel.x, a.peel.y, !1);
  6243. return this
  6244. },
  6245. _size: function(b, d) {
  6246. var a = f._defaultSize.call(this);
  6247. a.width *= b;
  6248. a.height *= b;
  6249. d && f._halfWidth.call(this) && (a.width = Math.floor(a.width / 2));
  6250. return a
  6251. },
  6252. _position: function(b) {
  6253. var d = this.data("t"),
  6254. a = b ? f._size.call(this, b) : this.turn("size"),
  6255. c = {
  6256. top: 0,
  6257. left: 0
  6258. };
  6259. if (d.options.responsive && (c.top = d.viewerHeight / 2 - a.height / 2, c.left = d.viewerWidth / 2 - a.width / 2, 1 == (b || d.zoom))) {
  6260. b = d.margins;
  6261. if (c.top < b[0] || c.top + a.height > d.viewerHeight - b[2]) c.top = b[0];
  6262. if (c.left < b[1] || c.left + a.width > d.viewerWidth - b[3]) c.left = b[1]
  6263. }
  6264. return c
  6265. },
  6266. _view: function(b) {
  6267. var d = this.data("t"),
  6268. b = b || d.page;
  6269. return d.display == o["double"] ? b % 2 ? [b - 1, b] : [b, b + 1] : [b]
  6270. },
  6271. view: function(b, d) {
  6272. var a = this.data("t"),
  6273. c = f._view.call(this, b),
  6274. g = [];
  6275. a.display == o["double"] ? d ? (0 < c[0] && g.push(c[0]), c[1] <= a.totalPages && g.push(c[1])) : (0 < c[0] ? g.push(c[0]) : g.push(0), c[1] <= a.totalPages ? g.push(c[1]) : g.push(0)) : d ? 0 < c[0] && c[0] <= a.totalPages && g.push(c[0]) : 0 < c[0] && c[0] <= a.totalPages ? g.push(c[0]) : g.push(0);
  6276. return g
  6277. },
  6278. stop: function() {
  6279. var b = this.data("t"),
  6280. d,
  6281. a;
  6282. if (this.turn("animating")) {
  6283. var c = b.display == o.single;
  6284. b.tpage && (b.page = b.tpage, delete b.tpage);
  6285. for (; 0 < b.pageMv.length;) if (a = b.pages[b.pageMv[0]], d = a.data("f")) {
  6286. var g = d.peel;
  6287. d.peel = null;
  6288. a.flip("hideFoldedPage");
  6289. d.peel = g;
  6290. d.next = c ? d.page + 1 : 0 === d.page % 2 ? d.page - 1 : d.page + 1;
  6291. p._bringClipToFront.call(a, !1)
  6292. }
  6293. b.status = "";
  6294. this.turn("update")
  6295. }
  6296. return this
  6297. },
  6298. pages: function(b) {
  6299. var d = this.data("t");
  6300. if (b) {
  6301. if (b < d.totalPages) for (var a = d.totalPages; a > b; a--) this.turn("removePage", a);
  6302. d.totalPages = b;
  6303. f._fitPage.call(this, d.page);
  6304. return this
  6305. }
  6306. return d.totalPages
  6307. },
  6308. _missing: function(b) {
  6309. var d = this.data("t");
  6310. if (! (1 > d.totalPages)) {
  6311. for (var a = this.turn("range", b), c = [], b = a[0]; b <= a[1]; b++) d.pageObjs[b] || c.push(b);
  6312. 0 < c.length && this.trigger("missing", [c])
  6313. }
  6314. },
  6315. _fitPage: function(b) {
  6316. var d = this.data("t"),
  6317. a = this.turn("view", b);
  6318. d.range = this.turn("range", b);
  6319. f._missing.call(this, b);
  6320. d.pageObjs[b] && ( - 1 != j.inArray(1, a) ? this.addClass("first-page") : this.removeClass("first-page"), -1 != j.inArray(d.totalPages, a) ? this.addClass("last-page") : this.removeClass("last-page"), d.status = "", d.peel = null, d.page = b, d.display != o.single && this.turn("stop"), f._removeFromDOM.call(this), f._makeRange.call(this), f._updateShadow.call(this), f._cloneView.call(this, !1), this.trigger("turned", [b, a]), this.turn("update"), d.options.autoCenter && this.turn("center"))
  6321. },
  6322. _turnPage: function(b, d) {
  6323. var a, h, g = this.data("t"),
  6324. l = this.turn("view"),
  6325. i = this.turn("view", b);
  6326. g.display == o.single ? (a = l[0], h = i[0]) : l[1] && b > l[1] ? (a = l[1], h = i[0]) : l[0] && b < l[0] && (a = l[0], h = i[1]);
  6327. var k = g.options.turnCorners.split(","),
  6328. m = g.pages[a].data("f"),
  6329. p = m.dpoint;
  6330. d || (d = "hard" == m.effect ? g.direction == F.ltr ? b > a ? "r": "l": b > a ? "l": "r": g.direction == F.ltr ? j.trim(k[b > a ? 1 : 0]) : j.trim(k[b > a ? 0 : 1]));
  6331. if (g.page != b) {
  6332. if (S("turning", this, [b, i, d]) == c.prevented) { - 1 != j.inArray(a, g.pageMv) && g.pages[a].flip("hideFoldedPage", !0);
  6333. return
  6334. } - 1 != j.inArray(1, i) ? (this.addClass("first-page"), this.trigger("first")) : this.removeClass("first-page"); - 1 != j.inArray(g.totalPages, i) ? (this.addClass("last-page"), this.trigger("last")) : this.removeClass("last-page")
  6335. }
  6336. g.status = "turning";
  6337. g.range = this.turn("range", b);
  6338. f._missing.call(this, b);
  6339. g.pageObjs[b] && (f._cloneView.call(this, !1), Math.abs((g.tpage || g.page) - b) > l.length && this.turn("stop"), g.page = b, f._makeRange.call(this), g.tpage = h, m.dpoint = m.next != h ? null: p, m.next = h, -1 == g.pageMv.indexOf(h) ? g.pages[a].flip("turnPage", d) : (g.options.autoCenter && this.turn("center", h), g.status = "", g.pages[h].flip("hideFoldedPage", !0)), this.turn("update"))
  6340. },
  6341. page: function(b) {
  6342. var d = this.data("t");
  6343. if (void 0 === b) return d.page;
  6344. 1 < this.turn("zoom") && this.turn("zoomOut", {
  6345. animate: !1
  6346. });
  6347. if (!d.disabled && !d.destroying) {
  6348. b = parseInt(b, 10);
  6349. if (0 < b && b <= d.totalPages) return b != d.page && (!d.done || -1 != j.inArray(b, this.turn("view")) ? f._fitPage.call(this, b) : f._turnPage.call(this, b)),
  6350. this;
  6351. throw C("The page " + b + " does not exist");
  6352. }
  6353. },
  6354. pageElement: function(b) {
  6355. return this.data("t").pageObjs[b]
  6356. },
  6357. next: function() {
  6358. return this.turn("page", Math.min(this.data("t").totalPages, f._view.call(this, this.data("t").page).pop() + 1))
  6359. },
  6360. previous: function() {
  6361. return this.turn("page", Math.max(1, f._view.call(this, this.data("t").page).shift() - 1))
  6362. },
  6363. peel: function(b, d, a, c) {
  6364. var g = this.data("t");
  6365. if (b) {
  6366. if (1 == this.turn("zoom")) if (c = void 0 !== c ? c: !0, g.display == o.single) g.peel = y(b, d, a),
  6367. g.pages[g.page].flip("peel", y(b, d, a), c);
  6368. else {
  6369. var f = this.turn("view"),
  6370. f = -1 != j.inArray(b, M.backward) ? f[0] : f[1];
  6371. g.pages[f] && (g.peel = y(b, d, a), g.pages[f].flip("peel", g.peel, c))
  6372. }
  6373. } else g.peel = null,
  6374. this.turn("stop", !0);
  6375. return this
  6376. },
  6377. _eventStart: function(b, d, a) {
  6378. d = j(b.target).data("f");
  6379. b.isDefaultPrevented() || (b = d.turnData, b.display == o.single && a && (d.next = "l" == a.charAt(1) && b.direction == F.ltr || "r" == a.charAt(1) && b.direction == F.rtl ? d.next < d.page ? d.next: d.page - 1 : d.next > d.page ? d.next: d.page + 1));
  6380. f._updateShadow.call(d.turn)
  6381. },
  6382. _eventEnd: function(b, d, a) {
  6383. var c = j(b.target),
  6384. b = c.data("f"),
  6385. g = b.turn,
  6386. l = b.turnData;
  6387. if (a || !b.peel || b.peel.corner != b.dpoint.corner) c.flip("hide"),
  6388. l.front.splice(l.front.indexOf(parseInt(b.next, 10)), 1),
  6389. l.pageMv.splice(l.pageMv.indexOf(parseInt(b.page, 10)), 1),
  6390. 0 === l.front.length && (l.corner = null);
  6391. a ? (d = l.tpage || l.page, d == b.next || d == b.page ? (delete l.tpage, f._fitPage.call(g, d || b.next, !0)) : l.pageWrap[b.page].hide()) : l.display == o.single && d == l.tpage ? (delete l.tpage, f._fitPage.call(g, d, !0)) : (g.turn("update"), f._updateShadow.call(g))
  6392. },
  6393. _eventFlip: function(b) {
  6394. var d = j(b.target).data("f");
  6395. b.stopPropagation();
  6396. d.turn.trigger("turn", [d.next]);
  6397. d.turnData.options.autoCenter && d.turn.turn("center", d.next)
  6398. },
  6399. _touchStart: function(b) {
  6400. var d = j(this),
  6401. a = d.data("t");
  6402. j(b.target);
  6403. a.finger = K(b);
  6404. a.fingerZoom = a.zoom;
  6405. for (var c in a.pages) if (L(c, a.pages) && p._start.call(a.pages[c], b)) {
  6406. a.tmpListeners || (a.tmpListeners = {},
  6407. a.tmpListeners.tap = D(d, "tap", !0), a.tmpListeners.doubleTap = D(d, "doubleTap", !0));
  6408. b.preventDefault();
  6409. return
  6410. }
  6411. a.options.smartFlip && b.preventDefault()
  6412. },
  6413. _touchMove: function(b) {
  6414. var d = this.data("t"),
  6415. a;
  6416. for (a in d.pages) L(a, d.pages) && p._move.call(d.pages[a], b);
  6417. if (d.finger) a = j.extend({},
  6418. d.finger),
  6419. d.tmpListeners || (d.tmpListeners = {},
  6420. d.tmpListeners.tap = D(this, "tap", !0), d.tmpListeners.doubleTap = D(this, "doubleTap", !0)),
  6421. d.finger = K(b),
  6422. d.finger.prev = a,
  6423. 1 < d.zoom && (!R || R && 1 == b.originalEvent.touches.length) && this.turn("scroll", d.scroll.left + a.x - d.finger.x, d.scroll.top + a.y - d.finger.y);
  6424. else if (!R && 1 < d.zoom && d.options.autoScroll) {
  6425. d.initScroll || (d.initScroll = this.turn("scroll"), d.initCursor = K(b));
  6426. b = K(b);
  6427. a = u(d.initScroll.x, d.initScroll.y);
  6428. var c = this.turn("scrollSize");
  6429. b.x < d.initCursor.x ? a.x = d.initScroll.left * (b.x / d.initCursor.x) : b.x > d.initCursor.x && (a.x = d.initScroll.left + (c.width - d.initScroll.left) * ((b.x - d.initCursor.x) / (d.viewerWidth - d.initCursor.x)));
  6430. b.y < d.initCursor.y ? a.y = d.initScroll.top * (b.y / d.initCursor.y) : b.y > d.initCursor.y && (a.y = d.initScroll.top + (c.height - d.initScroll.top) * ((b.y - d.initCursor.y) / (d.viewerHeight - d.initCursor.y)));
  6431. this.turn("scroll", a.x, a.y)
  6432. }
  6433. },
  6434. _touchEnd: function(b) {
  6435. var d = this.data("t"),
  6436. a = this;
  6437. setTimeout(function() {
  6438. if (d.tmpListeners) {
  6439. for (var b = d.tmpListeners.tap,
  6440. c = 0; c < b.length; c++) a.bind("tap", b[c]);
  6441. b = d.tmpListeners.doubleTap;
  6442. for (c = 0; c < b.length; c++) a.bind("doubleTap", b[c]);
  6443. delete d.tmpListeners
  6444. }
  6445. },
  6446. 1);
  6447. if (d.finger) {
  6448. for (var c in d.pages) L(c, d.pages) && p._end.call(d.pages[c], b);
  6449. delete d.finger;
  6450. delete d.fingerZoom;
  6451. d.zoomed && (f.zoom.apply(this, d.zoomed), delete d.zoomed)
  6452. }
  6453. },
  6454. _eventSwipe: function(b, d) {
  6455. var a = j(this),
  6456. c = a.data("t");
  6457. if (!a.turn("isFlipping") && 1 == c.zoom) {
  6458. var g = c.direction == F.ltr,
  6459. f;
  6460. if ( - 0.5 > d) if (f = a.turn("view").pop(), c.display == o["double"]) {
  6461. if (a.turn("animating")) if (g) {
  6462. if (0 === c.pageMv[0] % 2) return
  6463. } else if (0 !== c.pageMv[0] % 2) return;
  6464. a.turn("next")
  6465. } else - 1 != j.inArray(c.corner, M.forward) ? a.turn("next") : 1 < f && c.pages[f - 1] && (c.pages[f].data("f").status = "swiped", c.pages[f - 1].flip("turnPage", c.pages[f - 1].data("f").point.corner));
  6466. else if (0.5 < d) if (f = a.turn("view").shift(), c.display == o["double"]) {
  6467. if (a.turn("animating")) if (g) {
  6468. if (0 !== c.pageMv[0] % 2) return
  6469. } else if (0 === c.pageMv[0] % 2) return;
  6470. a.turn("previous")
  6471. } else - 1 != j.inArray(c.corner, M.backward) ? a.turn("previous") : (c.pages[f].data("f").status = "swiped", c.pages[f].flip("hideFoldedPage", !0))
  6472. }
  6473. },
  6474. _resizeObserver: function() {
  6475. if (this.turn("is")) {
  6476. var b = this.data("t"),
  6477. d = b.options.viewer;
  6478. if (b.viewerWidth != d.width() || b.viewerHeight != d.height()) b.viewerWidth = d.width(),
  6479. b.viewerHeight = d.height(),
  6480. f._resize.call(this);
  6481. setTimeout(j.proxy(f._resizeObserver, this), 10)
  6482. }
  6483. },
  6484. _defaultSize: function(b) {
  6485. var d = this.data("t"),
  6486. a = d.viewerWidth - d.margins[1] - d.margins[3],
  6487. c = d.viewerHeight - d.margins[0] - d.margins[2],
  6488. g = V({
  6489. width: d.options.width,
  6490. height: d.options.height,
  6491. boundWidth: Math.min(d.options.width, a),
  6492. boundHeight: Math.min(d.options.height, c)
  6493. });
  6494. if (d.options.responsive) {
  6495. a = V({
  6496. width: d.options.width / 2,
  6497. height: d.options.height,
  6498. boundWidth: Math.min(d.options.width / 2, a),
  6499. boundHeight: Math.min(d.options.height, c)
  6500. });
  6501. d = d.viewerWidth * d.viewerHeight;
  6502. if (d - a.width * a.height < d - g.width * g.height && !b || b == o.single) return {
  6503. width: a.width,
  6504. height: a.height,
  6505. display: "single"
  6506. };
  6507. 0 !== g.width % 2 && (g.width -= 1)
  6508. }
  6509. return {
  6510. width: g.width,
  6511. height: g.height,
  6512. display: "double"
  6513. }
  6514. },
  6515. _resize: function() {
  6516. var b, d, a, c = this.data("t");
  6517. if (c.options.responsive) {
  6518. var g = this.turn("view");
  6519. if (1 == c.zoom) {
  6520. a = c.options.defaultZoomMargin;
  6521. b = c.options.viewer;
  6522. if (a) {
  6523. var i;
  6524. d = function(a, b) {
  6525. c.margins[(a - 1) / 2] = "%" == i[a + 1] ? Math.max(0, i[a] / 100 * b) : Math.max(0, parseInt(i[a], 10))
  6526. };
  6527. if (i = /^(\d+)(px|%)\s+(\d+)(px|%)$/.exec(a)) d(1, b.height()),
  6528. d(3, b.width()),
  6529. c.margins[2] = c.margins[0],
  6530. c.margins[3] = c.margins[1];
  6531. else if (i = /^(\d+)(px|%)\s+(\d+)(px|%)\s+(\d+)(px|%)\s+(\d+)(px|%)$/.exec(a)) d(1, b.height()),
  6532. d(3, b.width()),
  6533. d(5, b.height()),
  6534. d(7, b.width())
  6535. }
  6536. b = c.slider;
  6537. c.slider = null;
  6538. a = f._defaultSize.call(this);
  6539. this.turn("display", a.display);
  6540. c.slider = b;
  6541. a.display != c.display && (a = f._defaultSize.call(this, c.display));
  6542. this.turn("size", a.width * c.zoom, a.height * c.zoom)
  6543. } else this.turn("scroll", c.scroll.left, c.scroll.top);
  6544. if (c.zoomer) {
  6545. a = f._defaultSize.call(this, c.display);
  6546. c.zoomer.css({
  6547. width: a.width,
  6548. height: a.height
  6549. });
  6550. d = c.zoomer.children();
  6551. for (b = 0; b < d.length; b++) j(d[b]).css({
  6552. width: a.width / g.length,
  6553. height: a.height
  6554. })
  6555. }
  6556. c.slider && v._resize.call(j(c.slider))
  6557. }
  6558. },
  6559. focusPoint: function() {
  6560. var b = this.data("t");
  6561. if (b.focusPoint) return b.focusPoint;
  6562. b = this.turn("view");
  6563. return b[0] ? b[1] ? u(this.width() / 2, this.height() / 2) : u(3 * this.width() / 4, this.height() / 2) : u(this.width() / 4, this.height() / 2)
  6564. },
  6565. maxZoom: function() {
  6566. var b = this.data("t");
  6567. if (b.options.responsive) {
  6568. var d = b.viewerHeight - b.margins[0] - b.margins[2];
  6569. return b.options.width / V({
  6570. width: b.options.width,
  6571. height: b.options.height,
  6572. boundWidth: Math.min(b.options.width, b.viewerWidth - b.margins[1] - b.margins[3]),
  6573. boundHeight: Math.min(b.options.height, d)
  6574. }).width
  6575. }
  6576. return b.options.zoom
  6577. },
  6578. zoomIn: function(b) {
  6579. this.data("t");
  6580. return this.turn("zoom", this.turn("maxZoom"), b)
  6581. },
  6582. zoomOut: function(b) {
  6583. return this.turn("zoom", 1, b)
  6584. },
  6585. _halfWidth: function() {
  6586. var b = this.data("t"),
  6587. d = this.turn("view");
  6588. return b.display == o["double"] && b.options.autoCenter && (!d[0] || !d[1])
  6589. },
  6590. scrollSize: function() {
  6591. var b = this.data("t"),
  6592. d = this.turn("size"),
  6593. a = f._halfWidth.call(this) ? d.width / 2 : d.width;
  6594. return {
  6595. width: Math.max(0, a - b.viewerWidth),
  6596. height: Math.max(0, d.height - b.viewerHeight)
  6597. }
  6598. },
  6599. scroll: function(b, d) {
  6600. var a = this.data("t");
  6601. if (void 0 === d && void 0 === b) return a.scroll;
  6602. if (1 < a.zoom && !a.zooming) {
  6603. var h = this.turn("size");
  6604. this.turn("view");
  6605. var g = this.turn("scrollSize"),
  6606. h = u(a.viewerWidth / 2 - h.width / 2, a.viewerHeight / 2 - h.height / 2),
  6607. d = Math.min(g.height, Math.max(0, d)),
  6608. b = Math.min(g.width, Math.max(0, b));
  6609. S("scrolling", this, [b, d]) != c.prevented && (h.x = h.x + g.width / 2 - b, h.y = h.y + g.height / 2 - d, this.css({
  6610. left: h.x,
  6611. top: h.y
  6612. }), a.scroll = {
  6613. top: d,
  6614. left: b
  6615. })
  6616. }
  6617. return this
  6618. },
  6619. _mouseRel: function(b) {
  6620. var d = this.offset(),
  6621. a = this.data("t"),
  6622. c = this.turn("size"),
  6623. b = u(b.pageX - d.left, b.pageY - d.top);
  6624. if (a.display == o["double"] && a.options.autoCenter) if (a = this.turn("view"), a[0]) if (a[1]) {
  6625. if (0 > b.x || b.x > c.width) return null
  6626. } else {
  6627. if (b.x = b.x, 0 > b.x || b.x > c.width / 2) return null
  6628. } else if (b.x -= c.width / 2, 0 > b.x || b.x > c.width / 2) return null;
  6629. return b
  6630. },
  6631. zoom: function(b, d) {
  6632. var a = this.data("t");
  6633. if (void 0 === b) return a.zoom;
  6634. var d = d || {},
  6635. h = this.turn("size"),
  6636. g = f._halfWidth.call(this);
  6637. if ("pageX" in d && "pageY" in d) {
  6638. var i = f._mouseRel.call(this, d);
  6639. if (null === i) return this;
  6640. d = j.extend(d, i);
  6641. "factor" in d && (b = d.factor * a.fingerZoom, d.animate = !1)
  6642. } else "x" in d && "y" in d || (d.x = g ? h.width / 4 : h.width / 2, d.y = h.height / 2);
  6643. if (a.zooming || S("zooming", this, [b, a.zoom]) != c.prevented) {
  6644. var t, m = this,
  6645. i = a.zoom,
  6646. p = this.turn("view"),
  6647. s = parseFloat(Math.min(this.turn("maxZoom"), Math.max(1, b)), 10),
  6648. v = f._position.call(this, s),
  6649. w = k + "transition",
  6650. x = void 0 === d.animate ? !0 : d.animate,
  6651. y = this.offset(),
  6652. D = a.options.viewer.offset(),
  6653. B = f._size.call(this, s, !0),
  6654. E = s > a.zoom ? s: 1 / a.zoom * s,
  6655. C = a.display == o["double"] && a.options.autoCenter,
  6656. L = u(Math.max(0, B.width - a.viewerWidth), Math.max(0, B.height - a.viewerHeight)),
  6657. E = u(d.x * E - y.left - d.x, d.y * E - d.y - y.top);
  6658. C && !p[0] && (E.x -= h.width / 2);
  6659. E = u(Math.min(L.x, Math.max(0, E.x)), Math.min(L.y, Math.max(0, E.y)));
  6660. g && (v.left += B.width / 2);
  6661. g = u(D.left - y.left + Math.max(0, v.left), D.top - y.top + Math.max(0, v.top));
  6662. C && !p[0] && (g.x -= B.width);
  6663. var N = r(g.x - E.x, g.y - E.y) + q(s, s, !0);
  6664. this.turn("stop");
  6665. this.turn("disable", !0);
  6666. f._cloneView.call(this, !0);
  6667. a.zoomer.css({
  6668. visibility: "visible"
  6669. });
  6670. if (x) {
  6671. if (s < i) for (t in a.pageWrap) a.pageWrap[t].css({
  6672. visibility: "hidden"
  6673. });
  6674. a.zooming = !0;
  6675. t = h.width / a.zoomer.width();
  6676. a.zoomer.transform(q(t, t, !0), "0% 0%");
  6677. setTimeout(function() {
  6678. var b = {};
  6679. b[w] = k + "transform 0.5s ease-in-out";
  6680. a.zoomer.css(b);
  6681. a.zoomer.transform(N, "0% 0%")
  6682. },
  6683. 0);
  6684. Y(a.zoomer,
  6685. function() {
  6686. a.finger || m.turn("zoom", b, {
  6687. animate: false,
  6688. x: d.x,
  6689. y: d.y
  6690. })
  6691. })
  6692. } else if (B = {},
  6693. h = a.peel, B[w] = "", a.zoomer.css(B), a.zoomer.transform(N, "0% 0%"), "factor" in d) {
  6694. if (s < i) for (t in a.pageWrap) a.pageWrap[t].css({
  6695. visibility: "hidden"
  6696. });
  6697. a.zoomed = [b, {
  6698. x: d.x,
  6699. y: d.y,
  6700. animate: !1
  6701. }]
  6702. } else {
  6703. for (t in a.pageWrap) a.pageWrap[t].css({
  6704. visibility: ""
  6705. });
  6706. a.zoom = b;
  6707. B = f._defaultSize.call(this);
  6708. B.width *= s;
  6709. B.height *= s;
  6710. a.zoom = s;
  6711. a.zooming = !1;
  6712. delete a.initScroll;
  6713. delete a.initCursor;
  6714. a.peel = null;
  6715. this.turn("display", B.display);
  6716. this.turn("size", B.width, B.height);
  6717. this.turn("scroll", E.x, E.y);
  6718. 1 == s ? (this.turn("disable", !1), h && this.turn("peel", h.corner, h.x, h.y, !0)) : a.peel = h;
  6719. a.options.autoScaleContent && this.turn("scaleContent", s);
  6720. S("zoomed", this, [s, i]);
  6721. a.zoomer.css({
  6722. visibility: "hidden"
  6723. })
  6724. }
  6725. }
  6726. return this
  6727. },
  6728. calculateZ: function() {
  6729. var b = this.data("t"),
  6730. d = {
  6731. pageZ: {},
  6732. pageV: {}
  6733. },
  6734. a = b.pageMv.length,
  6735. c = b.front.length,
  6736. g,
  6737. f,
  6738. i;
  6739. if (b.display == o.single) {
  6740. for (g = 0; g < a; g++) d.pageV[b.pageMv[g]] = !0,
  6741. d.pageV[b.pages[b.pageMv[g]].data("f").next] = !0,
  6742. d.pageZ[b.pageMv[g]] = 3 + (a - g);
  6743. d.pageV[0] = !0;
  6744. d.pageZ[0] = 3 + a + 1
  6745. } else {
  6746. for (g = 0; g < a; g++) {
  6747. i = this.turn("view", b.pageMv[g]);
  6748. for (f = 0; f < i.length; f++) d.pageV[i[f]] = !0;
  6749. d.pageZ[b.pageMv[g]] = 3 + (a - g)
  6750. }
  6751. for (g = 0; g < c; g++) {
  6752. i = this.turn("view", b.front[g]);
  6753. d.pageZ[b.front[g]] = 3 + a + 1 + g;
  6754. for (f = 0; f < i.length; f++) d.pageV[i[f]] = !0
  6755. }
  6756. }
  6757. return d
  6758. },
  6759. scaleContent: function(b) {
  6760. for (var d = this.data("t"), a = this.turn("view"), c = 0; c < a.length; c++) a[c] && d.pageObjs[a[c]].transform("scale(" + b + ")", "0% 0%")
  6761. },
  6762. update: function() {
  6763. var b, d, a = this.data("t");
  6764. if (this.turn("animating") && 0 !== a.pageMv[0]) {
  6765. var c, g = this.turn("calculateZ"),
  6766. i = this.turn("view"),
  6767. k = this.turn("view", a.tpage);
  6768. d = "" === a.status ? a.options.hover: !1;
  6769. for (b in a.pageWrap) L(b, a.pageWrap) && (c = a.pageObjs[b].hasClass("fixed"), a.pageWrap[b].css({
  6770. display: g.pageV[b] || c ? "": "none",
  6771. zIndex: g.pageZ[b] || (c ? -1 : 0)
  6772. }), a.tpage ? a.pages[b].flip("hover", !1).flip("disable", -1 == j.inArray(parseInt(b, 10), a.pageMv) && b != k[0] && b != k[1]) : a.pages[b].flip("hover", d).flip("disable", b != i[0] && b != i[1]))
  6773. } else for (b in d = a.options.hover, a.pageWrap) L(b, a.pageWrap) && (c = f._setPageLoc.call(this, b), a.pages[b] && a.pages[b].flip("disable", a.disabled || 1 != c).flip("hover", d));
  6774. return this
  6775. },
  6776. _updateShadow: function() {
  6777. var b, d = this.data("t"),
  6778. a = this.width(),
  6779. c = this.height(),
  6780. g = d.display == o.single ? a: a / 2,
  6781. f = this.turn("view");
  6782. d.shadow || (d.shadow = j("<div />", {
  6783. "class": "shadow",
  6784. css: s(0, 0, 0).css
  6785. }).appendTo(this));
  6786. for (var i = 0; i < d.pageMv.length && f[0] && f[1]; i++) f = this.turn("view", d.pages[d.pageMv[i]].data("f").next),
  6787. b = this.turn("view", d.pageMv[i]),
  6788. f[0] = f[0] && b[0],
  6789. f[1] = f[1] && b[1];
  6790. switch (f[0] ? f[1] ? 3 : d.direction == F.ltr ? 2 : 1 : d.direction == F.ltr ? 1 : 2) {
  6791. case 1:
  6792. d.shadow.css({
  6793. width:
  6794. g,
  6795. height: c,
  6796. top: 0,
  6797. left: g
  6798. });
  6799. break;
  6800. case 2:
  6801. d.shadow.css({
  6802. width:
  6803. g,
  6804. height: c,
  6805. top: 0,
  6806. left: 0
  6807. });
  6808. break;
  6809. case 3:
  6810. d.shadow.css({
  6811. width:
  6812. a,
  6813. height: c,
  6814. top: 0,
  6815. left: 0
  6816. })
  6817. }
  6818. },
  6819. _setPageLoc: function(b) {
  6820. var d = this.data("t"),
  6821. a = this.turn("view"),
  6822. c = this.turn("animating");
  6823. if (b == a[0] || b == a[1]) return c || d.pageWrap[b].css({
  6824. zIndex: 2,
  6825. display: ""
  6826. }),
  6827. 1;
  6828. if (d.display == o.single && b == a[0] + 1 || d.display == o["double"] && b == a[0] - 2 || b == a[1] + 2) return c || d.pageWrap[b].css({
  6829. zIndex: 1,
  6830. display: ""
  6831. }),
  6832. 2; ! c && -1 == d.front.indexOf(parseInt(b, 10)) && (d.pageWrap[b].css({
  6833. zIndex: 0,
  6834. display: d.pageObjs[b].hasClass("fixed") ? "": "none"
  6835. }), d.pages[b] && (d.pages[b].data("f").visible = !1));
  6836. return 0
  6837. },
  6838. options: function(b) {
  6839. if (void 0 === b) return this.data("t").options;
  6840. var d = this.data("t");
  6841. j.extend(d.options, b);
  6842. b.pages && this.turn("pages", b.pages);
  6843. b.page && this.turn("page", b.page);
  6844. b.display && this.turn("display", b.display);
  6845. b.direction && this.turn("direction", b.direction);
  6846. b.width && b.height && this.turn("size", b.width, b.height);
  6847. if (b.cornerPosition) {
  6848. var a = b.cornerPosition.split(" ");
  6849. d.options.cornerPosition = u(parseInt(a[0], 10), parseInt(a[1], 10))
  6850. }
  6851. b.defaultZoomMargin && f._resize.call(this);
  6852. if (b.events) for (var c in b.events) L(c, b.events) && this.unbind(c).bind(c, b.events[c]);
  6853. return this
  6854. },
  6855. version: function() {
  6856. return "5"
  6857. },
  6858. _cloneView: function(b) {
  6859. var d = this.data("t");
  6860. if (d.zoomer) b ? d.zoomer.show() : (d.zoomer.remove(), delete d.zoomer);
  6861. else if (b) {
  6862. var a, c = this.turn("view"),
  6863. g = j("<div />");
  6864. g.css({
  6865. position: "absolute",
  6866. top: 0,
  6867. left: 0,
  6868. zIndex: 1E5,
  6869. width: this.width(),
  6870. height: this.height()
  6871. });
  6872. for (var i = 0; i < c.length; i++) c[i] && (b = f._pageSize.call(this, c[i], !0), b.position = "absolute", a = d.pageObjs[c[i]].clone(), a.css(b), a.appendTo(g));
  6873. g.appendTo(this);
  6874. d.zoomer = g
  6875. }
  6876. }
  6877. },
  6878. p = {
  6879. init: function(b) {
  6880. var d = this.parent().parent(),
  6881. b = b || {};
  6882. b.disabled = !1;
  6883. b.hover = !1;
  6884. b.effect = this.hasClass("hard") ? "hard": "sheet";
  6885. b.turn = d;
  6886. b.turnData = d.data("t");
  6887. this.data("f", j.extend(this.data("f") || {},
  6888. b));
  6889. p._addPageWrapper.call(this);
  6890. return this
  6891. },
  6892. _cornerAllowed: function() {
  6893. var b = this.data("f"),
  6894. d = b.page,
  6895. a = b.turnData,
  6896. c = a.direction == F.ltr,
  6897. g = d % 2;
  6898. switch (b.effect) {
  6899. case "hard":
  6900. return c ? [g ? "r": "l"] : [g ? "l": "r"];
  6901. case "sheet":
  6902. return a.display == o.single ? 1 == d ? c ? M.forward: M.backward: d == a.totalPages ? c ? M.backward: M.forward: "tapping" == b.status ? M.all: c ? M.forward: M.backward: c ? M[g ? "forward": "backward"] : M[g ? "backward": "forward"]
  6903. }
  6904. },
  6905. _cornerActivated: function(b) {
  6906. var d = this.width(),
  6907. a = this.height(),
  6908. b = y("", b.x, b.y);
  6909. if (0 >= b.x || 0 >= b.y || b.x >= d || b.y >= a) return ! 1;
  6910. var c = this.data("f"),
  6911. g = c.turnData.options.cornerSize,
  6912. f = p._cornerAllowed.call(this);
  6913. switch (c.effect) {
  6914. case "hard":
  6915. if (b.x > d - g) b.corner = "r";
  6916. else if (b.x < g) b.corner = "l";
  6917. else return ! 1;
  6918. break;
  6919. case "sheet":
  6920. (b.y < g ? b.corner += "t": b.y >= a - g && (b.corner += "b"), b.x <= g) ? b.corner += "l": b.x >= d - g && (b.corner += "r")
  6921. }
  6922. return ! b.corner || -1 == j.inArray(b.corner, f) ? !1 : b
  6923. },
  6924. _isIArea: function(b) {
  6925. var b = K(b),
  6926. d = this.data("f"),
  6927. d = (d.clip || d.ipage).parent().offset();
  6928. return p._cornerActivated.call(this, u(b.x - d.left, b.y - d.top))
  6929. },
  6930. _startPoint: function(b, d) {
  6931. var a, d = d || u(0, 0);
  6932. switch (b) {
  6933. case "tr":
  6934. d.x = this.width() - d.x;
  6935. break;
  6936. case "bl":
  6937. d.y = this.height() - d.y;
  6938. break;
  6939. case "br":
  6940. d.x = this.width() - d.x;
  6941. d.y = this.height() - d.y;
  6942. break;
  6943. case "l":
  6944. a = this.data("f");
  6945. a.startPoint && (d.y = a.startPoint.y);
  6946. break;
  6947. case "r":
  6948. d.x = this.width() - d.x,
  6949. a = this.data("f"),
  6950. a.startPoint && (d.y = a.startPoint.y)
  6951. }
  6952. return d
  6953. },
  6954. _endPoint: function(b, d) {
  6955. var a, d = d || u(0, 0);
  6956. switch (b) {
  6957. case "tl":
  6958. d.x = 2 * this.width() - d.x;
  6959. break;
  6960. case "tr":
  6961. d.x = -this.width() + d.x;
  6962. break;
  6963. case "bl":
  6964. d.x = 2 * this.width() - d.x;
  6965. d.y = this.height() - d.y;
  6966. break;
  6967. case "br":
  6968. d.x = -this.width() + d.x;
  6969. d.y = this.height() - d.y;
  6970. break;
  6971. case "l":
  6972. d.x = 2 * this.width() - d.x;
  6973. a = this.data("f");
  6974. a.startPoint && (d.y = a.startPoint.y);
  6975. break;
  6976. case "r":
  6977. d.x = -this.width() - d.x,
  6978. a = this.data("f"),
  6979. a.startPoint && (d.y = a.startPoint.y)
  6980. }
  6981. return d
  6982. },
  6983. _foldingPage: function(b) {
  6984. var d = this.data("f");
  6985. if (d) {
  6986. var a = d.turnData,
  6987. b = b || "pageObjs";
  6988. return a.display == o.single ? a[b][0] : d.over ? a[b][d.over] : a[b][d.next]
  6989. }
  6990. return ! 1
  6991. },
  6992. resize: function() {
  6993. var b = this.data("f"),
  6994. d = this.width(),
  6995. a = this.height();
  6996. switch (b.effect) {
  6997. case "hard":
  6998. b.ipage.css({
  6999. width:
  7000. d,
  7001. height: a
  7002. });
  7003. b.igradient.css({
  7004. width: d,
  7005. height: a
  7006. });
  7007. b.ogradient.css({
  7008. width: d,
  7009. height: a
  7010. });
  7011. break;
  7012. case "sheet":
  7013. var c = Math.round(Math.sqrt(d * d + a * a));
  7014. b.clip.css({
  7015. width: c,
  7016. height: c
  7017. });
  7018. b.ipage.css({
  7019. width: d,
  7020. height: a
  7021. });
  7022. b.igradient.css({
  7023. width: 100,
  7024. height: 2 * a,
  7025. top: -a / 2
  7026. });
  7027. b.ogradient.css({
  7028. width: 100,
  7029. height: 2 * a,
  7030. top: -a / 2
  7031. })
  7032. }
  7033. return this
  7034. },
  7035. _addPageWrapper: function() {
  7036. var b = this.data("f"),
  7037. d = this.parent(),
  7038. a;
  7039. if (!b.ipage) {
  7040. var c = j("<div />", {
  7041. "class": "inner-page"
  7042. }),
  7043. g = j("<div />", {
  7044. "class": "inner-gradient"
  7045. }),
  7046. f = j("<div />", {
  7047. "class": "outer-gradient"
  7048. });
  7049. switch (b.effect) {
  7050. case "hard":
  7051. a = s(0, 0, 2).css;
  7052. a[k + "transform-style"] = "preserve-3d";
  7053. a[k + "backface-visibility"] = "hidden";
  7054. c.css(a).appendTo(d).prepend(this);
  7055. g.css(s(0, 0, 0).css).appendTo(c);
  7056. f.css(s(0, 0, 0));
  7057. b.ipage = c;
  7058. b.igradient = g;
  7059. b.ogradient = f;
  7060. break;
  7061. case "sheet":
  7062. var i = j("<div />", {
  7063. "class": "clip"
  7064. });
  7065. a = s(0, 0, 0).css;
  7066. i.css(j.extend({
  7067. "pointer-events": "none"
  7068. },
  7069. a));
  7070. c.css(j.extend({
  7071. cursor: "default"
  7072. },
  7073. a));
  7074. a.zIndex = 1;
  7075. g.css(j.extend({
  7076. background: ea(!0),
  7077. display: "none",
  7078. visibility: "hidden"
  7079. },
  7080. a));
  7081. f.css(j.extend({
  7082. background: ea(!1),
  7083. visibility: "hidden"
  7084. },
  7085. a));
  7086. g.appendTo(c);
  7087. c.appendTo(i).prepend(this);
  7088. f.appendTo(d);
  7089. i.appendTo(d);
  7090. b.clip = i;
  7091. b.ipage = c;
  7092. b.igradient = g;
  7093. b.ogradient = f
  7094. }
  7095. }
  7096. p.resize.call(this)
  7097. },
  7098. _hard: function(b) {
  7099. var d = this.data("f"),
  7100. a = d.turnData,
  7101. c = this.width();
  7102. this.height();
  7103. var g = "l" == b.corner,
  7104. f = p._startPoint.call(this, b.corner),
  7105. i = a.totalPages,
  7106. j = d.options["z-index"] || i,
  7107. m = {
  7108. overflow: "visible"
  7109. },
  7110. o,
  7111. q,
  7112. s,
  7113. r;
  7114. b.x = g ? Math.min(Math.max(b.x, 0), 2 * c) : Math.max(Math.min(b.x, c), -c);
  7115. var c = f.x ? (f.x - b.x) / c: b.x / c,
  7116. v = 90 * c,
  7117. w = 90 > v,
  7118. x = a.pages[d.next].data("f");
  7119. g ? (q = "0% 50%", s = "100% 50%", w ? (g = 0, r = d.next - 1, o = 0 < r, f = d.page, i = 1) : (g = "100%", r = d.page + 1, o = r < i, f = d.next, i = 0)) : (q = "100% 50%", s = "0% 50%", v = -v, w ? (g = 0, r = d.next + 1, f = d.page, o = r < i, i = 0) : (g = "-100%", r = d.page - 1, f = d.next, o = 0 < r, i = 1));
  7120. m[k + "perspective-origin"] = s;
  7121. a.pageWrap[d.page].css(m);
  7122. d.ipage.transform("rotateY(" + v + "deg)translate3d(0px, 0px, " + (this.attr("depth") || 0) + "px)", s);
  7123. x.ipage.transform("rotateY(" + (180 + v) + "deg)", q);
  7124. w ? (c = -c + 1, d.ipage.css({
  7125. zIndex: j + 1
  7126. }), x.ipage.css({
  7127. zIndex: j
  7128. })) : (c -= 1, d.ipage.css({
  7129. zIndex: j
  7130. }), x.ipage.css({
  7131. zIndex: j + 1
  7132. }));
  7133. if (a.options.gradients && (o ? (j = a.pages[r].data("f"), d.ogradient.parent()[0] != j.ipage[0] && d.ogradient.appendTo(j.ipage), d.ogradient.css({
  7134. left: g,
  7135. backgroundColor: "black",
  7136. opacity: 0.5 * c
  7137. }).transform("rotateY(0deg)")) : d.ogradient.css({
  7138. opacity: 0
  7139. }), a = a.pages[f].data("f"), d.igradient.parent()[0] != a.ipage[0] && d.igradient.appendTo(a.ipage), d.igradient.css({
  7140. opacity: -c + 1
  7141. }), a = d.igradient, j = u(100 * i, 0), m = u(100 * ( - i + 1), 0), i = [[0, "rgba(0,0,0,0.3)"], [1, "rgba(0,0,0,0)"]], g = [], "-webkit-" == k)) {
  7142. for (c = 0; 2 > c; c++) g.push("color-stop(" + i[c][0] + ", " + i[c][1] + ")");
  7143. a.css({
  7144. "background-image": "-webkit-gradient(linear, " + j.x + "% " + j.y + "%," + m.x + "% " + m.y + "%, " + g.join(",") + " )"
  7145. })
  7146. }
  7147. d.point = y(b.corner, b.x, b.y)
  7148. },
  7149. _pageCURL: function(b) {
  7150. var d = this.data("f"),
  7151. a = d.turnData,
  7152. c = this.width(),
  7153. g = this.height(),
  7154. f,
  7155. i,
  7156. j,
  7157. k,
  7158. m = this,
  7159. o = 0,
  7160. s,
  7161. v,
  7162. w,
  7163. x = u(0, 0),
  7164. D = u(0, 0),
  7165. E = u(0, 0);
  7166. p._foldingPage.call(this);
  7167. var C = a.options.acceleration,
  7168. L = d.clip.height(),
  7169. K = function() {
  7170. f = p._startPoint.call(m, b.corner);
  7171. var d;
  7172. d = c - f.x - b.x;
  7173. var q = f.y - b.y,
  7174. r = Math.atan2(q, d);
  7175. d = Math.sqrt(d * d + q * q);
  7176. r = u(c - f.x - Math.cos(r) * c, f.y - Math.sin(r) * c);
  7177. d > c && (b.x = r.x, b.y = r.y);
  7178. var q = u(0, 0),
  7179. y = u(0, 0);
  7180. q.x = f.x ? f.x - b.x: b.x;
  7181. q.y = aa ? f.y ? f.y - b.y: b.y: 0;
  7182. y.x = j ? c - q.x / 2 : b.x + q.x / 2;
  7183. y.y = q.y / 2;
  7184. r = U - Math.atan2(q.y, q.x);
  7185. d = r - Math.atan2(y.y, y.x);
  7186. d = Math.sin(d) * Math.sqrt(y.x * y.x + y.y * y.y);
  7187. E = u(d * Math.sin(r), d * Math.cos(r));
  7188. if (r > U) {
  7189. E.x += Math.abs(E.y * q.y / q.x);
  7190. E.y = 0;
  7191. if (Math.round(E.x * Math.tan(B - r)) < g) return b.y = Math.sqrt(Math.pow(g, 2) + 2 * y.x * q.x),
  7192. i && (b.y = g - b.y),
  7193. K();
  7194. d = B - r;
  7195. q = L - g / Math.sin(d);
  7196. x = u(Math.round(q * Math.cos(d)), Math.round(q * Math.sin(d)));
  7197. j && (x.x = -x.x);
  7198. i && (x.y = -x.y)
  7199. }
  7200. o = Math.round(18E3 * (r / B)) / 100;
  7201. k = Math.round(E.y / Math.tan(r) + E.x);
  7202. d = c - k;
  7203. q = Math.min(g, d * Math.tan(r));
  7204. 0 > q && (q = g);
  7205. var y = d * Math.cos(2 * r),
  7206. C = d * Math.sin(2 * r);
  7207. D = u(Math.round(j ? d - y: k + y), Math.round(i ? C: g - C));
  7208. a.options.gradients && (y = p._endPoint.call(m, b.corner), w = Math.sqrt(Math.pow(y.x - b.x, 2) + Math.pow(y.y - b.y, 2)) / c, s = Math.min(100, d * Math.sin(r)), v = 1.3 * Math.min(d, q));
  7209. E.x = Math.round(E.x);
  7210. E.y = Math.round(E.y);
  7211. return ! 0
  7212. },
  7213. M = function(b, f, l, m) {
  7214. var o = ["0", "auto"],
  7215. p = (c - L) * l[0] / 100,
  7216. u = (g - L) * l[1] / 100,
  7217. o = {
  7218. left: o[f[0]],
  7219. top: o[f[1]],
  7220. right: o[f[2]],
  7221. bottom: o[f[3]]
  7222. },
  7223. y = 90 != m && -90 != m ? j ? -1 : 1 : 0,
  7224. B = l[0] + "% " + l[1] + "%",
  7225. f = a.pages[d.over].data("f"),
  7226. I = d.clip.parent().position().left - a.pageWrap[d.over].position().left;
  7227. d.ipage.css(o).transform(N(m) + r(b.x + y, b.y, C), B);
  7228. f.ipage.css(o).transform(N(m) + r(b.x + D.x - x.x - c * l[0] / 100, b.y + D.y - x.y - g * l[1] / 100, C) + N(Math.round(100 * (180 / m - 2) * m) / 100), B);
  7229. d.clip.transform(r( - b.x + p - y, -b.y + u, C) + N( - m), B);
  7230. f.clip.transform(r(I - b.x + x.x + p, -b.y + x.y + u, C) + N( - m), B);
  7231. a.options.gradients && (i ? (j ? (l = m - 90, p = k - 50, s = -s) : (l = m - 270, p = c - k - 50), b = "50% 25%") : (j ? (p = k - 50, l = m - 270, s = -s) : (p = c - k - 50, l = m - 90), b = "50% 75%"), u = Math.max(0.5, 2 - w), 1 < u && (u = 1.7 <= u ? (2 - u) / 0.3 : 1), f.igradient.css({
  7232. opacity: Math.round(100 * u) / 100
  7233. }).transform(r(p, 0, C) + N(l) + q(s / 100, 1, C), b), i ? (j ? (l = -270 - m, v = -v, p = c - k - 20) : (l = -90 - m, p = k - 20), b = "20% 25%") : (j ? (l = -90 - m, p = c - k - 20, v = -v) : (l = 90 - m, p = k - 20), b = "20% 75%"), u = 0.3 > w ? w / 0.3 : 1, d.ogradient.css({
  7234. opacity: Math.round(100 * u) / 100
  7235. }).transform(r(p, 0, C) + N(l) + q( - v / 100, 1, C), b))
  7236. },
  7237. O,
  7238. F,
  7239. J,
  7240. P;
  7241. d.point = y(b.corner, b.x, b.y);
  7242. switch (b.corner) {
  7243. case "l":
  7244. F = b.y - d.startPoint.y;
  7245. J = b.x;
  7246. P = Math.atan2(F, J);
  7247. 0 < P ? (O = d.startPoint.y, F = Math.sqrt(J * J + F * F), O = 2 * O * Math.sin(P) + F, b.x = O * Math.cos(P), b.y = O * Math.sin(P), b.corner = "tl", i = j = !0, K(), M(E, [1, 0, 0, 1], [100, 0], o)) : (P = -P, O = g - d.startPoint.y, F = Math.sqrt(J * J + F * F), O = 2 * O * Math.cos(U - P) + F, b.x = O * Math.cos(P), b.y = g - O * Math.sin(P), b.corner = "bl", j = !0, K(), M(u(E.x, -E.y), [1, 1, 0, 0], [100, 100], -o));
  7248. break;
  7249. case "r":
  7250. F = d.startPoint.y - b.y;
  7251. J = c - b.x;
  7252. P = Math.atan2(F, J);
  7253. 0 > P ? (O = d.startPoint.y, P = -P, F = Math.sqrt(J * J + F * F), O = 2 * O * Math.sin(P) + F, b.x = c - O * Math.cos(P), b.y = O * Math.sin(P), b.corner = "tr", i = !0, K(), M(u( - E.x, E.y), [0, 0, 0, 1], [0, 0], -o)) : (O = g - d.startPoint.y, F = Math.sqrt(J * J + F * F), O = 2 * O * Math.cos(U - P) + F, b.x = c - O * Math.cos(P), b.y = g - O * Math.sin(P), b.corner = "br", K(), M(u( - E.x, -E.y), [0, 1, 1, 0], [0, 100], o));
  7254. break;
  7255. case "tl":
  7256. j = i = !0;
  7257. b.x = Math.max(b.x, 1);
  7258. d.point.x = b.x;
  7259. f = p._startPoint.call(this, "tl");
  7260. K();
  7261. M(E, [1, 0, 0, 1], [100, 0], o);
  7262. break;
  7263. case "tr":
  7264. i = !0;
  7265. b.x = Math.min(b.x, c - 1);
  7266. d.point.x = b.x;
  7267. K();
  7268. M(u( - E.x, E.y), [0, 0, 0, 1], [0, 0], -o);
  7269. break;
  7270. case "bl":
  7271. j = !0;
  7272. b.x = Math.max(b.x, 1);
  7273. d.point.x = b.x;
  7274. K();
  7275. M(u(E.x, -E.y), [1, 1, 0, 0], [100, 100], -o);
  7276. break;
  7277. case "br":
  7278. b.x = Math.min(b.x, c - 1),
  7279. d.point.x = b.x,
  7280. K(),
  7281. M(u( - E.x, -E.y), [0, 1, 1, 0], [0, 100], o)
  7282. }
  7283. },
  7284. _fold: function(b) {
  7285. var d = this.data("f");
  7286. if (!d.dpoint || d.dpoint.corner != b.corner || d.dpoint.x != b.x || d.dpoint.y != b.y) {
  7287. switch (d.effect) {
  7288. case "hard":
  7289. p._hard.call(this, b);
  7290. break;
  7291. case "sheet":
  7292. p._pageCURL.call(this, b)
  7293. }
  7294. d.dpoint = y(b.corner, b.x, b.y);
  7295. return ! 0
  7296. }
  7297. return ! 1
  7298. },
  7299. _bringClipToFront: function(b) {
  7300. var d = this.data("f"),
  7301. a = d.turnData,
  7302. c = a.display == o.single;
  7303. if (b) {
  7304. b = c ? 0 : d.next;
  7305. d.over && d.over != b && p._bringClipToFront.call(this, !1);
  7306. if ("hard" == d.effect) d.igradient.show();
  7307. else if ("sheet" == d.effect) {
  7308. var g = a.pageWrap[b],
  7309. f = a.pages[b].data("f"),
  7310. i = g.width(),
  7311. j = g.height();
  7312. g.css({
  7313. overflow: "visible",
  7314. zIndex: 3 + a.front.length
  7315. });
  7316. f.ipage.css({
  7317. overflow: "hidden",
  7318. position: "absolute",
  7319. width: i,
  7320. height: j
  7321. });
  7322. f.igradient.show().css({
  7323. visibility: "visible"
  7324. });
  7325. d.ipage.css({
  7326. "z-index": 1
  7327. });
  7328. d.ogradient.show().css({
  7329. zIndex: 2,
  7330. visibility: "visible"
  7331. });
  7332. c && f.tPage != d.page && (a.pageObjs[0].find("*").remove(), a.pageObjs[d.page].clone(!1).css({
  7333. opacity: "0.2",
  7334. overflow: "hidden"
  7335. }).transform("rotateY(180deg)", "50% 50%").appendTo(a.pageObjs[0]), f.tPage = d.page)
  7336. }
  7337. d.over = b
  7338. } else d.over && ((a = a.pageWrap[d.over]) && a.css({
  7339. overflow: "hidden",
  7340. display: "none",
  7341. zIndex: 0
  7342. }), p._restoreClip.call(this, !0), delete d.over)
  7343. },
  7344. _restoreClip: function(b, d) {
  7345. var a = this.data("f"),
  7346. c = a.turnData,
  7347. f = b ? r(0, 0, c.options.acceleration) : "",
  7348. i;
  7349. d ? i = a: c.pages[a.over] && (i = c.pages[a.over].data("f"));
  7350. i && (i.clip && i.clip.transform(f), i.ipage.transform(f).css({
  7351. top: 0,
  7352. left: 0,
  7353. right: "auto",
  7354. bottom: "auto"
  7355. }), i.igradient.hide())
  7356. },
  7357. _setFoldedPagePosition: function(b, d) {
  7358. var a = this.data(),
  7359. c = a.f,
  7360. f = c.turnData;
  7361. if (d) {
  7362. var i = this,
  7363. j = b.corner,
  7364. a = c.point && c.point.corner == j ? c.point: p._startPoint.call(this, j, u(1, 1));
  7365. this.animatef({
  7366. from: [a.x, a.y],
  7367. to: [b.x, b.y],
  7368. duration: 500,
  7369. easing: f.options.easing,
  7370. frame: function(a) {
  7371. b.x = Math.round(a[0]);
  7372. b.y = Math.round(a[1]);
  7373. b.corner = j;
  7374. p._fold.call(i, b)
  7375. }
  7376. })
  7377. } else p._fold.call(this, b),
  7378. a.effect && !a.effect.turning && this.animatef(!1)
  7379. },
  7380. _showFoldedPage: function(b, d) {
  7381. var a = this.data().f,
  7382. h = p._foldingPage.call(this);
  7383. if (a && h) {
  7384. var h = a.visible,
  7385. f = b.corner,
  7386. i = a.turn,
  7387. j = a.turnData;
  7388. if (!h || !a.point || a.point.corner != b.corner) {
  7389. var k = void 0 === j.tpage ? b.corner: null;
  7390. j.corner = f;
  7391. if (S("start", this, [a.page, k]) == c.prevented || a.effect != j.pages[a.next].data("f").effect) return ! 1;
  7392. if ("hard" == a.effect && "turning" == j.status) for (f = 0; f < j.front.length; f++) if (!j.pages[j.front[f]].hasClass("hard")) {
  7393. i.turn("stop");
  7394. break
  7395. }
  7396. h || (j.front.push(j.display == o.single ? 0 : a.next), j.pageMv.push(a.page));
  7397. a.startPoint = a.startPoint || u(b.x, b.y);
  7398. a.visible = !0;
  7399. p._bringClipToFront.call(this, !0);
  7400. i.turn("update")
  7401. }
  7402. p._setFoldedPagePosition.call(this, b, d);
  7403. return ! 0
  7404. }
  7405. return ! 1
  7406. },
  7407. hide: function() {
  7408. var b = this.data("f"),
  7409. d = b.turn,
  7410. a = b.turnData,
  7411. c = r(0, 0, a.options.acceleration);
  7412. switch (b.effect) {
  7413. case "hard":
  7414. var g = a.pages[b.over];
  7415. b.ogradient.remove();
  7416. b.igradient.remove();
  7417. b.ipage.transform(c);
  7418. g && g.data("f").ipage.transform(c);
  7419. break;
  7420. case "sheet":
  7421. (g = a.pageWrap[b.over]) && g.css({
  7422. overflow: "hidden"
  7423. }),
  7424. b.ipage.css({
  7425. left: 0,
  7426. top: 0,
  7427. right: "auto",
  7428. bottom: "auto"
  7429. }).transform(c),
  7430. b.clip.transform(c),
  7431. b.ogradient.css({
  7432. visibility: "hidden"
  7433. })
  7434. }
  7435. b.visible && 0 === a.front.length && f._removeFromDOM.call(d);
  7436. b.status = "";
  7437. b.visible = !1;
  7438. delete b.point;
  7439. delete b.dpoint;
  7440. delete b.startPoint;
  7441. return this
  7442. },
  7443. hideFoldedPage: function(b) {
  7444. var d = this.data("f"),
  7445. a = this,
  7446. c = d.status,
  7447. f = d.turnData,
  7448. i = d.peel && d.peel.corner == d.dpoint.corner,
  7449. j = function() {
  7450. b && "moving" == c && i ? d.status = "peel": a.trigger("end", [d.page, !1])
  7451. };
  7452. if (b) {
  7453. var k = [d.dpoint, 0, 0, 0];
  7454. k[3] = i ? p._startPoint.call(this, k[0].corner, u(d.peel.x, d.peel.y)) : p._startPoint.call(this, k[0].corner, u(0, 1));
  7455. var m = k[0].y - k[3].y,
  7456. m = "tr" == k[0].corner || "tl" == k[0].corner ? Math.min(0, m) / 2 : Math.max(0, m) / 2;
  7457. k[1] = u(k[0].x, k[0].y + m);
  7458. k[2] = u(k[3].x, k[3].y - m);
  7459. this.animatef(!1);
  7460. this.animatef({
  7461. from: 0,
  7462. to: 1,
  7463. frame: function(b) {
  7464. p._fold.call(a, x(k, b, k[0].corner))
  7465. },
  7466. complete: j,
  7467. easing: f.options.easing,
  7468. duration: 800,
  7469. hiding: !0
  7470. })
  7471. } else this.animatef(!1),
  7472. j()
  7473. },
  7474. turnPage: function(b) {
  7475. var d, a = this,
  7476. c = this.data("f"),
  7477. f = c.turnData,
  7478. i = [0, 0, 0, 0];
  7479. w = Q();
  7480. if (f.display == o.single && -1 == j.inArray(b, M.forward)) {
  7481. var k = f.pages[c.next],
  7482. m = k.data("f"),
  7483. q = m.peel,
  7484. r = parseInt(f.pageWrap[c.page].css("zIndex"), 10) || 0,
  7485. b = m.dpoint ? m.dpoint.corner: b;
  7486. d = y(f.direction == F.ltr ? b.replace("l", "r") : b.replace("r", "l"));
  7487. a = k;
  7488. f.pageWrap[c.page - 1].show().css({
  7489. zIndex: r + 1
  7490. });
  7491. i[0] = m.dpoint ? u(m.dpoint.x, m.dpoint.y) : p._endPoint.call(this, d.corner);
  7492. i[1] = i[0];
  7493. i[2] = p._startPoint.call(this, d.corner, u(0, 20));
  7494. i[3] = q ? p._startPoint.call(this, d.corner, u(q.x, q.y)) : p._startPoint.call(this, d.corner)
  7495. } else {
  7496. k = f.options.elevation;
  7497. if ("string" == typeof k && (m = /^(\d+)(px|%)$/.exec(k)))"px" == m[2] ? k = parseInt(m[1], 10) : "%" == m[2] && (k = parseInt(m[1], 10) / 100 * this.height());
  7498. b = c.dpoint ? c.dpoint.corner: b;
  7499. d = y(b || p._cornerAllowed.call(this)[0]);
  7500. i[0] = c.dpoint || p._startPoint.call(this, d.corner);
  7501. i[1] = c.dpoint ? i[0] : p._startPoint.call(this, d.corner, u(0, k));
  7502. if (0 > i[0].x || i[0].x > this.width()) k = 0;
  7503. i[2] = p._endPoint.call(this, d.corner, u(0, k));
  7504. i[3] = p._endPoint.call(this, d.corner)
  7505. }
  7506. a.animatef(!1).trigger("flip");
  7507. p._showFoldedPage.call(a, i[0]) ? a.animatef({
  7508. from: 0,
  7509. to: 1,
  7510. easing: f.options.easing,
  7511. frame: function(b) {
  7512. p._fold.call(a, x(i, b, d.corner))
  7513. },
  7514. complete: function() {
  7515. a.trigger("end", [c.page, !0])
  7516. },
  7517. duration: f.options.duration,
  7518. turning: !0
  7519. }) : a.trigger("end", [c.page, !0]);
  7520. c.corner = null
  7521. },
  7522. isTurning: function() {
  7523. return this.data("effect") && this.data("effect").turning
  7524. },
  7525. _showWhenHolding: function() {
  7526. var b, d = this.data("f"),
  7527. a = d.turn,
  7528. c = d.turnData;
  7529. if (d.holdingPoint && (b = window.getSelection ? window.getSelection().toString() : document.selection.createRange ? document.selection.createRange().text: void 0, !b)) {
  7530. b = c.display == o.single;
  7531. var f = p._cornerAllowed.call(this);
  7532. b = c.direction == F.ltr ? b ? d.holdingPoint.x > this.width() / 2 ? "r": "l": 0 === d.page % 2 ? "l": "r": b ? d.holdingPoint.x > this.width() / 2 ? "l": "r": 0 === d.page % 2 ? "r": "l";
  7533. a.turn("stop");
  7534. this.animatef(!1); - 1 != j.inArray(b, f) && ((c.tmpListeners || (c.tmpListeners = {},
  7535. c.tmpListeners.tap = D(a, "tap", !0), c.tmpListeners.doubleTap = D(a, "doubleTap", !0)), a = y(b, d.holdingPoint.x, d.holdingPoint.y), c.display == o.single) ? p._detectSinglePage.call(this, a, a, !0) && (d.corner = y(b, d.holdingPoint.x, d.holdingPoint.y)) : p._showFoldedPage.call(this, a, !0) && (d.corner = y(b, d.holdingPoint.x, d.holdingPoint.y)))
  7536. }
  7537. },
  7538. _start: function(b) {
  7539. var d = this.data("f"),
  7540. a = d.turn;
  7541. if (!d.corner && !d.disabled && !this.flip("isTurning")) {
  7542. var c = d.turnData,
  7543. f = p._isIArea.call(this, b);
  7544. if (c.options.hover || d.peel && d.peel.corner == f.corner) {
  7545. c.status = "tapping";
  7546. d.status = "tapping";
  7547. d.corner = f;
  7548. d.startPoint = null;
  7549. w = Q();
  7550. if (d.corner && p._foldingPage.call(this)) return a.turn("update"),
  7551. !0;
  7552. d.corner = null;
  7553. b = K(b);
  7554. f = c.pageWrap[d.page].offset();
  7555. b.x -= f.left;
  7556. b.y -= f.top;
  7557. c.options.smartFlip && -1 != j.inArray(d.page, a.turn("view")) && (0 < b.x && 0 < b.y && b.x < this.width() && b.y < this.height()) && (d.holdingPoint = b, d.startPoint = b, d.holding = setTimeout(j.proxy(p._showWhenHolding, this), 100))
  7558. }
  7559. }
  7560. },
  7561. _move: function(b) {
  7562. var d, a, c = this.data("f");
  7563. if (!c.disabled) {
  7564. b.preventDefault();
  7565. if (c.corner) return a = c.turnData,
  7566. d = a.pageWrap[c.page].offset(),
  7567. c.status = "moving",
  7568. b = K(b),
  7569. b.x -= d.left,
  7570. b.y -= d.top,
  7571. b.corner = c.corner.corner,
  7572. a.display == o.single ? p._detectSinglePage.call(this, b, c.corner) : p._showFoldedPage.call(this, b),
  7573. c.holdingPoint && (window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges ? window.getSelection().removeAllRanges() : document.selection && document.selection.empty()),
  7574. !0;
  7575. if (c.hover && !this.data("effect") && this.is(":visible")) if (b = p._isIArea.call(this, b)) {
  7576. if ("sheet" == c.effect && 2 != b.corner.length) return ! 1;
  7577. if ("peel" != c.status || !c.peel || c.peel.corner != b.corner) {
  7578. a = c.turnData;
  7579. if (a.display == o.single && a.page == a.totalPages) return ! 1; ! R && navigator.userAgent.indexOf("Chrome");
  7580. d = a.options.cornerPosition;
  7581. d = p._startPoint.call(this, b.corner, u(d.x, d.y));
  7582. c.status = "peel";
  7583. b.x = d.x;
  7584. b.y = d.y;
  7585. p._showFoldedPage.call(this, b, !0)
  7586. }
  7587. } else if ("peel" == c.status && (!c.peel || c.peel.corner != c.dpoint.corner)) c.status = "",
  7588. p.hideFoldedPage.call(this, !0);
  7589. return ! 1
  7590. }
  7591. },
  7592. _end: function() {
  7593. var b = this.data("f"),
  7594. d = b.corner,
  7595. a = b.turn,
  7596. c = b.turnData,
  7597. g = b.point || d,
  7598. i = b.page,
  7599. k = this.width(); ! b.disabled && d && (c.display == o.single ? "swiped" != b.status ? 1 == i ? "tapping" == b.status || g.x < k / 2 ? f._turnPage.call(a, b.next, g.corner) : p.hideFoldedPage.call(this, !0) : -1 != j.inArray(g.corner, M.forward) ? "tapping" == b.status || g.x < k / 2 ? f._turnPage.call(a, b.next, g.corner) : p.hideFoldedPage.call(this, !0) : (d = c.pages[b.page - 1], g = d.data("f").point, "tapping" == b.status || g.x > 0.1 * k ? f._turnPage.call(a, b.page - 1, g.corner) : p.turnPage.call(d, g.corner)) : b.status = "": "tapping" == b.status || 0 > g.x || g.x > k ? f._turnPage.call(a, b.next, g.corner) : p.hideFoldedPage.call(this, !0));
  7600. b.holdingPoint && (clearInterval(b.holding), delete b.holdingPoint, delete b.holding);
  7601. c.status = "";
  7602. b.status = "";
  7603. b.corner = null
  7604. },
  7605. _detectSinglePage: function(b, d, a) {
  7606. var c = this.data("f"),
  7607. f = c.turn,
  7608. i = c.turnData;
  7609. i.pageWrap[c.page].offset();
  7610. if ( - 1 == j.inArray(d.corner, M.forward)) {
  7611. a = i.pages[c.page - 1];
  7612. c = a.data("f");
  7613. b.corner = i.direction == F.ltr ? b.corner.replace("l", "r") : b.corner.replace("r", "l");
  7614. if (c.visible) b = p._showFoldedPage.call(a, b, !1);
  7615. else {
  7616. var k = p._endPoint.call(a, b.corner);
  7617. c.point = y(b.corner, k.x, k.y);
  7618. f.turn("stop");
  7619. b = p._showFoldedPage.call(a, b, !0)
  7620. }
  7621. i.corner = d.corner;
  7622. return b
  7623. }
  7624. return p._showFoldedPage.call(this, b, a)
  7625. },
  7626. disable: function(b) {
  7627. this.data("f").disabled = b;
  7628. return this
  7629. },
  7630. hover: function(b) {
  7631. this.data("f").hover = b;
  7632. return this
  7633. },
  7634. peel: function(b, d) {
  7635. var a = this.data("f");
  7636. if (b.corner) {
  7637. if ( - 1 == j.inArray(b.corner, M.all)) throw C("Corner " + b.corner + " is not permitted");
  7638. if ( - 1 != j.inArray(b.corner, p._cornerAllowed.call(this))) {
  7639. var c = a.turnData.options.cornerPosition;
  7640. b.x = b.x || c.x;
  7641. b.y = b.y || c.y;
  7642. c = p._startPoint.call(this, b.corner, u(b.x, b.y));
  7643. a.peel = b;
  7644. a.status = "peel";
  7645. p._showFoldedPage.call(this, y(b.corner, c.x, c.y), d)
  7646. }
  7647. } else a.status = "",
  7648. p.hideFoldedPage.call(this, d);
  7649. return this
  7650. }
  7651. },
  7652. v = {
  7653. init: function(b) {
  7654. if (!b.flipbook) throw C("Slider: Flipbook required");
  7655. var d = {
  7656. pages: {}
  7657. };
  7658. d.options = j.extend({
  7659. pageMargin: 10,
  7660. duration: 500
  7661. },
  7662. b);
  7663. d.flipbook = j(b.flipbook);
  7664. d.previous = j("<div />", {
  7665. "class": "previous-button"
  7666. }).bind("tap", j.proxy(v.previous, this)).appendTo(this);
  7667. d.next = j("<div />", {
  7668. "class": "next-button"
  7669. }).bind("tap", j.proxy(v.next, this)).appendTo(this);
  7670. d.viewer = j("<div />", {
  7671. "class": "viewer"
  7672. }).bind("press", j.proxy(v._viewerPress, this)).bind("moving", j.proxy(v._viewerMoving, this)).bind("unpress", j.proxy(v._viewerUnpress, this)).bind("swipe", j.proxy(v._viewerSwipe, this)).bind("tap", j.proxy(v._viewerTap, this)).appendTo(this);
  7673. d.flipbook.bind("turned", j.proxy(v._pageTurned, this));
  7674. this.data({
  7675. s: d
  7676. });
  7677. v._resize.call(this)
  7678. },
  7679. next: function() {
  7680. v._moveSlide.call(this, 1);
  7681. return this
  7682. },
  7683. previous: function() {
  7684. v._moveSlide.call(this, -1);
  7685. return this
  7686. },
  7687. totalSlides: function() {
  7688. return this.data("s").slides.length
  7689. },
  7690. slide: function(b) {
  7691. var d = this.data("s");
  7692. if (void 0 === b) return d.currentSlide;
  7693. var a;
  7694. if (b == d.currentSlide + 1) this.tslider("next");
  7695. else if (b == d.currentSlide - 1) this.tslider("previous");
  7696. // else if (d.currentSlide != b && (a = d.slides[b])) {
  7697. // var c = d.viewer.width(),
  7698. // f = {};
  7699. // f[k + "transition"] = "none";
  7700. // console.log(v._newSlide)
  7701. // a.element || v._newSlide.call(this, b);
  7702. // d.currentSlide = b;
  7703. // for (b = 0; b < d.slides.length; b++) if (a = d.slides[b]) {
  7704. // var i = b - d.currentSlide;
  7705. // f.visibility = 0 === i ? "visible": "hidden";
  7706. // a.x = i * c;
  7707. // console.dir(a)
  7708. // a.element.css(f).transform(r(a.x, 0, !0))
  7709. // }
  7710. // }
  7711. return this
  7712. },
  7713. _moveSlide: function(b) {
  7714. var d = this.data("s"),
  7715. a = d.slides[d.currentSlide],
  7716. c,
  7717. f = d.viewer.width(),
  7718. i = {
  7719. visibility: "visible"
  7720. };
  7721. i[k + "transition"] = k + "transform " + d.options.duration + "ms";
  7722. if (1 == b) {
  7723. if (! (c = d.slides[d.currentSlide + 1]) || !c.element) {
  7724. delete d.drag;
  7725. a.element.css(i).transform(r(a.x, 0, !0));
  7726. return
  7727. }
  7728. a.element.css(i).transform(r( - f, 0, !0));
  7729. d.currentSlide = Math.min(d.slides.length - 1, d.currentSlide + 1);
  7730. a.x = -f;
  7731. v._newSlide.call(this, d.currentSlide + 1)
  7732. } else {
  7733. if (! (c = d.slides[d.currentSlide - 1]) || !c.element) {
  7734. delete d.drag;
  7735. a.element.css(i).transform(r(a.x, 0, !0));
  7736. return
  7737. }
  7738. a.element.css(i).transform(r(f, 0, !0));
  7739. d.currentSlide = Math.max(0, d.currentSlide - 1);
  7740. a.x = f;
  7741. v._newSlide.call(this, d.currentSlide - 1)
  7742. }
  7743. c.element.css(i).transform(r(0, 0, !0));
  7744. c.x = 0;
  7745. delete d.drag
  7746. },
  7747. _viewerPress: function(b) {
  7748. this.data("s").drag = {
  7749. point: K(b)
  7750. };
  7751. b.preventDefault()
  7752. },
  7753. _viewerMoving: function(b) {
  7754. var d = this.data("s");
  7755. if (d.drag) {
  7756. var a = d.slides[d.currentSlide],
  7757. c = {
  7758. visibility: "visible"
  7759. },
  7760. b = K(b).x - d.drag.point.x,
  7761. f = 0 < b ? d.slides[d.currentSlide - 1] : d.slides[d.currentSlide + 1];
  7762. c[k + "transition"] = "none";
  7763. d.drag.dx = b;
  7764. a.element.css(c).transform(r(a.x + b, 0, !0));
  7765. f && f.element && f.element.css(c).transform(r(f.x + b, 0, !0))
  7766. }
  7767. },
  7768. _viewerUnpress: function() {
  7769. var b = this.data("s");
  7770. if (b.drag) {
  7771. var c = b.slides[b.currentSlide],
  7772. a = 0 < b.drag.dx ? b.slides[b.currentSlide - 1] : b.slides[b.currentSlide + 1];
  7773. if (Math.abs(b.drag.dx) > 0.25 * b.viewer.width()) b.noswipe = !0,
  7774. setTimeout(j.proxy(v._resetSwipe, this), 100),
  7775. 0 < b.drag.dx ? this.tslider("previous") : this.tslider("next");
  7776. else {
  7777. var f = {};
  7778. f[k + "transition"] = k + "transform " + b.options.duration + "ms";
  7779. c.element.css(f).transform(r(c.x, 0, !0));
  7780. a && a.element && a.element.css(f).transform(r(a.x, 0, !0));
  7781. delete b.drag
  7782. }
  7783. }
  7784. },
  7785. _viewerTap: function(b) {
  7786. var c = this.data("s"),
  7787. b = j(b.target),
  7788. a; ((a = b.attr("page")) || (a = b.parent().attr("page"))) && c.flipbook.turn("page", a)
  7789. },
  7790. _viewerSwipe: function(b, c) {
  7791. var a = this.data("s");
  7792. a.noswipe || (0 > c ? this.tslider("next") : this.tslider("previous"), a.noswipe = !1)
  7793. },
  7794. _resetSwipe: function() {
  7795. this.data("s").noswipe = !1
  7796. },
  7797. _setCurrentClass: function() {
  7798. var b = this.data("s"),
  7799. c;
  7800. if (c = b.currentView) b.pages[c[0]] && b.pages[c[0]].removeClass("current"),
  7801. b.pages[c[1]] && b.pages[c[1]].removeClass("current");
  7802. c = b.flipbook.turn("view");
  7803. b.pages[c[0]] && b.pages[c[0]].addClass("current");
  7804. b.pages[c[1]] && b.pages[c[1]].addClass("current");
  7805. b.currentView = c
  7806. },
  7807. _pageTurned: function() {
  7808. var b = this.data("s");
  7809. v._setCurrentClass.call(this);
  7810. this.tslider("slide", v._getCurrentSlide.call(this, b.slides))
  7811. },
  7812. _calculateSlides: function() {
  7813. for (var b = this.data("s"), c = [], a = b.flipbook, f = a.turn("size"), g = a.turn("view"), i = b.viewer.width(), j = b.viewer.height(), f = V({
  7814. width: f.width,
  7815. height: f.height,
  7816. boundWidth: i,
  7817. boundHeight: j
  7818. }), j = f.width / g.length, k = a.turn("pages"), m = 0, o, p = 1; p <= k && (g = a.turn("view", p, !0));) o = g.length * j + 2 * b.options.pageMargin,
  7819. m + o >= i && (c.push({
  7820. lastPage: p - 1,
  7821. width: m,
  7822. pageWidth: j,
  7823. pageHeight: f.height
  7824. }), m = 0),
  7825. m += o,
  7826. p = g[g.length - 1] + 1;
  7827. c.push({
  7828. lastPage: p - 1,
  7829. width: m,
  7830. pageWidth: j,
  7831. pageHeight: f.height
  7832. });
  7833. return c
  7834. },
  7835. _newSlide: function(b) {
  7836. var c = this.data("s"),
  7837. a = c.slides[b];
  7838. console.log(a, 'hello')
  7839. if (a) {
  7840. var f = c.flipbook,
  7841. g = c.viewer.width();
  7842. if (!a.element) {
  7843. a.pages = {};
  7844. a.element = j("<div />", {
  7845. "class": "slide"
  7846. }).css({
  7847. position: "absolute",
  7848. width: a.width,
  7849. height: a.pageHeight,
  7850. top: 0,
  7851. left: c.viewer.width() / 2 - a.width / 2
  7852. });
  7853. for (var i = 0 < b ? c.slides[b - 1].lastPage + 1 : 1, k = c.options.pageMargin, m, p; i <= a.lastPage && (m = f.turn("view", i, !0));) {
  7854. for (var i = 2 == m.length,
  7855. o = 0; o < m.length; o++) c.pages[m[o]] || (c.pages[m[o]] = j("<div />", {
  7856. page: m[o]
  7857. }), this.trigger("newThumbnail", [m[o], c.pages[m[o]]])),
  7858. p = i ? 0 === o ? "page double-even": "page double-odd": "page single",
  7859. c.pages[m[o]].appendTo(a.element).attr("class", p).css({
  7860. position: "absolute",
  7861. width: a.pageWidth,
  7862. height: a.pageHeight,
  7863. left: k,
  7864. top: 0
  7865. }),
  7866. k += a.pageWidth;
  7867. i = m[m.length - 1] + 1;
  7868. k += 2 * c.options.pageMargin
  7869. }
  7870. a.x = (b - c.currentSlide) * g;
  7871. a.element.transform(r(a.x, 0, !0)).appendTo(c.viewer);
  7872. 0 !== a.x && a.element.css({
  7873. visibility: "hidden"
  7874. })
  7875. }
  7876. }
  7877. },
  7878. _resizeSlide: function(b) {
  7879. var c = this.data("s"),
  7880. a = c.flipbook,
  7881. f = c.slides[b],
  7882. g = c.viewer.width(),
  7883. i;
  7884. if (f.element) {
  7885. var m = f.lastPage,
  7886. o, p, q = c.options.pageMargin;
  7887. for (i = 0 < b ? c.slides[b - 1].lastPage + 1 : 1; i <= m && (o = a.turn("view", i, !0));) {
  7888. p = 2 == o.length;
  7889. for (var s = 0; s < o.length; s++) c.pages[o[s]] || (c.pages[o[s]] = j("<div />", {
  7890. page: o[s],
  7891. css: {
  7892. position: "absolute"
  7893. }
  7894. }), this.trigger("newThumbnail", [o[s], c.pages[o[s]]])),
  7895. f.element[0] != c.pages[o[s]].parent()[0] && c.pages[o[s]].appendTo(f.element),
  7896. i = p ? 0 === s ? "page double-even": "page double-odd": "page single",
  7897. c.pages[o[s]].attr("class", i).css({
  7898. width: f.pageWidth,
  7899. height: f.pageHeight,
  7900. left: q,
  7901. top: 0
  7902. }),
  7903. q += f.pageWidth;
  7904. i = o[o.length - 1] + 1;
  7905. q += 2 * c.options.pageMargin
  7906. }
  7907. a = {
  7908. width: f.width,
  7909. height: f.pageHeight,
  7910. top: 0,
  7911. left: c.viewer.width() / 2 - f.width / 2
  7912. };
  7913. f.x = (b - c.currentSlide) * g;
  7914. a[k + "transition"] = "none";
  7915. a.visibility = 0 === f.x ? "visible": "hidden";
  7916. f.element.css(a);
  7917. f.element.transform(r(f.x, 0, !0))
  7918. }
  7919. f.currentLastPage = f.lastPage
  7920. },
  7921. _removeSlide: function(b, c) {
  7922. var a = this.data("s"),
  7923. f = a.slides[b];
  7924. f && f.element && (f.element.remove(), delete f.element);
  7925. c && delete a.slides[b]
  7926. },
  7927. _resize: function() {
  7928. var b = this.data("s");
  7929. b.flipbook.turn("page");
  7930. var c = b.slides || (b.slides = {}),
  7931. a = v._calculateSlides.call(this);
  7932. b.currentSlide = v._getCurrentSlide.call(this, a);
  7933. for (var f = 0; f < a.length; f++) c[f] || (c[f] = {}),
  7934. c[f].currentLastPage || (c[f].currentLastPage = a[f].lastPage),
  7935. j.extend(c[f], a[f]),
  7936. 2 > Math.abs(b.currentSlide - f) ? c[f].element ? v._resizeSlide.call(this, f) : v._newSlide.call(this, f) : v._removeSlide.call(this, f);
  7937. for (f = a.length; f < b.slides.length; f++) v._removeSlide.call(this, f, !0);
  7938. b.slides.length = a.length;
  7939. v._setCurrentClass.call(this)
  7940. },
  7941. _getCurrentSlide: function(b) {
  7942. for (var c = this.data("s").flipbook.turn("page"), a = 0, f = b.length - 1; a <= f;) {
  7943. var g = Math.floor((a + f) / 2);
  7944. if (0 < g && c <= b[g - 1].lastPage) f = g - 1;
  7945. else if (c > b[g].lastPage) a = g + 1;
  7946. else return g
  7947. }
  7948. return - 1
  7949. }
  7950. };
  7951. window.requestAnim = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
  7952. function(b) {
  7953. setTimeout(b, 1E3 / 60)
  7954. };
  7955. j.extend(j.fn, {
  7956. flip: function() {
  7957. return m(j(this[0]), p, arguments)
  7958. },
  7959. turn: function() {
  7960. return m(j(this[0]), f, arguments)
  7961. },
  7962. tslider: function() {
  7963. return m(j(this[0]), v, arguments)
  7964. },
  7965. transform: function(b, c) {
  7966. var a = {};
  7967. c && (a[k + "transform-origin"] = c);
  7968. a[k + "transform"] = b;
  7969. return this.css(a)
  7970. },
  7971. animatef: function(b) {
  7972. var c = this.data();
  7973. if (!b) return c.effect && c.effect.stop(),
  7974. this;
  7975. if (c.effect) {
  7976. c.effect._time = (new Date).getTime();
  7977. for (var a = 0; a < c.effect._elements; a++) c.effect.from[a] = c.effect.current[a],
  7978. c.effect.to[a] = b.to[a] - c.effect.from[a];
  7979. return this
  7980. }
  7981. b.to.length || (b.to = [b.to]);
  7982. b.from.length || (b.from = [b.from]);
  7983. var f = !0;
  7984. c.effect = j.extend({
  7985. current: [],
  7986. _elements: b.to.length,
  7987. _time: (new Date).getTime(),
  7988. stop: function() {
  7989. f = false;
  7990. delete c.effect
  7991. },
  7992. _frame: function() {
  7993. if (f && c.effect) {
  7994. for (var a = this,
  7995. b = Math.min(this.duration, (new Date).getTime() - this._time), i = 0; i < this._elements; i++) this.current[i] = this.easing(b, this.from[i], this.to[i], this.duration);
  7996. f = true;
  7997. this.frame(this._elements == 1 ? this.current[0] : this.current);
  7998. if (b == this.duration) {
  7999. this.stop();
  8000. this.complete && this.complete()
  8001. } else window.requestAnim(function() {
  8002. a._frame()
  8003. })
  8004. }
  8005. }
  8006. },
  8007. b);
  8008. for (b = 0; b < c.effect._elements; b++) c.effect.to[b] -= c.effect.from[b];
  8009. c.effect._frame();
  8010. return this
  8011. }
  8012. });
  8013. j.isTouch = R;
  8014. j.cssPrefix = J;
  8015. j.cssTransitionEnd = Y;
  8016. j.findPos = function(b) {
  8017. var c = {
  8018. top: 0,
  8019. left: 0
  8020. };
  8021. do c.left += b.offsetLeft,
  8022. c.top += b.offsetTop;
  8023. while (b = b.offsetParent);
  8024. return c
  8025. };
  8026. j.turnVerion = "5"
  8027. })(jQuery);
  8028. Issue = Backbone.Model.extend({
  8029. defaults: {
  8030. pages: 1,
  8031. path: "statics/issue/",
  8032. prefixes: !1
  8033. },
  8034. initialize: function() {}
  8035. });
  8036. Page = Backbone.Model.extend({
  8037. idAttribute: "page",
  8038. fetchRegions: function() {
  8039. this.set({
  8040. regions: [{
  8041. i: 0,
  8042. t: "0",
  8043. x: 0,
  8044. y: 0,
  8045. w: 0,
  8046. h: 0,
  8047. url: "www.google.com"
  8048. }]
  8049. })
  8050. },
  8051. fetchDictionary: function() {},
  8052. getResource: function(j) {
  8053. var m = this.get("issue"),
  8054. s = m.get("prefixes")
  8055. s = s ? s[this.get("page")] + "/": this.get("page") + "/";
  8056. console.log(m.get("path") + s, )
  8057. // return m.get("path") + s + j
  8058. const r = Number(s.split('/')[0])
  8059. console.log(r, '我是r');
  8060. const index = r < 10 ? '0' + (r ): r
  8061. // return `https://cdn.temp.luojigou.vip/turn_temp_${r - 2}.jpg`
  8062. return `https://img.luojigou.vip/6.30%E6%B8%B8%E6%88%8F%E5%AE%A4%E6%89%8B%E5%86%8C%E5%91%A8%E5%9B%9B-${index}.jpg`
  8063. }
  8064. });
  8065. var PageList = Backbone.Collection.extend({
  8066. model: Page
  8067. });
  8068. PageView = Backbone.View.extend({
  8069. tagName: "div",
  8070. initialize: function() {
  8071. this.listenTo(this.model, "destroy", this.remove);
  8072. this.listenTo(this.model, "change:regions", this.showRegions);
  8073. this.render()
  8074. },
  8075. render: function() {
  8076. this.$el.html('<div class="gradient"></div><div class="loader"><i></i></div>')
  8077. },
  8078. loadPage: function() {
  8079. var j = this,
  8080. m = $("<img />");
  8081. m.load(function() {
  8082. j.$el.find(".loader").remove();
  8083. $(this).css({
  8084. width: "100%",
  8085. height: "100%"
  8086. });
  8087. $(this).appendTo(j.$el);
  8088. "single" == $("#magazine").turn("display") && $("#magazine .p0").data("f").tPage == j.model.get("page") && ($("#magazine .p0").find("*").remove(), j.$el.clone(!1).css({
  8089. opacity: "0.2",
  8090. overflow: "hidden"
  8091. }).transform("rotateY(180deg)", "50% 50%").appendTo($("#magazine .p0")))
  8092. });
  8093. m.attr("src", this.model.getResource("large.jpg"));
  8094. this.model.fetchRegions()
  8095. },
  8096. showRegions: function() {}
  8097. });
  8098. Magazine = Backbone.View.extend({
  8099. el: $("#magazine"),
  8100. events: {
  8101. turning: "turning",
  8102. turned: "turned",
  8103. tap: "tap",
  8104. doubleTap: "doubleTap",
  8105. pinching: "pinching",
  8106. scrolling: "scrolling",
  8107. zooming: "zooming",
  8108. zoomed: "zoomed",
  8109. missing: "missing",
  8110. removePage: "removePage"
  8111. },
  8112. initialize: function(j) {
  8113. this.app = j.app;
  8114. this.pages = new PageList
  8115. },
  8116. render: function() {
  8117. this.$el.turn({
  8118. view: this,
  8119. width: this.model.get("pageWidth"),
  8120. height: this.model.get("pageHeight"),
  8121. pages: this.model.get("pages"),
  8122. duration: 500,
  8123. responsive: !0,
  8124. autoCenter: !0,
  8125. smartFlip: !0,
  8126. swipe: !0,
  8127. slider: ".thumbnails",
  8128. cornerPosition: "50px 20px",
  8129. events: {
  8130. newThumbnail: $.proxy(this.newThumbnail, this)
  8131. }
  8132. })
  8133. },
  8134. turning: function() {
  8135. $.isTouch ? this.$el.removeClass("animated") : this.$el.addClass("animated")
  8136. },
  8137. turned: function(j, m) {
  8138. $.isTouch || this.$el.removeClass("animated");
  8139. 1 == m && this.$el.turn("peel", "br")
  8140. },
  8141. tap: function(j) { ! $.isTouch && !$("html").hasClass("touch") && ($(j.target).hasClass("region") || (1 == this.$el.turn("zoom") ? this.$el.turn("zoomIn", j) : this.$el.turn("zoomOut")))
  8142. },
  8143. doubleTap: function(j) {
  8144. var m = $(".magazine-viewport").data();
  8145. m.navTimer && (clearInterval(m.navTimer), delete m.navTimer);
  8146. if ($.isTouch || $("html").hasClass("touch")) 1 == this.$el.turn("zoom") ? this.$el.turn("zoomIn", j) : this.$el.turn("zoomOut")
  8147. },
  8148. pinching: function(j) {
  8149. this.$el.turn("zoom", 1, j)
  8150. },
  8151. scrolling: function() {},
  8152. zooming: function() {
  8153. this.$el.removeClass("animated")
  8154. },
  8155. zoomed: function() {
  8156. $("html").removeClass("navigation")
  8157. },
  8158. missing: function(j, m) {
  8159. for (var s = 0; s < m.length; s++) this.addPage(m[s])
  8160. },
  8161. newThumbnail: function(j, m, s) {
  8162. j = (j = this.model.get("prefixes")) ? j[m] + "/": m + "/";
  8163. $("<img />", {
  8164. src: this.model.get("path") + j + "thumb.jpg"
  8165. }).appendTo(s)
  8166. },
  8167. addPage: function(j) {
  8168. var m = this.pages.get(j);
  8169. m || (m = new Page({
  8170. page: j,
  8171. issue: this.model
  8172. }), this.pages.add(m));
  8173. m = new PageView({
  8174. model: m
  8175. });
  8176. this.$el.turn("addPage", m.$el, j, {
  8177. view: m
  8178. }) && m.loadPage()
  8179. },
  8180. removePage: function(j, m) {
  8181. this.$el.turn("pageData", m).view.stopListening()
  8182. }
  8183. });
  8184. Flipfiy = Backbone.View.extend({
  8185. el: $("#viewer"),
  8186. events: {
  8187. "tap .control-next-page": "nextPage",
  8188. "tap .control-previous-page": "previousPage"
  8189. },
  8190. initialize: function() {
  8191. var j = this;
  8192. this.router = new AppRouter({
  8193. app: this
  8194. });
  8195. $(document).keydown(function(m) {
  8196. switch (m.keyCode) {
  8197. case 37:
  8198. j.magazine.$el.turn("previous");
  8199. m.preventDefault();
  8200. break;
  8201. case 39:
  8202. j.magazine.$el.turn("next");
  8203. m.preventDefault();
  8204. break;
  8205. case 27:
  8206. j.magazine.$el.zoom("zoomOut"),
  8207. m.preventDefault()
  8208. }
  8209. });
  8210. $(".magazine-viewport").bind("tap",
  8211. function() {
  8212. if ($("html").hasClass("navigation")) $("html").removeClass("navigation");
  8213. else {
  8214. var j = $(this).data();
  8215. j.navTimer || (j.navTimer = setTimeout(function() {
  8216. delete j.navTimer;
  8217. $(".magazine").turn("isFlipping") || $("html").addClass("navigation")
  8218. },
  8219. 300))
  8220. }
  8221. })
  8222. },
  8223. loadIssue: function(j) {
  8224. this.magazine || (j = new Issue(j), this.magazine = new Magazine({
  8225. model: j
  8226. }), this.magazine.render(), this.magazine.$el.bind("turned", $.proxy(this.pageTurned, this)), Backbone.history.start())
  8227. },
  8228. nextPage: function() {
  8229. this.magazine.$el.turn("next")
  8230. },
  8231. previousPage: function() {
  8232. this.magazine.$el.turn("previous")
  8233. },
  8234. pageTurned: function(j, m) {
  8235. this.router.navigate("page/" + m)
  8236. }
  8237. });
  8238. AppRouter = Backbone.Router.extend({
  8239. routes: {
  8240. "page/:number": "setPage",
  8241. issues: "issues"
  8242. },
  8243. initialize: function(j) {
  8244. this.app = j.app
  8245. },
  8246. setPage: function(j) {
  8247. this.app.magazine.$el.turn("page", j)
  8248. }
  8249. });
  8250. function flipify(j) { (new Flipfiy).loadIssue(j)
  8251. }
  8252. function addPage(j, m) {
  8253. m.turn("pages");
  8254. var s = $("<div />", {
  8255. "class": ""
  8256. });
  8257. m.turn("addPage", s, j) && (s.html('<div class="gradient"></div><div class="loader"><i></i></div>'), loadPage(j, s))
  8258. }
  8259. function loadPage(j, m) {
  8260. var s = $("<img />");
  8261. s.mousedown(function(j) {
  8262. j.preventDefault()
  8263. });
  8264. s.load(function() {
  8265. $(this).css({
  8266. width: "100%",
  8267. height: "100%"
  8268. });
  8269. $(this).appendTo(m);
  8270. m.find(".loader").remove()
  8271. });
  8272. s.attr("src", "statics/issue/imgs/" + j + "-large.jpg");
  8273. loadRegions(j, m)
  8274. }
  8275. function loadRegions(j, m) {
  8276. $.getJSON("pages/" + j + "-regions.json").done(function(j) {
  8277. $.each(j,
  8278. function(j, s) {
  8279. addRegion(s, m)
  8280. })
  8281. })
  8282. }
  8283. function addRegion(j, m) {
  8284. var s = $("<div />", {
  8285. "class": "region " + j["class"]
  8286. }),
  8287. x = $(".magazine").turn("options"),
  8288. y = x.width / 2,
  8289. x = x.height;
  8290. s.css({
  8291. top: Math.round(100 * (j.y / x)) + "%",
  8292. left: Math.round(100 * (j.x / y)) + "%",
  8293. width: Math.round(100 * (j.width / y)) + "%",
  8294. height: Math.round(100 * (j.height / x)) + "%"
  8295. }).attr("region-data", $.param(j.data || ""));
  8296. s.appendTo(m)
  8297. }
  8298. function regionClick(j) {
  8299. j = $(j.target);
  8300. if (j.hasClass("region")) {
  8301. var m = $.trim(j.attr("class").replace("region", ""));
  8302. return processRegion(j, m)
  8303. }
  8304. }
  8305. function processRegion(j, m) {
  8306. data = decodeParams(j.attr("region-data"));
  8307. switch (m) {
  8308. case "link":
  8309. window.open(data.url);
  8310. break;
  8311. case "zoom":
  8312. var s = j.offset(),
  8313. x = $(".magazine-viewport").offset(),
  8314. s = {
  8315. x: s.left - x.left,
  8316. y: s.top - x.top
  8317. };
  8318. $(".magazine-viewport").zoom("zoomIn", s);
  8319. break;
  8320. case "to-page":
  8321. $(".magazine").turn("page", data.page)
  8322. }
  8323. }
  8324. function loadLargePage(j, m) {
  8325. var s = $("<img />");
  8326. s.load(function() {
  8327. var j = m.find("img");
  8328. $(this).css({
  8329. width: "100%",
  8330. height: "100%"
  8331. });
  8332. $(this).appendTo(m);
  8333. j.remove()
  8334. });
  8335. s.attr("src", "pages/" + j + "-large.jpg")
  8336. }
  8337. function loadSmallPage(j, m) {
  8338. var s = m.find("img");
  8339. s.css({
  8340. width: "100%",
  8341. height: "100%"
  8342. });
  8343. s.unbind("load");
  8344. s.attr("src", "pages/" + j + "-large.jpg")
  8345. }
  8346. function isChrome() {
  8347. return - 1 != navigator.userAgent.indexOf("Chrome")
  8348. }
  8349. function disableControls(j) {
  8350. 1 == j ? $(".previous-button").hide() : $(".previous-button").show();
  8351. j == $(".magazine").turn("pages") ? $(".next-button").hide() : $(".next-button").show()
  8352. }
  8353. function resizeViewport() {}
  8354. function zoomTo(j) {
  8355. 1 == $(this).zoom("value") && $(this).zoom("in", j)
  8356. }
  8357. function largeMagazineWidth() {
  8358. return 2214
  8359. }
  8360. function decodeParams(j) {
  8361. for (var j = j.split("&"), m, s = {},
  8362. x = 0; x < j.length; x++) m = j[x].split("="),
  8363. s[decodeURIComponent(m[0])] = decodeURIComponent(m[1]);
  8364. return s
  8365. };