script.js 264 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137
  1. /*! lywz 2018-02-06 */
  2. /*!
  3. * jQuery JavaScript Library v1.9.1
  4. * http://jquery.com/
  5. *
  6. * Includes Sizzle.js
  7. * http://sizzlejs.com/
  8. *
  9. * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
  10. * Released under the MIT license
  11. * http://jquery.org/license
  12. *
  13. * Date: 2013-2-4
  14. */
  15. (function(window, undefined) {
  16. var readyList, rootjQuery, core_strundefined = typeof undefined,
  17. document = window.document,
  18. location = window.location,
  19. _jQuery = window.jQuery,
  20. _$ = window.$,
  21. class2type = {},
  22. core_deletedIds = [],
  23. core_version = "1.9.1",
  24. core_concat = core_deletedIds.concat,
  25. core_push = core_deletedIds.push,
  26. core_slice = core_deletedIds.slice,
  27. core_indexOf = core_deletedIds.indexOf,
  28. core_toString = class2type.toString,
  29. core_hasOwn = class2type.hasOwnProperty,
  30. core_trim = core_version.trim,
  31. jQuery = function(selector, context) {
  32. return new jQuery.fn.init(selector, context, rootjQuery)
  33. },
  34. core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
  35. core_rnotwhite = /\S+/g,
  36. rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
  37. rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
  38. rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
  39. rvalidchars = /^[\],:{}\s]*$/,
  40. rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
  41. rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
  42. rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
  43. rmsPrefix = /^-ms-/,
  44. rdashAlpha = /-([\da-z])/gi,
  45. fcamelCase = function(all, letter) {
  46. return letter.toUpperCase()
  47. },
  48. completed = function(event) {
  49. if(document.addEventListener || event.type === "load" || document.readyState === "complete") {
  50. detach();
  51. jQuery.ready()
  52. }
  53. },
  54. detach = function() {
  55. if(document.addEventListener) {
  56. document.removeEventListener("DOMContentLoaded", completed, false);
  57. window.removeEventListener("load", completed, false)
  58. } else {
  59. document.detachEvent("onreadystatechange", completed);
  60. window.detachEvent("onload", completed)
  61. }
  62. };
  63. jQuery.fn = jQuery.prototype = {
  64. jquery: core_version,
  65. constructor: jQuery,
  66. init: function(selector, context, rootjQuery) {
  67. var match, elem;
  68. if(!selector) {
  69. return this
  70. }
  71. if(typeof selector === "string") {
  72. if(selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
  73. match = [null, selector, null]
  74. } else {
  75. match = rquickExpr.exec(selector)
  76. }
  77. if(match && (match[1] || !context)) {
  78. if(match[1]) {
  79. context = context instanceof jQuery ? context[0] : context;
  80. jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true));
  81. if(rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
  82. for(match in context) {
  83. if(jQuery.isFunction(this[match])) {
  84. this[match](context[match])
  85. } else {
  86. this.attr(match, context[match])
  87. }
  88. }
  89. }
  90. return this
  91. } else {
  92. elem = document.getElementById(match[2]);
  93. if(elem && elem.parentNode) {
  94. if(elem.id !== match[2]) {
  95. return rootjQuery.find(selector)
  96. }
  97. this.length = 1;
  98. this[0] = elem
  99. }
  100. this.context = document;
  101. this.selector = selector;
  102. return this
  103. }
  104. } else if(!context || context.jquery) {
  105. return(context || rootjQuery).find(selector)
  106. } else {
  107. return this.constructor(context).find(selector)
  108. }
  109. } else if(selector.nodeType) {
  110. this.context = this[0] = selector;
  111. this.length = 1;
  112. return this
  113. } else if(jQuery.isFunction(selector)) {
  114. return rootjQuery.ready(selector)
  115. }
  116. if(selector.selector !== undefined) {
  117. this.selector = selector.selector;
  118. this.context = selector.context
  119. }
  120. return jQuery.makeArray(selector, this)
  121. },
  122. selector: "",
  123. length: 0,
  124. size: function() {
  125. return this.length
  126. },
  127. toArray: function() {
  128. return core_slice.call(this)
  129. },
  130. get: function(num) {
  131. return num == null ? this.toArray() : (num < 0 ? this[this.length + num] : this[num])
  132. },
  133. pushStack: function(elems) {
  134. var ret = jQuery.merge(this.constructor(), elems);
  135. ret.prevObject = this;
  136. ret.context = this.context;
  137. return ret
  138. },
  139. each: function(callback, args) {
  140. return jQuery.each(this, callback, args)
  141. },
  142. ready: function(fn) {
  143. jQuery.ready.promise().done(fn);
  144. return this
  145. },
  146. slice: function() {
  147. return this.pushStack(core_slice.apply(this, arguments))
  148. },
  149. first: function() {
  150. return this.eq(0)
  151. },
  152. last: function() {
  153. return this.eq(-1)
  154. },
  155. eq: function(i) {
  156. var len = this.length,
  157. j = +i + (i < 0 ? len : 0);
  158. return this.pushStack(j >= 0 && j < len ? [this[j]] : [])
  159. },
  160. map: function(callback) {
  161. return this.pushStack(jQuery.map(this, function(elem, i) {
  162. return callback.call(elem, i, elem)
  163. }))
  164. },
  165. end: function() {
  166. return this.prevObject || this.constructor(null)
  167. },
  168. push: core_push,
  169. sort: [].sort,
  170. splice: [].splice
  171. };
  172. jQuery.fn.init.prototype = jQuery.fn;
  173. jQuery.extend = jQuery.fn.extend = function() {
  174. var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {},
  175. i = 1,
  176. length = arguments.length,
  177. deep = false;
  178. if(typeof target === "boolean") {
  179. deep = target;
  180. target = arguments[1] || {};
  181. i = 2
  182. }
  183. if(typeof target !== "object" && !jQuery.isFunction(target)) {
  184. target = {}
  185. }
  186. if(length === i) {
  187. target = this;
  188. --i
  189. }
  190. for(; i < length; i++) {
  191. if((options = arguments[i]) != null) {
  192. for(name in options) {
  193. src = target[name];
  194. copy = options[name];
  195. if(target === copy) {
  196. continue
  197. }
  198. if(deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
  199. if(copyIsArray) {
  200. copyIsArray = false;
  201. clone = src && jQuery.isArray(src) ? src : []
  202. } else {
  203. clone = src && jQuery.isPlainObject(src) ? src : {}
  204. }
  205. target[name] = jQuery.extend(deep, clone, copy)
  206. } else if(copy !== undefined) {
  207. target[name] = copy
  208. }
  209. }
  210. }
  211. }
  212. return target
  213. };
  214. jQuery.extend({
  215. noConflict: function(deep) {
  216. if(window.$ === jQuery) {
  217. window.$ = _$
  218. }
  219. if(deep && window.jQuery === jQuery) {
  220. window.jQuery = _jQuery
  221. }
  222. return jQuery
  223. },
  224. isReady: false,
  225. readyWait: 1,
  226. holdReady: function(hold) {
  227. if(hold) {
  228. jQuery.readyWait++
  229. } else {
  230. jQuery.ready(true)
  231. }
  232. },
  233. ready: function(wait) {
  234. if(wait === true ? --jQuery.readyWait : jQuery.isReady) {
  235. return
  236. }
  237. if(!document.body) {
  238. return setTimeout(jQuery.ready)
  239. }
  240. jQuery.isReady = true;
  241. if(wait !== true && --jQuery.readyWait > 0) {
  242. return
  243. }
  244. readyList.resolveWith(document, [jQuery]);
  245. if(jQuery.fn.trigger) {
  246. jQuery(document).trigger("ready").off("ready")
  247. }
  248. },
  249. isFunction: function(obj) {
  250. return jQuery.type(obj) === "function"
  251. },
  252. isArray: Array.isArray || function(obj) {
  253. return jQuery.type(obj) === "array"
  254. },
  255. isWindow: function(obj) {
  256. return obj != null && obj == obj.window
  257. },
  258. isNumeric: function(obj) {
  259. return !isNaN(parseFloat(obj)) && isFinite(obj)
  260. },
  261. type: function(obj) {
  262. if(obj == null) {
  263. return String(obj)
  264. }
  265. return typeof obj === "object" || typeof obj === "function" ? class2type[core_toString.call(obj)] || "object" : typeof obj
  266. },
  267. isPlainObject: function(obj) {
  268. if(!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
  269. return false
  270. }
  271. try {
  272. if(obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
  273. return false
  274. }
  275. } catch(e) {
  276. return false
  277. }
  278. var key;
  279. for(key in obj) {}
  280. return key === undefined || core_hasOwn.call(obj, key)
  281. },
  282. isEmptyObject: function(obj) {
  283. var name;
  284. for(name in obj) {
  285. return false
  286. }
  287. return true
  288. },
  289. error: function(msg) {
  290. throw new Error(msg);
  291. },
  292. parseHTML: function(data, context, keepScripts) {
  293. if(!data || typeof data !== "string") {
  294. return null
  295. }
  296. if(typeof context === "boolean") {
  297. keepScripts = context;
  298. context = false
  299. }
  300. context = context || document;
  301. var parsed = rsingleTag.exec(data),
  302. scripts = !keepScripts && [];
  303. if(parsed) {
  304. return [context.createElement(parsed[1])]
  305. }
  306. parsed = jQuery.buildFragment([data], context, scripts);
  307. if(scripts) {
  308. jQuery(scripts).remove()
  309. }
  310. return jQuery.merge([], parsed.childNodes)
  311. },
  312. parseJSON: function(data) {
  313. if(window.JSON && window.JSON.parse) {
  314. return window.JSON.parse(data)
  315. }
  316. if(data === null) {
  317. return data
  318. }
  319. if(typeof data === "string") {
  320. data = jQuery.trim(data);
  321. if(data) {
  322. if(rvalidchars.test(data.replace(rvalidescape, "@").replace(rvalidtokens, "]").replace(rvalidbraces, ""))) {
  323. return(new Function("return " + data))()
  324. }
  325. }
  326. }
  327. jQuery.error("Invalid JSON: " + data)
  328. },
  329. parseXML: function(data) {
  330. var xml, tmp;
  331. if(!data || typeof data !== "string") {
  332. return null
  333. }
  334. try {
  335. if(window.DOMParser) {
  336. tmp = new DOMParser();
  337. xml = tmp.parseFromString(data, "text/xml")
  338. } else {
  339. xml = new ActiveXObject("Microsoft.XMLDOM");
  340. xml.async = "false";
  341. xml.loadXML(data)
  342. }
  343. } catch(e) {
  344. xml = undefined
  345. }
  346. if(!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
  347. jQuery.error("Invalid XML: " + data)
  348. }
  349. return xml
  350. },
  351. noop: function() {},
  352. globalEval: function(data) {
  353. if(data && jQuery.trim(data)) {
  354. (window.execScript || function(data) {
  355. window["eval"].call(window, data)
  356. })(data)
  357. }
  358. },
  359. camelCase: function(string) {
  360. return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase)
  361. },
  362. nodeName: function(elem, name) {
  363. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase()
  364. },
  365. each: function(obj, callback, args) {
  366. var value, i = 0,
  367. length = obj.length,
  368. isArray = isArraylike(obj);
  369. if(args) {
  370. if(isArray) {
  371. for(; i < length; i++) {
  372. value = callback.apply(obj[i], args);
  373. if(value === false) {
  374. break
  375. }
  376. }
  377. } else {
  378. for(i in obj) {
  379. value = callback.apply(obj[i], args);
  380. if(value === false) {
  381. break
  382. }
  383. }
  384. }
  385. } else {
  386. if(isArray) {
  387. for(; i < length; i++) {
  388. value = callback.call(obj[i], i, obj[i]);
  389. if(value === false) {
  390. break
  391. }
  392. }
  393. } else {
  394. for(i in obj) {
  395. value = callback.call(obj[i], i, obj[i]);
  396. if(value === false) {
  397. break
  398. }
  399. }
  400. }
  401. }
  402. return obj
  403. },
  404. trim: core_trim && !core_trim.call("\uFEFF\xA0") ? function(text) {
  405. return text == null ? "" : core_trim.call(text)
  406. } : function(text) {
  407. return text == null ? "" : (text + "").replace(rtrim, "")
  408. },
  409. makeArray: function(arr, results) {
  410. var ret = results || [];
  411. if(arr != null) {
  412. if(isArraylike(Object(arr))) {
  413. jQuery.merge(ret, typeof arr === "string" ? [arr] : arr)
  414. } else {
  415. core_push.call(ret, arr)
  416. }
  417. }
  418. return ret
  419. },
  420. inArray: function(elem, arr, i) {
  421. var len;
  422. if(arr) {
  423. if(core_indexOf) {
  424. return core_indexOf.call(arr, elem, i)
  425. }
  426. len = arr.length;
  427. i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
  428. for(; i < len; i++) {
  429. if(i in arr && arr[i] === elem) {
  430. return i
  431. }
  432. }
  433. }
  434. return -1
  435. },
  436. merge: function(first, second) {
  437. var l = second.length,
  438. i = first.length,
  439. j = 0;
  440. if(typeof l === "number") {
  441. for(; j < l; j++) {
  442. first[i++] = second[j]
  443. }
  444. } else {
  445. while(second[j] !== undefined) {
  446. first[i++] = second[j++]
  447. }
  448. }
  449. first.length = i;
  450. return first
  451. },
  452. grep: function(elems, callback, inv) {
  453. var retVal, ret = [],
  454. i = 0,
  455. length = elems.length;
  456. inv = !!inv;
  457. for(; i < length; i++) {
  458. retVal = !!callback(elems[i], i);
  459. if(inv !== retVal) {
  460. ret.push(elems[i])
  461. }
  462. }
  463. return ret
  464. },
  465. map: function(elems, callback, arg) {
  466. var value, i = 0,
  467. length = elems.length,
  468. isArray = isArraylike(elems),
  469. ret = [];
  470. if(isArray) {
  471. for(; i < length; i++) {
  472. value = callback(elems[i], i, arg);
  473. if(value != null) {
  474. ret[ret.length] = value
  475. }
  476. }
  477. } else {
  478. for(i in elems) {
  479. value = callback(elems[i], i, arg);
  480. if(value != null) {
  481. ret[ret.length] = value
  482. }
  483. }
  484. }
  485. return core_concat.apply([], ret)
  486. },
  487. guid: 1,
  488. proxy: function(fn, context) {
  489. var args, proxy, tmp;
  490. if(typeof context === "string") {
  491. tmp = fn[context];
  492. context = fn;
  493. fn = tmp
  494. }
  495. if(!jQuery.isFunction(fn)) {
  496. return undefined
  497. }
  498. args = core_slice.call(arguments, 2);
  499. proxy = function() {
  500. return fn.apply(context || this, args.concat(core_slice.call(arguments)))
  501. };
  502. proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  503. return proxy
  504. },
  505. access: function(elems, fn, key, value, chainable, emptyGet, raw) {
  506. var i = 0,
  507. length = elems.length,
  508. bulk = key == null;
  509. if(jQuery.type(key) === "object") {
  510. chainable = true;
  511. for(i in key) {
  512. jQuery.access(elems, fn, i, key[i], true, emptyGet, raw)
  513. }
  514. } else if(value !== undefined) {
  515. chainable = true;
  516. if(!jQuery.isFunction(value)) {
  517. raw = true
  518. }
  519. if(bulk) {
  520. if(raw) {
  521. fn.call(elems, value);
  522. fn = null
  523. } else {
  524. bulk = fn;
  525. fn = function(elem, key, value) {
  526. return bulk.call(jQuery(elem), value)
  527. }
  528. }
  529. }
  530. if(fn) {
  531. for(; i < length; i++) {
  532. fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)))
  533. }
  534. }
  535. }
  536. return chainable ? elems : bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet
  537. },
  538. now: function() {
  539. return(new Date()).getTime()
  540. }
  541. });
  542. jQuery.ready.promise = function(obj) {
  543. if(!readyList) {
  544. readyList = jQuery.Deferred();
  545. if(document.readyState === "complete") {
  546. setTimeout(jQuery.ready)
  547. } else if(document.addEventListener) {
  548. document.addEventListener("DOMContentLoaded", completed, false);
  549. window.addEventListener("load", completed, false)
  550. } else {
  551. document.attachEvent("onreadystatechange", completed);
  552. window.attachEvent("onload", completed);
  553. var top = false;
  554. try {
  555. top = window.frameElement == null && document.documentElement
  556. } catch(e) {}
  557. if(top && top.doScroll) {
  558. (function doScrollCheck() {
  559. if(!jQuery.isReady) {
  560. try {
  561. top.doScroll("left")
  562. } catch(e) {
  563. return setTimeout(doScrollCheck, 50)
  564. }
  565. detach();
  566. jQuery.ready()
  567. }
  568. })()
  569. }
  570. }
  571. }
  572. return readyList.promise(obj)
  573. };
  574. jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
  575. class2type["[object " + name + "]"] = name.toLowerCase()
  576. });
  577. function isArraylike(obj) {
  578. var length = obj.length,
  579. type = jQuery.type(obj);
  580. if(jQuery.isWindow(obj)) {
  581. return false
  582. }
  583. if(obj.nodeType === 1 && length) {
  584. return true
  585. }
  586. return type === "array" || type !== "function" && (length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj)
  587. }
  588. rootjQuery = jQuery(document);
  589. var optionsCache = {};
  590. function createOptions(options) {
  591. var object = optionsCache[options] = {};
  592. jQuery.each(options.match(core_rnotwhite) || [], function(_, flag) {
  593. object[flag] = true
  594. });
  595. return object
  596. }
  597. jQuery.Callbacks = function(options) {
  598. options = typeof options === "string" ? (optionsCache[options] || createOptions(options)) : jQuery.extend({}, options);
  599. var firing, memory, fired, firingLength, firingIndex, firingStart, list = [],
  600. stack = !options.once && [],
  601. fire = function(data) {
  602. memory = options.memory && data;
  603. fired = true;
  604. firingIndex = firingStart || 0;
  605. firingStart = 0;
  606. firingLength = list.length;
  607. firing = true;
  608. for(; list && firingIndex < firingLength; firingIndex++) {
  609. if(list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
  610. memory = false;
  611. break
  612. }
  613. }
  614. firing = false;
  615. if(list) {
  616. if(stack) {
  617. if(stack.length) {
  618. fire(stack.shift())
  619. }
  620. } else if(memory) {
  621. list = []
  622. } else {
  623. self.disable()
  624. }
  625. }
  626. },
  627. self = {
  628. add: function() {
  629. if(list) {
  630. var start = list.length;
  631. (function add(args) {
  632. jQuery.each(args, function(_, arg) {
  633. var type = jQuery.type(arg);
  634. if(type === "function") {
  635. if(!options.unique || !self.has(arg)) {
  636. list.push(arg)
  637. }
  638. } else if(arg && arg.length && type !== "string") {
  639. add(arg)
  640. }
  641. })
  642. })(arguments);
  643. if(firing) {
  644. firingLength = list.length
  645. } else if(memory) {
  646. firingStart = start;
  647. fire(memory)
  648. }
  649. }
  650. return this
  651. },
  652. remove: function() {
  653. if(list) {
  654. jQuery.each(arguments, function(_, arg) {
  655. var index;
  656. while((index = jQuery.inArray(arg, list, index)) > -1) {
  657. list.splice(index, 1);
  658. if(firing) {
  659. if(index <= firingLength) {
  660. firingLength--
  661. }
  662. if(index <= firingIndex) {
  663. firingIndex--
  664. }
  665. }
  666. }
  667. })
  668. }
  669. return this
  670. },
  671. has: function(fn) {
  672. return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length)
  673. },
  674. empty: function() {
  675. list = [];
  676. return this
  677. },
  678. disable: function() {
  679. list = stack = memory = undefined;
  680. return this
  681. },
  682. disabled: function() {
  683. return !list
  684. },
  685. lock: function() {
  686. stack = undefined;
  687. if(!memory) {
  688. self.disable()
  689. }
  690. return this
  691. },
  692. locked: function() {
  693. return !stack
  694. },
  695. fireWith: function(context, args) {
  696. args = args || [];
  697. args = [context, args.slice ? args.slice() : args];
  698. if(list && (!fired || stack)) {
  699. if(firing) {
  700. stack.push(args)
  701. } else {
  702. fire(args)
  703. }
  704. }
  705. return this
  706. },
  707. fire: function() {
  708. self.fireWith(this, arguments);
  709. return this
  710. },
  711. fired: function() {
  712. return !!fired
  713. }
  714. };
  715. return self
  716. };
  717. jQuery.extend({
  718. Deferred: function(func) {
  719. var tuples = [
  720. ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
  721. ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
  722. ["notify", "progress", jQuery.Callbacks("memory")]
  723. ],
  724. state = "pending",
  725. promise = {
  726. state: function() {
  727. return state
  728. },
  729. always: function() {
  730. deferred.done(arguments).fail(arguments);
  731. return this
  732. },
  733. then: function() {
  734. var fns = arguments;
  735. return jQuery.Deferred(function(newDefer) {
  736. jQuery.each(tuples, function(i, tuple) {
  737. var action = tuple[0],
  738. fn = jQuery.isFunction(fns[i]) && fns[i];
  739. deferred[tuple[1]](function() {
  740. var returned = fn && fn.apply(this, arguments);
  741. if(returned && jQuery.isFunction(returned.promise)) {
  742. returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)
  743. } else {
  744. newDefer[action + "With"](this === promise ? newDefer.promise() : this, fn ? [returned] : arguments)
  745. }
  746. })
  747. });
  748. fns = null
  749. }).promise()
  750. },
  751. promise: function(obj) {
  752. return obj != null ? jQuery.extend(obj, promise) : promise
  753. }
  754. },
  755. deferred = {};
  756. promise.pipe = promise.then;
  757. jQuery.each(tuples, function(i, tuple) {
  758. var list = tuple[2],
  759. stateString = tuple[3];
  760. promise[tuple[1]] = list.add;
  761. if(stateString) {
  762. list.add(function() {
  763. state = stateString
  764. }, tuples[i ^ 1][2].disable, tuples[2][2].lock)
  765. }
  766. deferred[tuple[0]] = function() {
  767. deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
  768. return this
  769. };
  770. deferred[tuple[0] + "With"] = list.fireWith
  771. });
  772. promise.promise(deferred);
  773. if(func) {
  774. func.call(deferred, deferred)
  775. }
  776. return deferred
  777. },
  778. when: function(subordinate) {
  779. var i = 0,
  780. resolveValues = core_slice.call(arguments),
  781. length = resolveValues.length,
  782. remaining = length !== 1 || (subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0,
  783. deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
  784. updateFunc = function(i, contexts, values) {
  785. return function(value) {
  786. contexts[i] = this;
  787. values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
  788. if(values === progressValues) {
  789. deferred.notifyWith(contexts, values)
  790. } else if(!(--remaining)) {
  791. deferred.resolveWith(contexts, values)
  792. }
  793. }
  794. },
  795. progressValues, progressContexts, resolveContexts;
  796. if(length > 1) {
  797. progressValues = new Array(length);
  798. progressContexts = new Array(length);
  799. resolveContexts = new Array(length);
  800. for(; i < length; i++) {
  801. if(resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
  802. resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues)).fail(deferred.reject).progress(updateFunc(i, progressContexts, progressValues))
  803. } else {
  804. --remaining
  805. }
  806. }
  807. }
  808. if(!remaining) {
  809. deferred.resolveWith(resolveContexts, resolveValues)
  810. }
  811. return deferred.promise()
  812. }
  813. });
  814. jQuery.support = (function() {
  815. var support, all, a, input, select, fragment, opt, eventName, isSupported, i, div = document.createElement("div");
  816. div.setAttribute("className", "t");
  817. div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
  818. all = div.getElementsByTagName("*");
  819. a = div.getElementsByTagName("a")[0];
  820. if(!all || !a || !all.length) {
  821. return {}
  822. }
  823. select = document.createElement("select");
  824. opt = select.appendChild(document.createElement("option"));
  825. input = div.getElementsByTagName("input")[0];
  826. a.style.cssText = "top:1px;float:left;opacity:.5";
  827. support = {
  828. getSetAttribute: div.className !== "t",
  829. leadingWhitespace: div.firstChild.nodeType === 3,
  830. tbody: !div.getElementsByTagName("tbody").length,
  831. htmlSerialize: !!div.getElementsByTagName("link").length,
  832. style: /top/.test(a.getAttribute("style")),
  833. hrefNormalized: a.getAttribute("href") === "/a",
  834. opacity: /^0.5/.test(a.style.opacity),
  835. cssFloat: !!a.style.cssFloat,
  836. checkOn: !!input.value,
  837. optSelected: opt.selected,
  838. enctype: !!document.createElement("form").enctype,
  839. html5Clone: document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
  840. boxModel: document.compatMode === "CSS1Compat",
  841. deleteExpando: true,
  842. noCloneEvent: true,
  843. inlineBlockNeedsLayout: false,
  844. shrinkWrapBlocks: false,
  845. reliableMarginRight: true,
  846. boxSizingReliable: true,
  847. pixelPosition: false
  848. };
  849. input.checked = true;
  850. support.noCloneChecked = input.cloneNode(true).checked;
  851. select.disabled = true;
  852. support.optDisabled = !opt.disabled;
  853. try {
  854. delete div.test
  855. } catch(e) {
  856. support.deleteExpando = false
  857. }
  858. input = document.createElement("input");
  859. input.setAttribute("value", "");
  860. support.input = input.getAttribute("value") === "";
  861. input.value = "t";
  862. input.setAttribute("type", "radio");
  863. support.radioValue = input.value === "t";
  864. input.setAttribute("checked", "t");
  865. input.setAttribute("name", "t");
  866. fragment = document.createDocumentFragment();
  867. fragment.appendChild(input);
  868. support.appendChecked = input.checked;
  869. support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
  870. if(div.attachEvent) {
  871. div.attachEvent("onclick", function() {
  872. support.noCloneEvent = false
  873. });
  874. div.cloneNode(true).click()
  875. }
  876. for(i in {
  877. submit: true,
  878. change: true,
  879. focusin: true
  880. }) {
  881. div.setAttribute(eventName = "on" + i, "t");
  882. support[i + "Bubbles"] = eventName in window || div.attributes[eventName].expando === false
  883. }
  884. div.style.backgroundClip = "content-box";
  885. div.cloneNode(true).style.backgroundClip = "";
  886. support.clearCloneStyle = div.style.backgroundClip === "content-box";
  887. jQuery(function() {
  888. var container, marginDiv, tds, divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
  889. body = document.getElementsByTagName("body")[0];
  890. if(!body) {
  891. return
  892. }
  893. container = document.createElement("div");
  894. container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
  895. body.appendChild(container).appendChild(div);
  896. div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
  897. tds = div.getElementsByTagName("td");
  898. tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
  899. isSupported = (tds[0].offsetHeight === 0);
  900. tds[0].style.display = "";
  901. tds[1].style.display = "none";
  902. support.reliableHiddenOffsets = isSupported && (tds[0].offsetHeight === 0);
  903. div.innerHTML = "";
  904. div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
  905. support.boxSizing = (div.offsetWidth === 4);
  906. support.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== 1);
  907. if(window.getComputedStyle) {
  908. support.pixelPosition = (window.getComputedStyle(div, null) || {}).top !== "1%";
  909. support.boxSizingReliable = (window.getComputedStyle(div, null) || {
  910. width: "4px"
  911. }).width === "4px";
  912. marginDiv = div.appendChild(document.createElement("div"));
  913. marginDiv.style.cssText = div.style.cssText = divReset;
  914. marginDiv.style.marginRight = marginDiv.style.width = "0";
  915. div.style.width = "1px";
  916. support.reliableMarginRight = !parseFloat((window.getComputedStyle(marginDiv, null) || {}).marginRight)
  917. }
  918. if(typeof div.style.zoom !== core_strundefined) {
  919. div.innerHTML = "";
  920. div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
  921. support.inlineBlockNeedsLayout = (div.offsetWidth === 3);
  922. div.style.display = "block";
  923. div.innerHTML = "<div></div>";
  924. div.firstChild.style.width = "5px";
  925. support.shrinkWrapBlocks = (div.offsetWidth !== 3);
  926. if(support.inlineBlockNeedsLayout) {
  927. body.style.zoom = 1
  928. }
  929. }
  930. body.removeChild(container);
  931. container = div = tds = marginDiv = null
  932. });
  933. all = select = fragment = opt = a = input = null;
  934. return support
  935. })();
  936. var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
  937. rmultiDash = /([A-Z])/g;
  938. function internalData(elem, name, data, pvt) {
  939. if(!jQuery.acceptData(elem)) {
  940. return
  941. }
  942. var thisCache, ret, internalKey = jQuery.expando,
  943. getByName = typeof name === "string",
  944. isNode = elem.nodeType,
  945. cache = isNode ? jQuery.cache : elem,
  946. id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
  947. if((!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined) {
  948. return
  949. }
  950. if(!id) {
  951. if(isNode) {
  952. elem[internalKey] = id = core_deletedIds.pop() || jQuery.guid++
  953. } else {
  954. id = internalKey
  955. }
  956. }
  957. if(!cache[id]) {
  958. cache[id] = {};
  959. if(!isNode) {
  960. cache[id].toJSON = jQuery.noop
  961. }
  962. }
  963. if(typeof name === "object" || typeof name === "function") {
  964. if(pvt) {
  965. cache[id] = jQuery.extend(cache[id], name)
  966. } else {
  967. cache[id].data = jQuery.extend(cache[id].data, name)
  968. }
  969. }
  970. thisCache = cache[id];
  971. if(!pvt) {
  972. if(!thisCache.data) {
  973. thisCache.data = {}
  974. }
  975. thisCache = thisCache.data
  976. }
  977. if(data !== undefined) {
  978. thisCache[jQuery.camelCase(name)] = data
  979. }
  980. if(getByName) {
  981. ret = thisCache[name];
  982. if(ret == null) {
  983. ret = thisCache[jQuery.camelCase(name)]
  984. }
  985. } else {
  986. ret = thisCache
  987. }
  988. return ret
  989. }
  990. function internalRemoveData(elem, name, pvt) {
  991. if(!jQuery.acceptData(elem)) {
  992. return
  993. }
  994. var i, l, thisCache, isNode = elem.nodeType,
  995. cache = isNode ? jQuery.cache : elem,
  996. id = isNode ? elem[jQuery.expando] : jQuery.expando;
  997. if(!cache[id]) {
  998. return
  999. }
  1000. if(name) {
  1001. thisCache = pvt ? cache[id] : cache[id].data;
  1002. if(thisCache) {
  1003. if(!jQuery.isArray(name)) {
  1004. if(name in thisCache) {
  1005. name = [name]
  1006. } else {
  1007. name = jQuery.camelCase(name);
  1008. if(name in thisCache) {
  1009. name = [name]
  1010. } else {
  1011. name = name.split(" ")
  1012. }
  1013. }
  1014. } else {
  1015. name = name.concat(jQuery.map(name, jQuery.camelCase))
  1016. }
  1017. for(i = 0, l = name.length; i < l; i++) {
  1018. delete thisCache[name[i]]
  1019. }
  1020. if(!(pvt ? isEmptyDataObject : jQuery.isEmptyObject)(thisCache)) {
  1021. return
  1022. }
  1023. }
  1024. }
  1025. if(!pvt) {
  1026. delete cache[id].data;
  1027. if(!isEmptyDataObject(cache[id])) {
  1028. return
  1029. }
  1030. }
  1031. if(isNode) {
  1032. jQuery.cleanData([elem], true)
  1033. } else if(jQuery.support.deleteExpando || cache != cache.window) {
  1034. delete cache[id]
  1035. } else {
  1036. cache[id] = null
  1037. }
  1038. }
  1039. jQuery.extend({
  1040. cache: {},
  1041. expando: "jQuery" + (core_version + Math.random()).replace(/\D/g, ""),
  1042. noData: {
  1043. "embed": true,
  1044. "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
  1045. "applet": true
  1046. },
  1047. hasData: function(elem) {
  1048. elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
  1049. return !!elem && !isEmptyDataObject(elem)
  1050. },
  1051. data: function(elem, name, data) {
  1052. return internalData(elem, name, data)
  1053. },
  1054. removeData: function(elem, name) {
  1055. return internalRemoveData(elem, name)
  1056. },
  1057. _data: function(elem, name, data) {
  1058. return internalData(elem, name, data, true)
  1059. },
  1060. _removeData: function(elem, name) {
  1061. return internalRemoveData(elem, name, true)
  1062. },
  1063. acceptData: function(elem) {
  1064. if(elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9) {
  1065. return false
  1066. }
  1067. var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
  1068. return !noData || noData !== true && elem.getAttribute("classid") === noData
  1069. }
  1070. });
  1071. jQuery.fn.extend({
  1072. data: function(key, value) {
  1073. var attrs, name, elem = this[0],
  1074. i = 0,
  1075. data = null;
  1076. if(key === undefined) {
  1077. if(this.length) {
  1078. data = jQuery.data(elem);
  1079. if(elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
  1080. attrs = elem.attributes;
  1081. for(; i < attrs.length; i++) {
  1082. name = attrs[i].name;
  1083. if(!name.indexOf("data-")) {
  1084. name = jQuery.camelCase(name.slice(5));
  1085. dataAttr(elem, name, data[name])
  1086. }
  1087. }
  1088. jQuery._data(elem, "parsedAttrs", true)
  1089. }
  1090. }
  1091. return data
  1092. }
  1093. if(typeof key === "object") {
  1094. return this.each(function() {
  1095. jQuery.data(this, key)
  1096. })
  1097. }
  1098. return jQuery.access(this, function(value) {
  1099. if(value === undefined) {
  1100. return elem ? dataAttr(elem, key, jQuery.data(elem, key)) : null
  1101. }
  1102. this.each(function() {
  1103. jQuery.data(this, key, value)
  1104. })
  1105. }, null, value, arguments.length > 1, null, true)
  1106. },
  1107. removeData: function(key) {
  1108. return this.each(function() {
  1109. jQuery.removeData(this, key)
  1110. })
  1111. }
  1112. });
  1113. function dataAttr(elem, key, data) {
  1114. if(data === undefined && elem.nodeType === 1) {
  1115. var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
  1116. data = elem.getAttribute(name);
  1117. if(typeof data === "string") {
  1118. try {
  1119. data = data === "true" ? true : data === "false" ? false : data === "null" ? null : +data + "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data
  1120. } catch(e) {}
  1121. jQuery.data(elem, key, data)
  1122. } else {
  1123. data = undefined
  1124. }
  1125. }
  1126. return data
  1127. }
  1128. function isEmptyDataObject(obj) {
  1129. var name;
  1130. for(name in obj) {
  1131. if(name === "data" && jQuery.isEmptyObject(obj[name])) {
  1132. continue
  1133. }
  1134. if(name !== "toJSON") {
  1135. return false
  1136. }
  1137. }
  1138. return true
  1139. }
  1140. jQuery.extend({
  1141. queue: function(elem, type, data) {
  1142. var queue;
  1143. if(elem) {
  1144. type = (type || "fx") + "queue";
  1145. queue = jQuery._data(elem, type);
  1146. if(data) {
  1147. if(!queue || jQuery.isArray(data)) {
  1148. queue = jQuery._data(elem, type, jQuery.makeArray(data))
  1149. } else {
  1150. queue.push(data)
  1151. }
  1152. }
  1153. return queue || []
  1154. }
  1155. },
  1156. dequeue: function(elem, type) {
  1157. type = type || "fx";
  1158. var queue = jQuery.queue(elem, type),
  1159. startLength = queue.length,
  1160. fn = queue.shift(),
  1161. hooks = jQuery._queueHooks(elem, type),
  1162. next = function() {
  1163. jQuery.dequeue(elem, type)
  1164. };
  1165. if(fn === "inprogress") {
  1166. fn = queue.shift();
  1167. startLength--
  1168. }
  1169. hooks.cur = fn;
  1170. if(fn) {
  1171. if(type === "fx") {
  1172. queue.unshift("inprogress")
  1173. }
  1174. delete hooks.stop;
  1175. fn.call(elem, next, hooks)
  1176. }
  1177. if(!startLength && hooks) {
  1178. hooks.empty.fire()
  1179. }
  1180. },
  1181. _queueHooks: function(elem, type) {
  1182. var key = type + "queueHooks";
  1183. return jQuery._data(elem, key) || jQuery._data(elem, key, {
  1184. empty: jQuery.Callbacks("once memory").add(function() {
  1185. jQuery._removeData(elem, type + "queue");
  1186. jQuery._removeData(elem, key)
  1187. })
  1188. })
  1189. }
  1190. });
  1191. jQuery.fn.extend({
  1192. queue: function(type, data) {
  1193. var setter = 2;
  1194. if(typeof type !== "string") {
  1195. data = type;
  1196. type = "fx";
  1197. setter--
  1198. }
  1199. if(arguments.length < setter) {
  1200. return jQuery.queue(this[0], type)
  1201. }
  1202. return data === undefined ? this : this.each(function() {
  1203. var queue = jQuery.queue(this, type, data);
  1204. jQuery._queueHooks(this, type);
  1205. if(type === "fx" && queue[0] !== "inprogress") {
  1206. jQuery.dequeue(this, type)
  1207. }
  1208. })
  1209. },
  1210. dequeue: function(type) {
  1211. return this.each(function() {
  1212. jQuery.dequeue(this, type)
  1213. })
  1214. },
  1215. delay: function(time, type) {
  1216. time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
  1217. type = type || "fx";
  1218. return this.queue(type, function(next, hooks) {
  1219. var timeout = setTimeout(next, time);
  1220. hooks.stop = function() {
  1221. clearTimeout(timeout)
  1222. }
  1223. })
  1224. },
  1225. clearQueue: function(type) {
  1226. return this.queue(type || "fx", [])
  1227. },
  1228. promise: function(type, obj) {
  1229. var tmp, count = 1,
  1230. defer = jQuery.Deferred(),
  1231. elements = this,
  1232. i = this.length,
  1233. resolve = function() {
  1234. if(!(--count)) {
  1235. defer.resolveWith(elements, [elements])
  1236. }
  1237. };
  1238. if(typeof type !== "string") {
  1239. obj = type;
  1240. type = undefined
  1241. }
  1242. type = type || "fx";
  1243. while(i--) {
  1244. tmp = jQuery._data(elements[i], type + "queueHooks");
  1245. if(tmp && tmp.empty) {
  1246. count++;
  1247. tmp.empty.add(resolve)
  1248. }
  1249. }
  1250. resolve();
  1251. return defer.promise(obj)
  1252. }
  1253. });
  1254. var nodeHook, boolHook, rclass = /[\t\r\n]/g,
  1255. rreturn = /\r/g,
  1256. rfocusable = /^(?:input|select|textarea|button|object)$/i,
  1257. rclickable = /^(?:a|area)$/i,
  1258. rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
  1259. ruseDefault = /^(?:checked|selected)$/i,
  1260. getSetAttribute = jQuery.support.getSetAttribute,
  1261. getSetInput = jQuery.support.input;
  1262. jQuery.fn.extend({
  1263. attr: function(name, value) {
  1264. return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1)
  1265. },
  1266. removeAttr: function(name) {
  1267. return this.each(function() {
  1268. jQuery.removeAttr(this, name)
  1269. })
  1270. },
  1271. prop: function(name, value) {
  1272. return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1)
  1273. },
  1274. removeProp: function(name) {
  1275. name = jQuery.propFix[name] || name;
  1276. return this.each(function() {
  1277. try {
  1278. this[name] = undefined;
  1279. delete this[name]
  1280. } catch(e) {}
  1281. })
  1282. },
  1283. addClass: function(value) {
  1284. var classes, elem, cur, clazz, j, i = 0,
  1285. len = this.length,
  1286. proceed = typeof value === "string" && value;
  1287. if(jQuery.isFunction(value)) {
  1288. return this.each(function(j) {
  1289. jQuery(this).addClass(value.call(this, j, this.className))
  1290. })
  1291. }
  1292. if(proceed) {
  1293. classes = (value || "").match(core_rnotwhite) || [];
  1294. for(; i < len; i++) {
  1295. elem = this[i];
  1296. cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : " ");
  1297. if(cur) {
  1298. j = 0;
  1299. while((clazz = classes[j++])) {
  1300. if(cur.indexOf(" " + clazz + " ") < 0) {
  1301. cur += clazz + " "
  1302. }
  1303. }
  1304. elem.className = jQuery.trim(cur)
  1305. }
  1306. }
  1307. }
  1308. return this
  1309. },
  1310. removeClass: function(value) {
  1311. var classes, elem, cur, clazz, j, i = 0,
  1312. len = this.length,
  1313. proceed = arguments.length === 0 || typeof value === "string" && value;
  1314. if(jQuery.isFunction(value)) {
  1315. return this.each(function(j) {
  1316. jQuery(this).removeClass(value.call(this, j, this.className))
  1317. })
  1318. }
  1319. if(proceed) {
  1320. classes = (value || "").match(core_rnotwhite) || [];
  1321. for(; i < len; i++) {
  1322. elem = this[i];
  1323. cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(rclass, " ") : "");
  1324. if(cur) {
  1325. j = 0;
  1326. while((clazz = classes[j++])) {
  1327. while(cur.indexOf(" " + clazz + " ") >= 0) {
  1328. cur = cur.replace(" " + clazz + " ", " ")
  1329. }
  1330. }
  1331. elem.className = value ? jQuery.trim(cur) : ""
  1332. }
  1333. }
  1334. }
  1335. return this
  1336. },
  1337. toggleClass: function(value, stateVal) {
  1338. var type = typeof value,
  1339. isBool = typeof stateVal === "boolean";
  1340. if(jQuery.isFunction(value)) {
  1341. return this.each(function(i) {
  1342. jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal)
  1343. })
  1344. }
  1345. return this.each(function() {
  1346. if(type === "string") {
  1347. var className, i = 0,
  1348. self = jQuery(this),
  1349. state = stateVal,
  1350. classNames = value.match(core_rnotwhite) || [];
  1351. while((className = classNames[i++])) {
  1352. state = isBool ? state : !self.hasClass(className);
  1353. self[state ? "addClass" : "removeClass"](className)
  1354. }
  1355. } else if(type === core_strundefined || type === "boolean") {
  1356. if(this.className) {
  1357. jQuery._data(this, "__className__", this.className)
  1358. }
  1359. this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || ""
  1360. }
  1361. })
  1362. },
  1363. hasClass: function(selector) {
  1364. var className = " " + selector + " ",
  1365. i = 0,
  1366. l = this.length;
  1367. for(; i < l; i++) {
  1368. if(this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
  1369. return true
  1370. }
  1371. }
  1372. return false
  1373. },
  1374. val: function(value) {
  1375. var ret, hooks, isFunction, elem = this[0];
  1376. if(!arguments.length) {
  1377. if(elem) {
  1378. hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
  1379. if(hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
  1380. return ret
  1381. }
  1382. ret = elem.value;
  1383. return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret
  1384. }
  1385. return
  1386. }
  1387. isFunction = jQuery.isFunction(value);
  1388. return this.each(function(i) {
  1389. var val, self = jQuery(this);
  1390. if(this.nodeType !== 1) {
  1391. return
  1392. }
  1393. if(isFunction) {
  1394. val = value.call(this, i, self.val())
  1395. } else {
  1396. val = value
  1397. }
  1398. if(val == null) {
  1399. val = ""
  1400. } else if(typeof val === "number") {
  1401. val += ""
  1402. } else if(jQuery.isArray(val)) {
  1403. val = jQuery.map(val, function(value) {
  1404. return value == null ? "" : value + ""
  1405. })
  1406. }
  1407. hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
  1408. if(!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
  1409. this.value = val
  1410. }
  1411. })
  1412. }
  1413. });
  1414. jQuery.extend({
  1415. valHooks: {
  1416. option: {
  1417. get: function(elem) {
  1418. var val = elem.attributes.value;
  1419. return !val || val.specified ? elem.value : elem.text
  1420. }
  1421. },
  1422. select: {
  1423. get: function(elem) {
  1424. var value, option, options = elem.options,
  1425. index = elem.selectedIndex,
  1426. one = elem.type === "select-one" || index < 0,
  1427. values = one ? null : [],
  1428. max = one ? index + 1 : options.length,
  1429. i = index < 0 ? max : one ? index : 0;
  1430. for(; i < max; i++) {
  1431. option = options[i];
  1432. if((option.selected || i === index) && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup"))) {
  1433. value = jQuery(option).val();
  1434. if(one) {
  1435. return value
  1436. }
  1437. values.push(value)
  1438. }
  1439. }
  1440. return values
  1441. },
  1442. set: function(elem, value) {
  1443. var values = jQuery.makeArray(value);
  1444. jQuery(elem).find("option").each(function() {
  1445. this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0
  1446. });
  1447. if(!values.length) {
  1448. elem.selectedIndex = -1
  1449. }
  1450. return values
  1451. }
  1452. }
  1453. },
  1454. attr: function(elem, name, value) {
  1455. var hooks, notxml, ret, nType = elem.nodeType;
  1456. if(!elem || nType === 3 || nType === 8 || nType === 2) {
  1457. return
  1458. }
  1459. if(typeof elem.getAttribute === core_strundefined) {
  1460. return jQuery.prop(elem, name, value)
  1461. }
  1462. notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
  1463. if(notxml) {
  1464. name = name.toLowerCase();
  1465. hooks = jQuery.attrHooks[name] || (rboolean.test(name) ? boolHook : nodeHook)
  1466. }
  1467. if(value !== undefined) {
  1468. if(value === null) {
  1469. jQuery.removeAttr(elem, name)
  1470. } else if(hooks && notxml && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
  1471. return ret
  1472. } else {
  1473. elem.setAttribute(name, value + "");
  1474. return value
  1475. }
  1476. } else if(hooks && notxml && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  1477. return ret
  1478. } else {
  1479. if(typeof elem.getAttribute !== core_strundefined) {
  1480. ret = elem.getAttribute(name)
  1481. }
  1482. return ret == null ? undefined : ret
  1483. }
  1484. },
  1485. removeAttr: function(elem, value) {
  1486. var name, propName, i = 0,
  1487. attrNames = value && value.match(core_rnotwhite);
  1488. if(attrNames && elem.nodeType === 1) {
  1489. while((name = attrNames[i++])) {
  1490. propName = jQuery.propFix[name] || name;
  1491. if(rboolean.test(name)) {
  1492. if(!getSetAttribute && ruseDefault.test(name)) {
  1493. elem[jQuery.camelCase("default-" + name)] = elem[propName] = false
  1494. } else {
  1495. elem[propName] = false
  1496. }
  1497. } else {
  1498. jQuery.attr(elem, name, "")
  1499. }
  1500. elem.removeAttribute(getSetAttribute ? name : propName)
  1501. }
  1502. }
  1503. },
  1504. attrHooks: {
  1505. type: {
  1506. set: function(elem, value) {
  1507. if(!jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) {
  1508. var val = elem.value;
  1509. elem.setAttribute("type", value);
  1510. if(val) {
  1511. elem.value = val
  1512. }
  1513. return value
  1514. }
  1515. }
  1516. }
  1517. },
  1518. propFix: {
  1519. tabindex: "tabIndex",
  1520. readonly: "readOnly",
  1521. "for": "htmlFor",
  1522. "class": "className",
  1523. maxlength: "maxLength",
  1524. cellspacing: "cellSpacing",
  1525. cellpadding: "cellPadding",
  1526. rowspan: "rowSpan",
  1527. colspan: "colSpan",
  1528. usemap: "useMap",
  1529. frameborder: "frameBorder",
  1530. contenteditable: "contentEditable"
  1531. },
  1532. prop: function(elem, name, value) {
  1533. var ret, hooks, notxml, nType = elem.nodeType;
  1534. if(!elem || nType === 3 || nType === 8 || nType === 2) {
  1535. return
  1536. }
  1537. notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
  1538. if(notxml) {
  1539. name = jQuery.propFix[name] || name;
  1540. hooks = jQuery.propHooks[name]
  1541. }
  1542. if(value !== undefined) {
  1543. if(hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
  1544. return ret
  1545. } else {
  1546. return(elem[name] = value)
  1547. }
  1548. } else {
  1549. if(hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  1550. return ret
  1551. } else {
  1552. return elem[name]
  1553. }
  1554. }
  1555. },
  1556. propHooks: {
  1557. tabIndex: {
  1558. get: function(elem) {
  1559. var attributeNode = elem.getAttributeNode("tabindex");
  1560. return attributeNode && attributeNode.specified ? parseInt(attributeNode.value, 10) : rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ? 0 : undefined
  1561. }
  1562. }
  1563. }
  1564. });
  1565. boolHook = {
  1566. get: function(elem, name) {
  1567. var prop = jQuery.prop(elem, name),
  1568. attr = typeof prop === "boolean" && elem.getAttribute(name),
  1569. detail = typeof prop === "boolean" ? getSetInput && getSetAttribute ? attr != null : ruseDefault.test(name) ? elem[jQuery.camelCase("default-" + name)] : !!attr : elem.getAttributeNode(name);
  1570. return detail && detail.value !== false ? name.toLowerCase() : undefined
  1571. },
  1572. set: function(elem, value, name) {
  1573. if(value === false) {
  1574. jQuery.removeAttr(elem, name)
  1575. } else if(getSetInput && getSetAttribute || !ruseDefault.test(name)) {
  1576. elem.setAttribute(!getSetAttribute && jQuery.propFix[name] || name, name)
  1577. } else {
  1578. elem[jQuery.camelCase("default-" + name)] = elem[name] = true
  1579. }
  1580. return name
  1581. }
  1582. };
  1583. if(!getSetInput || !getSetAttribute) {
  1584. jQuery.attrHooks.value = {
  1585. get: function(elem, name) {
  1586. var ret = elem.getAttributeNode(name);
  1587. return jQuery.nodeName(elem, "input") ? elem.defaultValue : ret && ret.specified ? ret.value : undefined
  1588. },
  1589. set: function(elem, value, name) {
  1590. if(jQuery.nodeName(elem, "input")) {
  1591. elem.defaultValue = value
  1592. } else {
  1593. return nodeHook && nodeHook.set(elem, value, name)
  1594. }
  1595. }
  1596. }
  1597. }
  1598. if(!getSetAttribute) {
  1599. nodeHook = jQuery.valHooks.button = {
  1600. get: function(elem, name) {
  1601. var ret = elem.getAttributeNode(name);
  1602. return ret && (name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified) ? ret.value : undefined
  1603. },
  1604. set: function(elem, value, name) {
  1605. var ret = elem.getAttributeNode(name);
  1606. if(!ret) {
  1607. elem.setAttributeNode((ret = elem.ownerDocument.createAttribute(name)))
  1608. }
  1609. ret.value = value += "";
  1610. return name === "value" || value === elem.getAttribute(name) ? value : undefined
  1611. }
  1612. };
  1613. jQuery.attrHooks.contenteditable = {
  1614. get: nodeHook.get,
  1615. set: function(elem, value, name) {
  1616. nodeHook.set(elem, value === "" ? false : value, name)
  1617. }
  1618. };
  1619. jQuery.each(["width", "height"], function(i, name) {
  1620. jQuery.attrHooks[name] = jQuery.extend(jQuery.attrHooks[name], {
  1621. set: function(elem, value) {
  1622. if(value === "") {
  1623. elem.setAttribute(name, "auto");
  1624. return value
  1625. }
  1626. }
  1627. })
  1628. })
  1629. }
  1630. if(!jQuery.support.hrefNormalized) {
  1631. jQuery.each(["href", "src", "width", "height"], function(i, name) {
  1632. jQuery.attrHooks[name] = jQuery.extend(jQuery.attrHooks[name], {
  1633. get: function(elem) {
  1634. var ret = elem.getAttribute(name, 2);
  1635. return ret == null ? undefined : ret
  1636. }
  1637. })
  1638. });
  1639. jQuery.each(["href", "src"], function(i, name) {
  1640. jQuery.propHooks[name] = {
  1641. get: function(elem) {
  1642. return elem.getAttribute(name, 4)
  1643. }
  1644. }
  1645. })
  1646. }
  1647. if(!jQuery.support.style) {
  1648. jQuery.attrHooks.style = {
  1649. get: function(elem) {
  1650. return elem.style.cssText || undefined
  1651. },
  1652. set: function(elem, value) {
  1653. return(elem.style.cssText = value + "")
  1654. }
  1655. }
  1656. }
  1657. if(!jQuery.support.optSelected) {
  1658. jQuery.propHooks.selected = jQuery.extend(jQuery.propHooks.selected, {
  1659. get: function(elem) {
  1660. var parent = elem.parentNode;
  1661. if(parent) {
  1662. parent.selectedIndex;
  1663. if(parent.parentNode) {
  1664. parent.parentNode.selectedIndex
  1665. }
  1666. }
  1667. return null
  1668. }
  1669. })
  1670. }
  1671. if(!jQuery.support.enctype) {
  1672. jQuery.propFix.enctype = "encoding"
  1673. }
  1674. if(!jQuery.support.checkOn) {
  1675. jQuery.each(["radio", "checkbox"], function() {
  1676. jQuery.valHooks[this] = {
  1677. get: function(elem) {
  1678. return elem.getAttribute("value") === null ? "on" : elem.value
  1679. }
  1680. }
  1681. })
  1682. }
  1683. jQuery.each(["radio", "checkbox"], function() {
  1684. jQuery.valHooks[this] = jQuery.extend(jQuery.valHooks[this], {
  1685. set: function(elem, value) {
  1686. if(jQuery.isArray(value)) {
  1687. return(elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0)
  1688. }
  1689. }
  1690. })
  1691. });
  1692. var rformElems = /^(?:input|select|textarea)$/i,
  1693. rkeyEvent = /^key/,
  1694. rmouseEvent = /^(?:mouse|contextmenu)|click/,
  1695. rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
  1696. rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
  1697. function returnTrue() {
  1698. return true
  1699. }
  1700. function returnFalse() {
  1701. return false
  1702. }
  1703. jQuery.event = {
  1704. global: {},
  1705. add: function(elem, types, handler, data, selector) {
  1706. var tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data(elem);
  1707. if(!elemData) {
  1708. return
  1709. }
  1710. if(handler.handler) {
  1711. handleObjIn = handler;
  1712. handler = handleObjIn.handler;
  1713. selector = handleObjIn.selector
  1714. }
  1715. if(!handler.guid) {
  1716. handler.guid = jQuery.guid++
  1717. }
  1718. if(!(events = elemData.events)) {
  1719. events = elemData.events = {}
  1720. }
  1721. if(!(eventHandle = elemData.handle)) {
  1722. eventHandle = elemData.handle = function(e) {
  1723. return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) : undefined
  1724. };
  1725. eventHandle.elem = elem
  1726. }
  1727. types = (types || "").match(core_rnotwhite) || [""];
  1728. t = types.length;
  1729. while(t--) {
  1730. tmp = rtypenamespace.exec(types[t]) || [];
  1731. type = origType = tmp[1];
  1732. namespaces = (tmp[2] || "").split(".").sort();
  1733. special = jQuery.event.special[type] || {};
  1734. type = (selector ? special.delegateType : special.bindType) || type;
  1735. special = jQuery.event.special[type] || {};
  1736. handleObj = jQuery.extend({
  1737. type: type,
  1738. origType: origType,
  1739. data: data,
  1740. handler: handler,
  1741. guid: handler.guid,
  1742. selector: selector,
  1743. needsContext: selector && jQuery.expr.match.needsContext.test(selector),
  1744. namespace: namespaces.join(".")
  1745. }, handleObjIn);
  1746. if(!(handlers = events[type])) {
  1747. handlers = events[type] = [];
  1748. handlers.delegateCount = 0;
  1749. if(!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
  1750. if(elem.addEventListener) {
  1751. elem.addEventListener(type, eventHandle, false)
  1752. } else if(elem.attachEvent) {
  1753. elem.attachEvent("on" + type, eventHandle)
  1754. }
  1755. }
  1756. }
  1757. if(special.add) {
  1758. special.add.call(elem, handleObj);
  1759. if(!handleObj.handler.guid) {
  1760. handleObj.handler.guid = handler.guid
  1761. }
  1762. }
  1763. if(selector) {
  1764. handlers.splice(handlers.delegateCount++, 0, handleObj)
  1765. } else {
  1766. handlers.push(handleObj)
  1767. }
  1768. jQuery.event.global[type] = true
  1769. }
  1770. elem = null
  1771. },
  1772. remove: function(elem, types, handler, selector, mappedTypes) {
  1773. var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType, elemData = jQuery.hasData(elem) && jQuery._data(elem);
  1774. if(!elemData || !(events = elemData.events)) {
  1775. return
  1776. }
  1777. types = (types || "").match(core_rnotwhite) || [""];
  1778. t = types.length;
  1779. while(t--) {
  1780. tmp = rtypenamespace.exec(types[t]) || [];
  1781. type = origType = tmp[1];
  1782. namespaces = (tmp[2] || "").split(".").sort();
  1783. if(!type) {
  1784. for(type in events) {
  1785. jQuery.event.remove(elem, type + types[t], handler, selector, true)
  1786. }
  1787. continue
  1788. }
  1789. special = jQuery.event.special[type] || {};
  1790. type = (selector ? special.delegateType : special.bindType) || type;
  1791. handlers = events[type] || [];
  1792. tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
  1793. origCount = j = handlers.length;
  1794. while(j--) {
  1795. handleObj = handlers[j];
  1796. if((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
  1797. handlers.splice(j, 1);
  1798. if(handleObj.selector) {
  1799. handlers.delegateCount--
  1800. }
  1801. if(special.remove) {
  1802. special.remove.call(elem, handleObj)
  1803. }
  1804. }
  1805. }
  1806. if(origCount && !handlers.length) {
  1807. if(!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
  1808. jQuery.removeEvent(elem, type, elemData.handle)
  1809. }
  1810. delete events[type]
  1811. }
  1812. }
  1813. if(jQuery.isEmptyObject(events)) {
  1814. delete elemData.handle;
  1815. jQuery._removeData(elem, "events")
  1816. }
  1817. },
  1818. trigger: function(event, data, elem, onlyHandlers) {
  1819. var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [elem || document],
  1820. type = core_hasOwn.call(event, "type") ? event.type : event,
  1821. namespaces = core_hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
  1822. cur = tmp = elem = elem || document;
  1823. if(elem.nodeType === 3 || elem.nodeType === 8) {
  1824. return
  1825. }
  1826. if(rfocusMorph.test(type + jQuery.event.triggered)) {
  1827. return
  1828. }
  1829. if(type.indexOf(".") >= 0) {
  1830. namespaces = type.split(".");
  1831. type = namespaces.shift();
  1832. namespaces.sort()
  1833. }
  1834. ontype = type.indexOf(":") < 0 && "on" + type;
  1835. event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
  1836. event.isTrigger = true;
  1837. event.namespace = namespaces.join(".");
  1838. event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
  1839. event.result = undefined;
  1840. if(!event.target) {
  1841. event.target = elem
  1842. }
  1843. data = data == null ? [event] : jQuery.makeArray(data, [event]);
  1844. special = jQuery.event.special[type] || {};
  1845. if(!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
  1846. return
  1847. }
  1848. if(!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
  1849. bubbleType = special.delegateType || type;
  1850. if(!rfocusMorph.test(bubbleType + type)) {
  1851. cur = cur.parentNode
  1852. }
  1853. for(; cur; cur = cur.parentNode) {
  1854. eventPath.push(cur);
  1855. tmp = cur
  1856. }
  1857. if(tmp === (elem.ownerDocument || document)) {
  1858. eventPath.push(tmp.defaultView || tmp.parentWindow || window)
  1859. }
  1860. }
  1861. i = 0;
  1862. while((cur = eventPath[i++]) && !event.isPropagationStopped()) {
  1863. event.type = i > 1 ? bubbleType : special.bindType || type;
  1864. handle = (jQuery._data(cur, "events") || {})[event.type] && jQuery._data(cur, "handle");
  1865. if(handle) {
  1866. handle.apply(cur, data)
  1867. }
  1868. handle = ontype && cur[ontype];
  1869. if(handle && jQuery.acceptData(cur) && handle.apply && handle.apply(cur, data) === false) {
  1870. event.preventDefault()
  1871. }
  1872. }
  1873. event.type = type;
  1874. if(!onlyHandlers && !event.isDefaultPrevented()) {
  1875. if((!special._default || special._default.apply(elem.ownerDocument, data) === false) && !(type === "click" && jQuery.nodeName(elem, "a")) && jQuery.acceptData(elem)) {
  1876. if(ontype && elem[type] && !jQuery.isWindow(elem)) {
  1877. tmp = elem[ontype];
  1878. if(tmp) {
  1879. elem[ontype] = null
  1880. }
  1881. jQuery.event.triggered = type;
  1882. try {
  1883. elem[type]()
  1884. } catch(e) {}
  1885. jQuery.event.triggered = undefined;
  1886. if(tmp) {
  1887. elem[ontype] = tmp
  1888. }
  1889. }
  1890. }
  1891. }
  1892. return event.result
  1893. },
  1894. dispatch: function(event) {
  1895. event = jQuery.event.fix(event);
  1896. var i, ret, handleObj, matched, j, handlerQueue = [],
  1897. args = core_slice.call(arguments),
  1898. handlers = (jQuery._data(this, "events") || {})[event.type] || [],
  1899. special = jQuery.event.special[event.type] || {};
  1900. args[0] = event;
  1901. event.delegateTarget = this;
  1902. if(special.preDispatch && special.preDispatch.call(this, event) === false) {
  1903. return
  1904. }
  1905. handlerQueue = jQuery.event.handlers.call(this, event, handlers);
  1906. i = 0;
  1907. while((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
  1908. event.currentTarget = matched.elem;
  1909. j = 0;
  1910. while((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
  1911. if(!event.namespace_re || event.namespace_re.test(handleObj.namespace)) {
  1912. event.handleObj = handleObj;
  1913. event.data = handleObj.data;
  1914. ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
  1915. if(ret !== undefined) {
  1916. if((event.result = ret) === false) {
  1917. event.preventDefault();
  1918. event.stopPropagation()
  1919. }
  1920. }
  1921. }
  1922. }
  1923. }
  1924. if(special.postDispatch) {
  1925. special.postDispatch.call(this, event)
  1926. }
  1927. return event.result
  1928. },
  1929. handlers: function(event, handlers) {
  1930. var sel, handleObj, matches, i, handlerQueue = [],
  1931. delegateCount = handlers.delegateCount,
  1932. cur = event.target;
  1933. if(delegateCount && cur.nodeType && (!event.button || event.type !== "click")) {
  1934. for(; cur != this; cur = cur.parentNode || this) {
  1935. if(cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click")) {
  1936. matches = [];
  1937. for(i = 0; i < delegateCount; i++) {
  1938. handleObj = handlers[i];
  1939. sel = handleObj.selector + " ";
  1940. if(matches[sel] === undefined) {
  1941. matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 : jQuery.find(sel, this, null, [cur]).length
  1942. }
  1943. if(matches[sel]) {
  1944. matches.push(handleObj)
  1945. }
  1946. }
  1947. if(matches.length) {
  1948. handlerQueue.push({
  1949. elem: cur,
  1950. handlers: matches
  1951. })
  1952. }
  1953. }
  1954. }
  1955. }
  1956. if(delegateCount < handlers.length) {
  1957. handlerQueue.push({
  1958. elem: this,
  1959. handlers: handlers.slice(delegateCount)
  1960. })
  1961. }
  1962. return handlerQueue
  1963. },
  1964. fix: function(event) {
  1965. if(event[jQuery.expando]) {
  1966. return event
  1967. }
  1968. var i, prop, copy, type = event.type,
  1969. originalEvent = event,
  1970. fixHook = this.fixHooks[type];
  1971. if(!fixHook) {
  1972. this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(type) ? this.keyHooks : {}
  1973. }
  1974. copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
  1975. event = new jQuery.Event(originalEvent);
  1976. i = copy.length;
  1977. while(i--) {
  1978. prop = copy[i];
  1979. event[prop] = originalEvent[prop]
  1980. }
  1981. if(!event.target) {
  1982. event.target = originalEvent.srcElement || document
  1983. }
  1984. if(event.target.nodeType === 3) {
  1985. event.target = event.target.parentNode
  1986. }
  1987. event.metaKey = !!event.metaKey;
  1988. return fixHook.filter ? fixHook.filter(event, originalEvent) : event
  1989. },
  1990. props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  1991. fixHooks: {},
  1992. keyHooks: {
  1993. props: "char charCode key keyCode".split(" "),
  1994. filter: function(event, original) {
  1995. if(event.which == null) {
  1996. event.which = original.charCode != null ? original.charCode : original.keyCode
  1997. }
  1998. return event
  1999. }
  2000. },
  2001. mouseHooks: {
  2002. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
  2003. filter: function(event, original) {
  2004. var body, eventDoc, doc, button = original.button,
  2005. fromElement = original.fromElement;
  2006. if(event.pageX == null && original.clientX != null) {
  2007. eventDoc = event.target.ownerDocument || document;
  2008. doc = eventDoc.documentElement;
  2009. body = eventDoc.body;
  2010. event.pageX = original.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
  2011. event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0)
  2012. }
  2013. if(!event.relatedTarget && fromElement) {
  2014. event.relatedTarget = fromElement === event.target ? original.toElement : fromElement
  2015. }
  2016. if(!event.which && button !== undefined) {
  2017. event.which = (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0)))
  2018. }
  2019. return event
  2020. }
  2021. },
  2022. special: {
  2023. load: {
  2024. noBubble: true
  2025. },
  2026. click: {
  2027. trigger: function() {
  2028. if(jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) {
  2029. this.click();
  2030. return false
  2031. }
  2032. }
  2033. },
  2034. focus: {
  2035. trigger: function() {
  2036. if(this !== document.activeElement && this.focus) {
  2037. try {
  2038. this.focus();
  2039. return false
  2040. } catch(e) {}
  2041. }
  2042. },
  2043. delegateType: "focusin"
  2044. },
  2045. blur: {
  2046. trigger: function() {
  2047. if(this === document.activeElement && this.blur) {
  2048. this.blur();
  2049. return false
  2050. }
  2051. },
  2052. delegateType: "focusout"
  2053. },
  2054. beforeunload: {
  2055. postDispatch: function(event) {
  2056. if(event.result !== undefined) {
  2057. event.originalEvent.returnValue = event.result
  2058. }
  2059. }
  2060. }
  2061. },
  2062. simulate: function(type, elem, event, bubble) {
  2063. var e = jQuery.extend(new jQuery.Event(), event, {
  2064. type: type,
  2065. isSimulated: true,
  2066. originalEvent: {}
  2067. });
  2068. if(bubble) {
  2069. jQuery.event.trigger(e, null, elem)
  2070. } else {
  2071. jQuery.event.dispatch.call(elem, e)
  2072. }
  2073. if(e.isDefaultPrevented()) {
  2074. event.preventDefault()
  2075. }
  2076. }
  2077. };
  2078. jQuery.removeEvent = document.removeEventListener ? function(elem, type, handle) {
  2079. if(elem.removeEventListener) {
  2080. elem.removeEventListener(type, handle, false)
  2081. }
  2082. } : function(elem, type, handle) {
  2083. var name = "on" + type;
  2084. if(elem.detachEvent) {
  2085. if(typeof elem[name] === core_strundefined) {
  2086. elem[name] = null
  2087. }
  2088. elem.detachEvent(name, handle)
  2089. }
  2090. };
  2091. jQuery.Event = function(src, props) {
  2092. if(!(this instanceof jQuery.Event)) {
  2093. return new jQuery.Event(src, props)
  2094. }
  2095. if(src && src.type) {
  2096. this.originalEvent = src;
  2097. this.type = src.type;
  2098. this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse
  2099. } else {
  2100. this.type = src
  2101. }
  2102. if(props) {
  2103. jQuery.extend(this, props)
  2104. }
  2105. this.timeStamp = src && src.timeStamp || jQuery.now();
  2106. this[jQuery.expando] = true
  2107. };
  2108. jQuery.Event.prototype = {
  2109. isDefaultPrevented: returnFalse,
  2110. isPropagationStopped: returnFalse,
  2111. isImmediatePropagationStopped: returnFalse,
  2112. preventDefault: function() {
  2113. var e = this.originalEvent;
  2114. this.isDefaultPrevented = returnTrue;
  2115. if(!e) {
  2116. return
  2117. }
  2118. if(e.preventDefault) {
  2119. e.preventDefault()
  2120. } else {
  2121. e.returnValue = false
  2122. }
  2123. },
  2124. stopPropagation: function() {
  2125. var e = this.originalEvent;
  2126. this.isPropagationStopped = returnTrue;
  2127. if(!e) {
  2128. return
  2129. }
  2130. if(e.stopPropagation) {
  2131. e.stopPropagation()
  2132. }
  2133. e.cancelBubble = true
  2134. },
  2135. stopImmediatePropagation: function() {
  2136. this.isImmediatePropagationStopped = returnTrue;
  2137. this.stopPropagation()
  2138. }
  2139. };
  2140. jQuery.each({
  2141. mouseenter: "mouseover",
  2142. mouseleave: "mouseout"
  2143. }, function(orig, fix) {
  2144. jQuery.event.special[orig] = {
  2145. delegateType: fix,
  2146. bindType: fix,
  2147. handle: function(event) {
  2148. var ret, target = this,
  2149. related = event.relatedTarget,
  2150. handleObj = event.handleObj;
  2151. if(!related || (related !== target && !jQuery.contains(target, related))) {
  2152. event.type = handleObj.origType;
  2153. ret = handleObj.handler.apply(this, arguments);
  2154. event.type = fix
  2155. }
  2156. return ret
  2157. }
  2158. }
  2159. });
  2160. if(!jQuery.support.submitBubbles) {
  2161. jQuery.event.special.submit = {
  2162. setup: function() {
  2163. if(jQuery.nodeName(this, "form")) {
  2164. return false
  2165. }
  2166. jQuery.event.add(this, "click._submit keypress._submit", function(e) {
  2167. var elem = e.target,
  2168. form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ? elem.form : undefined;
  2169. if(form && !jQuery._data(form, "submitBubbles")) {
  2170. jQuery.event.add(form, "submit._submit", function(event) {
  2171. event._submit_bubble = true
  2172. });
  2173. jQuery._data(form, "submitBubbles", true)
  2174. }
  2175. })
  2176. },
  2177. postDispatch: function(event) {
  2178. if(event._submit_bubble) {
  2179. delete event._submit_bubble;
  2180. if(this.parentNode && !event.isTrigger) {
  2181. jQuery.event.simulate("submit", this.parentNode, event, true)
  2182. }
  2183. }
  2184. },
  2185. teardown: function() {
  2186. if(jQuery.nodeName(this, "form")) {
  2187. return false
  2188. }
  2189. jQuery.event.remove(this, "._submit")
  2190. }
  2191. }
  2192. }
  2193. if(!jQuery.support.changeBubbles) {
  2194. jQuery.event.special.change = {
  2195. setup: function() {
  2196. if(rformElems.test(this.nodeName)) {
  2197. if(this.type === "checkbox" || this.type === "radio") {
  2198. jQuery.event.add(this, "propertychange._change", function(event) {
  2199. if(event.originalEvent.propertyName === "checked") {
  2200. this._just_changed = true
  2201. }
  2202. });
  2203. jQuery.event.add(this, "click._change", function(event) {
  2204. if(this._just_changed && !event.isTrigger) {
  2205. this._just_changed = false
  2206. }
  2207. jQuery.event.simulate("change", this, event, true)
  2208. })
  2209. }
  2210. return false
  2211. }
  2212. jQuery.event.add(this, "beforeactivate._change", function(e) {
  2213. var elem = e.target;
  2214. if(rformElems.test(elem.nodeName) && !jQuery._data(elem, "changeBubbles")) {
  2215. jQuery.event.add(elem, "change._change", function(event) {
  2216. if(this.parentNode && !event.isSimulated && !event.isTrigger) {
  2217. jQuery.event.simulate("change", this.parentNode, event, true)
  2218. }
  2219. });
  2220. jQuery._data(elem, "changeBubbles", true)
  2221. }
  2222. })
  2223. },
  2224. handle: function(event) {
  2225. var elem = event.target;
  2226. if(this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox")) {
  2227. return event.handleObj.handler.apply(this, arguments)
  2228. }
  2229. },
  2230. teardown: function() {
  2231. jQuery.event.remove(this, "._change");
  2232. return !rformElems.test(this.nodeName)
  2233. }
  2234. }
  2235. }
  2236. if(!jQuery.support.focusinBubbles) {
  2237. jQuery.each({
  2238. focus: "focusin",
  2239. blur: "focusout"
  2240. }, function(orig, fix) {
  2241. var attaches = 0,
  2242. handler = function(event) {
  2243. jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true)
  2244. };
  2245. jQuery.event.special[fix] = {
  2246. setup: function() {
  2247. if(attaches++ === 0) {
  2248. document.addEventListener(orig, handler, true)
  2249. }
  2250. },
  2251. teardown: function() {
  2252. if(--attaches === 0) {
  2253. document.removeEventListener(orig, handler, true)
  2254. }
  2255. }
  2256. }
  2257. })
  2258. }
  2259. jQuery.fn.extend({
  2260. on: function(types, selector, data, fn, one) {
  2261. var type, origFn;
  2262. if(typeof types === "object") {
  2263. if(typeof selector !== "string") {
  2264. data = data || selector;
  2265. selector = undefined
  2266. }
  2267. for(type in types) {
  2268. this.on(type, selector, data, types[type], one)
  2269. }
  2270. return this
  2271. }
  2272. if(data == null && fn == null) {
  2273. fn = selector;
  2274. data = selector = undefined
  2275. } else if(fn == null) {
  2276. if(typeof selector === "string") {
  2277. fn = data;
  2278. data = undefined
  2279. } else {
  2280. fn = data;
  2281. data = selector;
  2282. selector = undefined
  2283. }
  2284. }
  2285. if(fn === false) {
  2286. fn = returnFalse
  2287. } else if(!fn) {
  2288. return this
  2289. }
  2290. if(one === 1) {
  2291. origFn = fn;
  2292. fn = function(event) {
  2293. jQuery().off(event);
  2294. return origFn.apply(this, arguments)
  2295. };
  2296. fn.guid = origFn.guid || (origFn.guid = jQuery.guid++)
  2297. }
  2298. return this.each(function() {
  2299. jQuery.event.add(this, types, fn, data, selector)
  2300. })
  2301. },
  2302. one: function(types, selector, data, fn) {
  2303. return this.on(types, selector, data, fn, 1)
  2304. },
  2305. off: function(types, selector, fn) {
  2306. var handleObj, type;
  2307. if(types && types.preventDefault && types.handleObj) {
  2308. handleObj = types.handleObj;
  2309. jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
  2310. return this
  2311. }
  2312. if(typeof types === "object") {
  2313. for(type in types) {
  2314. this.off(type, selector, types[type])
  2315. }
  2316. return this
  2317. }
  2318. if(selector === false || typeof selector === "function") {
  2319. fn = selector;
  2320. selector = undefined
  2321. }
  2322. if(fn === false) {
  2323. fn = returnFalse
  2324. }
  2325. return this.each(function() {
  2326. jQuery.event.remove(this, types, fn, selector)
  2327. })
  2328. },
  2329. bind: function(types, data, fn) {
  2330. return this.on(types, null, data, fn)
  2331. },
  2332. unbind: function(types, fn) {
  2333. return this.off(types, null, fn)
  2334. },
  2335. delegate: function(selector, types, data, fn) {
  2336. return this.on(types, selector, data, fn)
  2337. },
  2338. undelegate: function(selector, types, fn) {
  2339. return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn)
  2340. },
  2341. trigger: function(type, data) {
  2342. return this.each(function() {
  2343. jQuery.event.trigger(type, data, this)
  2344. })
  2345. },
  2346. triggerHandler: function(type, data) {
  2347. var elem = this[0];
  2348. if(elem) {
  2349. return jQuery.event.trigger(type, data, elem, true)
  2350. }
  2351. }
  2352. });
  2353. (function(window, undefined) {
  2354. var i, cachedruns, Expr, getText, isXML, compile, hasDuplicate, outermostContext, setDocument, document, docElem, documentIsXML, rbuggyQSA, rbuggyMatches, matches, contains, sortOrder, expando = "sizzle" + -(new Date()),
  2355. preferredDoc = window.document,
  2356. support = {},
  2357. dirruns = 0,
  2358. done = 0,
  2359. classCache = createCache(),
  2360. tokenCache = createCache(),
  2361. compilerCache = createCache(),
  2362. strundefined = typeof undefined,
  2363. MAX_NEGATIVE = 1 << 31,
  2364. arr = [],
  2365. pop = arr.pop,
  2366. push = arr.push,
  2367. slice = arr.slice,
  2368. indexOf = arr.indexOf || function(elem) {
  2369. var i = 0,
  2370. len = this.length;
  2371. for(; i < len; i++) {
  2372. if(this[i] === elem) {
  2373. return i
  2374. }
  2375. }
  2376. return -1
  2377. },
  2378. whitespace = "[\\x20\\t\\r\\n\\f]",
  2379. characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  2380. identifier = characterEncoding.replace("w", "w#"),
  2381. operators = "([*^$|!~]?=)",
  2382. attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
  2383. pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) + ")*)|.*)\\)|)",
  2384. rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
  2385. rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
  2386. rcombinators = new RegExp("^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*"),
  2387. rpseudo = new RegExp(pseudos),
  2388. ridentifier = new RegExp("^" + identifier + "$"),
  2389. matchExpr = {
  2390. "ID": new RegExp("^#(" + characterEncoding + ")"),
  2391. "CLASS": new RegExp("^\\.(" + characterEncoding + ")"),
  2392. "NAME": new RegExp("^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]"),
  2393. "TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"),
  2394. "ATTR": new RegExp("^" + attributes),
  2395. "PSEUDO": new RegExp("^" + pseudos),
  2396. "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
  2397. "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
  2398. },
  2399. rsibling = /[\x20\t\r\n\f]*[+~]/,
  2400. rnative = /^[^{]+\{\s*\[native code/,
  2401. rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  2402. rinputs = /^(?:input|select|textarea|button)$/i,
  2403. rheader = /^h\d$/i,
  2404. rescape = /'|\\/g,
  2405. rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
  2406. runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
  2407. funescape = function(_, escaped) {
  2408. var high = "0x" + escaped - 0x10000;
  2409. return high !== high ? escaped : high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00)
  2410. };
  2411. try {
  2412. slice.call(preferredDoc.documentElement.childNodes, 0)[0].nodeType
  2413. } catch(e) {
  2414. slice = function(i) {
  2415. var elem, results = [];
  2416. while((elem = this[i++])) {
  2417. results.push(elem)
  2418. }
  2419. return results
  2420. }
  2421. }
  2422. function isNative(fn) {
  2423. return rnative.test(fn + "")
  2424. }
  2425. function createCache() {
  2426. var cache, keys = [];
  2427. return(cache = function(key, value) {
  2428. if(keys.push(key += " ") > Expr.cacheLength) {
  2429. delete cache[keys.shift()]
  2430. }
  2431. return(cache[key] = value)
  2432. })
  2433. }
  2434. function markFunction(fn) {
  2435. fn[expando] = true;
  2436. return fn
  2437. }
  2438. function assert(fn) {
  2439. var div = document.createElement("div");
  2440. try {
  2441. return fn(div)
  2442. } catch(e) {
  2443. return false
  2444. } finally {
  2445. div = null
  2446. }
  2447. }
  2448. function Sizzle(selector, context, results, seed) {
  2449. var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
  2450. if((context ? context.ownerDocument || context : preferredDoc) !== document) {
  2451. setDocument(context)
  2452. }
  2453. context = context || document;
  2454. results = results || [];
  2455. if(!selector || typeof selector !== "string") {
  2456. return results
  2457. }
  2458. if((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
  2459. return []
  2460. }
  2461. if(!documentIsXML && !seed) {
  2462. if((match = rquickExpr.exec(selector))) {
  2463. if((m = match[1])) {
  2464. if(nodeType === 9) {
  2465. elem = context.getElementById(m);
  2466. if(elem && elem.parentNode) {
  2467. if(elem.id === m) {
  2468. results.push(elem);
  2469. return results
  2470. }
  2471. } else {
  2472. return results
  2473. }
  2474. } else {
  2475. if(context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) {
  2476. results.push(elem);
  2477. return results
  2478. }
  2479. }
  2480. } else if(match[2]) {
  2481. push.apply(results, slice.call(context.getElementsByTagName(selector), 0));
  2482. return results
  2483. } else if((m = match[3]) && support.getByClassName && context.getElementsByClassName) {
  2484. push.apply(results, slice.call(context.getElementsByClassName(m), 0));
  2485. return results
  2486. }
  2487. }
  2488. if(support.qsa && !rbuggyQSA.test(selector)) {
  2489. old = true;
  2490. nid = expando;
  2491. newContext = context;
  2492. newSelector = nodeType === 9 && selector;
  2493. if(nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
  2494. groups = tokenize(selector);
  2495. if((old = context.getAttribute("id"))) {
  2496. nid = old.replace(rescape, "\\$&")
  2497. } else {
  2498. context.setAttribute("id", nid)
  2499. }
  2500. nid = "[id='" + nid + "'] ";
  2501. i = groups.length;
  2502. while(i--) {
  2503. groups[i] = nid + toSelector(groups[i])
  2504. }
  2505. newContext = rsibling.test(selector) && context.parentNode || context;
  2506. newSelector = groups.join(",")
  2507. }
  2508. if(newSelector) {
  2509. try {
  2510. push.apply(results, slice.call(newContext.querySelectorAll(newSelector), 0));
  2511. return results
  2512. } catch(qsaError) {} finally {
  2513. if(!old) {
  2514. context.removeAttribute("id")
  2515. }
  2516. }
  2517. }
  2518. }
  2519. }
  2520. return select(selector.replace(rtrim, "$1"), context, results, seed)
  2521. }
  2522. isXML = Sizzle.isXML = function(elem) {
  2523. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  2524. return documentElement ? documentElement.nodeName !== "HTML" : false
  2525. };
  2526. setDocument = Sizzle.setDocument = function(node) {
  2527. var doc = node ? node.ownerDocument || node : preferredDoc;
  2528. if(doc === document || doc.nodeType !== 9 || !doc.documentElement) {
  2529. return document
  2530. }
  2531. document = doc;
  2532. docElem = doc.documentElement;
  2533. documentIsXML = isXML(doc);
  2534. support.tagNameNoComments = assert(function(div) {
  2535. div.appendChild(doc.createComment(""));
  2536. return !div.getElementsByTagName("*").length
  2537. });
  2538. support.attributes = assert(function(div) {
  2539. div.innerHTML = "<select></select>";
  2540. var type = typeof div.lastChild.getAttribute("multiple");
  2541. return type !== "boolean" && type !== "string"
  2542. });
  2543. support.getByClassName = assert(function(div) {
  2544. div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
  2545. if(!div.getElementsByClassName || !div.getElementsByClassName("e").length) {
  2546. return false
  2547. }
  2548. div.lastChild.className = "e";
  2549. return div.getElementsByClassName("e").length === 2
  2550. });
  2551. support.getByName = assert(function(div) {
  2552. div.id = expando + 0;
  2553. div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
  2554. docElem.insertBefore(div, docElem.firstChild);
  2555. var pass = doc.getElementsByName && doc.getElementsByName(expando).length === 2 + doc.getElementsByName(expando + 0).length;
  2556. support.getIdNotName = !doc.getElementById(expando);
  2557. docElem.removeChild(div);
  2558. return pass
  2559. });
  2560. Expr.attrHandle = assert(function(div) {
  2561. div.innerHTML = "<a href='#'></a>";
  2562. return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && div.firstChild.getAttribute("href") === "#"
  2563. }) ? {} : {
  2564. "href": function(elem) {
  2565. return elem.getAttribute("href", 2)
  2566. },
  2567. "type": function(elem) {
  2568. return elem.getAttribute("type")
  2569. }
  2570. };
  2571. if(support.getIdNotName) {
  2572. Expr.find["ID"] = function(id, context) {
  2573. if(typeof context.getElementById !== strundefined && !documentIsXML) {
  2574. var m = context.getElementById(id);
  2575. return m && m.parentNode ? [m] : []
  2576. }
  2577. };
  2578. Expr.filter["ID"] = function(id) {
  2579. var attrId = id.replace(runescape, funescape);
  2580. return function(elem) {
  2581. return elem.getAttribute("id") === attrId
  2582. }
  2583. }
  2584. } else {
  2585. Expr.find["ID"] = function(id, context) {
  2586. if(typeof context.getElementById !== strundefined && !documentIsXML) {
  2587. var m = context.getElementById(id);
  2588. return m ? m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? [m] : undefined : []
  2589. }
  2590. };
  2591. Expr.filter["ID"] = function(id) {
  2592. var attrId = id.replace(runescape, funescape);
  2593. return function(elem) {
  2594. var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
  2595. return node && node.value === attrId
  2596. }
  2597. }
  2598. }
  2599. Expr.find["TAG"] = support.tagNameNoComments ? function(tag, context) {
  2600. if(typeof context.getElementsByTagName !== strundefined) {
  2601. return context.getElementsByTagName(tag)
  2602. }
  2603. } : function(tag, context) {
  2604. var elem, tmp = [],
  2605. i = 0,
  2606. results = context.getElementsByTagName(tag);
  2607. if(tag === "*") {
  2608. while((elem = results[i++])) {
  2609. if(elem.nodeType === 1) {
  2610. tmp.push(elem)
  2611. }
  2612. }
  2613. return tmp
  2614. }
  2615. return results
  2616. };
  2617. Expr.find["NAME"] = support.getByName && function(tag, context) {
  2618. if(typeof context.getElementsByName !== strundefined) {
  2619. return context.getElementsByName(name)
  2620. }
  2621. };
  2622. Expr.find["CLASS"] = support.getByClassName && function(className, context) {
  2623. if(typeof context.getElementsByClassName !== strundefined && !documentIsXML) {
  2624. return context.getElementsByClassName(className)
  2625. }
  2626. };
  2627. rbuggyMatches = [];
  2628. rbuggyQSA = [":focus"];
  2629. if((support.qsa = isNative(doc.querySelectorAll))) {
  2630. assert(function(div) {
  2631. div.innerHTML = "<select><option selected=''></option></select>";
  2632. if(!div.querySelectorAll("[selected]").length) {
  2633. rbuggyQSA.push("\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)")
  2634. }
  2635. if(!div.querySelectorAll(":checked").length) {
  2636. rbuggyQSA.push(":checked")
  2637. }
  2638. });
  2639. assert(function(div) {
  2640. div.innerHTML = "<input type='hidden' i=''/>";
  2641. if(div.querySelectorAll("[i^='']").length) {
  2642. rbuggyQSA.push("[*^$]=" + whitespace + "*(?:\"\"|'')")
  2643. }
  2644. if(!div.querySelectorAll(":enabled").length) {
  2645. rbuggyQSA.push(":enabled", ":disabled")
  2646. }
  2647. div.querySelectorAll("*,:x");
  2648. rbuggyQSA.push(",.*:")
  2649. })
  2650. }
  2651. if((support.matchesSelector = isNative((matches = docElem.matchesSelector || docElem.mozMatchesSelector || docElem.webkitMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)))) {
  2652. assert(function(div) {
  2653. support.disconnectedMatch = matches.call(div, "div");
  2654. matches.call(div, "[s!='']:x");
  2655. rbuggyMatches.push("!=", pseudos)
  2656. })
  2657. }
  2658. rbuggyQSA = new RegExp(rbuggyQSA.join("|"));
  2659. rbuggyMatches = new RegExp(rbuggyMatches.join("|"));
  2660. contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? function(a, b) {
  2661. var adown = a.nodeType === 9 ? a.documentElement : a,
  2662. bup = b && b.parentNode;
  2663. return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16))
  2664. } : function(a, b) {
  2665. if(b) {
  2666. while((b = b.parentNode)) {
  2667. if(b === a) {
  2668. return true
  2669. }
  2670. }
  2671. }
  2672. return false
  2673. };
  2674. sortOrder = docElem.compareDocumentPosition ? function(a, b) {
  2675. var compare;
  2676. if(a === b) {
  2677. hasDuplicate = true;
  2678. return 0
  2679. }
  2680. if((compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition(b))) {
  2681. if(compare & 1 || a.parentNode && a.parentNode.nodeType === 11) {
  2682. if(a === doc || contains(preferredDoc, a)) {
  2683. return -1
  2684. }
  2685. if(b === doc || contains(preferredDoc, b)) {
  2686. return 1
  2687. }
  2688. return 0
  2689. }
  2690. return compare & 4 ? -1 : 1
  2691. }
  2692. return a.compareDocumentPosition ? -1 : 1
  2693. } : function(a, b) {
  2694. var cur, i = 0,
  2695. aup = a.parentNode,
  2696. bup = b.parentNode,
  2697. ap = [a],
  2698. bp = [b];
  2699. if(a === b) {
  2700. hasDuplicate = true;
  2701. return 0
  2702. } else if(!aup || !bup) {
  2703. return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : 0
  2704. } else if(aup === bup) {
  2705. return siblingCheck(a, b)
  2706. }
  2707. cur = a;
  2708. while((cur = cur.parentNode)) {
  2709. ap.unshift(cur)
  2710. }
  2711. cur = b;
  2712. while((cur = cur.parentNode)) {
  2713. bp.unshift(cur)
  2714. }
  2715. while(ap[i] === bp[i]) {
  2716. i++
  2717. }
  2718. return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0
  2719. };
  2720. hasDuplicate = false;
  2721. [0, 0].sort(sortOrder);
  2722. support.detectDuplicates = hasDuplicate;
  2723. return document
  2724. };
  2725. Sizzle.matches = function(expr, elements) {
  2726. return Sizzle(expr, null, null, elements)
  2727. };
  2728. Sizzle.matchesSelector = function(elem, expr) {
  2729. if((elem.ownerDocument || elem) !== document) {
  2730. setDocument(elem)
  2731. }
  2732. expr = expr.replace(rattributeQuotes, "='$1']");
  2733. if(support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr)) {
  2734. try {
  2735. var ret = matches.call(elem, expr);
  2736. if(ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
  2737. return ret
  2738. }
  2739. } catch(e) {}
  2740. }
  2741. return Sizzle(expr, document, null, [elem]).length > 0
  2742. };
  2743. Sizzle.contains = function(context, elem) {
  2744. if((context.ownerDocument || context) !== document) {
  2745. setDocument(context)
  2746. }
  2747. return contains(context, elem)
  2748. };
  2749. Sizzle.attr = function(elem, name) {
  2750. var val;
  2751. if((elem.ownerDocument || elem) !== document) {
  2752. setDocument(elem)
  2753. }
  2754. if(!documentIsXML) {
  2755. name = name.toLowerCase()
  2756. }
  2757. if((val = Expr.attrHandle[name])) {
  2758. return val(elem)
  2759. }
  2760. if(documentIsXML || support.attributes) {
  2761. return elem.getAttribute(name)
  2762. }
  2763. return((val = elem.getAttributeNode(name)) || elem.getAttribute(name)) && elem[name] === true ? name : val && val.specified ? val.value : null
  2764. };
  2765. Sizzle.error = function(msg) {
  2766. throw new Error("Syntax error, unrecognized expression: " + msg);
  2767. };
  2768. Sizzle.uniqueSort = function(results) {
  2769. var elem, duplicates = [],
  2770. i = 1,
  2771. j = 0;
  2772. hasDuplicate = !support.detectDuplicates;
  2773. results.sort(sortOrder);
  2774. if(hasDuplicate) {
  2775. for(;
  2776. (elem = results[i]); i++) {
  2777. if(elem === results[i - 1]) {
  2778. j = duplicates.push(i)
  2779. }
  2780. }
  2781. while(j--) {
  2782. results.splice(duplicates[j], 1)
  2783. }
  2784. }
  2785. return results
  2786. };
  2787. function siblingCheck(a, b) {
  2788. var cur = b && a,
  2789. diff = cur && (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
  2790. if(diff) {
  2791. return diff
  2792. }
  2793. if(cur) {
  2794. while((cur = cur.nextSibling)) {
  2795. if(cur === b) {
  2796. return -1
  2797. }
  2798. }
  2799. }
  2800. return a ? 1 : -1
  2801. }
  2802. function createInputPseudo(type) {
  2803. return function(elem) {
  2804. var name = elem.nodeName.toLowerCase();
  2805. return name === "input" && elem.type === type
  2806. }
  2807. }
  2808. function createButtonPseudo(type) {
  2809. return function(elem) {
  2810. var name = elem.nodeName.toLowerCase();
  2811. return(name === "input" || name === "button") && elem.type === type
  2812. }
  2813. }
  2814. function createPositionalPseudo(fn) {
  2815. return markFunction(function(argument) {
  2816. argument = +argument;
  2817. return markFunction(function(seed, matches) {
  2818. var j, matchIndexes = fn([], seed.length, argument),
  2819. i = matchIndexes.length;
  2820. while(i--) {
  2821. if(seed[(j = matchIndexes[i])]) {
  2822. seed[j] = !(matches[j] = seed[j])
  2823. }
  2824. }
  2825. })
  2826. })
  2827. }
  2828. getText = Sizzle.getText = function(elem) {
  2829. var node, ret = "",
  2830. i = 0,
  2831. nodeType = elem.nodeType;
  2832. if(!nodeType) {
  2833. for(;
  2834. (node = elem[i]); i++) {
  2835. ret += getText(node)
  2836. }
  2837. } else if(nodeType === 1 || nodeType === 9 || nodeType === 11) {
  2838. if(typeof elem.textContent === "string") {
  2839. return elem.textContent
  2840. } else {
  2841. for(elem = elem.firstChild; elem; elem = elem.nextSibling) {
  2842. ret += getText(elem)
  2843. }
  2844. }
  2845. } else if(nodeType === 3 || nodeType === 4) {
  2846. return elem.nodeValue
  2847. }
  2848. return ret
  2849. };
  2850. Expr = Sizzle.selectors = {
  2851. cacheLength: 50,
  2852. createPseudo: markFunction,
  2853. match: matchExpr,
  2854. find: {},
  2855. relative: {
  2856. ">": {
  2857. dir: "parentNode",
  2858. first: true
  2859. },
  2860. " ": {
  2861. dir: "parentNode"
  2862. },
  2863. "+": {
  2864. dir: "previousSibling",
  2865. first: true
  2866. },
  2867. "~": {
  2868. dir: "previousSibling"
  2869. }
  2870. },
  2871. preFilter: {
  2872. "ATTR": function(match) {
  2873. match[1] = match[1].replace(runescape, funescape);
  2874. match[3] = (match[4] || match[5] || "").replace(runescape, funescape);
  2875. if(match[2] === "~=") {
  2876. match[3] = " " + match[3] + " "
  2877. }
  2878. return match.slice(0, 4)
  2879. },
  2880. "CHILD": function(match) {
  2881. match[1] = match[1].toLowerCase();
  2882. if(match[1].slice(0, 3) === "nth") {
  2883. if(!match[3]) {
  2884. Sizzle.error(match[0])
  2885. }
  2886. match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
  2887. match[5] = +((match[7] + match[8]) || match[3] === "odd")
  2888. } else if(match[3]) {
  2889. Sizzle.error(match[0])
  2890. }
  2891. return match
  2892. },
  2893. "PSEUDO": function(match) {
  2894. var excess, unquoted = !match[5] && match[2];
  2895. if(matchExpr["CHILD"].test(match[0])) {
  2896. return null
  2897. }
  2898. if(match[4]) {
  2899. match[2] = match[4]
  2900. } else if(unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
  2901. match[0] = match[0].slice(0, excess);
  2902. match[2] = unquoted.slice(0, excess)
  2903. }
  2904. return match.slice(0, 3)
  2905. }
  2906. },
  2907. filter: {
  2908. "TAG": function(nodeName) {
  2909. if(nodeName === "*") {
  2910. return function() {
  2911. return true
  2912. }
  2913. }
  2914. nodeName = nodeName.replace(runescape, funescape).toLowerCase();
  2915. return function(elem) {
  2916. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName
  2917. }
  2918. },
  2919. "CLASS": function(className) {
  2920. var pattern = classCache[className + " "];
  2921. return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
  2922. return pattern.test(elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "")
  2923. })
  2924. },
  2925. "ATTR": function(name, operator, check) {
  2926. return function(elem) {
  2927. var result = Sizzle.attr(elem, name);
  2928. if(result == null) {
  2929. return operator === "!="
  2930. }
  2931. if(!operator) {
  2932. return true
  2933. }
  2934. result += "";
  2935. return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false
  2936. }
  2937. },
  2938. "CHILD": function(type, what, argument, first, last) {
  2939. var simple = type.slice(0, 3) !== "nth",
  2940. forward = type.slice(-4) !== "last",
  2941. ofType = what === "of-type";
  2942. return first === 1 && last === 0 ? function(elem) {
  2943. return !!elem.parentNode
  2944. } : function(elem, context, xml) {
  2945. var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling",
  2946. parent = elem.parentNode,
  2947. name = ofType && elem.nodeName.toLowerCase(),
  2948. useCache = !xml && !ofType;
  2949. if(parent) {
  2950. if(simple) {
  2951. while(dir) {
  2952. node = elem;
  2953. while((node = node[dir])) {
  2954. if(ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
  2955. return false
  2956. }
  2957. }
  2958. start = dir = type === "only" && !start && "nextSibling"
  2959. }
  2960. return true
  2961. }
  2962. start = [forward ? parent.firstChild : parent.lastChild];
  2963. if(forward && useCache) {
  2964. outerCache = parent[expando] || (parent[expando] = {});
  2965. cache = outerCache[type] || [];
  2966. nodeIndex = cache[0] === dirruns && cache[1];
  2967. diff = cache[0] === dirruns && cache[2];
  2968. node = nodeIndex && parent.childNodes[nodeIndex];
  2969. while((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) {
  2970. if(node.nodeType === 1 && ++diff && node === elem) {
  2971. outerCache[type] = [dirruns, nodeIndex, diff];
  2972. break
  2973. }
  2974. }
  2975. } else if(useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
  2976. diff = cache[1]
  2977. } else {
  2978. while((node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop())) {
  2979. if((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
  2980. if(useCache) {
  2981. (node[expando] || (node[expando] = {}))[type] = [dirruns, diff]
  2982. }
  2983. if(node === elem) {
  2984. break
  2985. }
  2986. }
  2987. }
  2988. }
  2989. diff -= last;
  2990. return diff === first || (diff % first === 0 && diff / first >= 0)
  2991. }
  2992. }
  2993. },
  2994. "PSEUDO": function(pseudo, argument) {
  2995. var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
  2996. if(fn[expando]) {
  2997. return fn(argument)
  2998. }
  2999. if(fn.length > 1) {
  3000. args = [pseudo, pseudo, "", argument];
  3001. return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) {
  3002. var idx, matched = fn(seed, argument),
  3003. i = matched.length;
  3004. while(i--) {
  3005. idx = indexOf.call(seed, matched[i]);
  3006. seed[idx] = !(matches[idx] = matched[i])
  3007. }
  3008. }) : function(elem) {
  3009. return fn(elem, 0, args)
  3010. }
  3011. }
  3012. return fn
  3013. }
  3014. },
  3015. pseudos: {
  3016. "not": markFunction(function(selector) {
  3017. var input = [],
  3018. results = [],
  3019. matcher = compile(selector.replace(rtrim, "$1"));
  3020. return matcher[expando] ? markFunction(function(seed, matches, context, xml) {
  3021. var elem, unmatched = matcher(seed, null, xml, []),
  3022. i = seed.length;
  3023. while(i--) {
  3024. if((elem = unmatched[i])) {
  3025. seed[i] = !(matches[i] = elem)
  3026. }
  3027. }
  3028. }) : function(elem, context, xml) {
  3029. input[0] = elem;
  3030. matcher(input, null, xml, results);
  3031. return !results.pop()
  3032. }
  3033. }),
  3034. "has": markFunction(function(selector) {
  3035. return function(elem) {
  3036. return Sizzle(selector, elem).length > 0
  3037. }
  3038. }),
  3039. "contains": markFunction(function(text) {
  3040. return function(elem) {
  3041. return(elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1
  3042. }
  3043. }),
  3044. "lang": markFunction(function(lang) {
  3045. if(!ridentifier.test(lang || "")) {
  3046. Sizzle.error("unsupported lang: " + lang)
  3047. }
  3048. lang = lang.replace(runescape, funescape).toLowerCase();
  3049. return function(elem) {
  3050. var elemLang;
  3051. do {
  3052. if((elemLang = documentIsXML ? elem.getAttribute("xml:lang") || elem.getAttribute("lang") : elem.lang)) {
  3053. elemLang = elemLang.toLowerCase();
  3054. return elemLang === lang || elemLang.indexOf(lang + "-") === 0
  3055. }
  3056. } while ((elem = elem.parentNode) && elem.nodeType === 1);
  3057. return false
  3058. }
  3059. }),
  3060. "target": function(elem) {
  3061. var hash = window.location && window.location.hash;
  3062. return hash && hash.slice(1) === elem.id
  3063. },
  3064. "root": function(elem) {
  3065. return elem === docElem
  3066. },
  3067. "focus": function(elem) {
  3068. return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex)
  3069. },
  3070. "enabled": function(elem) {
  3071. return elem.disabled === false
  3072. },
  3073. "disabled": function(elem) {
  3074. return elem.disabled === true
  3075. },
  3076. "checked": function(elem) {
  3077. var nodeName = elem.nodeName.toLowerCase();
  3078. return(nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected)
  3079. },
  3080. "selected": function(elem) {
  3081. if(elem.parentNode) {
  3082. elem.parentNode.selectedIndex
  3083. }
  3084. return elem.selected === true
  3085. },
  3086. "empty": function(elem) {
  3087. for(elem = elem.firstChild; elem; elem = elem.nextSibling) {
  3088. if(elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4) {
  3089. return false
  3090. }
  3091. }
  3092. return true
  3093. },
  3094. "parent": function(elem) {
  3095. return !Expr.pseudos["empty"](elem)
  3096. },
  3097. "header": function(elem) {
  3098. return rheader.test(elem.nodeName)
  3099. },
  3100. "input": function(elem) {
  3101. return rinputs.test(elem.nodeName)
  3102. },
  3103. "button": function(elem) {
  3104. var name = elem.nodeName.toLowerCase();
  3105. return name === "input" && elem.type === "button" || name === "button"
  3106. },
  3107. "text": function(elem) {
  3108. var attr;
  3109. return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type)
  3110. },
  3111. "first": createPositionalPseudo(function() {
  3112. return [0]
  3113. }),
  3114. "last": createPositionalPseudo(function(matchIndexes, length) {
  3115. return [length - 1]
  3116. }),
  3117. "eq": createPositionalPseudo(function(matchIndexes, length, argument) {
  3118. return [argument < 0 ? argument + length : argument]
  3119. }),
  3120. "even": createPositionalPseudo(function(matchIndexes, length) {
  3121. var i = 0;
  3122. for(; i < length; i += 2) {
  3123. matchIndexes.push(i)
  3124. }
  3125. return matchIndexes
  3126. }),
  3127. "odd": createPositionalPseudo(function(matchIndexes, length) {
  3128. var i = 1;
  3129. for(; i < length; i += 2) {
  3130. matchIndexes.push(i)
  3131. }
  3132. return matchIndexes
  3133. }),
  3134. "lt": createPositionalPseudo(function(matchIndexes, length, argument) {
  3135. var i = argument < 0 ? argument + length : argument;
  3136. for(; --i >= 0;) {
  3137. matchIndexes.push(i)
  3138. }
  3139. return matchIndexes
  3140. }),
  3141. "gt": createPositionalPseudo(function(matchIndexes, length, argument) {
  3142. var i = argument < 0 ? argument + length : argument;
  3143. for(; ++i < length;) {
  3144. matchIndexes.push(i)
  3145. }
  3146. return matchIndexes
  3147. })
  3148. }
  3149. };
  3150. for(i in {
  3151. radio: true,
  3152. checkbox: true,
  3153. file: true,
  3154. password: true,
  3155. image: true
  3156. }) {
  3157. Expr.pseudos[i] = createInputPseudo(i)
  3158. }
  3159. for(i in {
  3160. submit: true,
  3161. reset: true
  3162. }) {
  3163. Expr.pseudos[i] = createButtonPseudo(i)
  3164. }
  3165. function tokenize(selector, parseOnly) {
  3166. var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
  3167. if(cached) {
  3168. return parseOnly ? 0 : cached.slice(0)
  3169. }
  3170. soFar = selector;
  3171. groups = [];
  3172. preFilters = Expr.preFilter;
  3173. while(soFar) {
  3174. if(!matched || (match = rcomma.exec(soFar))) {
  3175. if(match) {
  3176. soFar = soFar.slice(match[0].length) || soFar
  3177. }
  3178. groups.push(tokens = [])
  3179. }
  3180. matched = false;
  3181. if((match = rcombinators.exec(soFar))) {
  3182. matched = match.shift();
  3183. tokens.push({
  3184. value: matched,
  3185. type: match[0].replace(rtrim, " ")
  3186. });
  3187. soFar = soFar.slice(matched.length)
  3188. }
  3189. for(type in Expr.filter) {
  3190. if((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
  3191. matched = match.shift();
  3192. tokens.push({
  3193. value: matched,
  3194. type: type,
  3195. matches: match
  3196. });
  3197. soFar = soFar.slice(matched.length)
  3198. }
  3199. }
  3200. if(!matched) {
  3201. break
  3202. }
  3203. }
  3204. return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0)
  3205. }
  3206. function toSelector(tokens) {
  3207. var i = 0,
  3208. len = tokens.length,
  3209. selector = "";
  3210. for(; i < len; i++) {
  3211. selector += tokens[i].value
  3212. }
  3213. return selector
  3214. }
  3215. function addCombinator(matcher, combinator, base) {
  3216. var dir = combinator.dir,
  3217. checkNonElements = base && dir === "parentNode",
  3218. doneName = done++;
  3219. return combinator.first ? function(elem, context, xml) {
  3220. while((elem = elem[dir])) {
  3221. if(elem.nodeType === 1 || checkNonElements) {
  3222. return matcher(elem, context, xml)
  3223. }
  3224. }
  3225. } : function(elem, context, xml) {
  3226. var data, cache, outerCache, dirkey = dirruns + " " + doneName;
  3227. if(xml) {
  3228. while((elem = elem[dir])) {
  3229. if(elem.nodeType === 1 || checkNonElements) {
  3230. if(matcher(elem, context, xml)) {
  3231. return true
  3232. }
  3233. }
  3234. }
  3235. } else {
  3236. while((elem = elem[dir])) {
  3237. if(elem.nodeType === 1 || checkNonElements) {
  3238. outerCache = elem[expando] || (elem[expando] = {});
  3239. if((cache = outerCache[dir]) && cache[0] === dirkey) {
  3240. if((data = cache[1]) === true || data === cachedruns) {
  3241. return data === true
  3242. }
  3243. } else {
  3244. cache = outerCache[dir] = [dirkey];
  3245. cache[1] = matcher(elem, context, xml) || cachedruns;
  3246. if(cache[1] === true) {
  3247. return true
  3248. }
  3249. }
  3250. }
  3251. }
  3252. }
  3253. }
  3254. }
  3255. function elementMatcher(matchers) {
  3256. return matchers.length > 1 ? function(elem, context, xml) {
  3257. var i = matchers.length;
  3258. while(i--) {
  3259. if(!matchers[i](elem, context, xml)) {
  3260. return false
  3261. }
  3262. }
  3263. return true
  3264. } : matchers[0]
  3265. }
  3266. function condense(unmatched, map, filter, context, xml) {
  3267. var elem, newUnmatched = [],
  3268. i = 0,
  3269. len = unmatched.length,
  3270. mapped = map != null;
  3271. for(; i < len; i++) {
  3272. if((elem = unmatched[i])) {
  3273. if(!filter || filter(elem, context, xml)) {
  3274. newUnmatched.push(elem);
  3275. if(mapped) {
  3276. map.push(i)
  3277. }
  3278. }
  3279. }
  3280. }
  3281. return newUnmatched
  3282. }
  3283. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  3284. if(postFilter && !postFilter[expando]) {
  3285. postFilter = setMatcher(postFilter)
  3286. }
  3287. if(postFinder && !postFinder[expando]) {
  3288. postFinder = setMatcher(postFinder, postSelector)
  3289. }
  3290. return markFunction(function(seed, results, context, xml) {
  3291. var temp, i, elem, preMap = [],
  3292. postMap = [],
  3293. preexisting = results.length,
  3294. elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
  3295. matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
  3296. matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
  3297. if(matcher) {
  3298. matcher(matcherIn, matcherOut, context, xml)
  3299. }
  3300. if(postFilter) {
  3301. temp = condense(matcherOut, postMap);
  3302. postFilter(temp, [], context, xml);
  3303. i = temp.length;
  3304. while(i--) {
  3305. if((elem = temp[i])) {
  3306. matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem)
  3307. }
  3308. }
  3309. }
  3310. if(seed) {
  3311. if(postFinder || preFilter) {
  3312. if(postFinder) {
  3313. temp = [];
  3314. i = matcherOut.length;
  3315. while(i--) {
  3316. if((elem = matcherOut[i])) {
  3317. temp.push((matcherIn[i] = elem))
  3318. }
  3319. }
  3320. postFinder(null, (matcherOut = []), temp, xml)
  3321. }
  3322. i = matcherOut.length;
  3323. while(i--) {
  3324. if((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) {
  3325. seed[temp] = !(results[temp] = elem)
  3326. }
  3327. }
  3328. }
  3329. } else {
  3330. matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
  3331. if(postFinder) {
  3332. postFinder(null, results, matcherOut, xml)
  3333. } else {
  3334. push.apply(results, matcherOut)
  3335. }
  3336. }
  3337. })
  3338. }
  3339. function matcherFromTokens(tokens) {
  3340. var checkContext, matcher, j, len = tokens.length,
  3341. leadingRelative = Expr.relative[tokens[0].type],
  3342. implicitRelative = leadingRelative || Expr.relative[" "],
  3343. i = leadingRelative ? 1 : 0,
  3344. matchContext = addCombinator(function(elem) {
  3345. return elem === checkContext
  3346. }, implicitRelative, true),
  3347. matchAnyContext = addCombinator(function(elem) {
  3348. return indexOf.call(checkContext, elem) > -1
  3349. }, implicitRelative, true),
  3350. matchers = [function(elem, context, xml) {
  3351. return(!leadingRelative && (xml || context !== outermostContext)) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml))
  3352. }];
  3353. for(; i < len; i++) {
  3354. if((matcher = Expr.relative[tokens[i].type])) {
  3355. matchers = [addCombinator(elementMatcher(matchers), matcher)]
  3356. } else {
  3357. matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
  3358. if(matcher[expando]) {
  3359. j = ++i;
  3360. for(; j < len; j++) {
  3361. if(Expr.relative[tokens[j].type]) {
  3362. break
  3363. }
  3364. }
  3365. return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1)).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens((tokens = tokens.slice(j))), j < len && toSelector(tokens))
  3366. }
  3367. matchers.push(matcher)
  3368. }
  3369. }
  3370. return elementMatcher(matchers)
  3371. }
  3372. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  3373. var matcherCachedRuns = 0,
  3374. bySet = setMatchers.length > 0,
  3375. byElement = elementMatchers.length > 0,
  3376. superMatcher = function(seed, context, xml, results, expandContext) {
  3377. var elem, j, matcher, setMatched = [],
  3378. matchedCount = 0,
  3379. i = "0",
  3380. unmatched = seed && [],
  3381. outermost = expandContext != null,
  3382. contextBackup = outermostContext,
  3383. elems = seed || byElement && Expr.find["TAG"]("*", expandContext && context.parentNode || context),
  3384. dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
  3385. if(outermost) {
  3386. outermostContext = context !== document && context;
  3387. cachedruns = matcherCachedRuns
  3388. }
  3389. for(;
  3390. (elem = elems[i]) != null; i++) {
  3391. if(byElement && elem) {
  3392. j = 0;
  3393. while((matcher = elementMatchers[j++])) {
  3394. if(matcher(elem, context, xml)) {
  3395. results.push(elem);
  3396. break
  3397. }
  3398. }
  3399. if(outermost) {
  3400. dirruns = dirrunsUnique;
  3401. cachedruns = ++matcherCachedRuns
  3402. }
  3403. }
  3404. if(bySet) {
  3405. if((elem = !matcher && elem)) {
  3406. matchedCount--
  3407. }
  3408. if(seed) {
  3409. unmatched.push(elem)
  3410. }
  3411. }
  3412. }
  3413. matchedCount += i;
  3414. if(bySet && i !== matchedCount) {
  3415. j = 0;
  3416. while((matcher = setMatchers[j++])) {
  3417. matcher(unmatched, setMatched, context, xml)
  3418. }
  3419. if(seed) {
  3420. if(matchedCount > 0) {
  3421. while(i--) {
  3422. if(!(unmatched[i] || setMatched[i])) {
  3423. setMatched[i] = pop.call(results)
  3424. }
  3425. }
  3426. }
  3427. setMatched = condense(setMatched)
  3428. }
  3429. push.apply(results, setMatched);
  3430. if(outermost && !seed && setMatched.length > 0 && (matchedCount + setMatchers.length) > 1) {
  3431. Sizzle.uniqueSort(results)
  3432. }
  3433. }
  3434. if(outermost) {
  3435. dirruns = dirrunsUnique;
  3436. outermostContext = contextBackup
  3437. }
  3438. return unmatched
  3439. };
  3440. return bySet ? markFunction(superMatcher) : superMatcher
  3441. }
  3442. compile = Sizzle.compile = function(selector, group) {
  3443. var i, setMatchers = [],
  3444. elementMatchers = [],
  3445. cached = compilerCache[selector + " "];
  3446. if(!cached) {
  3447. if(!group) {
  3448. group = tokenize(selector)
  3449. }
  3450. i = group.length;
  3451. while(i--) {
  3452. cached = matcherFromTokens(group[i]);
  3453. if(cached[expando]) {
  3454. setMatchers.push(cached)
  3455. } else {
  3456. elementMatchers.push(cached)
  3457. }
  3458. }
  3459. cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers))
  3460. }
  3461. return cached
  3462. };
  3463. function multipleContexts(selector, contexts, results) {
  3464. var i = 0,
  3465. len = contexts.length;
  3466. for(; i < len; i++) {
  3467. Sizzle(selector, contexts[i], results)
  3468. }
  3469. return results
  3470. }
  3471. function select(selector, context, results, seed) {
  3472. var i, tokens, token, type, find, match = tokenize(selector);
  3473. if(!seed) {
  3474. if(match.length === 1) {
  3475. tokens = match[0] = match[0].slice(0);
  3476. if(tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && !documentIsXML && Expr.relative[tokens[1].type]) {
  3477. context = Expr.find["ID"](token.matches[0].replace(runescape, funescape), context)[0];
  3478. if(!context) {
  3479. return results
  3480. }
  3481. selector = selector.slice(tokens.shift().value.length)
  3482. }
  3483. i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
  3484. while(i--) {
  3485. token = tokens[i];
  3486. if(Expr.relative[(type = token.type)]) {
  3487. break
  3488. }
  3489. if((find = Expr.find[type])) {
  3490. if((seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && context.parentNode || context))) {
  3491. tokens.splice(i, 1);
  3492. selector = seed.length && toSelector(tokens);
  3493. if(!selector) {
  3494. push.apply(results, slice.call(seed, 0));
  3495. return results
  3496. }
  3497. break
  3498. }
  3499. }
  3500. }
  3501. }
  3502. }
  3503. compile(selector, match)(seed, context, documentIsXML, results, rsibling.test(selector));
  3504. return results
  3505. }
  3506. Expr.pseudos["nth"] = Expr.pseudos["eq"];
  3507. function setFilters() {}
  3508. Expr.filters = setFilters.prototype = Expr.pseudos;
  3509. Expr.setFilters = new setFilters();
  3510. setDocument();
  3511. Sizzle.attr = jQuery.attr;
  3512. jQuery.find = Sizzle;
  3513. jQuery.expr = Sizzle.selectors;
  3514. jQuery.expr[":"] = jQuery.expr.pseudos;
  3515. jQuery.unique = Sizzle.uniqueSort;
  3516. jQuery.text = Sizzle.getText;
  3517. jQuery.isXMLDoc = Sizzle.isXML;
  3518. jQuery.contains = Sizzle.contains
  3519. })(window);
  3520. var runtil = /Until$/,
  3521. rparentsprev = /^(?:parents|prev(?:Until|All))/,
  3522. isSimple = /^.[^:#\[\.,]*$/,
  3523. rneedsContext = jQuery.expr.match.needsContext,
  3524. guaranteedUnique = {
  3525. children: true,
  3526. contents: true,
  3527. next: true,
  3528. prev: true
  3529. };
  3530. jQuery.fn.extend({
  3531. find: function(selector) {
  3532. var i, ret, self, len = this.length;
  3533. if(typeof selector !== "string") {
  3534. self = this;
  3535. return this.pushStack(jQuery(selector).filter(function() {
  3536. for(i = 0; i < len; i++) {
  3537. if(jQuery.contains(self[i], this)) {
  3538. return true
  3539. }
  3540. }
  3541. }))
  3542. }
  3543. ret = [];
  3544. for(i = 0; i < len; i++) {
  3545. jQuery.find(selector, this[i], ret)
  3546. }
  3547. ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);
  3548. ret.selector = (this.selector ? this.selector + " " : "") + selector;
  3549. return ret
  3550. },
  3551. has: function(target) {
  3552. var i, targets = jQuery(target, this),
  3553. len = targets.length;
  3554. return this.filter(function() {
  3555. for(i = 0; i < len; i++) {
  3556. if(jQuery.contains(this, targets[i])) {
  3557. return true
  3558. }
  3559. }
  3560. })
  3561. },
  3562. not: function(selector) {
  3563. return this.pushStack(winnow(this, selector, false))
  3564. },
  3565. filter: function(selector) {
  3566. return this.pushStack(winnow(this, selector, true))
  3567. },
  3568. is: function(selector) {
  3569. return !!selector && (typeof selector === "string" ? rneedsContext.test(selector) ? jQuery(selector, this.context).index(this[0]) >= 0 : jQuery.filter(selector, this).length > 0 : this.filter(selector).length > 0)
  3570. },
  3571. closest: function(selectors, context) {
  3572. var cur, i = 0,
  3573. l = this.length,
  3574. ret = [],
  3575. pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors, context || this.context) : 0;
  3576. for(; i < l; i++) {
  3577. cur = this[i];
  3578. while(cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11) {
  3579. if(pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors)) {
  3580. ret.push(cur);
  3581. break
  3582. }
  3583. cur = cur.parentNode
  3584. }
  3585. }
  3586. return this.pushStack(ret.length > 1 ? jQuery.unique(ret) : ret)
  3587. },
  3588. index: function(elem) {
  3589. if(!elem) {
  3590. return(this[0] && this[0].parentNode) ? this.first().prevAll().length : -1
  3591. }
  3592. if(typeof elem === "string") {
  3593. return jQuery.inArray(this[0], jQuery(elem))
  3594. }
  3595. return jQuery.inArray(elem.jquery ? elem[0] : elem, this)
  3596. },
  3597. add: function(selector, context) {
  3598. var set = typeof selector === "string" ? jQuery(selector, context) : jQuery.makeArray(selector && selector.nodeType ? [selector] : selector),
  3599. all = jQuery.merge(this.get(), set);
  3600. return this.pushStack(jQuery.unique(all))
  3601. },
  3602. addBack: function(selector) {
  3603. return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector))
  3604. }
  3605. });
  3606. jQuery.fn.andSelf = jQuery.fn.addBack;
  3607. function sibling(cur, dir) {
  3608. do {
  3609. cur = cur[dir]
  3610. } while (cur && cur.nodeType !== 1);
  3611. return cur
  3612. }
  3613. jQuery.each({
  3614. parent: function(elem) {
  3615. var parent = elem.parentNode;
  3616. return parent && parent.nodeType !== 11 ? parent : null
  3617. },
  3618. parents: function(elem) {
  3619. return jQuery.dir(elem, "parentNode")
  3620. },
  3621. parentsUntil: function(elem, i, until) {
  3622. return jQuery.dir(elem, "parentNode", until)
  3623. },
  3624. next: function(elem) {
  3625. return sibling(elem, "nextSibling")
  3626. },
  3627. prev: function(elem) {
  3628. return sibling(elem, "previousSibling")
  3629. },
  3630. nextAll: function(elem) {
  3631. return jQuery.dir(elem, "nextSibling")
  3632. },
  3633. prevAll: function(elem) {
  3634. return jQuery.dir(elem, "previousSibling")
  3635. },
  3636. nextUntil: function(elem, i, until) {
  3637. return jQuery.dir(elem, "nextSibling", until)
  3638. },
  3639. prevUntil: function(elem, i, until) {
  3640. return jQuery.dir(elem, "previousSibling", until)
  3641. },
  3642. siblings: function(elem) {
  3643. return jQuery.sibling((elem.parentNode || {}).firstChild, elem)
  3644. },
  3645. children: function(elem) {
  3646. return jQuery.sibling(elem.firstChild)
  3647. },
  3648. contents: function(elem) {
  3649. return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.merge([], elem.childNodes)
  3650. }
  3651. }, function(name, fn) {
  3652. jQuery.fn[name] = function(until, selector) {
  3653. var ret = jQuery.map(this, fn, until);
  3654. if(!runtil.test(name)) {
  3655. selector = until
  3656. }
  3657. if(selector && typeof selector === "string") {
  3658. ret = jQuery.filter(selector, ret)
  3659. }
  3660. ret = this.length > 1 && !guaranteedUnique[name] ? jQuery.unique(ret) : ret;
  3661. if(this.length > 1 && rparentsprev.test(name)) {
  3662. ret = ret.reverse()
  3663. }
  3664. return this.pushStack(ret)
  3665. }
  3666. });
  3667. jQuery.extend({
  3668. filter: function(expr, elems, not) {
  3669. if(not) {
  3670. expr = ":not(" + expr + ")"
  3671. }
  3672. return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] : jQuery.find.matches(expr, elems)
  3673. },
  3674. dir: function(elem, dir, until) {
  3675. var matched = [],
  3676. cur = elem[dir];
  3677. while(cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) {
  3678. if(cur.nodeType === 1) {
  3679. matched.push(cur)
  3680. }
  3681. cur = cur[dir]
  3682. }
  3683. return matched
  3684. },
  3685. sibling: function(n, elem) {
  3686. var r = [];
  3687. for(; n; n = n.nextSibling) {
  3688. if(n.nodeType === 1 && n !== elem) {
  3689. r.push(n)
  3690. }
  3691. }
  3692. return r
  3693. }
  3694. });
  3695. function winnow(elements, qualifier, keep) {
  3696. qualifier = qualifier || 0;
  3697. if(jQuery.isFunction(qualifier)) {
  3698. return jQuery.grep(elements, function(elem, i) {
  3699. var retVal = !!qualifier.call(elem, i, elem);
  3700. return retVal === keep
  3701. })
  3702. } else if(qualifier.nodeType) {
  3703. return jQuery.grep(elements, function(elem) {
  3704. return(elem === qualifier) === keep
  3705. })
  3706. } else if(typeof qualifier === "string") {
  3707. var filtered = jQuery.grep(elements, function(elem) {
  3708. return elem.nodeType === 1
  3709. });
  3710. if(isSimple.test(qualifier)) {
  3711. return jQuery.filter(qualifier, filtered, !keep)
  3712. } else {
  3713. qualifier = jQuery.filter(qualifier, filtered)
  3714. }
  3715. }
  3716. return jQuery.grep(elements, function(elem) {
  3717. return(jQuery.inArray(elem, qualifier) >= 0) === keep
  3718. })
  3719. }
  3720. function createSafeFragment(document) {
  3721. var list = nodeNames.split("|"),
  3722. safeFrag = document.createDocumentFragment();
  3723. if(safeFrag.createElement) {
  3724. while(list.length) {
  3725. safeFrag.createElement(list.pop())
  3726. }
  3727. }
  3728. return safeFrag
  3729. }
  3730. var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
  3731. rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
  3732. rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
  3733. rleadingWhitespace = /^\s+/,
  3734. rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
  3735. rtagName = /<([\w:]+)/,
  3736. rtbody = /<tbody/i,
  3737. rhtml = /<|&#?\w+;/,
  3738. rnoInnerhtml = /<(?:script|style|link)/i,
  3739. manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
  3740. rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
  3741. rscriptType = /^$|\/(?:java|ecma)script/i,
  3742. rscriptTypeMasked = /^true\/(.*)/,
  3743. rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
  3744. wrapMap = {
  3745. option: [1, "<select multiple='multiple'>", "</select>"],
  3746. legend: [1, "<fieldset>", "</fieldset>"],
  3747. area: [1, "<map>", "</map>"],
  3748. param: [1, "<object>", "</object>"],
  3749. thead: [1, "<table>", "</table>"],
  3750. tr: [2, "<table><tbody>", "</tbody></table>"],
  3751. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  3752. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  3753. _default: jQuery.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
  3754. },
  3755. safeFragment = createSafeFragment(document),
  3756. fragmentDiv = safeFragment.appendChild(document.createElement("div"));
  3757. wrapMap.optgroup = wrapMap.option;
  3758. wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  3759. wrapMap.th = wrapMap.td;
  3760. jQuery.fn.extend({
  3761. text: function(value) {
  3762. return jQuery.access(this, function(value) {
  3763. return value === undefined ? jQuery.text(this) : this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(value))
  3764. }, null, value, arguments.length)
  3765. },
  3766. wrapAll: function(html) {
  3767. if(jQuery.isFunction(html)) {
  3768. return this.each(function(i) {
  3769. jQuery(this).wrapAll(html.call(this, i))
  3770. })
  3771. }
  3772. if(this[0]) {
  3773. var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
  3774. if(this[0].parentNode) {
  3775. wrap.insertBefore(this[0])
  3776. }
  3777. wrap.map(function() {
  3778. var elem = this;
  3779. while(elem.firstChild && elem.firstChild.nodeType === 1) {
  3780. elem = elem.firstChild
  3781. }
  3782. return elem
  3783. }).append(this)
  3784. }
  3785. return this
  3786. },
  3787. wrapInner: function(html) {
  3788. if(jQuery.isFunction(html)) {
  3789. return this.each(function(i) {
  3790. jQuery(this).wrapInner(html.call(this, i))
  3791. })
  3792. }
  3793. return this.each(function() {
  3794. var self = jQuery(this),
  3795. contents = self.contents();
  3796. if(contents.length) {
  3797. contents.wrapAll(html)
  3798. } else {
  3799. self.append(html)
  3800. }
  3801. })
  3802. },
  3803. wrap: function(html) {
  3804. var isFunction = jQuery.isFunction(html);
  3805. return this.each(function(i) {
  3806. jQuery(this).wrapAll(isFunction ? html.call(this, i) : html)
  3807. })
  3808. },
  3809. unwrap: function() {
  3810. return this.parent().each(function() {
  3811. if(!jQuery.nodeName(this, "body")) {
  3812. jQuery(this).replaceWith(this.childNodes)
  3813. }
  3814. }).end()
  3815. },
  3816. append: function() {
  3817. return this.domManip(arguments, true, function(elem) {
  3818. if(this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3819. this.appendChild(elem)
  3820. }
  3821. })
  3822. },
  3823. prepend: function() {
  3824. return this.domManip(arguments, true, function(elem) {
  3825. if(this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3826. this.insertBefore(elem, this.firstChild)
  3827. }
  3828. })
  3829. },
  3830. before: function() {
  3831. return this.domManip(arguments, false, function(elem) {
  3832. if(this.parentNode) {
  3833. this.parentNode.insertBefore(elem, this)
  3834. }
  3835. })
  3836. },
  3837. after: function() {
  3838. return this.domManip(arguments, false, function(elem) {
  3839. if(this.parentNode) {
  3840. this.parentNode.insertBefore(elem, this.nextSibling)
  3841. }
  3842. })
  3843. },
  3844. remove: function(selector, keepData) {
  3845. var elem, i = 0;
  3846. for(;
  3847. (elem = this[i]) != null; i++) {
  3848. if(!selector || jQuery.filter(selector, [elem]).length > 0) {
  3849. if(!keepData && elem.nodeType === 1) {
  3850. jQuery.cleanData(getAll(elem))
  3851. }
  3852. if(elem.parentNode) {
  3853. if(keepData && jQuery.contains(elem.ownerDocument, elem)) {
  3854. setGlobalEval(getAll(elem, "script"))
  3855. }
  3856. elem.parentNode.removeChild(elem)
  3857. }
  3858. }
  3859. }
  3860. return this
  3861. },
  3862. empty: function() {
  3863. var elem, i = 0;
  3864. for(;
  3865. (elem = this[i]) != null; i++) {
  3866. if(elem.nodeType === 1) {
  3867. jQuery.cleanData(getAll(elem, false))
  3868. }
  3869. while(elem.firstChild) {
  3870. elem.removeChild(elem.firstChild)
  3871. }
  3872. if(elem.options && jQuery.nodeName(elem, "select")) {
  3873. elem.options.length = 0
  3874. }
  3875. }
  3876. return this
  3877. },
  3878. clone: function(dataAndEvents, deepDataAndEvents) {
  3879. dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  3880. deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  3881. return this.map(function() {
  3882. return jQuery.clone(this, dataAndEvents, deepDataAndEvents)
  3883. })
  3884. },
  3885. html: function(value) {
  3886. return jQuery.access(this, function(value) {
  3887. var elem = this[0] || {},
  3888. i = 0,
  3889. l = this.length;
  3890. if(value === undefined) {
  3891. return elem.nodeType === 1 ? elem.innerHTML.replace(rinlinejQuery, "") : undefined
  3892. }
  3893. if(typeof value === "string" && !rnoInnerhtml.test(value) && (jQuery.support.htmlSerialize || !rnoshimcache.test(value)) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
  3894. value = value.replace(rxhtmlTag, "<$1></$2>");
  3895. try {
  3896. for(; i < l; i++) {
  3897. elem = this[i] || {};
  3898. if(elem.nodeType === 1) {
  3899. jQuery.cleanData(getAll(elem, false));
  3900. elem.innerHTML = value
  3901. }
  3902. }
  3903. elem = 0
  3904. } catch(e) {}
  3905. }
  3906. if(elem) {
  3907. this.empty().append(value)
  3908. }
  3909. }, null, value, arguments.length)
  3910. },
  3911. replaceWith: function(value) {
  3912. var isFunc = jQuery.isFunction(value);
  3913. if(!isFunc && typeof value !== "string") {
  3914. value = jQuery(value).not(this).detach()
  3915. }
  3916. return this.domManip([value], true, function(elem) {
  3917. var next = this.nextSibling,
  3918. parent = this.parentNode;
  3919. if(parent) {
  3920. jQuery(this).remove();
  3921. parent.insertBefore(elem, next)
  3922. }
  3923. })
  3924. },
  3925. detach: function(selector) {
  3926. return this.remove(selector, true)
  3927. },
  3928. domManip: function(args, table, callback) {
  3929. args = core_concat.apply([], args);
  3930. var first, node, hasScripts, scripts, doc, fragment, i = 0,
  3931. l = this.length,
  3932. set = this,
  3933. iNoClone = l - 1,
  3934. value = args[0],
  3935. isFunction = jQuery.isFunction(value);
  3936. if(isFunction || !(l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test(value))) {
  3937. return this.each(function(index) {
  3938. var self = set.eq(index);
  3939. if(isFunction) {
  3940. args[0] = value.call(this, index, table ? self.html() : undefined)
  3941. }
  3942. self.domManip(args, table, callback)
  3943. })
  3944. }
  3945. if(l) {
  3946. fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, this);
  3947. first = fragment.firstChild;
  3948. if(fragment.childNodes.length === 1) {
  3949. fragment = first
  3950. }
  3951. if(first) {
  3952. table = table && jQuery.nodeName(first, "tr");
  3953. scripts = jQuery.map(getAll(fragment, "script"), disableScript);
  3954. hasScripts = scripts.length;
  3955. for(; i < l; i++) {
  3956. node = fragment;
  3957. if(i !== iNoClone) {
  3958. node = jQuery.clone(node, true, true);
  3959. if(hasScripts) {
  3960. jQuery.merge(scripts, getAll(node, "script"))
  3961. }
  3962. }
  3963. callback.call(table && jQuery.nodeName(this[i], "table") ? findOrAppend(this[i], "tbody") : this[i], node, i)
  3964. }
  3965. if(hasScripts) {
  3966. doc = scripts[scripts.length - 1].ownerDocument;
  3967. jQuery.map(scripts, restoreScript);
  3968. for(i = 0; i < hasScripts; i++) {
  3969. node = scripts[i];
  3970. if(rscriptType.test(node.type || "") && !jQuery._data(node, "globalEval") && jQuery.contains(doc, node)) {
  3971. if(node.src) {
  3972. jQuery.ajax({
  3973. url: node.src,
  3974. type: "GET",
  3975. dataType: "script",
  3976. async: false,
  3977. global: false,
  3978. "throws": true
  3979. })
  3980. } else {
  3981. jQuery.globalEval((node.text || node.textContent || node.innerHTML || "").replace(rcleanScript, ""))
  3982. }
  3983. }
  3984. }
  3985. }
  3986. fragment = first = null
  3987. }
  3988. }
  3989. return this
  3990. }
  3991. });
  3992. function findOrAppend(elem, tag) {
  3993. return elem.getElementsByTagName(tag)[0] || elem.appendChild(elem.ownerDocument.createElement(tag))
  3994. }
  3995. function disableScript(elem) {
  3996. var attr = elem.getAttributeNode("type");
  3997. elem.type = (attr && attr.specified) + "/" + elem.type;
  3998. return elem
  3999. }
  4000. function restoreScript(elem) {
  4001. var match = rscriptTypeMasked.exec(elem.type);
  4002. if(match) {
  4003. elem.type = match[1]
  4004. } else {
  4005. elem.removeAttribute("type")
  4006. }
  4007. return elem
  4008. }
  4009. function setGlobalEval(elems, refElements) {
  4010. var elem, i = 0;
  4011. for(;
  4012. (elem = elems[i]) != null; i++) {
  4013. jQuery._data(elem, "globalEval", !refElements || jQuery._data(refElements[i], "globalEval"))
  4014. }
  4015. }
  4016. function cloneCopyEvent(src, dest) {
  4017. if(dest.nodeType !== 1 || !jQuery.hasData(src)) {
  4018. return
  4019. }
  4020. var type, i, l, oldData = jQuery._data(src),
  4021. curData = jQuery._data(dest, oldData),
  4022. events = oldData.events;
  4023. if(events) {
  4024. delete curData.handle;
  4025. curData.events = {};
  4026. for(type in events) {
  4027. for(i = 0, l = events[type].length; i < l; i++) {
  4028. jQuery.event.add(dest, type, events[type][i])
  4029. }
  4030. }
  4031. }
  4032. if(curData.data) {
  4033. curData.data = jQuery.extend({}, curData.data)
  4034. }
  4035. }
  4036. function fixCloneNodeIssues(src, dest) {
  4037. var nodeName, e, data;
  4038. if(dest.nodeType !== 1) {
  4039. return
  4040. }
  4041. nodeName = dest.nodeName.toLowerCase();
  4042. if(!jQuery.support.noCloneEvent && dest[jQuery.expando]) {
  4043. data = jQuery._data(dest);
  4044. for(e in data.events) {
  4045. jQuery.removeEvent(dest, e, data.handle)
  4046. }
  4047. dest.removeAttribute(jQuery.expando)
  4048. }
  4049. if(nodeName === "script" && dest.text !== src.text) {
  4050. disableScript(dest).text = src.text;
  4051. restoreScript(dest)
  4052. } else if(nodeName === "object") {
  4053. if(dest.parentNode) {
  4054. dest.outerHTML = src.outerHTML
  4055. }
  4056. if(jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML))) {
  4057. dest.innerHTML = src.innerHTML
  4058. }
  4059. } else if(nodeName === "input" && manipulation_rcheckableType.test(src.type)) {
  4060. dest.defaultChecked = dest.checked = src.checked;
  4061. if(dest.value !== src.value) {
  4062. dest.value = src.value
  4063. }
  4064. } else if(nodeName === "option") {
  4065. dest.defaultSelected = dest.selected = src.defaultSelected
  4066. } else if(nodeName === "input" || nodeName === "textarea") {
  4067. dest.defaultValue = src.defaultValue
  4068. }
  4069. }
  4070. jQuery.each({
  4071. appendTo: "append",
  4072. prependTo: "prepend",
  4073. insertBefore: "before",
  4074. insertAfter: "after",
  4075. replaceAll: "replaceWith"
  4076. }, function(name, original) {
  4077. jQuery.fn[name] = function(selector) {
  4078. var elems, i = 0,
  4079. ret = [],
  4080. insert = jQuery(selector),
  4081. last = insert.length - 1;
  4082. for(; i <= last; i++) {
  4083. elems = i === last ? this : this.clone(true);
  4084. jQuery(insert[i])[original](elems);
  4085. core_push.apply(ret, elems.get())
  4086. }
  4087. return this.pushStack(ret)
  4088. }
  4089. });
  4090. function getAll(context, tag) {
  4091. var elems, elem, i = 0,
  4092. found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName(tag || "*") : typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll(tag || "*") : undefined;
  4093. if(!found) {
  4094. for(found = [], elems = context.childNodes || context;
  4095. (elem = elems[i]) != null; i++) {
  4096. if(!tag || jQuery.nodeName(elem, tag)) {
  4097. found.push(elem)
  4098. } else {
  4099. jQuery.merge(found, getAll(elem, tag))
  4100. }
  4101. }
  4102. }
  4103. return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], found) : found
  4104. }
  4105. function fixDefaultChecked(elem) {
  4106. if(manipulation_rcheckableType.test(elem.type)) {
  4107. elem.defaultChecked = elem.checked
  4108. }
  4109. }
  4110. jQuery.extend({
  4111. clone: function(elem, dataAndEvents, deepDataAndEvents) {
  4112. var destElements, node, clone, i, srcElements, inPage = jQuery.contains(elem.ownerDocument, elem);
  4113. if(jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test("<" + elem.nodeName + ">")) {
  4114. clone = elem.cloneNode(true)
  4115. } else {
  4116. fragmentDiv.innerHTML = elem.outerHTML;
  4117. fragmentDiv.removeChild(clone = fragmentDiv.firstChild)
  4118. }
  4119. if((!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
  4120. destElements = getAll(clone);
  4121. srcElements = getAll(elem);
  4122. for(i = 0;
  4123. (node = srcElements[i]) != null; ++i) {
  4124. if(destElements[i]) {
  4125. fixCloneNodeIssues(node, destElements[i])
  4126. }
  4127. }
  4128. }
  4129. if(dataAndEvents) {
  4130. if(deepDataAndEvents) {
  4131. srcElements = srcElements || getAll(elem);
  4132. destElements = destElements || getAll(clone);
  4133. for(i = 0;
  4134. (node = srcElements[i]) != null; i++) {
  4135. cloneCopyEvent(node, destElements[i])
  4136. }
  4137. } else {
  4138. cloneCopyEvent(elem, clone)
  4139. }
  4140. }
  4141. destElements = getAll(clone, "script");
  4142. if(destElements.length > 0) {
  4143. setGlobalEval(destElements, !inPage && getAll(elem, "script"))
  4144. }
  4145. destElements = srcElements = node = null;
  4146. return clone
  4147. },
  4148. buildFragment: function(elems, context, scripts, selection) {
  4149. var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length,
  4150. safe = createSafeFragment(context),
  4151. nodes = [],
  4152. i = 0;
  4153. for(; i < l; i++) {
  4154. elem = elems[i];
  4155. if(elem || elem === 0) {
  4156. if(jQuery.type(elem) === "object") {
  4157. jQuery.merge(nodes, elem.nodeType ? [elem] : elem)
  4158. } else if(!rhtml.test(elem)) {
  4159. nodes.push(context.createTextNode(elem))
  4160. } else {
  4161. tmp = tmp || safe.appendChild(context.createElement("div"));
  4162. tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
  4163. wrap = wrapMap[tag] || wrapMap._default;
  4164. tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2];
  4165. j = wrap[0];
  4166. while(j--) {
  4167. tmp = tmp.lastChild
  4168. }
  4169. if(!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
  4170. nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0]))
  4171. }
  4172. if(!jQuery.support.tbody) {
  4173. elem = tag === "table" && !rtbody.test(elem) ? tmp.firstChild : wrap[1] === "<table>" && !rtbody.test(elem) ? tmp : 0;
  4174. j = elem && elem.childNodes.length;
  4175. while(j--) {
  4176. if(jQuery.nodeName((tbody = elem.childNodes[j]), "tbody") && !tbody.childNodes.length) {
  4177. elem.removeChild(tbody)
  4178. }
  4179. }
  4180. }
  4181. jQuery.merge(nodes, tmp.childNodes);
  4182. tmp.textContent = "";
  4183. while(tmp.firstChild) {
  4184. tmp.removeChild(tmp.firstChild)
  4185. }
  4186. tmp = safe.lastChild
  4187. }
  4188. }
  4189. }
  4190. if(tmp) {
  4191. safe.removeChild(tmp)
  4192. }
  4193. if(!jQuery.support.appendChecked) {
  4194. jQuery.grep(getAll(nodes, "input"), fixDefaultChecked)
  4195. }
  4196. i = 0;
  4197. while((elem = nodes[i++])) {
  4198. if(selection && jQuery.inArray(elem, selection) !== -1) {
  4199. continue
  4200. }
  4201. contains = jQuery.contains(elem.ownerDocument, elem);
  4202. tmp = getAll(safe.appendChild(elem), "script");
  4203. if(contains) {
  4204. setGlobalEval(tmp)
  4205. }
  4206. if(scripts) {
  4207. j = 0;
  4208. while((elem = tmp[j++])) {
  4209. if(rscriptType.test(elem.type || "")) {
  4210. scripts.push(elem)
  4211. }
  4212. }
  4213. }
  4214. }
  4215. tmp = null;
  4216. return safe
  4217. },
  4218. cleanData: function(elems, acceptData) {
  4219. var elem, type, id, data, i = 0,
  4220. internalKey = jQuery.expando,
  4221. cache = jQuery.cache,
  4222. deleteExpando = jQuery.support.deleteExpando,
  4223. special = jQuery.event.special;
  4224. for(;
  4225. (elem = elems[i]) != null; i++) {
  4226. if(acceptData || jQuery.acceptData(elem)) {
  4227. id = elem[internalKey];
  4228. data = id && cache[id];
  4229. if(data) {
  4230. if(data.events) {
  4231. for(type in data.events) {
  4232. if(special[type]) {
  4233. jQuery.event.remove(elem, type)
  4234. } else {
  4235. jQuery.removeEvent(elem, type, data.handle)
  4236. }
  4237. }
  4238. }
  4239. if(cache[id]) {
  4240. delete cache[id];
  4241. if(deleteExpando) {
  4242. delete elem[internalKey]
  4243. } else if(typeof elem.removeAttribute !== core_strundefined) {
  4244. elem.removeAttribute(internalKey)
  4245. } else {
  4246. elem[internalKey] = null
  4247. }
  4248. core_deletedIds.push(id)
  4249. }
  4250. }
  4251. }
  4252. }
  4253. }
  4254. });
  4255. var iframe, getStyles, curCSS, ralpha = /alpha\([^)]*\)/i,
  4256. ropacity = /opacity\s*=\s*([^)]*)/,
  4257. rposition = /^(top|right|bottom|left)$/,
  4258. rdisplayswap = /^(none|table(?!-c[ea]).+)/,
  4259. rmargin = /^margin/,
  4260. rnumsplit = new RegExp("^(" + core_pnum + ")(.*)$", "i"),
  4261. rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i"),
  4262. rrelNum = new RegExp("^([+-])=(" + core_pnum + ")", "i"),
  4263. elemdisplay = {
  4264. BODY: "block"
  4265. },
  4266. cssShow = {
  4267. position: "absolute",
  4268. visibility: "hidden",
  4269. display: "block"
  4270. },
  4271. cssNormalTransform = {
  4272. letterSpacing: 0,
  4273. fontWeight: 400
  4274. },
  4275. cssExpand = ["Top", "Right", "Bottom", "Left"],
  4276. cssPrefixes = ["Webkit", "O", "Moz", "ms"];
  4277. function vendorPropName(style, name) {
  4278. if(name in style) {
  4279. return name
  4280. }
  4281. var capName = name.charAt(0).toUpperCase() + name.slice(1),
  4282. origName = name,
  4283. i = cssPrefixes.length;
  4284. while(i--) {
  4285. name = cssPrefixes[i] + capName;
  4286. if(name in style) {
  4287. return name
  4288. }
  4289. }
  4290. return origName
  4291. }
  4292. function isHidden(elem, el) {
  4293. elem = el || elem;
  4294. return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem)
  4295. }
  4296. function showHide(elements, show) {
  4297. var display, elem, hidden, values = [],
  4298. index = 0,
  4299. length = elements.length;
  4300. for(; index < length; index++) {
  4301. elem = elements[index];
  4302. if(!elem.style) {
  4303. continue
  4304. }
  4305. values[index] = jQuery._data(elem, "olddisplay");
  4306. display = elem.style.display;
  4307. if(show) {
  4308. if(!values[index] && display === "none") {
  4309. elem.style.display = ""
  4310. }
  4311. if(elem.style.display === "" && isHidden(elem)) {
  4312. values[index] = jQuery._data(elem, "olddisplay", css_defaultDisplay(elem.nodeName))
  4313. }
  4314. } else {
  4315. if(!values[index]) {
  4316. hidden = isHidden(elem);
  4317. if(display && display !== "none" || !hidden) {
  4318. jQuery._data(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display"))
  4319. }
  4320. }
  4321. }
  4322. }
  4323. for(index = 0; index < length; index++) {
  4324. elem = elements[index];
  4325. if(!elem.style) {
  4326. continue
  4327. }
  4328. if(!show || elem.style.display === "none" || elem.style.display === "") {
  4329. elem.style.display = show ? values[index] || "" : "none"
  4330. }
  4331. }
  4332. return elements
  4333. }
  4334. jQuery.fn.extend({
  4335. css: function(name, value) {
  4336. return jQuery.access(this, function(elem, name, value) {
  4337. var len, styles, map = {},
  4338. i = 0;
  4339. if(jQuery.isArray(name)) {
  4340. styles = getStyles(elem);
  4341. len = name.length;
  4342. for(; i < len; i++) {
  4343. map[name[i]] = jQuery.css(elem, name[i], false, styles)
  4344. }
  4345. return map
  4346. }
  4347. return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name)
  4348. }, name, value, arguments.length > 1)
  4349. },
  4350. show: function() {
  4351. return showHide(this, true)
  4352. },
  4353. hide: function() {
  4354. return showHide(this)
  4355. },
  4356. toggle: function(state) {
  4357. var bool = typeof state === "boolean";
  4358. return this.each(function() {
  4359. if(bool ? state : isHidden(this)) {
  4360. jQuery(this).show()
  4361. } else {
  4362. jQuery(this).hide()
  4363. }
  4364. })
  4365. }
  4366. });
  4367. jQuery.extend({
  4368. cssHooks: {
  4369. opacity: {
  4370. get: function(elem, computed) {
  4371. if(computed) {
  4372. var ret = curCSS(elem, "opacity");
  4373. return ret === "" ? "1" : ret
  4374. }
  4375. }
  4376. }
  4377. },
  4378. cssNumber: {
  4379. "columnCount": true,
  4380. "fillOpacity": true,
  4381. "fontWeight": true,
  4382. "lineHeight": true,
  4383. "opacity": true,
  4384. "orphans": true,
  4385. "widows": true,
  4386. "zIndex": true,
  4387. "zoom": true
  4388. },
  4389. cssProps: {
  4390. "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
  4391. },
  4392. style: function(elem, name, value, extra) {
  4393. if(!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
  4394. return
  4395. }
  4396. var ret, type, hooks, origName = jQuery.camelCase(name),
  4397. style = elem.style;
  4398. name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style, origName));
  4399. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  4400. if(value !== undefined) {
  4401. type = typeof value;
  4402. if(type === "string" && (ret = rrelNum.exec(value))) {
  4403. value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name));
  4404. type = "number"
  4405. }
  4406. if(value == null || type === "number" && isNaN(value)) {
  4407. return
  4408. }
  4409. if(type === "number" && !jQuery.cssNumber[origName]) {
  4410. value += "px"
  4411. }
  4412. if(!jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
  4413. style[name] = "inherit"
  4414. }
  4415. if(!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
  4416. try {
  4417. style[name] = value
  4418. } catch(e) {}
  4419. }
  4420. } else {
  4421. if(hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
  4422. return ret
  4423. }
  4424. return style[name]
  4425. }
  4426. },
  4427. css: function(elem, name, extra, styles) {
  4428. var num, val, hooks, origName = jQuery.camelCase(name);
  4429. name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style, origName));
  4430. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  4431. if(hooks && "get" in hooks) {
  4432. val = hooks.get(elem, true, extra)
  4433. }
  4434. if(val === undefined) {
  4435. val = curCSS(elem, name, styles)
  4436. }
  4437. if(val === "normal" && name in cssNormalTransform) {
  4438. val = cssNormalTransform[name]
  4439. }
  4440. if(extra === "" || extra) {
  4441. num = parseFloat(val);
  4442. return extra === true || jQuery.isNumeric(num) ? num || 0 : val
  4443. }
  4444. return val
  4445. },
  4446. swap: function(elem, options, callback, args) {
  4447. var ret, name, old = {};
  4448. for(name in options) {
  4449. old[name] = elem.style[name];
  4450. elem.style[name] = options[name]
  4451. }
  4452. ret = callback.apply(elem, args || []);
  4453. for(name in options) {
  4454. elem.style[name] = old[name]
  4455. }
  4456. return ret
  4457. }
  4458. });
  4459. if(window.getComputedStyle) {
  4460. getStyles = function(elem) {
  4461. return window.getComputedStyle(elem, null)
  4462. };
  4463. curCSS = function(elem, name, _computed) {
  4464. var width, minWidth, maxWidth, computed = _computed || getStyles(elem),
  4465. ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined,
  4466. style = elem.style;
  4467. if(computed) {
  4468. if(ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
  4469. ret = jQuery.style(elem, name)
  4470. }
  4471. if(rnumnonpx.test(ret) && rmargin.test(name)) {
  4472. width = style.width;
  4473. minWidth = style.minWidth;
  4474. maxWidth = style.maxWidth;
  4475. style.minWidth = style.maxWidth = style.width = ret;
  4476. ret = computed.width;
  4477. style.width = width;
  4478. style.minWidth = minWidth;
  4479. style.maxWidth = maxWidth
  4480. }
  4481. }
  4482. return ret
  4483. }
  4484. } else if(document.documentElement.currentStyle) {
  4485. getStyles = function(elem) {
  4486. return elem.currentStyle
  4487. };
  4488. curCSS = function(elem, name, _computed) {
  4489. var left, rs, rsLeft, computed = _computed || getStyles(elem),
  4490. ret = computed ? computed[name] : undefined,
  4491. style = elem.style;
  4492. if(ret == null && style && style[name]) {
  4493. ret = style[name]
  4494. }
  4495. if(rnumnonpx.test(ret) && !rposition.test(name)) {
  4496. left = style.left;
  4497. rs = elem.runtimeStyle;
  4498. rsLeft = rs && rs.left;
  4499. if(rsLeft) {
  4500. rs.left = elem.currentStyle.left
  4501. }
  4502. style.left = name === "fontSize" ? "1em" : ret;
  4503. ret = style.pixelLeft + "px";
  4504. style.left = left;
  4505. if(rsLeft) {
  4506. rs.left = rsLeft
  4507. }
  4508. }
  4509. return ret === "" ? "auto" : ret
  4510. }
  4511. }
  4512. function setPositiveNumber(elem, value, subtract) {
  4513. var matches = rnumsplit.exec(value);
  4514. return matches ? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value
  4515. }
  4516. function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
  4517. var i = extra === (isBorderBox ? "border" : "content") ? 4 : name === "width" ? 1 : 0,
  4518. val = 0;
  4519. for(; i < 4; i += 2) {
  4520. if(extra === "margin") {
  4521. val += jQuery.css(elem, extra + cssExpand[i], true, styles)
  4522. }
  4523. if(isBorderBox) {
  4524. if(extra === "content") {
  4525. val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles)
  4526. }
  4527. if(extra !== "margin") {
  4528. val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles)
  4529. }
  4530. } else {
  4531. val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  4532. if(extra !== "padding") {
  4533. val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles)
  4534. }
  4535. }
  4536. }
  4537. return val
  4538. }
  4539. function getWidthOrHeight(elem, name, extra) {
  4540. var valueIsBorderBox = true,
  4541. val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
  4542. styles = getStyles(elem),
  4543. isBorderBox = jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box";
  4544. if(val <= 0 || val == null) {
  4545. val = curCSS(elem, name, styles);
  4546. if(val < 0 || val == null) {
  4547. val = elem.style[name]
  4548. }
  4549. if(rnumnonpx.test(val)) {
  4550. return val
  4551. }
  4552. valueIsBorderBox = isBorderBox && (jQuery.support.boxSizingReliable || val === elem.style[name]);
  4553. val = parseFloat(val) || 0
  4554. }
  4555. return(val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles)) + "px"
  4556. }
  4557. function css_defaultDisplay(nodeName) {
  4558. var doc = document,
  4559. display = elemdisplay[nodeName];
  4560. if(!display) {
  4561. display = actualDisplay(nodeName, doc);
  4562. if(display === "none" || !display) {
  4563. iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(doc.documentElement);
  4564. doc = (iframe[0].contentWindow || iframe[0].contentDocument).document;
  4565. doc.write("<!doctype html><html><body>");
  4566. doc.close();
  4567. display = actualDisplay(nodeName, doc);
  4568. iframe.detach()
  4569. }
  4570. elemdisplay[nodeName] = display
  4571. }
  4572. return display
  4573. }
  4574. function actualDisplay(name, doc) {
  4575. var elem = jQuery(doc.createElement(name)).appendTo(doc.body),
  4576. display = jQuery.css(elem[0], "display");
  4577. elem.remove();
  4578. return display
  4579. }
  4580. jQuery.each(["height", "width"], function(i, name) {
  4581. jQuery.cssHooks[name] = {
  4582. get: function(elem, computed, extra) {
  4583. if(computed) {
  4584. return elem.offsetWidth === 0 && rdisplayswap.test(jQuery.css(elem, "display")) ? jQuery.swap(elem, cssShow, function() {
  4585. return getWidthOrHeight(elem, name, extra)
  4586. }) : getWidthOrHeight(elem, name, extra)
  4587. }
  4588. },
  4589. set: function(elem, value, extra) {
  4590. var styles = extra && getStyles(elem);
  4591. return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name, extra, jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box", styles) : 0)
  4592. }
  4593. }
  4594. });
  4595. if(!jQuery.support.opacity) {
  4596. jQuery.cssHooks.opacity = {
  4597. get: function(elem, computed) {
  4598. return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ? (0.01 * parseFloat(RegExp.$1)) + "" : computed ? "1" : ""
  4599. },
  4600. set: function(elem, value) {
  4601. var style = elem.style,
  4602. currentStyle = elem.currentStyle,
  4603. opacity = jQuery.isNumeric(value) ? "alpha(opacity=" + value * 100 + ")" : "",
  4604. filter = currentStyle && currentStyle.filter || style.filter || "";
  4605. style.zoom = 1;
  4606. if((value >= 1 || value === "") && jQuery.trim(filter.replace(ralpha, "")) === "" && style.removeAttribute) {
  4607. style.removeAttribute("filter");
  4608. if(value === "" || currentStyle && !currentStyle.filter) {
  4609. return
  4610. }
  4611. }
  4612. style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : filter + " " + opacity
  4613. }
  4614. }
  4615. }
  4616. jQuery(function() {
  4617. if(!jQuery.support.reliableMarginRight) {
  4618. jQuery.cssHooks.marginRight = {
  4619. get: function(elem, computed) {
  4620. if(computed) {
  4621. return jQuery.swap(elem, {
  4622. "display": "inline-block"
  4623. }, curCSS, [elem, "marginRight"])
  4624. }
  4625. }
  4626. }
  4627. }
  4628. if(!jQuery.support.pixelPosition && jQuery.fn.position) {
  4629. jQuery.each(["top", "left"], function(i, prop) {
  4630. jQuery.cssHooks[prop] = {
  4631. get: function(elem, computed) {
  4632. if(computed) {
  4633. computed = curCSS(elem, prop);
  4634. return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed
  4635. }
  4636. }
  4637. }
  4638. })
  4639. }
  4640. });
  4641. if(jQuery.expr && jQuery.expr.filters) {
  4642. jQuery.expr.filters.hidden = function(elem) {
  4643. return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css(elem, "display")) === "none")
  4644. };
  4645. jQuery.expr.filters.visible = function(elem) {
  4646. return !jQuery.expr.filters.hidden(elem)
  4647. }
  4648. }
  4649. jQuery.each({
  4650. margin: "",
  4651. padding: "",
  4652. border: "Width"
  4653. }, function(prefix, suffix) {
  4654. jQuery.cssHooks[prefix + suffix] = {
  4655. expand: function(value) {
  4656. var i = 0,
  4657. expanded = {},
  4658. parts = typeof value === "string" ? value.split(" ") : [value];
  4659. for(; i < 4; i++) {
  4660. expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]
  4661. }
  4662. return expanded
  4663. }
  4664. };
  4665. if(!rmargin.test(prefix)) {
  4666. jQuery.cssHooks[prefix + suffix].set = setPositiveNumber
  4667. }
  4668. });
  4669. var r20 = /%20/g,
  4670. rbracket = /\[\]$/,
  4671. rCRLF = /\r?\n/g,
  4672. rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
  4673. rsubmittable = /^(?:input|select|textarea|keygen)/i;
  4674. jQuery.fn.extend({
  4675. serialize: function() {
  4676. return jQuery.param(this.serializeArray())
  4677. },
  4678. serializeArray: function() {
  4679. return this.map(function() {
  4680. var elements = jQuery.prop(this, "elements");
  4681. return elements ? jQuery.makeArray(elements) : this
  4682. }).filter(function() {
  4683. var type = this.type;
  4684. return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !manipulation_rcheckableType.test(type))
  4685. }).map(function(i, elem) {
  4686. var val = jQuery(this).val();
  4687. return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function(val) {
  4688. return {
  4689. name: elem.name,
  4690. value: val.replace(rCRLF, "\r\n")
  4691. }
  4692. }) : {
  4693. name: elem.name,
  4694. value: val.replace(rCRLF, "\r\n")
  4695. }
  4696. }).get()
  4697. }
  4698. });
  4699. jQuery.param = function(a, traditional) {
  4700. var prefix, s = [],
  4701. add = function(key, value) {
  4702. value = jQuery.isFunction(value) ? value() : (value == null ? "" : value);
  4703. s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value)
  4704. };
  4705. if(traditional === undefined) {
  4706. traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional
  4707. }
  4708. if(jQuery.isArray(a) || (a.jquery && !jQuery.isPlainObject(a))) {
  4709. jQuery.each(a, function() {
  4710. add(this.name, this.value)
  4711. })
  4712. } else {
  4713. for(prefix in a) {
  4714. buildParams(prefix, a[prefix], traditional, add)
  4715. }
  4716. }
  4717. return s.join("&").replace(r20, "+")
  4718. };
  4719. function buildParams(prefix, obj, traditional, add) {
  4720. var name;
  4721. if(jQuery.isArray(obj)) {
  4722. jQuery.each(obj, function(i, v) {
  4723. if(traditional || rbracket.test(prefix)) {
  4724. add(prefix, v)
  4725. } else {
  4726. buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add)
  4727. }
  4728. })
  4729. } else if(!traditional && jQuery.type(obj) === "object") {
  4730. for(name in obj) {
  4731. buildParams(prefix + "[" + name + "]", obj[name], traditional, add)
  4732. }
  4733. } else {
  4734. add(prefix, obj)
  4735. }
  4736. }
  4737. jQuery.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(" "), function(i, name) {
  4738. jQuery.fn[name] = function(data, fn) {
  4739. return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name)
  4740. }
  4741. });
  4742. jQuery.fn.hover = function(fnOver, fnOut) {
  4743. return this.mouseenter(fnOver).mouseleave(fnOut || fnOver)
  4744. };
  4745. var ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(),
  4746. ajax_rquery = /\?/,
  4747. rhash = /#.*$/,
  4748. rts = /([?&])_=[^&]*/,
  4749. rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
  4750. rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
  4751. rnoContent = /^(?:GET|HEAD)$/,
  4752. rprotocol = /^\/\//,
  4753. rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
  4754. _load = jQuery.fn.load,
  4755. prefilters = {},
  4756. transports = {},
  4757. allTypes = "*/".concat("*");
  4758. try {
  4759. ajaxLocation = location.href
  4760. } catch(e) {
  4761. ajaxLocation = document.createElement("a");
  4762. ajaxLocation.href = "";
  4763. ajaxLocation = ajaxLocation.href
  4764. }
  4765. ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
  4766. function addToPrefiltersOrTransports(structure) {
  4767. return function(dataTypeExpression, func) {
  4768. if(typeof dataTypeExpression !== "string") {
  4769. func = dataTypeExpression;
  4770. dataTypeExpression = "*"
  4771. }
  4772. var dataType, i = 0,
  4773. dataTypes = dataTypeExpression.toLowerCase().match(core_rnotwhite) || [];
  4774. if(jQuery.isFunction(func)) {
  4775. while((dataType = dataTypes[i++])) {
  4776. if(dataType[0] === "+") {
  4777. dataType = dataType.slice(1) || "*";
  4778. (structure[dataType] = structure[dataType] || []).unshift(func)
  4779. } else {
  4780. (structure[dataType] = structure[dataType] || []).push(func)
  4781. }
  4782. }
  4783. }
  4784. }
  4785. }
  4786. function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
  4787. var inspected = {},
  4788. seekingTransport = (structure === transports);
  4789. function inspect(dataType) {
  4790. var selected;
  4791. inspected[dataType] = true;
  4792. jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) {
  4793. var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
  4794. if(typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
  4795. options.dataTypes.unshift(dataTypeOrTransport);
  4796. inspect(dataTypeOrTransport);
  4797. return false
  4798. } else if(seekingTransport) {
  4799. return !(selected = dataTypeOrTransport)
  4800. }
  4801. });
  4802. return selected
  4803. }
  4804. return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*")
  4805. }
  4806. function ajaxExtend(target, src) {
  4807. var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {};
  4808. for(key in src) {
  4809. if(src[key] !== undefined) {
  4810. (flatOptions[key] ? target : (deep || (deep = {})))[key] = src[key]
  4811. }
  4812. }
  4813. if(deep) {
  4814. jQuery.extend(true, target, deep)
  4815. }
  4816. return target
  4817. }
  4818. jQuery.fn.load = function(url, params, callback) {
  4819. if(typeof url !== "string" && _load) {
  4820. return _load.apply(this, arguments)
  4821. }
  4822. var selector, response, type, self = this,
  4823. off = url.indexOf(" ");
  4824. if(off >= 0) {
  4825. selector = url.slice(off, url.length);
  4826. url = url.slice(0, off)
  4827. }
  4828. if(jQuery.isFunction(params)) {
  4829. callback = params;
  4830. params = undefined
  4831. } else if(params && typeof params === "object") {
  4832. type = "POST"
  4833. }
  4834. if(self.length > 0) {
  4835. jQuery.ajax({
  4836. url: url,
  4837. type: type,
  4838. dataType: "html",
  4839. data: params
  4840. }).done(function(responseText) {
  4841. response = arguments;
  4842. self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText)
  4843. }).complete(callback && function(jqXHR, status) {
  4844. self.each(callback, response || [jqXHR.responseText, status, jqXHR])
  4845. })
  4846. }
  4847. return this
  4848. };
  4849. jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(i, type) {
  4850. jQuery.fn[type] = function(fn) {
  4851. return this.on(type, fn)
  4852. }
  4853. });
  4854. jQuery.each(["get", "post"], function(i, method) {
  4855. jQuery[method] = function(url, data, callback, type) {
  4856. if(jQuery.isFunction(data)) {
  4857. type = type || callback;
  4858. callback = data;
  4859. data = undefined
  4860. }
  4861. return jQuery.ajax({
  4862. url: url,
  4863. type: method,
  4864. dataType: type,
  4865. data: data,
  4866. success: callback
  4867. })
  4868. }
  4869. });
  4870. jQuery.extend({
  4871. active: 0,
  4872. lastModified: {},
  4873. etag: {},
  4874. ajaxSettings: {
  4875. url: ajaxLocation,
  4876. type: "GET",
  4877. isLocal: rlocalProtocol.test(ajaxLocParts[1]),
  4878. global: true,
  4879. processData: true,
  4880. async: true,
  4881. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  4882. accepts: {
  4883. "*": allTypes,
  4884. text: "text/plain",
  4885. html: "text/html",
  4886. xml: "application/xml, text/xml",
  4887. json: "application/json, text/javascript"
  4888. },
  4889. contents: {
  4890. xml: /xml/,
  4891. html: /html/,
  4892. json: /json/
  4893. },
  4894. responseFields: {
  4895. xml: "responseXML",
  4896. text: "responseText"
  4897. },
  4898. converters: {
  4899. "* text": window.String,
  4900. "text html": true,
  4901. "text json": jQuery.parseJSON,
  4902. "text xml": jQuery.parseXML
  4903. },
  4904. flatOptions: {
  4905. url: true,
  4906. context: true
  4907. }
  4908. },
  4909. ajaxSetup: function(target, settings) {
  4910. return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target)
  4911. },
  4912. ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
  4913. ajaxTransport: addToPrefiltersOrTransports(transports),
  4914. ajax: function(url, options) {
  4915. if(typeof url === "object") {
  4916. options = url;
  4917. url = undefined
  4918. }
  4919. options = options || {};
  4920. var parts, i, cacheURL, responseHeadersString, timeoutTimer, fireGlobals, transport, responseHeaders, s = jQuery.ajaxSetup({}, options),
  4921. callbackContext = s.context || s,
  4922. globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,
  4923. deferred = jQuery.Deferred(),
  4924. completeDeferred = jQuery.Callbacks("once memory"),
  4925. statusCode = s.statusCode || {},
  4926. requestHeaders = {},
  4927. requestHeadersNames = {},
  4928. state = 0,
  4929. strAbort = "canceled",
  4930. jqXHR = {
  4931. readyState: 0,
  4932. getResponseHeader: function(key) {
  4933. var match;
  4934. if(state === 2) {
  4935. if(!responseHeaders) {
  4936. responseHeaders = {};
  4937. while((match = rheaders.exec(responseHeadersString))) {
  4938. responseHeaders[match[1].toLowerCase()] = match[2]
  4939. }
  4940. }
  4941. match = responseHeaders[key.toLowerCase()]
  4942. }
  4943. return match == null ? null : match
  4944. },
  4945. getAllResponseHeaders: function() {
  4946. return state === 2 ? responseHeadersString : null
  4947. },
  4948. setRequestHeader: function(name, value) {
  4949. var lname = name.toLowerCase();
  4950. if(!state) {
  4951. name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
  4952. requestHeaders[name] = value
  4953. }
  4954. return this
  4955. },
  4956. overrideMimeType: function(type) {
  4957. if(!state) {
  4958. s.mimeType = type
  4959. }
  4960. return this
  4961. },
  4962. statusCode: function(map) {
  4963. var code;
  4964. if(map) {
  4965. if(state < 2) {
  4966. for(code in map) {
  4967. statusCode[code] = [statusCode[code], map[code]]
  4968. }
  4969. } else {
  4970. jqXHR.always(map[jqXHR.status])
  4971. }
  4972. }
  4973. return this
  4974. },
  4975. abort: function(statusText) {
  4976. var finalText = statusText || strAbort;
  4977. if(transport) {
  4978. transport.abort(finalText)
  4979. }
  4980. done(0, finalText);
  4981. return this
  4982. }
  4983. };
  4984. deferred.promise(jqXHR).complete = completeDeferred.add;
  4985. jqXHR.success = jqXHR.done;
  4986. jqXHR.error = jqXHR.fail;
  4987. s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
  4988. s.type = options.method || options.type || s.method || s.type;
  4989. s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(core_rnotwhite) || [""];
  4990. if(s.crossDomain == null) {
  4991. parts = rurl.exec(s.url.toLowerCase());
  4992. s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443))))
  4993. }
  4994. if(s.data && s.processData && typeof s.data !== "string") {
  4995. s.data = jQuery.param(s.data, s.traditional)
  4996. }
  4997. inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
  4998. if(state === 2) {
  4999. return jqXHR
  5000. }
  5001. fireGlobals = s.global;
  5002. if(fireGlobals && jQuery.active++ === 0) {
  5003. jQuery.event.trigger("ajaxStart")
  5004. }
  5005. s.type = s.type.toUpperCase();
  5006. s.hasContent = !rnoContent.test(s.type);
  5007. cacheURL = s.url;
  5008. if(!s.hasContent) {
  5009. if(s.data) {
  5010. cacheURL = (s.url += (ajax_rquery.test(cacheURL) ? "&" : "?") + s.data);
  5011. delete s.data
  5012. }
  5013. if(s.cache === false) {
  5014. s.url = rts.test(cacheURL) ? cacheURL.replace(rts, "$1_=" + ajax_nonce++) : cacheURL + (ajax_rquery.test(cacheURL) ? "&" : "?") + "_=" + ajax_nonce++
  5015. }
  5016. }
  5017. if(s.ifModified) {
  5018. if(jQuery.lastModified[cacheURL]) {
  5019. jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL])
  5020. }
  5021. if(jQuery.etag[cacheURL]) {
  5022. jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL])
  5023. }
  5024. }
  5025. if(s.data && s.hasContent && s.contentType !== false || options.contentType) {
  5026. jqXHR.setRequestHeader("Content-Type", s.contentType)
  5027. }
  5028. jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]);
  5029. for(i in s.headers) {
  5030. jqXHR.setRequestHeader(i, s.headers[i])
  5031. }
  5032. if(s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2)) {
  5033. return jqXHR.abort()
  5034. }
  5035. strAbort = "abort";
  5036. for(i in {
  5037. success: 1,
  5038. error: 1,
  5039. complete: 1
  5040. }) {
  5041. jqXHR[i](s[i])
  5042. }
  5043. transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
  5044. if(!transport) {
  5045. done(-1, "No Transport")
  5046. } else {
  5047. jqXHR.readyState = 1;
  5048. if(fireGlobals) {
  5049. globalEventContext.trigger("ajaxSend", [jqXHR, s])
  5050. }
  5051. if(s.async && s.timeout > 0) {
  5052. timeoutTimer = setTimeout(function() {
  5053. jqXHR.abort("timeout")
  5054. }, s.timeout)
  5055. }
  5056. try {
  5057. state = 1;
  5058. transport.send(requestHeaders, done)
  5059. } catch(e) {
  5060. if(state < 2) {
  5061. done(-1, e)
  5062. } else {
  5063. throw e;
  5064. }
  5065. }
  5066. }
  5067. function done(status, nativeStatusText, responses, headers) {
  5068. var isSuccess, success, error, response, modified, statusText = nativeStatusText;
  5069. if(state === 2) {
  5070. return
  5071. }
  5072. state = 2;
  5073. if(timeoutTimer) {
  5074. clearTimeout(timeoutTimer)
  5075. }
  5076. transport = undefined;
  5077. responseHeadersString = headers || "";
  5078. jqXHR.readyState = status > 0 ? 4 : 0;
  5079. if(responses) {
  5080. response = ajaxHandleResponses(s, jqXHR, responses)
  5081. }
  5082. if(status >= 200 && status < 300 || status === 304) {
  5083. if(s.ifModified) {
  5084. modified = jqXHR.getResponseHeader("Last-Modified");
  5085. if(modified) {
  5086. jQuery.lastModified[cacheURL] = modified
  5087. }
  5088. modified = jqXHR.getResponseHeader("etag");
  5089. if(modified) {
  5090. jQuery.etag[cacheURL] = modified
  5091. }
  5092. }
  5093. if(status === 204) {
  5094. isSuccess = true;
  5095. statusText = "nocontent"
  5096. } else if(status === 304) {
  5097. isSuccess = true;
  5098. statusText = "notmodified"
  5099. } else {
  5100. isSuccess = ajaxConvert(s, response);
  5101. statusText = isSuccess.state;
  5102. success = isSuccess.data;
  5103. error = isSuccess.error;
  5104. isSuccess = !error
  5105. }
  5106. } else {
  5107. error = statusText;
  5108. if(status || !statusText) {
  5109. statusText = "error";
  5110. if(status < 0) {
  5111. status = 0
  5112. }
  5113. }
  5114. }
  5115. jqXHR.status = status;
  5116. jqXHR.statusText = (nativeStatusText || statusText) + "";
  5117. if(isSuccess) {
  5118. deferred.resolveWith(callbackContext, [success, statusText, jqXHR])
  5119. } else {
  5120. deferred.rejectWith(callbackContext, [jqXHR, statusText, error])
  5121. }
  5122. jqXHR.statusCode(statusCode);
  5123. statusCode = undefined;
  5124. if(fireGlobals) {
  5125. globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error])
  5126. }
  5127. completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
  5128. if(fireGlobals) {
  5129. globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
  5130. if(!(--jQuery.active)) {
  5131. jQuery.event.trigger("ajaxStop")
  5132. }
  5133. }
  5134. }
  5135. return jqXHR
  5136. },
  5137. getScript: function(url, callback) {
  5138. return jQuery.get(url, undefined, callback, "script")
  5139. },
  5140. getJSON: function(url, data, callback) {
  5141. return jQuery.get(url, data, callback, "json")
  5142. }
  5143. });
  5144. function ajaxHandleResponses(s, jqXHR, responses) {
  5145. var firstDataType, ct, finalDataType, type, contents = s.contents,
  5146. dataTypes = s.dataTypes,
  5147. responseFields = s.responseFields;
  5148. for(type in responseFields) {
  5149. if(type in responses) {
  5150. jqXHR[responseFields[type]] = responses[type]
  5151. }
  5152. }
  5153. while(dataTypes[0] === "*") {
  5154. dataTypes.shift();
  5155. if(ct === undefined) {
  5156. ct = s.mimeType || jqXHR.getResponseHeader("Content-Type")
  5157. }
  5158. }
  5159. if(ct) {
  5160. for(type in contents) {
  5161. if(contents[type] && contents[type].test(ct)) {
  5162. dataTypes.unshift(type);
  5163. break
  5164. }
  5165. }
  5166. }
  5167. if(dataTypes[0] in responses) {
  5168. finalDataType = dataTypes[0]
  5169. } else {
  5170. for(type in responses) {
  5171. if(!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
  5172. finalDataType = type;
  5173. break
  5174. }
  5175. if(!firstDataType) {
  5176. firstDataType = type
  5177. }
  5178. }
  5179. finalDataType = finalDataType || firstDataType
  5180. }
  5181. if(finalDataType) {
  5182. if(finalDataType !== dataTypes[0]) {
  5183. dataTypes.unshift(finalDataType)
  5184. }
  5185. return responses[finalDataType]
  5186. }
  5187. }
  5188. function ajaxConvert(s, response) {
  5189. var conv2, current, conv, tmp, converters = {},
  5190. i = 0,
  5191. dataTypes = s.dataTypes.slice(),
  5192. prev = dataTypes[0];
  5193. if(s.dataFilter) {
  5194. response = s.dataFilter(response, s.dataType)
  5195. }
  5196. if(dataTypes[1]) {
  5197. for(conv in s.converters) {
  5198. converters[conv.toLowerCase()] = s.converters[conv]
  5199. }
  5200. }
  5201. for(;
  5202. (current = dataTypes[++i]);) {
  5203. if(current !== "*") {
  5204. if(prev !== "*" && prev !== current) {
  5205. conv = converters[prev + " " + current] || converters["* " + current];
  5206. if(!conv) {
  5207. for(conv2 in converters) {
  5208. tmp = conv2.split(" ");
  5209. if(tmp[1] === current) {
  5210. conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
  5211. if(conv) {
  5212. if(conv === true) {
  5213. conv = converters[conv2]
  5214. } else if(converters[conv2] !== true) {
  5215. current = tmp[0];
  5216. dataTypes.splice(i--, 0, current)
  5217. }
  5218. break
  5219. }
  5220. }
  5221. }
  5222. }
  5223. if(conv !== true) {
  5224. if(conv && s["throws"]) {
  5225. response = conv(response)
  5226. } else {
  5227. try {
  5228. response = conv(response)
  5229. } catch(e) {
  5230. return {
  5231. state: "parsererror",
  5232. error: conv ? e : "No conversion from " + prev + " to " + current
  5233. }
  5234. }
  5235. }
  5236. }
  5237. }
  5238. prev = current
  5239. }
  5240. }
  5241. return {
  5242. state: "success",
  5243. data: response
  5244. }
  5245. }
  5246. jQuery.ajaxSetup({
  5247. accepts: {
  5248. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  5249. },
  5250. contents: {
  5251. script: /(?:java|ecma)script/
  5252. },
  5253. converters: {
  5254. "text script": function(text) {
  5255. jQuery.globalEval(text);
  5256. return text
  5257. }
  5258. }
  5259. });
  5260. jQuery.ajaxPrefilter("script", function(s) {
  5261. if(s.cache === undefined) {
  5262. s.cache = false
  5263. }
  5264. if(s.crossDomain) {
  5265. s.type = "GET";
  5266. s.global = false
  5267. }
  5268. });
  5269. jQuery.ajaxTransport("script", function(s) {
  5270. if(s.crossDomain) {
  5271. var script, head = document.head || jQuery("head")[0] || document.documentElement;
  5272. return {
  5273. send: function(_, callback) {
  5274. script = document.createElement("script");
  5275. script.async = true;
  5276. if(s.scriptCharset) {
  5277. script.charset = s.scriptCharset
  5278. }
  5279. script.src = s.url;
  5280. script.onload = script.onreadystatechange = function(_, isAbort) {
  5281. if(isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
  5282. script.onload = script.onreadystatechange = null;
  5283. if(script.parentNode) {
  5284. script.parentNode.removeChild(script)
  5285. }
  5286. script = null;
  5287. if(!isAbort) {
  5288. callback(200, "success")
  5289. }
  5290. }
  5291. };
  5292. head.insertBefore(script, head.firstChild)
  5293. },
  5294. abort: function() {
  5295. if(script) {
  5296. script.onload(undefined, true)
  5297. }
  5298. }
  5299. }
  5300. }
  5301. });
  5302. var oldCallbacks = [],
  5303. rjsonp = /(=)\?(?=&|$)|\?\?/;
  5304. jQuery.ajaxSetup({
  5305. jsonp: "callback",
  5306. jsonpCallback: function() {
  5307. var callback = oldCallbacks.pop() || (jQuery.expando + "_" + (ajax_nonce++));
  5308. this[callback] = true;
  5309. return callback
  5310. }
  5311. });
  5312. jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
  5313. var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : typeof s.data === "string" && !(s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
  5314. if(jsonProp || s.dataTypes[0] === "jsonp") {
  5315. callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback;
  5316. if(jsonProp) {
  5317. s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName)
  5318. } else if(s.jsonp !== false) {
  5319. s.url += (ajax_rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName
  5320. }
  5321. s.converters["script json"] = function() {
  5322. if(!responseContainer) {
  5323. jQuery.error(callbackName + " was not called")
  5324. }
  5325. return responseContainer[0]
  5326. };
  5327. s.dataTypes[0] = "json";
  5328. overwritten = window[callbackName];
  5329. window[callbackName] = function() {
  5330. responseContainer = arguments
  5331. };
  5332. jqXHR.always(function() {
  5333. window[callbackName] = overwritten;
  5334. if(s[callbackName]) {
  5335. s.jsonpCallback = originalSettings.jsonpCallback;
  5336. oldCallbacks.push(callbackName)
  5337. }
  5338. if(responseContainer && jQuery.isFunction(overwritten)) {
  5339. overwritten(responseContainer[0])
  5340. }
  5341. responseContainer = overwritten = undefined
  5342. });
  5343. return "script"
  5344. }
  5345. });
  5346. var xhrCallbacks, xhrSupported, xhrId = 0,
  5347. xhrOnUnloadAbort = window.ActiveXObject && function() {
  5348. var key;
  5349. for(key in xhrCallbacks) {
  5350. xhrCallbacks[key](undefined, true)
  5351. }
  5352. };
  5353. function createStandardXHR() {
  5354. try {
  5355. return new window.XMLHttpRequest()
  5356. } catch(e) {}
  5357. }
  5358. function createActiveXHR() {
  5359. try {
  5360. return new window.ActiveXObject("Microsoft.XMLHTTP")
  5361. } catch(e) {}
  5362. }
  5363. jQuery.ajaxSettings.xhr = window.ActiveXObject ? function() {
  5364. return !this.isLocal && createStandardXHR() || createActiveXHR()
  5365. } : createStandardXHR;
  5366. xhrSupported = jQuery.ajaxSettings.xhr();
  5367. jQuery.support.cors = !!xhrSupported && ("withCredentials" in xhrSupported);
  5368. xhrSupported = jQuery.support.ajax = !!xhrSupported;
  5369. if(xhrSupported) {
  5370. jQuery.ajaxTransport(function(s) {
  5371. if(!s.crossDomain || jQuery.support.cors) {
  5372. var callback;
  5373. return {
  5374. send: function(headers, complete) {
  5375. var handle, i, xhr = s.xhr();
  5376. if(s.username) {
  5377. xhr.open(s.type, s.url, s.async, s.username, s.password)
  5378. } else {
  5379. xhr.open(s.type, s.url, s.async)
  5380. }
  5381. if(s.xhrFields) {
  5382. for(i in s.xhrFields) {
  5383. xhr[i] = s.xhrFields[i]
  5384. }
  5385. }
  5386. if(s.mimeType && xhr.overrideMimeType) {
  5387. xhr.overrideMimeType(s.mimeType)
  5388. }
  5389. if(!s.crossDomain && !headers["X-Requested-With"]) {
  5390. headers["X-Requested-With"] = "XMLHttpRequest"
  5391. }
  5392. try {
  5393. for(i in headers) {
  5394. xhr.setRequestHeader(i, headers[i])
  5395. }
  5396. } catch(err) {}
  5397. xhr.send((s.hasContent && s.data) || null);
  5398. callback = function(_, isAbort) {
  5399. var status, responseHeaders, statusText, responses;
  5400. try {
  5401. if(callback && (isAbort || xhr.readyState === 4)) {
  5402. callback = undefined;
  5403. if(handle) {
  5404. xhr.onreadystatechange = jQuery.noop;
  5405. if(xhrOnUnloadAbort) {
  5406. delete xhrCallbacks[handle]
  5407. }
  5408. }
  5409. if(isAbort) {
  5410. if(xhr.readyState !== 4) {
  5411. xhr.abort()
  5412. }
  5413. } else {
  5414. responses = {};
  5415. status = xhr.status;
  5416. responseHeaders = xhr.getAllResponseHeaders();
  5417. if(typeof xhr.responseText === "string") {
  5418. responses.text = xhr.responseText
  5419. }
  5420. try {
  5421. statusText = xhr.statusText
  5422. } catch(e) {
  5423. statusText = ""
  5424. }
  5425. if(!status && s.isLocal && !s.crossDomain) {
  5426. status = responses.text ? 200 : 404
  5427. } else if(status === 1223) {
  5428. status = 204
  5429. }
  5430. }
  5431. }
  5432. } catch(firefoxAccessException) {
  5433. if(!isAbort) {
  5434. complete(-1, firefoxAccessException)
  5435. }
  5436. }
  5437. if(responses) {
  5438. complete(status, statusText, responses, responseHeaders)
  5439. }
  5440. };
  5441. if(!s.async) {
  5442. callback()
  5443. } else if(xhr.readyState === 4) {
  5444. setTimeout(callback)
  5445. } else {
  5446. handle = ++xhrId;
  5447. if(xhrOnUnloadAbort) {
  5448. if(!xhrCallbacks) {
  5449. xhrCallbacks = {};
  5450. jQuery(window).unload(xhrOnUnloadAbort)
  5451. }
  5452. xhrCallbacks[handle] = callback
  5453. }
  5454. xhr.onreadystatechange = callback
  5455. }
  5456. },
  5457. abort: function() {
  5458. if(callback) {
  5459. callback(undefined, true)
  5460. }
  5461. }
  5462. }
  5463. }
  5464. })
  5465. }
  5466. var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/,
  5467. rfxnum = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i"),
  5468. rrun = /queueHooks$/,
  5469. animationPrefilters = [defaultPrefilter],
  5470. tweeners = {
  5471. "*": [function(prop, value) {
  5472. var end, unit, tween = this.createTween(prop, value),
  5473. parts = rfxnum.exec(value),
  5474. target = tween.cur(),
  5475. start = +target || 0,
  5476. scale = 1,
  5477. maxIterations = 20;
  5478. if(parts) {
  5479. end = +parts[2];
  5480. unit = parts[3] || (jQuery.cssNumber[prop] ? "" : "px");
  5481. if(unit !== "px" && start) {
  5482. start = jQuery.css(tween.elem, prop, true) || end || 1;
  5483. do {
  5484. scale = scale || ".5";
  5485. start = start / scale;
  5486. jQuery.style(tween.elem, prop, start + unit)
  5487. } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations)
  5488. }
  5489. tween.unit = unit;
  5490. tween.start = start;
  5491. tween.end = parts[1] ? start + (parts[1] + 1) * end : end
  5492. }
  5493. return tween
  5494. }]
  5495. };
  5496. function createFxNow() {
  5497. setTimeout(function() {
  5498. fxNow = undefined
  5499. });
  5500. return(fxNow = jQuery.now())
  5501. }
  5502. function createTweens(animation, props) {
  5503. jQuery.each(props, function(prop, value) {
  5504. var collection = (tweeners[prop] || []).concat(tweeners["*"]),
  5505. index = 0,
  5506. length = collection.length;
  5507. for(; index < length; index++) {
  5508. if(collection[index].call(animation, prop, value)) {
  5509. return
  5510. }
  5511. }
  5512. })
  5513. }
  5514. function Animation(elem, properties, options) {
  5515. var result, stopped, index = 0,
  5516. length = animationPrefilters.length,
  5517. deferred = jQuery.Deferred().always(function() {
  5518. delete tick.elem
  5519. }),
  5520. tick = function() {
  5521. if(stopped) {
  5522. return false
  5523. }
  5524. var currentTime = fxNow || createFxNow(),
  5525. remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
  5526. temp = remaining / animation.duration || 0,
  5527. percent = 1 - temp,
  5528. index = 0,
  5529. length = animation.tweens.length;
  5530. for(; index < length; index++) {
  5531. animation.tweens[index].run(percent)
  5532. }
  5533. deferred.notifyWith(elem, [animation, percent, remaining]);
  5534. if(percent < 1 && length) {
  5535. return remaining
  5536. } else {
  5537. deferred.resolveWith(elem, [animation]);
  5538. return false
  5539. }
  5540. },
  5541. animation = deferred.promise({
  5542. elem: elem,
  5543. props: jQuery.extend({}, properties),
  5544. opts: jQuery.extend(true, {
  5545. specialEasing: {}
  5546. }, options),
  5547. originalProperties: properties,
  5548. originalOptions: options,
  5549. startTime: fxNow || createFxNow(),
  5550. duration: options.duration,
  5551. tweens: [],
  5552. createTween: function(prop, end) {
  5553. var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
  5554. animation.tweens.push(tween);
  5555. return tween
  5556. },
  5557. stop: function(gotoEnd) {
  5558. var index = 0,
  5559. length = gotoEnd ? animation.tweens.length : 0;
  5560. if(stopped) {
  5561. return this
  5562. }
  5563. stopped = true;
  5564. for(; index < length; index++) {
  5565. animation.tweens[index].run(1)
  5566. }
  5567. if(gotoEnd) {
  5568. deferred.resolveWith(elem, [animation, gotoEnd])
  5569. } else {
  5570. deferred.rejectWith(elem, [animation, gotoEnd])
  5571. }
  5572. return this
  5573. }
  5574. }),
  5575. props = animation.props;
  5576. propFilter(props, animation.opts.specialEasing);
  5577. for(; index < length; index++) {
  5578. result = animationPrefilters[index].call(animation, elem, props, animation.opts);
  5579. if(result) {
  5580. return result
  5581. }
  5582. }
  5583. createTweens(animation, props);
  5584. if(jQuery.isFunction(animation.opts.start)) {
  5585. animation.opts.start.call(elem, animation)
  5586. }
  5587. jQuery.fx.timer(jQuery.extend(tick, {
  5588. elem: elem,
  5589. anim: animation,
  5590. queue: animation.opts.queue
  5591. }));
  5592. return animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)
  5593. }
  5594. function propFilter(props, specialEasing) {
  5595. var value, name, index, easing, hooks;
  5596. for(index in props) {
  5597. name = jQuery.camelCase(index);
  5598. easing = specialEasing[name];
  5599. value = props[index];
  5600. if(jQuery.isArray(value)) {
  5601. easing = value[1];
  5602. value = props[index] = value[0]
  5603. }
  5604. if(index !== name) {
  5605. props[name] = value;
  5606. delete props[index]
  5607. }
  5608. hooks = jQuery.cssHooks[name];
  5609. if(hooks && "expand" in hooks) {
  5610. value = hooks.expand(value);
  5611. delete props[name];
  5612. for(index in value) {
  5613. if(!(index in props)) {
  5614. props[index] = value[index];
  5615. specialEasing[index] = easing
  5616. }
  5617. }
  5618. } else {
  5619. specialEasing[name] = easing
  5620. }
  5621. }
  5622. }
  5623. jQuery.Animation = jQuery.extend(Animation, {
  5624. tweener: function(props, callback) {
  5625. if(jQuery.isFunction(props)) {
  5626. callback = props;
  5627. props = ["*"]
  5628. } else {
  5629. props = props.split(" ")
  5630. }
  5631. var prop, index = 0,
  5632. length = props.length;
  5633. for(; index < length; index++) {
  5634. prop = props[index];
  5635. tweeners[prop] = tweeners[prop] || [];
  5636. tweeners[prop].unshift(callback)
  5637. }
  5638. },
  5639. prefilter: function(callback, prepend) {
  5640. if(prepend) {
  5641. animationPrefilters.unshift(callback)
  5642. } else {
  5643. animationPrefilters.push(callback)
  5644. }
  5645. }
  5646. });
  5647. function defaultPrefilter(elem, props, opts) {
  5648. var prop, index, length, value, dataShow, toggle, tween, hooks, oldfire, anim = this,
  5649. style = elem.style,
  5650. orig = {},
  5651. handled = [],
  5652. hidden = elem.nodeType && isHidden(elem);
  5653. if(!opts.queue) {
  5654. hooks = jQuery._queueHooks(elem, "fx");
  5655. if(hooks.unqueued == null) {
  5656. hooks.unqueued = 0;
  5657. oldfire = hooks.empty.fire;
  5658. hooks.empty.fire = function() {
  5659. if(!hooks.unqueued) {
  5660. oldfire()
  5661. }
  5662. }
  5663. }
  5664. hooks.unqueued++;
  5665. anim.always(function() {
  5666. anim.always(function() {
  5667. hooks.unqueued--;
  5668. if(!jQuery.queue(elem, "fx").length) {
  5669. hooks.empty.fire()
  5670. }
  5671. })
  5672. })
  5673. }
  5674. if(elem.nodeType === 1 && ("height" in props || "width" in props)) {
  5675. opts.overflow = [style.overflow, style.overflowX, style.overflowY];
  5676. if(jQuery.css(elem, "display") === "inline" && jQuery.css(elem, "float") === "none") {
  5677. if(!jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay(elem.nodeName) === "inline") {
  5678. style.display = "inline-block"
  5679. } else {
  5680. style.zoom = 1
  5681. }
  5682. }
  5683. }
  5684. if(opts.overflow) {
  5685. style.overflow = "hidden";
  5686. if(!jQuery.support.shrinkWrapBlocks) {
  5687. anim.always(function() {
  5688. style.overflow = opts.overflow[0];
  5689. style.overflowX = opts.overflow[1];
  5690. style.overflowY = opts.overflow[2]
  5691. })
  5692. }
  5693. }
  5694. for(index in props) {
  5695. value = props[index];
  5696. if(rfxtypes.exec(value)) {
  5697. delete props[index];
  5698. toggle = toggle || value === "toggle";
  5699. if(value === (hidden ? "hide" : "show")) {
  5700. continue
  5701. }
  5702. handled.push(index)
  5703. }
  5704. }
  5705. length = handled.length;
  5706. if(length) {
  5707. dataShow = jQuery._data(elem, "fxshow") || jQuery._data(elem, "fxshow", {});
  5708. if("hidden" in dataShow) {
  5709. hidden = dataShow.hidden
  5710. }
  5711. if(toggle) {
  5712. dataShow.hidden = !hidden
  5713. }
  5714. if(hidden) {
  5715. jQuery(elem).show()
  5716. } else {
  5717. anim.done(function() {
  5718. jQuery(elem).hide()
  5719. })
  5720. }
  5721. anim.done(function() {
  5722. var prop;
  5723. jQuery._removeData(elem, "fxshow");
  5724. for(prop in orig) {
  5725. jQuery.style(elem, prop, orig[prop])
  5726. }
  5727. });
  5728. for(index = 0; index < length; index++) {
  5729. prop = handled[index];
  5730. tween = anim.createTween(prop, hidden ? dataShow[prop] : 0);
  5731. orig[prop] = dataShow[prop] || jQuery.style(elem, prop);
  5732. if(!(prop in dataShow)) {
  5733. dataShow[prop] = tween.start;
  5734. if(hidden) {
  5735. tween.end = tween.start;
  5736. tween.start = prop === "width" || prop === "height" ? 1 : 0
  5737. }
  5738. }
  5739. }
  5740. }
  5741. }
  5742. function Tween(elem, options, prop, end, easing) {
  5743. return new Tween.prototype.init(elem, options, prop, end, easing)
  5744. }
  5745. jQuery.Tween = Tween;
  5746. Tween.prototype = {
  5747. constructor: Tween,
  5748. init: function(elem, options, prop, end, easing, unit) {
  5749. this.elem = elem;
  5750. this.prop = prop;
  5751. this.easing = easing || "swing";
  5752. this.options = options;
  5753. this.start = this.now = this.cur();
  5754. this.end = end;
  5755. this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px")
  5756. },
  5757. cur: function() {
  5758. var hooks = Tween.propHooks[this.prop];
  5759. return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this)
  5760. },
  5761. run: function(percent) {
  5762. var eased, hooks = Tween.propHooks[this.prop];
  5763. if(this.options.duration) {
  5764. this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration)
  5765. } else {
  5766. this.pos = eased = percent
  5767. }
  5768. this.now = (this.end - this.start) * eased + this.start;
  5769. if(this.options.step) {
  5770. this.options.step.call(this.elem, this.now, this)
  5771. }
  5772. if(hooks && hooks.set) {
  5773. hooks.set(this)
  5774. } else {
  5775. Tween.propHooks._default.set(this)
  5776. }
  5777. return this
  5778. }
  5779. };
  5780. Tween.prototype.init.prototype = Tween.prototype;
  5781. Tween.propHooks = {
  5782. _default: {
  5783. get: function(tween) {
  5784. var result;
  5785. if(tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] == null)) {
  5786. return tween.elem[tween.prop]
  5787. }
  5788. result = jQuery.css(tween.elem, tween.prop, "");
  5789. return !result || result === "auto" ? 0 : result
  5790. },
  5791. set: function(tween) {
  5792. if(jQuery.fx.step[tween.prop]) {
  5793. jQuery.fx.step[tween.prop](tween)
  5794. } else if(tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop])) {
  5795. jQuery.style(tween.elem, tween.prop, tween.now + tween.unit)
  5796. } else {
  5797. tween.elem[tween.prop] = tween.now
  5798. }
  5799. }
  5800. }
  5801. };
  5802. Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  5803. set: function(tween) {
  5804. if(tween.elem.nodeType && tween.elem.parentNode) {
  5805. tween.elem[tween.prop] = tween.now
  5806. }
  5807. }
  5808. };
  5809. jQuery.each(["toggle", "show", "hide"], function(i, name) {
  5810. var cssFn = jQuery.fn[name];
  5811. jQuery.fn[name] = function(speed, easing, callback) {
  5812. return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback)
  5813. }
  5814. });
  5815. jQuery.fn.extend({
  5816. fadeTo: function(speed, to, easing, callback) {
  5817. return this.filter(isHidden).css("opacity", 0).show().end().animate({
  5818. opacity: to
  5819. }, speed, easing, callback)
  5820. },
  5821. animate: function(prop, speed, easing, callback) {
  5822. var empty = jQuery.isEmptyObject(prop),
  5823. optall = jQuery.speed(speed, easing, callback),
  5824. doAnimation = function() {
  5825. var anim = Animation(this, jQuery.extend({}, prop), optall);
  5826. doAnimation.finish = function() {
  5827. anim.stop(true)
  5828. };
  5829. if(empty || jQuery._data(this, "finish")) {
  5830. anim.stop(true)
  5831. }
  5832. };
  5833. doAnimation.finish = doAnimation;
  5834. return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation)
  5835. },
  5836. stop: function(type, clearQueue, gotoEnd) {
  5837. var stopQueue = function(hooks) {
  5838. var stop = hooks.stop;
  5839. delete hooks.stop;
  5840. stop(gotoEnd)
  5841. };
  5842. if(typeof type !== "string") {
  5843. gotoEnd = clearQueue;
  5844. clearQueue = type;
  5845. type = undefined
  5846. }
  5847. if(clearQueue && type !== false) {
  5848. this.queue(type || "fx", [])
  5849. }
  5850. return this.each(function() {
  5851. var dequeue = true,
  5852. index = type != null && type + "queueHooks",
  5853. timers = jQuery.timers,
  5854. data = jQuery._data(this);
  5855. if(index) {
  5856. if(data[index] && data[index].stop) {
  5857. stopQueue(data[index])
  5858. }
  5859. } else {
  5860. for(index in data) {
  5861. if(data[index] && data[index].stop && rrun.test(index)) {
  5862. stopQueue(data[index])
  5863. }
  5864. }
  5865. }
  5866. for(index = timers.length; index--;) {
  5867. if(timers[index].elem === this && (type == null || timers[index].queue === type)) {
  5868. timers[index].anim.stop(gotoEnd);
  5869. dequeue = false;
  5870. timers.splice(index, 1)
  5871. }
  5872. }
  5873. if(dequeue || !gotoEnd) {
  5874. jQuery.dequeue(this, type)
  5875. }
  5876. })
  5877. },
  5878. finish: function(type) {
  5879. if(type !== false) {
  5880. type = type || "fx"
  5881. }
  5882. return this.each(function() {
  5883. var index, data = jQuery._data(this),
  5884. queue = data[type + "queue"],
  5885. hooks = data[type + "queueHooks"],
  5886. timers = jQuery.timers,
  5887. length = queue ? queue.length : 0;
  5888. data.finish = true;
  5889. jQuery.queue(this, type, []);
  5890. if(hooks && hooks.cur && hooks.cur.finish) {
  5891. hooks.cur.finish.call(this)
  5892. }
  5893. for(index = timers.length; index--;) {
  5894. if(timers[index].elem === this && timers[index].queue === type) {
  5895. timers[index].anim.stop(true);
  5896. timers.splice(index, 1)
  5897. }
  5898. }
  5899. for(index = 0; index < length; index++) {
  5900. if(queue[index] && queue[index].finish) {
  5901. queue[index].finish.call(this)
  5902. }
  5903. }
  5904. delete data.finish
  5905. })
  5906. }
  5907. });
  5908. function genFx(type, includeWidth) {
  5909. var which, attrs = {
  5910. height: type
  5911. },
  5912. i = 0;
  5913. includeWidth = includeWidth ? 1 : 0;
  5914. for(; i < 4; i += 2 - includeWidth) {
  5915. which = cssExpand[i];
  5916. attrs["margin" + which] = attrs["padding" + which] = type
  5917. }
  5918. if(includeWidth) {
  5919. attrs.opacity = attrs.width = type
  5920. }
  5921. return attrs
  5922. }
  5923. jQuery.each({
  5924. slideDown: genFx("show"),
  5925. slideUp: genFx("hide"),
  5926. slideToggle: genFx("toggle"),
  5927. fadeIn: {
  5928. opacity: "show"
  5929. },
  5930. fadeOut: {
  5931. opacity: "hide"
  5932. },
  5933. fadeToggle: {
  5934. opacity: "toggle"
  5935. }
  5936. }, function(name, props) {
  5937. jQuery.fn[name] = function(speed, easing, callback) {
  5938. return this.animate(props, speed, easing, callback)
  5939. }
  5940. });
  5941. jQuery.speed = function(speed, easing, fn) {
  5942. var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
  5943. complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
  5944. duration: speed,
  5945. easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
  5946. };
  5947. opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
  5948. if(opt.queue == null || opt.queue === true) {
  5949. opt.queue = "fx"
  5950. }
  5951. opt.old = opt.complete;
  5952. opt.complete = function() {
  5953. if(jQuery.isFunction(opt.old)) {
  5954. opt.old.call(this)
  5955. }
  5956. if(opt.queue) {
  5957. jQuery.dequeue(this, opt.queue)
  5958. }
  5959. };
  5960. return opt
  5961. };
  5962. jQuery.easing = {
  5963. linear: function(p) {
  5964. return p
  5965. },
  5966. swing: function(p) {
  5967. return 0.5 - Math.cos(p * Math.PI) / 2
  5968. }
  5969. };
  5970. jQuery.timers = [];
  5971. jQuery.fx = Tween.prototype.init;
  5972. jQuery.fx.tick = function() {
  5973. var timer, timers = jQuery.timers,
  5974. i = 0;
  5975. fxNow = jQuery.now();
  5976. for(; i < timers.length; i++) {
  5977. timer = timers[i];
  5978. if(!timer() && timers[i] === timer) {
  5979. timers.splice(i--, 1)
  5980. }
  5981. }
  5982. if(!timers.length) {
  5983. jQuery.fx.stop()
  5984. }
  5985. fxNow = undefined
  5986. };
  5987. jQuery.fx.timer = function(timer) {
  5988. if(timer() && jQuery.timers.push(timer)) {
  5989. jQuery.fx.start()
  5990. }
  5991. };
  5992. jQuery.fx.interval = 13;
  5993. jQuery.fx.start = function() {
  5994. if(!timerId) {
  5995. timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval)
  5996. }
  5997. };
  5998. jQuery.fx.stop = function() {
  5999. clearInterval(timerId);
  6000. timerId = null
  6001. };
  6002. jQuery.fx.speeds = {
  6003. slow: 600,
  6004. fast: 200,
  6005. _default: 400
  6006. };
  6007. jQuery.fx.step = {};
  6008. if(jQuery.expr && jQuery.expr.filters) {
  6009. jQuery.expr.filters.animated = function(elem) {
  6010. return jQuery.grep(jQuery.timers, function(fn) {
  6011. return elem === fn.elem
  6012. }).length
  6013. }
  6014. }
  6015. jQuery.fn.offset = function(options) {
  6016. if(arguments.length) {
  6017. return options === undefined ? this : this.each(function(i) {
  6018. jQuery.offset.setOffset(this, options, i)
  6019. })
  6020. }
  6021. var docElem, win, box = {
  6022. top: 0,
  6023. left: 0
  6024. },
  6025. elem = this[0],
  6026. doc = elem && elem.ownerDocument;
  6027. if(!doc) {
  6028. return
  6029. }
  6030. docElem = doc.documentElement;
  6031. if(!jQuery.contains(docElem, elem)) {
  6032. return box
  6033. }
  6034. if(typeof elem.getBoundingClientRect !== core_strundefined) {
  6035. box = elem.getBoundingClientRect()
  6036. }
  6037. win = getWindow(doc);
  6038. return {
  6039. top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
  6040. left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)
  6041. }
  6042. };
  6043. jQuery.offset = {
  6044. setOffset: function(elem, options, i) {
  6045. var position = jQuery.css(elem, "position");
  6046. if(position === "static") {
  6047. elem.style.position = "relative"
  6048. }
  6049. var curElem = jQuery(elem),
  6050. curOffset = curElem.offset(),
  6051. curCSSTop = jQuery.css(elem, "top"),
  6052. curCSSLeft = jQuery.css(elem, "left"),
  6053. calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
  6054. props = {},
  6055. curPosition = {},
  6056. curTop, curLeft;
  6057. if(calculatePosition) {
  6058. curPosition = curElem.position();
  6059. curTop = curPosition.top;
  6060. curLeft = curPosition.left
  6061. } else {
  6062. curTop = parseFloat(curCSSTop) || 0;
  6063. curLeft = parseFloat(curCSSLeft) || 0
  6064. }
  6065. if(jQuery.isFunction(options)) {
  6066. options = options.call(elem, i, curOffset)
  6067. }
  6068. if(options.top != null) {
  6069. props.top = (options.top - curOffset.top) + curTop
  6070. }
  6071. if(options.left != null) {
  6072. props.left = (options.left - curOffset.left) + curLeft
  6073. }
  6074. if("using" in options) {
  6075. options.using.call(elem, props)
  6076. } else {
  6077. curElem.css(props)
  6078. }
  6079. }
  6080. };
  6081. jQuery.fn.extend({
  6082. position: function() {
  6083. if(!this[0]) {
  6084. return
  6085. }
  6086. var offsetParent, offset, parentOffset = {
  6087. top: 0,
  6088. left: 0
  6089. },
  6090. elem = this[0];
  6091. if(jQuery.css(elem, "position") === "fixed") {
  6092. offset = elem.getBoundingClientRect()
  6093. } else {
  6094. offsetParent = this.offsetParent();
  6095. offset = this.offset();
  6096. if(!jQuery.nodeName(offsetParent[0], "html")) {
  6097. parentOffset = offsetParent.offset()
  6098. }
  6099. parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
  6100. parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true)
  6101. }
  6102. return {
  6103. top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
  6104. left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
  6105. }
  6106. },
  6107. offsetParent: function() {
  6108. return this.map(function() {
  6109. var offsetParent = this.offsetParent || document.documentElement;
  6110. while(offsetParent && (!jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static")) {
  6111. offsetParent = offsetParent.offsetParent
  6112. }
  6113. return offsetParent || document.documentElement
  6114. })
  6115. }
  6116. });
  6117. jQuery.each({
  6118. scrollLeft: "pageXOffset",
  6119. scrollTop: "pageYOffset"
  6120. }, function(method, prop) {
  6121. var top = /Y/.test(prop);
  6122. jQuery.fn[method] = function(val) {
  6123. return jQuery.access(this, function(elem, method, val) {
  6124. var win = getWindow(elem);
  6125. if(val === undefined) {
  6126. return win ? (prop in win) ? win[prop] : win.document.documentElement[method] : elem[method]
  6127. }
  6128. if(win) {
  6129. win.scrollTo(!top ? val : jQuery(win).scrollLeft(), top ? val : jQuery(win).scrollTop())
  6130. } else {
  6131. elem[method] = val
  6132. }
  6133. }, method, val, arguments.length, null)
  6134. }
  6135. });
  6136. function getWindow(elem) {
  6137. return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false
  6138. }
  6139. jQuery.each({
  6140. Height: "height",
  6141. Width: "width"
  6142. }, function(name, type) {
  6143. jQuery.each({
  6144. padding: "inner" + name,
  6145. content: type,
  6146. "": "outer" + name
  6147. }, function(defaultExtra, funcName) {
  6148. jQuery.fn[funcName] = function(margin, value) {
  6149. var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"),
  6150. extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
  6151. return jQuery.access(this, function(elem, type, value) {
  6152. var doc;
  6153. if(jQuery.isWindow(elem)) {
  6154. return elem.document.documentElement["client" + name]
  6155. }
  6156. if(elem.nodeType === 9) {
  6157. doc = elem.documentElement;
  6158. return Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name])
  6159. }
  6160. return value === undefined ? jQuery.css(elem, type, extra) : jQuery.style(elem, type, value, extra)
  6161. }, type, chainable ? margin : undefined, chainable, null)
  6162. }
  6163. })
  6164. });
  6165. window.jQuery = window.$ = jQuery;
  6166. if(typeof define === "function" && define.amd && define.amd.jQuery) {
  6167. define("jquery", [], function() {
  6168. return jQuery
  6169. })
  6170. }
  6171. })(window);
  6172. /*!
  6173. * Bootstrap v3.3.6 (http://getbootstrap.com)
  6174. * Copyright 2011-2015 Twitter, Inc.
  6175. * Licensed under the MIT license
  6176. */
  6177. if("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); + function(a) {
  6178. "use strict";
  6179. var b = a.fn.jquery.split(" ")[0].split(".");
  6180. if(b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")
  6181. }(jQuery), + function(a) {
  6182. "use strict";
  6183. function b() {
  6184. var a = document.createElement("bootstrap"),
  6185. b = {
  6186. WebkitTransition: "webkitTransitionEnd",
  6187. MozTransition: "transitionend",
  6188. OTransition: "oTransitionEnd otransitionend",
  6189. transition: "transitionend"
  6190. };
  6191. for(var c in b)
  6192. if(void 0 !== a.style[c]) return {
  6193. end: b[c]
  6194. };
  6195. return !1
  6196. }
  6197. a.fn.emulateTransitionEnd = function(b) {
  6198. var c = !1,
  6199. d = this;
  6200. a(this).one("bsTransitionEnd", function() {
  6201. c = !0
  6202. });
  6203. var e = function() {
  6204. c || a(d).trigger(a.support.transition.end)
  6205. };
  6206. return setTimeout(e, b), this
  6207. }, a(function() {
  6208. a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {
  6209. bindType: a.support.transition.end,
  6210. delegateType: a.support.transition.end,
  6211. handle: function(b) {
  6212. return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
  6213. }
  6214. })
  6215. })
  6216. }(jQuery), + function(a) {
  6217. "use strict";
  6218. function b(b) {
  6219. return this.each(function() {
  6220. var c = a(this),
  6221. e = c.data("bs.alert");
  6222. e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
  6223. })
  6224. }
  6225. var c = '[data-dismiss="alert"]',
  6226. d = function(b) {
  6227. a(b).on("click", c, this.close)
  6228. };
  6229. d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function(b) {
  6230. function c() {
  6231. g.detach().trigger("closed.bs.alert").remove()
  6232. }
  6233. var e = a(this),
  6234. f = e.attr("data-target");
  6235. f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
  6236. var g = a(f);
  6237. b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
  6238. };
  6239. var e = a.fn.alert;
  6240. a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function() {
  6241. return a.fn.alert = e, this
  6242. }, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
  6243. }(jQuery), + function(a) {
  6244. "use strict";
  6245. function b(b) {
  6246. return this.each(function() {
  6247. var d = a(this),
  6248. e = d.data("bs.button"),
  6249. f = "object" == typeof b && b;
  6250. e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
  6251. })
  6252. }
  6253. var c = function(b, d) {
  6254. this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
  6255. };
  6256. c.VERSION = "3.3.6", c.DEFAULTS = {
  6257. loadingText: "loading..."
  6258. }, c.prototype.setState = function(b) {
  6259. var c = "disabled",
  6260. d = this.$element,
  6261. e = d.is("input") ? "val" : "html",
  6262. f = d.data();
  6263. b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function() {
  6264. d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))
  6265. }, this), 0)
  6266. }, c.prototype.toggle = function() {
  6267. var a = !0,
  6268. b = this.$element.closest('[data-toggle="buttons"]');
  6269. if(b.length) {
  6270. var c = this.$element.find("input");
  6271. "radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change")
  6272. } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
  6273. };
  6274. var d = a.fn.button;
  6275. a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() {
  6276. return a.fn.button = d, this
  6277. }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c) {
  6278. var d = a(c.target);
  6279. d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault()
  6280. }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b) {
  6281. a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
  6282. })
  6283. }(jQuery), + function(a) {
  6284. "use strict";
  6285. function b(b) {
  6286. return this.each(function() {
  6287. var d = a(this),
  6288. e = d.data("bs.carousel"),
  6289. f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
  6290. g = "string" == typeof b ? b : f.slide;
  6291. e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
  6292. })
  6293. }
  6294. var c = function(b, c) {
  6295. this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
  6296. };
  6297. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = {
  6298. interval: 5e3,
  6299. pause: "hover",
  6300. wrap: !0,
  6301. keyboard: !0
  6302. }, c.prototype.keydown = function(a) {
  6303. if(!/input|textarea/i.test(a.target.tagName)) {
  6304. switch(a.which) {
  6305. case 37:
  6306. this.prev();
  6307. break;
  6308. case 39:
  6309. this.next();
  6310. break;
  6311. default:
  6312. return
  6313. }
  6314. a.preventDefault()
  6315. }
  6316. }, c.prototype.cycle = function(b) {
  6317. return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
  6318. }, c.prototype.getItemIndex = function(a) {
  6319. return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
  6320. }, c.prototype.getItemForDirection = function(a, b) {
  6321. var c = this.getItemIndex(b),
  6322. d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;
  6323. if(d && !this.options.wrap) return b;
  6324. var e = "prev" == a ? -1 : 1,
  6325. f = (c + e) % this.$items.length;
  6326. return this.$items.eq(f)
  6327. }, c.prototype.to = function(a) {
  6328. var b = this,
  6329. c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
  6330. return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
  6331. b.to(a)
  6332. }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
  6333. }, c.prototype.pause = function(b) {
  6334. return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
  6335. }, c.prototype.next = function() {
  6336. return this.sliding ? void 0 : this.slide("next")
  6337. }, c.prototype.prev = function() {
  6338. return this.sliding ? void 0 : this.slide("prev")
  6339. }, c.prototype.slide = function(b, d) {
  6340. var e = this.$element.find(".item.active"),
  6341. f = d || this.getItemForDirection(b, e),
  6342. g = this.interval,
  6343. h = "next" == b ? "left" : "right",
  6344. i = this;
  6345. if(f.hasClass("active")) return this.sliding = !1;
  6346. var j = f[0],
  6347. k = a.Event("slide.bs.carousel", {
  6348. relatedTarget: j,
  6349. direction: h
  6350. });
  6351. if(this.$element.trigger(k), !k.isDefaultPrevented()) {
  6352. if(this.sliding = !0, g && this.pause(), this.$indicators.length) {
  6353. this.$indicators.find(".active").removeClass("active");
  6354. var l = a(this.$indicators.children()[this.getItemIndex(f)]);
  6355. l && l.addClass("active")
  6356. }
  6357. var m = a.Event("slid.bs.carousel", {
  6358. relatedTarget: j,
  6359. direction: h
  6360. });
  6361. return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function() {
  6362. f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function() {
  6363. i.$element.trigger(m)
  6364. }, 0)
  6365. }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this
  6366. }
  6367. };
  6368. var d = a.fn.carousel;
  6369. a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function() {
  6370. return a.fn.carousel = d, this
  6371. };
  6372. var e = function(c) {
  6373. var d, e = a(this),
  6374. f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
  6375. if(f.hasClass("carousel")) {
  6376. var g = a.extend({}, f.data(), e.data()),
  6377. h = e.attr("data-slide-to");
  6378. h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
  6379. }
  6380. };
  6381. a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function() {
  6382. a('[data-ride="carousel"]').each(function() {
  6383. var c = a(this);
  6384. b.call(c, c.data())
  6385. })
  6386. })
  6387. }(jQuery), + function(a) {
  6388. "use strict";
  6389. function b(b) {
  6390. var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
  6391. return a(d)
  6392. }
  6393. function c(b) {
  6394. return this.each(function() {
  6395. var c = a(this),
  6396. e = c.data("bs.collapse"),
  6397. f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
  6398. !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
  6399. })
  6400. }
  6401. var d = function(b, c) {
  6402. this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
  6403. };
  6404. d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = {
  6405. toggle: !0
  6406. }, d.prototype.dimension = function() {
  6407. var a = this.$element.hasClass("width");
  6408. return a ? "width" : "height"
  6409. }, d.prototype.show = function() {
  6410. if(!this.transitioning && !this.$element.hasClass("in")) {
  6411. var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
  6412. if(!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
  6413. var f = a.Event("show.bs.collapse");
  6414. if(this.$element.trigger(f), !f.isDefaultPrevented()) {
  6415. e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
  6416. var g = this.dimension();
  6417. this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
  6418. var h = function() {
  6419. this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
  6420. };
  6421. if(!a.support.transition) return h.call(this);
  6422. var i = a.camelCase(["scroll", g].join("-"));
  6423. this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
  6424. }
  6425. }
  6426. }
  6427. }, d.prototype.hide = function() {
  6428. if(!this.transitioning && this.$element.hasClass("in")) {
  6429. var b = a.Event("hide.bs.collapse");
  6430. if(this.$element.trigger(b), !b.isDefaultPrevented()) {
  6431. var c = this.dimension();
  6432. this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
  6433. var e = function() {
  6434. this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
  6435. };
  6436. return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
  6437. }
  6438. }
  6439. }, d.prototype.toggle = function() {
  6440. this[this.$element.hasClass("in") ? "hide" : "show"]()
  6441. }, d.prototype.getParent = function() {
  6442. return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function(c, d) {
  6443. var e = a(d);
  6444. this.addAriaAndCollapsedClass(b(e), e)
  6445. }, this)).end()
  6446. }, d.prototype.addAriaAndCollapsedClass = function(a, b) {
  6447. var c = a.hasClass("in");
  6448. a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
  6449. };
  6450. var e = a.fn.collapse;
  6451. a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function() {
  6452. return a.fn.collapse = e, this
  6453. }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(d) {
  6454. var e = a(this);
  6455. e.attr("data-target") || d.preventDefault();
  6456. var f = b(e),
  6457. g = f.data("bs.collapse"),
  6458. h = g ? "toggle" : e.data();
  6459. c.call(f, h)
  6460. })
  6461. }(jQuery), + function(a) {
  6462. "use strict";
  6463. function b(b) {
  6464. var c = b.attr("data-target");
  6465. c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
  6466. var d = c && a(c);
  6467. return d && d.length ? d : b.parent()
  6468. }
  6469. function c(c) {
  6470. c && 3 === c.which || (a(e).remove(), a(f).each(function() {
  6471. var d = a(this),
  6472. e = b(d),
  6473. f = {
  6474. relatedTarget: this
  6475. };
  6476. e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f)))))
  6477. }))
  6478. }
  6479. function d(b) {
  6480. return this.each(function() {
  6481. var c = a(this),
  6482. d = c.data("bs.dropdown");
  6483. d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
  6484. })
  6485. }
  6486. var e = ".dropdown-backdrop",
  6487. f = '[data-toggle="dropdown"]',
  6488. g = function(b) {
  6489. a(b).on("click.bs.dropdown", this.toggle)
  6490. };
  6491. g.VERSION = "3.3.6", g.prototype.toggle = function(d) {
  6492. var e = a(this);
  6493. if(!e.is(".disabled, :disabled")) {
  6494. var f = b(e),
  6495. g = f.hasClass("open");
  6496. if(c(), !g) {
  6497. "ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);
  6498. var h = {
  6499. relatedTarget: this
  6500. };
  6501. if(f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;
  6502. e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))
  6503. }
  6504. return !1
  6505. }
  6506. }, g.prototype.keydown = function(c) {
  6507. if(/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
  6508. var d = a(this);
  6509. if(c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {
  6510. var e = b(d),
  6511. g = e.hasClass("open");
  6512. if(!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");
  6513. var h = " li:not(.disabled):visible a",
  6514. i = e.find(".dropdown-menu" + h);
  6515. if(i.length) {
  6516. var j = i.index(c.target);
  6517. 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
  6518. }
  6519. }
  6520. }
  6521. };
  6522. var h = a.fn.dropdown;
  6523. a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function() {
  6524. return a.fn.dropdown = h, this
  6525. }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function(a) {
  6526. a.stopPropagation()
  6527. }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown)
  6528. }(jQuery), + function(a) {
  6529. "use strict";
  6530. function b(b, d) {
  6531. return this.each(function() {
  6532. var e = a(this),
  6533. f = e.data("bs.modal"),
  6534. g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
  6535. f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
  6536. })
  6537. }
  6538. var c = function(b, c) {
  6539. this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function() {
  6540. this.$element.trigger("loaded.bs.modal")
  6541. }, this))
  6542. };
  6543. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {
  6544. backdrop: !0,
  6545. keyboard: !0,
  6546. show: !0
  6547. }, c.prototype.toggle = function(a) {
  6548. return this.isShown ? this.hide() : this.show(a)
  6549. }, c.prototype.show = function(b) {
  6550. var d = this,
  6551. e = a.Event("show.bs.modal", {
  6552. relatedTarget: b
  6553. });
  6554. this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() {
  6555. d.$element.one("mouseup.dismiss.bs.modal", function(b) {
  6556. a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)
  6557. })
  6558. }), this.backdrop(function() {
  6559. var e = a.support.transition && d.$element.hasClass("fade");
  6560. d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus();
  6561. var f = a.Event("shown.bs.modal", {
  6562. relatedTarget: b
  6563. });
  6564. e ? d.$dialog.one("bsTransitionEnd", function() {
  6565. d.$element.trigger("focus").trigger(f)
  6566. }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
  6567. }))
  6568. }, c.prototype.hide = function(b) {
  6569. b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
  6570. }, c.prototype.enforceFocus = function() {
  6571. a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a) {
  6572. this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
  6573. }, this))
  6574. }, c.prototype.escape = function() {
  6575. this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function(a) {
  6576. 27 == a.which && this.hide()
  6577. }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
  6578. }, c.prototype.resize = function() {
  6579. this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
  6580. }, c.prototype.hideModal = function() {
  6581. var a = this;
  6582. this.$element.hide(), this.backdrop(function() {
  6583. a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
  6584. })
  6585. }, c.prototype.removeBackdrop = function() {
  6586. this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
  6587. }, c.prototype.backdrop = function(b) {
  6588. var d = this,
  6589. e = this.$element.hasClass("fade") ? "fade" : "";
  6590. if(this.isShown && this.options.backdrop) {
  6591. var f = a.support.transition && e;
  6592. if(this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function(a) {
  6593. return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
  6594. }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;
  6595. f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
  6596. } else if(!this.isShown && this.$backdrop) {
  6597. this.$backdrop.removeClass("in");
  6598. var g = function() {
  6599. d.removeBackdrop(), b && b()
  6600. };
  6601. a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
  6602. } else b && b()
  6603. }, c.prototype.handleUpdate = function() {
  6604. this.adjustDialog()
  6605. }, c.prototype.adjustDialog = function() {
  6606. var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
  6607. this.$element.css({
  6608. paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
  6609. paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
  6610. })
  6611. }, c.prototype.resetAdjustments = function() {
  6612. this.$element.css({
  6613. paddingLeft: "",
  6614. paddingRight: ""
  6615. })
  6616. }, c.prototype.checkScrollbar = function() {
  6617. var a = window.innerWidth;
  6618. if(!a) {
  6619. var b = document.documentElement.getBoundingClientRect();
  6620. a = b.right - Math.abs(b.left)
  6621. }
  6622. this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()
  6623. }, c.prototype.setScrollbar = function() {
  6624. var a = parseInt(this.$body.css("padding-right") || 0, 10);
  6625. this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
  6626. }, c.prototype.resetScrollbar = function() {
  6627. this.$body.css("padding-right", this.originalBodyPad)
  6628. }, c.prototype.measureScrollbar = function() {
  6629. var a = document.createElement("div");
  6630. a.className = "modal-scrollbar-measure", this.$body.append(a);
  6631. var b = a.offsetWidth - a.clientWidth;
  6632. return this.$body[0].removeChild(a), b
  6633. };
  6634. var d = a.fn.modal;
  6635. a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function() {
  6636. return a.fn.modal = d, this
  6637. }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(c) {
  6638. var d = a(this),
  6639. e = d.attr("href"),
  6640. f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
  6641. g = f.data("bs.modal") ? "toggle" : a.extend({
  6642. remote: !/#/.test(e) && e
  6643. }, f.data(), d.data());
  6644. d.is("a") && c.preventDefault(), f.one("show.bs.modal", function(a) {
  6645. a.isDefaultPrevented() || f.one("hidden.bs.modal", function() {
  6646. d.is(":visible") && d.trigger("focus")
  6647. })
  6648. }), b.call(f, g, this)
  6649. })
  6650. }(jQuery), + function(a) {
  6651. "use strict";
  6652. function b(b) {
  6653. return this.each(function() {
  6654. var d = a(this),
  6655. e = d.data("bs.tooltip"),
  6656. f = "object" == typeof b && b;
  6657. (e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
  6658. })
  6659. }
  6660. var c = function(a, b) {
  6661. this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b)
  6662. };
  6663. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = {
  6664. animation: !0,
  6665. placement: "top",
  6666. selector: !1,
  6667. template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
  6668. trigger: "hover focus",
  6669. title: "",
  6670. delay: 0,
  6671. html: !1,
  6672. container: !1,
  6673. viewport: {
  6674. selector: "body",
  6675. padding: 0
  6676. }
  6677. }, c.prototype.init = function(b, c, d) {
  6678. if(this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
  6679. click: !1,
  6680. hover: !1,
  6681. focus: !1
  6682. }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
  6683. for(var e = this.options.trigger.split(" "), f = e.length; f--;) {
  6684. var g = e[f];
  6685. if("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this));
  6686. else if("manual" != g) {
  6687. var h = "hover" == g ? "mouseenter" : "focusin",
  6688. i = "hover" == g ? "mouseleave" : "focusout";
  6689. this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
  6690. }
  6691. }
  6692. this.options.selector ? this._options = a.extend({}, this.options, {
  6693. trigger: "manual",
  6694. selector: ""
  6695. }) : this.fixTitle()
  6696. }, c.prototype.getDefaults = function() {
  6697. return c.DEFAULTS
  6698. }, c.prototype.getOptions = function(b) {
  6699. return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
  6700. show: b.delay,
  6701. hide: b.delay
  6702. }), b
  6703. }, c.prototype.getDelegateOptions = function() {
  6704. var b = {},
  6705. c = this.getDefaults();
  6706. return this._options && a.each(this._options, function(a, d) {
  6707. c[a] != d && (b[a] = d)
  6708. }), b
  6709. }, c.prototype.enter = function(b) {
  6710. var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
  6711. return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void(c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function() {
  6712. "in" == c.hoverState && c.show()
  6713. }, c.options.delay.show)) : c.show())
  6714. }, c.prototype.isInStateTrue = function() {
  6715. for(var a in this.inState)
  6716. if(this.inState[a]) return !0;
  6717. return !1
  6718. }, c.prototype.leave = function(b) {
  6719. var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
  6720. return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function() {
  6721. "out" == c.hoverState && c.hide()
  6722. }, c.options.delay.hide)) : c.hide())
  6723. }, c.prototype.show = function() {
  6724. var b = a.Event("show.bs." + this.type);
  6725. if(this.hasContent() && this.enabled) {
  6726. this.$element.trigger(b);
  6727. var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
  6728. if(b.isDefaultPrevented() || !d) return;
  6729. var e = this,
  6730. f = this.tip(),
  6731. g = this.getUID(this.type);
  6732. this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
  6733. var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
  6734. i = /\s?auto?\s?/i,
  6735. j = i.test(h);
  6736. j && (h = h.replace(i, "") || "top"), f.detach().css({
  6737. top: 0,
  6738. left: 0,
  6739. display: "block"
  6740. }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
  6741. var k = this.getPosition(),
  6742. l = f[0].offsetWidth,
  6743. m = f[0].offsetHeight;
  6744. if(j) {
  6745. var n = h,
  6746. o = this.getPosition(this.$viewport);
  6747. h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h)
  6748. }
  6749. var p = this.getCalculatedOffset(h, k, l, m);
  6750. this.applyPlacement(p, h);
  6751. var q = function() {
  6752. var a = e.hoverState;
  6753. e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
  6754. };
  6755. a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q()
  6756. }
  6757. }, c.prototype.applyPlacement = function(b, c) {
  6758. var d = this.tip(),
  6759. e = d[0].offsetWidth,
  6760. f = d[0].offsetHeight,
  6761. g = parseInt(d.css("margin-top"), 10),
  6762. h = parseInt(d.css("margin-left"), 10);
  6763. isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({
  6764. using: function(a) {
  6765. d.css({
  6766. top: Math.round(a.top),
  6767. left: Math.round(a.left)
  6768. })
  6769. }
  6770. }, b), 0), d.addClass("in");
  6771. var i = d[0].offsetWidth,
  6772. j = d[0].offsetHeight;
  6773. "top" == c && j != f && (b.top = b.top + f - j);
  6774. var k = this.getViewportAdjustedDelta(c, b, i, j);
  6775. k.left ? b.left += k.left : b.top += k.top;
  6776. var l = /top|bottom/.test(c),
  6777. m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
  6778. n = l ? "offsetWidth" : "offsetHeight";
  6779. d.offset(b), this.replaceArrow(m, d[0][n], l)
  6780. }, c.prototype.replaceArrow = function(a, b, c) {
  6781. this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
  6782. }, c.prototype.setContent = function() {
  6783. var a = this.tip(),
  6784. b = this.getTitle();
  6785. a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
  6786. }, c.prototype.hide = function(b) {
  6787. function d() {
  6788. "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
  6789. }
  6790. var e = this,
  6791. f = a(this.$tip),
  6792. g = a.Event("hide.bs." + this.type);
  6793. return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
  6794. }, c.prototype.fixTitle = function() {
  6795. var a = this.$element;
  6796. (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
  6797. }, c.prototype.hasContent = function() {
  6798. return this.getTitle()
  6799. }, c.prototype.getPosition = function(b) {
  6800. b = b || this.$element;
  6801. var c = b[0],
  6802. d = "BODY" == c.tagName,
  6803. e = c.getBoundingClientRect();
  6804. null == e.width && (e = a.extend({}, e, {
  6805. width: e.right - e.left,
  6806. height: e.bottom - e.top
  6807. }));
  6808. var f = d ? {
  6809. top: 0,
  6810. left: 0
  6811. } : b.offset(),
  6812. g = {
  6813. scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()
  6814. },
  6815. h = d ? {
  6816. width: a(window).width(),
  6817. height: a(window).height()
  6818. } : null;
  6819. return a.extend({}, e, g, h, f)
  6820. }, c.prototype.getCalculatedOffset = function(a, b, c, d) {
  6821. return "bottom" == a ? {
  6822. top: b.top + b.height,
  6823. left: b.left + b.width / 2 - c / 2
  6824. } : "top" == a ? {
  6825. top: b.top - d,
  6826. left: b.left + b.width / 2 - c / 2
  6827. } : "left" == a ? {
  6828. top: b.top + b.height / 2 - d / 2,
  6829. left: b.left - c
  6830. } : {
  6831. top: b.top + b.height / 2 - d / 2,
  6832. left: b.left + b.width
  6833. }
  6834. }, c.prototype.getViewportAdjustedDelta = function(a, b, c, d) {
  6835. var e = {
  6836. top: 0,
  6837. left: 0
  6838. };
  6839. if(!this.$viewport) return e;
  6840. var f = this.options.viewport && this.options.viewport.padding || 0,
  6841. g = this.getPosition(this.$viewport);
  6842. if(/right|left/.test(a)) {
  6843. var h = b.top - f - g.scroll,
  6844. i = b.top + f - g.scroll + d;
  6845. h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
  6846. } else {
  6847. var j = b.left - f,
  6848. k = b.left + f + c;
  6849. j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k)
  6850. }
  6851. return e
  6852. }, c.prototype.getTitle = function() {
  6853. var a, b = this.$element,
  6854. c = this.options;
  6855. return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
  6856. }, c.prototype.getUID = function(a) {
  6857. do a += ~~(1e6 * Math.random()); while (document.getElementById(a));
  6858. return a
  6859. }, c.prototype.tip = function() {
  6860. if(!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
  6861. return this.$tip
  6862. }, c.prototype.arrow = function() {
  6863. return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
  6864. }, c.prototype.enable = function() {
  6865. this.enabled = !0
  6866. }, c.prototype.disable = function() {
  6867. this.enabled = !1
  6868. }, c.prototype.toggleEnabled = function() {
  6869. this.enabled = !this.enabled
  6870. }, c.prototype.toggle = function(b) {
  6871. var c = this;
  6872. b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
  6873. }, c.prototype.destroy = function() {
  6874. var a = this;
  6875. clearTimeout(this.timeout), this.hide(function() {
  6876. a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null
  6877. })
  6878. };
  6879. var d = a.fn.tooltip;
  6880. a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function() {
  6881. return a.fn.tooltip = d, this
  6882. }
  6883. }(jQuery), + function(a) {
  6884. "use strict";
  6885. function b(b) {
  6886. return this.each(function() {
  6887. var d = a(this),
  6888. e = d.data("bs.popover"),
  6889. f = "object" == typeof b && b;
  6890. (e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
  6891. })
  6892. }
  6893. var c = function(a, b) {
  6894. this.init("popover", a, b)
  6895. };
  6896. if(!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
  6897. c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
  6898. placement: "right",
  6899. trigger: "click",
  6900. content: "",
  6901. template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
  6902. }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function() {
  6903. return c.DEFAULTS
  6904. }, c.prototype.setContent = function() {
  6905. var a = this.tip(),
  6906. b = this.getTitle(),
  6907. c = this.getContent();
  6908. a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
  6909. }, c.prototype.hasContent = function() {
  6910. return this.getTitle() || this.getContent()
  6911. }, c.prototype.getContent = function() {
  6912. var a = this.$element,
  6913. b = this.options;
  6914. return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
  6915. }, c.prototype.arrow = function() {
  6916. return this.$arrow = this.$arrow || this.tip().find(".arrow")
  6917. };
  6918. var d = a.fn.popover;
  6919. a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function() {
  6920. return a.fn.popover = d, this
  6921. }
  6922. }(jQuery), + function(a) {
  6923. "use strict";
  6924. function b(c, d) {
  6925. this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process()
  6926. }
  6927. function c(c) {
  6928. return this.each(function() {
  6929. var d = a(this),
  6930. e = d.data("bs.scrollspy"),
  6931. f = "object" == typeof c && c;
  6932. e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
  6933. })
  6934. }
  6935. b.VERSION = "3.3.6", b.DEFAULTS = {
  6936. offset: 10
  6937. }, b.prototype.getScrollHeight = function() {
  6938. return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
  6939. }, b.prototype.refresh = function() {
  6940. var b = this,
  6941. c = "offset",
  6942. d = 0;
  6943. this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() {
  6944. var b = a(this),
  6945. e = b.data("target") || b.attr("href"),
  6946. f = /^#./.test(e) && a(e);
  6947. return f && f.length && f.is(":visible") && [
  6948. [f[c]().top + d, e]
  6949. ] || null
  6950. }).sort(function(a, b) {
  6951. return a[0] - b[0]
  6952. }).each(function() {
  6953. b.offsets.push(this[0]), b.targets.push(this[1])
  6954. })
  6955. }, b.prototype.process = function() {
  6956. var a, b = this.$scrollElement.scrollTop() + this.options.offset,
  6957. c = this.getScrollHeight(),
  6958. d = this.options.offset + c - this.$scrollElement.height(),
  6959. e = this.offsets,
  6960. f = this.targets,
  6961. g = this.activeTarget;
  6962. if(this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a);
  6963. if(g && b < e[0]) return this.activeTarget = null, this.clear();
  6964. for(a = e.length; a--;) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])
  6965. }, b.prototype.activate = function(b) {
  6966. this.activeTarget = b, this.clear();
  6967. var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
  6968. d = a(c).parents("li").addClass("active");
  6969. d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
  6970. }, b.prototype.clear = function() {
  6971. a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
  6972. };
  6973. var d = a.fn.scrollspy;
  6974. a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function() {
  6975. return a.fn.scrollspy = d, this
  6976. }, a(window).on("load.bs.scrollspy.data-api", function() {
  6977. a('[data-spy="scroll"]').each(function() {
  6978. var b = a(this);
  6979. c.call(b, b.data())
  6980. })
  6981. })
  6982. }(jQuery), + function(a) {
  6983. "use strict";
  6984. function b(b) {
  6985. return this.each(function() {
  6986. var d = a(this),
  6987. e = d.data("bs.tab");
  6988. e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
  6989. })
  6990. }
  6991. var c = function(b) {
  6992. this.element = a(b)
  6993. };
  6994. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function() {
  6995. var b = this.element,
  6996. c = b.closest("ul:not(.dropdown-menu)"),
  6997. d = b.data("target");
  6998. if(d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
  6999. var e = c.find(".active:last a"),
  7000. f = a.Event("hide.bs.tab", {
  7001. relatedTarget: b[0]
  7002. }),
  7003. g = a.Event("show.bs.tab", {
  7004. relatedTarget: e[0]
  7005. });
  7006. if(e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
  7007. var h = a(d);
  7008. this.activate(b.closest("li"), c), this.activate(h, h.parent(), function() {
  7009. e.trigger({
  7010. type: "hidden.bs.tab",
  7011. relatedTarget: b[0]
  7012. }), b.trigger({
  7013. type: "shown.bs.tab",
  7014. relatedTarget: e[0]
  7015. })
  7016. })
  7017. }
  7018. }
  7019. }, c.prototype.activate = function(b, d, e) {
  7020. function f() {
  7021. g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
  7022. }
  7023. var g = d.find("> .active"),
  7024. h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
  7025. g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
  7026. };
  7027. var d = a.fn.tab;
  7028. a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function() {
  7029. return a.fn.tab = d, this
  7030. };
  7031. var e = function(c) {
  7032. c.preventDefault(), b.call(a(this), "show")
  7033. };
  7034. a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
  7035. }(jQuery), + function(a) {
  7036. "use strict";
  7037. function b(b) {
  7038. return this.each(function() {
  7039. var d = a(this),
  7040. e = d.data("bs.affix"),
  7041. f = "object" == typeof b && b;
  7042. e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
  7043. })
  7044. }
  7045. var c = function(b, d) {
  7046. this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
  7047. };
  7048. c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {
  7049. offset: 0,
  7050. target: window
  7051. }, c.prototype.getState = function(a, b, c, d) {
  7052. var e = this.$target.scrollTop(),
  7053. f = this.$element.offset(),
  7054. g = this.$target.height();
  7055. if(null != c && "top" == this.affixed) return c > e ? "top" : !1;
  7056. if("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
  7057. var h = null == this.affixed,
  7058. i = h ? e : f.top,
  7059. j = h ? g : b;
  7060. return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1
  7061. }, c.prototype.getPinnedOffset = function() {
  7062. if(this.pinnedOffset) return this.pinnedOffset;
  7063. this.$element.removeClass(c.RESET).addClass("affix");
  7064. var a = this.$target.scrollTop(),
  7065. b = this.$element.offset();
  7066. return this.pinnedOffset = b.top - a
  7067. }, c.prototype.checkPositionWithEventLoop = function() {
  7068. setTimeout(a.proxy(this.checkPosition, this), 1)
  7069. }, c.prototype.checkPosition = function() {
  7070. if(this.$element.is(":visible")) {
  7071. var b = this.$element.height(),
  7072. d = this.options.offset,
  7073. e = d.top,
  7074. f = d.bottom,
  7075. g = Math.max(a(document).height(), a(document.body).height());
  7076. "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
  7077. var h = this.getState(g, b, e, f);
  7078. if(this.affixed != h) {
  7079. null != this.unpin && this.$element.css("top", "");
  7080. var i = "affix" + (h ? "-" + h : ""),
  7081. j = a.Event(i + ".bs.affix");
  7082. if(this.$element.trigger(j), j.isDefaultPrevented()) return;
  7083. this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
  7084. }
  7085. "bottom" == h && this.$element.offset({
  7086. top: g - b - f
  7087. })
  7088. }
  7089. };
  7090. var d = a.fn.affix;
  7091. a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function() {
  7092. return a.fn.affix = d, this
  7093. }, a(window).on("load", function() {
  7094. a('[data-spy="affix"]').each(function() {
  7095. var c = a(this),
  7096. d = c.data();
  7097. d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
  7098. })
  7099. })
  7100. }(jQuery);
  7101. /*
  7102. HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
  7103. */
  7104. (function(l, f) {
  7105. function m() {
  7106. var a = e.elements;
  7107. return "string" == typeof a ? a.split(" ") : a
  7108. }
  7109. function i(a) {
  7110. var b = n[a[o]];
  7111. b || (b = {}, h++, a[o] = h, n[h] = b);
  7112. return b
  7113. }
  7114. function p(a, b, c) {
  7115. b || (b = f);
  7116. if(g) return b.createElement(a);
  7117. c || (c = i(b));
  7118. b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a);
  7119. return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b
  7120. }
  7121. function t(a, b) {
  7122. if(!b.cache) b.cache = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag();
  7123. a.createElement = function(c) {
  7124. return !e.shivMethods ? b.createElem(c) : p(c, a, b)
  7125. };
  7126. a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function(a) {
  7127. b.createElem(a);
  7128. b.frag.createElement(a);
  7129. return 'c("' + a + '")'
  7130. }) + ");return n}")(e, b.frag)
  7131. }
  7132. function q(a) {
  7133. a || (a = f);
  7134. var b = i(a);
  7135. if(e.shivCSS && !j && !b.hasCSS) {
  7136. var c, d = a;
  7137. c = d.createElement("p");
  7138. d = d.getElementsByTagName("head")[0] || d.documentElement;
  7139. c.innerHTML = "x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
  7140. c = d.insertBefore(c.lastChild, d.firstChild);
  7141. b.hasCSS = !!c
  7142. }
  7143. g || t(a, b);
  7144. return a
  7145. }
  7146. var k = l.html5 || {},
  7147. s = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
  7148. r = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
  7149. j, o = "_html5shiv",
  7150. h = 0,
  7151. n = {},
  7152. g;
  7153. (function() {
  7154. try {
  7155. var a = f.createElement("a");
  7156. a.innerHTML = "<xyz></xyz>";
  7157. j = "hidden" in a;
  7158. var b;
  7159. if(!(b = 1 == a.childNodes.length)) {
  7160. f.createElement("a");
  7161. var c = f.createDocumentFragment();
  7162. b = "undefined" == typeof c.cloneNode ||
  7163. "undefined" == typeof c.createDocumentFragment || "undefined" == typeof c.createElement
  7164. }
  7165. g = b
  7166. } catch(d) {
  7167. g = j = !0
  7168. }
  7169. })();
  7170. var e = {
  7171. elements: k.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
  7172. version: "3.7.0",
  7173. shivCSS: !1 !== k.shivCSS,
  7174. supportsUnknownElements: g,
  7175. shivMethods: !1 !== k.shivMethods,
  7176. type: "default",
  7177. shivDocument: q,
  7178. createElement: p,
  7179. createDocumentFragment: function(a, b) {
  7180. a || (a = f);
  7181. if(g) return a.createDocumentFragment();
  7182. for(var b = b || i(a), c = b.frag.cloneNode(), d = 0, e = m(), h = e.length; d < h; d++) c.createElement(e[d]);
  7183. return c
  7184. }
  7185. };
  7186. l.html5 = e;
  7187. q(f)
  7188. })(this, document);
  7189. /*!
  7190. * @fileOverview TouchSwipe - jQuery Plugin
  7191. * @version 1.6.18
  7192. *
  7193. * @author Matt Bryson http://www.github.com/mattbryson
  7194. * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
  7195. * @see http://labs.rampinteractive.co.uk/touchSwipe/
  7196. * @see http://plugins.jquery.com/project/touchSwipe
  7197. * @license
  7198. * Copyright (c) 2010-2015 Matt Bryson
  7199. * Dual licensed under the MIT or GPL Version 2 licenses.
  7200. *
  7201. */
  7202. ! function(factory) {
  7203. "function" == typeof define && define.amd && define.amd.jQuery ? define(["jquery"], factory) : factory("undefined" != typeof module && module.exports ? require("jquery") : jQuery)
  7204. }(function($) {
  7205. "use strict";
  7206. function init(options) {
  7207. return !options || void 0 !== options.allowPageScroll || void 0 === options.swipe && void 0 === options.swipeStatus || (options.allowPageScroll = NONE), void 0 !== options.click && void 0 === options.tap && (options.tap = options.click), options || (options = {}), options = $.extend({}, $.fn.swipe.defaults, options), this.each(function() {
  7208. var $this = $(this),
  7209. plugin = $this.data(PLUGIN_NS);
  7210. plugin || (plugin = new TouchSwipe(this, options), $this.data(PLUGIN_NS, plugin))
  7211. })
  7212. }
  7213. function TouchSwipe(element, options) {
  7214. function touchStart(jqEvent) {
  7215. if(!(getTouchInProgress() || $(jqEvent.target).closest(options.excludedElements, $element).length > 0)) {
  7216. var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
  7217. if(!event.pointerType || "mouse" != event.pointerType || 0 != options.fallbackToMouseEvents) {
  7218. var ret, touches = event.touches,
  7219. evt = touches ? touches[0] : event;
  7220. return phase = PHASE_START, touches ? fingerCount = touches.length : options.preventDefaultEvents !== !1 && jqEvent.preventDefault(), distance = 0, direction = null, currentDirection = null, pinchDirection = null, duration = 0, startTouchesDistance = 0, endTouchesDistance = 0, pinchZoom = 1, pinchDistance = 0, maximumsMap = createMaximumsData(), cancelMultiFingerRelease(), createFingerData(0, evt), !touches || fingerCount === options.fingers || options.fingers === ALL_FINGERS || hasPinches() ? (startTime = getTimeStamp(), 2 == fingerCount && (createFingerData(1, touches[1]), startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start)), (options.swipeStatus || options.pinchStatus) && (ret = triggerHandler(event, phase))) : ret = !1, ret === !1 ? (phase = PHASE_CANCEL, triggerHandler(event, phase), ret) : (options.hold && (holdTimeout = setTimeout($.proxy(function() {
  7221. $element.trigger("hold", [event.target]), options.hold && (ret = options.hold.call($element, event, event.target))
  7222. }, this), options.longTapThreshold)), setTouchInProgress(!0), null)
  7223. }
  7224. }
  7225. }
  7226. function touchMove(jqEvent) {
  7227. var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
  7228. if(phase !== PHASE_END && phase !== PHASE_CANCEL && !inMultiFingerRelease()) {
  7229. var ret, touches = event.touches,
  7230. evt = touches ? touches[0] : event,
  7231. currentFinger = updateFingerData(evt);
  7232. if(endTime = getTimeStamp(), touches && (fingerCount = touches.length), options.hold && clearTimeout(holdTimeout), phase = PHASE_MOVE, 2 == fingerCount && (0 == startTouchesDistance ? (createFingerData(1, touches[1]), startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start)) : (updateFingerData(touches[1]), endTouchesDistance = calculateTouchesDistance(fingerData[0].end, fingerData[1].end), pinchDirection = calculatePinchDirection(fingerData[0].end, fingerData[1].end)), pinchZoom = calculatePinchZoom(startTouchesDistance, endTouchesDistance), pinchDistance = Math.abs(startTouchesDistance - endTouchesDistance)), fingerCount === options.fingers || options.fingers === ALL_FINGERS || !touches || hasPinches()) {
  7233. if(direction = calculateDirection(currentFinger.start, currentFinger.end), currentDirection = calculateDirection(currentFinger.last, currentFinger.end), validateDefaultEvent(jqEvent, currentDirection), distance = calculateDistance(currentFinger.start, currentFinger.end), duration = calculateDuration(), setMaxDistance(direction, distance), ret = triggerHandler(event, phase), !options.triggerOnTouchEnd || options.triggerOnTouchLeave) {
  7234. var inBounds = !0;
  7235. if(options.triggerOnTouchLeave) {
  7236. var bounds = getbounds(this);
  7237. inBounds = isInBounds(currentFinger.end, bounds)
  7238. }!options.triggerOnTouchEnd && inBounds ? phase = getNextPhase(PHASE_MOVE) : options.triggerOnTouchLeave && !inBounds && (phase = getNextPhase(PHASE_END)), phase != PHASE_CANCEL && phase != PHASE_END || triggerHandler(event, phase)
  7239. }
  7240. } else phase = PHASE_CANCEL, triggerHandler(event, phase);
  7241. ret === !1 && (phase = PHASE_CANCEL, triggerHandler(event, phase))
  7242. }
  7243. }
  7244. function touchEnd(jqEvent) {
  7245. var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent,
  7246. touches = event.touches;
  7247. if(touches) {
  7248. if(touches.length && !inMultiFingerRelease()) return startMultiFingerRelease(event), !0;
  7249. if(touches.length && inMultiFingerRelease()) return !0
  7250. }
  7251. return inMultiFingerRelease() && (fingerCount = fingerCountAtRelease), endTime = getTimeStamp(), duration = calculateDuration(), didSwipeBackToCancel() || !validateSwipeDistance() ? (phase = PHASE_CANCEL, triggerHandler(event, phase)) : options.triggerOnTouchEnd || options.triggerOnTouchEnd === !1 && phase === PHASE_MOVE ? (options.preventDefaultEvents !== !1 && jqEvent.cancelable !== !1 && jqEvent.preventDefault(), phase = PHASE_END, triggerHandler(event, phase)) : !options.triggerOnTouchEnd && hasTap() ? (phase = PHASE_END, triggerHandlerForGesture(event, phase, TAP)) : phase === PHASE_MOVE && (phase = PHASE_CANCEL, triggerHandler(event, phase)), setTouchInProgress(!1), null
  7252. }
  7253. function touchCancel() {
  7254. fingerCount = 0, endTime = 0, startTime = 0, startTouchesDistance = 0, endTouchesDistance = 0, pinchZoom = 1, cancelMultiFingerRelease(), setTouchInProgress(!1)
  7255. }
  7256. function touchLeave(jqEvent) {
  7257. var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
  7258. options.triggerOnTouchLeave && (phase = getNextPhase(PHASE_END), triggerHandler(event, phase))
  7259. }
  7260. function removeListeners() {
  7261. $element.unbind(START_EV, touchStart), $element.unbind(CANCEL_EV, touchCancel), $element.unbind(MOVE_EV, touchMove), $element.unbind(END_EV, touchEnd), LEAVE_EV && $element.unbind(LEAVE_EV, touchLeave), setTouchInProgress(!1)
  7262. }
  7263. function getNextPhase(currentPhase) {
  7264. var nextPhase = currentPhase,
  7265. validTime = validateSwipeTime(),
  7266. validDistance = validateSwipeDistance(),
  7267. didCancel = didSwipeBackToCancel();
  7268. return !validTime || didCancel ? nextPhase = PHASE_CANCEL : !validDistance || currentPhase != PHASE_MOVE || options.triggerOnTouchEnd && !options.triggerOnTouchLeave ? !validDistance && currentPhase == PHASE_END && options.triggerOnTouchLeave && (nextPhase = PHASE_CANCEL) : nextPhase = PHASE_END, nextPhase
  7269. }
  7270. function triggerHandler(event, phase) {
  7271. var ret, touches = event.touches;
  7272. return(didSwipe() || hasSwipes()) && (ret = triggerHandlerForGesture(event, phase, SWIPE)), (didPinch() || hasPinches()) && ret !== !1 && (ret = triggerHandlerForGesture(event, phase, PINCH)), didDoubleTap() && ret !== !1 ? ret = triggerHandlerForGesture(event, phase, DOUBLE_TAP) : didLongTap() && ret !== !1 ? ret = triggerHandlerForGesture(event, phase, LONG_TAP) : didTap() && ret !== !1 && (ret = triggerHandlerForGesture(event, phase, TAP)), phase === PHASE_CANCEL && touchCancel(event), phase === PHASE_END && (touches ? touches.length || touchCancel(event) : touchCancel(event)), ret
  7273. }
  7274. function triggerHandlerForGesture(event, phase, gesture) {
  7275. var ret;
  7276. if(gesture == SWIPE) {
  7277. if($element.trigger("swipeStatus", [phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection]), options.swipeStatus && (ret = options.swipeStatus.call($element, event, phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection), ret === !1)) return !1;
  7278. if(phase == PHASE_END && validateSwipe()) {
  7279. if(clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), $element.trigger("swipe", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipe && (ret = options.swipe.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection), ret === !1)) return !1;
  7280. switch(direction) {
  7281. case LEFT:
  7282. $element.trigger("swipeLeft", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeLeft && (ret = options.swipeLeft.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
  7283. break;
  7284. case RIGHT:
  7285. $element.trigger("swipeRight", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeRight && (ret = options.swipeRight.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
  7286. break;
  7287. case UP:
  7288. $element.trigger("swipeUp", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeUp && (ret = options.swipeUp.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
  7289. break;
  7290. case DOWN:
  7291. $element.trigger("swipeDown", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeDown && (ret = options.swipeDown.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection))
  7292. }
  7293. }
  7294. }
  7295. if(gesture == PINCH) {
  7296. if($element.trigger("pinchStatus", [phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchStatus && (ret = options.pinchStatus.call($element, event, phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData), ret === !1)) return !1;
  7297. if(phase == PHASE_END && validatePinch()) switch(pinchDirection) {
  7298. case IN:
  7299. $element.trigger("pinchIn", [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchIn && (ret = options.pinchIn.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData));
  7300. break;
  7301. case OUT:
  7302. $element.trigger("pinchOut", [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchOut && (ret = options.pinchOut.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData))
  7303. }
  7304. }
  7305. return gesture == TAP ? phase !== PHASE_CANCEL && phase !== PHASE_END || (clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), hasDoubleTap() && !inDoubleTap() ? (doubleTapStartTime = getTimeStamp(), singleTapTimeout = setTimeout($.proxy(function() {
  7306. doubleTapStartTime = null, $element.trigger("tap", [event.target]), options.tap && (ret = options.tap.call($element, event, event.target))
  7307. }, this), options.doubleTapThreshold)) : (doubleTapStartTime = null, $element.trigger("tap", [event.target]), options.tap && (ret = options.tap.call($element, event, event.target)))) : gesture == DOUBLE_TAP ? phase !== PHASE_CANCEL && phase !== PHASE_END || (clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), doubleTapStartTime = null, $element.trigger("doubletap", [event.target]), options.doubleTap && (ret = options.doubleTap.call($element, event, event.target))) : gesture == LONG_TAP && (phase !== PHASE_CANCEL && phase !== PHASE_END || (clearTimeout(singleTapTimeout), doubleTapStartTime = null, $element.trigger("longtap", [event.target]), options.longTap && (ret = options.longTap.call($element, event, event.target)))), ret
  7308. }
  7309. function validateSwipeDistance() {
  7310. var valid = !0;
  7311. return null !== options.threshold && (valid = distance >= options.threshold), valid
  7312. }
  7313. function didSwipeBackToCancel() {
  7314. var cancelled = !1;
  7315. return null !== options.cancelThreshold && null !== direction && (cancelled = getMaxDistance(direction) - distance >= options.cancelThreshold), cancelled
  7316. }
  7317. function validatePinchDistance() {
  7318. return null === options.pinchThreshold || pinchDistance >= options.pinchThreshold
  7319. }
  7320. function validateSwipeTime() {
  7321. var result;
  7322. return result = !options.maxTimeThreshold || !(duration >= options.maxTimeThreshold)
  7323. }
  7324. function validateDefaultEvent(jqEvent, direction) {
  7325. if(options.preventDefaultEvents !== !1)
  7326. if(options.allowPageScroll === NONE) jqEvent.preventDefault();
  7327. else {
  7328. var auto = options.allowPageScroll === AUTO;
  7329. switch(direction) {
  7330. case LEFT:
  7331. (options.swipeLeft && auto || !auto && options.allowPageScroll != HORIZONTAL) && jqEvent.preventDefault();
  7332. break;
  7333. case RIGHT:
  7334. (options.swipeRight && auto || !auto && options.allowPageScroll != HORIZONTAL) && jqEvent.preventDefault();
  7335. break;
  7336. case UP:
  7337. (options.swipeUp && auto || !auto && options.allowPageScroll != VERTICAL) && jqEvent.preventDefault();
  7338. break;
  7339. case DOWN:
  7340. (options.swipeDown && auto || !auto && options.allowPageScroll != VERTICAL) && jqEvent.preventDefault();
  7341. break;
  7342. case NONE:
  7343. }
  7344. }
  7345. }
  7346. function validatePinch() {
  7347. var hasCorrectFingerCount = validateFingers(),
  7348. hasEndPoint = validateEndPoint(),
  7349. hasCorrectDistance = validatePinchDistance();
  7350. return hasCorrectFingerCount && hasEndPoint && hasCorrectDistance
  7351. }
  7352. function hasPinches() {
  7353. return !!(options.pinchStatus || options.pinchIn || options.pinchOut)
  7354. }
  7355. function didPinch() {
  7356. return !(!validatePinch() || !hasPinches())
  7357. }
  7358. function validateSwipe() {
  7359. var hasValidTime = validateSwipeTime(),
  7360. hasValidDistance = validateSwipeDistance(),
  7361. hasCorrectFingerCount = validateFingers(),
  7362. hasEndPoint = validateEndPoint(),
  7363. didCancel = didSwipeBackToCancel(),
  7364. valid = !didCancel && hasEndPoint && hasCorrectFingerCount && hasValidDistance && hasValidTime;
  7365. return valid
  7366. }
  7367. function hasSwipes() {
  7368. return !!(options.swipe || options.swipeStatus || options.swipeLeft || options.swipeRight || options.swipeUp || options.swipeDown)
  7369. }
  7370. function didSwipe() {
  7371. return !(!validateSwipe() || !hasSwipes())
  7372. }
  7373. function validateFingers() {
  7374. return fingerCount === options.fingers || options.fingers === ALL_FINGERS || !SUPPORTS_TOUCH
  7375. }
  7376. function validateEndPoint() {
  7377. return 0 !== fingerData[0].end.x
  7378. }
  7379. function hasTap() {
  7380. return !!options.tap
  7381. }
  7382. function hasDoubleTap() {
  7383. return !!options.doubleTap
  7384. }
  7385. function hasLongTap() {
  7386. return !!options.longTap
  7387. }
  7388. function validateDoubleTap() {
  7389. if(null == doubleTapStartTime) return !1;
  7390. var now = getTimeStamp();
  7391. return hasDoubleTap() && now - doubleTapStartTime <= options.doubleTapThreshold
  7392. }
  7393. function inDoubleTap() {
  7394. return validateDoubleTap()
  7395. }
  7396. function validateTap() {
  7397. return(1 === fingerCount || !SUPPORTS_TOUCH) && (isNaN(distance) || distance < options.threshold)
  7398. }
  7399. function validateLongTap() {
  7400. return duration > options.longTapThreshold && distance < DOUBLE_TAP_THRESHOLD
  7401. }
  7402. function didTap() {
  7403. return !(!validateTap() || !hasTap())
  7404. }
  7405. function didDoubleTap() {
  7406. return !(!validateDoubleTap() || !hasDoubleTap())
  7407. }
  7408. function didLongTap() {
  7409. return !(!validateLongTap() || !hasLongTap())
  7410. }
  7411. function startMultiFingerRelease(event) {
  7412. previousTouchEndTime = getTimeStamp(), fingerCountAtRelease = event.touches.length + 1
  7413. }
  7414. function cancelMultiFingerRelease() {
  7415. previousTouchEndTime = 0, fingerCountAtRelease = 0
  7416. }
  7417. function inMultiFingerRelease() {
  7418. var withinThreshold = !1;
  7419. if(previousTouchEndTime) {
  7420. var diff = getTimeStamp() - previousTouchEndTime;
  7421. diff <= options.fingerReleaseThreshold && (withinThreshold = !0)
  7422. }
  7423. return withinThreshold
  7424. }
  7425. function getTouchInProgress() {
  7426. return !($element.data(PLUGIN_NS + "_intouch") !== !0)
  7427. }
  7428. function setTouchInProgress(val) {
  7429. $element && (val === !0 ? ($element.bind(MOVE_EV, touchMove), $element.bind(END_EV, touchEnd), LEAVE_EV && $element.bind(LEAVE_EV, touchLeave)) : ($element.unbind(MOVE_EV, touchMove, !1), $element.unbind(END_EV, touchEnd, !1), LEAVE_EV && $element.unbind(LEAVE_EV, touchLeave, !1)), $element.data(PLUGIN_NS + "_intouch", val === !0))
  7430. }
  7431. function createFingerData(id, evt) {
  7432. var f = {
  7433. start: {
  7434. x: 0,
  7435. y: 0
  7436. },
  7437. last: {
  7438. x: 0,
  7439. y: 0
  7440. },
  7441. end: {
  7442. x: 0,
  7443. y: 0
  7444. }
  7445. };
  7446. return f.start.x = f.last.x = f.end.x = evt.pageX || evt.clientX, f.start.y = f.last.y = f.end.y = evt.pageY || evt.clientY, fingerData[id] = f, f
  7447. }
  7448. function updateFingerData(evt) {
  7449. var id = void 0 !== evt.identifier ? evt.identifier : 0,
  7450. f = getFingerData(id);
  7451. return null === f && (f = createFingerData(id, evt)), f.last.x = f.end.x, f.last.y = f.end.y, f.end.x = evt.pageX || evt.clientX, f.end.y = evt.pageY || evt.clientY, f
  7452. }
  7453. function getFingerData(id) {
  7454. return fingerData[id] || null
  7455. }
  7456. function setMaxDistance(direction, distance) {
  7457. direction != NONE && (distance = Math.max(distance, getMaxDistance(direction)), maximumsMap[direction].distance = distance)
  7458. }
  7459. function getMaxDistance(direction) {
  7460. if(maximumsMap[direction]) return maximumsMap[direction].distance
  7461. }
  7462. function createMaximumsData() {
  7463. var maxData = {};
  7464. return maxData[LEFT] = createMaximumVO(LEFT), maxData[RIGHT] = createMaximumVO(RIGHT), maxData[UP] = createMaximumVO(UP), maxData[DOWN] = createMaximumVO(DOWN), maxData
  7465. }
  7466. function createMaximumVO(dir) {
  7467. return {
  7468. direction: dir,
  7469. distance: 0
  7470. }
  7471. }
  7472. function calculateDuration() {
  7473. return endTime - startTime
  7474. }
  7475. function calculateTouchesDistance(startPoint, endPoint) {
  7476. var diffX = Math.abs(startPoint.x - endPoint.x),
  7477. diffY = Math.abs(startPoint.y - endPoint.y);
  7478. return Math.round(Math.sqrt(diffX * diffX + diffY * diffY))
  7479. }
  7480. function calculatePinchZoom(startDistance, endDistance) {
  7481. var percent = endDistance / startDistance * 1;
  7482. return percent.toFixed(2)
  7483. }
  7484. function calculatePinchDirection() {
  7485. return pinchZoom < 1 ? OUT : IN
  7486. }
  7487. function calculateDistance(startPoint, endPoint) {
  7488. return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2)))
  7489. }
  7490. function calculateAngle(startPoint, endPoint) {
  7491. var x = startPoint.x - endPoint.x,
  7492. y = endPoint.y - startPoint.y,
  7493. r = Math.atan2(y, x),
  7494. angle = Math.round(180 * r / Math.PI);
  7495. return angle < 0 && (angle = 360 - Math.abs(angle)), angle
  7496. }
  7497. function calculateDirection(startPoint, endPoint) {
  7498. if(comparePoints(startPoint, endPoint)) return NONE;
  7499. var angle = calculateAngle(startPoint, endPoint);
  7500. return angle <= 45 && angle >= 0 ? LEFT : angle <= 360 && angle >= 315 ? LEFT : angle >= 135 && angle <= 225 ? RIGHT : angle > 45 && angle < 135 ? DOWN : UP
  7501. }
  7502. function getTimeStamp() {
  7503. var now = new Date;
  7504. return now.getTime()
  7505. }
  7506. function getbounds(el) {
  7507. el = $(el);
  7508. var offset = el.offset(),
  7509. bounds = {
  7510. left: offset.left,
  7511. right: offset.left + el.outerWidth(),
  7512. top: offset.top,
  7513. bottom: offset.top + el.outerHeight()
  7514. };
  7515. return bounds
  7516. }
  7517. function isInBounds(point, bounds) {
  7518. return point.x > bounds.left && point.x < bounds.right && point.y > bounds.top && point.y < bounds.bottom
  7519. }
  7520. function comparePoints(pointA, pointB) {
  7521. return pointA.x == pointB.x && pointA.y == pointB.y
  7522. }
  7523. var options = $.extend({}, options),
  7524. useTouchEvents = SUPPORTS_TOUCH || SUPPORTS_POINTER || !options.fallbackToMouseEvents,
  7525. START_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerDown" : "pointerdown" : "touchstart" : "mousedown",
  7526. MOVE_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerMove" : "pointermove" : "touchmove" : "mousemove",
  7527. END_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerUp" : "pointerup" : "touchend" : "mouseup",
  7528. LEAVE_EV = useTouchEvents ? SUPPORTS_POINTER ? "mouseleave" : null : "mouseleave",
  7529. CANCEL_EV = SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerCancel" : "pointercancel" : "touchcancel",
  7530. distance = 0,
  7531. direction = null,
  7532. currentDirection = null,
  7533. duration = 0,
  7534. startTouchesDistance = 0,
  7535. endTouchesDistance = 0,
  7536. pinchZoom = 1,
  7537. pinchDistance = 0,
  7538. pinchDirection = 0,
  7539. maximumsMap = null,
  7540. $element = $(element),
  7541. phase = "start",
  7542. fingerCount = 0,
  7543. fingerData = {},
  7544. startTime = 0,
  7545. endTime = 0,
  7546. previousTouchEndTime = 0,
  7547. fingerCountAtRelease = 0,
  7548. doubleTapStartTime = 0,
  7549. singleTapTimeout = null,
  7550. holdTimeout = null;
  7551. try {
  7552. $element.bind(START_EV, touchStart), $element.bind(CANCEL_EV, touchCancel)
  7553. } catch(e) {
  7554. $.error("events not supported " + START_EV + "," + CANCEL_EV + " on jQuery.swipe")
  7555. }
  7556. this.enable = function() {
  7557. return this.disable(), $element.bind(START_EV, touchStart), $element.bind(CANCEL_EV, touchCancel), $element
  7558. }, this.disable = function() {
  7559. return removeListeners(), $element
  7560. }, this.destroy = function() {
  7561. removeListeners(), $element.data(PLUGIN_NS, null), $element = null
  7562. }, this.option = function(property, value) {
  7563. if("object" == typeof property) options = $.extend(options, property);
  7564. else if(void 0 !== options[property]) {
  7565. if(void 0 === value) return options[property];
  7566. options[property] = value
  7567. } else {
  7568. if(!property) return options;
  7569. $.error("Option " + property + " does not exist on jQuery.swipe.options")
  7570. }
  7571. return null
  7572. }
  7573. }
  7574. var VERSION = "1.6.18",
  7575. LEFT = "left",
  7576. RIGHT = "right",
  7577. UP = "up",
  7578. DOWN = "down",
  7579. IN = "in",
  7580. OUT = "out",
  7581. NONE = "none",
  7582. AUTO = "auto",
  7583. SWIPE = "swipe",
  7584. PINCH = "pinch",
  7585. TAP = "tap",
  7586. DOUBLE_TAP = "doubletap",
  7587. LONG_TAP = "longtap",
  7588. HORIZONTAL = "horizontal",
  7589. VERTICAL = "vertical",
  7590. ALL_FINGERS = "all",
  7591. DOUBLE_TAP_THRESHOLD = 10,
  7592. PHASE_START = "start",
  7593. PHASE_MOVE = "move",
  7594. PHASE_END = "end",
  7595. PHASE_CANCEL = "cancel",
  7596. SUPPORTS_TOUCH = "ontouchstart" in window,
  7597. SUPPORTS_POINTER_IE10 = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled && !SUPPORTS_TOUCH,
  7598. SUPPORTS_POINTER = (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && !SUPPORTS_TOUCH,
  7599. PLUGIN_NS = "TouchSwipe",
  7600. defaults = {
  7601. fingers: 1,
  7602. threshold: 75,
  7603. cancelThreshold: null,
  7604. pinchThreshold: 20,
  7605. maxTimeThreshold: null,
  7606. fingerReleaseThreshold: 250,
  7607. longTapThreshold: 500,
  7608. doubleTapThreshold: 200,
  7609. swipe: null,
  7610. swipeLeft: null,
  7611. swipeRight: null,
  7612. swipeUp: null,
  7613. swipeDown: null,
  7614. swipeStatus: null,
  7615. pinchIn: null,
  7616. pinchOut: null,
  7617. pinchStatus: null,
  7618. click: null,
  7619. tap: null,
  7620. doubleTap: null,
  7621. longTap: null,
  7622. hold: null,
  7623. triggerOnTouchEnd: !0,
  7624. triggerOnTouchLeave: !1,
  7625. allowPageScroll: "auto",
  7626. fallbackToMouseEvents: !0,
  7627. excludedElements: ".noSwipe",
  7628. preventDefaultEvents: !0
  7629. };
  7630. $.fn.swipe = function(method) {
  7631. var $this = $(this),
  7632. plugin = $this.data(PLUGIN_NS);
  7633. if(plugin && "string" == typeof method) {
  7634. if(plugin[method]) return plugin[method].apply(plugin, Array.prototype.slice.call(arguments, 1));
  7635. $.error("Method " + method + " does not exist on jQuery.swipe")
  7636. } else if(plugin && "object" == typeof method) plugin.option.apply(plugin, arguments);
  7637. else if(!(plugin || "object" != typeof method && method)) return init.apply(this, arguments);
  7638. return $this
  7639. }, $.fn.swipe.version = VERSION, $.fn.swipe.defaults = defaults, $.fn.swipe.phases = {
  7640. PHASE_START: PHASE_START,
  7641. PHASE_MOVE: PHASE_MOVE,
  7642. PHASE_END: PHASE_END,
  7643. PHASE_CANCEL: PHASE_CANCEL
  7644. }, $.fn.swipe.directions = {
  7645. LEFT: LEFT,
  7646. RIGHT: RIGHT,
  7647. UP: UP,
  7648. DOWN: DOWN,
  7649. IN: IN,
  7650. OUT: OUT
  7651. }, $.fn.swipe.pageScroll = {
  7652. NONE: NONE,
  7653. HORIZONTAL: HORIZONTAL,
  7654. VERTICAL: VERTICAL,
  7655. AUTO: AUTO
  7656. }, $.fn.swipe.fingers = {
  7657. ONE: 1,
  7658. TWO: 2,
  7659. THREE: 3,
  7660. FOUR: 4,
  7661. FIVE: 5,
  7662. ALL: ALL_FINGERS
  7663. }
  7664. });
  7665. /*! WOW - v1.1.3 - 2016-05-06
  7666. * Copyright (c) 2016 Matthieu Aussaguel;*/
  7667. (function() {
  7668. var a, b, c, d, e, f = function(a, b) {
  7669. return function() {
  7670. return a.apply(b, arguments)
  7671. }
  7672. },
  7673. g = [].indexOf || function(a) {
  7674. for(var b = 0, c = this.length; c > b; b++)
  7675. if(b in this && this[b] === a) return b;
  7676. return -1
  7677. };
  7678. b = function() {
  7679. function a() {}
  7680. return a.prototype.extend = function(a, b) {
  7681. var c, d;
  7682. for(c in b) d = b[c], null == a[c] && (a[c] = d);
  7683. return a
  7684. }, a.prototype.isMobile = function(a) {
  7685. return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)
  7686. }, a.prototype.createEvent = function(a, b, c, d) {
  7687. var e;
  7688. return null == b && (b = !1), null == c && (c = !1), null == d && (d = null), null != document.createEvent ? (e = document.createEvent("CustomEvent"), e.initCustomEvent(a, b, c, d)) : null != document.createEventObject ? (e = document.createEventObject(), e.eventType = a) : e.eventName = a, e
  7689. }, a.prototype.emitEvent = function(a, b) {
  7690. return null != a.dispatchEvent ? a.dispatchEvent(b) : b in (null != a) ? a[b]() : "on" + b in (null != a) ? a["on" + b]() : void 0
  7691. }, a.prototype.addEvent = function(a, b, c) {
  7692. return null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : a[b] = c
  7693. }, a.prototype.removeEvent = function(a, b, c) {
  7694. return null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b]
  7695. }, a.prototype.innerHeight = function() {
  7696. return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight
  7697. }, a
  7698. }(), c = this.WeakMap || this.MozWeakMap || (c = function() {
  7699. function a() {
  7700. this.keys = [], this.values = []
  7701. }
  7702. return a.prototype.get = function(a) {
  7703. var b, c, d, e, f;
  7704. for(f = this.keys, b = d = 0, e = f.length; e > d; b = ++d)
  7705. if(c = f[b], c === a) return this.values[b]
  7706. }, a.prototype.set = function(a, b) {
  7707. var c, d, e, f, g;
  7708. for(g = this.keys, c = e = 0, f = g.length; f > e; c = ++e)
  7709. if(d = g[c], d === a) return void(this.values[c] = b);
  7710. return this.keys.push(a), this.values.push(b)
  7711. }, a
  7712. }()), a = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (a = function() {
  7713. function a() {
  7714. "undefined" != typeof console && null !== console && console.warn("MutationObserver is not supported by your browser."), "undefined" != typeof console && null !== console && console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")
  7715. }
  7716. return a.notSupported = !0, a.prototype.observe = function() {}, a
  7717. }()), d = this.getComputedStyle || function(a, b) {
  7718. return this.getPropertyValue = function(b) {
  7719. var c;
  7720. return "float" === b && (b = "styleFloat"), e.test(b) && b.replace(e, function(a, b) {
  7721. return b.toUpperCase()
  7722. }), (null != (c = a.currentStyle) ? c[b] : void 0) || null
  7723. }, this
  7724. }, e = /(\-([a-z]){1})/g, this.WOW = function() {
  7725. function e(a) {
  7726. null == a && (a = {}), this.scrollCallback = f(this.scrollCallback, this), this.scrollHandler = f(this.scrollHandler, this), this.resetAnimation = f(this.resetAnimation, this), this.start = f(this.start, this), this.scrolled = !0, this.config = this.util().extend(a, this.defaults), null != a.scrollContainer && (this.config.scrollContainer = document.querySelector(a.scrollContainer)), this.animationNameCache = new c, this.wowEvent = this.util().createEvent(this.config.boxClass)
  7727. }
  7728. return e.prototype.defaults = {
  7729. boxClass: "wow",
  7730. animateClass: "animated",
  7731. offset: 0,
  7732. mobile: !0,
  7733. live: !0,
  7734. callback: null,
  7735. scrollContainer: null
  7736. }, e.prototype.init = function() {
  7737. var a;
  7738. return this.element = window.document.documentElement, "interactive" === (a = document.readyState) || "complete" === a ? this.start() : this.util().addEvent(document, "DOMContentLoaded", this.start), this.finished = []
  7739. }, e.prototype.start = function() {
  7740. var b, c, d, e;
  7741. if(this.stopped = !1, this.boxes = function() {
  7742. var a, c, d, e;
  7743. for(d = this.element.querySelectorAll("." + this.config.boxClass), e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b);
  7744. return e
  7745. }.call(this), this.all = function() {
  7746. var a, c, d, e;
  7747. for(d = this.boxes, e = [], a = 0, c = d.length; c > a; a++) b = d[a], e.push(b);
  7748. return e
  7749. }.call(this), this.boxes.length)
  7750. if(this.disabled()) this.resetStyle();
  7751. else
  7752. for(e = this.boxes, c = 0, d = e.length; d > c; c++) b = e[c], this.applyStyle(b, !0);
  7753. return this.disabled() || (this.util().addEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().addEvent(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50)), this.config.live ? new a(function(a) {
  7754. return function(b) {
  7755. var c, d, e, f, g;
  7756. for(g = [], c = 0, d = b.length; d > c; c++) f = b[c], g.push(function() {
  7757. var a, b, c, d;
  7758. for(c = f.addedNodes || [], d = [], a = 0, b = c.length; b > a; a++) e = c[a], d.push(this.doSync(e));
  7759. return d
  7760. }.call(a));
  7761. return g
  7762. }
  7763. }(this)).observe(document.body, {
  7764. childList: !0,
  7765. subtree: !0
  7766. }) : void 0
  7767. }, e.prototype.stop = function() {
  7768. return this.stopped = !0, this.util().removeEvent(this.config.scrollContainer || window, "scroll", this.scrollHandler), this.util().removeEvent(window, "resize", this.scrollHandler), null != this.interval ? clearInterval(this.interval) : void 0
  7769. }, e.prototype.sync = function(b) {
  7770. return a.notSupported ? this.doSync(this.element) : void 0
  7771. }, e.prototype.doSync = function(a) {
  7772. var b, c, d, e, f;
  7773. if(null == a && (a = this.element), 1 === a.nodeType) {
  7774. for(a = a.parentNode || a, e = a.querySelectorAll("." + this.config.boxClass), f = [], c = 0, d = e.length; d > c; c++) b = e[c], g.call(this.all, b) < 0 ? (this.boxes.push(b), this.all.push(b), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(b, !0), f.push(this.scrolled = !0)) : f.push(void 0);
  7775. return f
  7776. }
  7777. }, e.prototype.show = function(a) {
  7778. return this.applyStyle(a), a.className = a.className + " " + this.config.animateClass, null != this.config.callback && this.config.callback(a), this.util().emitEvent(a, this.wowEvent), this.util().addEvent(a, "animationend", this.resetAnimation), this.util().addEvent(a, "oanimationend", this.resetAnimation), this.util().addEvent(a, "webkitAnimationEnd", this.resetAnimation), this.util().addEvent(a, "MSAnimationEnd", this.resetAnimation), a
  7779. }, e.prototype.applyStyle = function(a, b) {
  7780. var c, d, e;
  7781. return d = a.getAttribute("data-wow-duration"), c = a.getAttribute("data-wow-delay"), e = a.getAttribute("data-wow-iteration"), this.animate(function(f) {
  7782. return function() {
  7783. return f.customStyle(a, b, d, c, e)
  7784. }
  7785. }(this))
  7786. }, e.prototype.animate = function() {
  7787. return "requestAnimationFrame" in window ? function(a) {
  7788. return window.requestAnimationFrame(a)
  7789. } : function(a) {
  7790. return a()
  7791. }
  7792. }(), e.prototype.resetStyle = function() {
  7793. var a, b, c, d, e;
  7794. for(d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], e.push(a.style.visibility = "visible");
  7795. return e
  7796. }, e.prototype.resetAnimation = function(a) {
  7797. var b;
  7798. return a.type.toLowerCase().indexOf("animationend") >= 0 ? (b = a.target || a.srcElement, b.className = b.className.replace(this.config.animateClass, "").trim()) : void 0
  7799. }, e.prototype.customStyle = function(a, b, c, d, e) {
  7800. return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, {
  7801. animationDuration: c
  7802. }), d && this.vendorSet(a.style, {
  7803. animationDelay: d
  7804. }), e && this.vendorSet(a.style, {
  7805. animationIterationCount: e
  7806. }), this.vendorSet(a.style, {
  7807. animationName: b ? "none" : this.cachedAnimationName(a)
  7808. }), a
  7809. }, e.prototype.vendors = ["moz", "webkit"], e.prototype.vendorSet = function(a, b) {
  7810. var c, d, e, f;
  7811. d = [];
  7812. for(c in b) e = b[c], a["" + c] = e, d.push(function() {
  7813. var b, d, g, h;
  7814. for(g = this.vendors, h = [], b = 0, d = g.length; d > b; b++) f = g[b], h.push(a["" + f + c.charAt(0).toUpperCase() + c.substr(1)] = e);
  7815. return h
  7816. }.call(this));
  7817. return d
  7818. }, e.prototype.vendorCSS = function(a, b) {
  7819. var c, e, f, g, h, i;
  7820. for(h = d(a), g = h.getPropertyCSSValue(b), f = this.vendors, c = 0, e = f.length; e > c; c++) i = f[c], g = g || h.getPropertyCSSValue("-" + i + "-" + b);
  7821. return g
  7822. }, e.prototype.animationName = function(a) {
  7823. var b;
  7824. try {
  7825. b = this.vendorCSS(a, "animation-name").cssText
  7826. } catch(c) {
  7827. b = d(a).getPropertyValue("animation-name")
  7828. }
  7829. return "none" === b ? "" : b
  7830. }, e.prototype.cacheAnimationName = function(a) {
  7831. return this.animationNameCache.set(a, this.animationName(a))
  7832. }, e.prototype.cachedAnimationName = function(a) {
  7833. return this.animationNameCache.get(a)
  7834. }, e.prototype.scrollHandler = function() {
  7835. return this.scrolled = !0
  7836. }, e.prototype.scrollCallback = function() {
  7837. var a;
  7838. return !this.scrolled || (this.scrolled = !1, this.boxes = function() {
  7839. var b, c, d, e;
  7840. for(d = this.boxes, e = [], b = 0, c = d.length; c > b; b++) a = d[b], a && (this.isVisible(a) ? this.show(a) : e.push(a));
  7841. return e
  7842. }.call(this), this.boxes.length || this.config.live) ? void 0 : this.stop()
  7843. }, e.prototype.offsetTop = function(a) {
  7844. for(var b; void 0 === a.offsetTop;) a = a.parentNode;
  7845. for(b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop;
  7846. return b
  7847. }, e.prototype.isVisible = function(a) {
  7848. var b, c, d, e, f;
  7849. return c = a.getAttribute("data-wow-offset") || this.config.offset, f = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset, e = f + Math.min(this.element.clientHeight, this.util().innerHeight()) - c, d = this.offsetTop(a), b = d + a.clientHeight, e >= d && b >= f
  7850. }, e.prototype.util = function() {
  7851. return null != this._util ? this._util : this._util = new b
  7852. }, e.prototype.disabled = function() {
  7853. return !this.config.mobile && this.util().isMobile(navigator.userAgent)
  7854. }, e
  7855. }()
  7856. }).call(this);
  7857. /*!
  7858. * app.js
  7859. */
  7860. 'use strict';
  7861. var browser = navigator.appName
  7862. var b_version = navigator.appVersion
  7863. var version = b_version.split(";");
  7864. var trim_Version = version[1] ? version[1].replace(/[ ]/g, "") : '';
  7865. var browser;
  7866. if(browser == "Microsoft Internet Explorer" && trim_Version == "MSIE6.0") {
  7867. browser = 'ie6';
  7868. } else if(browser == "Microsoft Internet Explorer" && trim_Version == "MSIE7.0") {
  7869. browser = 'ie7';
  7870. } else if(browser == "Microsoft Internet Explorer" && trim_Version == "MSIE8.0") {
  7871. browser = 'ie8';
  7872. } else if(browser == "Microsoft Internet Explorer" && trim_Version == "MSIE9.0") {
  7873. browser = 'ie9';
  7874. }
  7875. $(function() {
  7876. $(window).resize(function() {
  7877. winResize();
  7878. });
  7879. winResize();
  7880. setTimeout(function() {
  7881. winResize();
  7882. }, 100);
  7883. $(window).scroll(function() {
  7884. var sTop = $(window).scrollTop();
  7885. var wHeight = $(window).height();
  7886. var sBottom = wHeight - ($('body').height() - sTop);
  7887. });
  7888. $('header .mbtn').click(function(event) {
  7889. $('body').toggleClass('on-menu');
  7890. return false;
  7891. });
  7892. $('header .menu >a').click(function(event) {
  7893. $('body').removeClass('on-menu');
  7894. return false;
  7895. });
  7896. $('.carousel').swipe({
  7897. threshold: 25,
  7898. allowPageScroll: 'vertical',
  7899. swipe: function(event, direction, distance, duration, fingerCount, fingerData) {
  7900. console.log(direction);
  7901. if(direction == 'left') {
  7902. $(this).carousel('next');
  7903. } else {
  7904. $(this).carousel('prev');
  7905. }
  7906. }
  7907. });
  7908. if(browser == 'ie6' || browser == 'ie7' || browser == 'ie8' || browser == 'ie9') {
  7909. } else {
  7910. new WOW({
  7911. callback: function(box) {
  7912. }
  7913. }).init();
  7914. }
  7915. $('#carousel-homebanner').on('slid.bs.carousel', function() {
  7916. var ind = $('#carousel-homebanner .item').index($('#carousel-homebanner .item.active'));
  7917. $('.ui-homebanner .navi a').removeClass('on');
  7918. $('.ui-homebanner .navi a').eq(ind).addClass('on');
  7919. });
  7920. $('.ui-homebanner .navi a').click(function(event) {
  7921. var ind = $('.ui-homebanner .navi a').index($(this));
  7922. $('#carousel-homebanner').carousel(ind);
  7923. return false;
  7924. });
  7925. $('.lrlist').each(function(index, el) {
  7926. var $this = $(this);
  7927. var $aw = $this.find('.aw');
  7928. $aw.click(function(event) {
  7929. if($this.find('ul').is(':animated')) {
  7930. return false;
  7931. }
  7932. var next = true;
  7933. if($(this).hasClass('l')) {
  7934. next = false;
  7935. }
  7936. var $next;
  7937. var w = $this.find('li').width();
  7938. if(next) {
  7939. $next = $this.find('li').first().clone();
  7940. $next.appendTo($this.find('ul'));
  7941. $this.find('ul').animate({
  7942. 'left': -1 * w
  7943. }, 300, function() {
  7944. $this.find('li').first().remove();
  7945. $this.find('ul').css('left', 0);
  7946. });
  7947. } else {
  7948. $next = $this.find('li').last().clone();
  7949. $next.prependTo($this.find('ul'));
  7950. $this.find('ul').css('left', -1 * w);
  7951. $this.find('ul').animate({
  7952. 'left': 0
  7953. }, 300, function() {
  7954. $this.find('li').last().remove();
  7955. });
  7956. }
  7957. clearInterval(t);
  7958. t = setInterval(function() {
  7959. go();
  7960. }, 5000);
  7961. $('.ui-prodhead .view >.ct .i').hover(function() {
  7962. $(this).click();
  7963. });
  7964. return false;
  7965. });
  7966. var go = function() {
  7967. if($this.hasClass('noauto')) {
  7968. return;
  7969. }
  7970. $aw.filter('.r').click();;
  7971. }
  7972. var t = setInterval(function() {
  7973. go();
  7974. }, 5000);
  7975. });
  7976. });