jquery.js 186 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595
  1. (function(window, undefined) {
  2. var readyList, rootjQuery, core_strundefined = typeof undefined,
  3. location = window.location,
  4. document = window.document,
  5. docElem = document.documentElement,
  6. _jQuery = window.jQuery,
  7. _$ = window.$,
  8. class2type = {},
  9. core_deletedIds = [],
  10. core_version = "1.10.2",
  11. core_concat = core_deletedIds.concat,
  12. core_push = core_deletedIds.push,
  13. core_slice = core_deletedIds.slice,
  14. core_indexOf = core_deletedIds.indexOf,
  15. core_toString = class2type.toString,
  16. core_hasOwn = class2type.hasOwnProperty,
  17. core_trim = core_version.trim,
  18. jQuery = function(selector, context) {
  19. return new jQuery.fn.init(selector, context, rootjQuery)
  20. },
  21. core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
  22. core_rnotwhite = /\S+/g,
  23. rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
  24. rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
  25. rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
  26. rvalidchars = /^[\],:{}\s]*$/,
  27. rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
  28. rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
  29. rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
  30. rmsPrefix = /^-ms-/,
  31. rdashAlpha = /-([\da-z])/gi,
  32. fcamelCase = function(all, letter) {
  33. return letter.toUpperCase()
  34. },
  35. completed = function(event) {
  36. if (document.addEventListener || event.type === "load" || document.readyState === "complete") {
  37. detach();
  38. jQuery.ready()
  39. }
  40. },
  41. detach = function() {
  42. if (document.addEventListener) {
  43. document.removeEventListener("DOMContentLoaded", completed, false);
  44. window.removeEventListener("load", completed, false)
  45. } else {
  46. document.detachEvent("onreadystatechange", completed);
  47. window.detachEvent("onload",
  48. completed)
  49. }
  50. };
  51. jQuery.fn = jQuery.prototype = {
  52. jquery: core_version,
  53. constructor: jQuery,
  54. init: function(selector, context, rootjQuery) {
  55. var match, elem;
  56. if (!selector) {
  57. return this
  58. }
  59. if (typeof selector === "string") {
  60. if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector
  61. .length >= 3) {
  62. match = [null, selector, null]
  63. } else {
  64. match = rquickExpr.exec(selector)
  65. }
  66. if (match && (match[1] || !context)) {
  67. if (match[1]) {
  68. context = context instanceof jQuery ? context[0] : context;
  69. jQuery.merge(this, jQuery.parseHTML(match[1],
  70. context && context.nodeType ? context.ownerDocument || context :
  71. document, true));
  72. if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
  73. for (match in context) {
  74. if (jQuery.isFunction(this[match])) {
  75. this[match](context[match])
  76. } else {
  77. this.attr(match, context[match])
  78. }
  79. }
  80. }
  81. return this
  82. } else {
  83. elem = document.getElementById(match[2]);
  84. if (elem && elem.parentNode) {
  85. if (elem.id !== match[2]) {
  86. return rootjQuery.find(selector)
  87. }
  88. this.length = 1;
  89. this[0] = elem
  90. }
  91. this.context = document;
  92. this.selector = selector;
  93. return this
  94. }
  95. } else if (
  96. !context || context.jquery) {
  97. return (context || rootjQuery).find(selector)
  98. } else {
  99. return this.constructor(context).find(selector)
  100. }
  101. } else if (selector.nodeType) {
  102. this.context = this[0] = selector;
  103. this.length = 1;
  104. return this
  105. } else if (jQuery.isFunction(selector)) {
  106. return rootjQuery.ready(selector)
  107. }
  108. if (selector.selector !== undefined) {
  109. this.selector = selector.selector;
  110. this.context = selector.context
  111. }
  112. return jQuery.makeArray(selector, this)
  113. },
  114. selector: "",
  115. length: 0,
  116. toArray: function() {
  117. return core_slice.call(this)
  118. },
  119. get: function(num) {
  120. return num == null ? this.toArray() : num < 0 ? this[this.length + num] : this[num]
  121. },
  122. pushStack: function(elems) {
  123. var ret = jQuery.merge(this.constructor(), elems);
  124. ret.prevObject = this;
  125. ret.context = this.context;
  126. return ret
  127. },
  128. each: function(callback, args) {
  129. return jQuery.each(this, callback, args)
  130. },
  131. ready: function(fn) {
  132. jQuery.ready.promise().done(fn);
  133. return this
  134. },
  135. slice: function() {
  136. return this.pushStack(core_slice.apply(this, arguments))
  137. },
  138. first: function() {
  139. return this.eq(0)
  140. },
  141. last: function() {
  142. return this.eq(-1)
  143. },
  144. eq: function(i) {
  145. var len = this.length,
  146. j = +i + (i < 0 ? len : 0);
  147. return this.pushStack(j >= 0 && j < len ? [this[j]] : [])
  148. },
  149. map: function(callback) {
  150. return this.pushStack(jQuery.map(this, function(elem, i) {
  151. return callback.call(elem, i, elem)
  152. }))
  153. },
  154. end: function() {
  155. return this.prevObject || this.constructor(null)
  156. },
  157. push: core_push,
  158. sort: [].sort,
  159. splice: [].splice
  160. };
  161. jQuery.fn.init.prototype = jQuery.fn;
  162. jQuery.extend = jQuery.fn.extend = function() {
  163. var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {},
  164. i = 1,
  165. length = arguments.length,
  166. deep = false;
  167. if (
  168. typeof target === "boolean") {
  169. deep = target;
  170. target = arguments[1] || {};
  171. i = 2
  172. }
  173. if (typeof target !== "object" && !jQuery.isFunction(target)) {
  174. target = {}
  175. }
  176. if (length === i) {
  177. target = this;
  178. --i
  179. }
  180. for (; i < length; i++) {
  181. if ((options = arguments[i]) != null) {
  182. for (name in options) {
  183. src = target[name];
  184. copy = options[name];
  185. if (target === copy) {
  186. continue
  187. }
  188. if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))) {
  189. if (copyIsArray) {
  190. copyIsArray = false;
  191. clone = src && jQuery.isArray(src) ? src : []
  192. } else {
  193. clone = src && jQuery.isPlainObject(src) ? src : {}
  194. }
  195. target[name] = jQuery.extend(deep, clone, copy)
  196. } else if (copy !== undefined) {
  197. target[name] = copy
  198. }
  199. }
  200. }
  201. }
  202. return target
  203. };
  204. jQuery.extend({
  205. expando: "jQuery" + (core_version + Math.random()).replace(/\D/g, ""),
  206. noConflict: function(deep) {
  207. if (window.$ === jQuery) {
  208. window.$ = _$
  209. }
  210. if (deep && window.jQuery === jQuery) {
  211. window.jQuery = _jQuery
  212. }
  213. return jQuery
  214. },
  215. isReady: false,
  216. readyWait: 1,
  217. holdReady: function(hold) {
  218. if (hold) {
  219. jQuery.readyWait++
  220. } else {
  221. jQuery.ready(true)
  222. }
  223. },
  224. ready: function(wait) {
  225. if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
  226. return
  227. }
  228. if (!document.body) {
  229. return setTimeout(jQuery.ready)
  230. }
  231. jQuery.isReady = true;
  232. if (wait !== true && --jQuery.readyWait > 0) {
  233. return
  234. }
  235. readyList.resolveWith(document, [jQuery]);
  236. if (jQuery.fn.trigger) {
  237. jQuery(document).trigger("ready").off("ready")
  238. }
  239. },
  240. isFunction: function(obj) {
  241. return jQuery.type(obj) === "function"
  242. },
  243. isArray: Array.isArray || function(obj) {
  244. return jQuery.type(obj) === "array"
  245. },
  246. isWindow: function(obj) {
  247. return obj != null && obj == obj.window
  248. },
  249. isNumeric: function(obj) {
  250. return !isNaN(parseFloat(obj)) && isFinite(obj)
  251. },
  252. type: function(obj) {
  253. if (obj == null) {
  254. return String(obj)
  255. }
  256. return typeof obj === "object" || typeof obj === "function" ? class2type[core_toString.call(
  257. obj)] || "object" : typeof obj
  258. },
  259. isPlainObject: function(obj) {
  260. var key;
  261. if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
  262. return false
  263. }
  264. try {
  265. if (obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj
  266. .constructor.prototype, "isPrototypeOf")) {
  267. return false
  268. }
  269. } catch (e) {
  270. return false
  271. }
  272. if (jQuery.support.ownLast) {
  273. for (key in obj) {
  274. return core_hasOwn.call(obj, key)
  275. }
  276. }
  277. for (key in obj) {}
  278. return key === undefined || core_hasOwn.call(obj, key)
  279. },
  280. isEmptyObject: function(obj) {
  281. var name;
  282. for (name in obj) {
  283. return false
  284. }
  285. return true
  286. },
  287. error: function(msg) {
  288. throw new Error(msg)
  289. },
  290. parseHTML: function(data, context, keepScripts) {
  291. if (!data || typeof data !== "string") {
  292. return null
  293. }
  294. if (typeof context === "boolean") {
  295. keepScripts = context;
  296. context = false
  297. }
  298. context = context || document;
  299. var parsed = rsingleTag.exec(data),
  300. scripts = !keepScripts && [];
  301. if (parsed) {
  302. return [
  303. context.createElement(parsed[1])
  304. ]
  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, "]")
  323. .replace(rvalidbraces, ""))) {
  324. return new Function("return " + data)()
  325. }
  326. }
  327. }
  328. jQuery.error("Invalid JSON: " + data)
  329. },
  330. parseXML: function(data) {
  331. var xml, tmp;
  332. if (!data || typeof data !== "string") {
  333. return null
  334. }
  335. try {
  336. if (window.DOMParser) {
  337. tmp = new DOMParser;
  338. xml = tmp.parseFromString(data, "text/xml")
  339. } else {
  340. xml = new ActiveXObject("Microsoft.XMLDOM");
  341. xml.async = "false";
  342. xml.loadXML(data)
  343. }
  344. } catch (e) {
  345. xml = undefined
  346. }
  347. if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
  348. jQuery.error("Invalid XML: " + data)
  349. }
  350. return xml
  351. },
  352. noop: function() {},
  353. globalEval: function(data) {
  354. if (
  355. data && jQuery.trim(data)) {
  356. (window.execScript || function(data) {
  357. window["eval"].call(window, data)
  358. })(data)
  359. }
  360. },
  361. camelCase: function(string) {
  362. return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase)
  363. },
  364. nodeName: function(elem, name) {
  365. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase()
  366. },
  367. each: function(obj, callback, args) {
  368. var value, i = 0,
  369. length = obj.length,
  370. isArray = isArraylike(obj);
  371. if (args) {
  372. if (isArray) {
  373. for (; i < length; i++) {
  374. value = callback.apply(obj[i], args);
  375. if (value === false) {
  376. break
  377. }
  378. }
  379. } else {
  380. for (i in obj) {
  381. value = callback.apply(obj[i], args);
  382. if (value === false) {
  383. break
  384. }
  385. }
  386. }
  387. } else {
  388. if (isArray) {
  389. for (; i < length; i++) {
  390. value = callback.call(obj[i], i, obj[i]);
  391. if (value === false) {
  392. break
  393. }
  394. }
  395. } else {
  396. for (i in obj) {
  397. value = callback.call(obj[i], i, obj[i]);
  398. if (value === false) {
  399. break
  400. }
  401. }
  402. }
  403. }
  404. return obj
  405. },
  406. trim: core_trim && !core_trim.call("\ufeff ") ? function(text) {
  407. return text == null ? "" : core_trim.call(text)
  408. } : function(text) {
  409. return text == null ? "" : (text + "").replace(rtrim, "")
  410. },
  411. makeArray: function(arr, results) {
  412. var ret = results || [];
  413. if (arr != null) {
  414. if (isArraylike(Object(arr))) {
  415. jQuery.merge(ret, typeof arr === "string" ? [arr] : arr)
  416. } else {
  417. core_push.call(ret, arr)
  418. }
  419. }
  420. return ret
  421. },
  422. inArray: function(elem, arr, i) {
  423. var len;
  424. if (arr) {
  425. if (core_indexOf) {
  426. return core_indexOf.call(arr, elem, i)
  427. }
  428. len = arr.length;
  429. i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
  430. for (; i < len; i++) {
  431. if (i in arr && arr[i] === elem) {
  432. return i
  433. }
  434. }
  435. }
  436. return -1
  437. },
  438. merge: function(first, second) {
  439. var l = second.length,
  440. i = first.length,
  441. j = 0;
  442. if (typeof l === "number") {
  443. for (; j < l; j++) {
  444. first[i++] = second[j]
  445. }
  446. } else {
  447. while (second[j] !== undefined) {
  448. first[i++] = second[j++]
  449. }
  450. }
  451. first.length = i;
  452. return first
  453. },
  454. grep: function(elems, callback, inv) {
  455. var retVal, ret = [],
  456. i = 0,
  457. length = elems.length;
  458. inv = !!inv;
  459. for (; i < length; i++) {
  460. retVal = !!callback(elems[i], i);
  461. if (inv !== retVal) {
  462. ret.push(elems[i])
  463. }
  464. }
  465. return ret
  466. },
  467. map: function(elems, callback, arg) {
  468. var value, i = 0,
  469. length = elems.length,
  470. isArray = isArraylike(elems),
  471. ret = [];
  472. if (isArray) {
  473. for (; i < length; i++) {
  474. value = callback(elems[i], i, arg);
  475. if (value != null) {
  476. ret[ret.length] = value
  477. }
  478. }
  479. } else {
  480. for (i in elems) {
  481. value = callback(elems[i], i, arg);
  482. if (
  483. value != null) {
  484. ret[ret.length] = value
  485. }
  486. }
  487. }
  488. return core_concat.apply([], ret)
  489. },
  490. guid: 1,
  491. proxy: function(fn, context) {
  492. var args, proxy, tmp;
  493. if (typeof context === "string") {
  494. tmp = fn[context];
  495. context = fn;
  496. fn = tmp
  497. }
  498. if (!jQuery.isFunction(fn)) {
  499. return undefined
  500. }
  501. args = core_slice.call(arguments, 2);
  502. proxy = function() {
  503. return fn.apply(context || this, args.concat(core_slice.call(arguments)))
  504. };
  505. proxy.guid = fn.guid = fn.guid || jQuery.guid++;
  506. return proxy
  507. },
  508. access: function(elems, fn, key, value, chainable, emptyGet, raw) {
  509. var i = 0,
  510. length = elems.length,
  511. bulk = key == null;
  512. if (jQuery.type(key) === "object") {
  513. chainable = true;
  514. for (i in key) {
  515. jQuery.access(elems, fn, i, key[i], true, emptyGet, raw)
  516. }
  517. } else if (value !== undefined) {
  518. chainable = true;
  519. if (!jQuery.isFunction(value)) {
  520. raw = true
  521. }
  522. if (bulk) {
  523. if (raw) {
  524. fn.call(elems, value);
  525. fn = null
  526. } else {
  527. bulk = fn;
  528. fn = function(elem, key, value) {
  529. return bulk.call(jQuery(elem), value)
  530. }
  531. }
  532. }
  533. if (fn) {
  534. for (; i < length; i++) {
  535. fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)))
  536. }
  537. }
  538. }
  539. return chainable ? elems : bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet
  540. },
  541. now: function() {
  542. return (new Date).getTime()
  543. },
  544. swap: function(elem, options, callback, args) {
  545. var ret, name, old = {};
  546. for (name in options) {
  547. old[name] = elem.style[name];
  548. elem.style[name] = options[name]
  549. }
  550. ret = callback.apply(elem, args || []);
  551. for (name in options) {
  552. elem.style[name] = old[name]
  553. }
  554. return ret
  555. }
  556. });
  557. jQuery.ready.promise = function(obj) {
  558. if (!readyList) {
  559. readyList = jQuery.Deferred();
  560. if (document.readyState === "complete") {
  561. setTimeout(jQuery.ready)
  562. } else if (document.addEventListener) {
  563. document.addEventListener(
  564. "DOMContentLoaded", completed, false);
  565. window.addEventListener("load", completed, false)
  566. } else {
  567. document.attachEvent("onreadystatechange", completed);
  568. window.attachEvent("onload", completed);
  569. var top = false;
  570. try {
  571. top = window.frameElement == null && document.documentElement
  572. } catch (e) {}
  573. if (top && top.doScroll) {
  574. (function doScrollCheck() {
  575. if (!jQuery.isReady) {
  576. try {
  577. top.doScroll("left")
  578. } catch (e) {
  579. return setTimeout(doScrollCheck, 50)
  580. }
  581. detach();
  582. jQuery.ready()
  583. }
  584. })()
  585. }
  586. }
  587. }
  588. return readyList.promise(obj)
  589. };
  590. jQuery.each(
  591. "Boolean Number String Function Array Date RegExp Object Error".split(" "),
  592. function(i, name) {
  593. class2type["[object " + name + "]"] = name.toLowerCase()
  594. });
  595. function isArraylike(obj) {
  596. var length = obj.length,
  597. type = jQuery.type(obj);
  598. if (jQuery.isWindow(obj)) {
  599. return false
  600. }
  601. if (obj.nodeType === 1 && length) {
  602. return true
  603. }
  604. return type === "array" || type !== "function" && (length === 0 || typeof length === "number" && length >
  605. 0 && length - 1 in obj)
  606. }
  607. rootjQuery = jQuery(document);
  608. (function(window, undefined) {
  609. var i, support, cachedruns, Expr, getText,
  610. isXML, compile, outermostContext, sortInput, setDocument, document, docElem, documentIsHTML,
  611. rbuggyQSA, rbuggyMatches, matches, contains, expando = "sizzle" + -new Date,
  612. preferredDoc = window.document,
  613. dirruns = 0,
  614. done = 0,
  615. classCache = createCache(),
  616. tokenCache = createCache(),
  617. compilerCache = createCache(),
  618. hasDuplicate = false,
  619. sortOrder = function(a, b) {
  620. if (a === b) {
  621. hasDuplicate = true;
  622. return 0
  623. }
  624. return 0
  625. },
  626. strundefined = typeof undefined,
  627. MAX_NEGATIVE = 1 << 31,
  628. hasOwn = {}.hasOwnProperty,
  629. arr = [],
  630. pop = arr.pop,
  631. push_native = arr.push,
  632. push = arr.push,
  633. slice = arr.slice,
  634. indexOf = arr.indexOf || function(elem) {
  635. var i = 0,
  636. len = this.length;
  637. for (; i < len; i++) {
  638. if (this[i] === elem) {
  639. return i
  640. }
  641. }
  642. return -1
  643. },
  644. booleans =
  645. "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  646. whitespace = "[\\x20\\t\\r\\n\\f]",
  647. characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  648. identifier = characterEncoding.replace("w", "w#"),
  649. attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:([*^$|!~]?=)" +
  650. whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
  651. pseudos = ":(" + characterEncoding +
  652. ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) +
  653. ")*)|.*)\\)|)",
  654. rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
  655. rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
  656. rcombinators = new RegExp(
  657. "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
  658. rsibling = new RegExp(whitespace + "*[+~]"),
  659. rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g"),
  660. rpseudo = new RegExp(pseudos),
  661. ridentifier = new RegExp("^" + identifier + "$"),
  662. matchExpr = {
  663. ID: new RegExp("^#(" + characterEncoding + ")"),
  664. CLASS: new RegExp("^\\.(" + characterEncoding + ")"),
  665. TAG: new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"),
  666. ATTR: new RegExp("^" + attributes),
  667. PSEUDO: new RegExp("^" + pseudos),
  668. CHILD: new RegExp(
  669. "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
  670. "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
  671. "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
  672. bool: new RegExp("^(?:" + booleans + ")$", "i"),
  673. needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
  674. whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
  675. },
  676. rnative = /^[^{]+\{\s*\[native \w/,
  677. rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  678. rinputs = /^(?:input|select|textarea|button)$/i,
  679. rheader = /^h\d$/i,
  680. rescape = /'|\\/g,
  681. runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
  682. funescape = function(_, escaped, escapedWhitespace) {
  683. var high = "0x" + escaped - 65536;
  684. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high +
  685. 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320)
  686. };
  687. try {
  688. push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
  689. arr[preferredDoc.childNodes.length].nodeType
  690. } catch (e) {
  691. push = {
  692. apply: arr.length ? function(
  693. target, els) {
  694. push_native.apply(target, slice.call(els))
  695. } : function(target, els) {
  696. var j = target.length,
  697. i = 0;
  698. while (target[j++] = els[i++]) {}
  699. target.length = j - 1
  700. }
  701. }
  702. }
  703. function Sizzle(selector, context, results, seed) {
  704. var match, elem, m, nodeType, i, groups, old, nid, newContext, newSelector;
  705. if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
  706. setDocument(context)
  707. }
  708. context = context || document;
  709. results = results || [];
  710. if (!selector || typeof selector !== "string") {
  711. return results
  712. }
  713. if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
  714. return []
  715. }
  716. if (documentIsHTML && !seed) {
  717. if (match = rquickExpr.exec(selector)) {
  718. if (m = match[1]) {
  719. if (nodeType === 9) {
  720. elem = context.getElementById(m);
  721. if (elem && elem.parentNode) {
  722. if (elem.id === m) {
  723. results.push(elem);
  724. return results
  725. }
  726. } else {
  727. return results
  728. }
  729. } else {
  730. if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) &&
  731. contains(context, elem) && elem.id === m) {
  732. results.push(elem);
  733. return results
  734. }
  735. }
  736. } else if (match[2]) {
  737. push.apply(results, context.getElementsByTagName(selector));
  738. return results
  739. } else if ((m = match[3]) && support.getElementsByClassName && context
  740. .getElementsByClassName) {
  741. push.apply(results, context.getElementsByClassName(m));
  742. return results
  743. }
  744. }
  745. if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
  746. nid = old = expando;
  747. newContext = context;
  748. newSelector = nodeType === 9 && selector;
  749. if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
  750. groups = tokenize(selector);
  751. if (old = context.getAttribute("id")) {
  752. nid = old.replace(rescape, "\\$&")
  753. } else {
  754. context.setAttribute("id", nid)
  755. }
  756. nid = "[id='" + nid + "'] ";
  757. i = groups.length;
  758. while (i--) {
  759. groups[i] = nid + toSelector(groups[i])
  760. }
  761. newContext = rsibling.test(selector) && context.parentNode || context;
  762. newSelector = groups.join(",")
  763. }
  764. if (newSelector) {
  765. try {
  766. push.apply(results, newContext.querySelectorAll(newSelector));
  767. return results
  768. } catch (qsaError) {} finally {
  769. if (!old) {
  770. context.removeAttribute("id")
  771. }
  772. }
  773. }
  774. }
  775. }
  776. return select(selector.replace(rtrim, "$1"), context, results, seed)
  777. }
  778. function createCache() {
  779. var keys = [];
  780. function cache(key, value) {
  781. if (keys.push(key += " ") > Expr.cacheLength) {
  782. delete cache[keys.shift()]
  783. }
  784. return cache[key] = value
  785. }
  786. return cache
  787. }
  788. function markFunction(fn) {
  789. fn[expando] = true;
  790. return fn
  791. }
  792. function assert(fn) {
  793. var div = document.createElement("div");
  794. try {
  795. return !!fn(div)
  796. } catch (e) {
  797. return false
  798. } finally {
  799. if (div.parentNode) {
  800. div.parentNode.removeChild(div)
  801. }
  802. div = null
  803. }
  804. }
  805. function addHandle(attrs, handler) {
  806. var arr = attrs.split("|"),
  807. i = attrs.length;
  808. while (i--) {
  809. Expr.attrHandle[arr[i]] = handler
  810. }
  811. }
  812. function siblingCheck(a, b) {
  813. var cur = b && a,
  814. diff = cur && a.nodeType === 1 && b.nodeType === 1 && (
  815. ~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE);
  816. if (diff) {
  817. return diff
  818. }
  819. if (cur) {
  820. while (cur = cur.nextSibling) {
  821. if (cur === b) {
  822. return -1
  823. }
  824. }
  825. }
  826. return a ? 1 : -1
  827. }
  828. function createInputPseudo(type) {
  829. return function(elem) {
  830. var name = elem.nodeName.toLowerCase();
  831. return name === "input" && elem.type === type
  832. }
  833. }
  834. function createButtonPseudo(type) {
  835. return function(elem) {
  836. var name = elem.nodeName.toLowerCase();
  837. return (name === "input" || name === "button") && elem.type === type
  838. }
  839. }
  840. function createPositionalPseudo(fn) {
  841. return markFunction(
  842. function(argument) {
  843. argument = +argument;
  844. return markFunction(function(seed, matches) {
  845. var j, matchIndexes = fn([], seed.length, argument),
  846. i = matchIndexes.length;
  847. while (i--) {
  848. if (seed[j = matchIndexes[i]]) {
  849. seed[j] = !(matches[j] = seed[j])
  850. }
  851. }
  852. })
  853. })
  854. }
  855. isXML = Sizzle.isXML = function(elem) {
  856. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  857. return documentElement ? documentElement.nodeName !== "HTML" : false
  858. };
  859. support = Sizzle.support = {};
  860. setDocument = Sizzle.setDocument = function(node) {
  861. var doc = node ? node.ownerDocument || node : preferredDoc,
  862. parent = doc.defaultView;
  863. if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
  864. return document
  865. }
  866. document = doc;
  867. docElem = doc.documentElement;
  868. documentIsHTML = !isXML(doc);
  869. if (parent && parent.attachEvent && parent !== parent.top) {
  870. parent.attachEvent("onbeforeunload", function() {
  871. setDocument()
  872. })
  873. }
  874. support.attributes = assert(function(div) {
  875. div.className = "i";
  876. return !div.getAttribute("className")
  877. });
  878. support.getElementsByTagName = assert(function(div) {
  879. div.appendChild(
  880. doc.createComment(""));
  881. return !div.getElementsByTagName("*").length
  882. });
  883. support.getElementsByClassName = assert(function(div) {
  884. div.innerHTML = "<div class='a'></div><div class='a i'></div>";
  885. div.firstChild.className = "i";
  886. return div.getElementsByClassName("i").length === 2
  887. });
  888. support.getById = assert(function(div) {
  889. docElem.appendChild(div).id = expando;
  890. return !doc.getElementsByName || !doc.getElementsByName(expando).length
  891. });
  892. if (support.getById) {
  893. Expr.find["ID"] = function(id, context) {
  894. if (
  895. typeof context.getElementById !== strundefined && documentIsHTML) {
  896. var m = context.getElementById(id);
  897. return m && m.parentNode ? [m] : []
  898. }
  899. };
  900. Expr.filter["ID"] = function(id) {
  901. var attrId = id.replace(runescape, funescape);
  902. return function(elem) {
  903. return elem.getAttribute("id") === attrId
  904. }
  905. }
  906. } else {
  907. delete Expr.find["ID"];
  908. Expr.filter["ID"] = function(id) {
  909. var attrId = id.replace(runescape, funescape);
  910. return function(elem) {
  911. var node = typeof elem.getAttributeNode !== strundefined && elem
  912. .getAttributeNode("id");
  913. return node && node.value === attrId
  914. }
  915. }
  916. }
  917. Expr.find["TAG"] = support.getElementsByTagName ? function(tag, context) {
  918. if (typeof context.getElementsByTagName !== strundefined) {
  919. return context.getElementsByTagName(tag)
  920. }
  921. } : function(tag, context) {
  922. var elem, tmp = [],
  923. i = 0,
  924. results = context.getElementsByTagName(tag);
  925. if (tag === "*") {
  926. while (elem = results[i++]) {
  927. if (elem.nodeType === 1) {
  928. tmp.push(elem)
  929. }
  930. }
  931. return tmp
  932. }
  933. return results
  934. };
  935. Expr.find["CLASS"] = support.getElementsByClassName && function(className, context) {
  936. if (
  937. typeof context.getElementsByClassName !== strundefined && documentIsHTML) {
  938. return context.getElementsByClassName(className)
  939. }
  940. };
  941. rbuggyMatches = [];
  942. rbuggyQSA = [];
  943. if (support.qsa = rnative.test(doc.querySelectorAll)) {
  944. assert(function(div) {
  945. div.innerHTML = "<select><option selected=''></option></select>";
  946. if (!div.querySelectorAll("[selected]").length) {
  947. rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")")
  948. }
  949. if (!div.querySelectorAll(":checked").length) {
  950. rbuggyQSA.push(":checked")
  951. }
  952. });
  953. assert(function(div) {
  954. var input = doc.createElement("input");
  955. input.setAttribute("type", "hidden");
  956. div.appendChild(input).setAttribute("t", "");
  957. if (div.querySelectorAll("[t^='']").length) {
  958. rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")")
  959. }
  960. if (!div.querySelectorAll(":enabled").length) {
  961. rbuggyQSA.push(":enabled", ":disabled")
  962. }
  963. div.querySelectorAll("*,:x");
  964. rbuggyQSA.push(",.*:")
  965. })
  966. }
  967. if (support.matchesSelector = rnative.test(
  968. matches = docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem
  969. .oMatchesSelector || docElem.msMatchesSelector)) {
  970. assert(function(div) {
  971. support.disconnectedMatch = matches.call(div, "div");
  972. matches.call(div, "[s!='']:x");
  973. rbuggyMatches.push("!=", pseudos)
  974. })
  975. }
  976. rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
  977. rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
  978. contains = rnative.test(docElem.contains) || docElem.compareDocumentPosition ? function(a, b) {
  979. var adown = a.nodeType === 9 ? a.documentElement : a,
  980. bup = b && b.parentNode;
  981. return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(
  982. bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16))
  983. } : function(a, b) {
  984. if (b) {
  985. while (b = b.parentNode) {
  986. if (b === a) {
  987. return true
  988. }
  989. }
  990. }
  991. return false
  992. };
  993. sortOrder = docElem.compareDocumentPosition ? function(a, b) {
  994. if (a === b) {
  995. hasDuplicate = true;
  996. return 0
  997. }
  998. var compare = b.compareDocumentPosition && a.compareDocumentPosition && a
  999. .compareDocumentPosition(b);
  1000. if (compare) {
  1001. if (
  1002. compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare
  1003. ) {
  1004. if (a === doc || contains(preferredDoc, a)) {
  1005. return -1
  1006. }
  1007. if (b === doc || contains(preferredDoc, b)) {
  1008. return 1
  1009. }
  1010. return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0
  1011. }
  1012. return compare & 4 ? -1 : 1
  1013. }
  1014. return a.compareDocumentPosition ? -1 : 1
  1015. } : function(a, b) {
  1016. var cur, i = 0,
  1017. aup = a.parentNode,
  1018. bup = b.parentNode,
  1019. ap = [a],
  1020. bp = [b];
  1021. if (a === b) {
  1022. hasDuplicate = true;
  1023. return 0
  1024. } else if (!aup || !bup) {
  1025. return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf
  1026. .call(
  1027. sortInput, a) - indexOf.call(sortInput, b) : 0
  1028. } else if (aup === bup) {
  1029. return siblingCheck(a, b)
  1030. }
  1031. cur = a;
  1032. while (cur = cur.parentNode) {
  1033. ap.unshift(cur)
  1034. }
  1035. cur = b;
  1036. while (cur = cur.parentNode) {
  1037. bp.unshift(cur)
  1038. }
  1039. while (ap[i] === bp[i]) {
  1040. i++
  1041. }
  1042. return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] ===
  1043. preferredDoc ? 1 : 0
  1044. };
  1045. return doc
  1046. };
  1047. Sizzle.matches = function(expr, elements) {
  1048. return Sizzle(expr, null, null, elements)
  1049. };
  1050. Sizzle.matchesSelector = function(elem, expr) {
  1051. if ((elem.ownerDocument || elem) !== document) {
  1052. setDocument(elem)
  1053. }
  1054. expr = expr.replace(rattributeQuotes, "='$1']");
  1055. if (support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(
  1056. expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
  1057. try {
  1058. var ret = matches.call(elem, expr);
  1059. if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !==
  1060. 11) {
  1061. return ret
  1062. }
  1063. } catch (e) {}
  1064. }
  1065. return Sizzle(expr, document, null, [elem]).length > 0
  1066. };
  1067. Sizzle.contains = function(context, elem) {
  1068. if ((context.ownerDocument || context) !== document) {
  1069. setDocument(context)
  1070. }
  1071. return contains(context, elem)
  1072. };
  1073. Sizzle.attr = function(elem, name) {
  1074. if ((elem.ownerDocument || elem) !== document) {
  1075. setDocument(elem)
  1076. }
  1077. var fn = Expr.attrHandle[name.toLowerCase()],
  1078. val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !
  1079. documentIsHTML) : undefined;
  1080. return val === undefined ? support.attributes || !documentIsHTML ? elem.getAttribute(name) : (
  1081. val = elem.getAttributeNode(name)) && val.specified ? val.value : null : val
  1082. };
  1083. Sizzle.error = function(msg) {
  1084. throw new Error("Syntax error, unrecognized expression: " + msg)
  1085. };
  1086. Sizzle.uniqueSort = function(results) {
  1087. var elem, duplicates = [],
  1088. j = 0,
  1089. i = 0;
  1090. hasDuplicate = !support.detectDuplicates;
  1091. sortInput = !support.sortStable && results.slice(0);
  1092. results.sort(sortOrder);
  1093. if (hasDuplicate) {
  1094. while (elem = results[i++]) {
  1095. if (elem === results[i]) {
  1096. j = duplicates.push(i)
  1097. }
  1098. }
  1099. while (j--) {
  1100. results.splice(duplicates[j], 1)
  1101. }
  1102. }
  1103. return results
  1104. };
  1105. getText = Sizzle.getText = function(elem) {
  1106. var node, ret = "",
  1107. i = 0,
  1108. nodeType = elem.nodeType;
  1109. if (!nodeType) {
  1110. for (; node = elem[i]; i++) {
  1111. ret += getText(node)
  1112. }
  1113. } else if (
  1114. nodeType === 1 || nodeType === 9 || nodeType === 11) {
  1115. if (typeof elem.textContent === "string") {
  1116. return elem.textContent
  1117. } else {
  1118. for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
  1119. ret += getText(elem)
  1120. }
  1121. }
  1122. } else if (nodeType === 3 || nodeType === 4) {
  1123. return elem.nodeValue
  1124. }
  1125. return ret
  1126. };
  1127. Expr = Sizzle.selectors = {
  1128. cacheLength: 50,
  1129. createPseudo: markFunction,
  1130. match: matchExpr,
  1131. attrHandle: {},
  1132. find: {},
  1133. relative: {
  1134. ">": {
  1135. dir: "parentNode",
  1136. first: true
  1137. },
  1138. " ": {
  1139. dir: "parentNode"
  1140. },
  1141. "+": {
  1142. dir: "previousSibling",
  1143. first: true
  1144. },
  1145. "~": {
  1146. dir: "previousSibling"
  1147. }
  1148. },
  1149. preFilter: {
  1150. ATTR: function(match) {
  1151. match[1] = match[1].replace(runescape, funescape);
  1152. match[3] = (match[4] || match[5] || "").replace(runescape, funescape);
  1153. if (match[2] === "~=") {
  1154. match[3] = " " + match[3] + " "
  1155. }
  1156. return match.slice(0, 4)
  1157. },
  1158. CHILD: function(match) {
  1159. match[1] = match[1].toLowerCase();
  1160. if (match[1].slice(0, 3) === "nth") {
  1161. if (!match[3]) {
  1162. Sizzle.error(match[0])
  1163. }
  1164. match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" ||
  1165. match[3] === "odd"));
  1166. match[5] = +(match[7] + match[8] || match[3] === "odd")
  1167. } else if (match[3]) {
  1168. Sizzle.error(
  1169. match[0])
  1170. }
  1171. return match
  1172. },
  1173. PSEUDO: function(match) {
  1174. var excess, unquoted = !match[5] && match[2];
  1175. if (matchExpr["CHILD"].test(match[0])) {
  1176. return null
  1177. }
  1178. if (match[3] && match[4] !== undefined) {
  1179. match[2] = match[4]
  1180. } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted,
  1181. true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted
  1182. .length)) {
  1183. match[0] = match[0].slice(0, excess);
  1184. match[2] = unquoted.slice(0, excess)
  1185. }
  1186. return match.slice(0, 3)
  1187. }
  1188. },
  1189. filter: {
  1190. TAG: function(nodeNameSelector) {
  1191. var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  1192. return nodeNameSelector === "*" ? function() {
  1193. return true
  1194. } : function(elem) {
  1195. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName
  1196. }
  1197. },
  1198. CLASS: function(className) {
  1199. var pattern = classCache[className + " "];
  1200. return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" +
  1201. whitespace + "|$)")) && classCache(className, function(elem) {
  1202. return pattern.test(
  1203. typeof elem.className === "string" && elem.className ||
  1204. typeof elem.getAttribute !== strundefined && elem.getAttribute(
  1205. "class") || "")
  1206. })
  1207. },
  1208. ATTR: function(name, operator, check) {
  1209. return function(elem) {
  1210. var result = Sizzle.attr(elem, name);
  1211. if (result == null) {
  1212. return operator === "!="
  1213. }
  1214. if (!operator) {
  1215. return true
  1216. }
  1217. result += "";
  1218. return operator === "=" ? result === check : operator === "!=" ? result !==
  1219. check : operator === "^=" ? check && result.indexOf(check) === 0 :
  1220. operator === "*=" ? check && result.indexOf(check) > -1 : operator ===
  1221. "$=" ? check && result.slice(
  1222. -check.length) === check : operator === "~=" ? (" " + result + " ")
  1223. .indexOf(check) > -1 : operator === "|=" ? result === check || result
  1224. .slice(0, check.length + 1) === check + "-" : false
  1225. }
  1226. },
  1227. CHILD: function(type, what, argument, first, last) {
  1228. var simple = type.slice(0, 3) !== "nth",
  1229. forward = type.slice(-4) !== "last",
  1230. ofType = what === "of-type";
  1231. return first === 1 && last === 0 ? function(elem) {
  1232. return !!elem.parentNode
  1233. } : function(elem, context, xml) {
  1234. var cache, outerCache, node, diff, nodeIndex, start, dir = simple !==
  1235. forward ? "nextSibling" : "previousSibling",
  1236. parent = elem.parentNode,
  1237. name = ofType && elem.nodeName.toLowerCase(),
  1238. useCache = !xml && !ofType;
  1239. if (parent) {
  1240. if (simple) {
  1241. while (dir) {
  1242. node = elem;
  1243. while (node = node[dir]) {
  1244. if (ofType ? node.nodeName.toLowerCase() === name : node
  1245. .nodeType === 1) {
  1246. return false
  1247. }
  1248. }
  1249. start = dir = type === "only" && !start && "nextSibling"
  1250. }
  1251. return true
  1252. }
  1253. start = [forward ? parent.firstChild : parent.lastChild];
  1254. if (forward && useCache) {
  1255. outerCache = parent[expando] || (parent[expando] = {});
  1256. cache = outerCache[type] || [];
  1257. nodeIndex = cache[0] === dirruns && cache[1];
  1258. diff = cache[0] === dirruns && cache[2];
  1259. node = nodeIndex && parent.childNodes[nodeIndex];
  1260. while (node = ++nodeIndex && node && node[dir] || (diff =
  1261. nodeIndex = 0) || start.pop()) {
  1262. if (node.nodeType === 1 && ++diff && node === elem) {
  1263. outerCache[type] = [dirruns, nodeIndex, diff];
  1264. break
  1265. }
  1266. }
  1267. } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[
  1268. type]) && cache[0] === dirruns) {
  1269. diff = cache[1]
  1270. } else {
  1271. while (node = ++nodeIndex && node && node[dir] || (diff =
  1272. nodeIndex = 0) || start.pop()) {
  1273. if ((ofType ? node.nodeName.toLowerCase() === name : node
  1274. .nodeType === 1
  1275. ) && ++diff) {
  1276. if (useCache) {
  1277. (node[expando] || (node[expando] = {}))[type] = [
  1278. dirruns, diff
  1279. ]
  1280. }
  1281. if (node === elem) {
  1282. break
  1283. }
  1284. }
  1285. }
  1286. }
  1287. diff -= last;
  1288. return diff === first || diff % first === 0 && diff / first >= 0
  1289. }
  1290. }
  1291. },
  1292. PSEUDO: function(pseudo, argument) {
  1293. var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] ||
  1294. Sizzle.error("unsupported pseudo: " + pseudo);
  1295. if (fn[expando]) {
  1296. return fn(argument)
  1297. }
  1298. if (fn.length > 1) {
  1299. args = [pseudo, pseudo, "", argument];
  1300. return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(
  1301. function(seed, matches) {
  1302. var idx, matched = fn(seed, argument),
  1303. i = matched.length;
  1304. while (i--) {
  1305. idx = indexOf.call(seed, matched[i]);
  1306. seed[idx] = !(matches[idx] = matched[i])
  1307. }
  1308. }) : function(elem) {
  1309. return fn(elem, 0, args)
  1310. }
  1311. }
  1312. return fn
  1313. }
  1314. },
  1315. pseudos: {
  1316. not: markFunction(function(selector) {
  1317. var input = [],
  1318. results = [],
  1319. matcher = compile(selector.replace(rtrim, "$1"));
  1320. return matcher[expando] ? markFunction(function(seed, matches, context, xml) {
  1321. var elem, unmatched = matcher(seed, null, xml, []),
  1322. i = seed.length;
  1323. while (i--) {
  1324. if (elem = unmatched[i]) {
  1325. seed[i] = !(matches[i] = elem)
  1326. }
  1327. }
  1328. }) : function(elem, context, xml) {
  1329. input[0] = elem;
  1330. matcher(input, null, xml, results);
  1331. return !results.pop()
  1332. }
  1333. }),
  1334. has: markFunction(function(selector) {
  1335. return function(elem) {
  1336. return Sizzle(selector, elem).length > 0
  1337. }
  1338. }),
  1339. contains: markFunction(function(text) {
  1340. return function(elem) {
  1341. return (elem.textContent || elem.innerText || getText(elem)).indexOf(
  1342. text) > -1
  1343. }
  1344. }),
  1345. lang: markFunction(function(lang) {
  1346. if (!ridentifier.test(lang || "")) {
  1347. Sizzle.error("unsupported lang: " + lang)
  1348. }
  1349. lang = lang.replace(runescape, funescape).toLowerCase();
  1350. return function(elem) {
  1351. var elemLang;
  1352. do {
  1353. if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute(
  1354. "xml:lang") || elem.getAttribute("lang")) {
  1355. elemLang = elemLang.toLowerCase();
  1356. return elemLang === lang || elemLang.indexOf(lang + "-") === 0
  1357. }
  1358. } while ((elem = elem.parentNode) && elem.nodeType === 1);
  1359. return false
  1360. }
  1361. }),
  1362. target: function(elem) {
  1363. var hash = window.location && window.location.hash;
  1364. return hash && hash.slice(1) === elem.id
  1365. },
  1366. root: function(elem) {
  1367. return elem === docElem
  1368. },
  1369. focus: function(elem) {
  1370. return elem === document.activeElement && (
  1371. !document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~
  1372. elem.tabIndex)
  1373. },
  1374. enabled: function(elem) {
  1375. return elem.disabled === false
  1376. },
  1377. disabled: function(elem) {
  1378. return elem.disabled === true
  1379. },
  1380. checked: function(elem) {
  1381. var nodeName = elem.nodeName.toLowerCase();
  1382. return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem
  1383. .selected
  1384. },
  1385. selected: function(elem) {
  1386. if (elem.parentNode) {
  1387. elem.parentNode.selectedIndex
  1388. }
  1389. return elem.selected === true
  1390. },
  1391. empty: function(elem) {
  1392. for (
  1393. elem = elem.firstChild; elem; elem = elem.nextSibling) {
  1394. if (elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4) {
  1395. return false
  1396. }
  1397. }
  1398. return true
  1399. },
  1400. parent: function(elem) {
  1401. return !Expr.pseudos["empty"](elem)
  1402. },
  1403. header: function(elem) {
  1404. return rheader.test(elem.nodeName)
  1405. },
  1406. input: function(elem) {
  1407. return rinputs.test(elem.nodeName)
  1408. },
  1409. button: function(elem) {
  1410. var name = elem.nodeName.toLowerCase();
  1411. return name === "input" && elem.type === "button" || name === "button"
  1412. },
  1413. text: function(elem) {
  1414. var attr;
  1415. return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ((attr =
  1416. elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type)
  1417. },
  1418. first: createPositionalPseudo(function() {
  1419. return [0]
  1420. }),
  1421. last: createPositionalPseudo(function(matchIndexes, length) {
  1422. return [length - 1]
  1423. }),
  1424. eq: createPositionalPseudo(function(matchIndexes, length, argument) {
  1425. return [argument < 0 ? argument + length : argument]
  1426. }),
  1427. even: createPositionalPseudo(function(matchIndexes, length) {
  1428. var i = 0;
  1429. for (; i < length; i += 2) {
  1430. matchIndexes.push(i)
  1431. }
  1432. return matchIndexes
  1433. }),
  1434. odd: createPositionalPseudo(function(matchIndexes, length) {
  1435. var i = 1;
  1436. for (; i < length; i += 2) {
  1437. matchIndexes.push(i)
  1438. }
  1439. return matchIndexes
  1440. }),
  1441. lt: createPositionalPseudo(function(matchIndexes, length, argument) {
  1442. var i = argument < 0 ? argument + length : argument;
  1443. for (; --i >= 0;) {
  1444. matchIndexes.push(i)
  1445. }
  1446. return matchIndexes
  1447. }),
  1448. gt: createPositionalPseudo(function(matchIndexes, length, argument) {
  1449. var i = argument < 0 ? argument + length : argument;
  1450. for (; ++i < length;) {
  1451. matchIndexes.push(i)
  1452. }
  1453. return matchIndexes
  1454. })
  1455. }
  1456. };
  1457. Expr.pseudos["nth"] = Expr.pseudos["eq"];
  1458. for (i in {
  1459. radio: true,
  1460. checkbox: true,
  1461. file: true,
  1462. password: true,
  1463. image: true
  1464. }) {
  1465. Expr.pseudos[i] = createInputPseudo(i)
  1466. }
  1467. for (i in {
  1468. submit: true,
  1469. reset: true
  1470. }) {
  1471. Expr.pseudos[i] = createButtonPseudo(i)
  1472. }
  1473. function setFilters() {}
  1474. setFilters.prototype = Expr.filters = Expr.pseudos;
  1475. Expr.setFilters = new setFilters;
  1476. function tokenize(selector, parseOnly) {
  1477. var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
  1478. if (cached) {
  1479. return parseOnly ? 0 : cached.slice(0)
  1480. }
  1481. soFar = selector;
  1482. groups = [];
  1483. preFilters = Expr.preFilter;
  1484. while (soFar) {
  1485. if (!matched || (match = rcomma.exec(soFar))) {
  1486. if (match) {
  1487. soFar = soFar.slice(match[0].length) || soFar
  1488. }
  1489. groups.push(tokens = [])
  1490. }
  1491. matched = false;
  1492. if (match = rcombinators.exec(soFar)) {
  1493. matched = match.shift();
  1494. tokens.push({
  1495. value: matched,
  1496. type: match[0].replace(rtrim, " ")
  1497. });
  1498. soFar = soFar.slice(matched.length)
  1499. }
  1500. for (type in Expr.filter) {
  1501. if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type]
  1502. (match)))) {
  1503. matched = match.shift();
  1504. tokens.push({
  1505. value: matched,
  1506. type: type,
  1507. matches: match
  1508. });
  1509. soFar = soFar.slice(matched.length)
  1510. }
  1511. }
  1512. if (!matched) {
  1513. break
  1514. }
  1515. }
  1516. return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups)
  1517. .slice(0)
  1518. }
  1519. function toSelector(tokens) {
  1520. var i = 0,
  1521. len = tokens.length,
  1522. selector = "";
  1523. for (; i < len; i++) {
  1524. selector += tokens[i].value
  1525. }
  1526. return selector
  1527. }
  1528. function addCombinator(matcher, combinator, base) {
  1529. var dir = combinator.dir,
  1530. checkNonElements = base && dir === "parentNode",
  1531. doneName = done++;
  1532. return combinator.first ? function(elem, context, xml) {
  1533. while (
  1534. elem = elem[dir]) {
  1535. if (elem.nodeType === 1 || checkNonElements) {
  1536. return matcher(elem, context, xml)
  1537. }
  1538. }
  1539. } : function(elem, context, xml) {
  1540. var data, cache, outerCache, dirkey = dirruns + " " + doneName;
  1541. if (xml) {
  1542. while (elem = elem[dir]) {
  1543. if (elem.nodeType === 1 || checkNonElements) {
  1544. if (matcher(elem, context, xml)) {
  1545. return true
  1546. }
  1547. }
  1548. }
  1549. } else {
  1550. while (elem = elem[dir]) {
  1551. if (elem.nodeType === 1 || checkNonElements) {
  1552. outerCache = elem[expando] || (elem[expando] = {});
  1553. if ((cache = outerCache[dir]) && cache[0] === dirkey) {
  1554. if ((data = cache[1]) === true || data === cachedruns) {
  1555. return data === true
  1556. }
  1557. } else {
  1558. cache = outerCache[dir] = [dirkey];
  1559. cache[1] = matcher(elem, context, xml) || cachedruns;
  1560. if (cache[1] === true) {
  1561. return true
  1562. }
  1563. }
  1564. }
  1565. }
  1566. }
  1567. }
  1568. }
  1569. function elementMatcher(matchers) {
  1570. return matchers.length > 1 ? function(elem, context, xml) {
  1571. var i = matchers.length;
  1572. while (i--) {
  1573. if (!matchers[i](elem, context, xml)) {
  1574. return false
  1575. }
  1576. }
  1577. return true
  1578. } : matchers[0]
  1579. }
  1580. function condense(unmatched, map, filter, context, xml) {
  1581. var elem, newUnmatched = [],
  1582. i = 0,
  1583. len = unmatched.length,
  1584. mapped = map != null;
  1585. for (; i < len; i++) {
  1586. if (elem = unmatched[i]) {
  1587. if (
  1588. !filter || filter(elem, context, xml)) {
  1589. newUnmatched.push(elem);
  1590. if (mapped) {
  1591. map.push(i)
  1592. }
  1593. }
  1594. }
  1595. }
  1596. return newUnmatched
  1597. }
  1598. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  1599. if (postFilter && !postFilter[expando]) {
  1600. postFilter = setMatcher(postFilter)
  1601. }
  1602. if (postFinder && !postFinder[expando]) {
  1603. postFinder = setMatcher(postFinder, postSelector)
  1604. }
  1605. return markFunction(function(seed, results, context, xml) {
  1606. var temp, i, elem, preMap = [],
  1607. postMap = [],
  1608. preexisting = results.length,
  1609. elems = seed || multipleContexts(
  1610. selector || "*", context.nodeType ? [context] : context, []),
  1611. matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter,
  1612. context, xml) : elems,
  1613. matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting ||
  1614. postFilter) ? [] : results : matcherIn;
  1615. if (matcher) {
  1616. matcher(matcherIn, matcherOut, context, xml)
  1617. }
  1618. if (postFilter) {
  1619. temp = condense(matcherOut, postMap);
  1620. postFilter(temp, [], context, xml);
  1621. i = temp.length;
  1622. while (i--) {
  1623. if (elem = temp[i]) {
  1624. matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem)
  1625. }
  1626. }
  1627. }
  1628. if (seed) {
  1629. if (
  1630. postFinder || preFilter) {
  1631. if (postFinder) {
  1632. temp = [];
  1633. i = matcherOut.length;
  1634. while (i--) {
  1635. if (elem = matcherOut[i]) {
  1636. temp.push(matcherIn[i] = elem)
  1637. }
  1638. }
  1639. postFinder(null, matcherOut = [], temp, xml)
  1640. }
  1641. i = matcherOut.length;
  1642. while (i--) {
  1643. if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed,
  1644. elem) : preMap[i]) > -1) {
  1645. seed[temp] = !(results[temp] = elem)
  1646. }
  1647. }
  1648. }
  1649. } else {
  1650. matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting,
  1651. matcherOut.length) : matcherOut);
  1652. if (postFinder) {
  1653. postFinder(null, results, matcherOut, xml)
  1654. } else {
  1655. push.apply(
  1656. results, matcherOut)
  1657. }
  1658. }
  1659. })
  1660. }
  1661. function matcherFromTokens(tokens) {
  1662. var checkContext, matcher, j, len = tokens.length,
  1663. leadingRelative = Expr.relative[tokens[0].type],
  1664. implicitRelative = leadingRelative || Expr.relative[" "],
  1665. i = leadingRelative ? 1 : 0,
  1666. matchContext = addCombinator(function(elem) {
  1667. return elem === checkContext
  1668. }, implicitRelative, true),
  1669. matchAnyContext = addCombinator(function(elem) {
  1670. return indexOf.call(checkContext, elem) > -1
  1671. }, implicitRelative, true),
  1672. matchers = [function(elem, context, xml) {
  1673. return !leadingRelative && (
  1674. xml || context !== outermostContext) || ((checkContext = context).nodeType ?
  1675. matchContext(elem, context, xml) : matchAnyContext(elem, context, xml))
  1676. }];
  1677. for (; i < len; i++) {
  1678. if (matcher = Expr.relative[tokens[i].type]) {
  1679. matchers = [addCombinator(elementMatcher(matchers), matcher)]
  1680. } else {
  1681. matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
  1682. if (matcher[expando]) {
  1683. j = ++i;
  1684. for (; j < len; j++) {
  1685. if (Expr.relative[tokens[j].type]) {
  1686. break
  1687. }
  1688. }
  1689. return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0,
  1690. i - 1).concat({
  1691. value: tokens[i - 2].type === " " ? "*" : ""
  1692. })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i,
  1693. j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len &&
  1694. toSelector(tokens))
  1695. }
  1696. matchers.push(matcher)
  1697. }
  1698. }
  1699. return elementMatcher(matchers)
  1700. }
  1701. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  1702. var matcherCachedRuns = 0,
  1703. bySet = setMatchers.length > 0,
  1704. byElement = elementMatchers.length > 0,
  1705. superMatcher = function(seed, context, xml, results, expandContext) {
  1706. var elem, j, matcher, setMatched = [],
  1707. matchedCount = 0,
  1708. i = "0",
  1709. unmatched = seed && [],
  1710. outermost = expandContext != null,
  1711. contextBackup = outermostContext,
  1712. elems = seed || byElement && Expr.find["TAG"]("*", expandContext && context
  1713. .parentNode || context),
  1714. dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || .1;
  1715. if (outermost) {
  1716. outermostContext = context !== document && context;
  1717. cachedruns = matcherCachedRuns
  1718. }
  1719. for (;
  1720. (elem = elems[i]) != null; i++) {
  1721. if (byElement && elem) {
  1722. j = 0;
  1723. while (matcher = elementMatchers[j++]) {
  1724. if (matcher(elem, context, xml)) {
  1725. results.push(elem);
  1726. break
  1727. }
  1728. }
  1729. if (outermost) {
  1730. dirruns = dirrunsUnique;
  1731. cachedruns = ++matcherCachedRuns
  1732. }
  1733. }
  1734. if (bySet) {
  1735. if (elem = !matcher && elem) {
  1736. matchedCount--
  1737. }
  1738. if (seed) {
  1739. unmatched.push(elem)
  1740. }
  1741. }
  1742. }
  1743. matchedCount += i;
  1744. if (bySet && i !== matchedCount) {
  1745. j = 0;
  1746. while (matcher = setMatchers[j++]) {
  1747. matcher(unmatched, setMatched, context, xml)
  1748. }
  1749. if (seed) {
  1750. if (matchedCount > 0) {
  1751. while (i--) {
  1752. if (!(unmatched[i] || setMatched[i])) {
  1753. setMatched[i] = pop.call(results)
  1754. }
  1755. }
  1756. }
  1757. setMatched = condense(setMatched)
  1758. }
  1759. push.apply(results, setMatched);
  1760. if (
  1761. outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1
  1762. ) {
  1763. Sizzle.uniqueSort(results)
  1764. }
  1765. }
  1766. if (outermost) {
  1767. dirruns = dirrunsUnique;
  1768. outermostContext = contextBackup
  1769. }
  1770. return unmatched
  1771. };
  1772. return bySet ? markFunction(superMatcher) : superMatcher
  1773. }
  1774. compile = Sizzle.compile = function(selector, group) {
  1775. var i, setMatchers = [],
  1776. elementMatchers = [],
  1777. cached = compilerCache[selector + " "];
  1778. if (!cached) {
  1779. if (!group) {
  1780. group = tokenize(selector)
  1781. }
  1782. i = group.length;
  1783. while (i--) {
  1784. cached = matcherFromTokens(group[i]);
  1785. if (cached[expando]) {
  1786. setMatchers.push(cached)
  1787. } else {
  1788. elementMatchers.push(cached)
  1789. }
  1790. }
  1791. cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers))
  1792. }
  1793. return cached
  1794. };
  1795. function multipleContexts(selector, contexts, results) {
  1796. var i = 0,
  1797. len = contexts.length;
  1798. for (; i < len; i++) {
  1799. Sizzle(selector, contexts[i], results)
  1800. }
  1801. return results
  1802. }
  1803. function select(selector, context, results, seed) {
  1804. var i, tokens, token, type, find, match = tokenize(selector);
  1805. if (!seed) {
  1806. if (match.length === 1) {
  1807. tokens = match[0] = match[0].slice(0);
  1808. if (tokens.length > 2 && (
  1809. token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 &&
  1810. documentIsHTML && Expr.relative[tokens[1].type]) {
  1811. context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) ||
  1812. [])[0];
  1813. if (!context) {
  1814. return results
  1815. }
  1816. selector = selector.slice(tokens.shift().value.length)
  1817. }
  1818. i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
  1819. while (i--) {
  1820. token = tokens[i];
  1821. if (Expr.relative[type = token.type]) {
  1822. break
  1823. }
  1824. if (find = Expr.find[type]) {
  1825. if (seed = find(token.matches[0].replace(runescape, funescape),
  1826. rsibling.test(tokens[0].type) && context.parentNode || context)) {
  1827. tokens.splice(i, 1);
  1828. selector = seed.length && toSelector(tokens);
  1829. if (!selector) {
  1830. push.apply(results, seed);
  1831. return results
  1832. }
  1833. break
  1834. }
  1835. }
  1836. }
  1837. }
  1838. }
  1839. compile(selector, match)(seed, context, !documentIsHTML, results, rsibling.test(selector));
  1840. return results
  1841. }
  1842. support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
  1843. support.detectDuplicates = hasDuplicate;
  1844. setDocument();
  1845. support.sortDetached = assert(function(div1) {
  1846. return div1.compareDocumentPosition(
  1847. document.createElement("div")) & 1
  1848. });
  1849. if (!assert(function(div) {
  1850. div.innerHTML = "<a href='#'></a>";
  1851. return div.firstChild.getAttribute("href") === "#"
  1852. })) {
  1853. addHandle("type|href|height|width", function(elem, name, isXML) {
  1854. if (!isXML) {
  1855. return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2)
  1856. }
  1857. })
  1858. }
  1859. if (!support.attributes || !assert(function(div) {
  1860. div.innerHTML = "<input/>";
  1861. div.firstChild.setAttribute("value", "");
  1862. return div.firstChild.getAttribute("value") === ""
  1863. })) {
  1864. addHandle("value", function(elem, name, isXML) {
  1865. if (
  1866. !isXML && elem.nodeName.toLowerCase() === "input") {
  1867. return elem.defaultValue
  1868. }
  1869. })
  1870. }
  1871. if (!assert(function(div) {
  1872. return div.getAttribute("disabled") == null
  1873. })) {
  1874. addHandle(booleans, function(elem, name, isXML) {
  1875. var val;
  1876. if (!isXML) {
  1877. return (val = elem.getAttributeNode(name)) && val.specified ? val.value : elem[
  1878. name] === true ? name.toLowerCase() : null
  1879. }
  1880. })
  1881. }
  1882. jQuery.find = Sizzle;
  1883. jQuery.expr = Sizzle.selectors;
  1884. jQuery.expr[":"] = jQuery.expr.pseudos;
  1885. jQuery.unique = Sizzle.uniqueSort;
  1886. jQuery.text = Sizzle.getText;
  1887. jQuery.isXMLDoc = Sizzle.isXML;
  1888. jQuery.contains = Sizzle.contains
  1889. })(window);
  1890. var optionsCache = {};
  1891. function createOptions(options) {
  1892. var object = optionsCache[options] = {};
  1893. jQuery.each(options.match(core_rnotwhite) || [], function(_, flag) {
  1894. object[flag] = true
  1895. });
  1896. return object
  1897. }
  1898. jQuery.Callbacks = function(options) {
  1899. options = typeof options === "string" ? optionsCache[options] || createOptions(options) : jQuery
  1900. .extend({}, options);
  1901. var firing, memory, fired, firingLength, firingIndex, firingStart, list = [],
  1902. stack = !options.once && [],
  1903. fire = function(data) {
  1904. memory = options.memory && data;
  1905. fired = true;
  1906. firingIndex = firingStart || 0;
  1907. firingStart = 0;
  1908. firingLength = list.length;
  1909. firing = true;
  1910. for (; list && firingIndex < firingLength; firingIndex++) {
  1911. if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
  1912. memory = false;
  1913. break
  1914. }
  1915. }
  1916. firing = false;
  1917. if (list) {
  1918. if (stack) {
  1919. if (stack.length) {
  1920. fire(stack.shift())
  1921. }
  1922. } else if (memory) {
  1923. list = []
  1924. } else {
  1925. self.disable()
  1926. }
  1927. }
  1928. },
  1929. self = {
  1930. add: function() {
  1931. if (list) {
  1932. var start = list.length;
  1933. (function add(args) {
  1934. jQuery.each(args, function(_, arg) {
  1935. var type = jQuery.type(arg);
  1936. if (type === "function") {
  1937. if (!options.unique || !self.has(arg)) {
  1938. list.push(arg)
  1939. }
  1940. } else if (arg && arg.length && type !== "string") {
  1941. add(arg)
  1942. }
  1943. })
  1944. })(arguments);
  1945. if (firing) {
  1946. firingLength = list.length
  1947. } else if (memory) {
  1948. firingStart = start;
  1949. fire(memory)
  1950. }
  1951. }
  1952. return this
  1953. },
  1954. remove: function() {
  1955. if (list) {
  1956. jQuery.each(arguments, function(_, arg) {
  1957. var index;
  1958. while ((index = jQuery.inArray(arg, list, index)) > -1) {
  1959. list.splice(index, 1);
  1960. if (firing) {
  1961. if (index <= firingLength) {
  1962. firingLength--
  1963. }
  1964. if (index <= firingIndex) {
  1965. firingIndex--
  1966. }
  1967. }
  1968. }
  1969. })
  1970. }
  1971. return this
  1972. },
  1973. has: function(fn) {
  1974. return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length)
  1975. },
  1976. empty: function() {
  1977. list = [];
  1978. firingLength = 0;
  1979. return this
  1980. },
  1981. disable: function() {
  1982. list = stack = memory = undefined;
  1983. return this
  1984. },
  1985. disabled: function() {
  1986. return !list
  1987. },
  1988. lock: function() {
  1989. stack = undefined;
  1990. if (!memory) {
  1991. self.disable()
  1992. }
  1993. return this
  1994. },
  1995. locked: function() {
  1996. return !stack
  1997. },
  1998. fireWith: function(context, args) {
  1999. if (list && (!fired || stack)) {
  2000. args = args || [];
  2001. args = [context, args.slice ? args.slice() : args];
  2002. if (firing) {
  2003. stack.push(args)
  2004. } else {
  2005. fire(args)
  2006. }
  2007. }
  2008. return this
  2009. },
  2010. fire: function() {
  2011. self.fireWith(this, arguments);
  2012. return this
  2013. },
  2014. fired: function() {
  2015. return !!fired
  2016. }
  2017. };
  2018. return self
  2019. };
  2020. jQuery.extend({
  2021. Deferred: function(func) {
  2022. var tuples = [
  2023. ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
  2024. ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
  2025. ["notify", "progress", jQuery.Callbacks("memory")]
  2026. ],
  2027. state = "pending",
  2028. promise = {
  2029. state: function() {
  2030. return state
  2031. },
  2032. always: function() {
  2033. deferred.done(arguments).fail(arguments);
  2034. return this
  2035. },
  2036. then: function() {
  2037. var fns = arguments;
  2038. return jQuery.Deferred(function(newDefer) {
  2039. jQuery.each(tuples, function(i, tuple) {
  2040. var action = tuple[0],
  2041. fn = jQuery.isFunction(fns[i]) && fns[i];
  2042. deferred[tuple[1]](function() {
  2043. var returned = fn && fn.apply(this,
  2044. arguments);
  2045. if (returned && jQuery.isFunction(
  2046. returned.promise)) {
  2047. returned.promise().done(newDefer
  2048. .resolve).fail(newDefer
  2049. .reject).progress(newDefer
  2050. .notify)
  2051. } else {
  2052. newDefer[action + "With"](this ===
  2053. promise ? newDefer
  2054. .promise() : this, fn ? [
  2055. returned
  2056. ] : arguments)
  2057. }
  2058. })
  2059. });
  2060. fns = null
  2061. }).promise()
  2062. },
  2063. promise: function(obj) {
  2064. return obj != null ? jQuery.extend(obj, promise) : promise
  2065. }
  2066. },
  2067. deferred = {};
  2068. promise.pipe = promise.then;
  2069. jQuery.each(tuples, function(i, tuple) {
  2070. var list = tuple[2],
  2071. stateString = tuple[3];
  2072. promise[tuple[1]] = list.add;
  2073. if (stateString) {
  2074. list.add(function() {
  2075. state = stateString
  2076. }, tuples[i ^ 1][2].disable, tuples[2][2].lock)
  2077. }
  2078. deferred[tuple[0]] = function() {
  2079. deferred[tuple[0] + "With"](this === deferred ? promise : this,
  2080. arguments);
  2081. return this
  2082. };
  2083. deferred[tuple[0] + "With"] = list.fireWith
  2084. });
  2085. promise.promise(deferred);
  2086. if (func) {
  2087. func.call(deferred, deferred)
  2088. }
  2089. return deferred
  2090. },
  2091. when: function(subordinate) {
  2092. var i = 0,
  2093. resolveValues = core_slice.call(arguments),
  2094. length = resolveValues.length,
  2095. remaining = length !== 1 || subordinate && jQuery.isFunction(subordinate.promise) ?
  2096. length : 0,
  2097. deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
  2098. updateFunc = function(i, contexts, values) {
  2099. return function(value) {
  2100. contexts[i] = this;
  2101. values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
  2102. if (values === progressValues) {
  2103. deferred.notifyWith(contexts, values)
  2104. } else if (
  2105. !--remaining) {
  2106. deferred.resolveWith(contexts, values)
  2107. }
  2108. }
  2109. },
  2110. progressValues, progressContexts, resolveContexts;
  2111. if (length > 1) {
  2112. progressValues = new Array(length);
  2113. progressContexts = new Array(length);
  2114. resolveContexts = new Array(length);
  2115. for (; i < length; i++) {
  2116. if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
  2117. resolveValues[i].promise().done(updateFunc(i, resolveContexts, resolveValues))
  2118. .fail(deferred.reject).progress(updateFunc(i, progressContexts,
  2119. progressValues))
  2120. } else {
  2121. --remaining
  2122. }
  2123. }
  2124. }
  2125. if (!remaining) {
  2126. deferred.resolveWith(resolveContexts, resolveValues)
  2127. }
  2128. return deferred.promise()
  2129. }
  2130. });
  2131. jQuery.support = function(support) {
  2132. var all, a, input, select, fragment, opt, eventName, isSupported, i, div = document.createElement(
  2133. "div");
  2134. div.setAttribute("className", "t");
  2135. div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
  2136. all = div.getElementsByTagName("*") || [];
  2137. a = div.getElementsByTagName("a")[0];
  2138. if (!a || !a.style || !all.length) {
  2139. return support
  2140. }
  2141. select = document.createElement("select");
  2142. opt = select.appendChild(document.createElement("option"));
  2143. input = div.getElementsByTagName("input")[0];
  2144. a.style.cssText = "top:1px;float:left;opacity:.5";
  2145. support.getSetAttribute = div.className !== "t";
  2146. support.leadingWhitespace = div.firstChild.nodeType === 3;
  2147. support.tbody = !div.getElementsByTagName("tbody").length;
  2148. support.htmlSerialize = !!div.getElementsByTagName("link").length;
  2149. support.style = /top/.test(a.getAttribute("style"));
  2150. support.hrefNormalized = a.getAttribute("href") === "/a";
  2151. support.opacity = /^0.5/.test(
  2152. a.style.opacity);
  2153. support.cssFloat = !!a.style.cssFloat;
  2154. support.checkOn = !!input.value;
  2155. support.optSelected = opt.selected;
  2156. support.enctype = !!document.createElement("form").enctype;
  2157. support.html5Clone = document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>";
  2158. support.inlineBlockNeedsLayout = false;
  2159. support.shrinkWrapBlocks = false;
  2160. support.pixelPosition = false;
  2161. support.deleteExpando = true;
  2162. support.noCloneEvent = true;
  2163. support.reliableMarginRight = true;
  2164. support.boxSizingReliable = true;
  2165. input.checked = true;
  2166. support.noCloneChecked = input.cloneNode(true).checked;
  2167. select.disabled = true;
  2168. support.optDisabled = !opt.disabled;
  2169. try {
  2170. delete div.test
  2171. } catch (e) {
  2172. support.deleteExpando = false
  2173. }
  2174. input = document.createElement("input");
  2175. input.setAttribute("value", "");
  2176. support.input = input.getAttribute("value") === "";
  2177. input.value = "t";
  2178. input.setAttribute("type", "radio");
  2179. support.radioValue = input.value === "t";
  2180. input.setAttribute("checked", "t");
  2181. input.setAttribute("name", "t");
  2182. fragment = document.createDocumentFragment();
  2183. fragment.appendChild(
  2184. input);
  2185. support.appendChecked = input.checked;
  2186. support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
  2187. if (div.attachEvent) {
  2188. div.attachEvent("onclick", function() {
  2189. support.noCloneEvent = false
  2190. });
  2191. div.cloneNode(true).click()
  2192. }
  2193. for (i in {
  2194. submit: true,
  2195. change: true,
  2196. focusin: true
  2197. }) {
  2198. div.setAttribute(eventName = "on" + i, "t");
  2199. support[i + "Bubbles"] = eventName in window || div.attributes[eventName].expando === false
  2200. }
  2201. div.style.backgroundClip = "content-box";
  2202. div.cloneNode(true).style.backgroundClip = "";
  2203. support.clearCloneStyle = div.style.backgroundClip === "content-box";
  2204. for (i in jQuery(support)) {
  2205. break
  2206. }
  2207. support.ownLast = i !== "0";
  2208. jQuery(function() {
  2209. var container, marginDiv, tds, divReset =
  2210. "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
  2211. body = document.getElementsByTagName("body")[0];
  2212. if (!body) {
  2213. return
  2214. }
  2215. container = document.createElement("div");
  2216. container.style.cssText =
  2217. "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
  2218. body.appendChild(container).appendChild(div);
  2219. div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
  2220. tds = div.getElementsByTagName("td");
  2221. tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
  2222. isSupported = tds[0].offsetHeight === 0;
  2223. tds[0].style.display = "";
  2224. tds[1].style.display = "none";
  2225. support.reliableHiddenOffsets = isSupported && tds[0].offsetHeight === 0;
  2226. div.innerHTML = "";
  2227. div.style.cssText =
  2228. "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%;";
  2229. jQuery.swap(body, body.style.zoom != null ? {
  2230. zoom: 1
  2231. } : {}, function() {
  2232. support.boxSizing = div.offsetWidth === 4
  2233. });
  2234. if (window.getComputedStyle) {
  2235. support.pixelPosition = (window.getComputedStyle(div, null) || {}).top !== "1%";
  2236. support.boxSizingReliable = (window.getComputedStyle(div, null) || {
  2237. width: "4px"
  2238. }).width === "4px";
  2239. marginDiv = div.appendChild(document.createElement("div"));
  2240. marginDiv.style.cssText = div.style.cssText = divReset;
  2241. marginDiv.style.marginRight = marginDiv.style.width = "0";
  2242. div.style.width = "1px";
  2243. support.reliableMarginRight = !parseFloat((window.getComputedStyle(marginDiv, null) ||
  2244. {}).marginRight)
  2245. }
  2246. if (typeof div.style.zoom !== core_strundefined) {
  2247. div.innerHTML = "";
  2248. div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
  2249. support.inlineBlockNeedsLayout = div.offsetWidth === 3;
  2250. div.style.display = "block";
  2251. div.innerHTML = "<div></div>";
  2252. div.firstChild.style.width = "5px";
  2253. support.shrinkWrapBlocks = div.offsetWidth !== 3;
  2254. if (support.inlineBlockNeedsLayout) {
  2255. body.style.zoom = 1
  2256. }
  2257. }
  2258. body.removeChild(container);
  2259. container = div = tds = marginDiv = null
  2260. });
  2261. all = select = fragment = opt = a = input = null;
  2262. return support
  2263. }({});
  2264. var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
  2265. rmultiDash = /([A-Z])/g;
  2266. function internalData(elem, name, data, pvt) {
  2267. if (!jQuery.acceptData(elem)) {
  2268. return
  2269. }
  2270. var ret, thisCache, internalKey = jQuery.expando,
  2271. isNode = elem.nodeType,
  2272. cache = isNode ? jQuery.cache : elem,
  2273. id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
  2274. if ((!id || !cache[id] || !pvt && !cache[id].data) && data === undefined && typeof name === "string") {
  2275. return
  2276. }
  2277. if (!id) {
  2278. if (isNode) {
  2279. id = elem[internalKey] = core_deletedIds.pop() || jQuery.guid++
  2280. } else {
  2281. id = internalKey
  2282. }
  2283. }
  2284. if (!cache[id]) {
  2285. cache[id] = isNode ? {} : {
  2286. toJSON: jQuery.noop
  2287. }
  2288. }
  2289. if (typeof name === "object" || typeof name === "function") {
  2290. if (pvt) {
  2291. cache[id] = jQuery.extend(cache[id], name)
  2292. } else {
  2293. cache[id].data = jQuery.extend(cache[id].data, name)
  2294. }
  2295. }
  2296. thisCache = cache[id];
  2297. if (!pvt) {
  2298. if (!thisCache.data) {
  2299. thisCache.data = {}
  2300. }
  2301. thisCache = thisCache.data
  2302. }
  2303. if (data !== undefined) {
  2304. thisCache[jQuery.camelCase(name)] = data
  2305. }
  2306. if (typeof name === "string") {
  2307. ret = thisCache[name];
  2308. if (ret == null) {
  2309. ret = thisCache[jQuery.camelCase(name)]
  2310. }
  2311. } else {
  2312. ret = thisCache
  2313. }
  2314. return ret
  2315. }
  2316. function internalRemoveData(elem, name, pvt) {
  2317. if (!jQuery.acceptData(elem)) {
  2318. return
  2319. }
  2320. var thisCache, i, isNode = elem.nodeType,
  2321. cache = isNode ? jQuery.cache : elem,
  2322. id = isNode ? elem[jQuery.expando] : jQuery.expando;
  2323. if (!cache[id]) {
  2324. return
  2325. }
  2326. if (
  2327. name) {
  2328. thisCache = pvt ? cache[id] : cache[id].data;
  2329. if (thisCache) {
  2330. if (!jQuery.isArray(name)) {
  2331. if (name in thisCache) {
  2332. name = [name]
  2333. } else {
  2334. name = jQuery.camelCase(name);
  2335. if (name in thisCache) {
  2336. name = [name]
  2337. } else {
  2338. name = name.split(" ")
  2339. }
  2340. }
  2341. } else {
  2342. name = name.concat(jQuery.map(name, jQuery.camelCase))
  2343. }
  2344. i = name.length;
  2345. while (i--) {
  2346. delete thisCache[name[i]]
  2347. }
  2348. if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) {
  2349. return
  2350. }
  2351. }
  2352. }
  2353. if (!pvt) {
  2354. delete cache[id].data;
  2355. if (!isEmptyDataObject(cache[id])) {
  2356. return
  2357. }
  2358. }
  2359. if (isNode) {
  2360. jQuery.cleanData([elem], true)
  2361. } else if (jQuery.support.deleteExpando || cache != cache.window) {
  2362. delete cache[id]
  2363. } else {
  2364. cache[id] = null
  2365. }
  2366. }
  2367. jQuery.extend({
  2368. cache: {},
  2369. noData: {
  2370. applet: true,
  2371. embed: true,
  2372. object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  2373. },
  2374. hasData: function(elem) {
  2375. elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
  2376. return !!elem && !isEmptyDataObject(elem)
  2377. },
  2378. data: function(elem, name, data) {
  2379. return internalData(elem, name, data)
  2380. },
  2381. removeData: function(elem, name) {
  2382. return internalRemoveData(
  2383. elem, name)
  2384. },
  2385. _data: function(elem, name, data) {
  2386. return internalData(elem, name, data, true)
  2387. },
  2388. _removeData: function(elem, name) {
  2389. return internalRemoveData(elem, name, true)
  2390. },
  2391. acceptData: function(elem) {
  2392. if (elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9) {
  2393. return false
  2394. }
  2395. var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
  2396. return !noData || noData !== true && elem.getAttribute("classid") === noData
  2397. }
  2398. });
  2399. jQuery.fn.extend({
  2400. data: function(key, value) {
  2401. var attrs, name, data = null,
  2402. i = 0,
  2403. elem = this[0];
  2404. if (key === undefined) {
  2405. if (this.length) {
  2406. data = jQuery.data(elem);
  2407. if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
  2408. attrs = elem.attributes;
  2409. for (; i < attrs.length; i++) {
  2410. name = attrs[i].name;
  2411. if (name.indexOf("data-") === 0) {
  2412. name = jQuery.camelCase(name.slice(5));
  2413. dataAttr(elem, name, data[name])
  2414. }
  2415. }
  2416. jQuery._data(elem, "parsedAttrs", true)
  2417. }
  2418. }
  2419. return data
  2420. }
  2421. if (typeof key === "object") {
  2422. return this.each(function() {
  2423. jQuery.data(this, key)
  2424. })
  2425. }
  2426. return arguments.length > 1 ? this.each(function() {
  2427. jQuery.data(this, key, value)
  2428. }) : elem ? dataAttr(elem, key,
  2429. jQuery.data(elem, key)) : null
  2430. },
  2431. removeData: function(key) {
  2432. return this.each(function() {
  2433. jQuery.removeData(this, key)
  2434. })
  2435. }
  2436. });
  2437. function dataAttr(elem, key, data) {
  2438. if (data === undefined && elem.nodeType === 1) {
  2439. var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
  2440. data = elem.getAttribute(name);
  2441. if (typeof data === "string") {
  2442. try {
  2443. data = data === "true" ? true : data === "false" ? false : data === "null" ? null : +data +
  2444. "" === data ? +data : rbrace.test(data) ? jQuery.parseJSON(data) : data
  2445. } catch (e) {}
  2446. jQuery.data(elem, key, data)
  2447. } else {
  2448. data = undefined
  2449. }
  2450. }
  2451. return data
  2452. }
  2453. function isEmptyDataObject(obj) {
  2454. var name;
  2455. for (name in obj) {
  2456. if (name === "data" && jQuery.isEmptyObject(obj[name])) {
  2457. continue
  2458. }
  2459. if (name !== "toJSON") {
  2460. return false
  2461. }
  2462. }
  2463. return true
  2464. }
  2465. jQuery.extend({
  2466. queue: function(elem, type, data) {
  2467. var queue;
  2468. if (elem) {
  2469. type = (type || "fx") + "queue";
  2470. queue = jQuery._data(elem, type);
  2471. if (data) {
  2472. if (!queue || jQuery.isArray(data)) {
  2473. queue = jQuery._data(elem, type, jQuery.makeArray(data))
  2474. } else {
  2475. queue.push(data)
  2476. }
  2477. }
  2478. return queue || []
  2479. }
  2480. },
  2481. dequeue: function(elem, type) {
  2482. type = type || "fx";
  2483. var queue = jQuery.queue(elem, type),
  2484. startLength = queue.length,
  2485. fn = queue.shift(),
  2486. hooks = jQuery._queueHooks(elem, type),
  2487. next = function() {
  2488. jQuery.dequeue(elem, type)
  2489. };
  2490. if (fn === "inprogress") {
  2491. fn = queue.shift();
  2492. startLength--
  2493. }
  2494. if (fn) {
  2495. if (type === "fx") {
  2496. queue.unshift("inprogress")
  2497. }
  2498. delete hooks.stop;
  2499. fn.call(elem, next, hooks)
  2500. }
  2501. if (!startLength && hooks) {
  2502. hooks.empty.fire()
  2503. }
  2504. },
  2505. _queueHooks: function(elem, type) {
  2506. var key = type + "queueHooks";
  2507. return jQuery._data(elem, key) || jQuery._data(elem, key, {
  2508. empty: jQuery.Callbacks("once memory").add(function() {
  2509. jQuery._removeData(elem, type + "queue");
  2510. jQuery._removeData(elem, key)
  2511. })
  2512. })
  2513. }
  2514. });
  2515. jQuery.fn.extend({
  2516. queue: function(type, data) {
  2517. var setter = 2;
  2518. if (typeof type !== "string") {
  2519. data = type;
  2520. type = "fx";
  2521. setter--
  2522. }
  2523. if (arguments.length < setter) {
  2524. return jQuery.queue(this[0], type)
  2525. }
  2526. return data === undefined ? this : this.each(function() {
  2527. var queue = jQuery.queue(this, type, data);
  2528. jQuery._queueHooks(this, type);
  2529. if (type === "fx" && queue[0] !== "inprogress") {
  2530. jQuery.dequeue(this, type)
  2531. }
  2532. })
  2533. },
  2534. dequeue: function(type) {
  2535. return this.each(
  2536. function() {
  2537. jQuery.dequeue(this, type)
  2538. })
  2539. },
  2540. delay: function(time, type) {
  2541. time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
  2542. type = type || "fx";
  2543. return this.queue(type, function(next, hooks) {
  2544. var timeout = setTimeout(next, time);
  2545. hooks.stop = function() {
  2546. clearTimeout(timeout)
  2547. }
  2548. })
  2549. },
  2550. clearQueue: function(type) {
  2551. return this.queue(type || "fx", [])
  2552. },
  2553. promise: function(type, obj) {
  2554. var tmp, count = 1,
  2555. defer = jQuery.Deferred(),
  2556. elements = this,
  2557. i = this.length,
  2558. resolve = function() {
  2559. if (!--count) {
  2560. defer.resolveWith(elements, [elements])
  2561. }
  2562. };
  2563. if (
  2564. typeof type !== "string") {
  2565. obj = type;
  2566. type = undefined
  2567. }
  2568. type = type || "fx";
  2569. while (i--) {
  2570. tmp = jQuery._data(elements[i], type + "queueHooks");
  2571. if (tmp && tmp.empty) {
  2572. count++;
  2573. tmp.empty.add(resolve)
  2574. }
  2575. }
  2576. resolve();
  2577. return defer.promise(obj)
  2578. }
  2579. });
  2580. var nodeHook, boolHook, rclass = /[\t\r\n\f]/g,
  2581. rreturn = /\r/g,
  2582. rfocusable = /^(?:input|select|textarea|button|object)$/i,
  2583. rclickable = /^(?:a|area)$/i,
  2584. ruseDefault = /^(?:checked|selected)$/i,
  2585. getSetAttribute = jQuery.support.getSetAttribute,
  2586. getSetInput = jQuery.support.input;
  2587. jQuery.fn.extend({
  2588. attr: function(name, value) {
  2589. return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1)
  2590. },
  2591. removeAttr: function(name) {
  2592. return this.each(function() {
  2593. jQuery.removeAttr(this, name)
  2594. })
  2595. },
  2596. prop: function(name, value) {
  2597. return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1)
  2598. },
  2599. removeProp: function(name) {
  2600. name = jQuery.propFix[name] || name;
  2601. return this.each(function() {
  2602. try {
  2603. this[name] = undefined;
  2604. delete this[name]
  2605. } catch (e) {}
  2606. })
  2607. },
  2608. addClass: function(value) {
  2609. var classes, elem, cur, clazz, j, i = 0,
  2610. len = this.length,
  2611. proceed = typeof value === "string" && value;
  2612. if (jQuery.isFunction(value)) {
  2613. return this.each(function(j) {
  2614. jQuery(this).addClass(value.call(this, j, this.className))
  2615. })
  2616. }
  2617. if (proceed) {
  2618. classes = (value || "").match(core_rnotwhite) || [];
  2619. for (; i < len; i++) {
  2620. elem = this[i];
  2621. cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(
  2622. rclass, " ") : " ");
  2623. if (cur) {
  2624. j = 0;
  2625. while (clazz = classes[j++]) {
  2626. if (cur.indexOf(" " + clazz + " ") < 0) {
  2627. cur += clazz + " "
  2628. }
  2629. }
  2630. elem.className = jQuery.trim(cur)
  2631. }
  2632. }
  2633. }
  2634. return this
  2635. },
  2636. removeClass: function(value) {
  2637. var classes, elem, cur, clazz, j, i = 0,
  2638. len = this.length,
  2639. proceed = arguments.length === 0 || typeof value === "string" && value;
  2640. if (jQuery.isFunction(value)) {
  2641. return this.each(function(j) {
  2642. jQuery(this).removeClass(value.call(this, j, this.className))
  2643. })
  2644. }
  2645. if (proceed) {
  2646. classes = (value || "").match(core_rnotwhite) || [];
  2647. for (; i < len; i++) {
  2648. elem = this[i];
  2649. cur = elem.nodeType === 1 && (elem.className ? (" " + elem.className + " ").replace(
  2650. rclass, " ") : "");
  2651. if (cur) {
  2652. j = 0;
  2653. while (clazz = classes[j++]) {
  2654. while (cur.indexOf(" " + clazz + " ") >= 0) {
  2655. cur = cur.replace(
  2656. " " + clazz + " ", " ")
  2657. }
  2658. }
  2659. elem.className = value ? jQuery.trim(cur) : ""
  2660. }
  2661. }
  2662. }
  2663. return this
  2664. },
  2665. toggleClass: function(value, stateVal) {
  2666. var type = typeof value;
  2667. if (typeof stateVal === "boolean" && type === "string") {
  2668. return stateVal ? this.addClass(value) : this.removeClass(value)
  2669. }
  2670. if (jQuery.isFunction(value)) {
  2671. return this.each(function(i) {
  2672. jQuery(this).toggleClass(value.call(this, i, this.className, stateVal),
  2673. stateVal)
  2674. })
  2675. }
  2676. return this.each(function() {
  2677. if (type === "string") {
  2678. var className, i = 0,
  2679. self = jQuery(this),
  2680. classNames = value.match(
  2681. core_rnotwhite) || [];
  2682. while (className = classNames[i++]) {
  2683. if (self.hasClass(className)) {
  2684. self.removeClass(className)
  2685. } else {
  2686. self.addClass(className)
  2687. }
  2688. }
  2689. } else if (type === core_strundefined || type === "boolean") {
  2690. if (this.className) {
  2691. jQuery._data(this, "__className__", this.className)
  2692. }
  2693. this.className = this.className || value === false ? "" : jQuery._data(this,
  2694. "__className__") || ""
  2695. }
  2696. })
  2697. },
  2698. hasClass: function(selector) {
  2699. var className = " " + selector + " ",
  2700. i = 0,
  2701. l = this.length;
  2702. for (; i < l; i++) {
  2703. if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ")
  2704. .indexOf(className) >= 0) {
  2705. return true
  2706. }
  2707. }
  2708. return false
  2709. },
  2710. val: function(value) {
  2711. var ret, hooks, isFunction, elem = this[0];
  2712. if (!arguments.length) {
  2713. if (elem) {
  2714. hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
  2715. if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
  2716. return ret
  2717. }
  2718. ret = elem.value;
  2719. return typeof ret === "string" ? ret.replace(rreturn, "") : ret == null ? "" : ret
  2720. }
  2721. return
  2722. }
  2723. isFunction = jQuery.isFunction(value);
  2724. return this.each(function(i) {
  2725. var val;
  2726. if (
  2727. this.nodeType !== 1) {
  2728. return
  2729. }
  2730. if (isFunction) {
  2731. val = value.call(this, i, jQuery(this).val())
  2732. } else {
  2733. val = value
  2734. }
  2735. if (val == null) {
  2736. val = ""
  2737. } else if (typeof val === "number") {
  2738. val += ""
  2739. } else if (jQuery.isArray(val)) {
  2740. val = jQuery.map(val, function(value) {
  2741. return value == null ? "" : value + ""
  2742. })
  2743. }
  2744. hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName
  2745. .toLowerCase()];
  2746. if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") ===
  2747. undefined) {
  2748. this.value = val
  2749. }
  2750. })
  2751. }
  2752. });
  2753. jQuery.extend({
  2754. valHooks: {
  2755. option: {
  2756. get: function(elem) {
  2757. var val = jQuery.find.attr(elem, "value");
  2758. return val != null ? val : elem.text
  2759. }
  2760. },
  2761. select: {
  2762. get: function(elem) {
  2763. var value, option, options = elem.options,
  2764. index = elem.selectedIndex,
  2765. one = elem.type === "select-one" || index < 0,
  2766. values = one ? null : [],
  2767. max = one ? index + 1 : options.length,
  2768. i = index < 0 ? max : one ? index : 0;
  2769. for (; i < max; i++) {
  2770. option = options[i];
  2771. if ((option.selected || i === index) && (jQuery.support.optDisabled ? !option
  2772. .disabled : option.getAttribute("disabled") === null) && (!option
  2773. .parentNode.disabled || !jQuery.nodeName(option.parentNode,
  2774. "optgroup"))) {
  2775. value = jQuery(option).val();
  2776. if (one) {
  2777. return value
  2778. }
  2779. values.push(value)
  2780. }
  2781. }
  2782. return values
  2783. },
  2784. set: function(elem, value) {
  2785. var optionSet, option, options = elem.options,
  2786. values = jQuery.makeArray(value),
  2787. i = options.length;
  2788. while (i--) {
  2789. option = options[i];
  2790. if (option.selected = jQuery.inArray(jQuery(option).val(), values) >= 0) {
  2791. optionSet = true
  2792. }
  2793. }
  2794. if (!optionSet) {
  2795. elem.selectedIndex = -1
  2796. }
  2797. return values
  2798. }
  2799. }
  2800. },
  2801. attr: function(elem, name, value) {
  2802. var hooks, ret, nType = elem.nodeType;
  2803. if (!elem || nType === 3 || nType === 8 || nType === 2) {
  2804. return
  2805. }
  2806. if (
  2807. typeof elem.getAttribute === core_strundefined) {
  2808. return jQuery.prop(elem, name, value)
  2809. }
  2810. if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
  2811. name = name.toLowerCase();
  2812. hooks = jQuery.attrHooks[name] || (jQuery.expr.match.bool.test(name) ? boolHook :
  2813. nodeHook)
  2814. }
  2815. if (value !== undefined) {
  2816. if (value === null) {
  2817. jQuery.removeAttr(elem, name)
  2818. } else if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !==
  2819. undefined) {
  2820. return ret
  2821. } else {
  2822. elem.setAttribute(name, value + "");
  2823. return value
  2824. }
  2825. } else if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
  2826. return ret
  2827. } else {
  2828. ret = jQuery.find.attr(elem, name);
  2829. return ret == null ? undefined : ret
  2830. }
  2831. },
  2832. removeAttr: function(elem, value) {
  2833. var name, propName, i = 0,
  2834. attrNames = value && value.match(core_rnotwhite);
  2835. if (attrNames && elem.nodeType === 1) {
  2836. while (name = attrNames[i++]) {
  2837. propName = jQuery.propFix[name] || name;
  2838. if (jQuery.expr.match.bool.test(name)) {
  2839. if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
  2840. elem[propName] = false
  2841. } else {
  2842. elem[jQuery.camelCase("default-" + name)] = elem[propName] = false
  2843. }
  2844. } else {
  2845. jQuery.attr(elem, name, "")
  2846. }
  2847. elem.removeAttribute(getSetAttribute ? name : propName)
  2848. }
  2849. }
  2850. },
  2851. attrHooks: {
  2852. type: {
  2853. set: function(elem, value) {
  2854. if (!jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem,
  2855. "input")) {
  2856. var val = elem.value;
  2857. elem.setAttribute("type", value);
  2858. if (val) {
  2859. elem.value = val
  2860. }
  2861. return value
  2862. }
  2863. }
  2864. }
  2865. },
  2866. propFix: {
  2867. "for": "htmlFor",
  2868. "class": "className"
  2869. },
  2870. prop: function(elem, name, value) {
  2871. var ret, hooks, notxml, nType = elem.nodeType;
  2872. if (!elem || nType === 3 || nType === 8 || nType === 2) {
  2873. return
  2874. }
  2875. notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
  2876. if (notxml) {
  2877. name = jQuery.propFix[name] || name;
  2878. hooks = jQuery.propHooks[name]
  2879. }
  2880. if (value !== undefined) {
  2881. return hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined ?
  2882. ret : elem[name] = value
  2883. } else {
  2884. return hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null ? ret : elem[
  2885. name]
  2886. }
  2887. },
  2888. propHooks: {
  2889. tabIndex: {
  2890. get: function(elem) {
  2891. var tabindex = jQuery.find.attr(elem, "tabindex");
  2892. return tabindex ? parseInt(tabindex, 10) : rfocusable.test(elem.nodeName) ||
  2893. rclickable.test(elem.nodeName) && elem.href ? 0 : -1
  2894. }
  2895. }
  2896. }
  2897. });
  2898. boolHook = {
  2899. set: function(elem,
  2900. value, name) {
  2901. if (value === false) {
  2902. jQuery.removeAttr(elem, name)
  2903. } else if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
  2904. elem.setAttribute(!getSetAttribute && jQuery.propFix[name] || name, name)
  2905. } else {
  2906. elem[jQuery.camelCase("default-" + name)] = elem[name] = true
  2907. }
  2908. return name
  2909. }
  2910. };
  2911. jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(i, name) {
  2912. var getter = jQuery.expr.attrHandle[name] || jQuery.find.attr;
  2913. jQuery.expr.attrHandle[name] = getSetInput && getSetAttribute || !ruseDefault.test(name) ? function(
  2914. elem, name,
  2915. isXML) {
  2916. var fn = jQuery.expr.attrHandle[name],
  2917. ret = isXML ? undefined : (jQuery.expr.attrHandle[name] = undefined) != getter(elem,
  2918. name, isXML) ? name.toLowerCase() : null;
  2919. jQuery.expr.attrHandle[name] = fn;
  2920. return ret
  2921. } : function(elem, name, isXML) {
  2922. return isXML ? undefined : elem[jQuery.camelCase("default-" + name)] ? name.toLowerCase() :
  2923. null
  2924. }
  2925. });
  2926. if (!getSetInput || !getSetAttribute) {
  2927. jQuery.attrHooks.value = {
  2928. set: function(elem, value, name) {
  2929. if (jQuery.nodeName(elem, "input")) {
  2930. elem.defaultValue = value
  2931. } else {
  2932. return nodeHook && nodeHook.set(elem,
  2933. value, name)
  2934. }
  2935. }
  2936. }
  2937. }
  2938. if (!getSetAttribute) {
  2939. nodeHook = {
  2940. set: function(elem, value, name) {
  2941. var ret = elem.getAttributeNode(name);
  2942. if (!ret) {
  2943. elem.setAttributeNode(ret = elem.ownerDocument.createAttribute(name))
  2944. }
  2945. ret.value = value += "";
  2946. return name === "value" || value === elem.getAttribute(name) ? value : undefined
  2947. }
  2948. };
  2949. jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = function(elem,
  2950. name, isXML) {
  2951. var ret;
  2952. return isXML ? undefined : (ret = elem.getAttributeNode(name)) && ret.value !== "" ? ret.value :
  2953. null
  2954. };
  2955. jQuery.valHooks.button = {
  2956. get: function(elem, name) {
  2957. var ret = elem.getAttributeNode(name);
  2958. return ret && ret.specified ? ret.value : undefined
  2959. },
  2960. set: nodeHook.set
  2961. };
  2962. jQuery.attrHooks.contenteditable = {
  2963. set: function(elem, value, name) {
  2964. nodeHook.set(elem, value === "" ? false : value, name)
  2965. }
  2966. };
  2967. jQuery.each(["width", "height"], function(i, name) {
  2968. jQuery.attrHooks[name] = {
  2969. set: function(elem, value) {
  2970. if (value === "") {
  2971. elem.setAttribute(name, "auto");
  2972. return value
  2973. }
  2974. }
  2975. }
  2976. })
  2977. }
  2978. if (!jQuery.support.hrefNormalized) {
  2979. jQuery.each(["href", "src"], function(i,
  2980. name) {
  2981. jQuery.propHooks[name] = {
  2982. get: function(elem) {
  2983. return elem.getAttribute(name, 4)
  2984. }
  2985. }
  2986. })
  2987. }
  2988. if (!jQuery.support.style) {
  2989. jQuery.attrHooks.style = {
  2990. get: function(elem) {
  2991. return elem.style.cssText || undefined
  2992. },
  2993. set: function(elem, value) {
  2994. return elem.style.cssText = value + ""
  2995. }
  2996. }
  2997. }
  2998. if (!jQuery.support.optSelected) {
  2999. jQuery.propHooks.selected = {
  3000. get: function(elem) {
  3001. var parent = elem.parentNode;
  3002. if (parent) {
  3003. parent.selectedIndex;
  3004. if (parent.parentNode) {
  3005. parent.parentNode.selectedIndex
  3006. }
  3007. }
  3008. return null
  3009. }
  3010. }
  3011. }
  3012. jQuery.each(["tabIndex", "readOnly",
  3013. "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder",
  3014. "contentEditable"
  3015. ], function() {
  3016. jQuery.propFix[this.toLowerCase()] = this
  3017. });
  3018. if (!jQuery.support.enctype) {
  3019. jQuery.propFix.enctype = "encoding"
  3020. }
  3021. jQuery.each(["radio", "checkbox"], function() {
  3022. jQuery.valHooks[this] = {
  3023. set: function(elem, value) {
  3024. if (jQuery.isArray(value)) {
  3025. return elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0
  3026. }
  3027. }
  3028. };
  3029. if (!jQuery.support.checkOn) {
  3030. jQuery.valHooks[this].get = function(elem) {
  3031. return elem.getAttribute(
  3032. "value") === null ? "on" : elem.value
  3033. }
  3034. }
  3035. });
  3036. var rformElems = /^(?:input|select|textarea)$/i,
  3037. rkeyEvent = /^key/,
  3038. rmouseEvent = /^(?:mouse|contextmenu)|click/,
  3039. rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
  3040. rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
  3041. function returnTrue() {
  3042. return true
  3043. }
  3044. function returnFalse() {
  3045. return false
  3046. }
  3047. function safeActiveElement() {
  3048. try {
  3049. return document.activeElement
  3050. } catch (err) {}
  3051. }
  3052. jQuery.event = {
  3053. global: {},
  3054. add: function(elem, types, handler, data, selector) {
  3055. var tmp, events, t, handleObjIn, special, eventHandle,
  3056. handleObj, handlers, type, namespaces, origType, elemData = jQuery._data(elem);
  3057. if (!elemData) {
  3058. return
  3059. }
  3060. if (handler.handler) {
  3061. handleObjIn = handler;
  3062. handler = handleObjIn.handler;
  3063. selector = handleObjIn.selector
  3064. }
  3065. if (!handler.guid) {
  3066. handler.guid = jQuery.guid++
  3067. }
  3068. if (!(events = elemData.events)) {
  3069. events = elemData.events = {}
  3070. }
  3071. if (!(eventHandle = elemData.handle)) {
  3072. eventHandle = elemData.handle = function(e) {
  3073. return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e
  3074. .type) ? jQuery.event.dispatch.apply(eventHandle.elem,
  3075. arguments) : undefined
  3076. };
  3077. eventHandle.elem = elem
  3078. }
  3079. types = (types || "").match(core_rnotwhite) || [""];
  3080. t = types.length;
  3081. while (t--) {
  3082. tmp = rtypenamespace.exec(types[t]) || [];
  3083. type = origType = tmp[1];
  3084. namespaces = (tmp[2] || "").split(".").sort();
  3085. if (!type) {
  3086. continue
  3087. }
  3088. special = jQuery.event.special[type] || {};
  3089. type = (selector ? special.delegateType : special.bindType) || type;
  3090. special = jQuery.event.special[type] || {};
  3091. handleObj = jQuery.extend({
  3092. type: type,
  3093. origType: origType,
  3094. data: data,
  3095. handler: handler,
  3096. guid: handler.guid,
  3097. selector: selector,
  3098. needsContext: selector && jQuery.expr.match.needsContext.test(selector),
  3099. namespace: namespaces.join(".")
  3100. }, handleObjIn);
  3101. if (!(handlers = events[type])) {
  3102. handlers = events[type] = [];
  3103. handlers.delegateCount = 0;
  3104. if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) ===
  3105. false) {
  3106. if (elem.addEventListener) {
  3107. elem.addEventListener(type, eventHandle, false)
  3108. } else if (elem.attachEvent) {
  3109. elem.attachEvent("on" + type, eventHandle)
  3110. }
  3111. }
  3112. }
  3113. if (special.add) {
  3114. special.add.call(elem, handleObj);
  3115. if (!handleObj.handler.guid) {
  3116. handleObj.handler.guid = handler.guid
  3117. }
  3118. }
  3119. if (selector) {
  3120. handlers.splice(handlers.delegateCount++, 0, handleObj)
  3121. } else {
  3122. handlers.push(handleObj)
  3123. }
  3124. jQuery.event.global[type] = true
  3125. }
  3126. elem = null
  3127. },
  3128. remove: function(elem, types, handler, selector, mappedTypes) {
  3129. var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType,
  3130. elemData = jQuery.hasData(elem) && jQuery._data(elem);
  3131. if (!elemData || !(events = elemData.events)) {
  3132. return
  3133. }
  3134. types = (types || "").match(core_rnotwhite) || [""];
  3135. t = types.length;
  3136. while (t--) {
  3137. tmp = rtypenamespace.exec(types[t]) || [];
  3138. type = origType = tmp[1];
  3139. namespaces = (tmp[2] || "").split(".").sort();
  3140. if (!type) {
  3141. for (type in events) {
  3142. jQuery.event.remove(elem, type + types[t], handler, selector, true)
  3143. }
  3144. continue
  3145. }
  3146. special = jQuery.event.special[type] || {};
  3147. type = (selector ? special.delegateType : special.bindType) || type;
  3148. handlers = events[type] || [];
  3149. tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
  3150. origCount = j = handlers.length;
  3151. while (j--) {
  3152. handleObj = handlers[j];
  3153. if ((
  3154. mappedTypes || origType === handleObj.origType) && (!handler || handler.guid ===
  3155. handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector ||
  3156. selector === handleObj.selector || selector === "**" && handleObj.selector)) {
  3157. handlers.splice(j, 1);
  3158. if (handleObj.selector) {
  3159. handlers.delegateCount--
  3160. }
  3161. if (special.remove) {
  3162. special.remove.call(elem, handleObj)
  3163. }
  3164. }
  3165. }
  3166. if (origCount && !handlers.length) {
  3167. if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) ===
  3168. false) {
  3169. jQuery.removeEvent(elem, type, elemData.handle)
  3170. }
  3171. delete events[type]
  3172. }
  3173. }
  3174. if (jQuery.isEmptyObject(events)) {
  3175. delete elemData.handle;
  3176. jQuery._removeData(elem, "events")
  3177. }
  3178. },
  3179. trigger: function(event, data, elem, onlyHandlers) {
  3180. var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [elem || document],
  3181. type = core_hasOwn.call(event, "type") ? event.type : event,
  3182. namespaces = core_hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
  3183. cur = tmp = elem = elem || document;
  3184. if (elem.nodeType === 3 || elem.nodeType === 8) {
  3185. return
  3186. }
  3187. if (rfocusMorph.test(type + jQuery.event.triggered)) {
  3188. return
  3189. }
  3190. if (
  3191. type.indexOf(".") >= 0) {
  3192. namespaces = type.split(".");
  3193. type = namespaces.shift();
  3194. namespaces.sort()
  3195. }
  3196. ontype = type.indexOf(":") < 0 && "on" + type;
  3197. event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" &&
  3198. event);
  3199. event.isTrigger = onlyHandlers ? 2 : 3;
  3200. event.namespace = namespaces.join(".");
  3201. event.namespace_re = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") +
  3202. "(\\.|$)") : null;
  3203. event.result = undefined;
  3204. if (!event.target) {
  3205. event.target = elem
  3206. }
  3207. data = data == null ? [event] : jQuery.makeArray(data, [
  3208. event
  3209. ]);
  3210. special = jQuery.event.special[type] || {};
  3211. if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
  3212. return
  3213. }
  3214. if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
  3215. bubbleType = special.delegateType || type;
  3216. if (!rfocusMorph.test(bubbleType + type)) {
  3217. cur = cur.parentNode
  3218. }
  3219. for (; cur; cur = cur.parentNode) {
  3220. eventPath.push(cur);
  3221. tmp = cur
  3222. }
  3223. if (tmp === (elem.ownerDocument || document)) {
  3224. eventPath.push(tmp.defaultView || tmp.parentWindow || window)
  3225. }
  3226. }
  3227. i = 0;
  3228. while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
  3229. event.type = i > 1 ? bubbleType : special.bindType || type;
  3230. handle = (jQuery._data(cur, "events") || {})[event.type] && jQuery._data(cur, "handle");
  3231. if (handle) {
  3232. handle.apply(cur, data)
  3233. }
  3234. handle = ontype && cur[ontype];
  3235. if (handle && jQuery.acceptData(cur) && handle.apply && handle.apply(cur, data) === false) {
  3236. event.preventDefault()
  3237. }
  3238. }
  3239. event.type = type;
  3240. if (!onlyHandlers && !event.isDefaultPrevented()) {
  3241. if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && jQuery
  3242. .acceptData(elem)) {
  3243. if (
  3244. ontype && elem[type] && !jQuery.isWindow(elem)) {
  3245. tmp = elem[ontype];
  3246. if (tmp) {
  3247. elem[ontype] = null
  3248. }
  3249. jQuery.event.triggered = type;
  3250. try {
  3251. elem[type]()
  3252. } catch (e) {}
  3253. jQuery.event.triggered = undefined;
  3254. if (tmp) {
  3255. elem[ontype] = tmp
  3256. }
  3257. }
  3258. }
  3259. }
  3260. return event.result
  3261. },
  3262. dispatch: function(event) {
  3263. event = jQuery.event.fix(event);
  3264. var i, ret, handleObj, matched, j, handlerQueue = [],
  3265. args = core_slice.call(arguments),
  3266. handlers = (jQuery._data(this, "events") || {})[event.type] || [],
  3267. special = jQuery.event.special[event.type] || {};
  3268. args[0] = event;
  3269. event.delegateTarget = this;
  3270. if (special.preDispatch && special.preDispatch.call(this, event) === false) {
  3271. return
  3272. }
  3273. handlerQueue = jQuery.event.handlers.call(this, event, handlers);
  3274. i = 0;
  3275. while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
  3276. event.currentTarget = matched.elem;
  3277. j = 0;
  3278. while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
  3279. if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) {
  3280. event.handleObj = handleObj;
  3281. event.data = handleObj.data;
  3282. ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler)
  3283. .apply(matched.elem, args);
  3284. if (ret !== undefined) {
  3285. if ((event.result = ret) === false) {
  3286. event.preventDefault();
  3287. event.stopPropagation()
  3288. }
  3289. }
  3290. }
  3291. }
  3292. }
  3293. if (special.postDispatch) {
  3294. special.postDispatch.call(this, event)
  3295. }
  3296. return event.result
  3297. },
  3298. handlers: function(event, handlers) {
  3299. var sel, handleObj, matches, i, handlerQueue = [],
  3300. delegateCount = handlers.delegateCount,
  3301. cur = event.target;
  3302. if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) {
  3303. for (; cur != this; cur = cur.parentNode || this) {
  3304. if (
  3305. cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click")) {
  3306. matches = [];
  3307. for (i = 0; i < delegateCount; i++) {
  3308. handleObj = handlers[i];
  3309. sel = handleObj.selector + " ";
  3310. if (matches[sel] === undefined) {
  3311. matches[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) >= 0 :
  3312. jQuery.find(sel, this, null, [cur]).length
  3313. }
  3314. if (matches[sel]) {
  3315. matches.push(handleObj)
  3316. }
  3317. }
  3318. if (matches.length) {
  3319. handlerQueue.push({
  3320. elem: cur,
  3321. handlers: matches
  3322. })
  3323. }
  3324. }
  3325. }
  3326. }
  3327. if (delegateCount < handlers.length) {
  3328. handlerQueue.push({
  3329. elem: this,
  3330. handlers: handlers.slice(delegateCount)
  3331. })
  3332. }
  3333. return handlerQueue
  3334. },
  3335. fix: function(event) {
  3336. if (event[jQuery.expando]) {
  3337. return event
  3338. }
  3339. var i, prop, copy, type = event.type,
  3340. originalEvent = event,
  3341. fixHook = this.fixHooks[type];
  3342. if (!fixHook) {
  3343. this.fixHooks[type] = fixHook = rmouseEvent.test(type) ? this.mouseHooks : rkeyEvent.test(
  3344. type) ? this.keyHooks : {}
  3345. }
  3346. copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
  3347. event = new jQuery.Event(originalEvent);
  3348. i = copy.length;
  3349. while (i--) {
  3350. prop = copy[i];
  3351. event[prop] = originalEvent[prop]
  3352. }
  3353. if (!event.target) {
  3354. event.target = originalEvent.srcElement || document
  3355. }
  3356. if (event.target.nodeType === 3) {
  3357. event.target = event.target.parentNode
  3358. }
  3359. event.metaKey = !!event.metaKey;
  3360. return fixHook.filter ? fixHook.filter(event, originalEvent) : event
  3361. },
  3362. props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which"
  3363. .split(" "),
  3364. fixHooks: {},
  3365. keyHooks: {
  3366. props: "char charCode key keyCode".split(" "),
  3367. filter: function(event, original) {
  3368. if (event.which == null) {
  3369. event.which = original.charCode != null ? original.charCode : original.keyCode
  3370. }
  3371. return event
  3372. }
  3373. },
  3374. mouseHooks: {
  3375. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement"
  3376. .split(" "),
  3377. filter: function(event, original) {
  3378. var body, eventDoc, doc, button = original.button,
  3379. fromElement = original.fromElement;
  3380. if (event.pageX == null && original.clientX != null) {
  3381. eventDoc = event.target.ownerDocument || document;
  3382. doc = eventDoc.documentElement;
  3383. body = eventDoc.body;
  3384. event.pageX = original.clientX + (
  3385. doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc
  3386. .clientLeft || body && body.clientLeft || 0);
  3387. event.pageY = original.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
  3388. (doc && doc.clientTop || body && body.clientTop || 0)
  3389. }
  3390. if (!event.relatedTarget && fromElement) {
  3391. event.relatedTarget = fromElement === event.target ? original.toElement : fromElement
  3392. }
  3393. if (!event.which && button !== undefined) {
  3394. event.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0
  3395. }
  3396. return event
  3397. }
  3398. },
  3399. special: {
  3400. load: {
  3401. noBubble: true
  3402. },
  3403. focus: {
  3404. trigger: function() {
  3405. if (
  3406. this !== safeActiveElement() && this.focus) {
  3407. try {
  3408. this.focus();
  3409. return false
  3410. } catch (e) {}
  3411. }
  3412. },
  3413. delegateType: "focusin"
  3414. },
  3415. blur: {
  3416. trigger: function() {
  3417. if (this === safeActiveElement() && this.blur) {
  3418. this.blur();
  3419. return false
  3420. }
  3421. },
  3422. delegateType: "focusout"
  3423. },
  3424. click: {
  3425. trigger: function() {
  3426. if (jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) {
  3427. this.click();
  3428. return false
  3429. }
  3430. },
  3431. _default: function(event) {
  3432. return jQuery.nodeName(event.target, "a")
  3433. }
  3434. },
  3435. beforeunload: {
  3436. postDispatch: function(event) {
  3437. if (event.result !== undefined) {
  3438. event.originalEvent.returnValue = event.result
  3439. }
  3440. }
  3441. }
  3442. },
  3443. simulate: function(type, elem, event, bubble) {
  3444. var e = jQuery.extend(new jQuery.Event, event, {
  3445. type: type,
  3446. isSimulated: true,
  3447. originalEvent: {}
  3448. });
  3449. if (bubble) {
  3450. jQuery.event.trigger(e, null, elem)
  3451. } else {
  3452. jQuery.event.dispatch.call(elem, e)
  3453. }
  3454. if (e.isDefaultPrevented()) {
  3455. event.preventDefault()
  3456. }
  3457. }
  3458. };
  3459. jQuery.removeEvent = document.removeEventListener ? function(elem, type, handle) {
  3460. if (elem.removeEventListener) {
  3461. elem.removeEventListener(type, handle, false)
  3462. }
  3463. } : function(elem, type, handle) {
  3464. var name = "on" + type;
  3465. if (elem.detachEvent) {
  3466. if (typeof elem[name] === core_strundefined) {
  3467. elem[name] = null
  3468. }
  3469. elem.detachEvent(name, handle)
  3470. }
  3471. };
  3472. jQuery.Event = function(src, props) {
  3473. if (!(this instanceof jQuery.Event)) {
  3474. return new jQuery.Event(src, props)
  3475. }
  3476. if (src && src.type) {
  3477. this.originalEvent = src;
  3478. this.type = src.type;
  3479. this.isDefaultPrevented = src.defaultPrevented || src.returnValue === false || src
  3480. .getPreventDefault && src.getPreventDefault() ? returnTrue : returnFalse
  3481. } else {
  3482. this.type = src
  3483. }
  3484. if (props) {
  3485. jQuery.extend(this, props)
  3486. }
  3487. this.timeStamp = src && src.timeStamp || jQuery.now();
  3488. this[jQuery.expando] = true
  3489. };
  3490. jQuery.Event.prototype = {
  3491. isDefaultPrevented: returnFalse,
  3492. isPropagationStopped: returnFalse,
  3493. isImmediatePropagationStopped: returnFalse,
  3494. preventDefault: function() {
  3495. var e = this.originalEvent;
  3496. this.isDefaultPrevented = returnTrue;
  3497. if (!e) {
  3498. return
  3499. }
  3500. if (e.preventDefault) {
  3501. e.preventDefault()
  3502. } else {
  3503. e.returnValue = false
  3504. }
  3505. },
  3506. stopPropagation: function() {
  3507. var e = this.originalEvent;
  3508. this.isPropagationStopped = returnTrue;
  3509. if (!e) {
  3510. return
  3511. }
  3512. if (e.stopPropagation) {
  3513. e.stopPropagation()
  3514. }
  3515. e.cancelBubble = true
  3516. },
  3517. stopImmediatePropagation: function() {
  3518. this.isImmediatePropagationStopped = returnTrue;
  3519. this.stopPropagation()
  3520. }
  3521. };
  3522. jQuery.each({
  3523. mouseenter: "mouseover",
  3524. mouseleave: "mouseout"
  3525. }, function(orig, fix) {
  3526. jQuery.event.special[orig] = {
  3527. delegateType: fix,
  3528. bindType: fix,
  3529. handle: function(event) {
  3530. var ret, target = this,
  3531. related = event.relatedTarget,
  3532. handleObj = event.handleObj;
  3533. if (!related || related !== target && !jQuery.contains(target, related)) {
  3534. event.type = handleObj.origType;
  3535. ret = handleObj.handler.apply(this, arguments);
  3536. event.type = fix
  3537. }
  3538. return ret
  3539. }
  3540. }
  3541. });
  3542. if (!jQuery.support.submitBubbles) {
  3543. jQuery.event.special.submit = {
  3544. setup: function() {
  3545. if (jQuery.nodeName(this, "form")) {
  3546. return false
  3547. }
  3548. jQuery.event.add(this, "click._submit keypress._submit", function(e) {
  3549. var elem = e.target,
  3550. form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ?
  3551. elem.form : undefined;
  3552. if (form && !jQuery._data(form, "submitBubbles")) {
  3553. jQuery.event.add(form, "submit._submit", function(event) {
  3554. event._submit_bubble = true
  3555. });
  3556. jQuery._data(form, "submitBubbles", true)
  3557. }
  3558. })
  3559. },
  3560. postDispatch: function(event) {
  3561. if (event._submit_bubble) {
  3562. delete event._submit_bubble;
  3563. if (this.parentNode && !event.isTrigger) {
  3564. jQuery.event.simulate("submit", this.parentNode, event, true)
  3565. }
  3566. }
  3567. },
  3568. teardown: function() {
  3569. if (jQuery.nodeName(this, "form")) {
  3570. return false
  3571. }
  3572. jQuery.event.remove(this, "._submit")
  3573. }
  3574. }
  3575. }
  3576. if (!jQuery.support.changeBubbles) {
  3577. jQuery.event.special.change = {
  3578. setup: function() {
  3579. if (rformElems.test(this.nodeName)) {
  3580. if (this.type === "checkbox" || this.type === "radio") {
  3581. jQuery.event.add(this, "propertychange._change", function(event) {
  3582. if (event.originalEvent.propertyName === "checked") {
  3583. this._just_changed = true
  3584. }
  3585. });
  3586. jQuery.event.add(this, "click._change", function(event) {
  3587. if (this._just_changed && !event.isTrigger) {
  3588. this._just_changed = false
  3589. }
  3590. jQuery.event.simulate("change", this, event, true)
  3591. })
  3592. }
  3593. return false
  3594. }
  3595. jQuery.event.add(this, "beforeactivate._change", function(e) {
  3596. var elem = e.target;
  3597. if (rformElems.test(elem.nodeName) && !jQuery._data(elem, "changeBubbles")) {
  3598. jQuery.event.add(elem,
  3599. "change._change",
  3600. function(event) {
  3601. if (this.parentNode && !event.isSimulated && !event.isTrigger) {
  3602. jQuery.event.simulate("change", this.parentNode, event,
  3603. true)
  3604. }
  3605. });
  3606. jQuery._data(elem, "changeBubbles", true)
  3607. }
  3608. })
  3609. },
  3610. handle: function(event) {
  3611. var elem = event.target;
  3612. if (this !== elem || event.isSimulated || event.isTrigger || elem.type !== "radio" && elem
  3613. .type !== "checkbox") {
  3614. return event.handleObj.handler.apply(this, arguments)
  3615. }
  3616. },
  3617. teardown: function() {
  3618. jQuery.event.remove(this, "._change");
  3619. return !rformElems.test(this.nodeName)
  3620. }
  3621. }
  3622. }
  3623. if (
  3624. !jQuery.support.focusinBubbles) {
  3625. jQuery.each({
  3626. focus: "focusin",
  3627. blur: "focusout"
  3628. }, function(orig, fix) {
  3629. var attaches = 0,
  3630. handler = function(event) {
  3631. jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true)
  3632. };
  3633. jQuery.event.special[fix] = {
  3634. setup: function() {
  3635. if (attaches++ === 0) {
  3636. document.addEventListener(orig, handler, true)
  3637. }
  3638. },
  3639. teardown: function() {
  3640. if (--attaches === 0) {
  3641. document.removeEventListener(orig, handler, true)
  3642. }
  3643. }
  3644. }
  3645. })
  3646. }
  3647. jQuery.fn.extend({
  3648. on: function(types, selector, data, fn, one) {
  3649. var type, origFn;
  3650. if (
  3651. typeof types === "object") {
  3652. if (typeof selector !== "string") {
  3653. data = data || selector;
  3654. selector = undefined
  3655. }
  3656. for (type in types) {
  3657. this.on(type, selector, data, types[type], one)
  3658. }
  3659. return this
  3660. }
  3661. if (data == null && fn == null) {
  3662. fn = selector;
  3663. data = selector = undefined
  3664. } else if (fn == null) {
  3665. if (typeof selector === "string") {
  3666. fn = data;
  3667. data = undefined
  3668. } else {
  3669. fn = data;
  3670. data = selector;
  3671. selector = undefined
  3672. }
  3673. }
  3674. if (fn === false) {
  3675. fn = returnFalse
  3676. } else if (!fn) {
  3677. return this
  3678. }
  3679. if (one === 1) {
  3680. origFn = fn;
  3681. fn = function(event) {
  3682. jQuery().off(event);
  3683. return origFn.apply(this, arguments)
  3684. };
  3685. fn.guid = origFn.guid || (origFn.guid = jQuery.guid++)
  3686. }
  3687. return this.each(function() {
  3688. jQuery.event.add(this, types, fn, data, selector)
  3689. })
  3690. },
  3691. one: function(types, selector, data, fn) {
  3692. return this.on(types, selector, data, fn, 1)
  3693. },
  3694. off: function(types, selector, fn) {
  3695. var handleObj, type;
  3696. if (types && types.preventDefault && types.handleObj) {
  3697. handleObj = types.handleObj;
  3698. jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." +
  3699. handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);
  3700. return this
  3701. }
  3702. if (typeof types === "object") {
  3703. for (type in types) {
  3704. this.off(type, selector, types[type])
  3705. }
  3706. return this
  3707. }
  3708. if (selector === false || typeof selector === "function") {
  3709. fn = selector;
  3710. selector = undefined
  3711. }
  3712. if (fn === false) {
  3713. fn = returnFalse
  3714. }
  3715. return this.each(function() {
  3716. jQuery.event.remove(this, types, fn, selector)
  3717. })
  3718. },
  3719. trigger: function(type, data) {
  3720. return this.each(function() {
  3721. jQuery.event.trigger(type, data, this)
  3722. })
  3723. },
  3724. triggerHandler: function(type, data) {
  3725. var elem = this[0];
  3726. if (elem) {
  3727. return jQuery.event.trigger(type, data, elem, true)
  3728. }
  3729. }
  3730. });
  3731. var isSimple = /^.[^:#\[\.,]*$/,
  3732. rparentsprev = /^(?:parents|prev(?:Until|All))/,
  3733. rneedsContext = jQuery.expr.match.needsContext,
  3734. guaranteedUnique = {
  3735. children: true,
  3736. contents: true,
  3737. next: true,
  3738. prev: true
  3739. };
  3740. jQuery.fn.extend({
  3741. find: function(selector) {
  3742. var i, ret = [],
  3743. self = this,
  3744. len = self.length;
  3745. if (typeof selector !== "string") {
  3746. return this.pushStack(jQuery(selector).filter(function() {
  3747. for (i = 0; i < len; i++) {
  3748. if (jQuery.contains(self[i], this)) {
  3749. return true
  3750. }
  3751. }
  3752. }))
  3753. }
  3754. for (i = 0; i < len; i++) {
  3755. jQuery.find(selector, self[i], ret)
  3756. }
  3757. ret = this.pushStack(
  3758. len > 1 ? jQuery.unique(ret) : ret);
  3759. ret.selector = this.selector ? this.selector + " " + selector : selector;
  3760. return ret
  3761. },
  3762. has: function(target) {
  3763. var i, targets = jQuery(target, this),
  3764. len = targets.length;
  3765. return this.filter(function() {
  3766. for (i = 0; i < len; i++) {
  3767. if (jQuery.contains(this, targets[i])) {
  3768. return true
  3769. }
  3770. }
  3771. })
  3772. },
  3773. not: function(selector) {
  3774. return this.pushStack(winnow(this, selector || [], true))
  3775. },
  3776. filter: function(selector) {
  3777. return this.pushStack(winnow(this, selector || [], false))
  3778. },
  3779. is: function(selector) {
  3780. return !!winnow(this,
  3781. typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) :
  3782. selector || [], false).length
  3783. },
  3784. closest: function(selectors, context) {
  3785. var cur, i = 0,
  3786. l = this.length,
  3787. ret = [],
  3788. pos = rneedsContext.test(selectors) || typeof selectors !== "string" ? jQuery(selectors,
  3789. context || this.context) : 0;
  3790. for (; i < l; i++) {
  3791. for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
  3792. if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : cur.nodeType === 1 && jQuery
  3793. .find.matchesSelector(cur, selectors))) {
  3794. cur = ret.push(cur);
  3795. break
  3796. }
  3797. }
  3798. }
  3799. return this.pushStack(
  3800. ret.length > 1 ? jQuery.unique(ret) : ret)
  3801. },
  3802. index: function(elem) {
  3803. if (!elem) {
  3804. return this[0] && this[0].parentNode ? this.first().prevAll().length : -1
  3805. }
  3806. if (typeof elem === "string") {
  3807. return jQuery.inArray(this[0], jQuery(elem))
  3808. }
  3809. return jQuery.inArray(elem.jquery ? elem[0] : elem, this)
  3810. },
  3811. add: function(selector, context) {
  3812. var set = typeof selector === "string" ? jQuery(selector, context) : jQuery.makeArray(
  3813. selector && selector.nodeType ? [selector] : selector),
  3814. all = jQuery.merge(this.get(), set);
  3815. return this.pushStack(jQuery.unique(all))
  3816. },
  3817. addBack: function(selector) {
  3818. return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector))
  3819. }
  3820. });
  3821. function sibling(cur, dir) {
  3822. do {
  3823. cur = cur[dir]
  3824. } while (cur && cur.nodeType !== 1);
  3825. return cur
  3826. }
  3827. jQuery.each({
  3828. parent: function(elem) {
  3829. var parent = elem.parentNode;
  3830. return parent && parent.nodeType !== 11 ? parent : null
  3831. },
  3832. parents: function(elem) {
  3833. return jQuery.dir(elem, "parentNode")
  3834. },
  3835. parentsUntil: function(elem, i, until) {
  3836. return jQuery.dir(elem, "parentNode", until)
  3837. },
  3838. next: function(elem) {
  3839. return sibling(elem, "nextSibling")
  3840. },
  3841. prev: function(elem) {
  3842. return sibling(elem, "previousSibling")
  3843. },
  3844. nextAll: function(elem) {
  3845. return jQuery.dir(elem, "nextSibling")
  3846. },
  3847. prevAll: function(elem) {
  3848. return jQuery.dir(elem, "previousSibling")
  3849. },
  3850. nextUntil: function(elem, i, until) {
  3851. return jQuery.dir(elem, "nextSibling", until)
  3852. },
  3853. prevUntil: function(elem, i, until) {
  3854. return jQuery.dir(elem, "previousSibling", until)
  3855. },
  3856. siblings: function(elem) {
  3857. return jQuery.sibling((elem.parentNode || {}).firstChild, elem)
  3858. },
  3859. children: function(elem) {
  3860. return jQuery.sibling(elem.firstChild)
  3861. },
  3862. contents: function(elem) {
  3863. return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow
  3864. .document : jQuery.merge([], elem.childNodes)
  3865. }
  3866. }, function(name, fn) {
  3867. jQuery.fn[name] = function(until, selector) {
  3868. var ret = jQuery.map(this, fn, until);
  3869. if (name.slice(-5) !== "Until") {
  3870. selector = until
  3871. }
  3872. if (selector && typeof selector === "string") {
  3873. ret = jQuery.filter(selector, ret)
  3874. }
  3875. if (this.length > 1) {
  3876. if (!guaranteedUnique[name]) {
  3877. ret = jQuery.unique(ret)
  3878. }
  3879. if (rparentsprev.test(name)) {
  3880. ret = ret.reverse()
  3881. }
  3882. }
  3883. return this.pushStack(ret)
  3884. }
  3885. });
  3886. jQuery.extend({
  3887. filter: function(expr, elems, not) {
  3888. var elem = elems[0];
  3889. if (not) {
  3890. expr = ":not(" + expr + ")"
  3891. }
  3892. return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector(elem, expr) ?
  3893. [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(elem) {
  3894. return elem.nodeType === 1
  3895. }))
  3896. },
  3897. dir: function(elem, dir, until) {
  3898. var matched = [],
  3899. cur = elem[dir];
  3900. while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(
  3901. cur).is(until))) {
  3902. if (cur.nodeType === 1) {
  3903. matched.push(cur)
  3904. }
  3905. cur = cur[dir]
  3906. }
  3907. return matched
  3908. },
  3909. sibling: function(n, elem) {
  3910. var r = [];
  3911. for (; n; n = n.nextSibling) {
  3912. if (n.nodeType === 1 && n !== elem) {
  3913. r.push(n)
  3914. }
  3915. }
  3916. return r
  3917. }
  3918. });
  3919. function winnow(elements, qualifier, not) {
  3920. if (jQuery.isFunction(qualifier)) {
  3921. return jQuery.grep(elements, function(elem, i) {
  3922. return !!qualifier.call(elem, i, elem) !== not
  3923. })
  3924. }
  3925. if (qualifier.nodeType) {
  3926. return jQuery.grep(elements, function(elem) {
  3927. return elem === qualifier !== not
  3928. })
  3929. }
  3930. if (typeof qualifier === "string") {
  3931. if (isSimple.test(qualifier)) {
  3932. return jQuery.filter(qualifier, elements, not)
  3933. }
  3934. qualifier = jQuery.filter(
  3935. qualifier, elements)
  3936. }
  3937. return jQuery.grep(elements, function(elem) {
  3938. return jQuery.inArray(elem, qualifier) >= 0 !== not
  3939. })
  3940. }
  3941. function createSafeFragment(document) {
  3942. var list = nodeNames.split("|"),
  3943. safeFrag = document.createDocumentFragment();
  3944. if (safeFrag.createElement) {
  3945. while (list.length) {
  3946. safeFrag.createElement(list.pop())
  3947. }
  3948. }
  3949. return safeFrag
  3950. }
  3951. var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
  3952. "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
  3953. rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
  3954. rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
  3955. rleadingWhitespace = /^\s+/,
  3956. rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
  3957. rtagName = /<([\w:]+)/,
  3958. rtbody = /<tbody/i,
  3959. rhtml = /<|&#?\w+;/,
  3960. rnoInnerhtml = /<(?:script|style|link)/i,
  3961. manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
  3962. rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
  3963. rscriptType = /^$|\/(?:java|ecma)script/i,
  3964. rscriptTypeMasked = /^true\/(.*)/,
  3965. rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
  3966. wrapMap = {
  3967. option: [1, "<select multiple='multiple'>", "</select>"],
  3968. legend: [1, "<fieldset>", "</fieldset>"],
  3969. area: [1, "<map>", "</map>"],
  3970. param: [1, "<object>", "</object>"],
  3971. thead: [1, "<table>", "</table>"],
  3972. tr: [2, "<table><tbody>", "</tbody></table>"],
  3973. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  3974. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  3975. _default: jQuery.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
  3976. },
  3977. safeFragment = createSafeFragment(document),
  3978. fragmentDiv = safeFragment.appendChild(document.createElement("div"));
  3979. wrapMap.optgroup = wrapMap.option;
  3980. wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  3981. wrapMap.th = wrapMap.td;
  3982. jQuery.fn.extend({
  3983. text: function(value) {
  3984. return jQuery.access(this, function(value) {
  3985. return value === undefined ? jQuery.text(this) : this.empty().append((this[0] &&
  3986. this[0].ownerDocument || document).createTextNode(value))
  3987. }, null, value, arguments.length)
  3988. },
  3989. append: function() {
  3990. return this.domManip(arguments, function(elem) {
  3991. if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  3992. var target = manipulationTarget(this, elem);
  3993. target.appendChild(elem)
  3994. }
  3995. })
  3996. },
  3997. prepend: function() {
  3998. return this.domManip(arguments, function(elem) {
  3999. if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
  4000. var target = manipulationTarget(this, elem);
  4001. target.insertBefore(elem, target.firstChild)
  4002. }
  4003. })
  4004. },
  4005. before: function() {
  4006. return this.domManip(arguments, function(elem) {
  4007. if (this.parentNode) {
  4008. this.parentNode.insertBefore(elem, this)
  4009. }
  4010. })
  4011. },
  4012. after: function() {
  4013. return this.domManip(arguments, function(elem) {
  4014. if (this.parentNode) {
  4015. this.parentNode.insertBefore(elem, this.nextSibling)
  4016. }
  4017. })
  4018. },
  4019. remove: function(selector, keepData) {
  4020. var elem, elems = selector ? jQuery.filter(selector, this) : this,
  4021. i = 0;
  4022. for (;
  4023. (elem = elems[i]) != null; i++) {
  4024. if (!keepData && elem.nodeType === 1) {
  4025. jQuery.cleanData(getAll(elem))
  4026. }
  4027. if (elem.parentNode) {
  4028. if (keepData && jQuery.contains(elem.ownerDocument, elem)) {
  4029. setGlobalEval(getAll(elem, "script"))
  4030. }
  4031. elem.parentNode.removeChild(elem)
  4032. }
  4033. }
  4034. return this
  4035. },
  4036. empty: function() {
  4037. var elem, i = 0;
  4038. for (;
  4039. (elem = this[i]) != null; i++) {
  4040. if (elem.nodeType === 1) {
  4041. jQuery.cleanData(getAll(elem, false))
  4042. }
  4043. while (elem.firstChild) {
  4044. elem.removeChild(elem.firstChild)
  4045. }
  4046. if (elem.options && jQuery.nodeName(elem, "select")) {
  4047. elem.options.length = 0
  4048. }
  4049. }
  4050. return this
  4051. },
  4052. clone: function(dataAndEvents, deepDataAndEvents) {
  4053. dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
  4054. deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
  4055. return this.map(function() {
  4056. return jQuery.clone(this, dataAndEvents, deepDataAndEvents)
  4057. })
  4058. },
  4059. html: function(value) {
  4060. return jQuery.access(this, function(value) {
  4061. var elem = this[0] || {},
  4062. i = 0,
  4063. l = this.length;
  4064. if (value === undefined) {
  4065. return elem.nodeType === 1 ? elem.innerHTML.replace(rinlinejQuery, "") :
  4066. undefined
  4067. }
  4068. if (typeof value === "string" && !rnoInnerhtml.test(value) && (jQuery.support
  4069. .htmlSerialize || !rnoshimcache.test(value)) && (jQuery.support
  4070. .leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(
  4071. rtagName.exec(
  4072. value) || ["", ""])[1].toLowerCase()]) {
  4073. value = value.replace(rxhtmlTag, "<$1></$2>");
  4074. try {
  4075. for (; i < l; i++) {
  4076. elem = this[i] || {};
  4077. if (elem.nodeType === 1) {
  4078. jQuery.cleanData(getAll(elem, false));
  4079. elem.innerHTML = value
  4080. }
  4081. }
  4082. elem = 0
  4083. } catch (e) {}
  4084. }
  4085. if (elem) {
  4086. this.empty().append(value)
  4087. }
  4088. }, null, value, arguments.length)
  4089. },
  4090. replaceWith: function() {
  4091. var args = jQuery.map(this, function(elem) {
  4092. return [elem.nextSibling, elem.parentNode]
  4093. }),
  4094. i = 0;
  4095. this.domManip(arguments, function(elem) {
  4096. var next = args[i++],
  4097. parent = args[i++];
  4098. if (parent) {
  4099. if (
  4100. next && next.parentNode !== parent) {
  4101. next = this.nextSibling
  4102. }
  4103. jQuery(this).remove();
  4104. parent.insertBefore(elem, next)
  4105. }
  4106. }, true);
  4107. return i ? this : this.remove()
  4108. },
  4109. detach: function(selector) {
  4110. return this.remove(selector, true)
  4111. },
  4112. domManip: function(args, callback, allowIntersection) {
  4113. args = core_concat.apply([], args);
  4114. var first, node, hasScripts, scripts, doc, fragment, i = 0,
  4115. l = this.length,
  4116. set = this,
  4117. iNoClone = l - 1,
  4118. value = args[0],
  4119. isFunction = jQuery.isFunction(value);
  4120. if (isFunction || !(
  4121. l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test(
  4122. value))) {
  4123. return this.each(function(index) {
  4124. var self = set.eq(index);
  4125. if (isFunction) {
  4126. args[0] = value.call(this, index, self.html())
  4127. }
  4128. self.domManip(args, callback, allowIntersection)
  4129. })
  4130. }
  4131. if (l) {
  4132. fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, !
  4133. allowIntersection && this);
  4134. first = fragment.firstChild;
  4135. if (fragment.childNodes.length === 1) {
  4136. fragment = first
  4137. }
  4138. if (first) {
  4139. scripts = jQuery.map(getAll(fragment, "script"), disableScript);
  4140. hasScripts = scripts.length;
  4141. for (; i < l; i++) {
  4142. node = fragment;
  4143. if (i !== iNoClone) {
  4144. node = jQuery.clone(node, true, true);
  4145. if (hasScripts) {
  4146. jQuery.merge(scripts, getAll(node, "script"))
  4147. }
  4148. }
  4149. callback.call(this[i], node, i)
  4150. }
  4151. if (hasScripts) {
  4152. doc = scripts[scripts.length - 1].ownerDocument;
  4153. jQuery.map(scripts, restoreScript);
  4154. for (i = 0; i < hasScripts; i++) {
  4155. node = scripts[i];
  4156. if (rscriptType.test(node.type || "") && !jQuery._data(node,
  4157. "globalEval") && jQuery.contains(doc, node)) {
  4158. if (node.src) {
  4159. jQuery._evalUrl(node.src)
  4160. } else {
  4161. jQuery.globalEval((
  4162. node.text || node.textContent || node.innerHTML || "")
  4163. .replace(rcleanScript, ""))
  4164. }
  4165. }
  4166. }
  4167. }
  4168. fragment = first = null
  4169. }
  4170. }
  4171. return this
  4172. }
  4173. });
  4174. function manipulationTarget(elem, content) {
  4175. return jQuery.nodeName(elem, "table") && jQuery.nodeName(content.nodeType === 1 ? content : content
  4176. .firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument
  4177. .createElement("tbody")) : elem
  4178. }
  4179. function disableScript(elem) {
  4180. elem.type = (jQuery.find.attr(elem, "type") !== null) + "/" + elem.type;
  4181. return elem
  4182. }
  4183. function restoreScript(elem) {
  4184. var match = rscriptTypeMasked.exec(elem.type);
  4185. if (match) {
  4186. elem.type = match[1]
  4187. } else {
  4188. elem.removeAttribute("type")
  4189. }
  4190. return elem
  4191. }
  4192. function setGlobalEval(elems, refElements) {
  4193. var elem, i = 0;
  4194. for (;
  4195. (elem = elems[i]) != null; i++) {
  4196. jQuery._data(elem, "globalEval", !refElements || jQuery._data(refElements[i], "globalEval"))
  4197. }
  4198. }
  4199. function cloneCopyEvent(src, dest) {
  4200. if (dest.nodeType !== 1 || !jQuery.hasData(src)) {
  4201. return
  4202. }
  4203. var type, i, l, oldData = jQuery._data(src),
  4204. curData = jQuery._data(dest, oldData),
  4205. events = oldData.events;
  4206. if (events) {
  4207. delete curData.handle;
  4208. curData.events = {};
  4209. for (type in events) {
  4210. for (i = 0, l = events[type].length; i < l; i++) {
  4211. jQuery.event.add(dest, type, events[type][i])
  4212. }
  4213. }
  4214. }
  4215. if (curData.data) {
  4216. curData.data = jQuery.extend({}, curData.data)
  4217. }
  4218. }
  4219. function fixCloneNodeIssues(src, dest) {
  4220. var nodeName, e, data;
  4221. if (dest.nodeType !== 1) {
  4222. return
  4223. }
  4224. nodeName = dest.nodeName.toLowerCase();
  4225. if (!jQuery.support.noCloneEvent && dest[jQuery.expando]) {
  4226. data = jQuery._data(dest);
  4227. for (e in data.events) {
  4228. jQuery.removeEvent(dest, e, data.handle)
  4229. }
  4230. dest.removeAttribute(
  4231. jQuery.expando)
  4232. }
  4233. if (nodeName === "script" && dest.text !== src.text) {
  4234. disableScript(dest).text = src.text;
  4235. restoreScript(dest)
  4236. } else if (nodeName === "object") {
  4237. if (dest.parentNode) {
  4238. dest.outerHTML = src.outerHTML
  4239. }
  4240. if (jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML))) {
  4241. dest.innerHTML = src.innerHTML
  4242. }
  4243. } else if (nodeName === "input" && manipulation_rcheckableType.test(src.type)) {
  4244. dest.defaultChecked = dest.checked = src.checked;
  4245. if (dest.value !== src.value) {
  4246. dest.value = src.value
  4247. }
  4248. } else if (nodeName === "option") {
  4249. dest.defaultSelected = dest.selected = src.defaultSelected
  4250. } else if (nodeName === "input" || nodeName === "textarea") {
  4251. dest.defaultValue = src.defaultValue
  4252. }
  4253. }
  4254. jQuery.each({
  4255. appendTo: "append",
  4256. prependTo: "prepend",
  4257. insertBefore: "before",
  4258. insertAfter: "after",
  4259. replaceAll: "replaceWith"
  4260. }, function(name, original) {
  4261. jQuery.fn[name] = function(selector) {
  4262. var elems, i = 0,
  4263. ret = [],
  4264. insert = jQuery(selector),
  4265. last = insert.length - 1;
  4266. for (; i <= last; i++) {
  4267. elems = i === last ? this : this.clone(true);
  4268. jQuery(insert[i])[original](elems);
  4269. core_push.apply(ret,
  4270. elems.get())
  4271. }
  4272. return this.pushStack(ret)
  4273. }
  4274. });
  4275. function getAll(context, tag) {
  4276. var elems, elem, i = 0,
  4277. found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName(tag ||
  4278. "*") : typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll(tag ||
  4279. "*") : undefined;
  4280. if (!found) {
  4281. for (found = [], elems = context.childNodes || context;
  4282. (elem = elems[i]) != null; i++) {
  4283. if (!tag || jQuery.nodeName(elem, tag)) {
  4284. found.push(elem)
  4285. } else {
  4286. jQuery.merge(found, getAll(elem, tag))
  4287. }
  4288. }
  4289. }
  4290. return tag === undefined || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], found) : found
  4291. }
  4292. function fixDefaultChecked(elem) {
  4293. if (manipulation_rcheckableType.test(elem.type)) {
  4294. elem.defaultChecked = elem.checked
  4295. }
  4296. }
  4297. jQuery.extend({
  4298. clone: function(elem, dataAndEvents, deepDataAndEvents) {
  4299. var destElements, node, clone, i, srcElements, inPage = jQuery.contains(elem.ownerDocument,
  4300. elem);
  4301. if (jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test("<" + elem
  4302. .nodeName + ">")) {
  4303. clone = elem.cloneNode(true)
  4304. } else {
  4305. fragmentDiv.innerHTML = elem.outerHTML;
  4306. fragmentDiv.removeChild(clone = fragmentDiv.firstChild)
  4307. }
  4308. if ((!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType ===
  4309. 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
  4310. destElements = getAll(clone);
  4311. srcElements = getAll(elem);
  4312. for (i = 0;
  4313. (node = srcElements[i]) != null; ++i) {
  4314. if (destElements[i]) {
  4315. fixCloneNodeIssues(node, destElements[i])
  4316. }
  4317. }
  4318. }
  4319. if (dataAndEvents) {
  4320. if (deepDataAndEvents) {
  4321. srcElements = srcElements || getAll(elem);
  4322. destElements = destElements || getAll(clone);
  4323. for (i = 0;
  4324. (node = srcElements[i]) != null; i++) {
  4325. cloneCopyEvent(node, destElements[i])
  4326. }
  4327. } else {
  4328. cloneCopyEvent(elem, clone)
  4329. }
  4330. }
  4331. destElements = getAll(clone, "script");
  4332. if (destElements.length > 0) {
  4333. setGlobalEval(destElements, !inPage && getAll(elem, "script"))
  4334. }
  4335. destElements = srcElements = node = null;
  4336. return clone
  4337. },
  4338. buildFragment: function(elems, context, scripts, selection) {
  4339. var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length,
  4340. safe = createSafeFragment(context),
  4341. nodes = [],
  4342. i = 0;
  4343. for (; i < l; i++) {
  4344. elem = elems[i];
  4345. if (elem || elem === 0) {
  4346. if (
  4347. jQuery.type(elem) === "object") {
  4348. jQuery.merge(nodes, elem.nodeType ? [elem] : elem)
  4349. } else if (!rhtml.test(elem)) {
  4350. nodes.push(context.createTextNode(elem))
  4351. } else {
  4352. tmp = tmp || safe.appendChild(context.createElement("div"));
  4353. tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
  4354. wrap = wrapMap[tag] || wrapMap._default;
  4355. tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2];
  4356. j = wrap[0];
  4357. while (j--) {
  4358. tmp = tmp.lastChild
  4359. }
  4360. if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
  4361. nodes.push(
  4362. context.createTextNode(rleadingWhitespace.exec(elem)[0]))
  4363. }
  4364. if (!jQuery.support.tbody) {
  4365. elem = tag === "table" && !rtbody.test(elem) ? tmp.firstChild : wrap[1] ===
  4366. "<table>" && !rtbody.test(elem) ? tmp : 0;
  4367. j = elem && elem.childNodes.length;
  4368. while (j--) {
  4369. if (jQuery.nodeName(tbody = elem.childNodes[j], "tbody") && !tbody
  4370. .childNodes.length) {
  4371. elem.removeChild(tbody)
  4372. }
  4373. }
  4374. }
  4375. jQuery.merge(nodes, tmp.childNodes);
  4376. tmp.textContent = "";
  4377. while (tmp.firstChild) {
  4378. tmp.removeChild(tmp.firstChild)
  4379. }
  4380. tmp = safe.lastChild
  4381. }
  4382. }
  4383. }
  4384. if (tmp) {
  4385. safe.removeChild(tmp)
  4386. }
  4387. if (
  4388. !jQuery.support.appendChecked) {
  4389. jQuery.grep(getAll(nodes, "input"), fixDefaultChecked)
  4390. }
  4391. i = 0;
  4392. while (elem = nodes[i++]) {
  4393. if (selection && jQuery.inArray(elem, selection) !== -1) {
  4394. continue
  4395. }
  4396. contains = jQuery.contains(elem.ownerDocument, elem);
  4397. tmp = getAll(safe.appendChild(elem), "script");
  4398. if (contains) {
  4399. setGlobalEval(tmp)
  4400. }
  4401. if (scripts) {
  4402. j = 0;
  4403. while (elem = tmp[j++]) {
  4404. if (rscriptType.test(elem.type || "")) {
  4405. scripts.push(elem)
  4406. }
  4407. }
  4408. }
  4409. }
  4410. tmp = null;
  4411. return safe
  4412. },
  4413. cleanData: function(elems, acceptData) {
  4414. var elem, type, id, data, i = 0,
  4415. internalKey = jQuery.expando,
  4416. cache = jQuery.cache,
  4417. deleteExpando = jQuery.support.deleteExpando,
  4418. special = jQuery.event.special;
  4419. for (;
  4420. (elem = elems[i]) != null; i++) {
  4421. if (acceptData || jQuery.acceptData(elem)) {
  4422. id = elem[internalKey];
  4423. data = id && cache[id];
  4424. if (data) {
  4425. if (data.events) {
  4426. for (type in data.events) {
  4427. if (special[type]) {
  4428. jQuery.event.remove(elem, type)
  4429. } else {
  4430. jQuery.removeEvent(elem, type, data.handle)
  4431. }
  4432. }
  4433. }
  4434. if (cache[id]) {
  4435. delete cache[id];
  4436. if (deleteExpando) {
  4437. delete elem[internalKey]
  4438. } else if (
  4439. typeof elem.removeAttribute !== core_strundefined) {
  4440. elem.removeAttribute(internalKey)
  4441. } else {
  4442. elem[internalKey] = null
  4443. }
  4444. core_deletedIds.push(id)
  4445. }
  4446. }
  4447. }
  4448. }
  4449. },
  4450. _evalUrl: function(url) {
  4451. return jQuery.ajax({
  4452. url: url,
  4453. type: "GET",
  4454. dataType: "script",
  4455. async: false,
  4456. global: false,
  4457. "throws": true
  4458. })
  4459. }
  4460. });
  4461. jQuery.fn.extend({
  4462. wrapAll: function(html) {
  4463. if (jQuery.isFunction(html)) {
  4464. return this.each(function(i) {
  4465. jQuery(this).wrapAll(html.call(this, i))
  4466. })
  4467. }
  4468. if (this[0]) {
  4469. var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
  4470. if (this[0].parentNode) {
  4471. wrap.insertBefore(this[0])
  4472. }
  4473. wrap.map(function() {
  4474. var elem = this;
  4475. while (elem.firstChild && elem.firstChild.nodeType === 1) {
  4476. elem = elem.firstChild
  4477. }
  4478. return elem
  4479. }).append(this)
  4480. }
  4481. return this
  4482. },
  4483. wrapInner: function(html) {
  4484. if (jQuery.isFunction(html)) {
  4485. return this.each(function(i) {
  4486. jQuery(this).wrapInner(html.call(this, i))
  4487. })
  4488. }
  4489. return this.each(function() {
  4490. var self = jQuery(this),
  4491. contents = self.contents();
  4492. if (contents.length) {
  4493. contents.wrapAll(html)
  4494. } else {
  4495. self.append(html)
  4496. }
  4497. })
  4498. },
  4499. wrap: function(html) {
  4500. var isFunction = jQuery.isFunction(html);
  4501. return this.each(function(i) {
  4502. jQuery(this).wrapAll(isFunction ? html.call(this, i) : html)
  4503. })
  4504. },
  4505. unwrap: function() {
  4506. return this.parent().each(function() {
  4507. if (!jQuery.nodeName(this, "body")) {
  4508. jQuery(this).replaceWith(this.childNodes)
  4509. }
  4510. }).end()
  4511. }
  4512. });
  4513. var iframe, getStyles, curCSS, ralpha = /alpha\([^)]*\)/i,
  4514. ropacity = /opacity\s*=\s*([^)]*)/,
  4515. rposition = /^(top|right|bottom|left)$/,
  4516. rdisplayswap = /^(none|table(?!-c[ea]).+)/,
  4517. rmargin = /^margin/,
  4518. rnumsplit = new RegExp("^(" + core_pnum + ")(.*)$",
  4519. "i"),
  4520. rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i"),
  4521. rrelNum = new RegExp("^([+-])=(" + core_pnum + ")", "i"),
  4522. elemdisplay = {
  4523. BODY: "block"
  4524. },
  4525. cssShow = {
  4526. position: "absolute",
  4527. visibility: "hidden",
  4528. display: "block"
  4529. },
  4530. cssNormalTransform = {
  4531. letterSpacing: 0,
  4532. fontWeight: 400
  4533. },
  4534. cssExpand = ["Top", "Right", "Bottom", "Left"],
  4535. cssPrefixes = ["Webkit", "O", "Moz", "ms"];
  4536. function vendorPropName(style, name) {
  4537. if (name in style) {
  4538. return name
  4539. }
  4540. var capName = name.charAt(0).toUpperCase() + name.slice(1),
  4541. origName = name,
  4542. i = cssPrefixes.length;
  4543. while (i--) {
  4544. name = cssPrefixes[i] + capName;
  4545. if (name in style) {
  4546. return name
  4547. }
  4548. }
  4549. return origName
  4550. }
  4551. function isHidden(elem, el) {
  4552. elem = el || elem;
  4553. return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem)
  4554. }
  4555. function showHide(elements, show) {
  4556. var display, elem, hidden, values = [],
  4557. index = 0,
  4558. length = elements.length;
  4559. for (; index < length; index++) {
  4560. elem = elements[index];
  4561. if (!elem.style) {
  4562. continue
  4563. }
  4564. values[index] = jQuery._data(elem, "olddisplay");
  4565. display = elem.style.display;
  4566. if (show) {
  4567. if (
  4568. !values[index] && display === "none") {
  4569. elem.style.display = ""
  4570. }
  4571. if (elem.style.display === "" && isHidden(elem)) {
  4572. values[index] = jQuery._data(elem, "olddisplay", css_defaultDisplay(elem.nodeName))
  4573. }
  4574. } else {
  4575. if (!values[index]) {
  4576. hidden = isHidden(elem);
  4577. if (display && display !== "none" || !hidden) {
  4578. jQuery._data(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display"))
  4579. }
  4580. }
  4581. }
  4582. }
  4583. for (index = 0; index < length; index++) {
  4584. elem = elements[index];
  4585. if (!elem.style) {
  4586. continue
  4587. }
  4588. if (!show || elem.style.display === "none" || elem.style.display === "") {
  4589. elem.style.display = show ? values[index] || "" : "none"
  4590. }
  4591. }
  4592. return elements
  4593. }
  4594. jQuery.fn.extend({
  4595. css: function(name, value) {
  4596. return jQuery.access(this, function(elem, name, value) {
  4597. var len, styles, map = {},
  4598. i = 0;
  4599. if (jQuery.isArray(name)) {
  4600. styles = getStyles(elem);
  4601. len = name.length;
  4602. for (; i < len; i++) {
  4603. map[name[i]] = jQuery.css(elem, name[i], false, styles)
  4604. }
  4605. return map
  4606. }
  4607. return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem,
  4608. name)
  4609. }, name, value, arguments.length > 1)
  4610. },
  4611. show: function() {
  4612. return showHide(this, true)
  4613. },
  4614. hide: function() {
  4615. return showHide(this)
  4616. },
  4617. toggle: function(state) {
  4618. if (typeof state === "boolean") {
  4619. return state ? this.show() : this.hide()
  4620. }
  4621. return this.each(function() {
  4622. if (isHidden(this)) {
  4623. jQuery(this).show()
  4624. } else {
  4625. jQuery(this).hide()
  4626. }
  4627. })
  4628. }
  4629. });
  4630. jQuery.extend({
  4631. cssHooks: {
  4632. opacity: {
  4633. get: function(elem, computed) {
  4634. if (computed) {
  4635. var ret = curCSS(elem, "opacity");
  4636. return ret === "" ? "1" : ret
  4637. }
  4638. }
  4639. }
  4640. },
  4641. cssNumber: {
  4642. columnCount: true,
  4643. fillOpacity: true,
  4644. fontWeight: true,
  4645. lineHeight: true,
  4646. opacity: true,
  4647. order: true,
  4648. orphans: true,
  4649. widows: true,
  4650. zIndex: true,
  4651. zoom: true
  4652. },
  4653. cssProps: {
  4654. "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
  4655. },
  4656. style: function(elem, name, value, extra) {
  4657. if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
  4658. return
  4659. }
  4660. var ret, type, hooks, origName = jQuery.camelCase(name),
  4661. style = elem.style;
  4662. name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(style,
  4663. origName));
  4664. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  4665. if (value !== undefined) {
  4666. type = typeof value;
  4667. if (type === "string" && (ret = rrelNum.exec(value))) {
  4668. value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name));
  4669. type = "number"
  4670. }
  4671. if (value == null || type === "number" && isNaN(value)) {
  4672. return
  4673. }
  4674. if (type === "number" && !jQuery.cssNumber[origName]) {
  4675. value += "px"
  4676. }
  4677. if (!jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") ===
  4678. 0) {
  4679. style[name] = "inherit"
  4680. }
  4681. if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !==
  4682. undefined) {
  4683. try {
  4684. style[name] = value
  4685. } catch (e) {}
  4686. }
  4687. } else {
  4688. if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
  4689. return ret
  4690. }
  4691. return style[name]
  4692. }
  4693. },
  4694. css: function(elem, name, extra, styles) {
  4695. var num, val, hooks, origName = jQuery.camelCase(name);
  4696. name = jQuery.cssProps[origName] || (jQuery.cssProps[origName] = vendorPropName(elem.style,
  4697. origName));
  4698. hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
  4699. if (hooks && "get" in hooks) {
  4700. val = hooks.get(elem, true, extra)
  4701. }
  4702. if (val === undefined) {
  4703. val = curCSS(elem, name, styles)
  4704. }
  4705. if (val === "normal" && name in cssNormalTransform) {
  4706. val = cssNormalTransform[name]
  4707. }
  4708. if (extra === "" || extra) {
  4709. num = parseFloat(val);
  4710. return extra === true || jQuery.isNumeric(
  4711. num) ? num || 0 : val
  4712. }
  4713. return val
  4714. }
  4715. });
  4716. if (window.getComputedStyle) {
  4717. getStyles = function(elem) {
  4718. return window.getComputedStyle(elem, null)
  4719. };
  4720. curCSS = function(elem, name, _computed) {
  4721. var width, minWidth, maxWidth, computed = _computed || getStyles(elem),
  4722. ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined,
  4723. style = elem.style;
  4724. if (computed) {
  4725. if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
  4726. ret = jQuery.style(elem, name)
  4727. }
  4728. if (rnumnonpx.test(ret) && rmargin.test(name)) {
  4729. width = style.width;
  4730. minWidth = style.minWidth;
  4731. maxWidth = style.maxWidth;
  4732. style.minWidth = style.maxWidth = style.width = ret;
  4733. ret = computed.width;
  4734. style.width = width;
  4735. style.minWidth = minWidth;
  4736. style.maxWidth = maxWidth
  4737. }
  4738. }
  4739. return ret
  4740. }
  4741. } else if (document.documentElement.currentStyle) {
  4742. getStyles = function(elem) {
  4743. return elem.currentStyle
  4744. };
  4745. curCSS = function(elem, name, _computed) {
  4746. var left, rs, rsLeft, computed = _computed || getStyles(elem),
  4747. ret = computed ? computed[name] : undefined,
  4748. style = elem.style;
  4749. if (ret == null && style && style[name]) {
  4750. ret = style[name]
  4751. }
  4752. if (rnumnonpx.test(ret) && !rposition.test(name)) {
  4753. left = style.left;
  4754. rs = elem.runtimeStyle;
  4755. rsLeft = rs && rs.left;
  4756. if (rsLeft) {
  4757. rs.left = elem.currentStyle.left
  4758. }
  4759. style.left = name === "fontSize" ? "1em" : ret;
  4760. ret = style.pixelLeft + "px";
  4761. style.left = left;
  4762. if (rsLeft) {
  4763. rs.left = rsLeft
  4764. }
  4765. }
  4766. return ret === "" ? "auto" : ret
  4767. }
  4768. }
  4769. function setPositiveNumber(elem, value, subtract) {
  4770. var matches = rnumsplit.exec(value);
  4771. return matches ? Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || "px") : value
  4772. }
  4773. function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
  4774. var i = extra === (
  4775. isBorderBox ? "border" : "content") ? 4 : name === "width" ? 1 : 0,
  4776. val = 0;
  4777. for (; i < 4; i += 2) {
  4778. if (extra === "margin") {
  4779. val += jQuery.css(elem, extra + cssExpand[i], true, styles)
  4780. }
  4781. if (isBorderBox) {
  4782. if (extra === "content") {
  4783. val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles)
  4784. }
  4785. if (extra !== "margin") {
  4786. val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles)
  4787. }
  4788. } else {
  4789. val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  4790. if (extra !== "padding") {
  4791. val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles)
  4792. }
  4793. }
  4794. }
  4795. return val
  4796. }
  4797. function getWidthOrHeight(elem, name, extra) {
  4798. var valueIsBorderBox = true,
  4799. val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
  4800. styles = getStyles(elem),
  4801. isBorderBox = jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box";
  4802. if (val <= 0 || val == null) {
  4803. val = curCSS(elem, name, styles);
  4804. if (val < 0 || val == null) {
  4805. val = elem.style[name]
  4806. }
  4807. if (rnumnonpx.test(val)) {
  4808. return val
  4809. }
  4810. valueIsBorderBox = isBorderBox && (jQuery.support.boxSizingReliable || val === elem.style[name]);
  4811. val = parseFloat(val) || 0
  4812. }
  4813. return val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"),
  4814. valueIsBorderBox, styles) + "px"
  4815. }
  4816. function css_defaultDisplay(nodeName) {
  4817. var doc = document,
  4818. display = elemdisplay[nodeName];
  4819. if (!display) {
  4820. display = actualDisplay(nodeName, doc);
  4821. if (display === "none" || !display) {
  4822. iframe = (iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText",
  4823. "display:block !important")).appendTo(doc.documentElement);
  4824. doc = (iframe[0].contentWindow || iframe[0].contentDocument).document;
  4825. doc.write(
  4826. "<!doctype html><html><body>");
  4827. doc.close();
  4828. display = actualDisplay(nodeName, doc);
  4829. iframe.detach()
  4830. }
  4831. elemdisplay[nodeName] = display
  4832. }
  4833. return display
  4834. }
  4835. function actualDisplay(name, doc) {
  4836. var elem = jQuery(doc.createElement(name)).appendTo(doc.body),
  4837. display = jQuery.css(elem[0], "display");
  4838. elem.remove();
  4839. return display
  4840. }
  4841. jQuery.each(["height", "width"], function(i, name) {
  4842. jQuery.cssHooks[name] = {
  4843. get: function(elem, computed, extra) {
  4844. if (computed) {
  4845. return elem.offsetWidth === 0 && rdisplayswap.test(jQuery.css(elem,
  4846. "display")) ? jQuery.swap(elem, cssShow, function() {
  4847. return getWidthOrHeight(elem, name, extra)
  4848. }) : getWidthOrHeight(elem, name, extra)
  4849. }
  4850. },
  4851. set: function(elem, value, extra) {
  4852. var styles = extra && getStyles(elem);
  4853. return setPositiveNumber(elem, value, extra ? augmentWidthOrHeight(elem, name,
  4854. extra, jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false,
  4855. styles) === "border-box", styles) : 0)
  4856. }
  4857. }
  4858. });
  4859. if (!jQuery.support.opacity) {
  4860. jQuery.cssHooks.opacity = {
  4861. get: function(elem, computed) {
  4862. return ropacity.test((
  4863. computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) ||
  4864. "") ? .01 * parseFloat(RegExp.$1) + "" : computed ? "1" : ""
  4865. },
  4866. set: function(elem, value) {
  4867. var style = elem.style,
  4868. currentStyle = elem.currentStyle,
  4869. opacity = jQuery.isNumeric(value) ? "alpha(opacity=" + value * 100 + ")" : "",
  4870. filter = currentStyle && currentStyle.filter || style.filter || "";
  4871. style.zoom = 1;
  4872. if ((value >= 1 || value === "") && jQuery.trim(filter.replace(ralpha, "")) === "" && style
  4873. .removeAttribute) {
  4874. style.removeAttribute("filter");
  4875. if (
  4876. value === "" || currentStyle && !currentStyle.filter) {
  4877. return
  4878. }
  4879. }
  4880. style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : filter + " " +
  4881. opacity
  4882. }
  4883. }
  4884. }
  4885. jQuery(function() {
  4886. if (!jQuery.support.reliableMarginRight) {
  4887. jQuery.cssHooks.marginRight = {
  4888. get: function(elem, computed) {
  4889. if (computed) {
  4890. return jQuery.swap(elem, {
  4891. display: "inline-block"
  4892. }, curCSS, [elem, "marginRight"])
  4893. }
  4894. }
  4895. }
  4896. }
  4897. if (!jQuery.support.pixelPosition && jQuery.fn.position) {
  4898. jQuery.each(["top", "left"], function(i, prop) {
  4899. jQuery.cssHooks[prop] = {
  4900. get: function(elem, computed) {
  4901. if (computed) {
  4902. computed = curCSS(elem, prop);
  4903. return rnumnonpx.test(computed) ? jQuery(elem).position()[
  4904. prop] + "px" : computed
  4905. }
  4906. }
  4907. }
  4908. })
  4909. }
  4910. });
  4911. if (jQuery.expr && jQuery.expr.filters) {
  4912. jQuery.expr.filters.hidden = function(elem) {
  4913. return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || !jQuery.support.reliableHiddenOffsets && (
  4914. elem.style && elem.style.display || jQuery.css(elem, "display")) === "none"
  4915. };
  4916. jQuery.expr.filters.visible = function(elem) {
  4917. return !jQuery.expr.filters.hidden(elem)
  4918. }
  4919. }
  4920. jQuery.each({
  4921. margin: "",
  4922. padding: "",
  4923. border: "Width"
  4924. },
  4925. function(prefix, suffix) {
  4926. jQuery.cssHooks[prefix + suffix] = {
  4927. expand: function(value) {
  4928. var i = 0,
  4929. expanded = {},
  4930. parts = typeof value === "string" ? value.split(" ") : [value];
  4931. for (; i < 4; i++) {
  4932. expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]
  4933. }
  4934. return expanded
  4935. }
  4936. };
  4937. if (!rmargin.test(prefix)) {
  4938. jQuery.cssHooks[prefix + suffix].set = setPositiveNumber
  4939. }
  4940. });
  4941. var r20 = /%20/g,
  4942. rbracket = /\[\]$/,
  4943. rCRLF = /\r?\n/g,
  4944. rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
  4945. rsubmittable = /^(?:input|select|textarea|keygen)/i;
  4946. jQuery.fn.extend({
  4947. serialize: function() {
  4948. return jQuery.param(this.serializeArray())
  4949. },
  4950. serializeArray: function() {
  4951. return this.map(function() {
  4952. var elements = jQuery.prop(this, "elements");
  4953. return elements ? jQuery.makeArray(elements) : this
  4954. }).filter(function() {
  4955. var type = this.type;
  4956. return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this
  4957. .nodeName) && !rsubmitterTypes.test(type) && (this.checked || !
  4958. manipulation_rcheckableType.test(type))
  4959. }).map(function(i, elem) {
  4960. var val = jQuery(this).val();
  4961. return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function(
  4962. val) {
  4963. return {
  4964. name: elem.name,
  4965. value: val.replace(rCRLF, "\r\n")
  4966. }
  4967. }) : {
  4968. name: elem.name,
  4969. value: val.replace(rCRLF, "\r\n")
  4970. }
  4971. }).get()
  4972. }
  4973. });
  4974. jQuery.param = function(a, traditional) {
  4975. var prefix, s = [],
  4976. add = function(key, value) {
  4977. value = jQuery.isFunction(value) ? value() : value == null ? "" : value;
  4978. s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value)
  4979. };
  4980. if (traditional === undefined) {
  4981. traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional
  4982. }
  4983. if (
  4984. jQuery.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
  4985. jQuery.each(a, function() {
  4986. add(this.name, this.value)
  4987. })
  4988. } else {
  4989. for (prefix in a) {
  4990. buildParams(prefix, a[prefix], traditional, add)
  4991. }
  4992. }
  4993. return s.join("&").replace(r20, "+")
  4994. };
  4995. function buildParams(prefix, obj, traditional, add) {
  4996. var name;
  4997. if (jQuery.isArray(obj)) {
  4998. jQuery.each(obj, function(i, v) {
  4999. if (traditional || rbracket.test(prefix)) {
  5000. add(prefix, v)
  5001. } else {
  5002. buildParams(prefix + "[" + (typeof v === "object" ? i : "") + "]", v, traditional, add)
  5003. }
  5004. })
  5005. } else if (!traditional && jQuery.type(obj) === "object") {
  5006. for (name in obj) {
  5007. buildParams(prefix + "[" + name + "]", obj[name], traditional, add)
  5008. }
  5009. } else {
  5010. add(prefix, obj)
  5011. }
  5012. }
  5013. jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " +
  5014. "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
  5015. "change select submit keydown keypress keyup error contextmenu").split(" "), function(i, name) {
  5016. jQuery.fn[name] = function(data, fn) {
  5017. return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name)
  5018. }
  5019. });
  5020. jQuery.fn.extend({
  5021. hover: function(fnOver, fnOut) {
  5022. return this.mouseenter(fnOver).mouseleave(fnOut || fnOver)
  5023. },
  5024. bind: function(types, data, fn) {
  5025. return this.on(types, null, data, fn)
  5026. },
  5027. unbind: function(types, fn) {
  5028. return this.off(types, null, fn)
  5029. },
  5030. delegate: function(selector, types, data, fn) {
  5031. return this.on(types, selector, data, fn)
  5032. },
  5033. undelegate: function(selector, types, fn) {
  5034. return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**",
  5035. fn)
  5036. }
  5037. });
  5038. var ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(),
  5039. ajax_rquery = /\?/,
  5040. rhash = /#.*$/,
  5041. rts = /([?&])_=[^&]*/,
  5042. rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
  5043. rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
  5044. rnoContent = /^(?:GET|HEAD)$/,
  5045. rprotocol = /^\/\//,
  5046. rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
  5047. _load = jQuery.fn.load,
  5048. prefilters = {},
  5049. transports = {},
  5050. allTypes = "*/".concat("*");
  5051. try {
  5052. ajaxLocation = location.href
  5053. } catch (e) {
  5054. ajaxLocation = document.createElement("a");
  5055. ajaxLocation.href = "";
  5056. ajaxLocation = ajaxLocation.href
  5057. }
  5058. ajaxLocParts = rurl.exec(
  5059. ajaxLocation.toLowerCase()) || [];
  5060. function addToPrefiltersOrTransports(structure) {
  5061. return function(dataTypeExpression, func) {
  5062. if (typeof dataTypeExpression !== "string") {
  5063. func = dataTypeExpression;
  5064. dataTypeExpression = "*"
  5065. }
  5066. var dataType, i = 0,
  5067. dataTypes = dataTypeExpression.toLowerCase().match(core_rnotwhite) || [];
  5068. if (jQuery.isFunction(func)) {
  5069. while (dataType = dataTypes[i++]) {
  5070. if (dataType[0] === "+") {
  5071. dataType = dataType.slice(1) || "*";
  5072. (structure[dataType] = structure[dataType] || []).unshift(func)
  5073. } else {
  5074. (
  5075. structure[dataType] = structure[dataType] || []).push(func)
  5076. }
  5077. }
  5078. }
  5079. }
  5080. }
  5081. function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
  5082. var inspected = {},
  5083. seekingTransport = structure === transports;
  5084. function inspect(dataType) {
  5085. var selected;
  5086. inspected[dataType] = true;
  5087. jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) {
  5088. var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
  5089. if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[
  5090. dataTypeOrTransport]) {
  5091. options.dataTypes.unshift(dataTypeOrTransport);
  5092. inspect(dataTypeOrTransport);
  5093. return false
  5094. } else if (seekingTransport) {
  5095. return !(selected = dataTypeOrTransport)
  5096. }
  5097. });
  5098. return selected
  5099. }
  5100. return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*")
  5101. }
  5102. function ajaxExtend(target, src) {
  5103. var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {};
  5104. for (key in src) {
  5105. if (src[key] !== undefined) {
  5106. (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]
  5107. }
  5108. }
  5109. if (deep) {
  5110. jQuery.extend(true, target, deep)
  5111. }
  5112. return target
  5113. }
  5114. jQuery.fn.load = function(url, params, callback) {
  5115. if (typeof url !== "string" && _load) {
  5116. return _load.apply(this, arguments)
  5117. }
  5118. var selector, response, type, self = this,
  5119. off = url.indexOf(" ");
  5120. if (off >= 0) {
  5121. selector = url.slice(off, url.length);
  5122. url = url.slice(0, off)
  5123. }
  5124. if (jQuery.isFunction(params)) {
  5125. callback = params;
  5126. params = undefined
  5127. } else if (params && typeof params === "object") {
  5128. type = "POST"
  5129. }
  5130. if (self.length > 0) {
  5131. jQuery.ajax({
  5132. url: url,
  5133. type: type,
  5134. dataType: "html",
  5135. data: params
  5136. }).done(function(responseText) {
  5137. response = arguments;
  5138. self.html(
  5139. selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(
  5140. selector) : responseText)
  5141. }).complete(callback && function(jqXHR, status) {
  5142. self.each(callback, response || [jqXHR.responseText, status, jqXHR])
  5143. })
  5144. }
  5145. return this
  5146. };
  5147. jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(i,
  5148. type) {
  5149. jQuery.fn[type] = function(fn) {
  5150. return this.on(type, fn)
  5151. }
  5152. });
  5153. jQuery.extend({
  5154. active: 0,
  5155. lastModified: {},
  5156. etag: {},
  5157. ajaxSettings: {
  5158. url: ajaxLocation,
  5159. type: "GET",
  5160. isLocal: rlocalProtocol.test(
  5161. ajaxLocParts[1]),
  5162. global: true,
  5163. processData: true,
  5164. async: true,
  5165. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  5166. accepts: {
  5167. "*": allTypes,
  5168. text: "text/plain",
  5169. html: "text/html",
  5170. xml: "application/xml, text/xml",
  5171. json: "application/json, text/javascript"
  5172. },
  5173. contents: {
  5174. xml: /xml/,
  5175. html: /html/,
  5176. json: /json/
  5177. },
  5178. responseFields: {
  5179. xml: "responseXML",
  5180. text: "responseText",
  5181. json: "responseJSON"
  5182. },
  5183. converters: {
  5184. "* text": String,
  5185. "text html": true,
  5186. "text json": jQuery.parseJSON,
  5187. "text xml": jQuery.parseXML
  5188. },
  5189. flatOptions: {
  5190. url: true,
  5191. context: true
  5192. }
  5193. },
  5194. ajaxSetup: function(target, settings) {
  5195. return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) :
  5196. ajaxExtend(jQuery.ajaxSettings, target)
  5197. },
  5198. ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
  5199. ajaxTransport: addToPrefiltersOrTransports(transports),
  5200. ajax: function(url, options) {
  5201. if (typeof url === "object") {
  5202. options = url;
  5203. url = undefined
  5204. }
  5205. options = options || {};
  5206. var parts, i, cacheURL, responseHeadersString, timeoutTimer, fireGlobals, transport,
  5207. responseHeaders, s = jQuery.ajaxSetup({}, options),
  5208. callbackContext = s.context || s,
  5209. globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ?
  5210. jQuery(callbackContext) : jQuery.event,
  5211. deferred = jQuery.Deferred(),
  5212. completeDeferred = jQuery.Callbacks("once memory"),
  5213. statusCode = s.statusCode || {},
  5214. requestHeaders = {},
  5215. requestHeadersNames = {},
  5216. state = 0,
  5217. strAbort = "canceled",
  5218. jqXHR = {
  5219. readyState: 0,
  5220. getResponseHeader: function(key) {
  5221. var match;
  5222. if (state === 2) {
  5223. if (!responseHeaders) {
  5224. responseHeaders = {};
  5225. while (match = rheaders.exec(responseHeadersString)) {
  5226. responseHeaders[match[1].toLowerCase()] = match[2]
  5227. }
  5228. }
  5229. match = responseHeaders[key.toLowerCase()]
  5230. }
  5231. return match == null ? null : match
  5232. },
  5233. getAllResponseHeaders: function() {
  5234. return state === 2 ? responseHeadersString : null
  5235. },
  5236. setRequestHeader: function(name, value) {
  5237. var lname = name.toLowerCase();
  5238. if (!state) {
  5239. name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
  5240. requestHeaders[name] = value
  5241. }
  5242. return this
  5243. },
  5244. overrideMimeType: function(type) {
  5245. if (!state) {
  5246. s.mimeType = type
  5247. }
  5248. return this
  5249. },
  5250. statusCode: function(map) {
  5251. var code;
  5252. if (map) {
  5253. if (
  5254. state < 2) {
  5255. for (code in map) {
  5256. statusCode[code] = [statusCode[code], map[code]]
  5257. }
  5258. } else {
  5259. jqXHR.always(map[jqXHR.status])
  5260. }
  5261. }
  5262. return this
  5263. },
  5264. abort: function(statusText) {
  5265. var finalText = statusText || strAbort;
  5266. if (transport) {
  5267. transport.abort(finalText)
  5268. }
  5269. done(0, finalText);
  5270. return this
  5271. }
  5272. };
  5273. deferred.promise(jqXHR).complete = completeDeferred.add;
  5274. jqXHR.success = jqXHR.done;
  5275. jqXHR.error = jqXHR.fail;
  5276. s.url = ((url || s.url || ajaxLocation) + "").replace(rhash, "").replace(rprotocol,
  5277. ajaxLocParts[1] + "//");
  5278. s.type = options.method || options.type || s.method || s.type;
  5279. s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(core_rnotwhite) || [""];
  5280. if (s.crossDomain == null) {
  5281. parts = rurl.exec(s.url.toLowerCase());
  5282. s.crossDomain = !!(parts && (parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[
  5283. 2] || (parts[3] || (parts[1] === "http:" ? "80" : "443")) !== (
  5284. ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? "80" : "443"))))
  5285. }
  5286. if (s.data && s.processData && typeof s.data !== "string") {
  5287. s.data = jQuery.param(s.data, s.traditional)
  5288. }
  5289. inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
  5290. if (state === 2) {
  5291. return jqXHR
  5292. }
  5293. fireGlobals = s.global;
  5294. if (fireGlobals && jQuery.active++ === 0) {
  5295. jQuery.event.trigger("ajaxStart")
  5296. }
  5297. s.type = s.type.toUpperCase();
  5298. s.hasContent = !rnoContent.test(s.type);
  5299. cacheURL = s.url;
  5300. if (!s.hasContent) {
  5301. if (s.data) {
  5302. cacheURL = s.url += (ajax_rquery.test(cacheURL) ? "&" : "?") + s.data;
  5303. delete s.data
  5304. }
  5305. if (s.cache === false) {
  5306. s.url = rts.test(cacheURL) ? cacheURL.replace(rts, "$1_=" + ajax_nonce++) :
  5307. cacheURL + (ajax_rquery.test(cacheURL) ? "&" : "?") + "_=" + ajax_nonce++
  5308. }
  5309. }
  5310. if (s.ifModified) {
  5311. if (jQuery.lastModified[cacheURL]) {
  5312. jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL])
  5313. }
  5314. if (jQuery.etag[cacheURL]) {
  5315. jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL])
  5316. }
  5317. }
  5318. if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
  5319. jqXHR.setRequestHeader("Content-Type", s.contentType)
  5320. }
  5321. jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s
  5322. .dataTypes[0]] + (
  5323. s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]);
  5324. for (i in s.headers) {
  5325. jqXHR.setRequestHeader(i, s.headers[i])
  5326. }
  5327. if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || state ===
  5328. 2)) {
  5329. return jqXHR.abort()
  5330. }
  5331. strAbort = "abort";
  5332. for (i in {
  5333. success: 1,
  5334. error: 1,
  5335. complete: 1
  5336. }) {
  5337. jqXHR[i](s[i])
  5338. }
  5339. transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
  5340. if (!transport) {
  5341. done(-1, "No Transport")
  5342. } else {
  5343. jqXHR.readyState = 1;
  5344. if (fireGlobals) {
  5345. globalEventContext.trigger("ajaxSend", [jqXHR, s])
  5346. }
  5347. if (
  5348. s.async && s.timeout > 0) {
  5349. timeoutTimer = setTimeout(function() {
  5350. jqXHR.abort("timeout")
  5351. }, s.timeout)
  5352. }
  5353. try {
  5354. state = 1;
  5355. transport.send(requestHeaders, done)
  5356. } catch (e) {
  5357. if (state < 2) {
  5358. done(-1, e)
  5359. } else {
  5360. throw e
  5361. }
  5362. }
  5363. }
  5364. function done(status, nativeStatusText, responses, headers) {
  5365. var isSuccess, success, error, response, modified, statusText = nativeStatusText;
  5366. if (state === 2) {
  5367. return
  5368. }
  5369. state = 2;
  5370. if (timeoutTimer) {
  5371. clearTimeout(timeoutTimer)
  5372. }
  5373. transport = undefined;
  5374. responseHeadersString = headers || "";
  5375. jqXHR.readyState = status > 0 ? 4 : 0;
  5376. isSuccess = status >= 200 && status < 300 || status === 304;
  5377. if (responses) {
  5378. response = ajaxHandleResponses(s, jqXHR, responses)
  5379. }
  5380. response = ajaxConvert(s, response, jqXHR, isSuccess);
  5381. if (isSuccess) {
  5382. if (s.ifModified) {
  5383. modified = jqXHR.getResponseHeader("Last-Modified");
  5384. if (modified) {
  5385. jQuery.lastModified[cacheURL] = modified
  5386. }
  5387. modified = jqXHR.getResponseHeader("etag");
  5388. if (modified) {
  5389. jQuery.etag[cacheURL] = modified
  5390. }
  5391. }
  5392. if (status === 204 || s.type === "HEAD") {
  5393. statusText = "nocontent"
  5394. } else if (status === 304) {
  5395. statusText = "notmodified"
  5396. } else {
  5397. statusText = response.state;
  5398. success = response.data;
  5399. error = response.error;
  5400. isSuccess = !error
  5401. }
  5402. } else {
  5403. error = statusText;
  5404. if (status || !statusText) {
  5405. statusText = "error";
  5406. if (status < 0) {
  5407. status = 0
  5408. }
  5409. }
  5410. }
  5411. jqXHR.status = status;
  5412. jqXHR.statusText = (nativeStatusText || statusText) + "";
  5413. if (isSuccess) {
  5414. deferred.resolveWith(callbackContext, [success, statusText, jqXHR])
  5415. } else {
  5416. deferred.rejectWith(callbackContext, [jqXHR, statusText, error])
  5417. }
  5418. jqXHR.statusCode(statusCode);
  5419. statusCode = undefined;
  5420. if (fireGlobals) {
  5421. globalEventContext.trigger(
  5422. isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success :
  5423. error
  5424. ])
  5425. }
  5426. completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
  5427. if (fireGlobals) {
  5428. globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
  5429. if (!--jQuery.active) {
  5430. jQuery.event.trigger("ajaxStop")
  5431. }
  5432. }
  5433. }
  5434. return jqXHR
  5435. },
  5436. getJSON: function(url, data, callback) {
  5437. return jQuery.get(url, data, callback, "json")
  5438. },
  5439. getScript: function(url, callback) {
  5440. return jQuery.get(url, undefined, callback, "script")
  5441. }
  5442. });
  5443. jQuery.each(["get", "post"], function(i, method) {
  5444. jQuery[method] = function(url, data, callback, type) {
  5445. if (jQuery.isFunction(data)) {
  5446. type = type || callback;
  5447. callback = data;
  5448. data = undefined
  5449. }
  5450. return jQuery.ajax({
  5451. url: url,
  5452. type: method,
  5453. dataType: type,
  5454. data: data,
  5455. success: callback
  5456. })
  5457. }
  5458. });
  5459. function ajaxHandleResponses(s, jqXHR, responses) {
  5460. var firstDataType, ct, finalDataType, type, contents = s.contents,
  5461. dataTypes = s.dataTypes;
  5462. while (dataTypes[0] === "*") {
  5463. dataTypes.shift();
  5464. if (ct === undefined) {
  5465. ct = s.mimeType || jqXHR.getResponseHeader("Content-Type")
  5466. }
  5467. }
  5468. if (ct) {
  5469. for (type in contents) {
  5470. if (
  5471. contents[type] && contents[type].test(ct)) {
  5472. dataTypes.unshift(type);
  5473. break
  5474. }
  5475. }
  5476. }
  5477. if (dataTypes[0] in responses) {
  5478. finalDataType = dataTypes[0]
  5479. } else {
  5480. for (type in responses) {
  5481. if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
  5482. finalDataType = type;
  5483. break
  5484. }
  5485. if (!firstDataType) {
  5486. firstDataType = type
  5487. }
  5488. }
  5489. finalDataType = finalDataType || firstDataType
  5490. }
  5491. if (finalDataType) {
  5492. if (finalDataType !== dataTypes[0]) {
  5493. dataTypes.unshift(finalDataType)
  5494. }
  5495. return responses[finalDataType]
  5496. }
  5497. }
  5498. function ajaxConvert(s, response, jqXHR, isSuccess) {
  5499. var conv2,
  5500. current, conv, tmp, prev, converters = {},
  5501. dataTypes = s.dataTypes.slice();
  5502. if (dataTypes[1]) {
  5503. for (conv in s.converters) {
  5504. converters[conv.toLowerCase()] = s.converters[conv]
  5505. }
  5506. }
  5507. current = dataTypes.shift();
  5508. while (current) {
  5509. if (s.responseFields[current]) {
  5510. jqXHR[s.responseFields[current]] = response
  5511. }
  5512. if (!prev && isSuccess && s.dataFilter) {
  5513. response = s.dataFilter(response, s.dataType)
  5514. }
  5515. prev = current;
  5516. current = dataTypes.shift();
  5517. if (current) {
  5518. if (current === "*") {
  5519. current = prev
  5520. } else if (prev !== "*" && prev !== current) {
  5521. conv = converters[prev + " " + current] || converters["* " + current];
  5522. if (!conv) {
  5523. for (conv2 in converters) {
  5524. tmp = conv2.split(" ");
  5525. if (tmp[1] === current) {
  5526. conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
  5527. if (conv) {
  5528. if (conv === true) {
  5529. conv = converters[conv2]
  5530. } else if (converters[conv2] !== true) {
  5531. current = tmp[0];
  5532. dataTypes.unshift(tmp[1])
  5533. }
  5534. break
  5535. }
  5536. }
  5537. }
  5538. }
  5539. if (conv !== true) {
  5540. if (conv && s["throws"]) {
  5541. response = conv(response)
  5542. } else {
  5543. try {
  5544. response = conv(response)
  5545. } catch (e) {
  5546. return {
  5547. state: "parsererror",
  5548. error: conv ? e : "No conversion from " + prev + " to " + current
  5549. }
  5550. }
  5551. }
  5552. }
  5553. }
  5554. }
  5555. }
  5556. return {
  5557. state: "success",
  5558. data: response
  5559. }
  5560. }
  5561. jQuery.ajaxSetup({
  5562. accepts: {
  5563. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  5564. },
  5565. contents: {
  5566. script: /(?:java|ecma)script/
  5567. },
  5568. converters: {
  5569. "text script": function(text) {
  5570. jQuery.globalEval(text);
  5571. return text
  5572. }
  5573. }
  5574. });
  5575. jQuery.ajaxPrefilter("script", function(s) {
  5576. if (s.cache === undefined) {
  5577. s.cache = false
  5578. }
  5579. if (s.crossDomain) {
  5580. s.type = "GET";
  5581. s.global = false
  5582. }
  5583. });
  5584. jQuery.ajaxTransport(
  5585. "script",
  5586. function(s) {
  5587. if (s.crossDomain) {
  5588. var script, head = document.head || jQuery("head")[0] || document.documentElement;
  5589. return {
  5590. send: function(_, callback) {
  5591. script = document.createElement("script");
  5592. script.async = true;
  5593. if (s.scriptCharset) {
  5594. script.charset = s.scriptCharset
  5595. }
  5596. script.src = s.url;
  5597. script.onload = script.onreadystatechange = function(_, isAbort) {
  5598. if (isAbort || !script.readyState || /loaded|complete/.test(script
  5599. .readyState)) {
  5600. script.onload = script.onreadystatechange = null;
  5601. if (script.parentNode) {
  5602. script.parentNode.removeChild(script)
  5603. }
  5604. script = null;
  5605. if (!isAbort) {
  5606. callback(200, "success")
  5607. }
  5608. }
  5609. };
  5610. head.insertBefore(script, head.firstChild)
  5611. },
  5612. abort: function() {
  5613. if (script) {
  5614. script.onload(undefined, true)
  5615. }
  5616. }
  5617. }
  5618. }
  5619. });
  5620. var oldCallbacks = [],
  5621. rjsonp = /(=)\?(?=&|$)|\?\?/;
  5622. jQuery.ajaxSetup({
  5623. jsonp: "callback",
  5624. jsonpCallback: function() {
  5625. var callback = oldCallbacks.pop() || jQuery.expando + "_" + ajax_nonce++;
  5626. this[callback] = true;
  5627. return callback
  5628. }
  5629. });
  5630. jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
  5631. var callbackName,
  5632. overwritten, responseContainer, jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" :
  5633. typeof s.data === "string" && !(s.contentType || "").indexOf(
  5634. "application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
  5635. if (jsonProp || s.dataTypes[0] === "jsonp") {
  5636. callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s
  5637. .jsonpCallback;
  5638. if (jsonProp) {
  5639. s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName)
  5640. } else if (s.jsonp !== false) {
  5641. s.url += (ajax_rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName
  5642. }
  5643. s.converters["script json"] = function() {
  5644. if (!responseContainer) {
  5645. jQuery.error(callbackName + " was not called")
  5646. }
  5647. return responseContainer[0]
  5648. };
  5649. s.dataTypes[0] = "json";
  5650. overwritten = window[callbackName];
  5651. window[callbackName] = function() {
  5652. responseContainer = arguments
  5653. };
  5654. jqXHR.always(function() {
  5655. window[callbackName] = overwritten;
  5656. if (s[callbackName]) {
  5657. s.jsonpCallback = originalSettings.jsonpCallback;
  5658. oldCallbacks.push(callbackName)
  5659. }
  5660. if (responseContainer && jQuery.isFunction(overwritten)) {
  5661. overwritten(responseContainer[0])
  5662. }
  5663. responseContainer = overwritten = undefined
  5664. });
  5665. return "script"
  5666. }
  5667. });
  5668. var xhrCallbacks, xhrSupported, xhrId = 0,
  5669. xhrOnUnloadAbort = window.ActiveXObject && function() {
  5670. var key;
  5671. for (key in xhrCallbacks) {
  5672. xhrCallbacks[key](undefined, true)
  5673. }
  5674. };
  5675. function createStandardXHR() {
  5676. try {
  5677. return new window.XMLHttpRequest
  5678. } catch (e) {}
  5679. }
  5680. function createActiveXHR() {
  5681. try {
  5682. return new window.ActiveXObject("Microsoft.XMLHTTP")
  5683. } catch (e) {}
  5684. }
  5685. jQuery.ajaxSettings.xhr = window.ActiveXObject ? function() {
  5686. return !this.isLocal && createStandardXHR() || createActiveXHR()
  5687. } : createStandardXHR;
  5688. xhrSupported = jQuery.ajaxSettings.xhr();
  5689. jQuery.support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
  5690. xhrSupported = jQuery.support.ajax = !!xhrSupported;
  5691. if (xhrSupported) {
  5692. jQuery.ajaxTransport(function(s) {
  5693. if (!s.crossDomain || jQuery.support.cors) {
  5694. var callback;
  5695. return {
  5696. send: function(headers, complete) {
  5697. var handle, i, xhr = s.xhr();
  5698. if (s.username) {
  5699. xhr.open(s.type, s.url, s.async, s.username, s.password)
  5700. } else {
  5701. xhr.open(s.type, s.url,
  5702. s.async)
  5703. }
  5704. if (s.xhrFields) {
  5705. for (i in s.xhrFields) {
  5706. xhr[i] = s.xhrFields[i]
  5707. }
  5708. }
  5709. if (s.mimeType && xhr.overrideMimeType) {
  5710. xhr.overrideMimeType(s.mimeType)
  5711. }
  5712. if (!s.crossDomain && !headers["X-Requested-With"]) {
  5713. headers["X-Requested-With"] = "XMLHttpRequest"
  5714. }
  5715. try {
  5716. for (i in headers) {
  5717. xhr.setRequestHeader(i, headers[i])
  5718. }
  5719. } catch (err) {}
  5720. xhr.send(s.hasContent && s.data || null);
  5721. callback = function(_, isAbort) {
  5722. var status, responseHeaders, statusText, responses;
  5723. try {
  5724. if (callback && (isAbort || xhr.readyState === 4)) {
  5725. callback = undefined;
  5726. if (handle) {
  5727. xhr.onreadystatechange = jQuery.noop;
  5728. if (xhrOnUnloadAbort) {
  5729. delete xhrCallbacks[handle]
  5730. }
  5731. }
  5732. if (isAbort) {
  5733. if (xhr.readyState !== 4) {
  5734. xhr.abort()
  5735. }
  5736. } else {
  5737. responses = {};
  5738. status = xhr.status;
  5739. responseHeaders = xhr.getAllResponseHeaders();
  5740. if (typeof xhr.responseText === "string") {
  5741. responses.text = xhr.responseText
  5742. }
  5743. try {
  5744. statusText = xhr.statusText
  5745. } catch (e) {
  5746. statusText = ""
  5747. }
  5748. if (!status && s.isLocal && !s.crossDomain) {
  5749. status = responses.text ? 200 : 404
  5750. } else if (status === 1223) {
  5751. status = 204
  5752. }
  5753. }
  5754. }
  5755. } catch (firefoxAccessException) {
  5756. if (!isAbort) {
  5757. complete(-1,
  5758. firefoxAccessException)
  5759. }
  5760. }
  5761. if (responses) {
  5762. complete(status, statusText, responses, responseHeaders)
  5763. }
  5764. };
  5765. if (!s.async) {
  5766. callback()
  5767. } else if (xhr.readyState === 4) {
  5768. setTimeout(callback)
  5769. } else {
  5770. handle = ++xhrId;
  5771. if (xhrOnUnloadAbort) {
  5772. if (!xhrCallbacks) {
  5773. xhrCallbacks = {};
  5774. jQuery(window).unload(xhrOnUnloadAbort)
  5775. }
  5776. xhrCallbacks[handle] = callback
  5777. }
  5778. xhr.onreadystatechange = callback
  5779. }
  5780. },
  5781. abort: function() {
  5782. if (callback) {
  5783. callback(undefined, true)
  5784. }
  5785. }
  5786. }
  5787. }
  5788. })
  5789. }
  5790. var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/,
  5791. rfxnum = new RegExp(
  5792. "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i"),
  5793. rrun = /queueHooks$/,
  5794. animationPrefilters = [defaultPrefilter],
  5795. tweeners = {
  5796. "*": [function(prop, value) {
  5797. var tween = this.createTween(prop, value),
  5798. target = tween.cur(),
  5799. parts = rfxnum.exec(value),
  5800. unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px"),
  5801. start = (jQuery.cssNumber[prop] || unit !== "px" && +target) && rfxnum.exec(jQuery.css(
  5802. tween.elem, prop)),
  5803. scale = 1,
  5804. maxIterations = 20;
  5805. if (start && start[3] !== unit) {
  5806. unit = unit || start[3];
  5807. parts = parts || [];
  5808. start = +target || 1;
  5809. do {
  5810. scale = scale || ".5";
  5811. start = start / scale;
  5812. jQuery.style(tween.elem, prop, start + unit)
  5813. } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations)
  5814. }
  5815. if (parts) {
  5816. start = tween.start = +start || +target || 0;
  5817. tween.unit = unit;
  5818. tween.end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2]
  5819. }
  5820. return tween
  5821. }]
  5822. };
  5823. function createFxNow() {
  5824. setTimeout(function() {
  5825. fxNow = undefined
  5826. });
  5827. return fxNow = jQuery.now()
  5828. }
  5829. function createTween(value, prop, animation) {
  5830. var tween, collection = (tweeners[prop] || []).concat(tweeners["*"]),
  5831. index = 0,
  5832. length = collection.length;
  5833. for (; index < length; index++) {
  5834. if (tween = collection[index].call(animation, prop, value)) {
  5835. return tween
  5836. }
  5837. }
  5838. }
  5839. function Animation(elem, properties, options) {
  5840. var result, stopped, index = 0,
  5841. length = animationPrefilters.length,
  5842. deferred = jQuery.Deferred().always(function() {
  5843. delete tick.elem
  5844. }),
  5845. tick = function() {
  5846. if (stopped) {
  5847. return false
  5848. }
  5849. var currentTime = fxNow || createFxNow(),
  5850. remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
  5851. temp = remaining / animation.duration || 0,
  5852. percent = 1 - temp,
  5853. index = 0,
  5854. length = animation.tweens.length;
  5855. for (; index < length; index++) {
  5856. animation.tweens[index].run(percent)
  5857. }
  5858. deferred.notifyWith(elem, [animation, percent, remaining]);
  5859. if (percent < 1 && length) {
  5860. return remaining
  5861. } else {
  5862. deferred.resolveWith(elem, [animation]);
  5863. return false
  5864. }
  5865. },
  5866. animation = deferred.promise({
  5867. elem: elem,
  5868. props: jQuery.extend({}, properties),
  5869. opts: jQuery.extend(true, {
  5870. specialEasing: {}
  5871. }, options),
  5872. originalProperties: properties,
  5873. originalOptions: options,
  5874. startTime: fxNow || createFxNow(),
  5875. duration: options.duration,
  5876. tweens: [],
  5877. createTween: function(prop, end) {
  5878. var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[
  5879. prop] || animation.opts.easing);
  5880. animation.tweens.push(tween);
  5881. return tween
  5882. },
  5883. stop: function(gotoEnd) {
  5884. var index = 0,
  5885. length = gotoEnd ? animation.tweens.length : 0;
  5886. if (stopped) {
  5887. return this
  5888. }
  5889. stopped = true;
  5890. for (; index < length; index++) {
  5891. animation.tweens[index].run(1)
  5892. }
  5893. if (gotoEnd) {
  5894. deferred.resolveWith(elem, [animation, gotoEnd])
  5895. } else {
  5896. deferred.rejectWith(elem, [animation, gotoEnd])
  5897. }
  5898. return this
  5899. }
  5900. }),
  5901. props = animation.props;
  5902. propFilter(props, animation.opts.specialEasing);
  5903. for (; index < length; index++) {
  5904. result = animationPrefilters[index].call(animation, elem, props, animation.opts);
  5905. if (result) {
  5906. return result
  5907. }
  5908. }
  5909. jQuery.map(props, createTween, animation);
  5910. if (jQuery.isFunction(animation.opts.start)) {
  5911. animation.opts.start.call(elem, animation)
  5912. }
  5913. jQuery.fx.timer(jQuery.extend(tick, {
  5914. elem: elem,
  5915. anim: animation,
  5916. queue: animation.opts.queue
  5917. }));
  5918. return animation.progress(animation.opts.progress).done(animation.opts.done,
  5919. animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)
  5920. }
  5921. function propFilter(props, specialEasing) {
  5922. var index, name, easing, value, hooks;
  5923. for (index in props) {
  5924. name = jQuery.camelCase(index);
  5925. easing = specialEasing[name];
  5926. value = props[index];
  5927. if (jQuery.isArray(value)) {
  5928. easing = value[1];
  5929. value = props[index] = value[0]
  5930. }
  5931. if (index !== name) {
  5932. props[name] = value;
  5933. delete props[index]
  5934. }
  5935. hooks = jQuery.cssHooks[name];
  5936. if (hooks && "expand" in hooks) {
  5937. value = hooks.expand(value);
  5938. delete props[name];
  5939. for (index in value) {
  5940. if (
  5941. !(index in props)) {
  5942. props[index] = value[index];
  5943. specialEasing[index] = easing
  5944. }
  5945. }
  5946. } else {
  5947. specialEasing[name] = easing
  5948. }
  5949. }
  5950. }
  5951. jQuery.Animation = jQuery.extend(Animation, {
  5952. tweener: function(props, callback) {
  5953. if (jQuery.isFunction(props)) {
  5954. callback = props;
  5955. props = ["*"]
  5956. } else {
  5957. props = props.split(" ")
  5958. }
  5959. var prop, index = 0,
  5960. length = props.length;
  5961. for (; index < length; index++) {
  5962. prop = props[index];
  5963. tweeners[prop] = tweeners[prop] || [];
  5964. tweeners[prop].unshift(callback)
  5965. }
  5966. },
  5967. prefilter: function(callback, prepend) {
  5968. if (prepend) {
  5969. animationPrefilters.unshift(
  5970. callback)
  5971. } else {
  5972. animationPrefilters.push(callback)
  5973. }
  5974. }
  5975. });
  5976. function defaultPrefilter(elem, props, opts) {
  5977. var prop, value, toggle, tween, hooks, oldfire, anim = this,
  5978. orig = {},
  5979. style = elem.style,
  5980. hidden = elem.nodeType && isHidden(elem),
  5981. dataShow = jQuery._data(elem, "fxshow");
  5982. if (!opts.queue) {
  5983. hooks = jQuery._queueHooks(elem, "fx");
  5984. if (hooks.unqueued == null) {
  5985. hooks.unqueued = 0;
  5986. oldfire = hooks.empty.fire;
  5987. hooks.empty.fire = function() {
  5988. if (!hooks.unqueued) {
  5989. oldfire()
  5990. }
  5991. }
  5992. }
  5993. hooks.unqueued++;
  5994. anim.always(function() {
  5995. anim.always(function() {
  5996. hooks.unqueued--;
  5997. if (!jQuery.queue(elem, "fx").length) {
  5998. hooks.empty.fire()
  5999. }
  6000. })
  6001. })
  6002. }
  6003. if (elem.nodeType === 1 && ("height" in props || "width" in props)) {
  6004. opts.overflow = [style.overflow, style.overflowX, style.overflowY];
  6005. if (jQuery.css(elem, "display") === "inline" && jQuery.css(elem, "float") === "none") {
  6006. if (!jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay(elem.nodeName) === "inline") {
  6007. style.display = "inline-block"
  6008. } else {
  6009. style.zoom = 1
  6010. }
  6011. }
  6012. }
  6013. if (opts.overflow) {
  6014. style.overflow = "hidden";
  6015. if (!jQuery.support.shrinkWrapBlocks) {
  6016. anim.always(function() {
  6017. style.overflow = opts.overflow[0];
  6018. style.overflowX = opts.overflow[1];
  6019. style.overflowY = opts.overflow[2]
  6020. })
  6021. }
  6022. }
  6023. for (prop in props) {
  6024. value = props[prop];
  6025. if (rfxtypes.exec(value)) {
  6026. delete props[prop];
  6027. toggle = toggle || value === "toggle";
  6028. if (value === (hidden ? "hide" : "show")) {
  6029. continue
  6030. }
  6031. orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop)
  6032. }
  6033. }
  6034. if (!jQuery.isEmptyObject(orig)) {
  6035. if (dataShow) {
  6036. if ("hidden" in dataShow) {
  6037. hidden = dataShow.hidden
  6038. }
  6039. } else {
  6040. dataShow = jQuery._data(elem, "fxshow", {})
  6041. }
  6042. if (toggle) {
  6043. dataShow.hidden = !hidden
  6044. }
  6045. if (hidden) {
  6046. jQuery(elem).show()
  6047. } else {
  6048. anim.done(function() {
  6049. jQuery(elem).hide()
  6050. })
  6051. }
  6052. anim.done(function() {
  6053. var prop;
  6054. jQuery._removeData(elem, "fxshow");
  6055. for (prop in orig) {
  6056. jQuery.style(elem, prop, orig[prop])
  6057. }
  6058. });
  6059. for (prop in orig) {
  6060. tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
  6061. if (!(prop in dataShow)) {
  6062. dataShow[prop] = tween.start;
  6063. if (hidden) {
  6064. tween.end = tween.start;
  6065. tween.start = prop === "width" || prop === "height" ? 1 : 0
  6066. }
  6067. }
  6068. }
  6069. }
  6070. }
  6071. function Tween(elem, options, prop, end, easing) {
  6072. return new Tween.prototype.init(elem, options, prop, end, easing)
  6073. }
  6074. jQuery.Tween = Tween;
  6075. Tween.prototype = {
  6076. constructor: Tween,
  6077. init: function(elem, options, prop, end, easing, unit) {
  6078. this.elem = elem;
  6079. this.prop = prop;
  6080. this.easing = easing || "swing";
  6081. this.options = options;
  6082. this.start = this.now = this.cur();
  6083. this.end = end;
  6084. this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px")
  6085. },
  6086. cur: function() {
  6087. var hooks = Tween.propHooks[this.prop];
  6088. return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this)
  6089. },
  6090. run: function(percent) {
  6091. var eased,
  6092. hooks = Tween.propHooks[this.prop];
  6093. if (this.options.duration) {
  6094. this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0,
  6095. 1, this.options.duration)
  6096. } else {
  6097. this.pos = eased = percent
  6098. }
  6099. this.now = (this.end - this.start) * eased + this.start;
  6100. if (this.options.step) {
  6101. this.options.step.call(this.elem, this.now, this)
  6102. }
  6103. if (hooks && hooks.set) {
  6104. hooks.set(this)
  6105. } else {
  6106. Tween.propHooks._default.set(this)
  6107. }
  6108. return this
  6109. }
  6110. };
  6111. Tween.prototype.init.prototype = Tween.prototype;
  6112. Tween.propHooks = {
  6113. _default: {
  6114. get: function(tween) {
  6115. var result;
  6116. if (tween.elem[tween.prop] != null && (!tween.elem.style || tween.elem.style[tween.prop] ==
  6117. null)) {
  6118. return tween.elem[tween.prop]
  6119. }
  6120. result = jQuery.css(tween.elem, tween.prop, "");
  6121. return !result || result === "auto" ? 0 : result
  6122. },
  6123. set: function(tween) {
  6124. if (jQuery.fx.step[tween.prop]) {
  6125. jQuery.fx.step[tween.prop](tween)
  6126. } else if (tween.elem.style && (tween.elem.style[jQuery.cssProps[tween.prop]] != null ||
  6127. jQuery.cssHooks[tween.prop])) {
  6128. jQuery.style(tween.elem, tween.prop, tween.now + tween.unit)
  6129. } else {
  6130. tween.elem[tween.prop] = tween.now
  6131. }
  6132. }
  6133. }
  6134. };
  6135. Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  6136. set: function(tween) {
  6137. if (tween.elem.nodeType && tween.elem.parentNode) {
  6138. tween.elem[tween.prop] = tween.now
  6139. }
  6140. }
  6141. };
  6142. jQuery.each(["toggle", "show", "hide"], function(i, name) {
  6143. var cssFn = jQuery.fn[name];
  6144. jQuery.fn[name] = function(speed, easing, callback) {
  6145. return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this
  6146. .animate(genFx(name, true), speed, easing, callback)
  6147. }
  6148. });
  6149. jQuery.fn.extend({
  6150. fadeTo: function(speed, to, easing, callback) {
  6151. return this.filter(isHidden).css("opacity", 0).show().end().animate({
  6152. opacity: to
  6153. }, speed, easing, callback)
  6154. },
  6155. animate: function(prop, speed, easing, callback) {
  6156. var empty = jQuery.isEmptyObject(prop),
  6157. optall = jQuery.speed(speed, easing, callback),
  6158. doAnimation = function() {
  6159. var anim = Animation(this, jQuery.extend({}, prop), optall);
  6160. if (empty || jQuery._data(this, "finish")) {
  6161. anim.stop(true)
  6162. }
  6163. };
  6164. doAnimation.finish = doAnimation;
  6165. return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue,
  6166. doAnimation)
  6167. },
  6168. stop: function(type, clearQueue, gotoEnd) {
  6169. var stopQueue = function(hooks) {
  6170. var stop = hooks.stop;
  6171. delete hooks.stop;
  6172. stop(gotoEnd)
  6173. };
  6174. if (typeof type !== "string") {
  6175. gotoEnd = clearQueue;
  6176. clearQueue = type;
  6177. type = undefined
  6178. }
  6179. if (clearQueue && type !== false) {
  6180. this.queue(type || "fx", [])
  6181. }
  6182. return this.each(function() {
  6183. var dequeue = true,
  6184. index = type != null && type + "queueHooks",
  6185. timers = jQuery.timers,
  6186. data = jQuery._data(this);
  6187. if (index) {
  6188. if (data[index] && data[index].stop) {
  6189. stopQueue(data[index])
  6190. }
  6191. } else {
  6192. for (index in data) {
  6193. if (
  6194. data[index] && data[index].stop && rrun.test(index)) {
  6195. stopQueue(data[index])
  6196. }
  6197. }
  6198. }
  6199. for (index = timers.length; index--;) {
  6200. if (timers[index].elem === this && (type == null || timers[index].queue ===
  6201. type)) {
  6202. timers[index].anim.stop(gotoEnd);
  6203. dequeue = false;
  6204. timers.splice(index, 1)
  6205. }
  6206. }
  6207. if (dequeue || !gotoEnd) {
  6208. jQuery.dequeue(this, type)
  6209. }
  6210. })
  6211. },
  6212. finish: function(type) {
  6213. if (type !== false) {
  6214. type = type || "fx"
  6215. }
  6216. return this.each(function() {
  6217. var index, data = jQuery._data(this),
  6218. queue = data[type + "queue"],
  6219. hooks = data[type + "queueHooks"],
  6220. timers = jQuery.timers,
  6221. length = queue ? queue.length : 0;
  6222. data.finish = true;
  6223. jQuery.queue(this, type, []);
  6224. if (hooks && hooks.stop) {
  6225. hooks.stop.call(this, true)
  6226. }
  6227. for (index = timers.length; index--;) {
  6228. if (timers[index].elem === this && timers[index].queue === type) {
  6229. timers[index].anim.stop(true);
  6230. timers.splice(index, 1)
  6231. }
  6232. }
  6233. for (index = 0; index < length; index++) {
  6234. if (queue[index] && queue[index].finish) {
  6235. queue[index].finish.call(this)
  6236. }
  6237. }
  6238. delete data.finish
  6239. })
  6240. }
  6241. });
  6242. function genFx(type, includeWidth) {
  6243. var which, attrs = {
  6244. height: type
  6245. },
  6246. i = 0;
  6247. includeWidth = includeWidth ? 1 : 0;
  6248. for (; i < 4; i += 2 - includeWidth) {
  6249. which = cssExpand[i];
  6250. attrs["margin" + which] = attrs["padding" + which] = type
  6251. }
  6252. if (includeWidth) {
  6253. attrs.opacity = attrs.width = type
  6254. }
  6255. return attrs
  6256. }
  6257. jQuery.each({
  6258. slideDown: genFx("show"),
  6259. slideUp: genFx("hide"),
  6260. slideToggle: genFx("toggle"),
  6261. fadeIn: {
  6262. opacity: "show"
  6263. },
  6264. fadeOut: {
  6265. opacity: "hide"
  6266. },
  6267. fadeToggle: {
  6268. opacity: "toggle"
  6269. }
  6270. }, function(name, props) {
  6271. jQuery.fn[name] = function(speed, easing, callback) {
  6272. return this.animate(props, speed, easing, callback)
  6273. }
  6274. });
  6275. jQuery.speed = function(speed, easing, fn) {
  6276. var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
  6277. complete: fn || !fn && easing || jQuery.isFunction(speed) && speed,
  6278. duration: speed,
  6279. easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
  6280. };
  6281. opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in
  6282. jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
  6283. if (opt.queue == null || opt.queue === true) {
  6284. opt.queue = "fx"
  6285. }
  6286. opt.old = opt.complete;
  6287. opt.complete = function() {
  6288. if (jQuery.isFunction(opt.old)) {
  6289. opt.old.call(this)
  6290. }
  6291. if (opt.queue) {
  6292. jQuery.dequeue(this, opt.queue)
  6293. }
  6294. };
  6295. return opt
  6296. };
  6297. jQuery.easing = {
  6298. linear: function(p) {
  6299. return p
  6300. },
  6301. swing: function(p) {
  6302. return .5 - Math.cos(p * Math.PI) / 2
  6303. }
  6304. };
  6305. jQuery.timers = [];
  6306. jQuery.fx = Tween.prototype.init;
  6307. jQuery.fx.tick = function() {
  6308. var timer, timers = jQuery.timers,
  6309. i = 0;
  6310. fxNow = jQuery.now();
  6311. for (; i < timers.length; i++) {
  6312. timer = timers[i];
  6313. if (!timer() && timers[i] === timer) {
  6314. timers.splice(i--, 1)
  6315. }
  6316. }
  6317. if (!timers.length) {
  6318. jQuery.fx.stop()
  6319. }
  6320. fxNow = undefined
  6321. };
  6322. jQuery.fx.timer = function(timer) {
  6323. if (timer() && jQuery.timers.push(timer)) {
  6324. jQuery.fx.start()
  6325. }
  6326. };
  6327. jQuery.fx.interval = 13;
  6328. jQuery.fx.start = function() {
  6329. if (!timerId) {
  6330. timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval)
  6331. }
  6332. };
  6333. jQuery.fx.stop = function() {
  6334. clearInterval(timerId);
  6335. timerId = null
  6336. };
  6337. jQuery.fx.speeds = {
  6338. slow: 600,
  6339. fast: 200,
  6340. _default: 400
  6341. };
  6342. jQuery.fx.step = {};
  6343. if (jQuery.expr && jQuery.expr.filters) {
  6344. jQuery.expr.filters.animated = function(elem) {
  6345. return jQuery.grep(jQuery.timers, function(fn) {
  6346. return elem === fn.elem
  6347. }).length
  6348. }
  6349. }
  6350. jQuery.fn.offset = function(options) {
  6351. if (
  6352. arguments.length) {
  6353. return options === undefined ? this : this.each(function(i) {
  6354. jQuery.offset.setOffset(this, options, i)
  6355. })
  6356. }
  6357. var docElem, win, box = {
  6358. top: 0,
  6359. left: 0
  6360. },
  6361. elem = this[0],
  6362. doc = elem && elem.ownerDocument;
  6363. if (!doc) {
  6364. return
  6365. }
  6366. docElem = doc.documentElement;
  6367. if (!jQuery.contains(docElem, elem)) {
  6368. return box
  6369. }
  6370. if (typeof elem.getBoundingClientRect !== core_strundefined) {
  6371. box = elem.getBoundingClientRect()
  6372. }
  6373. win = getWindow(doc);
  6374. return {
  6375. top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
  6376. left: box.left + (
  6377. win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)
  6378. }
  6379. };
  6380. jQuery.offset = {
  6381. setOffset: function(elem, options, i) {
  6382. var position = jQuery.css(elem, "position");
  6383. if (position === "static") {
  6384. elem.style.position = "relative"
  6385. }
  6386. var curElem = jQuery(elem),
  6387. curOffset = curElem.offset(),
  6388. curCSSTop = jQuery.css(elem, "top"),
  6389. curCSSLeft = jQuery.css(elem, "left"),
  6390. calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray(
  6391. "auto", [curCSSTop, curCSSLeft]) > -1,
  6392. props = {},
  6393. curPosition = {},
  6394. curTop, curLeft;
  6395. if (calculatePosition) {
  6396. curPosition = curElem.position();
  6397. curTop = curPosition.top;
  6398. curLeft = curPosition.left
  6399. } else {
  6400. curTop = parseFloat(curCSSTop) || 0;
  6401. curLeft = parseFloat(curCSSLeft) || 0
  6402. }
  6403. if (jQuery.isFunction(options)) {
  6404. options = options.call(elem, i, curOffset)
  6405. }
  6406. if (options.top != null) {
  6407. props.top = options.top - curOffset.top + curTop
  6408. }
  6409. if (options.left != null) {
  6410. props.left = options.left - curOffset.left + curLeft
  6411. }
  6412. if ("using" in options) {
  6413. options.using.call(elem, props)
  6414. } else {
  6415. curElem.css(props)
  6416. }
  6417. }
  6418. };
  6419. jQuery.fn.extend({
  6420. position: function() {
  6421. if (!this[0]) {
  6422. return
  6423. }
  6424. var offsetParent, offset, parentOffset = {
  6425. top: 0,
  6426. left: 0
  6427. },
  6428. elem = this[0];
  6429. if (jQuery.css(elem, "position") === "fixed") {
  6430. offset = elem.getBoundingClientRect()
  6431. } else {
  6432. offsetParent = this.offsetParent();
  6433. offset = this.offset();
  6434. if (!jQuery.nodeName(offsetParent[0], "html")) {
  6435. parentOffset = offsetParent.offset()
  6436. }
  6437. parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
  6438. parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true)
  6439. }
  6440. return {
  6441. top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
  6442. left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
  6443. }
  6444. },
  6445. offsetParent: function() {
  6446. return this.map(function() {
  6447. var offsetParent = this.offsetParent || docElem;
  6448. while (offsetParent && (!jQuery.nodeName(offsetParent, "html") && jQuery.css(
  6449. offsetParent, "position") === "static")) {
  6450. offsetParent = offsetParent.offsetParent
  6451. }
  6452. return offsetParent || docElem
  6453. })
  6454. }
  6455. });
  6456. jQuery.each({
  6457. scrollLeft: "pageXOffset",
  6458. scrollTop: "pageYOffset"
  6459. }, function(method, prop) {
  6460. var top = /Y/.test(prop);
  6461. jQuery.fn[method] = function(val) {
  6462. return jQuery.access(this, function(elem, method, val) {
  6463. var win = getWindow(elem);
  6464. if (val === undefined) {
  6465. return win ? prop in win ? win[prop] : win.document.documentElement[
  6466. method] : elem[method]
  6467. }
  6468. if (win) {
  6469. win.scrollTo(!top ? val : jQuery(win).scrollLeft(), top ? val : jQuery(win)
  6470. .scrollTop())
  6471. } else {
  6472. elem[method] = val
  6473. }
  6474. }, method, val, arguments.length, null)
  6475. }
  6476. });
  6477. function getWindow(elem) {
  6478. return jQuery.isWindow(elem) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false
  6479. }
  6480. jQuery.each({
  6481. Height: "height",
  6482. Width: "width"
  6483. }, function(
  6484. name, type) {
  6485. jQuery.each({
  6486. padding: "inner" + name,
  6487. content: type,
  6488. "": "outer" + name
  6489. }, function(defaultExtra, funcName) {
  6490. jQuery.fn[funcName] = function(margin, value) {
  6491. var chainable = arguments.length && (defaultExtra || typeof margin !==
  6492. "boolean"),
  6493. extra = defaultExtra || (margin === true || value === true ? "margin" :
  6494. "border");
  6495. return jQuery.access(this, function(elem, type, value) {
  6496. var doc;
  6497. if (jQuery.isWindow(elem)) {
  6498. return elem.document.documentElement["client" + name]
  6499. }
  6500. if (elem.nodeType === 9) {
  6501. doc = elem.documentElement;
  6502. return Math.max(
  6503. elem.body["scroll" + name], doc["scroll" + name], elem
  6504. .body["offset" + name], doc["offset" + name], doc[
  6505. "client" + name])
  6506. }
  6507. return value === undefined ? jQuery.css(elem, type, extra) : jQuery
  6508. .style(elem, type, value, extra)
  6509. }, type, chainable ? margin : undefined, chainable, null)
  6510. }
  6511. })
  6512. });
  6513. jQuery.fn.size = function() {
  6514. return this.length
  6515. };
  6516. jQuery.fn.andSelf = jQuery.fn.addBack;
  6517. if (typeof module === "object" && module && typeof module.exports === "object") {
  6518. module.exports = jQuery
  6519. } else {
  6520. window.jQuery = window.$ = jQuery;
  6521. if (
  6522. typeof define === "function" && define.amd) {
  6523. define("jquery", ["require"], function(require) {
  6524. return jQuery
  6525. })
  6526. }
  6527. }
  6528. })(window);