rlmuidebug.js 400 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374
  1. /*!
  2. * =====================================================
  3. *Learun MobileUI v1.0.0
  4. * =====================================================
  5. */
  6. /* NUGET: BEGIN LICENSE TEXT
  7. *
  8. * Microsoft grants you the right to use these script files for the sole
  9. * purpose of either: (i) interacting through your browser with the Microsoft
  10. * website or online service, subject to the applicable licensing or use
  11. * terms; or (ii) using the files as included with a Microsoft product subject
  12. * to that product's license terms. Microsoft reserves all other rights to the
  13. * files not expressly granted by Microsoft, whether by implication, estoppel
  14. * or otherwise. Insofar as a script file is dual licensed under GPL,
  15. * Microsoft neither took the code under GPL nor distributes it thereunder but
  16. * under the terms set out in this paragraph. All notices and licenses
  17. * below are for informational purposes only.
  18. *
  19. * JQUERY CORE 1.10.2; Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; http://jquery.org/license
  20. * Includes Sizzle.js; Copyright 2013 jQuery Foundation, Inc. and other contributors; http://opensource.org/licenses/MIT
  21. *
  22. * NUGET: END LICENSE TEXT */
  23. /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
  24. //@ sourceMappingURL=jquery-1.10.2.min.map
  25. */
  26. (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
  27. }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
  28. u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
  29. /*! jQuery Mobile v1.4.5 | Copyright 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
  30. (function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function T(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function N(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=T(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function C(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function k(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function L(){g=!1}function A(){g=!0}function O(){E=0,v.length=0,m=!1,A()}function M(){L()}function _(){D(),c=setTimeout(function(){c=0,O()},e.vmouse.resetTimerDuration)}function D(){c&&(clearTimeout(c),c=0)}function P(t,n,r){var i;if(r&&r[t]||!r&&k(n.target,t))i=N(n,t),e(n.target).trigger(i);return i}function H(t){var n=e.data(t.target,s),r;!m&&(!E||E!==n)&&(r=P("v"+t.type,t),r&&(r.isDefaultPrevented()&&t.preventDefault(),r.isPropagationStopped()&&t.stopPropagation(),r.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function B(t){var n=T(t).touches,r,i,o;n&&n.length===1&&(r=t.target,i=C(r),i.hasVirtualBinding&&(E=w++,e.data(r,s,E),D(),M(),d=!1,o=T(t).touches[0],h=o.pageX,p=o.pageY,P("vmouseover",t,i),P("vmousedown",t,i)))}function j(e){if(g)return;d||P("vmousecancel",e,C(e.target)),d=!0,_()}function F(t){if(g)return;var n=T(t).touches[0],r=d,i=e.vmouse.moveDistanceThreshold,s=C(t.target);d=d||Math.abs(n.pageX-h)>i||Math.abs(n.pageY-p)>i,d&&!r&&P("vmousecancel",t,s),P("vmousemove",t,s),_()}function I(e){if(g)return;A();var t=C(e.target),n,r;P("vmouseup",e,t),d||(n=P("vclick",e,t),n&&n.isDefaultPrevented()&&(r=T(e).changedTouches[0],v.push({touchID:E,x:r.clientX,y:r.clientY}),m=!0)),P("vmouseout",e,t),d=!1,_()}function q(t){var n=e.data(t,i),r;if(n)for(r in n)if(n[r])return!0;return!1}function R(){}function U(t){var n=t.substr(1);return{setup:function(){q(this)||e.data(this,i,{});var r=e.data(this,i);r[t]=!0,l[t]=(l[t]||0)+1,l[t]===1&&b.bind(n,H),e(this).bind(n,R),y&&(l.touchstart=(l.touchstart||0)+1,l.touchstart===1&&b.bind("touchstart",B).bind("touchend",I).bind("touchmove",F).bind("scroll",j))},teardown:function(){--l[t],l[t]||b.unbind(n,H),y&&(--l.touchstart,l.touchstart||b.unbind("touchstart",B).unbind("touchmove",F).unbind("touchend",I).unbind("scroll",j));var r=e(this),s=e.data(this,i);s&&(s[t]=!1),r.unbind(n,R),q(this)||r.removeData(i)}}}var i="virtualMouseBindings",s="virtualTouchID",o="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),u="clientX clientY pageX pageY screenX screenY".split(" "),a=e.event.mouseHooks?e.event.mouseHooks.props:[],f=e.event.props.concat(a),l={},c=0,h=0,p=0,d=!1,v=[],m=!1,g=!1,y="addEventListener"in n,b=e(n),w=1,E=0,S,x;e.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(x=0;x<o.length;x++)e.event.special[o[x]]=U(o[x]);y&&n.addEventListener("click",function(t){var n=v.length,r=t.target,i,o,u,a,f,l;if(n){i=t.clientX,o=t.clientY,S=e.vmouse.clickDistanceThreshold,u=r;while(u){for(a=0;a<n;a++){f=v[a],l=0;if(u===r&&Math.abs(f.x-i)<S&&Math.abs(f.y-o)<S||e.data(u,s)===f.touchID){t.preventDefault(),t.stopPropagation();return}}u=u.parentNode}}},!0)})(e,t,n),function(e){e.mobile={}}(e),function(e,t){var r={touch:"ontouchend"in n};e.mobile.support=e.mobile.support||{},e.extend(e.support,r),e.extend(e.mobile.support,r)}(e),function(e,t,r){function l(t,n,i,s){var o=i.type;i.type=n,s?e.event.trigger(i,r,t):e.event.dispatch.call(t,i),i.type=o}var i=e(n),s=e.mobile.support.touch,o="touchmove scroll",u=s?"touchstart":"mousedown",a=s?"touchend":"mouseup",f=s?"touchmove":"mousemove";e.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,n){e.fn[n]=function(e){return e?this.bind(n,e):this.trigger(n)},e.attrFn&&(e.attrFn[n]=!0)}),e.event.special.scrollstart={enabled:!0,setup:function(){function s(e,n){r=n,l(t,r?"scrollstart":"scrollstop",e)}var t=this,n=e(t),r,i;n.bind(o,function(t){if(!e.event.special.scrollstart.enabled)return;r||s(t,!0),clearTimeout(i),i=setTimeout(function(){s(t,!1)},50)})},teardown:function(){e(this).unbind(o)}},e.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var t=this,n=e(t),r=!1;n.bind("vmousedown",function(s){function a(){clearTimeout(u)}function f(){a(),n.unbind("vclick",c).unbind("vmouseup",a),i.unbind("vmousecancel",f)}function c(e){f(),!r&&o===e.target?l(t,"tap",e):r&&e.preventDefault()}r=!1;if(s.which&&s.which!==1)return!1;var o=s.target,u;n.bind("vmouseup",a).bind("vclick",c),i.bind("vmousecancel",f),u=setTimeout(function(){e.event.special.tap.emitTapOnTaphold||(r=!0),l(t,"taphold",e.Event("taphold",{target:o}))},e.event.special.tap.tapholdThreshold)})},teardown:function(){e(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"),i.unbind("vmousecancel")}},e.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(e){var n=t.pageXOffset,r=t.pageYOffset,i=e.clientX,s=e.clientY;if(e.pageY===0&&Math.floor(s)>Math.floor(e.pageY)||e.pageX===0&&Math.floor(i)>Math.floor(e.pageX))i-=n,s-=r;else if(s<e.pageY-r||i<e.pageX-n)i=e.pageX-n,s=e.pageY-r;return{x:i,y:s}},start:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y],origin:e(t.target)}},stop:function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t,r=e.event.special.swipe.getLocation(n);return{time:(new Date).getTime(),coords:[r.x,r.y]}},handleSwipe:function(t,n,r,i){if(n.time-t.time<e.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-n.coords[0])>e.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-n.coords[1])<e.event.special.swipe.verticalDistanceThreshold){var s=t.coords[0]>n.coords[0]?"swipeleft":"swiperight";return l(r,"swipe",e.Event("swipe",{target:i,swipestart:t,swipestop:n}),!0),l(r,s,e.Event(s,{target:i,swipestart:t,swipestop:n}),!0),!0}return!1},eventInProgress:!1,setup:function(){var t,n=this,r=e(n),s={};t=e.data(this,"mobile-events"),t||(t={length:0},e.data(this,"mobile-events",t)),t.length++,t.swipe=s,s.start=function(t){if(e.event.special.swipe.eventInProgress)return;e.event.special.swipe.eventInProgress=!0;var r,o=e.event.special.swipe.start(t),u=t.target,l=!1;s.move=function(t){if(!o||t.isDefaultPrevented())return;r=e.event.special.swipe.stop(t),l||(l=e.event.special.swipe.handleSwipe(o,r,n,u),l&&(e.event.special.swipe.eventInProgress=!1)),Math.abs(o.coords[0]-r.coords[0])>e.event.special.swipe.scrollSupressionThreshold&&t.preventDefault()},s.stop=function(){l=!0,e.event.special.swipe.eventInProgress=!1,i.off(f,s.move),s.move=null},i.on(f,s.move).one(a,s.stop)},r.on(u,s.start)},teardown:function(){var t,n;t=e.data(this,"mobile-events"),t&&(n=t.swipe,delete t.swipe,t.length--,t.length===0&&e.removeData(this,"mobile-events")),n&&(n.start&&e(this).off(u,n.start),n.move&&i.off(f,n.move),n.stop&&i.off(a,n.stop))}},e.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,n){e.event.special[t]={setup:function(){e(this).bind(n,e.noop)},teardown:function(){e(this).unbind(n)}}})}(e,this)});(function (u) { var k = function (a, c) { var h, g, k, m; k = a & 2147483648; m = c & 2147483648; h = a & 1073741824; g = c & 1073741824; a = (a & 1073741823) + (c & 1073741823); return h & g ? a ^ 2147483648 ^ k ^ m : h | g ? a & 1073741824 ? a ^ 3221225472 ^ k ^ m : a ^ 1073741824 ^ k ^ m : a ^ k ^ m }, l = function (a, c, h, g, l, m, b) { a = k(a, k(k(c & h | ~c & g, l), b)); return k(a << m | a >>> 32 - m, c) }, n = function (a, c, h, g, l, m, b) { a = k(a, k(k(c & g | h & ~g, l), b)); return k(a << m | a >>> 32 - m, c) }, p = function (a, c, h, g, l, m, b) { a = k(a, k(k(c ^ h ^ g, l), b)); return k(a << m | a >>> 32 - m, c) }, q = function (a, c, h, g, l, m, b) { a = k(a, k(k(h ^ (c | ~g), l), b)); return k(a << m | a >>> 32 - m, c) }, t = function (a) { var c = "", h, g; for (g = 0; 3 >= g; g++) h = a >>> 8 * g & 255, h = "0" + h.toString(16), c += h.substr(h.length - 2, 2); return c }; u.extend({ md5: function (a) { var c, h, g, r, m, b, d, e, f; a = a.replace(/\x0d\x0a/g, "\n"); c = ""; for (h = 0; h < a.length; h++) g = a.charCodeAt(h), 128 > g ? c += String.fromCharCode(g) : (127 < g && 2048 > g ? c += String.fromCharCode(g >> 6 | 192) : (c += String.fromCharCode(g >> 12 | 224), c += String.fromCharCode(g >> 6 & 63 | 128)), c += String.fromCharCode(g & 63 | 128)); h = c.length; a = h + 8; r = 16 * ((a - a % 64) / 64 + 1); a = Array(r - 1); for (b = 0; b < h;) g = (b - b % 4) / 4, m = b % 4 * 8, a[g] |= c.charCodeAt(b) << m, b++; g = (b - b % 4) / 4; a[g] |= 128 << b % 4 * 8; a[r - 2] = h << 3; a[r - 1] = h >>> 29; b = 1732584193; d = 4023233417; e = 2562383102; f = 271733878; for (c = 0; c < a.length; c += 16) h = b, g = d, r = e, m = f, b = l(b, d, e, f, a[c + 0], 7, 3614090360), f = l(f, b, d, e, a[c + 1], 12, 3905402710), e = l(e, f, b, d, a[c + 2], 17, 606105819), d = l(d, e, f, b, a[c + 3], 22, 3250441966), b = l(b, d, e, f, a[c + 4], 7, 4118548399), f = l(f, b, d, e, a[c + 5], 12, 1200080426), e = l(e, f, b, d, a[c + 6], 17, 2821735955), d = l(d, e, f, b, a[c + 7], 22, 4249261313), b = l(b, d, e, f, a[c + 8], 7, 1770035416), f = l(f, b, d, e, a[c + 9], 12, 2336552879), e = l(e, f, b, d, a[c + 10], 17, 4294925233), d = l(d, e, f, b, a[c + 11], 22, 2304563134), b = l(b, d, e, f, a[c + 12], 7, 1804603682), f = l(f, b, d, e, a[c + 13], 12, 4254626195), e = l(e, f, b, d, a[c + 14], 17, 2792965006), d = l(d, e, f, b, a[c + 15], 22, 1236535329), b = n(b, d, e, f, a[c + 1], 5, 4129170786), f = n(f, b, d, e, a[c + 6], 9, 3225465664), e = n(e, f, b, d, a[c + 11], 14, 643717713), d = n(d, e, f, b, a[c + 0], 20, 3921069994), b = n(b, d, e, f, a[c + 5], 5, 3593408605), f = n(f, b, d, e, a[c + 10], 9, 38016083), e = n(e, f, b, d, a[c + 15], 14, 3634488961), d = n(d, e, f, b, a[c + 4], 20, 3889429448), b = n(b, d, e, f, a[c + 9], 5, 568446438), f = n(f, b, d, e, a[c + 14], 9, 3275163606), e = n(e, f, b, d, a[c + 3], 14, 4107603335), d = n(d, e, f, b, a[c + 8], 20, 1163531501), b = n(b, d, e, f, a[c + 13], 5, 2850285829), f = n(f, b, d, e, a[c + 2], 9, 4243563512), e = n(e, f, b, d, a[c + 7], 14, 1735328473), d = n(d, e, f, b, a[c + 12], 20, 2368359562), b = p(b, d, e, f, a[c + 5], 4, 4294588738), f = p(f, b, d, e, a[c + 8], 11, 2272392833), e = p(e, f, b, d, a[c + 11], 16, 1839030562), d = p(d, e, f, b, a[c + 14], 23, 4259657740), b = p(b, d, e, f, a[c + 1], 4, 2763975236), f = p(f, b, d, e, a[c + 4], 11, 1272893353), e = p(e, f, b, d, a[c + 7], 16, 4139469664), d = p(d, e, f, b, a[c + 10], 23, 3200236656), b = p(b, d, e, f, a[c + 13], 4, 681279174), f = p(f, b, d, e, a[c + 0], 11, 3936430074), e = p(e, f, b, d, a[c + 3], 16, 3572445317), d = p(d, e, f, b, a[c + 6], 23, 76029189), b = p(b, d, e, f, a[c + 9], 4, 3654602809), f = p(f, b, d, e, a[c + 12], 11, 3873151461), e = p(e, f, b, d, a[c + 15], 16, 530742520), d = p(d, e, f, b, a[c + 2], 23, 3299628645), b = q(b, d, e, f, a[c + 0], 6, 4096336452), f = q(f, b, d, e, a[c + 7], 10, 1126891415), e = q(e, f, b, d, a[c + 14], 15, 2878612391), d = q(d, e, f, b, a[c + 5], 21, 4237533241), b = q(b, d, e, f, a[c + 12], 6, 1700485571), f = q(f, b, d, e, a[c + 3], 10, 2399980690), e = q(e, f, b, d, a[c + 10], 15, 4293915773), d = q(d, e, f, b, a[c + 1], 21, 2240044497), b = q(b, d, e, f, a[c + 8], 6, 1873313359), f = q(f, b, d, e, a[c + 15], 10, 4264355552), e = q(e, f, b, d, a[c + 6], 15, 2734768916), d = q(d, e, f, b, a[c + 13], 21, 1309151649), b = q(b, d, e, f, a[c + 4], 6, 4149444226), f = q(f, b, d, e, a[c + 11], 10, 3174756917), e = q(e, f, b, d, a[c + 2], 15, 718787259), d = q(d, e, f, b, a[c + 9], 21, 3951481745), b = k(b, h), d = k(d, g), e = k(e, r), f = k(f, m); return (t(b) + t(d) + t(e) + t(f)).toLowerCase() } }) })(jQuery);/*!
  31. * =====================================================
  32. *Fui v1.0.1
  33. * =====================================================
  34. */
  35. (function(a, g) {
  36. Date.prototype.DateAdd = function(j, i) {
  37. var h = this;
  38. switch (j) {
  39. case "s":
  40. return new Date(Date.parse(h) + (1000 * i));
  41. case "n":
  42. return new Date(Date.parse(h) + (60000 * i));
  43. case "h":
  44. return new Date(Date.parse(h) + (3600000 * i));
  45. case "d":
  46. return new Date(Date.parse(h) + (86400000 * i));
  47. case "w":
  48. return new Date(Date.parse(h) + ((86400000 * 7) * i));
  49. case "q":
  50. return new Date(h.getFullYear(), (h.getMonth()) + i * 3, h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds());
  51. case "m":
  52. return new Date(h.getFullYear(), (h.getMonth()) + i, h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds());
  53. case "y":
  54. return new Date((h.getFullYear() + i), h.getMonth(), h.getDate(), h.getHours(), h.getMinutes(), h.getSeconds())
  55. }
  56. };
  57. Date.prototype.DateDiff = function(j, h) {
  58. var i = this;
  59. if (typeof h == "string") {
  60. h = fui.date.parse(h)
  61. }
  62. switch (j) {
  63. case "s":
  64. return parseInt((h - i) / 1000);
  65. case "n":
  66. return parseInt((h - i) / 60000);
  67. case "h":
  68. return parseInt((h - i) / 3600000);
  69. case "d":
  70. return parseInt((h - i) / 86400000);
  71. case "w":
  72. return parseInt((h - i) / (86400000 * 7));
  73. case "m":
  74. return (h.getMonth() + 1) + ((h.getFullYear() - i.getFullYear()) * 12) - (i.getMonth() + 1);
  75. case "y":
  76. return h.getFullYear() - i.getFullYear()
  77. }
  78. };
  79. Date.prototype.MaxDayOfDate = function() {
  80. var k = this;
  81. var h = k.toArray();
  82. var i = (new Date(h[0], h[1] + 1, 1));
  83. var j = i.DateAdd("m", 1);
  84. var l = dateDiff(i.Format("yyyy-MM-dd"), j.Format("yyyy-MM-dd"));
  85. return l
  86. };
  87. Date.prototype.isLeapYear = function() {
  88. return (0 == this.getYear() % 4 && ((this.getYear() % 100 != 0) || (this.getYear() % 400 == 0)))
  89. };
  90. var d;
  91. var c;
  92. a("body").on("tap",
  93. function(h) {
  94. var j = g.fui.now();
  95. var i = h.target || h.srcElement;
  96. if (d && d === i) {
  97. if (c && (j - c) < 300) {
  98. var k = {
  99. center: {
  100. x: h.pageX,
  101. y: h.pageY
  102. }
  103. };
  104. g.fui.trigger(i, "doubletap", k)
  105. }
  106. }
  107. c = g.fui.now();
  108. d = i;
  109. return false
  110. });
  111. var f = /matrix(3d)?\((.+?)\)/;
  112. var b = {};
  113. a.each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"],
  114. function(h, j) {
  115. b["[object " + j + "]"] = j.toLowerCase()
  116. });
  117. var e = a.mobile.support.touch;
  118. g.fui = g.fui || {};
  119. g.fui = {
  120. event: {
  121. supportTouch: e,
  122. start: e ? "touchstart": "mousedown",
  123. end: e ? "touchend": "mouseup",
  124. move: e ? "touchmove": "mousemove",
  125. cancel: "touchcancel"
  126. },
  127. options: {
  128. gestureConfig: {
  129. tap: true,
  130. doubletap: false,
  131. longtap: false,
  132. hold: false,
  133. flick: true,
  134. swipe: true,
  135. drag: true,
  136. pinch: false
  137. }
  138. },
  139. now: Date.now ||
  140. function() {
  141. return + new Date()
  142. },
  143. slice: [].slice,
  144. pageid: function() {
  145. if (!fui.nav) {
  146. return "no"
  147. }
  148. var h = fui.nav.page.data[fui.nav.page.activeid] || {};
  149. return (h.op || {}).pageid || "no"
  150. },
  151. guid: function(l) {
  152. l = l || "_";
  153. var h = "";
  154. for (var j = 1; j <= 32; j++) {
  155. var k = Math.floor(Math.random() * 16).toString(16);
  156. h += k;
  157. if ((j == 8) || (j == 12) || (j == 16) || (j == 20)) {
  158. h += l
  159. }
  160. }
  161. return h
  162. },
  163. date: {
  164. isLeapYear: function(h) {
  165. return (h % 4 == 0 && h % 100 != 0) || (h % 400 == 0)
  166. },
  167. parse: function(i) {
  168. var h = i;
  169. if (typeof i === "string") {
  170. if (i.indexOf("/Date(") > -1) {
  171. h = new Date(parseInt(i.replace("/Date(", "").replace(")/", ""), 10))
  172. } else {
  173. h = new Date(Date.parse(i.replace(/-/g, "/").replace("T", " ").split(".")[0]))
  174. }
  175. }
  176. return h
  177. },
  178. format: function(m, i) {
  179. if (!m) {
  180. return ""
  181. }
  182. var h = g.fui.date.parse(m);
  183. var l = {
  184. "M+": h.getMonth() + 1,
  185. "d+": h.getDate(),
  186. "h+": h.getHours(),
  187. "m+": h.getMinutes(),
  188. "s+": h.getSeconds(),
  189. "q+": Math.floor((h.getMonth() + 3) / 3),
  190. S: h.getMilliseconds()
  191. };
  192. if (/(y+)/.test(i)) {
  193. i = i.replace(RegExp.$1, (h.getFullYear() + "").substr(4 - RegExp.$1.length))
  194. }
  195. for (var j in l) {
  196. if (new RegExp("(" + j + ")").test(i)) {
  197. i = i.replace(RegExp.$1, RegExp.$1.length == 1 ? l[j] : ("00" + l[j]).substr(("" + l[j]).length))
  198. }
  199. }
  200. return i
  201. },
  202. get: function(h, l, j) {
  203. var i = new Date();
  204. if ( !! l) {
  205. i = i.DateAdd(l, j)
  206. }
  207. var k = g.fui.date.format(i, h);
  208. return k
  209. }
  210. },
  211. isArray: Array.isArray ||
  212. function(h) {
  213. return h instanceof Array
  214. },
  215. later: function(l, p, h, j) {
  216. p = p || 0;
  217. var n = l;
  218. var i = j;
  219. var k;
  220. var o;
  221. if (typeof l === "string") {
  222. n = h[l]
  223. }
  224. k = function() {
  225. n.apply(h, fui.isArray(i) ? i: [i])
  226. };
  227. o = setTimeout(k, p);
  228. return {
  229. id: o,
  230. cancel: function() {
  231. clearTimeout(o)
  232. }
  233. }
  234. },
  235. createMask: function() {
  236. if (a(".f-backdrop").length == 0) {
  237. var h = '<div class="f-backdrop" ></div>';
  238. a("body").append(h);
  239. a(".f-backdrop").on("tap",
  240. function() {
  241. a(this).fadeOut();
  242. a(".f-pop.active").removeClass("active");
  243. return false
  244. })
  245. }
  246. },
  247. showMask: function() {
  248. a(".f-backdrop").fadeIn()
  249. },
  250. hideMask: function() {
  251. a(".f-backdrop").fadeOut()
  252. },
  253. getStyles: function(h, i) {
  254. var j = h.ownerDocument.defaultView.getComputedStyle(h, null);
  255. if (i) {
  256. return j.getPropertyValue(i) || j[i]
  257. }
  258. return j
  259. },
  260. parseTranslateMatrix: function(l, j) {
  261. var i = l.match(f);
  262. var h = i && i[1];
  263. if (i) {
  264. i = i[2].split(",");
  265. if (h === "3d") {
  266. i = i.slice(12, 15)
  267. } else {
  268. i.push(0);
  269. i = i.slice(4, 7)
  270. }
  271. } else {
  272. i = [0, 0, 0]
  273. }
  274. var k = {
  275. x: parseFloat(i[0]),
  276. y: parseFloat(i[1]),
  277. z: parseFloat(i[2])
  278. };
  279. if (j && k.hasOwnProperty(j)) {
  280. return k[j]
  281. }
  282. return k
  283. },
  284. type: function(h) {
  285. return h == null ? String(h) : b[{}.toString.call(h)] || "object"
  286. },
  287. isFunction: function(h) {
  288. return fui.type(h) === "function"
  289. },
  290. trigger: function(h, j, i) {
  291. if (h) {
  292. h.dispatchEvent(new CustomEvent(j, {
  293. detail: i,
  294. bubbles: true,
  295. cancelable: true
  296. }))
  297. }
  298. return this
  299. },
  300. hooks: {},
  301. addAction: function(j, h) {
  302. var i = fui.hooks[j];
  303. if (!i) {
  304. i = []
  305. }
  306. h.index = h.index || 1000;
  307. i.push(h);
  308. i.sort(function(k, l) {
  309. return k.index - l.index
  310. });
  311. fui.hooks[j] = i;
  312. return fui.hooks[j]
  313. },
  314. doAction: function(i, h) {
  315. if (fui.isFunction(h)) {
  316. a.each(fui.hooks[i], h)
  317. } else {
  318. a.each(fui.hooks[i],
  319. function(k, j) {
  320. return ! j.handle()
  321. })
  322. }
  323. },
  324. offset: function(i) {
  325. var h = {
  326. top: 0,
  327. left: 0
  328. };
  329. if (typeof i.getBoundingClientRect !== undefined) {
  330. h = i.getBoundingClientRect()
  331. }
  332. return {
  333. top: h.top + g.pageYOffset - i.clientTop,
  334. left: h.left + g.pageXOffset - i.clientLeft
  335. }
  336. },
  337. includeJs: function(j) {
  338. var h = document.getElementsByTagName("HEAD").item(0);
  339. var i = document.createElement("script");
  340. i.language = "javascript";
  341. i.type = "text/javascript";
  342. i.text = j;
  343. h.appendChild(i)
  344. },
  345. includeCss: function(j) {
  346. var i = document.getElementsByTagName("head").item(0);
  347. var k = document.createElement("style");
  348. k.type = "text/css";
  349. try {
  350. k.appendChild(document.createTextNode(j))
  351. } catch(h) {
  352. k.style.cssText = j
  353. }
  354. i.appendChild(k)
  355. },
  356. data: {}
  357. }
  358. })(window.jQuery, this); (function(c) {
  359. var d = false,
  360. b = /xyz/.test(function() {
  361. xyz
  362. }) ? /\b_super\b/: /.*/;
  363. var a = function() {};
  364. a.extend = function(h) {
  365. var e = this.prototype;
  366. d = true;
  367. var i = new this();
  368. d = false;
  369. for (var g in h) {
  370. i[g] = typeof h[g] == "function" && typeof e[g] == "function" && b.test(h[g]) ? (function(k, j) {
  371. return function() {
  372. var m = this._super;
  373. this._super = e[k];
  374. var l = j.apply(this, arguments);
  375. this._super = m;
  376. return l
  377. }
  378. })(g, h[g]) : h[g]
  379. }
  380. function f() {
  381. if (!d && this.init) {
  382. this.init.apply(this, arguments)
  383. }
  384. }
  385. f.prototype = i;
  386. f.prototype.constructor = f;
  387. f.extend = arguments.callee;
  388. return f
  389. };
  390. c.Class = a
  391. })(window.fui); (function(b) {
  392. if (!b.requestAnimationFrame) {
  393. var a = 0;
  394. b.requestAnimationFrame = b.webkitRequestAnimationFrame ||
  395. function(c, e) {
  396. var d = new Date().getTime();
  397. var g = Math.max(0, 16.7 - (d - a));
  398. var f = b.setTimeout(function() {
  399. c(d + g)
  400. },
  401. g);
  402. a = d + g;
  403. return f
  404. };
  405. b.cancelAnimationFrame = b.webkitCancelAnimationFrame || b.webkitCancelRequestAnimationFrame ||
  406. function(c) {
  407. clearTimeout(c)
  408. }
  409. }
  410. } (window)); (function(a, b) {
  411. b.validator = {
  412. validReg: function(d, e, c) {
  413. var f = {
  414. code: true,
  415. msg: ""
  416. };
  417. if (!e.test(d)) {
  418. f.code = false;
  419. f.msg = c
  420. }
  421. return f
  422. },
  423. validRegOrNull: function(d, e, c) {
  424. var f = {
  425. code: true,
  426. msg: ""
  427. };
  428. if (d == null || d == undefined || d.length == 0) {
  429. return f
  430. }
  431. if (!e.test(d)) {
  432. f.code = false;
  433. f.msg = c
  434. }
  435. return f
  436. },
  437. isNotNull: function(c) {
  438. var d = {
  439. code: true,
  440. msg: ""
  441. };
  442. c = a.trim(c);
  443. if (c == null || c == undefined || c.length == 0) {
  444. d.code = false;
  445. d.msg = "不能为空"
  446. }
  447. return d
  448. },
  449. isNum: function(c) {
  450. return b.validator.validReg(c, /^[-+]?\d+$/, "必须为数字")
  451. },
  452. isNumOrNull: function(c) {
  453. return b.validator.validRegOrNull(c, /^[-+]?\d+$/, "数字或空")
  454. },
  455. isEmail: function(c) {
  456. return b.validator.validReg(c, /^\w{3,}@\w+(\.\w+)+$/, "必须为E-mail格式")
  457. },
  458. isEmailOrNull: function(c) {
  459. return b.validator.validRegOrNull(c, /^\w{3,}@\w+(\.\w+)+$/, "必须为E-mail格式或空")
  460. },
  461. isEnglishStr: function(c) {
  462. return b.validator.validReg(c, /^[a-z,A-Z]+$/, "必须为英文字符串")
  463. },
  464. isEnglishStrOrNull: function(c) {
  465. return b.validator.validRegOrNull(c, /^[a-z,A-Z]+$/, "必须为英文字符串或空")
  466. },
  467. isTelephone: function(c) {
  468. return b.validator.validReg(c, /^(\d{3,4}\-)?[1-9]\d{6,7}$/, "必须为电话格式")
  469. },
  470. isTelephoneOrNull: function(c) {
  471. return b.validator.validRegOrNull(c, /^(\d{3,4}\-)?[1-9]\d{6,7}$/, "必须为电话格式或空")
  472. },
  473. isMobile: function(c) {
  474. return b.validator.validReg(c, /^(\+\d{2,3}\-)?\d{11}$/, "必须为手机格式")
  475. },
  476. isMobileOrnull: function(c) {
  477. return b.validator.validRegOrNull(c, /^(\+\d{2,3}\-)?\d{11}$/, "必须为手机格式或空")
  478. },
  479. isMobileOrPhone: function(c) {
  480. var d = {
  481. code: true,
  482. msg: ""
  483. };
  484. if (!b.validator.isTelephone(c).code && !b.validator.isMobile(c).code) {
  485. d.code = false;
  486. d.msg = "为电话格式或手机格式"
  487. }
  488. return d
  489. },
  490. isMobileOrPhoneOrNull: function(c) {
  491. var d = {
  492. code: true,
  493. msg: ""
  494. };
  495. if (b.validator.isNotNull(c).code && !b.validator.isTelephone(c).code && !b.validator.isMobile(c).code) {
  496. d.code = false;
  497. d.msg = "为电话格式或手机格式或空"
  498. }
  499. return d
  500. },
  501. isUri: function(c) {
  502. return b.validator.validReg(c, /^http:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/, "必须为网址格式")
  503. },
  504. isUriOrNull: function(c) {
  505. return b.validator.validRegOrNull(c, /^http:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/, "必须为网址格式或空")
  506. },
  507. isDate: function(c) {
  508. return b.validator.validReg(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/, "必须为日期格式")
  509. },
  510. isDateOrNull: function(c) {
  511. return b.validator.validRegOrNull(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/, "必须为日期格式或空")
  512. },
  513. isDateTime: function(c) {
  514. return b.validator.validReg(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/, "必须为日期时间格式")
  515. },
  516. isDateTimeOrNull: function(c) {
  517. return b.validator.validRegOrNull(c, /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/, "必须为日期时间格式")
  518. },
  519. isTime: function(c) {
  520. return b.validator.validReg(c, /^((20|21|22|23|[0-1]\d)\:[0-5][0-9])(\:[0-5][0-9])?$/, "必须为时间格式")
  521. },
  522. isTimeOrNull: function(c) {
  523. return b.validator.validRegOrNull(c, /^((20|21|22|23|[0-1]\d)\:[0-5][0-9])(\:[0-5][0-9])?$/, "必须为时间格式或空")
  524. },
  525. isChinese: function(c) {
  526. return b.validator.validReg(c, /^[\u0391-\uFFE5]+$/, "必须为中文")
  527. },
  528. isChineseOrNull: function(c) {
  529. return b.validator.validRegOrNull(c, /^[\u0391-\uFFE5]+$/, "必须为中文或空")
  530. },
  531. isZip: function(c) {
  532. return b.validator.validReg(c, /^\d{6}$/, "必须为邮编格式")
  533. },
  534. isZipOrNull: function(c) {
  535. return b.validator.validRegOrNull(c, /^\d{6}$/, "必须为邮编格式或空")
  536. },
  537. isDouble: function(c) {
  538. return b.validator.validReg(c, /^[-\+]?\d+(\.\d+)?$/, "必须为小数")
  539. },
  540. isDoubleOrNull: function(c) {
  541. return b.validator.validRegOrNull(c, /^[-\+]?\d+(\.\d+)?$/, "必须为小数或空")
  542. },
  543. isIDCard: function(c) {
  544. return b.validator.validReg(c, /^\d{15}(\d{2}[A-Za-z0-9;])?$/, "必须为身份证格式")
  545. },
  546. isIDCardOrNull: function(c) {
  547. return b.validator.validRegOrNull(c, /^\d{15}(\d{2}[A-Za-z0-9;])?$/, "必须为身份证格式或空")
  548. },
  549. isIP: function(d) {
  550. var f = {
  551. code: true,
  552. msg: ""
  553. };
  554. var e = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g;
  555. var c = false;
  556. if (e.test(d)) {
  557. if (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256) {
  558. c = true
  559. }
  560. }
  561. if (!c) {
  562. f.code = false;
  563. f.msg = "必须为IP格式"
  564. }
  565. return f
  566. },
  567. isIPOrNull: function(c) {
  568. var d = {
  569. code: true,
  570. msg: ""
  571. };
  572. if (b.validator.isNotNull(c) && !b.validator.isIP(c).code) {
  573. d.code = false;
  574. d.msg = "必须为IP格式或空"
  575. }
  576. return d
  577. },
  578. isLenNum: function(d, c) {
  579. var f = {
  580. code: true,
  581. msg: ""
  582. };
  583. var e = /^[0-9]+$/;
  584. d = a.trim(d);
  585. if (d.length > c || !e.test(d)) {
  586. f.code = false;
  587. f.msg = "必须为" + c + "位数字"
  588. }
  589. return f
  590. },
  591. isLenNumOrNull: function(d, c) {
  592. var e = {
  593. code: true,
  594. msg: ""
  595. };
  596. if (b.validator.isNotNull(d).code && !b.validator.isLenNum(d)) {
  597. e.code = false;
  598. e.msg = "必须为" + c + "位数字或空"
  599. }
  600. return e
  601. },
  602. isLenStr: function(d, c) {
  603. var e = {
  604. code: true,
  605. msg: ""
  606. };
  607. d = a.trim(d);
  608. if (!b.validator.isNotNull(d).code || d.length > c) {
  609. e.code = false;
  610. e.msg = "必须小于等于" + c + "位字符"
  611. }
  612. return e
  613. },
  614. isLenStrOrNull: function(d, c) {
  615. var e = {
  616. code: true,
  617. msg: ""
  618. };
  619. d = a.trim(d);
  620. if (b.validator.isNotNull(d).code && d.length > c) {
  621. e.code = false;
  622. e.msg = "必须小于等于" + c + "位字符或空"
  623. }
  624. return e
  625. }
  626. }
  627. })(window.jQuery, window.fui); (function(k, B) {
  628. k.gestures = {
  629. session: {}
  630. };
  631. k.preventDefault = function(C) {
  632. C.preventDefault()
  633. };
  634. k.stopPropagation = function(C) {
  635. C.stopPropagation()
  636. };
  637. k.addGesture = function(C) {
  638. return k.addAction("gestures", C)
  639. };
  640. var w = Math.round;
  641. var a = Math.abs;
  642. var y = Math.sqrt;
  643. var b = Math.atan;
  644. var c = Math.atan2;
  645. var n = function(C, D, E) {
  646. if (!E) {
  647. E = ["x", "y"]
  648. }
  649. var F = D[E[0]] - C[E[0]];
  650. var G = D[E[1]] - C[E[1]];
  651. return y((F * F) + (G * G))
  652. };
  653. var q = function(E, C) {
  654. if (E.length >= 2 && C.length >= 2) {
  655. var D = ["pageX", "pageY"];
  656. return n(C[1], C[0], D) / n(E[1], E[0], D)
  657. }
  658. return 1
  659. };
  660. var l = function(C, D, E) {
  661. if (!E) {
  662. E = ["x", "y"]
  663. }
  664. var F = D[E[0]] - C[E[0]];
  665. var G = D[E[1]] - C[E[1]];
  666. return c(G, F) * 180 / Math.PI
  667. };
  668. var m = function(C, D) {
  669. if (C === D) {
  670. return ""
  671. }
  672. if (a(C) >= a(D)) {
  673. return C > 0 ? "left": "right"
  674. }
  675. return D > 0 ? "up": "down"
  676. };
  677. var p = function(E, C) {
  678. var D = ["pageX", "pageY"];
  679. return l(C[1], C[0], D) - l(E[1], E[0], D)
  680. };
  681. var s = function(C, D, E) {
  682. return {
  683. x: D / C || 0,
  684. y: E / C || 0
  685. }
  686. };
  687. var j = function(C, D) {
  688. if (k.gestures.stoped) {
  689. return
  690. }
  691. k.doAction("gestures",
  692. function(F, E) {
  693. if (!k.gestures.stoped) {
  694. if (k.options.gestureConfig[E.name] !== false) {
  695. E.handle(C, D)
  696. }
  697. }
  698. })
  699. };
  700. var u = function(C, D) {
  701. while (C) {
  702. if (C == D) {
  703. return true
  704. }
  705. C = C.parentNode
  706. }
  707. return false
  708. };
  709. var A = function(H, D, F) {
  710. var E = [];
  711. var J = [];
  712. var C = 0;
  713. while (C < H.length) {
  714. var I = D ? H[C][D] : H[C];
  715. if (J.indexOf(I) < 0) {
  716. E.push(H[C])
  717. }
  718. J[C] = I;
  719. C++
  720. }
  721. if (F) {
  722. if (!D) {
  723. E = E.sort()
  724. } else {
  725. E = E.sort(function G(K, L) {
  726. return K[D] > L[D]
  727. })
  728. }
  729. }
  730. return E
  731. };
  732. var o = function(D) {
  733. var E = D.length;
  734. if (E === 1) {
  735. return {
  736. x: w(D[0].pageX),
  737. y: w(D[0].pageY)
  738. }
  739. }
  740. var F = 0;
  741. var G = 0;
  742. var C = 0;
  743. while (C < E) {
  744. F += D[C].pageX;
  745. G += D[C].pageY;
  746. C++
  747. }
  748. return {
  749. x: w(F / E),
  750. y: w(G / E)
  751. }
  752. };
  753. var v = function() {
  754. return k.options.gestureConfig.pinch
  755. };
  756. var i = function(D) {
  757. var E = [];
  758. var C = 0;
  759. while (C < D.touches.length) {
  760. E[C] = {
  761. pageX: w(D.touches[C].pageX),
  762. pageY: w(D.touches[C].pageY)
  763. };
  764. C++
  765. }
  766. return {
  767. timestamp: k.now(),
  768. gesture: D.gesture,
  769. touches: E,
  770. center: o(D.touches),
  771. deltaX: D.deltaX,
  772. deltaY: D.deltaY
  773. }
  774. };
  775. var e = function(H) {
  776. var G = k.gestures.session;
  777. var C = H.center;
  778. var D = G.offsetDelta || {};
  779. var E = G.prevDelta || {};
  780. var F = G.prevTouch || {};
  781. if (H.gesture.type === k.event.start || H.gesture.type === k.event.end) {
  782. E = G.prevDelta = {
  783. x: F.deltaX || 0,
  784. y: F.deltaY || 0
  785. };
  786. D = G.offsetDelta = {
  787. x: C.x,
  788. y: C.y
  789. }
  790. }
  791. H.deltaX = E.x + (C.x - D.x);
  792. H.deltaY = E.y + (C.y - D.y)
  793. };
  794. var g = function(H) {
  795. var G = k.gestures.session;
  796. var I = H.touches;
  797. var J = I.length;
  798. if (!G.firstTouch) {
  799. G.firstTouch = i(H)
  800. }
  801. if (v() && J > 1 && !G.firstMultiTouch) {
  802. G.firstMultiTouch = i(H)
  803. } else {
  804. if (J === 1) {
  805. G.firstMultiTouch = false
  806. }
  807. }
  808. var E = G.firstTouch;
  809. var D = G.firstMultiTouch;
  810. var F = D ? D.center: E.center;
  811. var C = H.center = o(I);
  812. H.timestamp = k.now();
  813. H.deltaTime = H.timestamp - E.timestamp;
  814. H.angle = l(F, C);
  815. H.distance = n(F, C);
  816. e(H);
  817. H.offsetDirection = m(H.deltaX, H.deltaY);
  818. H.scale = D ? q(D.touches, I) : 1;
  819. H.rotation = D ? p(D.touches, I) : 0;
  820. f(H)
  821. };
  822. var d = 25;
  823. var f = function(I) {
  824. var H = k.gestures.session;
  825. var G = H.lastInterval || I;
  826. var C = I.timestamp - G.timestamp;
  827. var K;
  828. var L;
  829. var M;
  830. var F;
  831. if (I.gesture.type != k.event.cancel && (C > d || G.velocity === undefined)) {
  832. var D = G.deltaX - I.deltaX;
  833. var E = G.deltaY - I.deltaY;
  834. var J = s(C, D, E);
  835. L = J.x;
  836. M = J.y;
  837. K = (a(J.x) > a(J.y)) ? J.x: J.y;
  838. F = m(D, E) || G.direction;
  839. H.lastInterval = I
  840. } else {
  841. K = G.velocity;
  842. L = G.velocityX;
  843. M = G.velocityY;
  844. F = G.direction
  845. }
  846. I.velocity = K;
  847. I.velocityX = L;
  848. I.velocityY = M;
  849. I.direction = F
  850. };
  851. var z = {};
  852. var h = function(D) {
  853. for (var C = 0; C < D.length; C++) { ! D.identifier && (D.identifier = 0)
  854. }
  855. return D
  856. };
  857. var r = function(G, K) {
  858. var C = h(k.slice.call(G.touches || [G]));
  859. var M = G.type;
  860. var J = [];
  861. var D = [];
  862. if ((M === k.event.start || M === k.event.move) && C.length === 1) {
  863. z[C[0].identifier] = true;
  864. J = C;
  865. D = C;
  866. K.target = G.target
  867. } else {
  868. var H = 0;
  869. var J = [];
  870. var D = [];
  871. var E = h(k.slice.call(G.changedTouches || [G]));
  872. K.target = G.target;
  873. var I = k.gestures.session.target || G.target;
  874. J = C.filter(function(N) {
  875. return u(N.target, I)
  876. });
  877. if (M === k.event.start) {
  878. H = 0;
  879. while (H < J.length) {
  880. z[J[H].identifier] = true;
  881. H++
  882. }
  883. }
  884. H = 0;
  885. while (H < E.length) {
  886. if (z[E[H].identifier]) {
  887. D.push(E[H])
  888. }
  889. if (M === k.event.end || M === k.event.cancel) {
  890. delete z[E[H].identifier]
  891. }
  892. H++
  893. }
  894. if (!D.length) {
  895. return false
  896. }
  897. }
  898. J = A(J.concat(D), "identifier", true);
  899. var L = J.length;
  900. var F = D.length;
  901. if (M === k.event.start && L - F === 0) {
  902. K.isFirst = true;
  903. k.gestures.touch = k.gestures.session = {
  904. target: G.target
  905. }
  906. }
  907. K.isFinal = ((M === k.event.end || M === k.event.cancel) && (L - F === 0));
  908. K.touches = J;
  909. K.changedTouches = D;
  910. return true
  911. };
  912. var t = function(C) {
  913. var D = {
  914. gesture: C
  915. };
  916. var E = r(C, D);
  917. if (!E) {
  918. return
  919. }
  920. g(D);
  921. j(C, D);
  922. k.gestures.session.prevTouch = D;
  923. if (C.type === k.event.end && !k.event.supportTouch) {
  924. k.gestures.touch = k.gestures.session = {}
  925. }
  926. };
  927. B.addEventListener(k.event.start, t);
  928. B.addEventListener(k.event.move, t, {
  929. passive: false
  930. });
  931. B.addEventListener(k.event.end, t);
  932. B.addEventListener(k.event.cancel, t);
  933. k.isScrolling = false;
  934. var x = null;
  935. B.addEventListener("scroll",
  936. function() {
  937. k.isScrolling = true;
  938. x && clearTimeout(x);
  939. x = setTimeout(function() {
  940. k.isScrolling = false
  941. },
  942. 250)
  943. })
  944. })(window.fui, window); (function(a, c) {
  945. var b = function(d, f) {
  946. var e = a.gestures.session;
  947. switch (d.type) {
  948. case a.event.start:
  949. break;
  950. case a.event.move:
  951. if (!f.direction || !e.target) {
  952. return
  953. }
  954. if (e.lockDirection && e.startDirection) {
  955. if (e.startDirection && e.startDirection !== f.direction) {
  956. if (e.startDirection === "up" || e.startDirection === "down") {
  957. f.direction = f.deltaY < 0 ? "up": "down"
  958. } else {
  959. f.direction = f.deltaX < 0 ? "left": "right"
  960. }
  961. }
  962. }
  963. if (!e.drag) {
  964. e.drag = true;
  965. a.trigger(e.target, c + "start", f)
  966. }
  967. a.trigger(e.target, c, f);
  968. a.trigger(e.target, c + f.direction, f);
  969. break;
  970. case a.event.end:
  971. case a.event.cancel:
  972. if (e.drag && f.isFinal) {
  973. a.trigger(e.target, c + "end", f)
  974. }
  975. break
  976. }
  977. };
  978. a.addGesture({
  979. name: c,
  980. index: 20,
  981. handle: b,
  982. options: {
  983. fingers: 1
  984. }
  985. })
  986. })(fui, "drag"); (function(b, d) {
  987. var a = 0;
  988. var c = function(e, i) {
  989. var h = b.gestures.session;
  990. var g = this.options;
  991. var f = b.now();
  992. switch (e.type) {
  993. case b.event.move:
  994. if (f - a > 300) {
  995. a = f;
  996. h.flickStart = i.center
  997. }
  998. break;
  999. case b.event.end:
  1000. case b.event.cancel:
  1001. i.flick = false;
  1002. if (h.flickStart && g.flickMaxTime > (f - a) && i.distance > g.flickMinDistince) {
  1003. i.flick = true;
  1004. i.flickTime = f - a;
  1005. i.flickDistanceX = i.center.x - h.flickStart.x;
  1006. i.flickDistanceY = i.center.y - h.flickStart.y;
  1007. b.trigger(h.target, d, i);
  1008. b.trigger(h.target, d + i.direction, i)
  1009. }
  1010. break
  1011. }
  1012. };
  1013. b.addGesture({
  1014. name: d,
  1015. index: 5,
  1016. handle: c,
  1017. options: {
  1018. flickMaxTime: 200,
  1019. flickMinDistince: 10
  1020. }
  1021. })
  1022. })(fui, "flick"); (function(a, c) {
  1023. var d;
  1024. var b = function(e, h) {
  1025. var g = a.gestures.session;
  1026. var f = this.options;
  1027. switch (e.type) {
  1028. case a.event.start:
  1029. if (a.options.gestureConfig.hold) {
  1030. d && clearTimeout(d);
  1031. d = setTimeout(function() {
  1032. h.hold = true;
  1033. a.trigger(g.target, c, h)
  1034. },
  1035. f.holdTimeout)
  1036. }
  1037. break;
  1038. case a.event.move:
  1039. break;
  1040. case a.event.end:
  1041. case a.evetn.cancel:
  1042. if (d) {
  1043. clearTimeout(d) && (d = null);
  1044. a.trigger(g.target, "release", h)
  1045. }
  1046. break
  1047. }
  1048. };
  1049. a.addGesture({
  1050. name: c,
  1051. index: 10,
  1052. handle: b,
  1053. options: {
  1054. fingers: 1,
  1055. holdTimeout: 0
  1056. }
  1057. })
  1058. })(fui, "hold"); (function(a, c) {
  1059. var b = function(d, k) {
  1060. var f = this.options;
  1061. var j = a.gestures.session;
  1062. switch (d.type) {
  1063. case a.event.start:
  1064. break;
  1065. case a.event.move:
  1066. if (a.options.gestureConfig.pinch) {
  1067. if (k.touches.length < 2) {
  1068. return
  1069. }
  1070. if (!j.pinch) {
  1071. j.pinch = true;
  1072. a.trigger(j.target, c + "start", k)
  1073. }
  1074. a.trigger(j.target, c, k);
  1075. var h = k.scale;
  1076. var g = k.rotation;
  1077. var e = typeof k.lastScale === "undefined" ? 1 : k.lastScale;
  1078. var i = 1e-12;
  1079. if (h > e) {
  1080. e = h - i;
  1081. a.trigger(j.target, c + "out", k)
  1082. } else {
  1083. if (h < e) {
  1084. e = h + i;
  1085. a.trigger(j.target, c + "in", k)
  1086. }
  1087. }
  1088. if (Math.abs(g) > f.minRotationAngle) {
  1089. a.trigger(j.target, "rotate", k)
  1090. }
  1091. }
  1092. break;
  1093. case a.event.end:
  1094. case a.event.cancel:
  1095. if (a.options.gestureConfig.pinch && j.pinch && k.touches.length === 2) {
  1096. j.pinch = false;
  1097. a.trigger(j.target, c + "end", k)
  1098. }
  1099. break
  1100. }
  1101. };
  1102. a.addGesture({
  1103. name: c,
  1104. index: 10,
  1105. handle: b,
  1106. options: {
  1107. minRotationAngle: 0
  1108. }
  1109. })
  1110. })(fui, "pinch"); (function(a, c) {
  1111. var b = function(d, g) {
  1112. var f = a.gestures.session;
  1113. if (d.type === a.event.end || d.type === a.event.cancel) {
  1114. var e = this.options;
  1115. g.swipe = false;
  1116. if (g.direction && e.swipeMaxTime > g.deltaTime && g.distance > e.swipeMinDistince) {
  1117. g.swipe = true;
  1118. a.trigger(f.target, c, g);
  1119. a.trigger(f.target, c + g.direction, g)
  1120. }
  1121. }
  1122. };
  1123. a.addGesture({
  1124. name: c,
  1125. index: 10,
  1126. handle: b,
  1127. options: {
  1128. swipeMaxTime: 300,
  1129. swipeMinDistince: 18
  1130. }
  1131. })
  1132. })(fui, "fswipe"); (function(l, t, o) {
  1133. var m = l([]),
  1134. q = l.resize = l.extend(l.resize, {}),
  1135. u,
  1136. w = "setTimeout",
  1137. v = "resize",
  1138. p = v + "-special-event",
  1139. n = "delay",
  1140. r = "throttleWindow";
  1141. q[n] = 250;
  1142. q[r] = true;
  1143. l.event.special[v] = {
  1144. setup: function() {
  1145. if (!q[r] && this[w]) {
  1146. return false
  1147. }
  1148. var a = l(this);
  1149. m = m.add(a);
  1150. l.data(this, p, {
  1151. w: a.width(),
  1152. h: a.height()
  1153. });
  1154. if (m.length === 1) {
  1155. s()
  1156. }
  1157. },
  1158. teardown: function() {
  1159. if (!q[r] && this[w]) {
  1160. return false
  1161. }
  1162. var a = l(this);
  1163. m = m.not(a);
  1164. a.removeData(p);
  1165. if (!m.length) {
  1166. clearTimeout(u)
  1167. }
  1168. },
  1169. add: function(a) {
  1170. if (!q[r] && this[w]) {
  1171. return false
  1172. }
  1173. var c;
  1174. function b(h, d, e) {
  1175. var f = l(this),
  1176. g = l.data(this, p);
  1177. g.w = d !== o ? d: f.width();
  1178. g.h = e !== o ? e: f.height();
  1179. c.apply(this, arguments)
  1180. }
  1181. if (l.isFunction(a)) {
  1182. c = a;
  1183. return b
  1184. } else {
  1185. c = a.handler;
  1186. a.handler = b
  1187. }
  1188. }
  1189. };
  1190. function s() {
  1191. u = t[w](function() {
  1192. m.each(function() {
  1193. var c = l(this),
  1194. b = c.width(),
  1195. a = c.height(),
  1196. d = l.data(this, p);
  1197. if (b !== d.w || a !== d.h) {
  1198. c.trigger(v, [d.w = b, d.h = a])
  1199. }
  1200. });
  1201. s()
  1202. },
  1203. q[n])
  1204. }
  1205. })(jQuery, this); (function(a, d) {
  1206. var g = {};
  1207. var f = 0;
  1208. var e = 0;
  1209. var c = false;
  1210. var b = {
  1211. doQueue: function() {
  1212. if (!c) {
  1213. c = true;
  1214. var h = g[e];
  1215. if (h) {
  1216. b[h.type](h.op,
  1217. function() {
  1218. delete g[e];
  1219. e++;
  1220. c = false;
  1221. if (e < f) {
  1222. b.doQueue()
  1223. }
  1224. })
  1225. } else {
  1226. c = false;
  1227. if (e < f) {
  1228. e++;
  1229. b.doQueue()
  1230. }
  1231. }
  1232. }
  1233. },
  1234. open: function(k, j) {
  1235. var l = null;
  1236. if (d.nav.page.data[k.id]) {
  1237. l = d.nav.page.data[k.id];
  1238. l.load = false;
  1239. var h = l.op.fclass;
  1240. l.preid = d.nav.page.activeid || "";
  1241. l.op = k;
  1242. l.$page.removeAttr("style");
  1243. l.$page.attr("data-type", k.type);
  1244. l.$page.removeClass(h);
  1245. l.$page.addClass(k.fclass);
  1246. l.hasLoad = true
  1247. } else {
  1248. k.pageid = d.guid();
  1249. var i = '<div class="f-page ' + k.fclass + '" data-type="' + k.type + '" id="' + k.pageid + '">';
  1250. i += '<div class="f-page-header" >';
  1251. i += '<div class="f-page-backbtn" > ' + k.backbtn + " </div>";
  1252. i += '<div class="f-page-title">' + k.title + "</div>";
  1253. i += "</div>";
  1254. i += '<div class="f-page-body"></div>';
  1255. i += "</div>";
  1256. a("body").append(i);
  1257. l = {
  1258. $page: a("#" + k.pageid),
  1259. preid: d.nav.page.activeid || "",
  1260. op: k,
  1261. load: false
  1262. };
  1263. d.nav.page.data[k.id] = l;
  1264. d.nav.page.count++;
  1265. b.bindEvent(l.$page)
  1266. }
  1267. d.nav.page.activeid = k.id;
  1268. k.start && k.start(l);
  1269. switch (k.type) {
  1270. case "right":
  1271. l.$page.animate({
  1272. left:
  1273. "0px"
  1274. },
  1275. 200,
  1276. function() {
  1277. b.addPage(l);
  1278. j()
  1279. });
  1280. break;
  1281. case "bottom":
  1282. l.$page.animate({
  1283. top:
  1284. "0px"
  1285. },
  1286. 200,
  1287. function() {
  1288. b.addPage(l);
  1289. j()
  1290. });
  1291. break;
  1292. default:
  1293. l.$page.fadeIn(function() {
  1294. b.addPage(l);
  1295. j()
  1296. });
  1297. break
  1298. }
  1299. },
  1300. close: function(k, i) {
  1301. var j = k.op;
  1302. if (j.bfdestroy) {
  1303. if (!j.bfdestroy(k, "backbtn")) {
  1304. i()
  1305. }
  1306. }
  1307. d.nav.page.activeid = "";
  1308. if (k.preid) {
  1309. var h = d.nav.page.data[k.preid];
  1310. h.load = false;
  1311. h.$page.show();
  1312. d.nav.page.activeid = k.preid;
  1313. h = null
  1314. }
  1315. k.$page.css({
  1316. "z-index": 3
  1317. });
  1318. switch (j.type) {
  1319. case "right":
  1320. k.$page.animate({
  1321. left:
  1322. "100%"
  1323. },
  1324. 200,
  1325. function() {
  1326. b.removePage(k);
  1327. i()
  1328. });
  1329. break;
  1330. case "bottom":
  1331. k.$page.animate({
  1332. top:
  1333. "100%"
  1334. },
  1335. 200,
  1336. function() {
  1337. b.removePage(k);
  1338. i()
  1339. });
  1340. break;
  1341. default:
  1342. k.$page.fadeOut(function() {
  1343. b.removePage(k);
  1344. i()
  1345. });
  1346. break
  1347. }
  1348. },
  1349. bindEvent: function(h) {
  1350. h.find(".f-page-backbtn").on("tap",
  1351. function() {
  1352. var i = d.nav.page.activeid;
  1353. var j = d.nav.page.data[i];
  1354. if (!j.load) {
  1355. return false
  1356. }
  1357. g[f] = {
  1358. type: "close",
  1359. op: j
  1360. };
  1361. f++;
  1362. b.doQueue();
  1363. return false
  1364. })
  1365. },
  1366. addPage: function(i) {
  1367. if (i.preid != "") {
  1368. var h = d.nav.page.data[i.preid];
  1369. h.$page.hide()
  1370. }
  1371. i.$page.css({
  1372. "z-index": 1
  1373. });
  1374. i.op.end && i.op.end(i);
  1375. i.load = true
  1376. },
  1377. removePage: function(i) {
  1378. i.$page.remove();
  1379. i.$page = null;
  1380. a('[data-page="' + i.op.pageid + '"]').remove();
  1381. i.op.destroy && i.op.destroy(i);
  1382. if (i.preid) {
  1383. var h = d.nav.page.data[i.preid];
  1384. if (h.op.end) {
  1385. h.hasLoad = true;
  1386. h.op.end(h)
  1387. }
  1388. h.load = true
  1389. }
  1390. d.nav.page.count--;
  1391. d.nav.page.data[i.op.id] = null
  1392. },
  1393. remove: function(h) {
  1394. var i = d.nav.page.data[h];
  1395. if (i != null) {
  1396. i.$page.remove();
  1397. i.$page = null;
  1398. a('[data-page="' + i.op.pageid + '"]').remove();
  1399. d.nav.page.count--;
  1400. d.nav.page.data[i.op.id] = null;
  1401. i = null
  1402. }
  1403. }
  1404. };
  1405. d.nav = {
  1406. page: {
  1407. data: {},
  1408. count: 0,
  1409. activeid: ""
  1410. },
  1411. go: function(i) {
  1412. var h = {
  1413. id: "",
  1414. title: "",
  1415. type: "",
  1416. backbtn: '<a href="#">返回</a>',
  1417. fclass: "",
  1418. start: false,
  1419. end: false,
  1420. bfdestroy: false,
  1421. destroy: false
  1422. };
  1423. a.extend(h, i || {});
  1424. g[f] = {
  1425. type: "open",
  1426. op: i
  1427. };
  1428. f++;
  1429. b.doQueue()
  1430. },
  1431. closeCurrent: function() {
  1432. var h = d.nav.page.activeid;
  1433. var i = d.nav.page.data[h];
  1434. g[f] = {
  1435. type: "close",
  1436. op: i
  1437. };
  1438. f++;
  1439. b.doQueue()
  1440. },
  1441. close: function(h) {
  1442. b.remove(h)
  1443. }
  1444. }
  1445. })(window.jQuery, window.fui); (function(a, b) {
  1446. b.layer = {
  1447. open: function(f) {
  1448. var e = {
  1449. title: "",
  1450. backbtn: '<a href="#">返回</a>',
  1451. open: false,
  1452. close: false,
  1453. cancel: false,
  1454. };
  1455. a.extend(e, f || {});
  1456. e.layerid = b.guid();
  1457. var d = ' <div class="f-layer" id="' + e.layerid + '"> <div class="f-layer-closebtn" >关闭</div> <div class="f-layer-cancelbtn" >取消</div> <div class="f-layer-page" data-level="0" > <div class="f-layer-page-header" > <div class="f-layer-page-title">' + e.title + '</div> </div> <div class="f-layer-page-body"></div> </div> <div class="f-layer-mask" ></div></div>';
  1458. a("body").append(d);
  1459. var c = a("#" + e.layerid);
  1460. c[0].fop = e;
  1461. c.find(".f-layer-cancelbtn").on("tap",
  1462. function() {
  1463. var h = a(this);
  1464. var g = h.parent();
  1465. g.animate({
  1466. top: "100%"
  1467. },
  1468. 200,
  1469. function() {
  1470. var i = a(this)[0].fop;
  1471. setTimeout(function() {
  1472. var j = a("#" + i.layerid);
  1473. j.remove();
  1474. i.cancel && i.cancel();
  1475. j = null
  1476. },
  1477. 100)
  1478. })
  1479. });
  1480. c.find(".f-layer-closebtn").on("tap",
  1481. function() {
  1482. var h = a(this);
  1483. var g = h.parent();
  1484. var j = g[0].fop;
  1485. var i = g.find('[data-level="' + j.level + '"]');
  1486. g.find(".f-layer-closebtn").hide();
  1487. g.find(".f-layer-page").show();
  1488. i.animate({
  1489. left: "100%"
  1490. },
  1491. 200,
  1492. function() {
  1493. var k = a(this);
  1494. var l = k.parent()[0].fop;
  1495. l.level = 0;
  1496. setTimeout(function() {
  1497. g.find(".f-layer-left-page").remove();
  1498. l.close && l.close(l.layerid, l.level, l);
  1499. g = null
  1500. },
  1501. 100)
  1502. })
  1503. });
  1504. e.level = 0;
  1505. c.animate({
  1506. top: "0px"
  1507. },
  1508. 200,
  1509. function() {
  1510. var g = a(this)[0].fop;
  1511. setTimeout(function() {
  1512. var h = a("#" + g.layerid + ' [data-level="' + g.level + '"] .f-layer-page-body');
  1513. g.open && g.open(h, g.layerid, g.level, g)
  1514. },
  1515. 100)
  1516. });
  1517. c = null
  1518. },
  1519. iopen: function(h, i) {
  1520. var c = a("#" + h);
  1521. var d = c.find(".f-layer-mask");
  1522. d.show();
  1523. var g = c[0].fop;
  1524. g.level = g.level + 1;
  1525. var f = ' <div class="f-layer-left-page" data-level="' + g.level + '" > <div class="f-layer-page-header" > <div class="f-layer-page-backbtn" >' + g.backbtn + '</div> <div class="f-layer-page-title">' + i + '</div> </div> <div class="f-layer-page-body"></div></div>';
  1526. c.append(f);
  1527. var e = c.find('[data-level="' + g.level + '"]');
  1528. e.find(".f-layer-page-backbtn").on("tap",
  1529. function() {
  1530. var j = a(this);
  1531. var l = j.parents(".f-layer-left-page");
  1532. var k = l.parent();
  1533. var m = k[0].fop;
  1534. m.level = m.level - 1;
  1535. if (m.level < 2) {
  1536. k.find(".f-layer-closebtn").hide()
  1537. }
  1538. k.find('[data-level="' + m.level + '"]').show();
  1539. l.css({
  1540. "z-index": 5
  1541. });
  1542. l.animate({
  1543. left: "100%"
  1544. },
  1545. 200,
  1546. function() {
  1547. var n = a(this);
  1548. var o = n.parent()[0].fop;
  1549. setTimeout(function() {
  1550. n.remove();
  1551. o.close && o.close(o.layerid, o.level, o)
  1552. },
  1553. 100)
  1554. })
  1555. });
  1556. e.animate({
  1557. left: "0px"
  1558. },
  1559. 200,
  1560. function() {
  1561. var k = a(this);
  1562. k.css({
  1563. "z-index": 4
  1564. });
  1565. var j = k.parent();
  1566. var l = j[0].fop;
  1567. if (l.level >= 2) {
  1568. j.find(".f-layer-closebtn").show()
  1569. }
  1570. j.find('[data-level="' + (l.level - 1) + '"]').hide();
  1571. setTimeout(function() {
  1572. var m = k.find(".f-layer-page-body");
  1573. l.open && l.open(m, l.layerid, l.level, l)
  1574. },
  1575. 100);
  1576. d.hide()
  1577. });
  1578. c = null
  1579. },
  1580. close: function(c) {
  1581. a("#" + c + " .f-layer-cancelbtn").trigger("click")
  1582. },
  1583. iclose: function(c) {
  1584. a("#" + c + " .f-layer-closebtn").trigger("click")
  1585. },
  1586. closeLayer: function(d) {
  1587. var c = a("#" + d);
  1588. var e = c[0].fop.level;
  1589. c.find('[data-level="' + e + '"] .f-layer-page-backbtn').trigger("click")
  1590. }
  1591. }
  1592. })(window.jQuery, window.fui); (function(a, c) {
  1593. var e = navigator.platform.toLowerCase();
  1594. var f = navigator.userAgent.toLowerCase();
  1595. var d = (f.indexOf("iphone") > -1 || f.indexOf("ipad") > -1 || f.indexOf("ipod") > -1) && (e.indexOf("iphone") > -1 || e.indexOf("ipad") > -1 || e.indexOf("ipod") > -1);
  1596. var b = {
  1597. init: function(g, i) {
  1598. var h = '<div class="f-pciker-rule"></div><ul class="f-pciker-list"></ul>';
  1599. g.addClass("f-picker");
  1600. g.html(h);
  1601. b.initParams(g);
  1602. b.initData(g, i);
  1603. b.bindEvent(g)
  1604. },
  1605. initParams: function(g) {
  1606. var h = g[0];
  1607. h.list = g.find("ul")[0];
  1608. h.height = h.offsetHeight;
  1609. h.r = h.height / 2 - 10;
  1610. h.d = h.r * 2;
  1611. h.itemHeight = 40;
  1612. h.itemAngle = parseInt(b.calcAngle(h, h.itemHeight * 0.8));
  1613. h.hightlightRange = h.itemAngle / 2;
  1614. h.visibleRange = 90;
  1615. h.beginAngle = 0;
  1616. h.beginExceed = h.beginAngle - 30;
  1617. h.list.angle = h.beginAngle;
  1618. h.lastMoveTime = 0;
  1619. h.lastMoveStart = 0;
  1620. h.stopInertiaMove = false;
  1621. h.lastAngle = 0;
  1622. h.startY = null;
  1623. h.isPicking = false;
  1624. h.selected = null;
  1625. h.preselected = null;
  1626. h.list.style.webkitTransition = "150ms ease-out";
  1627. if (d) {
  1628. h.list.style.webkitTransformOrigin = "center center " + h.r + "px"
  1629. }
  1630. },
  1631. initData: function(i, k) {
  1632. var g = i.find("ul");
  1633. g.html("");
  1634. var l = i[0];
  1635. l.items = [];
  1636. var j = "";
  1637. k.data = k.data || [];
  1638. a.each(k.data,
  1639. function(m, o) {
  1640. var n = {
  1641. id: m,
  1642. text: o[k.text],
  1643. value: o[k.value],
  1644. angle: l.itemAngle * m,
  1645. obj: o
  1646. };
  1647. l.endAngle = n.angle;
  1648. l.items.push(n);
  1649. if (m <= 20) {
  1650. j += '<li data-index="' + m + '" style="transform-origin: center center -' + l.r + "px; transform: translateZ(" + l.r + "px) rotateX(-" + n.angle + 'deg);">' + n.text + "</li>"
  1651. }
  1652. });
  1653. l.beginindex = 0;
  1654. l.endindex = 20;
  1655. l.endExceed = l.endAngle + 30;
  1656. g.html(j);
  1657. b.setAngle(l, l.beginAngle);
  1658. if ( !! l.selected) {
  1659. var h = a(l);
  1660. h.trigger("change");
  1661. if ( !! k.change) {
  1662. k.change(l.selected.obj, h)
  1663. }
  1664. }
  1665. },
  1666. bindEvent: function(g) {
  1667. var h = g[0];
  1668. h.addEventListener(c.event.start,
  1669. function(i) {
  1670. var j = a(this)[0];
  1671. j.isPicking = true;
  1672. i.preventDefault();
  1673. j.list.style.webkitTransition = "";
  1674. j.startY = (i.changedTouches ? i.changedTouches[0] : i).pageY;
  1675. j.lastAngle = j.list.angle;
  1676. b.updateInertiaParams(j, i, true)
  1677. },
  1678. false);
  1679. h.addEventListener(c.event.end,
  1680. function(i) {
  1681. var j = a(this)[0];
  1682. j.isPicking = false;
  1683. i.preventDefault();
  1684. b.startInertiaScroll(j, i)
  1685. },
  1686. false);
  1687. h.addEventListener(c.event.cancel,
  1688. function(i) {
  1689. var j = a(this)[0];
  1690. j.isPicking = false;
  1691. i.preventDefault();
  1692. b.startInertiaScroll(j, i)
  1693. },
  1694. false);
  1695. h.addEventListener(c.event.move,
  1696. function(l) {
  1697. var n = a(this)[0];
  1698. if (!n.isPicking) {
  1699. return
  1700. }
  1701. l.preventDefault();
  1702. var k = (l.changedTouches ? l.changedTouches[0] : l).pageY;
  1703. var j = k - n.startY;
  1704. var i = b.calcAngle(n, j);
  1705. var m = j > 0 ? n.lastAngle - i: n.lastAngle + i;
  1706. if (m > n.endExceed) {
  1707. m = n.endExceed
  1708. }
  1709. if (m < n.beginExceed) {
  1710. m = n.beginExceed
  1711. }
  1712. b.setAngle(n, m);
  1713. b.updateInertiaParams(n, l)
  1714. },
  1715. false)
  1716. },
  1717. updateInertiaParams: function(k, g, h) {
  1718. var j = g.changedTouches ? g.changedTouches[0] : g;
  1719. if (h) {
  1720. k.lastMoveStart = j.pageY;
  1721. k.lastMoveTime = g.timeStamp || Date.now();
  1722. k.startAngle = k.list.angle
  1723. } else {
  1724. var i = g.timeStamp || Date.now();
  1725. if (i - k.lastMoveTime > 300) {
  1726. k.lastMoveTime = i;
  1727. k.lastMoveStart = j.pageY
  1728. }
  1729. }
  1730. k.stopInertiaMove = true
  1731. },
  1732. startInertiaScroll: function(o, l) {
  1733. var n = l.changedTouches ? l.changedTouches[0] : l;
  1734. var m = l.timeStamp || Date.now();
  1735. var r = (n.pageY - o.lastMoveStart) / (m - o.lastMoveTime);
  1736. var h = r > 0 ? -1 : 1;
  1737. var g = h * 0.0006 * -1;
  1738. var k = Math.abs(r / g);
  1739. var i = r * k / 2;
  1740. var q = o.list.angle;
  1741. var j = b.calcAngle(o, i) * h;
  1742. var p = j;
  1743. if (q + j < o.beginExceed) {
  1744. j = o.beginExceed - q;
  1745. k = k * (j / p) * 0.6
  1746. }
  1747. if (q + j > o.endExceed) {
  1748. j = o.endExceed - q;
  1749. k = k * (j / p) * 0.6
  1750. }
  1751. if (j == 0) {
  1752. b.endScroll(o);
  1753. return
  1754. }
  1755. b.scrollDistAngle(o, m, q, j, k)
  1756. },
  1757. scrollDistAngle: function(j, i, k, g, h) {
  1758. j.stopInertiaMove = false; (function(p, q, l, m) {
  1759. var n = 13;
  1760. var r = m / n;
  1761. var s = 0; (function o() {
  1762. if (j.stopInertiaMove) {
  1763. return
  1764. }
  1765. var t = b.quartEaseOut(s, q, l, r);
  1766. b.setAngle(j, t);
  1767. s++;
  1768. if (s > r - 1 || t < j.beginExceed || t > j.endExceed) {
  1769. b.endScroll(j);
  1770. return
  1771. }
  1772. setTimeout(o, n)
  1773. })()
  1774. })(i, k, g, h)
  1775. },
  1776. endScroll: function(j) {
  1777. if (j.list.angle < j.beginAngle) {
  1778. j.list.style.webkitTransition = "150ms ease-out";
  1779. b.setAngle(j, j.beginAngle)
  1780. } else {
  1781. if (j.list.angle > j.endAngle) {
  1782. j.list.style.webkitTransition = "150ms ease-out";
  1783. b.setAngle(j, j.endAngle)
  1784. } else {
  1785. var h = parseInt((j.list.angle / j.itemAngle).toFixed(0));
  1786. j.list.style.webkitTransition = "100ms ease-out";
  1787. b.setAngle(j, j.itemAngle * h)
  1788. }
  1789. }
  1790. if (j.preselected != j.selected) {
  1791. var g = a(j);
  1792. var i = j.fop;
  1793. g.trigger("change");
  1794. if ( !! i.change) {
  1795. i.change(j.selected.obj, g)
  1796. }
  1797. }
  1798. },
  1799. calcElementItemVisibility: function(o, l) {
  1800. var h = a(o);
  1801. var g = h.find("ul");
  1802. var k = "";
  1803. var q = 0;
  1804. var p = o.items.length;
  1805. a.each(o.items,
  1806. function(i, s) {
  1807. var r = Math.abs(s.angle - l);
  1808. if (r < o.hightlightRange) {
  1809. o.selected = s;
  1810. if (!s.hightlight || !g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1811. s.hightlight = true;
  1812. g.find('li[data-index="' + i + '"]').addClass("highlight")
  1813. }
  1814. } else {
  1815. if (r < o.visibleRange) {
  1816. if (!s.visible || !g.find('li[data-index="' + i + '"]').hasClass("visible")) {
  1817. s.visible = true;
  1818. g.find('li[data-index="' + i + '"]').addClass("visible")
  1819. }
  1820. if ( !! s.hightlight || g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1821. s.hightlight = false;
  1822. g.find('li[data-index="' + i + '"]').removeClass("highlight")
  1823. }
  1824. if (p > i) {
  1825. p = i
  1826. }
  1827. if (q < i) {
  1828. q = i
  1829. }
  1830. } else {
  1831. if ( !! s.visible || g.find('li[data-index="' + i + '"]').hasClass("visible")) {
  1832. s.visible = false;
  1833. g.find('li[data-index="' + i + '"]').removeClass("visible")
  1834. }
  1835. if ( !! s.hightlight || g.find('li[data-index="' + i + '"]').hasClass("highlight")) {
  1836. s.hightlight = false;
  1837. g.find('li[data-index="' + i + '"]').removeClass("highlight")
  1838. }
  1839. }
  1840. }
  1841. });
  1842. if (o.items.length > 21) {
  1843. if (q >= o.endindex) {
  1844. var n = o.endindex + 11;
  1845. for (var m = o.endindex + 1; m < n; m++) {
  1846. if ( !! o.items[m]) {
  1847. var j = "";
  1848. if ( !! o.items[m].visible) {
  1849. j = 'class="visible"'
  1850. }
  1851. g.append("<li " + j + ' data-index="' + m + '" style="transform-origin: center center -' + o.r + "px; transform: translateZ(" + o.r + "px) rotateX(-" + o.items[m].angle + 'deg);">' + o.items[m].text + "</li>");
  1852. g.find('li[data-index="' + (m - 21) + '"]').remove();
  1853. o.endindex++;
  1854. o.beginindex++
  1855. }
  1856. }
  1857. } else {
  1858. if (p <= o.beginindex) {
  1859. var n = o.beginindex - 11;
  1860. for (var m = o.beginindex - 1; m > n; m--) {
  1861. if ( !! o.items[m]) {
  1862. var j = "";
  1863. if ( !! o.items[m].visible) {
  1864. j = 'class="visible"'
  1865. }
  1866. g.prepend("<li " + j + ' data-index="' + m + '" style="transform-origin: center center -' + o.r + "px; transform: translateZ(" + o.r + "px) rotateX(-" + o.items[m].angle + 'deg);">' + o.items[m].text + "</li>");
  1867. g.find('li[data-index="' + (m + 21) + '"]').remove();
  1868. o.endindex--;
  1869. o.beginindex--
  1870. }
  1871. }
  1872. }
  1873. }
  1874. }
  1875. },
  1876. setAngle: function(h, g) {
  1877. h.list.angle = g;
  1878. h.list.style.webkitTransform = "perspective(1000px) rotateY(0deg) rotateX(" + g + "deg)";
  1879. b.calcElementItemVisibility(h, g)
  1880. },
  1881. calcAngle: function(m, j) {
  1882. var g = parseFloat(m.r);
  1883. var i = parseFloat(m.r);
  1884. j = Math.abs(j);
  1885. var l = parseInt(j / m.d) * 180;
  1886. j = j % m.d;
  1887. var k = (g * g + i * i - j * j) / (2 * g * i);
  1888. var h = l + b.rad2deg(Math.acos(k));
  1889. return h
  1890. },
  1891. rad2deg: function(g) {
  1892. return g / (Math.PI / 180)
  1893. },
  1894. quartEaseOut: function(j, g, h, i) {
  1895. return - h * ((j = j / i - 1) * j * j * j - 1) + g
  1896. }
  1897. };
  1898. a.fn.fpicker = function(i) {
  1899. var h = {
  1900. data: [],
  1901. value: "value",
  1902. text: "text",
  1903. change: null
  1904. };
  1905. var g = a(this);
  1906. if ( !! g[0].fop) {
  1907. return g
  1908. }
  1909. a.extend(h, i || {});
  1910. g[0].fop = h;
  1911. b.init(g, h);
  1912. return g
  1913. };
  1914. a.fn.fpickerSetData = function(h) {
  1915. var g = a(this);
  1916. if (!g[0].fop) {
  1917. return g
  1918. }
  1919. g[0].fop.data = h;
  1920. b.initParams(g);
  1921. b.initData(g, g[0].fop);
  1922. return g
  1923. };
  1924. a.fn.fpickerSet = function(i) {
  1925. var g = a(this);
  1926. var h = g[0];
  1927. if (!h.fop) {
  1928. return g
  1929. }
  1930. h._value = i;
  1931. a.each(h.items,
  1932. function(l, n) {
  1933. if (n.value == i) {
  1934. b.setAngle(h, n.angle);
  1935. if (h.items.length > 0) {
  1936. var j = g.find("ul");
  1937. j.html("");
  1938. h.beginindex = n.id - 10;
  1939. h.endindex = n.id + 10;
  1940. for (var m = h.beginindex; m < h.endindex + 1; m++) {
  1941. if ( !! h.items[m]) {
  1942. var k = "";
  1943. if ( !! h.items[m].visible) {
  1944. k = 'class="visible"'
  1945. }
  1946. if ( !! h.items[m].hightlight) {
  1947. k = 'class="highlight"'
  1948. }
  1949. j.append("<li " + k + ' data-index="' + m + '" style="transform-origin: center center -' + h.r + "px; transform: translateZ(" + h.r + "px) rotateX(-" + h.items[m].angle + 'deg);">' + h.items[m].text + "</li>")
  1950. }
  1951. }
  1952. if ( !! h.selected) {
  1953. g.trigger("change");
  1954. if ( !! h.fop.change) {
  1955. h.fop.change(h.selected.obj, g)
  1956. }
  1957. }
  1958. }
  1959. return false
  1960. }
  1961. })
  1962. };
  1963. a.fn.fpickerGet = function() {
  1964. var g = a(this);
  1965. return g[0].selected.value || ""
  1966. };
  1967. a.fn.fpickerGetObj = function() {
  1968. var g = a(this);
  1969. return g[0].selected
  1970. }
  1971. })(window.jQuery, window.fui); (function(a, c) {
  1972. var b = {
  1973. init: function(d, f) {
  1974. f.id = c.guid();
  1975. var e = '<div class="f-poppicker f-pop" id="pop_' + f.id + '" data-page="' + c.pageid() + '" >';
  1976. e += '<div class="f-poppicker-header" >';
  1977. e += '<div class="f-poppicker-cancel">取消</div>';
  1978. e += '<div class="f-poppicker-ok">确定</div>';
  1979. e += "</div>";
  1980. e += '<div class="f-poppicker-body" ></div>';
  1981. e += "</div>";
  1982. a("body").append(e);
  1983. c.createMask();
  1984. b.initPicker(f);
  1985. b.bindEvent(d, f)
  1986. },
  1987. bindEvent: function(e, f) {
  1988. e.on("tap",
  1989. function() {
  1990. var h = a(this);
  1991. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  1992. return false
  1993. }
  1994. var j = h[0];
  1995. var i = j.fop;
  1996. if ( !! i.callback) {
  1997. i.callback()
  1998. }
  1999. var g = a("#pop_" + i.id);
  2000. if (!g.hasClass("active")) {
  2001. g.addClass("active");
  2002. c.showMask()
  2003. }
  2004. setTimeout(function() {
  2005. if (i.value != undefined && i.value != "" && i.value != null) {
  2006. var k = i.value.split(",");
  2007. a.each(k,
  2008. function(m, n) {
  2009. var l = a("#picker_" + i.id + "_" + m);
  2010. l.fpickerSet(n)
  2011. })
  2012. }
  2013. },
  2014. 300);
  2015. return false
  2016. });
  2017. var d = a("#pop_" + f.id);
  2018. d.find(".f-poppicker-cancel").on("tap",
  2019. function() {
  2020. var g = a(this).parents(".f-poppicker");
  2021. g.removeClass("active");
  2022. c.hideMask();
  2023. return false
  2024. });
  2025. d.find(".f-poppicker-ok").on("tap", {
  2026. $self: e,
  2027. fop: f
  2028. },
  2029. function(l) {
  2030. var h = a(this).parents(".f-poppicker");
  2031. h.removeClass("active");
  2032. c.hideMask();
  2033. l = l || window.event;
  2034. var m = l.data.fop;
  2035. var j = l.data.$self;
  2036. var p = [];
  2037. var q = [];
  2038. var k = [];
  2039. for (var n = 0; n < m.level; n++) {
  2040. var g = a("#picker_" + m.id + "_" + n);
  2041. var o = g.fpickerGetObj();
  2042. p.push(o.text);
  2043. q.push(o.value);
  2044. k.push(o)
  2045. }
  2046. if (m.value != String(q)) {
  2047. m.value = String(q);
  2048. m.text = String(p);
  2049. j.trigger("change");
  2050. if ( !! m.change) {
  2051. m.change(m.value, m.text, k, j)
  2052. }
  2053. }
  2054. return false
  2055. })
  2056. },
  2057. initPicker: function(g) {
  2058. var e = a("#pop_" + g.id + " .f-poppicker-body");
  2059. for (var f = 0; f < g.level; f++) {
  2060. var d = a('<div id="picker_' + g.id + "_" + f + '" data-level="' + f + '" ></div>');
  2061. d.css("width", (100 / g.level + "%"));
  2062. e.append(d);
  2063. d.fpicker({
  2064. data: [],
  2065. value: g.ivalue,
  2066. text: g.itext,
  2067. change: function(k, h) {
  2068. var j = parseInt(h.attr("data-level")) + 1;
  2069. if (g.level > 1 && j < g.level) {
  2070. var i = a("#picker_" + g.id + "_" + j);
  2071. i.fpickerSetData(k.children)
  2072. }
  2073. }
  2074. })
  2075. }
  2076. a("#picker_" + g.id + "_0").fpickerSetData(g.data)
  2077. }
  2078. };
  2079. a.fn.fpoppicker = function(f) {
  2080. var e = {
  2081. data: [],
  2082. level: 1,
  2083. change: false,
  2084. ivalue: "value",
  2085. itext: "text"
  2086. };
  2087. var d = a(this);
  2088. if ( !! d[0].fop) {
  2089. return d
  2090. }
  2091. a.extend(e, f || {});
  2092. d[0].fop = e;
  2093. b.init(d, e);
  2094. return d
  2095. };
  2096. a.fn.fpoppickerSet = function(h) {
  2097. var d = a(this);
  2098. var f = d[0].fop;
  2099. if (h != undefined && h != "" && h != null) {
  2100. var i = h.split(",");
  2101. var g = [];
  2102. var e = [];
  2103. a.each(i,
  2104. function(k, m) {
  2105. var j = a("#picker_" + f.id + "_" + k);
  2106. j.fpickerSet(m);
  2107. var l = j.fpickerGetObj();
  2108. if (l) {
  2109. g.push(l.text || "");
  2110. e.push(l)
  2111. }
  2112. });
  2113. f.value = h;
  2114. f.text = String(g);
  2115. d.trigger("change");
  2116. if ( !! f.change) {
  2117. f.change(f.value, f.text, e, d)
  2118. }
  2119. }
  2120. };
  2121. a.fn.fpoppickerSetData = function(e) {
  2122. var d = a(this);
  2123. if (d.length > 0) {
  2124. var f = d[0].fop;
  2125. if (f) {
  2126. a("#picker_" + f.id + "_0").fpickerSetData(e)
  2127. }
  2128. }
  2129. d = null
  2130. }
  2131. })(window.jQuery, window.fui); (function(a, c) {
  2132. var b = {
  2133. init: function(e, h) {
  2134. h.id = c.guid();
  2135. var g = '<div class="f-dtpicker f-pop" id="dt_' + h.id + '" data-type="' + h.type + '" data-page="' + c.pageid() + '" >';
  2136. g += '<div class="f-dtpicker-header" >';
  2137. g += '<div class="f-dtpicker-cancel">取消</div>';
  2138. g += '<div class="f-dtpicker-ok">确定</div>';
  2139. g += "</div>";
  2140. g += '<div class="f-dtpicker-title">';
  2141. g += '<h5 data-id="title-y">' + h.label[0] + "</h5>";
  2142. g += '<h5 data-id="title-m">' + h.label[1] + "</h5>";
  2143. g += '<h5 data-id="title-d">' + h.label[2] + "</h5>";
  2144. g += '<h5 data-id="title-h">' + h.label[3] + "</h5>";
  2145. g += '<h5 data-id="title-i">' + h.label[4] + "</h5>";
  2146. g += "</div>";
  2147. g += '<div class="f-dtpicker-body" ></div>';
  2148. g += "</div>";
  2149. a("body").append(g);
  2150. c.createMask();
  2151. switch (h.type) {
  2152. case "datetime":
  2153. var f = b.initYear(h);
  2154. var d = b.initMonth(h);
  2155. b.initDay(h, f, d);
  2156. b.initHour(h);
  2157. b.initMinute(h);
  2158. break;
  2159. case "date":
  2160. var f = b.initYear(h);
  2161. var d = b.initMonth(h);
  2162. b.initDay(h, f, d);
  2163. break;
  2164. case "time":
  2165. b.initHour(h);
  2166. b.initMinute(h);
  2167. break;
  2168. case "month":
  2169. b.initYear(h);
  2170. b.initMonth(h);
  2171. break;
  2172. default:
  2173. var f = b.initYear(h);
  2174. var d = b.initMonth(h);
  2175. b.initDay(h, f, d);
  2176. b.initHour(h);
  2177. b.initMinute(h);
  2178. break
  2179. }
  2180. b.bindEvent(e, h)
  2181. },
  2182. bindEvent: function(e, f) {
  2183. e.on("tap",
  2184. function() {
  2185. var h = a(this);
  2186. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  2187. return false
  2188. }
  2189. var j = h[0];
  2190. var i = j.fop;
  2191. if ( !! i.callback) {
  2192. i.callback()
  2193. }
  2194. var g = a("#dt_" + i.id);
  2195. if (!g.hasClass("active")) {
  2196. g.addClass("active");
  2197. c.showMask()
  2198. }
  2199. setTimeout(function() {
  2200. if (i.value != undefined && i.value != "" && i.value != null) {
  2201. b.setValue(i, i.value)
  2202. }
  2203. },
  2204. 300);
  2205. return false
  2206. });
  2207. var d = a("#dt_" + f.id);
  2208. d.find(".f-dtpicker-cancel").on("tap",
  2209. function() {
  2210. var g = a(this).parents(".f-dtpicker");
  2211. g.removeClass("active");
  2212. c.hideMask();
  2213. return false
  2214. });
  2215. d.find(".f-dtpicker-ok").on("tap", {
  2216. $self: e,
  2217. fop: f
  2218. },
  2219. function(i) {
  2220. var g = a(this).parents(".f-dtpicker");
  2221. g.removeClass("active");
  2222. c.hideMask();
  2223. var j = i.data.fop;
  2224. var h = i.data.$self;
  2225. var l = "";
  2226. switch (j.type) {
  2227. case "datetime":
  2228. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-" + b.getfDay(j) + " " + b.getfHour(j) + ":" + b.getfMinute(j);
  2229. l = c.date.format(k, j.format || "yyyy-MM-dd hh:mm");
  2230. break;
  2231. case "date":
  2232. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-" + b.getfDay(j);
  2233. l = c.date.format(k, j.format || "yyyy-MM-dd");
  2234. break;
  2235. case "time":
  2236. var k = "2017-12-18 " + b.getfHour(j) + ":" + b.getfMinute(j);
  2237. l = c.date.format(k, j.format || "hh:mm");
  2238. break;
  2239. case "month":
  2240. var k = b.getfYear(j) + "-" + b.getfMonth(j) + "-01";
  2241. l = c.date.format(k, j.format || "yyyy-MM");
  2242. break
  2243. }
  2244. if (j.value != l) {
  2245. j.value = l;
  2246. h.trigger("change");
  2247. if ( !! j.change) {
  2248. j.change(j.value, h)
  2249. }
  2250. }
  2251. return false
  2252. })
  2253. },
  2254. initYear: function(l) {
  2255. var h = [];
  2256. var g = new Date();
  2257. var m = g.getFullYear();
  2258. for (var j = -50; j < 51; j++) {
  2259. var f = m + j;
  2260. var k = {
  2261. text: f,
  2262. value: f
  2263. };
  2264. h.push(k)
  2265. }
  2266. var e = a("#dt_" + l.id + " .f-dtpicker-body");
  2267. var d = a('<div id="picker_' + l.id + '_y" class="f-dt-picker f-dt-y" ></div>');
  2268. e.append(d);
  2269. d.fpicker({
  2270. data: h
  2271. }).fpickerSet(m);
  2272. return d
  2273. },
  2274. initMonth: function(h) {
  2275. var f = new Date();
  2276. var g = f.getMonth() + 1;
  2277. var e = a("#dt_" + h.id + " .f-dtpicker-body");
  2278. var d = a('<div id="picker_' + h.id + '_m" class="f-dt-picker f-dt-m" ></div>');
  2279. e.append(d);
  2280. d.fpicker({
  2281. data: [{
  2282. text: "01",
  2283. value: 1
  2284. },
  2285. {
  2286. text: "02",
  2287. value: 2
  2288. },
  2289. {
  2290. text: "03",
  2291. value: 3
  2292. },
  2293. {
  2294. text: "04",
  2295. value: 4
  2296. },
  2297. {
  2298. text: "05",
  2299. value: 5
  2300. },
  2301. {
  2302. text: "06",
  2303. value: 6
  2304. },
  2305. {
  2306. text: "07",
  2307. value: 7
  2308. },
  2309. {
  2310. text: "08",
  2311. value: 8
  2312. },
  2313. {
  2314. text: "09",
  2315. value: 9
  2316. },
  2317. {
  2318. text: "10",
  2319. value: 10
  2320. },
  2321. {
  2322. text: "11",
  2323. value: 11
  2324. },
  2325. {
  2326. text: "12",
  2327. value: 12
  2328. }]
  2329. }).fpickerSet(g);
  2330. return d
  2331. },
  2332. initDay: function(k, g, d) {
  2333. var h = new Date();
  2334. var i = h.getDate();
  2335. var j = d.fpickerGet();
  2336. var l = g.fpickerGet();
  2337. var f = a("#dt_" + k.id + " .f-dtpicker-body");
  2338. var e = a('<div id="picker_' + k.id + '_d" class="f-dt-picker f-dt-d" ></div>');
  2339. f.append(e);
  2340. e.fpicker({
  2341. data: b.getDayData(l, j)
  2342. }).fpickerSet(i);
  2343. g[0].fop.change = function(t, m) {
  2344. var r = t.value;
  2345. var q = d.fpickerGet();
  2346. var o = e.fpickerGet();
  2347. var p = e[0].fop.data.length;
  2348. var s = b.getDayNum(r, q);
  2349. if (p != s) {
  2350. if (o > s) {
  2351. o = s
  2352. }
  2353. var n = b.getDayData(r, q);
  2354. e.fpickerSetData(n).fpickerSet(o)
  2355. }
  2356. };
  2357. d[0].fop.change = function(t, m) {
  2358. var q = t.value;
  2359. var r = g.fpickerGet();
  2360. var o = e.fpickerGet();
  2361. var p = e[0].fop.data.length;
  2362. var s = b.getDayNum(r, q);
  2363. if (p != s) {
  2364. if (o > s) {
  2365. o = s
  2366. }
  2367. var n = b.getDayData(r, q);
  2368. e.fpickerSetData(n).fpickerSet(o)
  2369. }
  2370. }
  2371. },
  2372. initHour: function(i) {
  2373. var g = [{
  2374. text: "00",
  2375. value: 0
  2376. },
  2377. {
  2378. text: "01",
  2379. value: 1
  2380. },
  2381. {
  2382. text: "02",
  2383. value: 2
  2384. },
  2385. {
  2386. text: "03",
  2387. value: 3
  2388. },
  2389. {
  2390. text: "04",
  2391. value: 4
  2392. },
  2393. {
  2394. text: "05",
  2395. value: 5
  2396. },
  2397. {
  2398. text: "06",
  2399. value: 6
  2400. },
  2401. {
  2402. text: "07",
  2403. value: 7
  2404. },
  2405. {
  2406. text: "08",
  2407. value: 8
  2408. },
  2409. {
  2410. text: "09",
  2411. value: 9
  2412. },
  2413. {
  2414. text: "10",
  2415. value: 10
  2416. },
  2417. {
  2418. text: "11",
  2419. value: 11
  2420. },
  2421. {
  2422. text: "12",
  2423. value: 12
  2424. },
  2425. {
  2426. text: "13",
  2427. value: 13
  2428. },
  2429. {
  2430. text: "14",
  2431. value: 14
  2432. },
  2433. {
  2434. text: "15",
  2435. value: 15
  2436. },
  2437. {
  2438. text: "16",
  2439. value: 16
  2440. },
  2441. {
  2442. text: "17",
  2443. value: 17
  2444. },
  2445. {
  2446. text: "18",
  2447. value: 18
  2448. },
  2449. {
  2450. text: "19",
  2451. value: 19
  2452. },
  2453. {
  2454. text: "20",
  2455. value: 20
  2456. },
  2457. {
  2458. text: "21",
  2459. value: 21
  2460. },
  2461. {
  2462. text: "22",
  2463. value: 22
  2464. },
  2465. {
  2466. text: "23",
  2467. value: 23
  2468. },
  2469. ];
  2470. var f = new Date();
  2471. var h = f.getHours();
  2472. var e = a("#dt_" + i.id + " .f-dtpicker-body");
  2473. var d = a('<div id="picker_' + i.id + '_h" class="f-dt-picker f-dt-h" ></div>');
  2474. e.append(d);
  2475. d.fpicker({
  2476. data: g
  2477. }).fpickerSet(h)
  2478. },
  2479. initMinute: function(i) {
  2480. var g = [{
  2481. text: "00",
  2482. value: 0
  2483. },
  2484. {
  2485. text: "01",
  2486. value: 1
  2487. },
  2488. {
  2489. text: "02",
  2490. value: 2
  2491. },
  2492. {
  2493. text: "03",
  2494. value: 3
  2495. },
  2496. {
  2497. text: "04",
  2498. value: 4
  2499. },
  2500. {
  2501. text: "05",
  2502. value: 5
  2503. },
  2504. {
  2505. text: "06",
  2506. value: 6
  2507. },
  2508. {
  2509. text: "07",
  2510. value: 7
  2511. },
  2512. {
  2513. text: "08",
  2514. value: 8
  2515. },
  2516. {
  2517. text: "09",
  2518. value: 9
  2519. },
  2520. {
  2521. text: "10",
  2522. value: 10
  2523. },
  2524. {
  2525. text: "11",
  2526. value: 11
  2527. },
  2528. {
  2529. text: "12",
  2530. value: 12
  2531. },
  2532. {
  2533. text: "13",
  2534. value: 13
  2535. },
  2536. {
  2537. text: "14",
  2538. value: 14
  2539. },
  2540. {
  2541. text: "15",
  2542. value: 15
  2543. },
  2544. {
  2545. text: "16",
  2546. value: 16
  2547. },
  2548. {
  2549. text: "17",
  2550. value: 17
  2551. },
  2552. {
  2553. text: "18",
  2554. value: 18
  2555. },
  2556. {
  2557. text: "19",
  2558. value: 19
  2559. },
  2560. {
  2561. text: "20",
  2562. value: 20
  2563. },
  2564. {
  2565. text: "21",
  2566. value: 21
  2567. },
  2568. {
  2569. text: "22",
  2570. value: 22
  2571. },
  2572. {
  2573. text: "23",
  2574. value: 23
  2575. },
  2576. {
  2577. text: "24",
  2578. value: 24
  2579. },
  2580. {
  2581. text: "25",
  2582. value: 25
  2583. },
  2584. {
  2585. text: "26",
  2586. value: 26
  2587. },
  2588. {
  2589. text: "27",
  2590. value: 27
  2591. },
  2592. {
  2593. text: "28",
  2594. value: 28
  2595. },
  2596. {
  2597. text: "29",
  2598. value: 29
  2599. },
  2600. {
  2601. text: "30",
  2602. value: 30
  2603. },
  2604. {
  2605. text: "31",
  2606. value: 31
  2607. },
  2608. {
  2609. text: "32",
  2610. value: 32
  2611. },
  2612. {
  2613. text: "33",
  2614. value: 33
  2615. },
  2616. {
  2617. text: "34",
  2618. value: 34
  2619. },
  2620. {
  2621. text: "35",
  2622. value: 35
  2623. },
  2624. {
  2625. text: "36",
  2626. value: 36
  2627. },
  2628. {
  2629. text: "37",
  2630. value: 37
  2631. },
  2632. {
  2633. text: "38",
  2634. value: 38
  2635. },
  2636. {
  2637. text: "39",
  2638. value: 39
  2639. },
  2640. {
  2641. text: "40",
  2642. value: 40
  2643. },
  2644. {
  2645. text: "41",
  2646. value: 41
  2647. },
  2648. {
  2649. text: "42",
  2650. value: 42
  2651. },
  2652. {
  2653. text: "43",
  2654. value: 43
  2655. },
  2656. {
  2657. text: "44",
  2658. value: 44
  2659. },
  2660. {
  2661. text: "45",
  2662. value: 45
  2663. },
  2664. {
  2665. text: "46",
  2666. value: 46
  2667. },
  2668. {
  2669. text: "47",
  2670. value: 47
  2671. },
  2672. {
  2673. text: "48",
  2674. value: 48
  2675. },
  2676. {
  2677. text: "49",
  2678. value: 49
  2679. },
  2680. {
  2681. text: "50",
  2682. value: 50
  2683. },
  2684. {
  2685. text: "51",
  2686. value: 51
  2687. },
  2688. {
  2689. text: "52",
  2690. value: 52
  2691. },
  2692. {
  2693. text: "53",
  2694. value: 53
  2695. },
  2696. {
  2697. text: "54",
  2698. value: 54
  2699. },
  2700. {
  2701. text: "55",
  2702. value: 55
  2703. },
  2704. {
  2705. text: "56",
  2706. value: 56
  2707. },
  2708. {
  2709. text: "57",
  2710. value: 57
  2711. },
  2712. {
  2713. text: "58",
  2714. value: 58
  2715. },
  2716. {
  2717. text: "59",
  2718. value: 59
  2719. }];
  2720. var f = new Date();
  2721. var h = f.getMinutes();
  2722. var e = a("#dt_" + i.id + " .f-dtpicker-body");
  2723. var d = a('<div id="picker_' + i.id + '_i" class="f-dt-picker f-dt-i" ></div>');
  2724. e.append(d);
  2725. d.fpicker({
  2726. data: g
  2727. }).fpickerSet(h)
  2728. },
  2729. getDayData: function(j, h) {
  2730. var f = [];
  2731. for (var g = 1; g <= b.getDayNum(j, h); g++) {
  2732. var e = "";
  2733. if (g < 10) {
  2734. e = "0" + g
  2735. } else {
  2736. e = "" + g
  2737. }
  2738. var d = {
  2739. text: e,
  2740. value: g
  2741. };
  2742. f.push(d)
  2743. }
  2744. return f
  2745. },
  2746. getDayNum: function(e, d) {
  2747. if ([1, 3, 5, 7, 8, 10, 12].indexOf(d) > -1) {
  2748. return 31
  2749. } else {
  2750. if ([4, 6, 9, 11].indexOf(d) > -1) {
  2751. return 30
  2752. } else {
  2753. if (c.date.isLeapYear(e)) {
  2754. return 29
  2755. } else {
  2756. return 28
  2757. }
  2758. }
  2759. }
  2760. },
  2761. getfYear: function(e) {
  2762. var d = a("#picker_" + e.id + "_y");
  2763. return d.fpickerGet()
  2764. },
  2765. getfMonth: function(e) {
  2766. var d = a("#picker_" + e.id + "_m");
  2767. return d.fpickerGetObj().text
  2768. },
  2769. getfDay: function(e) {
  2770. var d = a("#picker_" + e.id + "_d");
  2771. return d.fpickerGetObj().text
  2772. },
  2773. getfHour: function(e) {
  2774. var d = a("#picker_" + e.id + "_h");
  2775. return d.fpickerGetObj().text
  2776. },
  2777. getfMinute: function(e) {
  2778. var d = a("#picker_" + e.id + "_i");
  2779. return d.fpickerGetObj().text
  2780. },
  2781. setValue: function(k, l) {
  2782. if (k.type == "time") {
  2783. l = "2017-12-08 " + l
  2784. }
  2785. var j = c.date.parse(l);
  2786. var i = a("#picker_" + k.id + "_y");
  2787. if (i.length > 0) {
  2788. i.fpickerSet(j.getFullYear())
  2789. }
  2790. var h = a("#picker_" + k.id + "_m");
  2791. if (h.length > 0) {
  2792. h.fpickerSet(j.getMonth() + 1)
  2793. }
  2794. var e = a("#picker_" + k.id + "_d");
  2795. if (e.length > 0) {
  2796. e.fpickerSet(j.getDate())
  2797. }
  2798. var f = a("#picker_" + k.id + "_h");
  2799. if (f.length > 0) {
  2800. f.fpickerSet(j.getHours())
  2801. }
  2802. var g = a("#picker_" + k.id + "_i");
  2803. if (g.length > 0) {
  2804. g.fpickerSet(j.getMinutes())
  2805. }
  2806. }
  2807. };
  2808. a.fn.fdtpicker = function(f) {
  2809. var e = {
  2810. type: "datetime",
  2811. label: ["年", "月", "日", "时", "分"],
  2812. format: false,
  2813. change: false
  2814. };
  2815. var d = a(this);
  2816. if ( !! d[0].fop) {
  2817. return d
  2818. }
  2819. a.extend(e, f || {});
  2820. d[0].fop = e;
  2821. b.init(d, e);
  2822. return d
  2823. }
  2824. })(window.jQuery, window.fui); (function(a) {
  2825. var b = {
  2826. init: function(c) {
  2827. c.addClass("f-switch");
  2828. c.html('<div class="f-switch-handle"></div>');
  2829. c.on("tap",
  2830. function() {
  2831. var d = a(this);
  2832. if (d.attr("readonly") || d.parents(".lr-form-row").attr("readonly")) {
  2833. return false
  2834. }
  2835. if (d.hasClass("f-active")) {
  2836. d.removeClass("f-active")
  2837. } else {
  2838. d.addClass("f-active")
  2839. }
  2840. d.trigger("change");
  2841. return false
  2842. })
  2843. }
  2844. };
  2845. a.fn.fswitch = function() {
  2846. a(this).each(function() {
  2847. var c = a(this);
  2848. b.init(c)
  2849. });
  2850. return a(this)
  2851. };
  2852. a.fn.fswitchGet = function() {
  2853. var c = a(this);
  2854. var d = 0;
  2855. if (c.hasClass("f-active")) {
  2856. d = 1
  2857. }
  2858. return d
  2859. };
  2860. a.fn.fswitchSet = function(d) {
  2861. var c = a(this);
  2862. if (d != 1 && d != "1") {
  2863. c.removeClass("f-active")
  2864. } else {
  2865. if (!c.hasClass("f-active")) {
  2866. c.addClass("f-active")
  2867. }
  2868. }
  2869. }
  2870. })(window.jQuery); (function(a, c) {
  2871. var b = {
  2872. init: function(h) {
  2873. if (!h.id) {
  2874. alert("设置下id信息!");
  2875. return false
  2876. }
  2877. var d = a("#" + h.id);
  2878. if (d.length == 0) {
  2879. var e = '<div class="f-actionsheet f-pop" id="' + h.id + '" data-page="' + c.pageid() + '" ></div>';
  2880. c.createMask();
  2881. d = a(e);
  2882. a("body").append(d);
  2883. var i = {};
  2884. var f = c.guid();
  2885. a.each(h.data,
  2886. function(j, n) {
  2887. var k = a.extend({
  2888. group: f,
  2889. text: "按钮" + j,
  2890. },
  2891. n);
  2892. i[k.group] = i[k.group] || a('<ul class="f-table"></ul>');
  2893. var m = "";
  2894. if ( !! k.mark) {
  2895. m = 'style="color:red;"'
  2896. }
  2897. var l = '<li class="f-table-cell"><a data-event="' + j + '" ' + m + ' href="#">' + k.text + "</a></li>";
  2898. i[k.group].append(l)
  2899. });
  2900. for (var g in i) {
  2901. d.append(i[g])
  2902. }
  2903. d.append('<ul class="f-table"><li class="f-table-cell"><a data-event="cancel" href="#">取消</a></li></ul>');
  2904. d.on("tap", "a", {
  2905. op: h
  2906. },
  2907. function(k) {
  2908. var j = a(this);
  2909. var n = k.data.op;
  2910. var m = j.attr("data-event");
  2911. var l = null;
  2912. if (m == "cancel") {
  2913. l = n.cancel
  2914. } else {
  2915. l = n.data[m].event
  2916. }
  2917. c.hideMask();
  2918. a("#" + n.id).removeClass("active");
  2919. if ( !! l) {
  2920. setTimeout(function() {
  2921. l()
  2922. },
  2923. 300)
  2924. }
  2925. return false
  2926. })
  2927. }
  2928. c.showMask();
  2929. d.addClass("active")
  2930. }
  2931. };
  2932. c.actionsheet = function(e) {
  2933. var d = {
  2934. id: "",
  2935. data: [],
  2936. cancel: false
  2937. };
  2938. a.extend(d, e || {});
  2939. b.init(d)
  2940. }
  2941. })(window.jQuery, window.fui); (function(a, c) {
  2942. var b = {
  2943. init: function(g) {
  2944. var e = a("body");
  2945. if (g.type != "toast") {
  2946. if (a(".f-dialog").length > 0) {
  2947. a(".f-dialog").remove();
  2948. a(".f-dialog-mask").remove();
  2949. return false
  2950. }
  2951. var f = '<div class="f-dialog"></div><div class="f-dialog-mask"></div>';
  2952. e.append(f);
  2953. b[g.type](g);
  2954. b.bindEvent(g);
  2955. a(".f-dialog-mask").fadeIn();
  2956. a(".f-dialog").show("fast",
  2957. function() {
  2958. a(this).addClass("active")
  2959. })
  2960. } else {
  2961. var d = a('<div class="f-toast-container" ><div class="f-toast-message" >' + g.msg + "</div></div>");
  2962. e.append(d);
  2963. d.fadeIn(function() {
  2964. var h = d;
  2965. setTimeout(function() {
  2966. h.fadeOut(function() {
  2967. setTimeout(function() {
  2968. h.remove();
  2969. h = null
  2970. },
  2971. 100)
  2972. })
  2973. },
  2974. g.timeout);
  2975. d.on("click",
  2976. function() {
  2977. var i = a(this);
  2978. i.fadeOut(function() {
  2979. i.remove();
  2980. setTimeout(function() {
  2981. i.remove();
  2982. i = null
  2983. },
  2984. 100)
  2985. })
  2986. });
  2987. d = null
  2988. })
  2989. }
  2990. },
  2991. bindEvent: function(d) {
  2992. a(".f-dialog").on("tap", ".f-dialog-btn", {
  2993. op: d
  2994. },
  2995. function(h) {
  2996. var i = h.data.op;
  2997. var f = a(this).attr("data-index");
  2998. var g = a(".f-dialog input").val();
  2999. a(".f-dialog-mask").fadeOut(function() {
  3000. a(".f-dialog-mask").remove()
  3001. });
  3002. a(".f-dialog").fadeOut(function() {
  3003. a(".f-dialog").remove()
  3004. });
  3005. if ( !! i.callback) {
  3006. setTimeout(function() {
  3007. i.callback(f, g)
  3008. },
  3009. 300)
  3010. }
  3011. })
  3012. },
  3013. warning: function(g) {
  3014. var f = a(".f-dialog");
  3015. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + g.title + '</div><div class="f-dialog-text">' + g.msg + "</div></div>");
  3016. var e = a('<div class="f-dialog-btns"><span data-index="0" class="f-dialog-btn f-dialog-btn-bold">' + g.btn + "</span></div>");
  3017. f.append(d);
  3018. f.append(e)
  3019. },
  3020. confirm: function(h) {
  3021. var f = a(".f-dialog");
  3022. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + h.title + '</div><div class="f-dialog-text">' + h.msg + "</div></div>");
  3023. var e = a('<div class="f-dialog-btns"></div>');
  3024. var g = "";
  3025. a.each(h.btns,
  3026. function(i, j) {
  3027. g += '<span data-index="' + i + '" class="f-dialog-btn">' + j + "</span>"
  3028. });
  3029. e.html(g);
  3030. f.append(d);
  3031. f.append(e)
  3032. },
  3033. prompt: function(h) {
  3034. var f = a(".f-dialog");
  3035. var d = a('<div class="f-dialog-body" ><div class="f-dialog-title" >' + h.title + '</div><div class="f-dialog-text">' + h.msg + '</div> <div class="f-dialog-input" ><input type="text" placeholder="' + (h.input || "") + '"></div></div>');
  3036. var e = a('<div class="f-dialog-btns"></div>');
  3037. var g = "";
  3038. a.each(h.btns,
  3039. function(i, j) {
  3040. g += '<span data-index="' + i + '" class="f-dialog-btn">' + j + "</span>"
  3041. });
  3042. e.html(g);
  3043. f.append(d);
  3044. f.append(e);
  3045. f.find("input").focus()
  3046. }
  3047. };
  3048. c.dialog = function(e) {
  3049. var d = {
  3050. type: "toast",
  3051. title: "提示",
  3052. msg: "",
  3053. btn: "确定",
  3054. timeout: 2000,
  3055. btns: ["否", "是"],
  3056. callback: false
  3057. };
  3058. a.extend(d, e || {});
  3059. b.init(d)
  3060. };
  3061. c.loading = function(f, g) {
  3062. if (f) {
  3063. var e = "";
  3064. if ( !! g) {
  3065. e = '<div class="f-load-msg" >' + (g || "") + "</div>"
  3066. }
  3067. var d = a('<div class="f-load-mask"></div><div class="f-load-container" ><div class="f-load-body" ><div style="margin-right:0px;" class="f-pull-loading f-spinner" ></div> ' + e + "</div></div>");
  3068. a("body").append(d);
  3069. d.fadeIn()
  3070. } else {
  3071. a(".f-load-mask").fadeOut(function() {
  3072. a(this).remove()
  3073. });
  3074. a(".f-load-container").fadeOut(function() {
  3075. a(this).remove()
  3076. })
  3077. }
  3078. }
  3079. })(window.jQuery, window.fui); (function(a, k, i) {
  3080. var e = "f-scroll-wrapper";
  3081. var d = "f-scroll";
  3082. var f = "f-scrollbar";
  3083. var c = "f-scrollbar-indicator";
  3084. var h = f + "-vertical";
  3085. var g = f + "-horizontal";
  3086. var b = "f-active";
  3087. var j = {
  3088. quadratic: {
  3089. style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
  3090. fn: function(n) {
  3091. return n * (2 - n)
  3092. }
  3093. },
  3094. circular: {
  3095. style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
  3096. fn: function(n) {
  3097. return Math.sqrt(1 - (--n * n))
  3098. }
  3099. },
  3100. outCirc: {
  3101. style: "cubic-bezier(0.075, 0.82, 0.165, 1)"
  3102. },
  3103. outCubic: {
  3104. style: "cubic-bezier(0.165, 0.84, 0.44, 1)"
  3105. }
  3106. };
  3107. var m = k.Class.extend({
  3108. init: function(n, p) {
  3109. var o = a('<div class="' + d + '" ></div>');
  3110. o.html(n.children());
  3111. n.addClass(e);
  3112. n.html(o);
  3113. this.element = n[0];
  3114. this.wrapper = this.element;
  3115. this.scroller = this.wrapper.children[0];
  3116. this.scrollerStyle = this.scroller && this.scroller.style;
  3117. this.stopped = false;
  3118. this.options = a.extend(true, {
  3119. scrollY: true,
  3120. scrollX: false,
  3121. startX: 0,
  3122. startY: 0,
  3123. indicators: true,
  3124. stopPropagation: false,
  3125. hardwareAccelerated: true,
  3126. fixedBadAndorid: false,
  3127. preventDefaultException: {
  3128. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/
  3129. },
  3130. momentum: true,
  3131. snapX: 0.5,
  3132. snap: false,
  3133. bounce: true,
  3134. bounceTime: 500,
  3135. bounceEasing: j.outCirc,
  3136. scrollTime: 500,
  3137. scrollEasing: j.outCubic,
  3138. directionLockThreshold: 5,
  3139. },
  3140. p);
  3141. this.x = 0;
  3142. this.y = 0;
  3143. this.translateZ = this.options.hardwareAccelerated ? " translateZ(0)": "";
  3144. this._init();
  3145. if (this.scroller) {
  3146. this.refresh();
  3147. this.scrollTo(this.options.startX, this.options.startY)
  3148. }
  3149. },
  3150. _init: function() {
  3151. this._initIndicators();
  3152. this._initEvent()
  3153. },
  3154. _initIndicators: function() {
  3155. var q = this;
  3156. q.indicators = [];
  3157. if (!this.options.indicators) {
  3158. return
  3159. }
  3160. var p = [],
  3161. o;
  3162. if (q.options.scrollY) {
  3163. o = {
  3164. el: this._createScrollBar(h),
  3165. listenX: false
  3166. };
  3167. this.wrapper.appendChild(o.el);
  3168. p.push(o)
  3169. }
  3170. if (this.options.scrollX) {
  3171. o = {
  3172. el: this._createScrollBar(g),
  3173. listenY: false
  3174. };
  3175. this.wrapper.appendChild(o.el);
  3176. p.push(o)
  3177. }
  3178. for (var n = p.length; n--;) {
  3179. this.indicators.push(new l(this, p[n]))
  3180. }
  3181. },
  3182. _initSnap: function() {
  3183. this.currentPage = {};
  3184. this.pages = [];
  3185. var y = this.snaps;
  3186. var q = y.length;
  3187. var r = 0;
  3188. var s = -1;
  3189. var A = 0;
  3190. var p = 0;
  3191. var v = 0;
  3192. var z = 0;
  3193. for (var o = 0; o < q; o++) {
  3194. var w = y[o];
  3195. var t = w.offsetLeft;
  3196. var u = w.offsetWidth;
  3197. if (o === 0 || t <= y[o - 1].offsetLeft) {
  3198. r = 0;
  3199. s++
  3200. }
  3201. if (!this.pages[r]) {
  3202. this.pages[r] = []
  3203. }
  3204. A = this._getSnapX(t);
  3205. z = Math.round((u) * this.options.snapX);
  3206. p = A - z;
  3207. v = A - u + z;
  3208. this.pages[r][s] = {
  3209. x: A,
  3210. leftX: p,
  3211. rightX: v,
  3212. pageX: r,
  3213. element: w
  3214. };
  3215. if (w.classList.contains(b)) {
  3216. this.currentPage = this.pages[r][0]
  3217. }
  3218. if (A >= this.maxScrollX) {
  3219. r++
  3220. }
  3221. }
  3222. this.options.startX = this.currentPage.x || 0
  3223. },
  3224. _getSnapX: function(n) {
  3225. return Math.max(Math.min(0, -n + (this.wrapperWidth / 2)), this.maxScrollX)
  3226. },
  3227. _gotoPage: function(o) {
  3228. this.currentPage = this.pages[Math.min(o, this.pages.length - 1)][0];
  3229. for (var n = 0,
  3230. p = this.snaps.length; n < p; n++) {
  3231. if (n === o) {
  3232. this.snaps[n].classList.add(b)
  3233. } else {
  3234. this.snaps[n].classList.remove(b)
  3235. }
  3236. }
  3237. this.scrollTo(this.currentPage.x, 0, this.options.scrollTime)
  3238. },
  3239. _nearestSnap: function(q) {
  3240. if (!this.pages.length) {
  3241. return {
  3242. x: 0,
  3243. pageX: 0
  3244. }
  3245. }
  3246. var n = 0;
  3247. var o = this.pages.length;
  3248. if (q > 0) {
  3249. q = 0
  3250. } else {
  3251. if (q < this.maxScrollX) {
  3252. q = this.maxScrollX
  3253. }
  3254. }
  3255. for (; n < o; n++) {
  3256. var p = this.direction === "left" ? this.pages[n][0].leftX: this.pages[n][0].rightX;
  3257. if (q >= p) {
  3258. return this.pages[n][0]
  3259. }
  3260. }
  3261. return {
  3262. x: 0,
  3263. pageX: 0
  3264. }
  3265. },
  3266. _initEvent: function(o) {
  3267. var n = o ? "removeEventListener": "addEventListener";
  3268. window[n]("orientationchange", this);
  3269. window[n]("resize", this);
  3270. this.scroller[n]("webkitTransitionEnd", this);
  3271. this.wrapper[n](k.event.start, this);
  3272. this.wrapper[n](k.event.cancel, this);
  3273. this.wrapper[n](k.event.end, this);
  3274. this.wrapper[n]("drag", this);
  3275. this.wrapper[n]("dragend", this);
  3276. this.wrapper[n]("flick", this);
  3277. this.wrapper[n]("scrollend", this);
  3278. if (this.options.scrollX) {
  3279. this.wrapper[n]("swiperight", this)
  3280. }
  3281. this.wrapper[n]("scrollstart", this);
  3282. this.wrapper[n]("refresh", this)
  3283. },
  3284. _handleIndicatorScrollend: function() {
  3285. this.indicators.map(function(n) {
  3286. n.fade()
  3287. })
  3288. },
  3289. _handleIndicatorScrollstart: function() {
  3290. this.indicators.map(function(n) {
  3291. n.fade(1)
  3292. })
  3293. },
  3294. _handleIndicatorRefresh: function() {
  3295. this.indicators.map(function(n) {
  3296. n.refresh()
  3297. })
  3298. },
  3299. handleEvent: function(n) {
  3300. if (this.stopped) {
  3301. this.resetPosition();
  3302. return
  3303. }
  3304. switch (n.type) {
  3305. case k.event.start:
  3306. this._start(n);
  3307. break;
  3308. case "drag":
  3309. this.options.stopPropagation && n.stopPropagation();
  3310. this._drag(n);
  3311. break;
  3312. case "dragend":
  3313. case "flick":
  3314. this.options.stopPropagation && n.stopPropagation();
  3315. this._flick(n);
  3316. break;
  3317. case k.event.cancel:
  3318. case k.event.end:
  3319. this._end(n);
  3320. break;
  3321. case "webkitTransitionEnd":
  3322. this.transitionTimer && this.transitionTimer.cancel();
  3323. this._transitionEnd(n);
  3324. break;
  3325. case "scrollstart":
  3326. this._handleIndicatorScrollstart(n);
  3327. break;
  3328. case "scrollend":
  3329. this._handleIndicatorScrollend(n);
  3330. this._scrollend(n);
  3331. n.stopPropagation();
  3332. break;
  3333. case "orientationchange":
  3334. case "resize":
  3335. this._resize();
  3336. break;
  3337. case "swiperight":
  3338. n.stopPropagation();
  3339. break;
  3340. case "refresh":
  3341. this._handleIndicatorRefresh(n);
  3342. break
  3343. }
  3344. },
  3345. _start: function(n) {
  3346. this.moved = this.needReset = false;
  3347. this._transitionTime();
  3348. if (this.isInTransition) {
  3349. this.needReset = true;
  3350. this.isInTransition = false;
  3351. var o = k.parseTranslateMatrix(k.getStyles(this.scroller, "webkitTransform"));
  3352. this.setTranslate(Math.round(o.x), Math.round(o.y));
  3353. k.trigger(this.scroller, "scrollend", this);
  3354. n.preventDefault()
  3355. }
  3356. this.reLayout();
  3357. k.trigger(this.scroller, "beforescrollstart", this)
  3358. },
  3359. _getDirectionByAngle: function(n) {
  3360. if (n < -80 && n > -100) {
  3361. return "up"
  3362. } else {
  3363. if (n >= 80 && n < 100) {
  3364. return "down"
  3365. } else {
  3366. if (n >= 170 || n <= -170) {
  3367. return "left"
  3368. } else {
  3369. if (n >= -35 && n <= 10) {
  3370. return "right"
  3371. }
  3372. }
  3373. }
  3374. }
  3375. return null
  3376. },
  3377. _drag: function(t) {
  3378. var r = t.detail;
  3379. var u = false;
  3380. var v = false;
  3381. var s = this._getDirectionByAngle(r.angle);
  3382. if (r.direction === "left" || r.direction === "right") {
  3383. if (this.options.scrollX) {
  3384. u = true;
  3385. if (!this.moved) {
  3386. k.gestures.session.lockDirection = true;
  3387. k.gestures.session.startDirection = r.direction
  3388. }
  3389. } else {
  3390. if (this.options.scrollY && !this.moved) {
  3391. v = true
  3392. }
  3393. }
  3394. } else {
  3395. if (r.direction === "up" || r.direction === "down") {
  3396. if (this.options.scrollY) {
  3397. u = true;
  3398. if (!this.moved) {
  3399. k.gestures.session.lockDirection = true;
  3400. k.gestures.session.startDirection = r.direction
  3401. }
  3402. } else {
  3403. if (this.options.scrollX && !this.moved) {
  3404. v = true
  3405. }
  3406. }
  3407. } else {
  3408. v = true
  3409. }
  3410. }
  3411. if (this.moved || u) {
  3412. t.stopPropagation();
  3413. r.gesture && r.gesture.preventDefault()
  3414. }
  3415. if (v) {
  3416. return
  3417. }
  3418. if (!this.moved) {
  3419. k.trigger(this.scroller, "scrollstart", this)
  3420. } else {
  3421. t.stopPropagation()
  3422. }
  3423. var p = 0;
  3424. var q = 0;
  3425. if (!this.moved) {
  3426. p = r.deltaX;
  3427. q = r.deltaY
  3428. } else {
  3429. p = r.deltaX - k.gestures.session.prevTouch.deltaX;
  3430. q = r.deltaY - k.gestures.session.prevTouch.deltaY
  3431. }
  3432. var n = Math.abs(r.deltaX);
  3433. var o = Math.abs(r.deltaY);
  3434. if (n > o + this.options.directionLockThreshold) {
  3435. q = 0
  3436. } else {
  3437. if (o >= n + this.options.directionLockThreshold) {
  3438. p = 0
  3439. }
  3440. }
  3441. p = this.hasHorizontalScroll ? p: 0;
  3442. q = this.hasVerticalScroll ? q: 0;
  3443. var w = this.x + p;
  3444. var x = this.y + q;
  3445. if (w > 0 || w < this.maxScrollX) {
  3446. w = this.options.bounce ? this.x + p / 3 : w > 0 ? 0 : this.maxScrollX
  3447. }
  3448. if (x > 0 || x < this.maxScrollY) {
  3449. x = this.options.bounce ? this.y + q / 3 : x > 0 ? 0 : this.maxScrollY
  3450. }
  3451. if (!this.requestAnimationFrame) {
  3452. this._updateTranslate()
  3453. }
  3454. this.direction = r.deltaX > 0 ? "right": "left";
  3455. this.moved = true;
  3456. this.x = w;
  3457. this.y = x;
  3458. k.trigger(this.scroller, "scroll", this)
  3459. },
  3460. _flick: function(o) {
  3461. if (!this.moved) {
  3462. return
  3463. }
  3464. o.stopPropagation();
  3465. var n = o.detail;
  3466. this._clearRequestAnimationFrame();
  3467. if (o.type === "dragend" && n.flick) {
  3468. return
  3469. }
  3470. var s = Math.round(this.x);
  3471. var t = Math.round(this.y);
  3472. this.isInTransition = false;
  3473. if (this.resetPosition(this.options.bounceTime)) {
  3474. return
  3475. }
  3476. this.scrollTo(s, t);
  3477. if (o.type === "dragend") {
  3478. k.trigger(this.scroller, "scrollend", this);
  3479. return
  3480. }
  3481. var u = 0;
  3482. var p = "";
  3483. if (this.options.momentum && n.flickTime < 300) {
  3484. var q = this.hasHorizontalScroll ? this._momentum(this.x, n.flickDistanceX, n.flickTime, this.maxScrollX, this.options.bounce ? this.wrapperWidth: 0, this.options.deceleration) : {
  3485. destination: s,
  3486. duration: 0
  3487. };
  3488. var r = this.hasVerticalScroll ? this._momentum(this.y, n.flickDistanceY, n.flickTime, this.maxScrollY, this.options.bounce ? this.wrapperHeight: 0, this.options.deceleration) : {
  3489. destination: t,
  3490. duration: 0
  3491. };
  3492. s = q.destination;
  3493. t = r.destination;
  3494. u = Math.max(q.duration, r.duration);
  3495. this.isInTransition = true
  3496. }
  3497. if (s != this.x || t != this.y) {
  3498. if (s > 0 || s < this.maxScrollX || t > 0 || t < this.maxScrollY) {
  3499. p = j.quadratic
  3500. }
  3501. this.scrollTo(s, t, u, p);
  3502. return
  3503. }
  3504. k.trigger(this.scroller, "scrollend", this)
  3505. },
  3506. _end: function(n) {
  3507. this.needReset = false;
  3508. if ((!this.moved && this.needReset) || n.type === k.event.cancel) {
  3509. this.resetPosition()
  3510. }
  3511. },
  3512. _transitionEnd: function(n) {
  3513. if (n.target != this.scroller || !this.isInTransition) {
  3514. return
  3515. }
  3516. this._transitionTime();
  3517. if (!this.resetPosition(this.options.bounceTime)) {
  3518. this.isInTransition = false;
  3519. k.trigger(this.scroller, "scrollend", this)
  3520. }
  3521. },
  3522. _scrollend: function(n) {
  3523. if ((this.y === 0 && this.maxScrollY === 0) || (Math.abs(this.y) > 0 && this.y <= this.maxScrollY)) {
  3524. k.trigger(this.scroller, "scrollbottom", this)
  3525. }
  3526. },
  3527. _resize: function() {
  3528. var n = this;
  3529. clearTimeout(n.resizeTimeout);
  3530. n.resizeTimeout = setTimeout(function() {
  3531. n.refresh()
  3532. },
  3533. n.options.resizePolling)
  3534. },
  3535. _transitionTime: function(o) {
  3536. o = o || 0;
  3537. this.scrollerStyle.webkitTransitionDuration = o + "ms";
  3538. if (this.indicators) {
  3539. for (var n = this.indicators.length; n--;) {
  3540. this.indicators[n].transitionTime(o)
  3541. }
  3542. }
  3543. if (o) {
  3544. this.transitionTimer && this.transitionTimer.cancel();
  3545. this.transitionTimer = k.later(function() {
  3546. k.trigger(this.scroller, "webkitTransitionEnd")
  3547. },
  3548. o + 100, this)
  3549. }
  3550. },
  3551. _transitionTimingFunction: function(n) {
  3552. this.scrollerStyle.webkitTransitionTimingFunction = n;
  3553. if (this.indicators) {
  3554. for (var o = this.indicators.length; o--;) {
  3555. this.indicators[o].transitionTimingFunction(n)
  3556. }
  3557. }
  3558. },
  3559. _translate: function(n, o) {
  3560. this.x = n;
  3561. this.y = o
  3562. },
  3563. _clearRequestAnimationFrame: function() {
  3564. if (this.requestAnimationFrame) {
  3565. cancelAnimationFrame(this.requestAnimationFrame);
  3566. this.requestAnimationFrame = null
  3567. }
  3568. },
  3569. _updateTranslate: function() {
  3570. var n = this;
  3571. if (n.x !== n.lastX || n.y !== n.lastY) {
  3572. n.setTranslate(n.x, n.y)
  3573. }
  3574. n.requestAnimationFrame = requestAnimationFrame(function() {
  3575. n._updateTranslate()
  3576. })
  3577. },
  3578. _createScrollBar: function(n) {
  3579. var p = i.createElement("div");
  3580. var o = i.createElement("div");
  3581. p.className = f + " " + n;
  3582. o.className = c;
  3583. p.appendChild(o);
  3584. if (n === h) {
  3585. this.scrollbarY = p;
  3586. this.scrollbarIndicatorY = o
  3587. } else {
  3588. if (n === g) {
  3589. this.scrollbarX = p;
  3590. this.scrollbarIndicatorX = o
  3591. }
  3592. }
  3593. this.wrapper.appendChild(p);
  3594. return p
  3595. },
  3596. _preventDefaultException: function(n, o) {
  3597. for (var p in o) {
  3598. if (o[p].test(n[p])) {
  3599. return true
  3600. }
  3601. }
  3602. return false
  3603. },
  3604. _reLayout: function() {
  3605. if (!this.hasHorizontalScroll) {
  3606. this.maxScrollX = 0;
  3607. this.scrollerWidth = this.wrapperWidth
  3608. }
  3609. if (!this.hasVerticalScroll) {
  3610. this.maxScrollY = 0;
  3611. this.scrollerHeight = this.wrapperHeight
  3612. }
  3613. this.indicators.map(function(r) {
  3614. r.refresh()
  3615. });
  3616. if (this.options.snap && typeof this.options.snap === "string") {
  3617. var p = this.scroller.querySelectorAll(this.options.snap);
  3618. this.itemLength = 0;
  3619. this.snaps = [];
  3620. for (var n = 0,
  3621. q = p.length; n < q; n++) {
  3622. var o = p[n];
  3623. if (o.parentNode === this.scroller) {
  3624. this.itemLength++;
  3625. this.snaps.push(o)
  3626. }
  3627. }
  3628. this._initSnap()
  3629. }
  3630. },
  3631. _momentum: function(n, q, u, s, v, o) {
  3632. var t = parseFloat(Math.abs(q) / u),
  3633. p,
  3634. r;
  3635. o = o === undefined ? 0.0006 : o;
  3636. p = n + (t * t) / (2 * o) * (q < 0 ? -1 : 1);
  3637. r = t / o;
  3638. if (p < s) {
  3639. p = v ? s - (v / 2.5 * (t / 8)) : s;
  3640. q = Math.abs(p - n);
  3641. r = q / t
  3642. } else {
  3643. if (p > 0) {
  3644. p = v ? v / 2.5 * (t / 8) : 0;
  3645. q = Math.abs(n) + p;
  3646. r = q / t
  3647. }
  3648. }
  3649. return {
  3650. destination: Math.round(p),
  3651. duration: r
  3652. }
  3653. },
  3654. _getTranslateStr: function(n, o) {
  3655. if (this.options.hardwareAccelerated) {
  3656. return "translate3d(" + n + "px," + o + "px,0px) " + this.translateZ
  3657. }
  3658. return "translate(" + n + "px," + o + "px) "
  3659. },
  3660. setStopped: function(n) {
  3661. this.stopped = !!n
  3662. },
  3663. setTranslate: function(o, p) {
  3664. this.x = o;
  3665. this.y = p;
  3666. this.scrollerStyle.webkitTransform = this._getTranslateStr(o, p);
  3667. if (this.indicators) {
  3668. for (var n = this.indicators.length; n--;) {
  3669. this.indicators[n].updatePosition()
  3670. }
  3671. }
  3672. this.lastX = this.x;
  3673. this.lastY = this.y;
  3674. k.trigger(this.scroller, "scroll", this)
  3675. },
  3676. reLayout: function() {
  3677. this.wrapper.offsetHeight;
  3678. var q = parseFloat(k.getStyles(this.wrapper, "padding-left")) || 0;
  3679. var r = parseFloat(k.getStyles(this.wrapper, "padding-right")) || 0;
  3680. var s = parseFloat(k.getStyles(this.wrapper, "padding-top")) || 0;
  3681. var p = parseFloat(k.getStyles(this.wrapper, "padding-bottom")) || 0;
  3682. var o = this.wrapper.clientWidth;
  3683. var n = this.wrapper.clientHeight;
  3684. this.scrollerWidth = this.scroller.offsetWidth;
  3685. this.scrollerHeight = this.scroller.offsetHeight;
  3686. this.wrapperWidth = o - q - r;
  3687. this.wrapperHeight = n - s - p;
  3688. this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0);
  3689. this.maxScrollY = Math.min(this.wrapperHeight - this.scrollerHeight, 0);
  3690. this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0;
  3691. this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0;
  3692. this._reLayout()
  3693. },
  3694. resetPosition: function(n) {
  3695. var o = this.x,
  3696. p = this.y;
  3697. n = n || 0;
  3698. if (!this.hasHorizontalScroll || this.x > 0) {
  3699. o = 0
  3700. } else {
  3701. if (this.x < this.maxScrollX) {
  3702. o = this.maxScrollX
  3703. }
  3704. }
  3705. if (!this.hasVerticalScroll || this.y > 0) {
  3706. p = 0
  3707. } else {
  3708. if (this.y < this.maxScrollY) {
  3709. p = this.maxScrollY
  3710. }
  3711. }
  3712. if (o == this.x && p == this.y) {
  3713. return false
  3714. }
  3715. this.scrollTo(o, p, n, this.options.scrollEasing);
  3716. return true
  3717. },
  3718. _reInit: function() {
  3719. var n = this.wrapper.querySelectorAll("." + d);
  3720. for (var o = 0,
  3721. p = n.length; o < p; o++) {
  3722. if (n[o].parentNode === this.wrapper) {
  3723. this.scroller = n[o];
  3724. break
  3725. }
  3726. }
  3727. this.scrollerStyle = this.scroller && this.scroller.style
  3728. },
  3729. refresh: function() {
  3730. this._reInit();
  3731. this.reLayout();
  3732. k.trigger(this.scroller, "refresh", this);
  3733. this.resetPosition()
  3734. },
  3735. scrollTo: function(p, q, o, n) {
  3736. var n = n || j.circular;
  3737. this.isInTransition = o > 0;
  3738. if (this.isInTransition) {
  3739. this._clearRequestAnimationFrame();
  3740. this._transitionTimingFunction(n.style);
  3741. this._transitionTime(o);
  3742. this.setTranslate(p, q)
  3743. } else {
  3744. this.setTranslate(p, q)
  3745. }
  3746. },
  3747. scrollToBottom: function(o, n) {
  3748. o = o || this.options.scrollTime;
  3749. this.scrollTo(0, this.maxScrollY, o, n)
  3750. },
  3751. gotoPage: function(n) {
  3752. this._gotoPage(n)
  3753. },
  3754. destroy: function() {
  3755. this._initEvent(true);
  3756. this.wrapper.setAttribute("data-scroll", "")
  3757. }
  3758. });
  3759. var l = function(o, n) {
  3760. this.wrapper = typeof n.el == "string" ? i.querySelector(n.el) : n.el;
  3761. this.wrapperStyle = this.wrapper.style;
  3762. this.indicator = this.wrapper.children[0];
  3763. this.indicatorStyle = this.indicator.style;
  3764. this.scroller = o;
  3765. this.options = a.extend({
  3766. listenX: true,
  3767. listenY: true,
  3768. fade: false,
  3769. speedRatioX: 0,
  3770. speedRatioY: 0
  3771. },
  3772. n);
  3773. this.sizeRatioX = 1;
  3774. this.sizeRatioY = 1;
  3775. this.maxPosX = 0;
  3776. this.maxPosY = 0;
  3777. if (this.options.fade) {
  3778. this.wrapperStyle.webkitTransform = this.scroller.translateZ;
  3779. this.wrapperStyle.webkitTransitionDuration = "0ms";
  3780. this.wrapperStyle.opacity = "0"
  3781. }
  3782. };
  3783. l.prototype = {
  3784. handleEvent: function(n) {},
  3785. transitionTime: function(n) {
  3786. n = n || 0;
  3787. this.indicatorStyle.webkitTransitionDuration = n + "ms"
  3788. },
  3789. transitionTimingFunction: function(n) {
  3790. this.indicatorStyle.webkitTransitionTimingFunction = n
  3791. },
  3792. refresh: function() {
  3793. this.transitionTime();
  3794. if (this.options.listenX && !this.options.listenY) {
  3795. this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? "block": "none"
  3796. } else {
  3797. if (this.options.listenY && !this.options.listenX) {
  3798. this.indicatorStyle.display = this.scroller.hasVerticalScroll ? "block": "none"
  3799. } else {
  3800. this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? "block": "none"
  3801. }
  3802. }
  3803. this.wrapper.offsetHeight;
  3804. if (this.options.listenX) {
  3805. this.wrapperWidth = this.wrapper.clientWidth;
  3806. this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);
  3807. this.indicatorStyle.width = this.indicatorWidth + "px";
  3808. this.maxPosX = this.wrapperWidth - this.indicatorWidth;
  3809. this.minBoundaryX = 0;
  3810. this.maxBoundaryX = this.maxPosX;
  3811. this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX))
  3812. }
  3813. if (this.options.listenY) {
  3814. this.wrapperHeight = this.wrapper.clientHeight;
  3815. this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);
  3816. this.indicatorStyle.height = this.indicatorHeight + "px";
  3817. this.maxPosY = this.wrapperHeight - this.indicatorHeight;
  3818. this.minBoundaryY = 0;
  3819. this.maxBoundaryY = this.maxPosY;
  3820. this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY))
  3821. }
  3822. this.updatePosition()
  3823. },
  3824. updatePosition: function() {
  3825. var n = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
  3826. o = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
  3827. if (n < this.minBoundaryX) {
  3828. this.width = Math.max(this.indicatorWidth + n, 8);
  3829. this.indicatorStyle.width = this.width + "px";
  3830. n = this.minBoundaryX
  3831. } else {
  3832. if (n > this.maxBoundaryX) {
  3833. this.width = Math.max(this.indicatorWidth - (n - this.maxPosX), 8);
  3834. this.indicatorStyle.width = this.width + "px";
  3835. n = this.maxPosX + this.indicatorWidth - this.width
  3836. } else {
  3837. if (this.width != this.indicatorWidth) {
  3838. this.width = this.indicatorWidth;
  3839. this.indicatorStyle.width = this.width + "px"
  3840. }
  3841. }
  3842. }
  3843. if (o < this.minBoundaryY) {
  3844. this.height = Math.max(this.indicatorHeight + o * 3, 8);
  3845. this.indicatorStyle.height = this.height + "px";
  3846. o = this.minBoundaryY
  3847. } else {
  3848. if (o > this.maxBoundaryY) {
  3849. this.height = Math.max(this.indicatorHeight - (o - this.maxPosY) * 3, 8);
  3850. this.indicatorStyle.height = this.height + "px";
  3851. o = this.maxPosY + this.indicatorHeight - this.height
  3852. } else {
  3853. if (this.height != this.indicatorHeight) {
  3854. this.height = this.indicatorHeight;
  3855. this.indicatorStyle.height = this.height + "px"
  3856. }
  3857. }
  3858. }
  3859. this.x = n;
  3860. this.y = o;
  3861. this.indicatorStyle.webkitTransform = this.scroller._getTranslateStr(n, o)
  3862. },
  3863. fade: function(q, o) {
  3864. if (o && !this.visible) {
  3865. return
  3866. }
  3867. clearTimeout(this.fadeTimeout);
  3868. this.fadeTimeout = null;
  3869. var p = q ? 250 : 500,
  3870. n = q ? 0 : 300;
  3871. q = q ? "1": "0";
  3872. this.wrapperStyle.webkitTransitionDuration = p + "ms";
  3873. this.fadeTimeout = setTimeout((function(r) {
  3874. this.wrapperStyle.opacity = r;
  3875. this.visible = +r
  3876. }).bind(this, q), n)
  3877. }
  3878. };
  3879. k.Scroll = m;
  3880. a.fn.scroll = function(n) {
  3881. return new m(a(this), n)
  3882. }
  3883. })(window.jQuery, window.fui, document); (function(a, t, s) {
  3884. var p = "f-pull-top-pocket";
  3885. var j = "f-pull-bottom-pocket";
  3886. var i = "f-pull";
  3887. var o = "f-pull-loading";
  3888. var k = "f-pull-caption";
  3889. var l = "f-pull-caption-down";
  3890. var n = "f-pull-caption-refresh";
  3891. var m = "f-pull-caption-nomore";
  3892. var d = "f-icon";
  3893. var q = "f-spinner";
  3894. var e = "f-icon-pulldown";
  3895. var b = "f-block";
  3896. var c = "f-hidden";
  3897. var r = "f-visibility";
  3898. var h = o + " " + d + " " + e;
  3899. var g = o + " " + d + " " + e;
  3900. var f = o + " " + d + " " + q;
  3901. var u = ['<div class="' + i + '">', '<div class="{icon}"></div>', '<div class="' + k + '">{contentrefresh}</div>', "</div>"].join("");
  3902. var v = {
  3903. init: function(w, x) {
  3904. this._super(w, a.extend(true, {
  3905. scrollY: true,
  3906. scrollX: false,
  3907. indicators: true,
  3908. deceleration: 0.003,
  3909. down: {
  3910. height: 50,
  3911. contentinit: "下拉可以刷新",
  3912. contentdown: "下拉可以刷新",
  3913. contentover: "释放立即刷新",
  3914. contentrefresh: "正在刷新..."
  3915. },
  3916. up: {
  3917. height: 50,
  3918. auto: false,
  3919. contentinit: "上拉显示更多",
  3920. contentdown: "上拉显示更多",
  3921. contentrefresh: "正在加载...",
  3922. contentnomore: "没有更多数据了",
  3923. duration: 300
  3924. }
  3925. },
  3926. x))
  3927. },
  3928. _init: function() {
  3929. this._super();
  3930. this._initPocket()
  3931. },
  3932. _initPulldownRefresh: function() {
  3933. this.pulldown = true;
  3934. if (this.topPocket) {
  3935. this.pullPocket = this.topPocket;
  3936. this.pullPocket.classList.add(b);
  3937. this.pullPocket.classList.add(r);
  3938. this.pullCaption = this.topCaption;
  3939. this.pullLoading = this.topLoading
  3940. }
  3941. },
  3942. _initPullupRefresh: function() {
  3943. this.pulldown = false;
  3944. if (this.bottomPocket) {
  3945. this.pullPocket = this.bottomPocket;
  3946. this.pullPocket.classList.add(b);
  3947. this.pullPocket.classList.add(r);
  3948. this.pullCaption = this.bottomCaption;
  3949. this.pullLoading = this.bottomLoading
  3950. }
  3951. },
  3952. _initPocket: function() {
  3953. var w = this.options;
  3954. if (w.down && w.down.hasOwnProperty("callback")) {
  3955. this.topPocket = this.scroller.querySelector("." + p);
  3956. if (!this.topPocket) {
  3957. this.topPocket = this._createPocket(p, w.down, g);
  3958. this.wrapper.insertBefore(this.topPocket, this.wrapper.firstChild)
  3959. }
  3960. this.topLoading = this.topPocket.querySelector("." + o);
  3961. this.topCaption = this.topPocket.querySelector("." + k)
  3962. }
  3963. if (w.up && w.up.hasOwnProperty("callback")) {
  3964. this.bottomPocket = this.scroller.querySelector("." + j);
  3965. if (!this.bottomPocket) {
  3966. this.bottomPocket = this._createPocket(j, w.up, f);
  3967. this.scroller.appendChild(this.bottomPocket)
  3968. }
  3969. this.bottomLoading = this.bottomPocket.querySelector("." + o);
  3970. this.bottomCaption = this.bottomPocket.querySelector("." + k);
  3971. this.wrapper.addEventListener("scrollbottom", this)
  3972. }
  3973. },
  3974. _createPocket: function(w, y, x) {
  3975. var z = s.createElement("div");
  3976. z.className = w;
  3977. z.innerHTML = u.replace("{contentrefresh}", y.contentinit).replace("{icon}", x);
  3978. return z
  3979. },
  3980. _resetPullDownLoading: function() {
  3981. var w = this.pullLoading;
  3982. if (w) {
  3983. this.pullCaption.innerHTML = this.options.down.contentdown;
  3984. w.style.webkitTransition = "";
  3985. w.style.webkitTransform = "";
  3986. w.style.webkitAnimation = "";
  3987. w.className = g
  3988. }
  3989. },
  3990. _setCaptionClass: function(x, w, y) {
  3991. if (!x) {
  3992. switch (y) {
  3993. case this.options.up.contentdown:
  3994. w.className = k + " " + l;
  3995. break;
  3996. case this.options.up.contentrefresh:
  3997. w.className = k + " " + n;
  3998. break;
  3999. case this.options.up.contentnomore:
  4000. w.className = k + " " + m;
  4001. break
  4002. }
  4003. }
  4004. },
  4005. _setCaption: function(D, B) {
  4006. if (this.loading) {
  4007. return
  4008. }
  4009. var z = this.options;
  4010. var A = this.pullPocket;
  4011. var w = this.pullCaption;
  4012. var y = this.pullLoading;
  4013. var x = this.pulldown;
  4014. var C = this;
  4015. if (A) {
  4016. if (B) {
  4017. setTimeout(function() {
  4018. w.innerHTML = C.lastTitle = D;
  4019. if (x) {
  4020. y.className = g
  4021. } else {
  4022. C._setCaptionClass(false, w, D);
  4023. y.className = f
  4024. }
  4025. y.style.webkitAnimation = "";
  4026. y.style.webkitTransition = "";
  4027. y.style.webkitTransform = ""
  4028. },
  4029. 100)
  4030. } else {
  4031. if (D !== this.lastTitle) {
  4032. w.innerHTML = D;
  4033. if (x) {
  4034. if (D === z.down.contentrefresh) {
  4035. y.className = f;
  4036. y.style.webkitAnimation = "spinner-spin 1s step-end infinite"
  4037. } else {
  4038. if (D === z.down.contentover) {
  4039. y.className = h;
  4040. y.style.webkitTransition = "-webkit-transform 0.3s ease-in";
  4041. y.style.webkitTransform = "rotate(180deg)"
  4042. } else {
  4043. if (D === z.down.contentdown) {
  4044. y.className = g;
  4045. y.style.webkitTransition = "-webkit-transform 0.3s ease-in";
  4046. y.style.webkitTransform = "rotate(0deg)"
  4047. }
  4048. }
  4049. }
  4050. } else {
  4051. if (D === z.up.contentrefresh) {
  4052. y.className = f + " " + r
  4053. } else {
  4054. y.className = f + " " + c
  4055. }
  4056. C._setCaptionClass(false, w, D)
  4057. }
  4058. this.lastTitle = D
  4059. }
  4060. }
  4061. }
  4062. }
  4063. };
  4064. t.PullRefresh = v
  4065. })(window.jQuery, window.fui, document); (function(a, e, h, d, g) {
  4066. var c = "f-visibility";
  4067. var b = "f-hidden";
  4068. var f = e.Scroll.extend(a.extend({
  4069. handleEvent: function(i) {
  4070. this._super(i);
  4071. if (i.type === "scrollbottom") {
  4072. if (i.target === this.scroller) {
  4073. this._scrollbottom()
  4074. }
  4075. }
  4076. },
  4077. _scrollbottom: function() {
  4078. if (!this.pulldown && !this.loading) {
  4079. this.pulldown = false;
  4080. this._initPullupRefresh();
  4081. this.pullupLoading()
  4082. }
  4083. },
  4084. _start: function(i) {
  4085. if (i.touches && i.touches.length && i.touches[0].clientX > 30) {
  4086. i.target && !this._preventDefaultException(i.target, this.options.preventDefaultException) && i.preventDefault()
  4087. }
  4088. if (!this.loading) {
  4089. this.pulldown = this.pullPocket = this.pullCaption = this.pullLoading = false
  4090. }
  4091. this._super(i)
  4092. },
  4093. _drag: function(i) {
  4094. this._super(i);
  4095. if (!this.pulldown && !this.loading && this.topPocket && i.detail.direction === "down" && this.y >= 0) {
  4096. this._initPulldownRefresh()
  4097. }
  4098. if (this.pulldown) {
  4099. this._setCaption(this.y > this.options.down.height ? this.options.down.contentover: this.options.down.contentdown)
  4100. }
  4101. },
  4102. _reLayout: function() {
  4103. this.hasVerticalScroll = true;
  4104. this._super()
  4105. },
  4106. resetPosition: function(i) {
  4107. if (this.pulldown) {
  4108. if (this.y >= this.options.down.height) {
  4109. this.pulldownLoading(g, i || 0);
  4110. return true
  4111. } else { ! this.loading && this.topPocket.classList.remove(c)
  4112. }
  4113. }
  4114. return this._super(i)
  4115. },
  4116. pulldownLoading: function(k, j) {
  4117. typeof k === "undefined" && (k = this.options.down.height);
  4118. this.scrollTo(0, k, j, this.options.bounceEasing);
  4119. if (this.loading) {
  4120. return
  4121. }
  4122. this._initPulldownRefresh();
  4123. this._setCaption(this.options.down.contentrefresh);
  4124. this.loading = true;
  4125. this.indicators.map(function(l) {
  4126. l.fade(0)
  4127. });
  4128. var i = this.options.down.callback;
  4129. i && i.call(this)
  4130. },
  4131. endPulldownToRefresh: function() {
  4132. var i = this;
  4133. if (i.topPocket && i.loading && this.pulldown) {
  4134. i.scrollTo(0, 0, i.options.bounceTime, i.options.bounceEasing);
  4135. i.loading = false;
  4136. i._setCaption(i.options.down.contentdown, true);
  4137. setTimeout(function() {
  4138. i.loading || i.topPocket.classList.remove(c)
  4139. },
  4140. 350)
  4141. }
  4142. },
  4143. pullupLoading: function(i, k, j) {
  4144. k = k || 0;
  4145. this.scrollTo(k, this.maxScrollY, j, this.options.bounceEasing);
  4146. if (this.loading) {
  4147. return
  4148. }
  4149. this._initPullupRefresh();
  4150. this._setCaption(this.options.up.contentrefresh);
  4151. this.indicators.map(function(l) {
  4152. l.fade(0)
  4153. });
  4154. this.loading = true;
  4155. i = i || this.options.up.callback;
  4156. i && i.call(this)
  4157. },
  4158. endPullupToRefresh: function(i) {
  4159. var j = this;
  4160. if (j.bottomPocket) {
  4161. j.loading = false;
  4162. if (i) {
  4163. this.finished = true;
  4164. j._setCaption(j.options.up.contentnomore);
  4165. j.wrapper.removeEventListener("scrollbottom", j)
  4166. } else {
  4167. j._setCaption(j.options.up.contentdown);
  4168. j.loading || j.bottomPocket.classList.remove(c)
  4169. }
  4170. }
  4171. },
  4172. disablePullupToRefresh: function() {
  4173. this._initPullupRefresh();
  4174. this.bottomPocket.className = "f-pull-bottom-pocket " + b;
  4175. this.wrapper.removeEventListener("scrollbottom", this)
  4176. },
  4177. enablePullupToRefresh: function() {
  4178. var i = this.pulldown;
  4179. this._initPullupRefresh();
  4180. this.bottomPocket.classList.remove(b);
  4181. this._setCaption(this.options.up.contentdown);
  4182. if (i) {
  4183. this.pulldown = true;
  4184. this.bottomPocket.classList.remove(c)
  4185. }
  4186. this.wrapper.addEventListener("scrollbottom", this)
  4187. },
  4188. refresh: function(i) {
  4189. if (i && this.finished) {
  4190. this.enablePullupToRefresh();
  4191. this.finished = false
  4192. }
  4193. this._super()
  4194. },
  4195. },
  4196. e.PullRefresh));
  4197. a.fn.pullRefresh = function(i) {
  4198. return new f(a(this), i)
  4199. }
  4200. })(window.jQuery, window.fui, window, document); (function(a, k, q, j, p) {
  4201. var e = "f-slider";
  4202. var f = "f-slider-group";
  4203. var i = "f-slider-loop";
  4204. var g = "f-slider-indicator";
  4205. var c = "f-action-previous";
  4206. var b = "f-action-next";
  4207. var h = "f-slider-item";
  4208. var d = "f-active";
  4209. var m = "." + h;
  4210. var l = "." + g;
  4211. var n = ".f-slider-progress-bar";
  4212. var o = k.Scroll.extend({
  4213. init: function(r, v) {
  4214. v = v || {};
  4215. r.addClass(e);
  4216. var s = a('<div class="f-slider-group" ></div>');
  4217. r.append(s);
  4218. var w = this;
  4219. if (v.loop == p) {
  4220. w.loop = true
  4221. }
  4222. if ( !! v.indicator) {
  4223. w.$indicator = a('<div class="' + g + '" ></div>');
  4224. r.append(w.$indicator)
  4225. }
  4226. var t = v.data || [];
  4227. var u = t.length;
  4228. if (u == 0) {
  4229. return
  4230. } else {
  4231. if (u == 1) {
  4232. s.append('<div class="' + h + '"><div><img src="' + t[0] + '"></div></div>')
  4233. } else {
  4234. if (w.loop) {
  4235. s.append('<div class="' + h + ' f-slider-item-duplicate"><div><img src="' + t[u - 1] + '"></div></div>')
  4236. }
  4237. a.each(t,
  4238. function(x, y) {
  4239. if ( !! v.indicator) {
  4240. w.$indicator.append('<div class="f-indicator ' + (x == 0 ? d: "") + '" ></div>')
  4241. }
  4242. s.append('<div class="' + h + " " + (x == 0 ? d: "") + ' "><div><img src="' + y + '"></div></div>')
  4243. });
  4244. if (w.loop) {
  4245. s.append('<div class="' + h + ' f-slider-item-duplicate"><div><img src="' + t[0] + '"></div></div>')
  4246. }
  4247. }
  4248. }
  4249. this._super(s, a.extend(true, {
  4250. fingers: 1,
  4251. interval: 0,
  4252. scrollY: false,
  4253. scrollX: true,
  4254. indicators: false,
  4255. scrollTime: 1000,
  4256. startX: false,
  4257. slideTime: 0,
  4258. snap: m
  4259. },
  4260. v));
  4261. this.options.gotonum != p && this.options.gotonum > 0 && this.gotoItem(this.options.gotonum, 0)
  4262. },
  4263. _init: function() {
  4264. this._reInit();
  4265. if (this.scroller) {
  4266. this.scrollerStyle = this.scroller.style;
  4267. this.progressBar = this.wrapper.querySelector(n);
  4268. if (this.progressBar) {
  4269. this.progressBarWidth = this.progressBar.offsetWidth;
  4270. this.progressBarStyle = this.progressBar.style
  4271. }
  4272. this._super();
  4273. this._initTimer()
  4274. }
  4275. },
  4276. _triggerSlide: function() {
  4277. var s = this;
  4278. s.isInTransition = false;
  4279. var r = s.currentPage;
  4280. s.slideNumber = s._fixedSlideNumber();
  4281. if (s.loop && s.itemLength > 1) {
  4282. if (s.slideNumber === 0) {
  4283. s.setTranslate(s.pages[1][0].x, 0)
  4284. } else {
  4285. if (s.slideNumber === s.itemLength - 3) {
  4286. s.setTranslate(s.pages[s.itemLength - 2][0].x, 0)
  4287. }
  4288. }
  4289. }
  4290. if (s.lastSlideNumber != s.slideNumber) {
  4291. s.lastSlideNumber = s.slideNumber;
  4292. s.lastPage = s.currentPage;
  4293. k.trigger(s.wrapper, "slide", {
  4294. slideNumber: s.slideNumber
  4295. })
  4296. }
  4297. s._initTimer()
  4298. },
  4299. _handleSlide: function(u) {
  4300. var C = this;
  4301. if (u.target !== C.wrapper) {
  4302. return
  4303. }
  4304. var t = u.detail;
  4305. t.slideNumber = t.slideNumber || 0;
  4306. var D = C.scroller.querySelectorAll(m);
  4307. var z = [];
  4308. for (var v = 0,
  4309. A = D.length; v < A; v++) {
  4310. var y = D[v];
  4311. if (y.parentNode === C.scroller) {
  4312. z.push(y)
  4313. }
  4314. }
  4315. var r = t.slideNumber;
  4316. if (C.loop) {
  4317. r += 1
  4318. }
  4319. if (!C.wrapper.classList.contains("f-segmented-control")) {
  4320. for (var v = 0,
  4321. A = z.length; v < A; v++) {
  4322. var y = z[v];
  4323. if (y.parentNode === C.scroller) {
  4324. if (v === r) {
  4325. y.classList.add(d)
  4326. } else {
  4327. y.classList.remove(d)
  4328. }
  4329. }
  4330. }
  4331. }
  4332. var x = C.wrapper.parentNode.querySelector(".f-slider-indicator");
  4333. if (x) {
  4334. if (x.getAttribute("data-scroll")) {
  4335. a(x).scroll().gotoPage(t.slideNumber)
  4336. }
  4337. var w = x.querySelectorAll(".f-indicator");
  4338. if (w.length > 0) {
  4339. for (var v = 0,
  4340. A = w.length; v < A; v++) {
  4341. w[v].classList[v === t.slideNumber ? "add": "remove"](d)
  4342. }
  4343. } else {
  4344. var B = x.querySelector(".f-number span");
  4345. if (B) {
  4346. B.innerText = (t.slideNumber + 1)
  4347. } else {
  4348. var s = x.querySelectorAll(".f-control-item");
  4349. for (var v = 0,
  4350. A = s.length; v < A; v++) {
  4351. s[v].classList[v === t.slideNumber ? "add": "remove"](d)
  4352. }
  4353. }
  4354. }
  4355. }
  4356. u.stopPropagation()
  4357. },
  4358. _handleTabShow: function(r) {
  4359. var s = this;
  4360. s.gotoItem((r.detail.tabNumber || 0), s.options.slideTime)
  4361. },
  4362. _handleIndicatorTap: function(r) {
  4363. var s = this;
  4364. var t = r.target;
  4365. if (t.classList.contains(c) || t.classList.contains(b)) {
  4366. s[t.classList.contains(c) ? "prevItem": "nextItem"]();
  4367. r.stopPropagation()
  4368. }
  4369. },
  4370. _initEvent: function(s) {
  4371. var t = this;
  4372. t._super(s);
  4373. var r = s ? "removeEventListener": "addEventListener";
  4374. t.wrapper[r]("slide", this);
  4375. t.wrapper[r]("show.f.tab", this)
  4376. },
  4377. handleEvent: function(r) {
  4378. this._super(r);
  4379. switch (r.type) {
  4380. case "slide":
  4381. this._handleSlide(r);
  4382. break;
  4383. case "show.f.tab":
  4384. if (~this.snaps.indexOf(r.target)) {
  4385. this._handleTabShow(r)
  4386. }
  4387. break
  4388. }
  4389. },
  4390. _scrollend: function(r) {
  4391. this._super(r);
  4392. this._triggerSlide(r)
  4393. },
  4394. _drag: function(s) {
  4395. this._super(s);
  4396. var r = s.detail.direction;
  4397. if (r === "left" || r === "right") {
  4398. var t = this.wrapper.getAttribute("data-slidershowTimer");
  4399. t && q.clearTimeout(t);
  4400. s.stopPropagation()
  4401. }
  4402. },
  4403. _initTimer: function() {
  4404. var s = this;
  4405. var t = s.wrapper;
  4406. var r = s.options.interval;
  4407. var u = t.getAttribute("data-slidershowTimer");
  4408. u && q.clearTimeout(u);
  4409. if (r) {
  4410. u = q.setTimeout(function() {
  4411. if (!t) {
  4412. return
  4413. }
  4414. if ( !! (t.offsetWidth || t.offsetHeight)) {
  4415. s.nextItem(true)
  4416. }
  4417. s._initTimer()
  4418. },
  4419. r);
  4420. t.setAttribute("data-slidershowTimer", u)
  4421. }
  4422. },
  4423. _fixedSlideNumber: function(r) {
  4424. r = r || this.currentPage;
  4425. var s = r.pageX;
  4426. if (this.loop) {
  4427. if (r.pageX === 0) {
  4428. s = this.itemLength - 3
  4429. } else {
  4430. if (r.pageX === (this.itemLength - 1)) {
  4431. s = 0
  4432. } else {
  4433. s = r.pageX - 1
  4434. }
  4435. }
  4436. }
  4437. return s
  4438. },
  4439. _reLayout: function() {
  4440. this.hasHorizontalScroll = true;
  4441. this._super()
  4442. },
  4443. _getScroll: function() {
  4444. var r = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
  4445. return r ? r.x: 0
  4446. },
  4447. _transitionEnd: function(r) {
  4448. if (r.target !== this.scroller || !this.isInTransition) {
  4449. return
  4450. }
  4451. this._transitionTime();
  4452. this.isInTransition = false;
  4453. k.trigger(this.wrapper, "scrollend", this)
  4454. },
  4455. _flick: function(t) {
  4456. if (!this.moved) {
  4457. return
  4458. }
  4459. var r = t.detail;
  4460. var s = r.direction;
  4461. this._clearRequestAnimationFrame();
  4462. this.isInTransition = true;
  4463. if (t.type === "flick") {
  4464. if (r.deltaTime < 200) {
  4465. this.x = this._getPage((this.slideNumber + (s === "right" ? -1 : 1)), true).x
  4466. }
  4467. this.resetPosition(this.options.bounceTime)
  4468. } else {
  4469. if (t.type === "dragend" && !r.flick) {
  4470. this.resetPosition(this.options.bounceTime)
  4471. }
  4472. }
  4473. t.stopPropagation()
  4474. },
  4475. _initSnap: function() {
  4476. this.scrollerWidth = this.itemLength * this.scrollerWidth;
  4477. this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0);
  4478. this._super();
  4479. if (!this.currentPage.x) {
  4480. var r = this.pages[this.loop ? 1 : 0];
  4481. r = r || this.pages[0];
  4482. if (!r) {
  4483. return
  4484. }
  4485. this.currentPage = r[0];
  4486. this.slideNumber = 0;
  4487. this.lastSlideNumber = typeof this.lastSlideNumber === "undefined" ? 0 : this.lastSlideNumber
  4488. } else {
  4489. this.slideNumber = this._fixedSlideNumber();
  4490. this.lastSlideNumber = typeof this.lastSlideNumber === "undefined" ? this.slideNumber: this.lastSlideNumber
  4491. }
  4492. this.options.startX = this.currentPage.x || 0
  4493. },
  4494. _getSnapX: function(r) {
  4495. return Math.max( - r, this.maxScrollX)
  4496. },
  4497. _getPage: function(s, r) {
  4498. if (this.loop) {
  4499. if (s > (this.itemLength - (r ? 2 : 3))) {
  4500. s = 1;
  4501. time = 0
  4502. } else {
  4503. if (s < (r ? -1 : 0)) {
  4504. s = this.itemLength - 2;
  4505. time = 0
  4506. } else {
  4507. s += 1
  4508. }
  4509. }
  4510. } else {
  4511. if (!r) {
  4512. if (s > (this.itemLength - 1)) {
  4513. s = 0;
  4514. time = 0
  4515. } else {
  4516. if (s < 0) {
  4517. s = this.itemLength - 1;
  4518. time = 0
  4519. }
  4520. }
  4521. }
  4522. s = Math.min(Math.max(0, s), this.itemLength - 1)
  4523. }
  4524. if (s < 0) {
  4525. s = 0
  4526. }
  4527. if (this.itemLength == 1) {
  4528. return this.pages[0][0]
  4529. }
  4530. return this.pages[s][0]
  4531. },
  4532. _gotoItem: function(r, s) {
  4533. this.currentPage = this._getPage(r, true);
  4534. this.scrollTo(this.currentPage.x, 0, s, this.options.scrollEasing);
  4535. if (s === 0) {
  4536. k.trigger(this.wrapper, "scrollend", this)
  4537. }
  4538. },
  4539. setTranslate: function(s, t) {
  4540. this._super(s, t);
  4541. var r = this.progressBar;
  4542. if (r) {
  4543. this.progressBarStyle.webkitTransform = this._getTranslateStr(( - s * (this.progressBarWidth / this.wrapperWidth)), 0)
  4544. }
  4545. },
  4546. resetPosition: function(r) {
  4547. r = r || 0;
  4548. if (this.x > 0) {
  4549. this.x = 0
  4550. } else {
  4551. if (this.x < this.maxScrollX) {
  4552. this.x = this.maxScrollX
  4553. }
  4554. }
  4555. this.currentPage = this._nearestSnap(this.x);
  4556. this.scrollTo(this.currentPage.x, 0, r, this.options.scrollEasing);
  4557. return true
  4558. },
  4559. gotoItem: function(r, s) {
  4560. this._gotoItem(r, typeof s === "undefined" ? this.options.scrollTime: s)
  4561. },
  4562. nextItem: function() {
  4563. this._gotoItem(this.slideNumber + 1, this.options.scrollTime)
  4564. },
  4565. prevItem: function() {
  4566. this._gotoItem(this.slideNumber - 1, this.options.scrollTime)
  4567. },
  4568. getSlideNumber: function() {
  4569. return this.slideNumber || 0
  4570. },
  4571. _reInit: function() {
  4572. var r = this.wrapper.querySelectorAll("." + f);
  4573. for (var s = 0,
  4574. t = r.length; s < t; s++) {
  4575. if (r[s].parentNode === this.wrapper) {
  4576. this.scroller = r[s];
  4577. break
  4578. }
  4579. }
  4580. this.scrollerStyle = this.scroller && this.scroller.style;
  4581. if (this.progressBar) {
  4582. this.progressBarWidth = this.progressBar.offsetWidth;
  4583. this.progressBarStyle = this.progressBar.style
  4584. }
  4585. },
  4586. refresh: function(r) {
  4587. if (r) {
  4588. a.extend(this.options, r);
  4589. this._super();
  4590. this._initTimer()
  4591. } else {
  4592. this._super()
  4593. }
  4594. },
  4595. destroy: function() {
  4596. this._initEvent(true);
  4597. this.wrapper.setAttribute("data-slider", "")
  4598. }
  4599. });
  4600. a.fn.slider = function(r) {
  4601. return new o(a(this), r)
  4602. }
  4603. })(window.jQuery, window.fui, window, document); (function(a, h, d) {
  4604. var b = "f-zoom";
  4605. var c = "f-zoom-scroller";
  4606. var i = "." + b;
  4607. var j = "." + c;
  4608. var g = "pinchstart";
  4609. var e = "pinch";
  4610. var f = "pinchend";
  4611. if ("ongesturestart" in window) {
  4612. g = "gesturestart";
  4613. e = "gesturechange";
  4614. f = "gestureend"
  4615. }
  4616. a.Zoom = function(l, C) {
  4617. var L = this;
  4618. L.options = a.extend(a.Zoom.defaults, C);
  4619. L.wrapper = L.element = l;
  4620. L.scroller = l.querySelector(j);
  4621. L.scrollerStyle = L.scroller && L.scroller.style;
  4622. L.zoomer = l.querySelector(i);
  4623. L.zoomerStyle = L.zoomer && L.zoomer.style;
  4624. L.init = function() {
  4625. h.options.gestureConfig.pinch = true;
  4626. h.options.gestureConfig.doubletap = true;
  4627. L.initEvents()
  4628. };
  4629. L.initEvents = function(N) {
  4630. var M = N ? "removeEventListener": "addEventListener";
  4631. var O = L.scroller;
  4632. O[M](g, L.onPinchstart);
  4633. O[M](e, L.onPinch);
  4634. O[M](f, L.onPinchend);
  4635. O[M](h.event.start, L.onTouchstart);
  4636. O[M](h.event.move, L.onTouchMove);
  4637. O[M](h.event.cancel, L.onTouchEnd);
  4638. O[M](h.event.end, L.onTouchEnd);
  4639. O[M]("drag", L.dragEvent);
  4640. O[M]("doubletap", L.doubleTapEvent)
  4641. };
  4642. L.dragEvent = function(M) {
  4643. if (p || A) {
  4644. M.stopPropagation()
  4645. }
  4646. };
  4647. L.doubleTapEvent = function(M) {
  4648. L.toggleZoom(M.detail.center)
  4649. };
  4650. L.transition = function(M, N) {
  4651. N = N || 0;
  4652. M.webkitTransitionDuration = N + "ms";
  4653. return L
  4654. };
  4655. L.translate = function(M, N, O) {
  4656. N = N || 0;
  4657. O = O || 0;
  4658. M.webkitTransform = "translate3d(" + N + "px," + O + "px,0px)";
  4659. return L
  4660. };
  4661. L.scale = function(N, M) {
  4662. M = M || 1;
  4663. N.webkitTransform = "translate3d(0,0,0) scale(" + M + ")";
  4664. return L
  4665. };
  4666. L.scrollerTransition = function(M) {
  4667. return L.transition(L.scrollerStyle, M)
  4668. };
  4669. L.scrollerTransform = function(M, N) {
  4670. return L.translate(L.scrollerStyle, M, N)
  4671. };
  4672. L.zoomerTransition = function(M) {
  4673. return L.transition(L.zoomerStyle, M)
  4674. };
  4675. L.zoomerTransform = function(M) {
  4676. return L.scale(L.zoomerStyle, M)
  4677. };
  4678. var D = 1,
  4679. k = 1,
  4680. B = false,
  4681. A = false;
  4682. L.onPinchstart = function(M) {
  4683. A = true
  4684. };
  4685. L.onPinch = function(M) {
  4686. if (!B) {
  4687. L.zoomerTransition(0);
  4688. B = true
  4689. }
  4690. D = (M.detail ? M.detail.scale: M.scale) * k;
  4691. if (D > L.options.maxZoom) {
  4692. D = L.options.maxZoom - 1 + Math.pow((D - L.options.maxZoom + 1), 0.5)
  4693. }
  4694. if (D < L.options.minZoom) {
  4695. D = L.options.minZoom + 1 - Math.pow((L.options.minZoom - D + 1), 0.5)
  4696. }
  4697. L.zoomerTransform(D)
  4698. };
  4699. L.onPinchend = function(M) {
  4700. D = Math.max(Math.min(D, L.options.maxZoom), L.options.minZoom);
  4701. L.zoomerTransition(L.options.speed).zoomerTransform(D);
  4702. k = D;
  4703. B = false
  4704. };
  4705. L.setZoom = function(M) {
  4706. D = k = M;
  4707. L.scrollerTransition(L.options.speed).scrollerTransform(0, 0);
  4708. L.zoomerTransition(L.options.speed).zoomerTransform(D)
  4709. };
  4710. L.toggleZoom = function(Q, R) {
  4711. if (typeof Q === "number") {
  4712. R = Q;
  4713. Q = undefined
  4714. }
  4715. R = typeof R === "undefined" ? L.options.speed: R;
  4716. if (D && D !== 1) {
  4717. D = k = 1;
  4718. L.scrollerTransition(R).scrollerTransform(0, 0)
  4719. } else {
  4720. D = k = L.options.maxZoom;
  4721. if (Q) {
  4722. var N = h.offset(L.zoomer);
  4723. var S = N.top;
  4724. var M = N.left;
  4725. var O = (Q.x - M) * D;
  4726. var P = (Q.y - S) * D;
  4727. this._cal();
  4728. if (O >= r && O <= (r + K)) {
  4729. O = r - O + K / 2
  4730. } else {
  4731. if (O < r) {
  4732. O = r - O + K / 2
  4733. } else {
  4734. if (O > (r + K)) {
  4735. O = r + K - O - K / 2
  4736. }
  4737. }
  4738. }
  4739. if (P >= s && P <= (s + J)) {
  4740. P = s - P + J / 2
  4741. } else {
  4742. if (P < s) {
  4743. P = s - P + J / 2
  4744. } else {
  4745. if (P > (s + J)) {
  4746. P = s + J - P - J / 2
  4747. }
  4748. }
  4749. }
  4750. O = Math.min(Math.max(O, t), r);
  4751. P = Math.min(Math.max(P, u), s);
  4752. L.scrollerTransition(R).scrollerTransform(O, P)
  4753. } else {
  4754. L.scrollerTransition(R).scrollerTransform(0, 0)
  4755. }
  4756. }
  4757. L.zoomerTransition(R).zoomerTransform(D)
  4758. };
  4759. L._cal = function() {
  4760. K = L.wrapper.offsetWidth;
  4761. J = L.wrapper.offsetHeight;
  4762. z = L.zoomer.offsetWidth;
  4763. o = L.zoomer.offsetHeight;
  4764. var N = z * D;
  4765. var M = o * D;
  4766. t = Math.min((K / 2 - N / 2), 0);
  4767. r = -t;
  4768. u = Math.min((J / 2 - M / 2), 0);
  4769. s = -u
  4770. };
  4771. var K, J, q, p, m, n, t, u, r, s, z, o, y = {},
  4772. x = {},
  4773. v, w, E, G, H, F, I;
  4774. L.onTouchstart = function(M) {
  4775. M.preventDefault();
  4776. q = true;
  4777. y.x = M.type === "touchstart" ? M.targetTouches[0].pageX: M.pageX;
  4778. y.y = M.type === "touchstart" ? M.targetTouches[0].pageY: M.pageY
  4779. };
  4780. L.onTouchMove = function(M) {
  4781. M.preventDefault();
  4782. if (!q) {
  4783. return
  4784. }
  4785. if (!p) {
  4786. K = L.wrapper.offsetWidth;
  4787. J = L.wrapper.offsetHeight;
  4788. z = L.zoomer.offsetWidth;
  4789. o = L.zoomer.offsetHeight;
  4790. var P = h.parseTranslateMatrix(h.getStyles(L.scroller, "webkitTransform"));
  4791. v = P.x || 0;
  4792. w = P.y || 0;
  4793. L.scrollerTransition(0)
  4794. }
  4795. var O = z * D;
  4796. var N = o * D;
  4797. if (O < K && N < J) {
  4798. return
  4799. }
  4800. t = Math.min((K / 2 - O / 2), 0);
  4801. r = -t;
  4802. u = Math.min((J / 2 - N / 2), 0);
  4803. s = -u;
  4804. x.x = M.type === h.event.move ? M.targetTouches[0].pageX: M.pageX;
  4805. x.y = M.type === h.event.move ? M.targetTouches[0].pageY: M.pageY;
  4806. if (!p && !B) {
  4807. if ((Math.floor(t) === Math.floor(v) && x.x < y.x) || (Math.floor(r) === Math.floor(v) && x.x > y.x)) {
  4808. q = false;
  4809. return
  4810. }
  4811. }
  4812. p = true;
  4813. m = x.x - y.x + v;
  4814. n = x.y - y.y + w;
  4815. if (m < t) {
  4816. m = t + 1 - Math.pow((t - m + 1), 0.8)
  4817. }
  4818. if (m > r) {
  4819. m = r - 1 + Math.pow((m - r + 1), 0.8)
  4820. }
  4821. if (n < u) {
  4822. n = u + 1 - Math.pow((u - n + 1), 0.8)
  4823. }
  4824. if (n > s) {
  4825. n = s - 1 + Math.pow((n - s + 1), 0.8)
  4826. }
  4827. if (!E) {
  4828. E = x.x
  4829. }
  4830. if (!F) {
  4831. F = x.y
  4832. }
  4833. if (!G) {
  4834. G = h.now()
  4835. }
  4836. H = (x.x - E) / (h.now() - G) / 2;
  4837. I = (x.y - F) / (h.now() - G) / 2;
  4838. if (Math.abs(x.x - E) < 2) {
  4839. H = 0
  4840. }
  4841. if (Math.abs(x.y - F) < 2) {
  4842. I = 0
  4843. }
  4844. E = x.x;
  4845. F = x.y;
  4846. G = h.now();
  4847. L.scrollerTransform(m, n)
  4848. };
  4849. L.onTouchEnd = function(M) {
  4850. if (!M.touches || !M.touches.length) {
  4851. A = false
  4852. }
  4853. if (!q || !p) {
  4854. q = false;
  4855. p = false;
  4856. return
  4857. }
  4858. q = false;
  4859. p = false;
  4860. var Q = 300;
  4861. var R = 300;
  4862. var N = H * Q;
  4863. var S = m + N;
  4864. var O = I * R;
  4865. var T = n + O;
  4866. if (H !== 0) {
  4867. Q = Math.abs((S - m) / H)
  4868. }
  4869. if (I !== 0) {
  4870. R = Math.abs((T - n) / I)
  4871. }
  4872. var P = Math.max(Q, R);
  4873. m = S;
  4874. n = T;
  4875. var V = z * D;
  4876. var U = o * D;
  4877. t = Math.min((K / 2 - V / 2), 0);
  4878. r = -t;
  4879. u = Math.min((J / 2 - U / 2), 0);
  4880. s = -u;
  4881. m = Math.max(Math.min(m, r), t);
  4882. n = Math.max(Math.min(n, s), u);
  4883. L.scrollerTransition(P).scrollerTransform(m, n)
  4884. };
  4885. L.destroy = function() {
  4886. L.initEvents(true);
  4887. delete h.data[L.wrapper.getAttribute("data-zoomer")];
  4888. L.wrapper.setAttribute("data-zoomer", "")
  4889. };
  4890. L.init();
  4891. return L
  4892. };
  4893. a.Zoom.defaults = {
  4894. speed: 300,
  4895. maxZoom: 3,
  4896. minZoom: 1,
  4897. };
  4898. a.fn.zoom = function(k) {
  4899. var l = [];
  4900. this.each(function() {
  4901. var o = null;
  4902. var n = this;
  4903. var m = n.getAttribute("data-zoomer");
  4904. if (!m) {
  4905. m = h.guid();
  4906. h.data[m] = o = new a.Zoom(n, k);
  4907. n.setAttribute("data-zoomer", m)
  4908. } else {
  4909. o = h.data[m]
  4910. }
  4911. l.push(o)
  4912. });
  4913. return l.length === 1 ? l[0] : l
  4914. }
  4915. })(window.jQuery, window.fui, document); (function(a, d, c) {
  4916. var e = null;
  4917. var b = {
  4918. init: function(g) {
  4919. var f = a("#fui_imagePreview");
  4920. if (f.length == 0) {
  4921. f = a('<div id="fui_imagePreview" class="f-imagePreview" ><div class="f-imagePreview-slider" ></div></div>');
  4922. a("body").append(f);
  4923. b.bindEvent(f)
  4924. }
  4925. f.addClass("f-imagePreview-in");
  4926. f[0].dfop = g;
  4927. f.show();
  4928. setTimeout(function() {
  4929. f.removeClass("f-imagePreview-in");
  4930. f.find(".f-imagePreview-slider").slider({
  4931. data: g.data,
  4932. loop: true,
  4933. indicator: true,
  4934. gotonum: g.gotonum
  4935. });
  4936. var h = f.find("img");
  4937. h.addClass("f-zoom");
  4938. h.parent().addClass("f-zoom-scroller");
  4939. h.parent().parent().addClass("f-zoom-wrapper").zoom();
  4940. f.find("img").each(function() {
  4941. var i = a(this)[0];
  4942. i.addEventListener("doubletap",
  4943. function() {
  4944. e && e.cancel();
  4945. e = null
  4946. })
  4947. });
  4948. f = null
  4949. },
  4950. 500)
  4951. },
  4952. bindEvent: function(f) {
  4953. f.on("tap",
  4954. function(h) {
  4955. var i = h.target || h.srcElement;
  4956. var g = a(this);
  4957. var j = g[0].dfop;
  4958. if (j.taphold) {
  4959. g = null;
  4960. j.taphold = false;
  4961. return false
  4962. }
  4963. if (i.tagName !== "IMG") {
  4964. b.close(g)
  4965. } else {
  4966. b.laterCloseEvent()
  4967. }
  4968. g = null
  4969. });
  4970. f.on("taphold",
  4971. function() {
  4972. var g = a(this);
  4973. var i = g[0].dfop;
  4974. var h = "";
  4975. if (g.find("img").length === 1) {
  4976. h = g.find("img").attr("src")
  4977. } else {
  4978. h = g.find(".f-slider-item.f-active img").attr("src")
  4979. }
  4980. i.holdEvent && i.holdEvent(h);
  4981. i.taphold = true;
  4982. g = null;
  4983. return false
  4984. })
  4985. },
  4986. close: function(f) {
  4987. e = null;
  4988. f.addClass("f-imagePreview-out");
  4989. setTimeout(function() {
  4990. f.hide();
  4991. f.removeClass("f-imagePreview-out");
  4992. var g = f.find("img");
  4993. var h = g.parent().parent().addClass("f-zoom-wrapper").zoom();
  4994. a.each(h,
  4995. function(i, j) {
  4996. j && j.destroy && j.destroy()
  4997. });
  4998. f.find(".f-imagePreview-slider").remove();
  4999. f.append('<div class="f-imagePreview-slider" ></div>');
  5000. g = null;
  5001. f = null
  5002. },
  5003. 500)
  5004. },
  5005. laterCloseEvent: function() { ! e && (e = d.later(function() {
  5006. b.close(a("#fui_imagePreview"))
  5007. },
  5008. 300))
  5009. }
  5010. };
  5011. d.imagePreview = function(f) {
  5012. if (f == undefined || !f.data || f.data.length == 0) {
  5013. return
  5014. }
  5015. b.init(f)
  5016. };
  5017. a.fn.imagePreviewClose = function() {
  5018. b.close(a(this))
  5019. }
  5020. })(window.jQuery, window.fui, document); (function(a) {
  5021. a.fn.toptab = function(f, e) {
  5022. var b = a(this);
  5023. f = f || [];
  5024. if (f.length > 0) {
  5025. b.addClass("f-toptab");
  5026. var c = a('<div class="f-toptab-btns" ><div></div></div>');
  5027. var d = a('<div class="f-toptab-content" ></div>');
  5028. a.each(f,
  5029. function(i, j) {
  5030. var g = '<a class="f-toptab-btn' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" href="#">' + j + "</a>";
  5031. c.find("div").append(g);
  5032. var h = '<div class="f-toptab-content-item' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" ></div>';
  5033. d.append(h)
  5034. });
  5035. b.append(c);
  5036. b.append(d);
  5037. c[0].callback = e;
  5038. c.find(".f-toptab-btn").on("tap",
  5039. function() {
  5040. var h = a(this);
  5041. var i = h.parent().parent();
  5042. var g = i.next();
  5043. if (!h.hasClass("f-active")) {
  5044. i.find(".f-active").removeClass("f-active");
  5045. h.addClass("f-active");
  5046. g.find(".f-active").removeClass("f-active");
  5047. var k = h.attr("data-value");
  5048. g.find('[data-value="' + k + '"]').addClass("f-active");
  5049. var j = i[0].callback;
  5050. j && j(k)
  5051. }
  5052. h = null;
  5053. i = null;
  5054. g = null
  5055. });
  5056. return d.find(".f-toptab-content-item")
  5057. }
  5058. return null
  5059. };
  5060. //renlian toptab
  5061. a.fn.rltoptab = function(f, e) {
  5062. var b = a(this);
  5063. f = f || [];
  5064. if (f.length > 0) {
  5065. b.addClass("f-toptab");
  5066. b.height(0);
  5067. var c = a('<div class="f-toptab-btns" ><div></div></div>');
  5068. var d = a('<div class="f-toptab-content" ></div>');
  5069. a.each(f,
  5070. function(i, j) {
  5071. var g = '<a class="f-toptab-btn' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" href="#">' + j + "</a>";
  5072. c.find("div").append(g);
  5073. var h = '<div class="f-toptab-content-item' + (i == 0 ? " f-active ": "") + '" data-value="' + i + '" ></div>';
  5074. d.append(h)
  5075. });
  5076. b.append(c);
  5077. // b.append(d);
  5078. c[0].callback = e;
  5079. c.find(".f-toptab-btn").on("tap",
  5080. function() {
  5081. var h = a(this);
  5082. var i = h.parent().parent();
  5083. var g = i.next();
  5084. if (!h.hasClass("f-active")) {
  5085. i.find(".f-active").removeClass("f-active");
  5086. h.addClass("f-active");
  5087. g.find(".f-active").removeClass("f-active");
  5088. var k = h.attr("data-value");
  5089. g.find('[data-value="' + k + '"]').addClass("f-active");
  5090. var j = i[0].callback;
  5091. j && j(k)
  5092. // console.log(j(k));
  5093. console.log('aa')
  5094. }
  5095. console.log('bb')
  5096. h = null;
  5097. i = null;
  5098. g = null;
  5099. });
  5100. return d.find(".f-toptab-content-item")
  5101. }
  5102. return null
  5103. }
  5104. })(window.jQuery); (function(a) {
  5105. a.fn.ftimeline = function(f) {
  5106. var c = a(this);
  5107. c.addClass("f-timeline");
  5108. var e = a('<div class="f-timeline-allwrap"></div>');
  5109. var d = a("<ul></ul>");
  5110. var b = a('<li class="f-timeline-header"><div>当前</div></li>');
  5111. d.append(b);
  5112. a.each(f,
  5113. function(j, k) {
  5114. var i = a('<li class="f-timeline-item" ><div class="f-timeline-wrap" ></div></li>');
  5115. if (j == 0) {
  5116. i.find("div").addClass("f-timeline-current")
  5117. }
  5118. var h = i.find(".f-timeline-wrap");
  5119. var g = a('<div class="f-timeline-content"><span class="arrow"></span></div>');
  5120. g.append('<div class="f-timeline-title">' + k.title + "</div>");
  5121. g.append('<div class="f-timeline-body"><span>' + k.people + "</span>" + k.content + "</div>");
  5122. h.append('<span class="f-timeline-date">' + k.time + "</span>");
  5123. h.append(g);
  5124. d.append(i)
  5125. });
  5126. d.append('<li class="f-timeline-ender"><div>开始</div></li>');
  5127. e.html(d);
  5128. c.html(e)
  5129. }
  5130. })(window.jQuery); (function(a, c) {
  5131. var b = {
  5132. init: function(d, g) {
  5133. var f = ' <div class="f-popright" > <div class="f-popright-content"> <div class="f-popright-title" ><div class="f-popright-btn-left">';
  5134. if (g.cancelBtn) {
  5135. f += '<div class="f-popright-btn cancel" data-value="cancel" >' + g.cancelBtn + "</div>"
  5136. }
  5137. if (g.restBtn) {
  5138. f += '<div class="f-popright-btn rest" data-value="rest">' + g.restBtn + "</div>"
  5139. }
  5140. f += "</div>";
  5141. if (g.okBtn) {
  5142. f += '<div class="f-popright-btn ok" data-value="ok">' + g.okBtn + "</div>"
  5143. }
  5144. f += '</div> <div class="f-popright-body" ></div> </div></div>';
  5145. var e = a(f);
  5146. d.parent().append(e);
  5147. e.find(".f-popright-body").append(d);
  5148. d.addClass("f-popright-bodyContent");
  5149. e.find(".f-popright-body").scroll();
  5150. b.bindEvent(e, g);
  5151. d = null;
  5152. e = null
  5153. },
  5154. bindEvent: function(d, e) {
  5155. d.on("tap",
  5156. function(g) {
  5157. g = g || window.event;
  5158. var h = g.target || g.srcElement;
  5159. var f = a(h);
  5160. if (f.hasClass("f-popright")) {
  5161. f.removeClass("active")
  5162. }
  5163. });
  5164. d.find(".f-popright-btn").on("tap", {
  5165. fop: e
  5166. },
  5167. function(h) {
  5168. var f = a(this);
  5169. var i = f.attr("data-value");
  5170. var g = h.data.fop;
  5171. g.callBack && g.callBack(i, f.parents(".f-popright").find(".f-popright-bodyContent"));
  5172. if (i == "ok" || i == "cancel") {
  5173. f.parents(".f-popright").removeClass("active")
  5174. }
  5175. });
  5176. d = null
  5177. }
  5178. };
  5179. a.fn.fpopright = function(f) {
  5180. var e = {
  5181. okBtn: "确定",
  5182. restBtn: "重置",
  5183. cancelBtn: "取消",
  5184. callBack: false
  5185. };
  5186. var d = a(this);
  5187. if (d[0].fop) {
  5188. return d
  5189. }
  5190. a.extend(e, f || {});
  5191. d[0].fop = e;
  5192. b.init(d, e);
  5193. return d
  5194. };
  5195. a.fn.fpoprightShow = function() {
  5196. var e = a(this);
  5197. var d = e.parents(".f-popright");
  5198. if (!d.hasClass("active")) {
  5199. d.addClass("active")
  5200. }
  5201. d = null;
  5202. e = null
  5203. };
  5204. a.fn.fpoprightHide = function() {
  5205. var e = a(this);
  5206. var d = e.parents(".f-popright");
  5207. if (d.hasClass("active")) {
  5208. d.removeClass("active")
  5209. }
  5210. d = null;
  5211. e = null
  5212. }
  5213. })(window.jQuery, window.fui); (function(a) {
  5214. var v = false;
  5215. var s = false;
  5216. var c = false;
  5217. var u = false;
  5218. var w = false;
  5219. var x = 0;
  5220. var l = 0;
  5221. var t = 0;
  5222. var j = false;
  5223. var k = false;
  5224. var n = false;
  5225. var f = "f-swipebtn-handler";
  5226. var g = "f-swipebtn-right";
  5227. var d = "f-swipebtn-btn";
  5228. var h = "f-swipebtn-transitioning";
  5229. var e = "f-swipebtn-selected";
  5230. var p = "." + f;
  5231. var q = "." + g;
  5232. var o = "." + d;
  5233. var m = 0.8;
  5234. var y = function() {
  5235. var z;
  5236. if (x !== l) {
  5237. if (c && c.length > 0) {
  5238. n = x / t;
  5239. if (x < -t) {
  5240. x = -t - Math.pow( - x - t, m)
  5241. }
  5242. for (var B = 0,
  5243. C = c.length; B < C; B++) {
  5244. var A = c[B];
  5245. if (typeof A._buttonOffset === "undefined") {
  5246. A._buttonOffset = A.offsetLeft
  5247. }
  5248. z = A._buttonOffset;
  5249. r(A, (x - z * (1 + Math.max(n, -1))))
  5250. }
  5251. }
  5252. r(v, x);
  5253. l = x
  5254. }
  5255. w = requestAnimationFrame(function() {
  5256. y()
  5257. })
  5258. };
  5259. var r = function(z, A) {
  5260. if (z && z.style) {
  5261. z.style.webkitTransform = "translate(" + A + "px,0)"
  5262. }
  5263. };
  5264. var i = {
  5265. handleEvent: function(z) {
  5266. switch (z.type) {
  5267. case "drag":
  5268. this.drag(z);
  5269. break;
  5270. case "dragend":
  5271. this.dragend(z);
  5272. break;
  5273. case "swiperight":
  5274. this.swiperight(z);
  5275. break;
  5276. case "swipeleft":
  5277. this.swipeleft(z);
  5278. break
  5279. }
  5280. },
  5281. drag: function(F) {
  5282. F = F || window.event;
  5283. var E = F.target || F.srcElement;
  5284. var B = null;
  5285. var z = a(E);
  5286. if (z.hasClass("f-swipebtn")) {
  5287. B = z[0]
  5288. } else {
  5289. B = z.parents(".f-swipebtn")[0]
  5290. }
  5291. z = null;
  5292. if (!j) {
  5293. v = s = c = u = w = false;
  5294. v = B.querySelector(p);
  5295. if (v) {
  5296. s = B.querySelector(q);
  5297. if (s) {
  5298. t = s.offsetWidth;
  5299. c = s.querySelectorAll(o)
  5300. }
  5301. B.classList.remove(h);
  5302. k = B.classList.contains(e)
  5303. }
  5304. }
  5305. var C = F.detail;
  5306. var D = C.direction;
  5307. var A = C.angle;
  5308. if (D === "left" && (A > 150 || A < -150)) {
  5309. if (c) {
  5310. j = true
  5311. }
  5312. } else {
  5313. if (D === "right" && (A > -30 && A < 30)) {
  5314. if ((c && k)) {
  5315. j = true
  5316. }
  5317. }
  5318. }
  5319. if (j) {
  5320. F.stopPropagation();
  5321. F.detail.gesture.preventDefault();
  5322. var G = F.detail.deltaX;
  5323. if (k) {
  5324. G = G - t
  5325. }
  5326. if ((G < 0 && !c)) {
  5327. if (!k) {
  5328. return
  5329. }
  5330. G = 0
  5331. }
  5332. if (G < 0) {
  5333. u = "toLeft"
  5334. } else {
  5335. if (G > 0) {
  5336. u = "toRight"
  5337. } else {
  5338. if (!u) {
  5339. u = "toLeft"
  5340. }
  5341. }
  5342. }
  5343. if (!w) {
  5344. y()
  5345. }
  5346. x = G
  5347. }
  5348. },
  5349. swipeleft: function(z) {
  5350. if (j) {
  5351. z.stopPropagation()
  5352. }
  5353. },
  5354. swiperight: function(z) {
  5355. if (j) {
  5356. z.stopPropagation()
  5357. }
  5358. },
  5359. dragend: function(J) {
  5360. if (!j) {
  5361. return
  5362. }
  5363. J = J || window.event;
  5364. var I = J.target || J.srcElement;
  5365. var G = null;
  5366. var z = a(I);
  5367. if (z.hasClass("f-swipebtn")) {
  5368. G = z[0]
  5369. } else {
  5370. G = z.parents(".f-swipebtn")[0]
  5371. }
  5372. z = null;
  5373. J.stopPropagation();
  5374. if (w) {
  5375. cancelAnimationFrame(w);
  5376. w = null
  5377. }
  5378. var H = J.detail;
  5379. j = false;
  5380. var A = "close";
  5381. var B = u === "toLeft" ? t: 0;
  5382. var L = H.swipe || (Math.abs(x) > B / 2);
  5383. if (L) {
  5384. if (!k) {
  5385. A = "open"
  5386. } else {
  5387. if (H.direction === "left") {
  5388. A = "open"
  5389. }
  5390. }
  5391. }
  5392. G.classList.add(h);
  5393. var F;
  5394. if (A === "open") {
  5395. var N = u === "toLeft" ? -B: B;
  5396. r(v, N);
  5397. F = u === "toLeft" ? c: "undefined";
  5398. if (typeof F !== "undefined") {
  5399. var C = null;
  5400. for (var K = 0; K < F.length; K++) {
  5401. C = F[K];
  5402. r(C, N)
  5403. }
  5404. C.parentNode.classList.add(e);
  5405. G.classList.add(e);
  5406. if (!k) {
  5407. fui.trigger(G, u === "toLeft" ? "slideleft": "slideright")
  5408. }
  5409. }
  5410. } else {
  5411. r(v, 0);
  5412. s && s.classList.remove(e);
  5413. G.classList.remove(e)
  5414. }
  5415. var D;
  5416. if (c && c.length > 0 && c !== F) {
  5417. for (var K = 0,
  5418. M = c.length; K < M; K++) {
  5419. var E = c[K];
  5420. D = E._buttonOffset;
  5421. if (typeof D === "undefined") {
  5422. E._buttonOffset = E.offsetLeft
  5423. }
  5424. r(E, -D)
  5425. }
  5426. }
  5427. }
  5428. };
  5429. var b = function(z) {
  5430. var A = z[0];
  5431. A.addEventListener("drag", i);
  5432. A.addEventListener("dragend", i);
  5433. A.addEventListener("swiperight", i);
  5434. A.addEventListener("swipeleft", i)
  5435. };
  5436. a.fn.fswipebtn = function() {
  5437. a(this).each(function() {
  5438. b(a(this))
  5439. })
  5440. }
  5441. })(window.jQuery); (function(a, c) {
  5442. var b = {
  5443. init: function(d, f) {
  5444. f.id = c.guid();
  5445. var e = '<div class="f-checkbox f-pop" id="pop_' + f.id + '" data-page="' + c.pageid() + '" >';
  5446. e += '<div class="f-checkbox-header" >';
  5447. e += '<div class="f-checkbox-cancel">取消</div>';
  5448. e += '<div class="f-checkbox-ok">确定</div>';
  5449. e += "</div>";
  5450. e += '<div class="f-checkbox-body" >';
  5451. f.dataMap = {};
  5452. a.each(f.data,
  5453. function(g, h) {
  5454. f.dataMap[h[f.ivalue]] = h;
  5455. e += '<div class="f-checkbox-item" data-value="' + h[f.ivalue] + '" >' + h[f.itext] + "</div>"
  5456. });
  5457. e += "</div></div>";
  5458. a("body").append(e);
  5459. c.createMask();
  5460. b.bindEvent(d, f)
  5461. },
  5462. bindEvent: function(e, f) {
  5463. e.on("tap",
  5464. function() {
  5465. var h = a(this);
  5466. if (h.attr("readonly") || h.parents(".lr-form-row").attr("readonly")) {
  5467. return false
  5468. }
  5469. var j = h[0];
  5470. var i = j.fop;
  5471. i.callback && i.callback();
  5472. var g = a("#pop_" + i.id);
  5473. if (!g.hasClass("active")) {
  5474. g.addClass("active");
  5475. c.showMask()
  5476. }
  5477. g.find(".selected").removeClass("selected");
  5478. setTimeout(function() {
  5479. if (i.value != undefined && i.value != "" && i.value != null) {
  5480. var k = i.value.split(",");
  5481. a.each(k,
  5482. function(l, m) {
  5483. g.find('[data-value="' + m + '"]').addClass("selected")
  5484. })
  5485. }
  5486. g = null
  5487. },
  5488. 300);
  5489. return false
  5490. });
  5491. var d = a("#pop_" + f.id);
  5492. d.find(".f-checkbox-body").scroll();
  5493. d.find(".f-checkbox-body").on("tap",
  5494. function(h) {
  5495. h = h || window.event;
  5496. var i = h.target || h.srcElement;
  5497. var g = a(i);
  5498. if (g.hasClass("f-checkbox-item")) {
  5499. if (g.hasClass("selected")) {
  5500. g.removeClass("selected")
  5501. } else {
  5502. g.addClass("selected")
  5503. }
  5504. return false
  5505. }
  5506. });
  5507. d.find(".f-checkbox-cancel").on("tap",
  5508. function() {
  5509. var g = a(this).parents(".f-checkbox");
  5510. g.removeClass("active");
  5511. c.hideMask();
  5512. return false
  5513. });
  5514. d.find(".f-checkbox-ok").on("tap", {
  5515. $self: e,
  5516. fop: f
  5517. },
  5518. function(j) {
  5519. var g = a(this).parents(".f-checkbox");
  5520. g.removeClass("active");
  5521. c.hideMask();
  5522. j = j || window.event;
  5523. var k = j.data.fop;
  5524. var h = j.data.$self;
  5525. var l = [];
  5526. var m = [];
  5527. var i = [];
  5528. g.find(".selected").each(function() {
  5529. var o = a(this).attr("data-value");
  5530. var n = k.dataMap[o];
  5531. m.push(o);
  5532. l.push(n[k.itext]);
  5533. i.push(n)
  5534. });
  5535. if (k.value != String(m)) {
  5536. k.value = String(m);
  5537. k.text = String(l);
  5538. h.trigger("change");
  5539. if ( !! k.change) {
  5540. k.change(k.value, k.text, i, h)
  5541. }
  5542. }
  5543. g = null;
  5544. h = null;
  5545. return false
  5546. });
  5547. d = null
  5548. }
  5549. };
  5550. a.fn.fcheckbox = function(f) {
  5551. var d = a(this);
  5552. if (d.length === 0) {
  5553. return d
  5554. }
  5555. if (d[0].fop) {
  5556. return d
  5557. }
  5558. var e = {
  5559. data: [],
  5560. change: false,
  5561. ivalue: "value",
  5562. itext: "text"
  5563. };
  5564. a.extend(e, f || {});
  5565. d[0].fop = e;
  5566. b.init(d, e);
  5567. return d
  5568. };
  5569. a.fn.fcheckboxSet = function(i) {
  5570. var d = a(this);
  5571. if (d.length > 0) {
  5572. var g = d[0].fop;
  5573. if (i != undefined && i != "" && i != null) {
  5574. var j = i.split(",");
  5575. var h = [];
  5576. var f = [];
  5577. var e = [];
  5578. a.each(j,
  5579. function(k, m) {
  5580. if (m) {
  5581. e.push(m);
  5582. var l = g.dataMap[m];
  5583. if (l) {
  5584. h.push(l[g.itext] || "");
  5585. f.push(l)
  5586. }
  5587. }
  5588. });
  5589. g.value = String(e);
  5590. g.text = String(h);
  5591. d.trigger("change");
  5592. if ( !! g.change) {
  5593. g.change(g.value, g.text, f, d)
  5594. }
  5595. }
  5596. }
  5597. d = null
  5598. };
  5599. a.fn.fcheckboxSetData = function(f) {
  5600. var e = a(this);
  5601. if (e.length > 0) {
  5602. var g = e[0].fop;
  5603. if (g) {
  5604. g.dataMap = {};
  5605. g.data = f || [];
  5606. var d = a("#pop_" + g.id + " .f-scroll");
  5607. d.html("");
  5608. a.each(g.data,
  5609. function(h, i) {
  5610. g.dataMap[i[g.ivalue]] = i;
  5611. d.append('<div class="f-checkbox-item" data-value="' + i[g.ivalue] + '" >' + i[g.itext] + "</div>")
  5612. });
  5613. d = null
  5614. }
  5615. }
  5616. e = null
  5617. }
  5618. })(window.jQuery, window.fui);
  5619. /*
  5620. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5621. * Copyright (c) 2013-2018 前端技术开发小组
  5622. * 创建人:任联-前端开发组
  5623. * 日 期:2017.12.15
  5624. * 描 述:任联移动端框架 基础方法
  5625. */
  5626. (function ($, fui, window) {
  5627. "use strict";
  5628. //cordova.js 方法
  5629. $.fn.getHexBackgroundColor = function () {
  5630. var rgb = $(this).css('background-color');
  5631. rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
  5632. function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); }
  5633. return rgb = "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
  5634. }
  5635. var backbuttonEvent = function () {
  5636. // 判断是否有图片预览
  5637. if ($('#fui_imagePreview').length >0 && !$('#fui_imagePreview').is(':hidden')) {
  5638. $('#fui_imagePreview').imagePreviewClose();
  5639. }
  5640. else if ($('.f-dialog').length > 0) {
  5641. $('.f-dialog').remove();
  5642. $('.f-dialog-mask').remove();
  5643. }
  5644. else {
  5645. fui.loading(false);
  5646. // 判断下当前页面是否有返回键
  5647. var pageInfo = fui.nav.page.data[fui.nav.page.activeid];
  5648. if (pageInfo.op.isBack) {
  5649. window.lrmui.nav.closeCurrent();
  5650. }
  5651. else {
  5652. window.lrmui.layer.confirm('是否退出APP', function (_index) {
  5653. if (_index === '1') {
  5654. navigator.app.exitApp();
  5655. }
  5656. }, '温馨提示', ['否', '是']);
  5657. }
  5658. }
  5659. }
  5660. window.lrmui = {// 任联mobileui框架基础方法
  5661. isreal: false,
  5662. isready: false,
  5663. init: function (callback) {
  5664. document.addEventListener("backbutton", backbuttonEvent, false);
  5665. _init(callback);
  5666. },
  5667. guid: function (separator) {
  5668. return fui.guid(separator);
  5669. },
  5670. pageid: function () {
  5671. return fui.pageid();
  5672. },
  5673. deviceId: function () {// 设备id
  5674. var deviceId = window.lrmui.storage.get('deviceId');
  5675. if (!deviceId) {
  5676. deviceId = window.device ? device.uuid : fui.guid('');
  5677. window.lrmui.storage.set('deviceId', deviceId);
  5678. }
  5679. return deviceId;
  5680. },
  5681. type: function (obj) {
  5682. return fui.type(obj);
  5683. },
  5684. date: {// 日期格式化操作
  5685. parse: function (v) {
  5686. return fui.date.parse(v);
  5687. },
  5688. format: function (v, format) {
  5689. return fui.date.format(v, format);
  5690. }
  5691. },
  5692. actionsheet: function (op) {
  5693. /*id: '',
  5694. data: [], //text:'名称',group:'组名',event:'点击事件',mark:'' 标记后为红色
  5695. cancel: false*/
  5696. fui.actionsheet(op);
  5697. },
  5698. layer: {
  5699. toast: function (msg) {// 消失提示框
  5700. fui.dialog({ msg: msg });
  5701. },
  5702. warning: function (msg, callback, title, btn) {// 警告框
  5703. fui.dialog({ type: 'warning', msg: msg, title: title, callback: callback, btn: btn });
  5704. },
  5705. confirm: function (msg, callback, title, btns) {// 确认消息框
  5706. fui.dialog({ type: 'confirm', msg: msg, title: title, callback: callback, btns: btns });
  5707. },
  5708. popinput: function (msg, callback, title, btns, input) {// 输入消息框
  5709. fui.dialog({ type: 'prompt', msg: msg, title: title, callback: callback, btns: btns });
  5710. },
  5711. loading: function (isShow, msg) {// 加载提示框
  5712. fui.loading(isShow, msg);
  5713. }
  5714. },
  5715. md5: function (str) {
  5716. return $.md5(str);
  5717. },
  5718. jgRegistrationId:false
  5719. };
  5720. function _init(callback) {// 框架初始化方法
  5721. if (window.lrmui.isready) {
  5722. // 开始执行初始化函数
  5723. // 处理 Cordova 暂停并恢复事件
  5724. //document.addEventListener('pause', onPause.bind(this), false);
  5725. //document.addEventListener('resume', onResume.bind(this), false);
  5726. callback();
  5727. }
  5728. else {
  5729. setTimeout(function () {
  5730. _init(callback);
  5731. }, 200);
  5732. }
  5733. }
  5734. function isPlatform() {// 调试浏览器模拟环境,浏览器环境,安卓,IOS
  5735. if (!window.cordova) { // 首先判断是不是浏览器环境
  5736. window.lrmui.platform = 'browser';
  5737. window.lrmui.isready = true; // 表示设备加载完成
  5738. }
  5739. else {// 只有在真机还有模拟环境下才启用
  5740. document.addEventListener('deviceready', onDeviceReady.bind(this), false);// 注册设备是否初始化完成并绑定相应的方法
  5741. document.addEventListener("jpush.openNotification", onOpenNotification.bind(this), false);
  5742. document.addEventListener("jpush.receiveNotification", onReceiveNotification.bind(this), false);
  5743. document.addEventListener("jpush.receiveMessage", onReceiveMessage.bind(this), false);
  5744. }
  5745. }
  5746. isPlatform();
  5747. function onDeviceReady() {
  5748. // 判断当前平台
  5749. if (window.navigator.platform === 'Win32') { // 判断是不是调试浏览器模拟环境
  5750. window.lrmui.platform = 'simulator';
  5751. }
  5752. else {// 真机环境
  5753. window.lrmui.isreal = true;
  5754. window.lrmui.platform = cordova.platformId;
  5755. StatusBar.styleDefault();
  5756. //推送通知初始化
  5757. init_jg_push();
  5758. }
  5759. window.lrmui.isready = true; // 表示设备加载完成
  5760. }
  5761. //推送通知初始化
  5762. function init_jg_push(){
  5763. try {
  5764. window.JPush.init();
  5765. //window.JPush.setDebugMode(true);
  5766. cordova.plugins.notification.badge.configure({ autoClear: true });
  5767. if (device.platform != "Android") {
  5768. window.JPush.setApplicationIconBadgeNumber(0);
  5769. }
  5770. } catch (exception) {
  5771. console.log(exception);
  5772. }
  5773. }
  5774. function onOpenNotification(event){
  5775. try {
  5776. var alertContent;
  5777. if (device.platform == "Android") {
  5778. alertContent = event.alert;
  5779. } else {
  5780. alertContent = event.aps.alert;
  5781. }
  5782. alert("open Notification:" + alertContent);
  5783. } catch (exception) {
  5784. console.log("JPushPlugin:onOpenNotification" + exception);
  5785. }
  5786. }
  5787. function onReceiveNotification(event){
  5788. try {
  5789. var alertContent;
  5790. if (device.platform == "Android") {
  5791. alertContent = event.alert;
  5792. } else {
  5793. alertContent = event.aps.alert;
  5794. }
  5795. cordova.plugins.notification.badge.increase(1, function (badge) {
  5796. console.log("ReceiveNotification badge increase 1");
  5797. });
  5798. } catch (exception) {
  5799. console.log(exception)
  5800. }
  5801. }
  5802. function onReceiveMessage(event){
  5803. try {
  5804. var message;
  5805. if (device.platform == "Android") {
  5806. message = event.message;
  5807. } else {
  5808. message = event.content;
  5809. }
  5810. console.log("ReceiveMessage badge increase 1");
  5811. } catch (exception) {
  5812. console.log("JPushPlugin:onReceiveMessage-->" + exception);
  5813. }
  5814. }
  5815. $(function () {
  5816. $('body').delegate('input[type="password"],input[type="text"],textarea,.lrtextarea', 'tap', function () {
  5817. var $this = $(this);
  5818. if ($this.attr('readonly') || $this.parents('.lr-form-row').attr('readonly')) {
  5819. return false;
  5820. }
  5821. if (!$this.is(":focus")) {
  5822. if ($this.hasClass('lrtextarea')) {
  5823. var range;
  5824. if (window.getSelection) {//ie11 10 9 ff safari
  5825. range = window.getSelection();//创建range
  5826. range.selectAllChildren($this[0]);//range 选择obj下所有子内容
  5827. $this.focus(); //解决ff不获取焦点无法定位问题
  5828. range.collapseToEnd();//光标移至最后
  5829. }
  5830. else if (document.selection) {//ie10 9 8 7 6 5
  5831. range = document.selection.createRange();//创建选择对象
  5832. range.moveToElementText($this[0]);//range定位到obj
  5833. range.collapse(false);//光标移至最后
  5834. range.select();
  5835. }
  5836. }
  5837. else
  5838. {
  5839. $this.focus();
  5840. }
  5841. }
  5842. });
  5843. });
  5844. })(window.jQuery, window.fui, window);/*
  5845. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5846. * Copyright (c) 2013-2018 前端技术开发小组
  5847. * 创建人:任联-前端开发组
  5848. * 日 期:2017.12.15
  5849. * 描 述:任联移动端框架 ajax请求方法
  5850. */
  5851. (function ($, renlian, fui, window) {
  5852. "use strict";
  5853. renlian.http = {
  5854. post: function (url, param, callback, dataType) {
  5855. return renlian.http.async('POST', url, param, callback, dataType);
  5856. },
  5857. get: function (url, param, callback, dataType) {
  5858. return renlian.http.async('GET', url, param, callback, dataType);
  5859. },
  5860. webget: function (url, param, callback, dataType) {
  5861. return $.ajax({
  5862. url: url,
  5863. data: param,
  5864. type: 'GET',
  5865. dataType: dataType || "json",
  5866. async: true,
  5867. cache: false,
  5868. success: function (res) {
  5869. callback(res);
  5870. },
  5871. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5872. callback(null);
  5873. },
  5874. beforeSend: function () {
  5875. },
  5876. complete: function () {
  5877. }
  5878. });
  5879. },
  5880. async: function (type, url, param, callback, dataType) {
  5881. return $.ajax({
  5882. url: url,
  5883. data: param,
  5884. type: type,
  5885. dataType: dataType || "json",
  5886. async: true,
  5887. cache: false,
  5888. success: function (res) {
  5889. callback(res);
  5890. },
  5891. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5892. callback(null);
  5893. },
  5894. beforeSend: function () {
  5895. },
  5896. complete: function () {
  5897. }
  5898. });
  5899. /*
  5900. if (window.lrmui.isreal) {
  5901. if (type === 'GET') {
  5902. window.cordovaHTTP.get(url, param, {}, function (res) {
  5903. callback(JSON.parse(res.data));
  5904. }, function () {
  5905. callback(null);
  5906. });
  5907. }
  5908. else {
  5909. window.cordovaHTTP.post(url, param, {}, function (res) {
  5910. callback(JSON.parse(res.data));
  5911. }, function () {
  5912. callback(null);
  5913. });
  5914. }
  5915. }
  5916. else {
  5917. return $.ajax({
  5918. url: url,
  5919. data: param,
  5920. type: type,
  5921. dataType: dataType || "json",
  5922. async: true,
  5923. cache: false,
  5924. success: function (res) {
  5925. callback(res);
  5926. },
  5927. error: function (XMLHttpRequest, textStatus, errorThrown) {
  5928. callback(null);
  5929. },
  5930. beforeSend: function () {
  5931. },
  5932. complete: function () {
  5933. }
  5934. });
  5935. }
  5936. */
  5937. }
  5938. };
  5939. })(window.jQuery, window.lrmui, window.fui, window);/*
  5940. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  5941. * Copyright (c) 2013-2018 前端技术开发小组
  5942. * 创建人:任联-前端开发组
  5943. * 日 期:2017.12.15
  5944. * 描 述:任联移动端框架 导航路由方法(框架核心部分)
  5945. */
  5946. (function ($, renlian, fui, window) {
  5947. "use strict";
  5948. renlian.nav = {
  5949. data: {// 加载过的页面数据|开发的时候请改完代码保存后刷新下页面
  5950. },
  5951. getpage: function (name) {
  5952. var page = this.data[name];
  5953. var pageobj = null;
  5954. if (page) {
  5955. pageobj = page.jsObj;
  5956. }
  5957. return pageobj;
  5958. },
  5959. go: function (op) {
  5960. var dfop = {
  5961. path: '',
  5962. title: '',
  5963. type: '',// 'right','bottom', 不填为淡入淡出
  5964. backbtn: '<i class="iconfont icon-back_light"></i>',
  5965. isBack: true,
  5966. isTab: false,
  5967. isHead: true,
  5968. fclass: '',
  5969. param: {}// 传递参数
  5970. };
  5971. $.extend(dfop, op || {});
  5972. if (dfop.path === '') {
  5973. fui.dialog({ msg: '温馨提示:不知道页面路径!' });
  5974. return false;
  5975. }
  5976. dfop.start = function (pageinfo) {
  5977. // 页面开始
  5978. if (!pageinfo.op.isTab) {
  5979. $('.lr-tabbar').css('z-index', 2);
  5980. }
  5981. };
  5982. dfop.end = function (pageinfo) {
  5983. var $tab = $('.lr-tabbar');
  5984. $tab.css('z-index', 10);
  5985. // 页面动画结束
  5986. if (pageinfo.op.isTab) {
  5987. $tab.show();
  5988. }
  5989. else {
  5990. $tab.hide();
  5991. }
  5992. var $pagebody = pageinfo.$page.find('.f-page-body');
  5993. var page = renlian.nav.data[pageinfo.op.id];
  5994. if (!pageinfo.op.isBack || !pageinfo.op.isHead) {
  5995. // 如果跳转的页面没有返回的按钮,就把之前带返回按钮的页面删掉
  5996. var pageid = "";
  5997. var _pageinfo = pageinfo;
  5998. for (var i = 0; i < 100; i++) {
  5999. pageid = _pageinfo.preid;
  6000. if (pageid !== "" && pageinfo.id !== pageid) {
  6001. _pageinfo = fui.nav.page.data[pageid];
  6002. if (!_pageinfo.op.isBack || !_pageinfo.op.isHead) {
  6003. break;
  6004. }
  6005. else {
  6006. fui.nav.close(pageid);
  6007. }
  6008. }
  6009. else {
  6010. break;
  6011. }
  6012. }
  6013. pageinfo.preid = "";
  6014. }
  6015. if (!pageinfo.hasLoad) {
  6016. loadhtml(page, $pagebody, pageinfo.op);
  6017. }
  6018. else {// 如果页面已经加载过了,如果页面有reload方法就加载一次
  6019. page.jsObj && page.jsObj.reload && page.jsObj.reload($pagebody, pageinfo);
  6020. // 检测当前头部颜色,并进行设置
  6021. if (window.lrmui.isreal) {
  6022. if (page.jsObj && page.jsObj.headColor) {
  6023. StatusBar.backgroundColorByHexString(page.jsObj.headColor);
  6024. }
  6025. else {
  6026. var _$header = $pagebody.parent().find('.f-page-header');
  6027. if (_$header.length !== 0) {
  6028. var _color = _$header.getHexBackgroundColor();
  6029. StatusBar.backgroundColorByHexString(_color);
  6030. }
  6031. _$header = null;
  6032. }
  6033. }
  6034. }
  6035. };
  6036. dfop.bfdestroy = function (pageinfo) {
  6037. // 页面销毁之前执行
  6038. var page = renlian.nav.data[pageinfo.op.id];
  6039. if (!!page.jsObj && !!page.jsObj.beforedestroy) {
  6040. return page.jsObj.beforedestroy();
  6041. }
  6042. return true;
  6043. };
  6044. dfop.destroy = function (pageinfo) {
  6045. // 页面销毁
  6046. var page = renlian.nav.data[pageinfo.op.id];
  6047. if (!!page.jsObj && !!page.jsObj.destroy) {
  6048. console.log('test destroy')
  6049. page.jsObj.destroy();
  6050. }
  6051. };
  6052. // 去加载页面数据
  6053. load(dfop.path);
  6054. // 渲染页面
  6055. if (!dfop.isBack) {
  6056. dfop.fclass = "lr-page-no-back";
  6057. }
  6058. if (!dfop.isHead) {
  6059. dfop.fclass = dfop.fclass + " lr-page-no-head";
  6060. }
  6061. if (dfop.isTab) {
  6062. dfop.fclass = dfop.fclass + " lr-page-have-tab";
  6063. }
  6064. dfop.id = dfop.path;
  6065. fui.nav.go(dfop);
  6066. },
  6067. closeCurrent: function () {
  6068. fui.nav.closeCurrent();
  6069. },
  6070. close: function (id) {
  6071. console.log('close*****************');
  6072. fui.nav.close(id);
  6073. }
  6074. };
  6075. function load(path) {
  6076. if (!renlian.nav.data[path]) {// 判断下当前页面是否已经加载了
  6077. renlian.nav.data[path] = {
  6078. //cssLoaded: false,
  6079. jsLoaded: false,
  6080. htmlLoaded: false,
  6081. strhtml: ''
  6082. };
  6083. var paths = path.split('/');
  6084. var filename = paths[paths.length - 1];
  6085. // 加载页面css代码
  6086. renlian.http.webget('pages/' + path + '/' + filename + '.css', {}, function (res) {
  6087. if (res !== null) {
  6088. fui.includeCss(res);
  6089. }
  6090. }, 'text');
  6091. //fui.loadCss('pages/' + path + '/' + path + '.css');
  6092. // 加载页面html代码
  6093. renlian.http.webget('pages/' + path + '/' + filename + '.html', {}, function (res) {
  6094. if (res === null) {
  6095. fui.dialog({ msg: '任联信息提示:找不到页面!' });
  6096. }
  6097. renlian.nav.data[path].strhtml = res || '';
  6098. renlian.nav.data[path].htmlLoaded = true;
  6099. }, 'text');
  6100. // 加载页面js代码
  6101. renlian.http.webget('pages/' + path + '/' + filename + '.js', {}, function (res) {
  6102. var strjs = '(function ($,renlian) {renlian.nav.data["' + path + '"].jsObj = ' + (res || 'null;') + '})(window.jQuery,window.lrmui);';
  6103. fui.includeJs(strjs);
  6104. renlian.nav.data[path].jsLoaded = true;
  6105. }, 'text');
  6106. }
  6107. }
  6108. // 加载js代码
  6109. function loadjs(_page, _$pagebody, _op) {
  6110. if (_page.jsLoaded) {
  6111. if (_page.jsObj) {
  6112. if (_page.jsObj.isScroll) {
  6113. _$pagebody.scroll();
  6114. }
  6115. setTimeout(function () {
  6116. _page.jsObj.init && _page.jsObj.init(_$pagebody, _op.param);
  6117. // 检测当前头部颜色,并进行设置
  6118. if (window.lrmui.isreal) {
  6119. if (_page.jsObj.headColor) {
  6120. StatusBar.backgroundColorByHexString(_page.jsObj.headColor);
  6121. }
  6122. else {
  6123. var _$header = _$pagebody.parent().find('.f-page-header');
  6124. if (_$header.length !== 0) {
  6125. var _color = _$header.getHexBackgroundColor();
  6126. StatusBar.backgroundColorByHexString(_color);
  6127. }
  6128. _$header = null;
  6129. }
  6130. }
  6131. }, 100);
  6132. }
  6133. }
  6134. else {
  6135. setTimeout(function () {
  6136. loadjs(_page, _$pagebody);
  6137. }, 200);
  6138. }
  6139. }
  6140. // 加载html代码
  6141. function loadhtml(_page, _$pagebody, _op) {
  6142. if (_page.htmlLoaded) {
  6143. _$pagebody.html(_page.strhtml);
  6144. loadjs(_page, _$pagebody, _op);
  6145. }
  6146. else {
  6147. setTimeout(function () {
  6148. loadhtml(_page, _$pagebody, _op);
  6149. }, 200);
  6150. }
  6151. }
  6152. })(window.jQuery, window.lrmui, window.fui, window);/*
  6153. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6154. * Copyright (c) 2013-2018 前端技术开发小组
  6155. * 创建人:任联-前端开发组
  6156. * 日 期:2017.12.15
  6157. * 描 述:任联移动端框架 底部选项卡导航(框架核心部分)
  6158. * 修改日志:2018-02-02 修正go方法无法跳转页面的问题
  6159. */
  6160. (function ($, renlian, fui, window) {
  6161. "use strict";
  6162. renlian.tab = {
  6163. init: function (tabdata) {
  6164. // 首先加载tab数据
  6165. var $tab = $('.lr-tabbar');
  6166. var _html = '';
  6167. $.each(tabdata, function (_index, item) {
  6168. if (item.icon) {
  6169. _html += '\
  6170. <a class="lr-tab-button" data-value="'+ item.page + '" href="#">\
  6171. <i class="unselected iconfont '+ item.icon + '"></i>\
  6172. <i class="selected iconfont '+ item.fillicon + '"></i>\
  6173. <span class="lr-tab-button-text">'+ item.text + '</span>\
  6174. </a>';
  6175. }
  6176. else {
  6177. _html += '\
  6178. <a class="lr-tab-button" data-value="'+ item.page + '" href="#">\
  6179. <img class="unselected" src="'+ item.img + '">\
  6180. <img class="selected" src="'+ item.fillimg +'">\
  6181. <span class="lr-tab-button-text">'+ item.text + '</span>\
  6182. </a>';
  6183. }
  6184. });
  6185. $tab.html(_html);
  6186. $tab.on("tap", ".lr-tab-button", function (e) {
  6187. var $this = $(this);
  6188. if ($this.hasClass('active')) {
  6189. return false;
  6190. }
  6191. var page = $this.attr('data-value');
  6192. var title = $this.find('span').text();
  6193. renlian.nav.go({ path: page, title: title, isBack: false, isTab: true });
  6194. $this.parent().find('.active').removeClass('active');
  6195. $this.addClass('active');
  6196. });
  6197. },
  6198. go: function (page) {
  6199. $('.lr-tabbar [data-value="' + page + '"]').removeClass('active');
  6200. $('.lr-tabbar [data-value="' + page + '"]').trigger('tap');
  6201. }
  6202. };
  6203. })(window.jQuery, window.lrmui, window.fui, window);/*
  6204. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6205. * Copyright (c) 2013-2018 前端技术开发小组
  6206. * 创建人:任联-前端开发组
  6207. * 日 期:2017.12.15
  6208. * 描 述:任联移动端框架 客户端存储(框架核心部分)
  6209. */
  6210. (function ($, renlian, fui, window) {
  6211. "use strict";
  6212. renlian.storage = {
  6213. get: function (name) {// 获取
  6214. return JSON.parse(localStorage.getItem(name));
  6215. },
  6216. set: function (name, value) {// 设置
  6217. localStorage.setItem(name, JSON.stringify(value));
  6218. }
  6219. };
  6220. })(window.jQuery, window.lrmui, window.fui, window);
  6221. /*
  6222. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6223. * Copyright (c) 2013-2018 前端技术开发小组
  6224. * 创建人:任联-前端开发组
  6225. * 日 期:2017.12.15
  6226. * 描 述:任联移动端框架 日期选择插件
  6227. */
  6228. (function ($, renlian, fui, window) {
  6229. "use strict";
  6230. // 日期选择插件
  6231. $.fn.lrdate = function (op) {
  6232. var $this = $(this);
  6233. var dfop = {
  6234. placeholder: '请选择',
  6235. type: 'datetime',//datetime:2017-10-12 00:00;date:2017-10-12; time:00:00; month:2017-10
  6236. label: ['年', '月', '日', '时', '分'],
  6237. change: false // 选择时间改变的时候触发
  6238. };
  6239. $.extend(dfop, op || {});
  6240. dfop.callback = function () {
  6241. renlian.formblur();
  6242. };
  6243. $this.attr('type', 'lrdate');
  6244. $this.addClass('lr-date');
  6245. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  6246. setTimeout(function () {
  6247. $this.fdtpicker(dfop).on('change', function () {
  6248. var $self = $(this);
  6249. $self.find('.text').text($self[0].fop.value);
  6250. });
  6251. }, 100);
  6252. return $this;
  6253. };
  6254. //任联自定义日期选择
  6255. $.fn.rldate = function (op,call) {
  6256. var $this = $(this);
  6257. var dfop = {
  6258. placeholder: '请选择',
  6259. type: 'datetime',//datetime:2017-10-12 00:00;date:2017-10-12; time:00:00; month:2017-10
  6260. label: ['年', '月', '日', '时', '分'],
  6261. change: false // 选择时间改变的时候触发
  6262. };
  6263. $.extend(dfop, op || {});
  6264. dfop.callback = function () {
  6265. //renlian.formblur();
  6266. };
  6267. setTimeout(function () {
  6268. $this.fdtpicker(dfop).on('change', function () {
  6269. var $self = $(this);
  6270. //$self.attr('route-date',$self[0].fop.value);
  6271. call($self[0].fop.value);
  6272. });
  6273. }, 100);
  6274. return $this;
  6275. };
  6276. // 日期选择插件(设置数据)
  6277. $.fn.lrdateSet = function (value) {
  6278. var $this = $(this);
  6279. function set($this, value) {
  6280. if ($this[0].fop) {
  6281. if (value) {
  6282. switch ($this[0].fop.type) {
  6283. case 'datetime':
  6284. value = fui.date.format(value, 'yyyy-MM-dd hh:mm');
  6285. break;
  6286. case 'date':
  6287. value = fui.date.format(value, 'yyyy-MM-dd');
  6288. break;
  6289. case 'time':
  6290. _value = fui.date.format(value, 'hh:mm');
  6291. if (!_value) {
  6292. _value = fui.date.format('2017-12-18 ' + value, 'hh:mm');
  6293. }
  6294. value = _value;
  6295. break;
  6296. case 'month':
  6297. value = fui.date.format(value, 'yyyy-MM');
  6298. break;
  6299. }
  6300. $this[0].fop.value = value;
  6301. $this.find('.text').text(value);
  6302. }
  6303. else {
  6304. $this[0].fop.value = '';
  6305. $this.find('.text').text($this[0].fop.placeholder);
  6306. }
  6307. }
  6308. else {
  6309. setTimeout(function () {
  6310. set($this, value);
  6311. }, 100);
  6312. }
  6313. }
  6314. set($this, value);
  6315. };
  6316. // 日期选择插件(获取数据)
  6317. $.fn.lrdateGet = function () {
  6318. var $this = $(this);
  6319. return $this[0].fop.value;
  6320. };
  6321. })(window.jQuery, window.lrmui, window.fui, window);
  6322. /*
  6323. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6324. * Copyright (c) 2013-2018 前端技术开发小组
  6325. * 创建人:任联-前端开发组
  6326. * 日 期:2017.12.15
  6327. * 描 述:任联移动端框架 选择器插件
  6328. */
  6329. (function ($, renlian, fui, window) {
  6330. "use strict";
  6331. //任联单选择框
  6332. $.fn.rlpicker = function (op, call) {
  6333. var $this = $(this);
  6334. if ($this.length === 0) {
  6335. return $this;
  6336. }
  6337. var dfop = {
  6338. placeholder: '请选择',
  6339. data: [],
  6340. level: 1,
  6341. ivalue: 'value',
  6342. itext: 'text'
  6343. };
  6344. $.extend(dfop, op || {});
  6345. dfop.callback = function () {
  6346. // renlian.formblur();
  6347. };
  6348. setTimeout(function () {
  6349. $this.fpoppicker(dfop).on('change', function () {
  6350. var $self = $(this);
  6351. var text = $self[0].fop.text;
  6352. // $self.find('.text').text(text.replace(/,/g, '/'));
  6353. call($self[0].fop.value);
  6354. });
  6355. }, 100);
  6356. return $this;
  6357. };
  6358. $.fn.lrpicker = function (op) {
  6359. var $this = $(this);
  6360. if ($this.length === 0) {
  6361. return $this;
  6362. }
  6363. var dfop = {
  6364. placeholder: '请选择',
  6365. data: [],
  6366. level: 1,
  6367. ivalue: 'value',
  6368. itext: 'text'
  6369. };
  6370. $.extend(dfop, op || {});
  6371. dfop.callback = function () {
  6372. renlian.formblur();
  6373. };
  6374. $this.attr('type', 'lrpicker');
  6375. $this.addClass('lr-picker');
  6376. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  6377. setTimeout(function () {
  6378. $this.fpoppicker(dfop).on('change', function () {
  6379. var $self = $(this);
  6380. var text = $self[0].fop.text;
  6381. $self.find('.text').text(text.replace(/,/g, '/'));
  6382. });
  6383. }, 100);
  6384. return $this;
  6385. };
  6386. // 选择器(获取数据值)
  6387. $.fn.lrpickerGet = function (type) {
  6388. var $this = $(this);
  6389. if ($this.length === 0) {
  6390. return "";
  6391. }
  6392. var fop = $this[0].fop;
  6393. if (type === 'text') {
  6394. return fop.text;
  6395. }
  6396. else {
  6397. return fop.value;
  6398. }
  6399. };
  6400. // 选择器(设置数据值)
  6401. $.fn.lrpickerSet = function (value) {
  6402. var $this = $(this);
  6403. if ($this.length === 0) {
  6404. return false;
  6405. }
  6406. function set(value, $this) {
  6407. if (!$this[0].fop) {
  6408. setTimeout(function () {
  6409. set(value, $this);
  6410. }, 100);
  6411. }
  6412. else {
  6413. var fop = $this[0].fop;
  6414. if (value) {
  6415. fop._lrTmpValue = value;
  6416. }
  6417. $this.fpoppickerSet(value);
  6418. if (value === '') {
  6419. fop.value = '';
  6420. fop.text = '';
  6421. $this.find('.text').text(fop.placeholder);
  6422. }
  6423. else if (fop.text !== "" && fop.text !== undefined && fop.text !== null) {
  6424. $this.find('.text').text(fop.text.replace(/,/g, '/'));
  6425. }
  6426. }
  6427. }
  6428. set(value, $this);
  6429. };
  6430. // 选择器(更新数据)
  6431. $.fn.lrpickerSetData = function (data) {
  6432. var $this = $(this);
  6433. if ($this.length === 0) {
  6434. return false;
  6435. }
  6436. function updateData(data, $this) {
  6437. if (!$this[0].fop) {
  6438. setTimeout(function () {
  6439. updateData(data, $this);
  6440. }, 100);
  6441. }
  6442. else {
  6443. $this.fpoppickerSetData(data);
  6444. $this.lrpickerSet($this[0].fop._lrTmpValue);
  6445. }
  6446. }
  6447. updateData(data, $this);
  6448. };
  6449. })(window.jQuery, window.lrmui, window.fui, window);
  6450. /*
  6451. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6452. * Copyright (c) 2013-2018 前端技术开发小组
  6453. * 创建人:任联-前端开发组
  6454. * 日 期:2017.12.15
  6455. * 描 述:任联移动端框架 开关插件
  6456. */
  6457. (function ($, renlian, fui, window) {
  6458. "use strict";
  6459. // 开关插件(初始化)
  6460. $.fn.lrswitch = function () {
  6461. var $this = $(this);
  6462. $this.attr('type', 'lrswitch');
  6463. $this.on('tap', function () {
  6464. renlian.formblur();
  6465. });
  6466. return $this.fswitch();
  6467. };
  6468. // 开关插件(初始化)
  6469. $.fn.rlswitch = function () {
  6470. var $this = $(this);
  6471. $this.attr('type', 'lrswitch');
  6472. $this.on('tap', function () {
  6473. //renlian.formblur();
  6474. });
  6475. return $this.fswitch();
  6476. };
  6477. // 开关插件(设置值)1选中 0 没有选中
  6478. $.fn.lrswitchSet = function (value) {
  6479. $(this).fswitchSet(value);
  6480. };
  6481. // 开关插件(获取值)
  6482. $.fn.lrswitchGet = function () {
  6483. return $(this).fswitchGet();
  6484. };
  6485. })(window.jQuery, window.lrmui, window.fui, window);/*
  6486. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6487. * Copyright (c) 2013-2018 前端技术开发小组
  6488. * 创建人:任联-前端开发组
  6489. * 日 期:2017.12.15
  6490. * 描 述:任联移动端框架 表单方法插件
  6491. */
  6492. (function ($, renlian, fui, window) {
  6493. "use strict";
  6494. // 表单验证
  6495. $.fn.lrformValid = function () {
  6496. var validateflag = true;
  6497. var validHelper = fui.validator;
  6498. $(this).find("[isvalid=yes]").each(function () {
  6499. var $this = $(this);
  6500. var checkexpession = $(this).attr("checkexpession");
  6501. var checkfn = validHelper['is' + checkexpession];
  6502. if (!checkexpession || !checkfn) { return false; }
  6503. var errormsg = $(this).attr("errormsg") || "";
  6504. // 获取数据值
  6505. var value;
  6506. if ($this.hasClass('lrtextarea')) {
  6507. value = $this.text();
  6508. }
  6509. else {
  6510. var type = $this.attr('type');
  6511. if (type === 'lrpicker') {
  6512. value = $this.lrpickerGet();
  6513. }
  6514. else if (type === 'lrdate') {
  6515. value = $this.lrdateGet();
  6516. }
  6517. else if (type === 'lrcheckbox') {
  6518. value = $this.lrcheckboxGet();
  6519. }
  6520. else if (type === 'lrselect') {
  6521. value = $this.lrselectGet();
  6522. }
  6523. else {
  6524. value = $this.val();
  6525. }
  6526. }
  6527. var r = { code: true, msg: '' };
  6528. if (checkexpession === 'LenNum' || checkexpession === 'LenNumOrNull' || checkexpession === 'LenStr' || checkexpession === 'LenStrOrNull') {
  6529. var len = $this.attr("length");
  6530. r = checkfn(value, len);
  6531. } else {
  6532. r = checkfn(value);
  6533. }
  6534. if (!r.code) {
  6535. validateflag = false;
  6536. fui.dialog({ msg: errormsg + r.msg });
  6537. return false;
  6538. }
  6539. });
  6540. return validateflag;
  6541. };
  6542. // 获取表单数据
  6543. $.fn.lrformGet = function (keyValue) {
  6544. var resdata = {};
  6545. $(this).find('input,textarea,.lr-picker,.lr-date,.f-switch,.lrtextarea,.lr-checkbox,.lr-select,.lr-imagepicker').each(function (r) {
  6546. var $this = $(this);
  6547. var id = $this.attr('id');
  6548. if (id) {
  6549. var type = $this.attr('type');
  6550. switch (type) {
  6551. case "lrpicker":
  6552. resdata[id] = $this.lrpickerGet() || '';
  6553. break;
  6554. case "lrdate":
  6555. resdata[id] = $this.lrdateGet() || '';
  6556. break;
  6557. case "lrswitch":
  6558. resdata[id] = $this.lrswitchGet();
  6559. break;
  6560. case "lrcheckbox":
  6561. resdata[id] = $this.lrcheckboxGet();
  6562. break;
  6563. case "lrselect":
  6564. resdata[id] = $this.lrselectGet();
  6565. break;
  6566. case "lrimagepicker":
  6567. resdata[id] = $this.imagepickerGet();
  6568. break;
  6569. default:
  6570. if ($this.hasClass('lrtextarea')) {
  6571. var value1 = $this.text() || '';
  6572. resdata[id] = $.trim(value1);
  6573. }
  6574. else {
  6575. var value2 = $this.val() || '';
  6576. resdata[id] = $.trim(value2);
  6577. }
  6578. break;
  6579. }
  6580. resdata[id] += '';
  6581. if (resdata[id] === '') {
  6582. resdata[id] = '&nbsp;';
  6583. }
  6584. if (resdata[id] === '&nbsp;' && !keyValue) {
  6585. resdata[id] = '';
  6586. }
  6587. }
  6588. });
  6589. return resdata;
  6590. };
  6591. // 设置表单数据
  6592. $.fn.lrformSet = function (data) {
  6593. var $this = $(this);
  6594. for (var id in data) {
  6595. var value = data[id];
  6596. var $obj = $this.find('#' + id);
  6597. if ($obj.length >= 0 && value !== null) {
  6598. var type = $obj.attr('type');
  6599. switch (type) {
  6600. case "lrpicker":
  6601. $obj.lrpickerSet(value);
  6602. break;
  6603. case "lrdate":
  6604. $obj.lrdateSet(value);
  6605. break;
  6606. case "lrswitch":
  6607. $obj.lrswitchSet(value);
  6608. break;
  6609. case "lrcheckbox":
  6610. $obj.lrcheckboxSet(value);
  6611. break;
  6612. case "lrselect":
  6613. $obj.lrselectSet(value);
  6614. break;
  6615. case "lrimagepicker":
  6616. resdata[id] = $this.imagepickerSet(value);
  6617. break;
  6618. default:
  6619. if ($obj.hasClass('lrtextarea')) {
  6620. $obj.text(value);
  6621. }
  6622. else {
  6623. $obj.val(value);
  6624. }
  6625. break;
  6626. }
  6627. }
  6628. }
  6629. };
  6630. renlian.formblur = function () {// 是输入框失去焦点,隐藏输入键盘
  6631. // 失去焦点
  6632. var pageid = renlian.pageid();
  6633. $('#' + pageid).find('input[type="password"]:focus,input[type="text"]:focus,textarea:focus,.lrtextarea:focus').blur();
  6634. if (renlian.isreal) {// 真机调试下隐藏键盘
  6635. window.Keyboard.hide();
  6636. }
  6637. };
  6638. })(window.jQuery, window.lrmui, window.fui, window);
  6639. /*
  6640. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6641. * Copyright (c) 2013-2018 前端技术开发小组
  6642. * 创建人:任联-前端开发组
  6643. * 日 期:2017.12.15
  6644. * 描 述:任联移动端框架 分页列表插件
  6645. */
  6646. (function ($, renlian, fui, window) {
  6647. "use strict";
  6648. // 列表分页加载
  6649. var _lrpagination = {
  6650. renderData: function (op, data, page, records) {
  6651. op.lrpage = page;
  6652. op.lrrecords = records;
  6653. op.lrtotal = parseInt(parseInt(records) / parseInt(op.lrrows)) + (parseInt(records) % parseInt(op.lrrows) > 0 ? 1 : 0);
  6654. if (data) {
  6655. var startnum = (page - 1) * op.lrrows + 1;
  6656. for (var i = 0, l = data.length; i < l; i++) {
  6657. op.lrdata.push(data[i]);
  6658. var _html = '';
  6659. var $item = null;
  6660. if (op.lrbtns.length > 0) {
  6661. $item = $('\
  6662. <div data-index="' + (startnum + i - 1) + '" class="lr-page-item f-swipebtn" >\
  6663. <div class="f-swipebtn-handler"></div>\
  6664. <div class="f-swipebtn-right"></div>\
  6665. </div>');
  6666. _html = op.lrrenderData(startnum + i, data[i], $item.find('.f-swipebtn-handler'));
  6667. }
  6668. else {
  6669. $item = $('<div data-index="' + (startnum + i - 1) + '" class="lr-page-item" ></div>');
  6670. _html = op.lrrenderData(startnum + i, data[i], $item);
  6671. }
  6672. if (_html !== '') {
  6673. var _$html = $(_html);
  6674. _$html.attr('data-index',startnum + i - 1);
  6675. _$html.addClass('lr-page-item');
  6676. op.$list.append(_$html);
  6677. if (op.lrbtns.length > 0) {
  6678. _$html.addClass('f-swipebtn');
  6679. var $handler = $('<div class="f-swipebtn-handler">' + _$html.html() + '</div>');
  6680. var $btn = $('<div class="f-swipebtn-right"></div>');
  6681. _$html.html($handler);
  6682. _$html.append($btn);
  6683. $.each(op.lrbtns, function (_index, _item) {
  6684. var _$item = $(_item).addClass('f-swipebtn-btn');
  6685. $btn.append(_$item);
  6686. });
  6687. _$html.fswipebtn();
  6688. $handler = null;
  6689. $btn = null;
  6690. }
  6691. _$html = null;
  6692. } else {
  6693. op.$list.append($item);
  6694. if (op.lrbtns.length > 0) {
  6695. var $btns = $item.find('.f-swipebtn-right');
  6696. $.each(op.lrbtns, function (_index, _item) {
  6697. var _$item = $(_item).addClass('f-swipebtn-btn');
  6698. $btns.append(_$item);
  6699. });
  6700. $btns = null;
  6701. $item.fswipebtn();
  6702. }
  6703. }
  6704. $item = null;
  6705. }
  6706. }
  6707. },
  6708. reload: function () {
  6709. fui.loading(true, '加载数据中');
  6710. var self = this;
  6711. var op = self.options;
  6712. var pageparam = {
  6713. page: 1,
  6714. rows: op.lrrows
  6715. };
  6716. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6717. op.$list.html("");
  6718. op.lrdata = [];
  6719. _lrpagination.renderData(op, data, 1, records);
  6720. fui.loading(false);
  6721. op = null;
  6722. self = null;
  6723. });
  6724. }
  6725. };
  6726. $.fn.lrpagination = function (op) {
  6727. var dfop = {
  6728. lclass: 'lr-list',
  6729. rows: 10, // 每页行数
  6730. getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
  6731. callback([], 0);
  6732. },
  6733. renderData: function (_index, _item) {// 渲染数据模板
  6734. return '';
  6735. },
  6736. click: false, // item, $self 点击事件,
  6737. down: {
  6738. contentinit: '下拉可以刷新',
  6739. contentdown: '下拉可以刷新',
  6740. contentover: '释放立即刷新',
  6741. contentrefresh: '正在刷新...'
  6742. },
  6743. up: {
  6744. contentinit: '上拉显示更多',
  6745. contentdown: '上拉显示更多',
  6746. contentrefresh: '正在加载...',
  6747. contentnomore: '没有更多数据了'
  6748. }
  6749. };
  6750. $.extend(dfop, op || {});
  6751. var $this = $(this);
  6752. $this[0].lrop = dfop;
  6753. var fop = {
  6754. lrdata: [],
  6755. lrpage: 1, // 当前页
  6756. lrrecords: 0, // 总记录数
  6757. lrtotal: 0, // 总页数
  6758. lrrows: dfop.rows,
  6759. lrgetData: dfop.getData,
  6760. lrrenderData: dfop.renderData,
  6761. lrbtns: dfop.btns || [],
  6762. lrclick: dfop.click,
  6763. down: {
  6764. contentinit: dfop.down.contentinit,
  6765. contentdown: dfop.down.contentdown,
  6766. contentover: dfop.down.contentover,
  6767. contentrefresh: dfop.down.contentrefresh,
  6768. callback: function () {
  6769. var self = this;
  6770. var op = self.options;
  6771. var pageparam = {
  6772. page: 1,
  6773. rows: op.lrrows
  6774. };
  6775. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6776. op.$list.html("");
  6777. op.lrdata = [];
  6778. _lrpagination.renderData(op, data, 1, records);
  6779. self.endPulldownToRefresh();
  6780. self.refresh(true);
  6781. });
  6782. }
  6783. },
  6784. up: {
  6785. contentinit: dfop.up.contentinit,
  6786. contentdown: dfop.up.contentdown,
  6787. contentrefresh: dfop.up.contentrefresh,
  6788. contentnomore: dfop.up.contentnomore,
  6789. callback: function () {
  6790. var self = this;
  6791. var op = self.options;
  6792. op.lrpage = op.lrpage + 1;
  6793. var pageparam = {
  6794. page: op.lrpage,
  6795. rows: op.lrrows
  6796. };
  6797. if (op.lrpage > op.lrtotal) {
  6798. self.endPullupToRefresh(true);
  6799. }
  6800. else {
  6801. op.lrgetData && op.lrgetData(pageparam, function (data, records) {
  6802. _lrpagination.renderData(op, data, op.lrpage, records);
  6803. if (op.lrpage >= op.lrtotal) {
  6804. self.endPullupToRefresh(true);
  6805. }
  6806. else {
  6807. self.endPullupToRefresh();
  6808. }
  6809. });
  6810. }
  6811. }
  6812. }
  6813. };
  6814. var $res = $this.pullRefresh(fop);
  6815. var $list = $('<div class="' + dfop.lclass + '" ></div>');
  6816. $($res.wrapper.children[1]).prepend($list);
  6817. $list.html("");
  6818. fui.loading(true, '加载数据中');
  6819. var _fop = $res.options;
  6820. _fop.$list = $list;
  6821. $list.delegate('.lr-page-item', 'tap', { op: _fop }, function (e) {
  6822. e = e || window.event;
  6823. var et = e.target || e.srcElement;
  6824. var $et = $(et);
  6825. var op = e.data.op;
  6826. var data = op.lrdata;
  6827. var $this = $(this);
  6828. var _index = $this.attr('data-index');
  6829. op.lrclick && op.lrclick(data[_index], $this, $et);
  6830. });
  6831. var pageparam = {
  6832. page: 1,
  6833. rows: _fop.lrrows
  6834. };
  6835. _fop.lrgetData && _fop.lrgetData(pageparam, function (data, records) {
  6836. $list.html("");
  6837. _fop.lrdata = [];
  6838. _lrpagination.renderData(_fop, data, 1, records);
  6839. fui.loading(false);
  6840. _fop = null;
  6841. });
  6842. fop = null;
  6843. dfop = null;
  6844. op = null;
  6845. $res.reload = _lrpagination.reload;
  6846. return $res;
  6847. };
  6848. })(window.jQuery, window.lrmui, window.fui, window);
  6849. /*
  6850. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  6851. * Copyright (c) 2013-2018 前端技术开发小组
  6852. * 创建人:任联-前端开发组
  6853. * 日 期:2017.12.15
  6854. * 描 述:任联移动端框架 启动屏
  6855. */
  6856. (function ($, renlian, fui, window) {
  6857. "use strict";
  6858. renlian.splashscreen = {
  6859. hide: function () {
  6860. console.log("*************[ renlian.splashscreen.hide() ]");
  6861. renlian.isreal && navigator.splashscreen && navigator.splashscreen.hide();
  6862. },
  6863. show: function () {
  6864. console.log("*************[ renlian.splashscreen.show() ]");
  6865. renlian.isreal && navigator.splashscreen && navigator.splashscreen.show();
  6866. }
  6867. };
  6868. })(window.jQuery, window.lrmui, window.fui, window);/**
  6869. * @fileoverview
  6870. * - Using the 'QRCode for Javascript library'
  6871. * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
  6872. * - this library has no dependencies.
  6873. *
  6874. * @author davidshimjs
  6875. * @see <a href="http://www.d-project.com/" target="_blank">http://www.d-project.com/</a>
  6876. * @see <a href="http://jeromeetienne.github.com/jquery-qrcode/" target="_blank">http://jeromeetienne.github.com/jquery-qrcode/</a>
  6877. */
  6878. var QRCode;
  6879. (function () {
  6880. //---------------------------------------------------------------------
  6881. // QRCode for JavaScript
  6882. //
  6883. // Copyright (c) 2009 Kazuhiko Arase
  6884. //
  6885. // URL: http://www.d-project.com/
  6886. //
  6887. // Licensed under the MIT license:
  6888. // http://www.opensource.org/licenses/mit-license.php
  6889. //
  6890. // The word "QR Code" is registered trademark of
  6891. // DENSO WAVE INCORPORATED
  6892. // http://www.denso-wave.com/qrcode/faqpatent-e.html
  6893. //
  6894. //---------------------------------------------------------------------
  6895. function QR8bitByte(data) {
  6896. this.mode = QRMode.MODE_8BIT_BYTE;
  6897. this.data = data;
  6898. this.parsedData = [];
  6899. // Added to support UTF-8 Characters
  6900. for (var i = 0, l = this.data.length; i < l; i++) {
  6901. var byteArray = [];
  6902. var code = this.data.charCodeAt(i);
  6903. if (code > 0x10000) {
  6904. byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);
  6905. byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);
  6906. byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);
  6907. byteArray[3] = 0x80 | (code & 0x3F);
  6908. } else if (code > 0x800) {
  6909. byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);
  6910. byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);
  6911. byteArray[2] = 0x80 | (code & 0x3F);
  6912. } else if (code > 0x80) {
  6913. byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);
  6914. byteArray[1] = 0x80 | (code & 0x3F);
  6915. } else {
  6916. byteArray[0] = code;
  6917. }
  6918. this.parsedData.push(byteArray);
  6919. }
  6920. this.parsedData = Array.prototype.concat.apply([], this.parsedData);
  6921. if (this.parsedData.length != this.data.length) {
  6922. this.parsedData.unshift(191);
  6923. this.parsedData.unshift(187);
  6924. this.parsedData.unshift(239);
  6925. }
  6926. }
  6927. QR8bitByte.prototype = {
  6928. getLength: function (buffer) {
  6929. return this.parsedData.length;
  6930. },
  6931. write: function (buffer) {
  6932. for (var i = 0, l = this.parsedData.length; i < l; i++) {
  6933. buffer.put(this.parsedData[i], 8);
  6934. }
  6935. }
  6936. };
  6937. function QRCodeModel(typeNumber, errorCorrectLevel) {
  6938. this.typeNumber = typeNumber;
  6939. this.errorCorrectLevel = errorCorrectLevel;
  6940. this.modules = null;
  6941. this.moduleCount = 0;
  6942. this.dataCache = null;
  6943. this.dataList = [];
  6944. }
  6945. QRCodeModel.prototype = {
  6946. addData: function (data) { var newData = new QR8bitByte(data); this.dataList.push(newData); this.dataCache = null; }, isDark: function (row, col) {
  6947. if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { throw new Error(row + "," + col); }
  6948. return this.modules[row][col];
  6949. }, getModuleCount: function () { return this.moduleCount; }, make: function () { this.makeImpl(false, this.getBestMaskPattern()); }, makeImpl: function (test, maskPattern) {
  6950. this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { this.modules[row] = new Array(this.moduleCount); for (var col = 0; col < this.moduleCount; col++) { this.modules[row][col] = null; } }
  6951. this.setupPositionProbePattern(0, 0); this.setupPositionProbePattern(this.moduleCount - 7, 0); this.setupPositionProbePattern(0, this.moduleCount - 7); this.setupPositionAdjustPattern(); this.setupTimingPattern(); this.setupTypeInfo(test, maskPattern); if (this.typeNumber >= 7) { this.setupTypeNumber(test); }
  6952. if (this.dataCache == null) { this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); }
  6953. this.mapData(this.dataCache, maskPattern);
  6954. }, setupPositionProbePattern: function (row, col) { for (var r = -1; r <= 7; r++) { if (row + r <= -1 || this.moduleCount <= row + r) continue; for (var c = -1; c <= 7; c++) { if (col + c <= -1 || this.moduleCount <= col + c) continue; if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } } }, getBestMaskPattern: function () {
  6955. var minLostPoint = 0; var pattern = 0; for (var i = 0; i < 8; i++) { this.makeImpl(true, i); var lostPoint = QRUtil.getLostPoint(this); if (i == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern = i; } }
  6956. return pattern;
  6957. }, createMovieClip: function (target_mc, instance_name, depth) {
  6958. var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); var cs = 1; this.make(); for (var row = 0; row < this.modules.length; row++) { var y = row * cs; for (var col = 0; col < this.modules[row].length; col++) { var x = col * cs; var dark = this.modules[row][col]; if (dark) { qr_mc.beginFill(0, 100); qr_mc.moveTo(x, y); qr_mc.lineTo(x + cs, y); qr_mc.lineTo(x + cs, y + cs); qr_mc.lineTo(x, y + cs); qr_mc.endFill(); } } }
  6959. return qr_mc;
  6960. }, setupTimingPattern: function () {
  6961. for (var r = 8; r < this.moduleCount - 8; r++) {
  6962. if (this.modules[r][6] != null) { continue; }
  6963. this.modules[r][6] = (r % 2 == 0);
  6964. }
  6965. for (var c = 8; c < this.moduleCount - 8; c++) {
  6966. if (this.modules[6][c] != null) { continue; }
  6967. this.modules[6][c] = (c % 2 == 0);
  6968. }
  6969. }, setupPositionAdjustPattern: function () {
  6970. var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i = 0; i < pos.length; i++) {
  6971. for (var j = 0; j < pos.length; j++) {
  6972. var row = pos[i]; var col = pos[j]; if (this.modules[row][col] != null) { continue; }
  6973. for (var r = -2; r <= 2; r++) { for (var c = -2; c <= 2; c++) { if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) { this.modules[row + r][col + c] = true; } else { this.modules[row + r][col + c] = false; } } }
  6974. }
  6975. }
  6976. }, setupTypeNumber: function (test) {
  6977. var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i = 0; i < 18; i++) { var mod = (!test && ((bits >> i) & 1) == 1); this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; }
  6978. for (var i = 0; i < 18; i++) { var mod = (!test && ((bits >> i) & 1) == 1); this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; }
  6979. }, setupTypeInfo: function (test, maskPattern) {
  6980. var data = (this.errorCorrectLevel << 3) | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); for (var i = 0; i < 15; i++) { var mod = (!test && ((bits >> i) & 1) == 1); if (i < 6) { this.modules[i][8] = mod; } else if (i < 8) { this.modules[i + 1][8] = mod; } else { this.modules[this.moduleCount - 15 + i][8] = mod; } }
  6981. for (var i = 0; i < 15; i++) { var mod = (!test && ((bits >> i) & 1) == 1); if (i < 8) { this.modules[8][this.moduleCount - i - 1] = mod; } else if (i < 9) { this.modules[8][15 - i - 1 + 1] = mod; } else { this.modules[8][15 - i - 1] = mod; } }
  6982. this.modules[this.moduleCount - 8][8] = (!test);
  6983. }, mapData: function (data, maskPattern) {
  6984. var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; var byteIndex = 0; for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  6985. if (col == 6) col--; while (true) {
  6986. for (var c = 0; c < 2; c++) {
  6987. if (this.modules[row][col - c] == null) {
  6988. var dark = false; if (byteIndex < data.length) { dark = (((data[byteIndex] >>> bitIndex) & 1) == 1); }
  6989. var mask = QRUtil.getMask(maskPattern, row, col - c); if (mask) { dark = !dark; }
  6990. this.modules[row][col - c] = dark; bitIndex--; if (bitIndex == -1) { byteIndex++; bitIndex = 7; }
  6991. }
  6992. }
  6993. row += inc; if (row < 0 || this.moduleCount <= row) { row -= inc; inc = -inc; break; }
  6994. }
  6995. }
  6996. }
  6997. }; QRCodeModel.PAD0 = 0xEC; QRCodeModel.PAD1 = 0x11; QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {
  6998. var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); var buffer = new QRBitBuffer(); for (var i = 0; i < dataList.length; i++) { var data = dataList[i]; buffer.put(data.mode, 4); buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber)); data.write(buffer); }
  6999. var totalDataCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalDataCount += rsBlocks[i].dataCount; }
  7000. if (buffer.getLengthInBits() > totalDataCount * 8) {
  7001. throw new Error("code length overflow. ("
  7002. + buffer.getLengthInBits()
  7003. + ">"
  7004. + totalDataCount * 8
  7005. + ")");
  7006. }
  7007. if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { buffer.put(0, 4); }
  7008. while (buffer.getLengthInBits() % 8 != 0) { buffer.putBit(false); }
  7009. while (true) {
  7010. if (buffer.getLengthInBits() >= totalDataCount * 8) { break; }
  7011. buffer.put(QRCodeModel.PAD0, 8); if (buffer.getLengthInBits() >= totalDataCount * 8) { break; }
  7012. buffer.put(QRCodeModel.PAD1, 8);
  7013. }
  7014. return QRCodeModel.createBytes(buffer, rsBlocks);
  7015. }; QRCodeModel.createBytes = function (buffer, rsBlocks) {
  7016. var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r = 0; r < rsBlocks.length; r++) {
  7017. var dcCount = rsBlocks[r].dataCount; var ecCount = rsBlocks[r].totalCount - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r] = new Array(dcCount); for (var i = 0; i < dcdata[r].length; i++) { dcdata[r][i] = 0xff & buffer.buffer[i + offset]; }
  7018. offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r] = new Array(rsPoly.getLength() - 1); for (var i = 0; i < ecdata[r].length; i++) { var modIndex = i + modPoly.getLength() - ecdata[r].length; ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0; }
  7019. }
  7020. var totalCodeCount = 0; for (var i = 0; i < rsBlocks.length; i++) { totalCodeCount += rsBlocks[i].totalCount; }
  7021. var data = new Array(totalCodeCount); var index = 0; for (var i = 0; i < maxDcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < dcdata[r].length) { data[index++] = dcdata[r][i]; } } }
  7022. for (var i = 0; i < maxEcCount; i++) { for (var r = 0; r < rsBlocks.length; r++) { if (i < ecdata[r].length) { data[index++] = ecdata[r][i]; } } }
  7023. return data;
  7024. }; var QRMode = { MODE_NUMBER: 1 << 0, MODE_ALPHA_NUM: 1 << 1, MODE_8BIT_BYTE: 1 << 2, MODE_KANJI: 1 << 3 }; var QRErrorCorrectLevel = { L: 1, M: 0, Q: 3, H: 2 }; var QRMaskPattern = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 }; var QRUtil = {
  7025. PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), getBCHTypeInfo: function (data) {
  7026. var d = data << 10; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); }
  7027. return ((data << 10) | d) ^ QRUtil.G15_MASK;
  7028. }, getBCHTypeNumber: function (data) {
  7029. var d = data << 12; while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); }
  7030. return (data << 12) | d;
  7031. }, getBCHDigit: function (data) {
  7032. var digit = 0; while (data != 0) { digit++; data >>>= 1; }
  7033. return digit;
  7034. }, getPatternPosition: function (typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, getMask: function (maskPattern, i, j) { switch (maskPattern) { case QRMaskPattern.PATTERN000: return (i + j) % 2 == 0; case QRMaskPattern.PATTERN001: return i % 2 == 0; case QRMaskPattern.PATTERN010: return j % 3 == 0; case QRMaskPattern.PATTERN011: return (i + j) % 3 == 0; case QRMaskPattern.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0; case QRMaskPattern.PATTERN101: return (i * j) % 2 + (i * j) % 3 == 0; case QRMaskPattern.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 == 0; case QRMaskPattern.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 == 0; default: throw new Error("bad maskPattern:" + maskPattern); } }, getErrorCorrectPolynomial: function (errorCorrectLength) {
  7035. var a = new QRPolynomial([1], 0); for (var i = 0; i < errorCorrectLength; i++) { a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0)); }
  7036. return a;
  7037. }, getLengthInBits: function (mode, type) { if (1 <= type && type < 10) { switch (mode) { case QRMode.MODE_NUMBER: return 10; case QRMode.MODE_ALPHA_NUM: return 9; case QRMode.MODE_8BIT_BYTE: return 8; case QRMode.MODE_KANJI: return 8; default: throw new Error("mode:" + mode); } } else if (type < 27) { switch (mode) { case QRMode.MODE_NUMBER: return 12; case QRMode.MODE_ALPHA_NUM: return 11; case QRMode.MODE_8BIT_BYTE: return 16; case QRMode.MODE_KANJI: return 10; default: throw new Error("mode:" + mode); } } else if (type < 41) { switch (mode) { case QRMode.MODE_NUMBER: return 14; case QRMode.MODE_ALPHA_NUM: return 13; case QRMode.MODE_8BIT_BYTE: return 16; case QRMode.MODE_KANJI: return 12; default: throw new Error("mode:" + mode); } } else { throw new Error("type:" + type); } }, getLostPoint: function (qrCode) {
  7038. var moduleCount = qrCode.getModuleCount(); var lostPoint = 0; for (var row = 0; row < moduleCount; row++) {
  7039. for (var col = 0; col < moduleCount; col++) {
  7040. var sameCount = 0; var dark = qrCode.isDark(row, col); for (var r = -1; r <= 1; r++) {
  7041. if (row + r < 0 || moduleCount <= row + r) { continue; }
  7042. for (var c = -1; c <= 1; c++) {
  7043. if (col + c < 0 || moduleCount <= col + c) { continue; }
  7044. if (r == 0 && c == 0) { continue; }
  7045. if (dark == qrCode.isDark(row + r, col + c)) { sameCount++; }
  7046. }
  7047. }
  7048. if (sameCount > 5) { lostPoint += (3 + sameCount - 5); }
  7049. }
  7050. }
  7051. for (var row = 0; row < moduleCount - 1; row++) { for (var col = 0; col < moduleCount - 1; col++) { var count = 0; if (qrCode.isDark(row, col)) count++; if (qrCode.isDark(row + 1, col)) count++; if (qrCode.isDark(row, col + 1)) count++; if (qrCode.isDark(row + 1, col + 1)) count++; if (count == 0 || count == 4) { lostPoint += 3; } } }
  7052. for (var row = 0; row < moduleCount; row++) { for (var col = 0; col < moduleCount - 6; col++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) { lostPoint += 40; } } }
  7053. for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount - 6; row++) { if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) { lostPoint += 40; } } }
  7054. var darkCount = 0; for (var col = 0; col < moduleCount; col++) { for (var row = 0; row < moduleCount; row++) { if (qrCode.isDark(row, col)) { darkCount++; } } }
  7055. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint;
  7056. }
  7057. }; var QRMath = {
  7058. glog: function (n) {
  7059. if (n < 1) { throw new Error("glog(" + n + ")"); }
  7060. return QRMath.LOG_TABLE[n];
  7061. }, gexp: function (n) {
  7062. while (n < 0) { n += 255; }
  7063. while (n >= 256) { n -= 255; }
  7064. return QRMath.EXP_TABLE[n];
  7065. }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256)
  7066. }; for (var i = 0; i < 8; i++) { QRMath.EXP_TABLE[i] = 1 << i; }
  7067. for (var i = 8; i < 256; i++) { QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8]; }
  7068. for (var i = 0; i < 255; i++) { QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i; }
  7069. function QRPolynomial(num, shift) {
  7070. if (num.length == undefined) { throw new Error(num.length + "/" + shift); }
  7071. var offset = 0; while (offset < num.length && num[offset] == 0) { offset++; }
  7072. this.num = new Array(num.length - offset + shift); for (var i = 0; i < num.length - offset; i++) { this.num[i] = num[i + offset]; }
  7073. }
  7074. QRPolynomial.prototype = {
  7075. get: function (index) { return this.num[index]; }, getLength: function () { return this.num.length; }, multiply: function (e) {
  7076. var num = new Array(this.getLength() + e.getLength() - 1); for (var i = 0; i < this.getLength(); i++) { for (var j = 0; j < e.getLength(); j++) { num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j))); } }
  7077. return new QRPolynomial(num, 0);
  7078. }, mod: function (e) {
  7079. if (this.getLength() - e.getLength() < 0) { return this; }
  7080. var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0)); var num = new Array(this.getLength()); for (var i = 0; i < this.getLength(); i++) { num[i] = this.get(i); }
  7081. for (var i = 0; i < e.getLength(); i++) { num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio); }
  7082. return new QRPolynomial(num, 0).mod(e);
  7083. }
  7084. }; function QRRSBlock(totalCount, dataCount) { this.totalCount = totalCount; this.dataCount = dataCount; }
  7085. QRRSBlock.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]; QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
  7086. var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); if (rsBlock == undefined) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); }
  7087. var length = rsBlock.length / 3; var list = []; for (var i = 0; i < length; i++) { var count = rsBlock[i * 3 + 0]; var totalCount = rsBlock[i * 3 + 1]; var dataCount = rsBlock[i * 3 + 2]; for (var j = 0; j < count; j++) { list.push(new QRRSBlock(totalCount, dataCount)); } }
  7088. return list;
  7089. }; QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) { switch (errorCorrectLevel) { case QRErrorCorrectLevel.L: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; case QRErrorCorrectLevel.M: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; case QRErrorCorrectLevel.Q: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; case QRErrorCorrectLevel.H: return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; default: return undefined; } }; function QRBitBuffer() { this.buffer = []; this.length = 0; }
  7090. QRBitBuffer.prototype = {
  7091. get: function (index) { var bufIndex = Math.floor(index / 8); return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1; }, put: function (num, length) { for (var i = 0; i < length; i++) { this.putBit(((num >>> (length - i - 1)) & 1) == 1); } }, getLengthInBits: function () { return this.length; }, putBit: function (bit) {
  7092. var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); }
  7093. if (bit) { this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)); }
  7094. this.length++;
  7095. }
  7096. }; var QRCodeLimitLength = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]];
  7097. function _isSupportCanvas() {
  7098. return typeof CanvasRenderingContext2D != "undefined";
  7099. }
  7100. // android 2.x doesn't support Data-URI spec
  7101. function _getAndroid() {
  7102. var android = false;
  7103. var sAgent = navigator.userAgent;
  7104. if (/android/i.test(sAgent)) { // android
  7105. android = true;
  7106. var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
  7107. if (aMat && aMat[1]) {
  7108. android = parseFloat(aMat[1]);
  7109. }
  7110. }
  7111. return android;
  7112. }
  7113. var svgDrawer = (function () {
  7114. var Drawing = function (el, htOption) {
  7115. this._el = el;
  7116. this._htOption = htOption;
  7117. };
  7118. Drawing.prototype.draw = function (oQRCode) {
  7119. var _htOption = this._htOption;
  7120. var _el = this._el;
  7121. var nCount = oQRCode.getModuleCount();
  7122. var nWidth = Math.floor(_htOption.width / nCount);
  7123. var nHeight = Math.floor(_htOption.height / nCount);
  7124. this.clear();
  7125. function makeSVG(tag, attrs) {
  7126. var el = document.createElementNS('http://www.w3.org/2000/svg', tag);
  7127. for (var k in attrs)
  7128. if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);
  7129. return el;
  7130. }
  7131. var svg = makeSVG("svg", { 'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight });
  7132. svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
  7133. _el.appendChild(svg);
  7134. svg.appendChild(makeSVG("rect", { "fill": _htOption.colorLight, "width": "100%", "height": "100%" }));
  7135. svg.appendChild(makeSVG("rect", { "fill": _htOption.colorDark, "width": "1", "height": "1", "id": "template" }));
  7136. for (var row = 0; row < nCount; row++) {
  7137. for (var col = 0; col < nCount; col++) {
  7138. if (oQRCode.isDark(row, col)) {
  7139. var child = makeSVG("use", { "x": String(col), "y": String(row) });
  7140. child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template")
  7141. svg.appendChild(child);
  7142. }
  7143. }
  7144. }
  7145. };
  7146. Drawing.prototype.clear = function () {
  7147. while (this._el.hasChildNodes())
  7148. this._el.removeChild(this._el.lastChild);
  7149. };
  7150. return Drawing;
  7151. })();
  7152. var useSVG = document.documentElement.tagName.toLowerCase() === "svg";
  7153. // Drawing in DOM by using Table tag
  7154. var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {
  7155. var Drawing = function (el, htOption) {
  7156. this._el = el;
  7157. this._htOption = htOption;
  7158. };
  7159. /**
  7160. * Draw the QRCode
  7161. *
  7162. * @param {QRCode} oQRCode
  7163. */
  7164. Drawing.prototype.draw = function (oQRCode) {
  7165. var _htOption = this._htOption;
  7166. var _el = this._el;
  7167. var nCount = oQRCode.getModuleCount();
  7168. var nWidth = Math.floor(_htOption.width / nCount);
  7169. var nHeight = Math.floor(_htOption.height / nCount);
  7170. var aHTML = ['<table style="border:0;border-collapse:collapse;">'];
  7171. for (var row = 0; row < nCount; row++) {
  7172. aHTML.push('<tr>');
  7173. for (var col = 0; col < nCount; col++) {
  7174. aHTML.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + nWidth + 'px;height:' + nHeight + 'px;background-color:' + (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) + ';"></td>');
  7175. }
  7176. aHTML.push('</tr>');
  7177. }
  7178. aHTML.push('</table>');
  7179. _el.innerHTML = aHTML.join('');
  7180. // Fix the margin values as real size.
  7181. var elTable = _el.childNodes[0];
  7182. var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;
  7183. var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;
  7184. if (nLeftMarginTable > 0 && nTopMarginTable > 0) {
  7185. elTable.style.margin = nTopMarginTable + "px " + nLeftMarginTable + "px";
  7186. }
  7187. };
  7188. /**
  7189. * Clear the QRCode
  7190. */
  7191. Drawing.prototype.clear = function () {
  7192. this._el.innerHTML = '';
  7193. };
  7194. return Drawing;
  7195. })() : (function () { // Drawing in Canvas
  7196. function _onMakeImage() {
  7197. this._elImage.src = this._elCanvas.toDataURL("image/png");
  7198. this._elImage.style.display = "block";
  7199. this._elCanvas.style.display = "none";
  7200. }
  7201. // Android 2.1 bug workaround
  7202. // http://code.google.com/p/android/issues/detail?id=5141
  7203. if (this._android && this._android <= 2.1) {
  7204. var factor = 1 / window.devicePixelRatio;
  7205. var drawImage = CanvasRenderingContext2D.prototype.drawImage;
  7206. CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {
  7207. if (("nodeName" in image) && /img/i.test(image.nodeName)) {
  7208. for (var i = arguments.length - 1; i >= 1; i--) {
  7209. arguments[i] = arguments[i] * factor;
  7210. }
  7211. } else if (typeof dw == "undefined") {
  7212. arguments[1] *= factor;
  7213. arguments[2] *= factor;
  7214. arguments[3] *= factor;
  7215. arguments[4] *= factor;
  7216. }
  7217. drawImage.apply(this, arguments);
  7218. };
  7219. }
  7220. /**
  7221. * Check whether the user's browser supports Data URI or not
  7222. *
  7223. * @private
  7224. * @param {Function} fSuccess Occurs if it supports Data URI
  7225. * @param {Function} fFail Occurs if it doesn't support Data URI
  7226. */
  7227. function _safeSetDataURI(fSuccess, fFail) {
  7228. var self = this;
  7229. self._fFail = fFail;
  7230. self._fSuccess = fSuccess;
  7231. // Check it just once
  7232. if (self._bSupportDataURI === null) {
  7233. var el = document.createElement("img");
  7234. var fOnError = function () {
  7235. self._bSupportDataURI = false;
  7236. if (self._fFail) {
  7237. self._fFail.call(self);
  7238. }
  7239. };
  7240. var fOnSuccess = function () {
  7241. self._bSupportDataURI = true;
  7242. if (self._fSuccess) {
  7243. self._fSuccess.call(self);
  7244. }
  7245. };
  7246. el.onabort = fOnError;
  7247. el.onerror = fOnError;
  7248. el.onload = fOnSuccess;
  7249. el.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // the Image contains 1px data.
  7250. return;
  7251. } else if (self._bSupportDataURI === true && self._fSuccess) {
  7252. self._fSuccess.call(self);
  7253. } else if (self._bSupportDataURI === false && self._fFail) {
  7254. self._fFail.call(self);
  7255. }
  7256. };
  7257. /**
  7258. * Drawing QRCode by using canvas
  7259. *
  7260. * @constructor
  7261. * @param {HTMLElement} el
  7262. * @param {Object} htOption QRCode Options
  7263. */
  7264. var Drawing = function (el, htOption) {
  7265. this._bIsPainted = false;
  7266. this._android = _getAndroid();
  7267. this._htOption = htOption;
  7268. this._elCanvas = document.createElement("canvas");
  7269. this._elCanvas.width = htOption.width;
  7270. this._elCanvas.height = htOption.height;
  7271. el.appendChild(this._elCanvas);
  7272. this._el = el;
  7273. this._oContext = this._elCanvas.getContext("2d");
  7274. this._bIsPainted = false;
  7275. this._elImage = document.createElement("img");
  7276. this._elImage.alt = "Scan me!";
  7277. this._elImage.style.display = "none";
  7278. this._el.appendChild(this._elImage);
  7279. this._bSupportDataURI = null;
  7280. };
  7281. /**
  7282. * Draw the QRCode
  7283. *
  7284. * @param {QRCode} oQRCode
  7285. */
  7286. Drawing.prototype.draw = function (oQRCode) {
  7287. var _elImage = this._elImage;
  7288. var _oContext = this._oContext;
  7289. var _htOption = this._htOption;
  7290. var nCount = oQRCode.getModuleCount();
  7291. var nWidth = _htOption.width / nCount;
  7292. var nHeight = _htOption.height / nCount;
  7293. var nRoundedWidth = Math.round(nWidth);
  7294. var nRoundedHeight = Math.round(nHeight);
  7295. _elImage.style.display = "none";
  7296. this.clear();
  7297. for (var row = 0; row < nCount; row++) {
  7298. for (var col = 0; col < nCount; col++) {
  7299. var bIsDark = oQRCode.isDark(row, col);
  7300. var nLeft = col * nWidth;
  7301. var nTop = row * nHeight;
  7302. _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
  7303. _oContext.lineWidth = 1;
  7304. _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
  7305. _oContext.fillRect(nLeft, nTop, nWidth, nHeight);
  7306. // 안티 앨리어싱 방지 처리
  7307. _oContext.strokeRect(
  7308. Math.floor(nLeft) + 0.5,
  7309. Math.floor(nTop) + 0.5,
  7310. nRoundedWidth,
  7311. nRoundedHeight
  7312. );
  7313. _oContext.strokeRect(
  7314. Math.ceil(nLeft) - 0.5,
  7315. Math.ceil(nTop) - 0.5,
  7316. nRoundedWidth,
  7317. nRoundedHeight
  7318. );
  7319. }
  7320. }
  7321. this._bIsPainted = true;
  7322. };
  7323. /**
  7324. * Make the image from Canvas if the browser supports Data URI.
  7325. */
  7326. Drawing.prototype.makeImage = function () {
  7327. if (this._bIsPainted) {
  7328. _safeSetDataURI.call(this, _onMakeImage);
  7329. }
  7330. };
  7331. /**
  7332. * Return whether the QRCode is painted or not
  7333. *
  7334. * @return {Boolean}
  7335. */
  7336. Drawing.prototype.isPainted = function () {
  7337. return this._bIsPainted;
  7338. };
  7339. /**
  7340. * Clear the QRCode
  7341. */
  7342. Drawing.prototype.clear = function () {
  7343. this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);
  7344. this._bIsPainted = false;
  7345. };
  7346. /**
  7347. * @private
  7348. * @param {Number} nNumber
  7349. */
  7350. Drawing.prototype.round = function (nNumber) {
  7351. if (!nNumber) {
  7352. return nNumber;
  7353. }
  7354. return Math.floor(nNumber * 1000) / 1000;
  7355. };
  7356. return Drawing;
  7357. })();
  7358. /**
  7359. * Get the type by string length
  7360. *
  7361. * @private
  7362. * @param {String} sText
  7363. * @param {Number} nCorrectLevel
  7364. * @return {Number} type
  7365. */
  7366. function _getTypeNumber(sText, nCorrectLevel) {
  7367. var nType = 1;
  7368. var length = _getUTF8Length(sText);
  7369. for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
  7370. var nLimit = 0;
  7371. switch (nCorrectLevel) {
  7372. case QRErrorCorrectLevel.L:
  7373. nLimit = QRCodeLimitLength[i][0];
  7374. break;
  7375. case QRErrorCorrectLevel.M:
  7376. nLimit = QRCodeLimitLength[i][1];
  7377. break;
  7378. case QRErrorCorrectLevel.Q:
  7379. nLimit = QRCodeLimitLength[i][2];
  7380. break;
  7381. case QRErrorCorrectLevel.H:
  7382. nLimit = QRCodeLimitLength[i][3];
  7383. break;
  7384. }
  7385. if (length <= nLimit) {
  7386. break;
  7387. } else {
  7388. nType++;
  7389. }
  7390. }
  7391. if (nType > QRCodeLimitLength.length) {
  7392. throw new Error("Too long data");
  7393. }
  7394. return nType;
  7395. }
  7396. function _getUTF8Length(sText) {
  7397. var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
  7398. return replacedText.length + (replacedText.length != sText ? 3 : 0);
  7399. }
  7400. /**
  7401. * @class QRCode
  7402. * @constructor
  7403. * @example
  7404. * new QRCode(document.getElementById("test"), "http://jindo.dev.naver.com/collie");
  7405. *
  7406. * @example
  7407. * var oQRCode = new QRCode("test", {
  7408. * text : "http://naver.com",
  7409. * width : 128,
  7410. * height : 128
  7411. * });
  7412. *
  7413. * oQRCode.clear(); // Clear the QRCode.
  7414. * oQRCode.makeCode("http://map.naver.com"); // Re-create the QRCode.
  7415. *
  7416. * @param {HTMLElement|String} el target element or 'id' attribute of element.
  7417. * @param {Object|String} vOption
  7418. * @param {String} vOption.text QRCode link data
  7419. * @param {Number} [vOption.width=256]
  7420. * @param {Number} [vOption.height=256]
  7421. * @param {String} [vOption.colorDark="#000000"]
  7422. * @param {String} [vOption.colorLight="#ffffff"]
  7423. * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]
  7424. */
  7425. QRCode = function (el, vOption) {
  7426. this._htOption = {
  7427. width: 256,
  7428. height: 256,
  7429. typeNumber: 4,
  7430. colorDark: "#000000",
  7431. colorLight: "#ffffff",
  7432. correctLevel: QRErrorCorrectLevel.H
  7433. };
  7434. if (typeof vOption === 'string') {
  7435. vOption = {
  7436. text: vOption
  7437. };
  7438. }
  7439. // Overwrites options
  7440. if (vOption) {
  7441. for (var i in vOption) {
  7442. this._htOption[i] = vOption[i];
  7443. }
  7444. }
  7445. if (typeof el == "string") {
  7446. el = document.getElementById(el);
  7447. }
  7448. if (this._htOption.useSVG) {
  7449. Drawing = svgDrawer;
  7450. }
  7451. this._android = _getAndroid();
  7452. this._el = el;
  7453. this._oQRCode = null;
  7454. this._oDrawing = new Drawing(this._el, this._htOption);
  7455. if (this._htOption.text) {
  7456. this.makeCode(this._htOption.text);
  7457. }
  7458. };
  7459. /**
  7460. * Make the QRCode
  7461. *
  7462. * @param {String} sText link data
  7463. */
  7464. QRCode.prototype.makeCode = function (sText) {
  7465. this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);
  7466. this._oQRCode.addData(sText);
  7467. this._oQRCode.make();
  7468. this._el.title = sText;
  7469. this._oDrawing.draw(this._oQRCode);
  7470. this.makeImage();
  7471. };
  7472. /**
  7473. * Make the Image from Canvas element
  7474. * - It occurs automatically
  7475. * - Android below 3 doesn't support Data-URI spec.
  7476. *
  7477. * @private
  7478. */
  7479. QRCode.prototype.makeImage = function () {
  7480. if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) {
  7481. this._oDrawing.makeImage();
  7482. }
  7483. };
  7484. /**
  7485. * Clear the QRCode
  7486. */
  7487. QRCode.prototype.clear = function () {
  7488. this._oDrawing.clear();
  7489. };
  7490. /**
  7491. * @name QRCode.CorrectLevel
  7492. */
  7493. QRCode.CorrectLevel = QRErrorCorrectLevel;
  7494. })();/*
  7495. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7496. * Copyright (c) 2013-2018 前端技术开发小组
  7497. * 创建人:任联-前端开发组
  7498. * 日 期:2017.12.15
  7499. * 描 述:任联移动端框架 条码扫描插件
  7500. */
  7501. (function ($, renlian, fui, window) {
  7502. "use strict";
  7503. renlian.code = {
  7504. scan: function (callback) {
  7505. if (renlian.isreal) {
  7506. cordova.plugins.barcodeScanner.scan(
  7507. function (result) {
  7508. if (result.text !== undefined && result.text !== null && result.text !== '') {
  7509. !!callback && callback({
  7510. status: 'success',
  7511. msg: result.text
  7512. });
  7513. }
  7514. },
  7515. function (error) {
  7516. !!callback && callback({
  7517. status: 'error',
  7518. msg: error
  7519. });
  7520. },
  7521. {
  7522. preferFrontCamera: false, // iOS and Android
  7523. showFlipCameraButton: false, // iOS and Android
  7524. showTorchButton: true, // iOS and Android
  7525. torchOn: false, // Android, launch with the torch switched on (if available)
  7526. saveHistory: true, // Android, save scan history (default false)
  7527. prompt: "将二维码/条码放入框内,即可自动扫描", // Android
  7528. resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
  7529. formats: "QR_CODE,DATA_MATRIX,UPC_A,UPC_E,EAN_8,EAN_13,CODE_39,CODE_93,CODE_128,CODABAR,ITF,RSS14,PDF_417,RSS_EXPANDED", // default: all but PDF_417 and RSS_EXPANDED
  7530. //orientation: "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
  7531. disableAnimations: true, // iOS
  7532. disableSuccessBeep: false // iOS and Android
  7533. }
  7534. );
  7535. }
  7536. else {
  7537. renlian.layer.warning('浏览器环境不支持扫描', null, '任联提示', '好的');
  7538. }
  7539. },
  7540. encode: function (op) {// id:div的id,text:需要生成的文本;width:宽度;height:高度;colorDark,colorLight;
  7541. var qrcode = new QRCode(document.getElementById(op.id), {
  7542. text: op.text || "http://www.renlian.cn/",
  7543. width: op.width || 128,
  7544. height: op.height || 128,
  7545. colorDark: op.colorDark || "#000000",
  7546. colorLight: op.colorLight || "#ffffff",
  7547. correctLevel: QRCode.CorrectLevel.H
  7548. });
  7549. }
  7550. };
  7551. })(window.jQuery, window.lrmui, window.fui, window);/*
  7552. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7553. * Copyright (c) 2013-2018 前端技术开发小组
  7554. * 创建人:任联-前端开发组
  7555. * 日 期:2018.01.08
  7556. * 描 述:任联移动端框架 图片选择插件(支持拍照和从相册中选择)
  7557. */
  7558. (function ($, renlian, fui, window) {
  7559. "use strict";
  7560. var _ft = null;
  7561. // 选择图片从相册中
  7562. renlian.imagePick = function (callback, op) {
  7563. if (renlian.isreal) {
  7564. var dfop = {
  7565. maximumImagesCount: 9,
  7566. width: 1920,
  7567. height: 1440,
  7568. quality: 100
  7569. };
  7570. $.extend(dfop, op || {});
  7571. ImagePicker.getPictures(function (result) {
  7572. !!callback && callback(result);
  7573. }, function (err) {
  7574. }, dfop);
  7575. }
  7576. else {
  7577. renlian.layer.warning('浏览器环境不支持图片选择', null, '任联提示', '好的');
  7578. }
  7579. };
  7580. // 拍照获取图片
  7581. renlian.camera = function (callback) {
  7582. if (renlian.isreal) {
  7583. navigator.camera.getPicture(
  7584. function (imageURI) {
  7585. callback(imageURI);
  7586. },
  7587. function () {
  7588. }, {
  7589. quality: 50, // 相片质量是50
  7590. sourceType: Camera.PictureSourceType.Camera, // 设置摄像头拍照获取
  7591. destinationType: Camera.DestinationType.FILE_URI, // 以文件路径返回
  7592. saveToPhotoAlbum: true
  7593. });
  7594. }
  7595. else {
  7596. renlian.layer.warning('浏览器环境不支持拍照', null, '任联提示', '好的');
  7597. }
  7598. };
  7599. var _imagepicker = {
  7600. addImage: function (url, op, _fileId) {
  7601. var $imagePicker = $('#' + op.id);
  7602. var $imageHandle = $imagePicker.find('.lr-imagepicker-handle').parent();
  7603. var _html = '\
  7604. <div class="lr-imagepicker-item" >\
  7605. <img src="'+ url + '" />\
  7606. <div class="lr-imagepicker-remove" data-value="'+ _fileId + '" ><i class="iconfont icon-roundclosefill"></i><div></div></div>\
  7607. </div>';
  7608. $imageHandle.before(_html);
  7609. $imageHandle = null;
  7610. },
  7611. upload: function (url, op, callback) {// 上传图片文件
  7612. if (_ft === null) {
  7613. _ft = new FileTransfer();
  7614. }
  7615. if (op.uploadUrl) {
  7616. if (op.getParams) {
  7617. op.params = op.getParams();
  7618. }
  7619. op.params = op.params || {};
  7620. op.params.data = op.value;
  7621. _ft.upload(url, encodeURI(op.uploadUrl),
  7622. function (r) {
  7623. var _res = JSON.parse(r.response);
  7624. if (_res.code === 200) {
  7625. callback(true, url, op, _res.data);
  7626. }
  7627. else {
  7628. callback(false, url, op);
  7629. }
  7630. },
  7631. function (error) {
  7632. callback(false, url, op);
  7633. },
  7634. {
  7635. chunkedMode: false,
  7636. params: op.params || {}
  7637. }
  7638. );
  7639. }
  7640. else {
  7641. callback(true, url, op, renlian.guid());
  7642. }
  7643. },
  7644. uploads: function (data, index, op, callback, callback2) {
  7645. if (data.length > index) {
  7646. _imagepicker.upload(data[index], op, function (isOk, _url, _op, _fileId) {
  7647. callback(isOk, _url, _op, _fileId);
  7648. _imagepicker.uploads(data, index + 1, op, callback, callback2);
  7649. });
  7650. }
  7651. else {
  7652. callback2();
  7653. }
  7654. },
  7655. down: function (imgUrl) {
  7656. cordova.plugins.photoLibrary.requestAuthorization(
  7657. function () {
  7658. // User gave us permission to his library, retry reading it!
  7659. cordova.plugins.photoLibrary.getLibrary(
  7660. function ({ library }) {
  7661. //var url = 'file:///...'; // file or remote URL. url can also be dataURL, but giving it a file path is much faster
  7662. var album = 'renlianADMSApp';
  7663. cordova.plugins.photoLibrary.saveImage(imgUrl, album,
  7664. function (libraryItem) {
  7665. renlian.layer.toast('保存成功');
  7666. }, function (err) {
  7667. renlian.layer.toast('保存失败' + err);
  7668. });
  7669. },
  7670. function (err) {
  7671. if (err.startsWith('Permission')) {
  7672. // call requestAuthorization, and retry
  7673. }
  7674. // Handle error - it's not permission-related
  7675. console.log('权限' + err);
  7676. }
  7677. );
  7678. },
  7679. function (err) {
  7680. renlian.layer.toast('用户拒绝访问' + + err);
  7681. // User denied the access
  7682. }, // if options not provided, defaults to {read: true}.
  7683. {
  7684. read: true,
  7685. write: true
  7686. }
  7687. );
  7688. }
  7689. };
  7690. $.fn.imagepicker = function (op) {
  7691. var dfop = {
  7692. maxCount: 9,
  7693. isOnlyCamera: false,
  7694. params: {}
  7695. };
  7696. $.extend(dfop, op || {});
  7697. var $this = $(this);
  7698. $this[0].op = dfop;
  7699. var id = $this.attr('id');
  7700. if (!id) {
  7701. id = renlian.guid();
  7702. $this.attr('id', id);
  7703. }
  7704. dfop.id = id;
  7705. dfop.value = renlian.guid();
  7706. $this.addClass('lr-imagepicker');
  7707. $this.attr('type','lrimagepicker');
  7708. $this.html('\
  7709. <div class="lr-imagepicker-item">\
  7710. <div class="lr-imagepicker-handle" ><i class="iconfont icon-add1"></i></div >\
  7711. </div>');
  7712. $this.find('.lr-imagepicker-handle').on('tap', function () {
  7713. var $this = $(this);
  7714. if ($this.attr('readonly') || $this.parents('.lr-form-row').attr('readonly')) {
  7715. return false;
  7716. }
  7717. var $imagePicker = $this.parents('.lr-imagepicker');
  7718. var op = $imagePicker[0].op;
  7719. if (dfop.isOnlyCamera) {
  7720. renlian.camera(function (res) {
  7721. renlian.layer.loading(true, '正在上传...');
  7722. // 上传文件
  7723. _imagepicker.upload(res, op, function (isOk, _url, _op, _fileId) {
  7724. renlian.layer.loading(false);
  7725. if (isOk) {
  7726. _imagepicker.addImage(_url, _op, _fileId);
  7727. }
  7728. });
  7729. });
  7730. } else {
  7731. var _data = [{
  7732. text: '拍照',
  7733. event: function () {
  7734. renlian.camera(function (res) {
  7735. renlian.layer.loading(true, '正在上传...');
  7736. // 上传文件
  7737. _imagepicker.upload(res, op, function (isOk, _url, _op, _fileId) {
  7738. renlian.layer.loading(false);
  7739. if (isOk) {
  7740. _imagepicker.addImage(_url, _op, _fileId);
  7741. }
  7742. });
  7743. });
  7744. }
  7745. }, {
  7746. text: '从手机相册选择',
  7747. event: function () {
  7748. renlian.imagePick(function (res) {
  7749. renlian.layer.loading(true, '正在上传...');
  7750. _imagepicker.uploads(res, 0, op, function (isOk, _url, _op, _fileId) {
  7751. if (isOk) {
  7752. _imagepicker.addImage(_url, _op, _fileId);
  7753. }
  7754. }, function () {
  7755. renlian.layer.loading(false);
  7756. });
  7757. });
  7758. }
  7759. }];
  7760. renlian.actionsheet({
  7761. id: 'lrimagepicker',
  7762. data: _data
  7763. });
  7764. }
  7765. });
  7766. $this.delegate('.lr-imagepicker-remove>i', 'tap', { op: dfop }, function (e) {
  7767. var op = e.data.op;
  7768. var fileId = $(this).parent().attr('data-value');
  7769. var $imapge = $(this).parent().parent();
  7770. $imapge.remove();
  7771. $imapge = null;
  7772. op.deleteImg && op.deleteImg(fileId);
  7773. return false;
  7774. });
  7775. $this.delegate('img', 'tap', { op: dfop }, function (e) {
  7776. var op = e.data.op;
  7777. var data = [];
  7778. var fileId = $(this).parent().find('.lr-imagepicker-remove').attr('data-value');
  7779. var _index = 0;
  7780. $(this).parent().parent().find('img').each(function () {
  7781. var _fileId = $(this).parent().find('.lr-imagepicker-remove').attr('data-value');
  7782. var src = $(this).attr('src');
  7783. if (_fileId === fileId) {
  7784. _index = data.length;
  7785. }
  7786. data.push(src);
  7787. });
  7788. fui.imagePreview({
  7789. data: data, gotonum: _index,
  7790. holdEvent: function (_src) {
  7791. var _data = [{
  7792. text: '保存图片',
  7793. event: function () {
  7794. if (_src.indexOf('http://') !== -1) {
  7795. _imagepicker.down(_src, op);
  7796. }
  7797. else {
  7798. renlian.layer.toast('本地图片无需保存');
  7799. }
  7800. }
  7801. }];
  7802. renlian.actionsheet({
  7803. id: 'lrimagepicker',
  7804. data: _data
  7805. });
  7806. }
  7807. });
  7808. return false;
  7809. });
  7810. return $this;
  7811. };
  7812. $.fn.imagepickerGet = function () {
  7813. var $this = $(this);
  7814. if ($this.hasClass('lr-imagepicker')) {
  7815. var _op = $this[0].op;
  7816. $this = null;
  7817. return _op.value;
  7818. }
  7819. $this = null;
  7820. return '';
  7821. }
  7822. $.fn.imagepickerSet = function (value) {
  7823. if (value != undefined && value != null && value != '' && value != 'undefined' && value != 'null') {
  7824. var $this = $(this);
  7825. if ($this.hasClass('lr-imagepicker')) {
  7826. var op = $this[0].op;
  7827. op.value = value;
  7828. op.downFile(value, function (data) {
  7829. $.each(data, function (index, _item) {
  7830. _imagepicker.addImage(op.downUrl + _item.name, op, _item.id);
  7831. });
  7832. });
  7833. }
  7834. }
  7835. }
  7836. })(window.jQuery, window.lrmui, window.fui, window);/*
  7837. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7838. * Copyright (c) 2013-2018 前端技术开发小组
  7839. * 创建人:任联-前端开发组
  7840. * 日 期:2017.12.15
  7841. * 描 述:任联移动端框架 进度条插件
  7842. */
  7843. (function ($, renlian, fui, window) {
  7844. "use strict";
  7845. $.fn.progressSet = function (value) {
  7846. if (value === undefined || value === null || value === "") {
  7847. return;
  7848. }
  7849. var _style = 'transform: translate3d('+(value - 100)+'%, 0px, 0px);';
  7850. $(this).find('span').attr('style', _style);
  7851. };
  7852. })(window.jQuery, window.lrmui, window.fui, window);/*
  7853. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7854. * Copyright (c) 2013-2018 前端技术开发小组
  7855. * 创建人:任联-前端开发组
  7856. * 日 期:2018.07.06
  7857. * 描 述:日期查询选择框
  7858. */
  7859. (function ($, renlian, fui, window) {
  7860. "use strict";
  7861. var _multiplequery = {
  7862. init: function ($self, op) {
  7863. var $content = $self.find('.lr-tool-right-btn-content').show();
  7864. $content.parents('.f-page').append($content);
  7865. $content.show();
  7866. $content.fpopright({
  7867. callBack: function (type, $content) {
  7868. if (type === 'ok') {// 确定
  7869. setTimeout(function () {
  7870. var data = $content.lrformGet();
  7871. op.callback && op.callback(data);
  7872. }, 300);
  7873. }
  7874. else if (type === 'rest') {// 重置
  7875. setTimeout(function () {
  7876. var data = $content.lrformGet();
  7877. $.each(data, function (_id, _item) {
  7878. data[_id] = "";
  7879. });
  7880. $content.lrformSet(data);
  7881. }, 300);
  7882. }
  7883. }
  7884. });
  7885. $content.parents('.f-popright-body').addClass('lr-tool-right-btn-body ');
  7886. $self.on('tap', { $content: $content }, function (e) {
  7887. e.data.$content.fpoprightShow();
  7888. });
  7889. return $content;
  7890. }
  7891. };
  7892. $.fn.multiplequery = function (op) {
  7893. var $this = $(this);
  7894. if ($this.length === 0) {
  7895. return $this;
  7896. }
  7897. if ($this[0].dfop) {
  7898. return $this;
  7899. }
  7900. var dfop = {
  7901. callback: false
  7902. };
  7903. $.extend(dfop, op || {});
  7904. $this[0].dfop = dfop;
  7905. return _multiplequery.init($this, dfop);
  7906. };
  7907. })(window.jQuery, window.lrmui, window.fui, window);/*
  7908. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  7909. * Copyright (c) 2013-2018 前端技术开发小组
  7910. * 创建人:任联-前端开发组
  7911. * 日 期:2018.07.06
  7912. * 描 述:日期查询选择框
  7913. */
  7914. (function ($, renlian, fui, window) {
  7915. "use strict";
  7916. var _searchdate = {
  7917. init: function ($self, op) {
  7918. var _html = '\
  7919. <div class="lr-search-date" >\
  7920. <a href="javascript:;" class="lr-search-date-btn" data-value="0">今天</a>\
  7921. <a href="javascript:;" class="lr-search-date-btn" data-value="1">近7天</a>\
  7922. <a href="javascript:;" class="lr-search-date-btn" data-value="2">近1个月</a>\
  7923. <a href="javascript:;" class="lr-search-date-btn" data-value="3">近3个月</a>\
  7924. <a href="javascript:;" class="lr-search-date-btn active" data-value="4">自定义</a>\
  7925. <div class="lr-search-date-custmer">\
  7926. <div class="lr-form-row"><label>开始时间</label><div id="lr_search_date_custmer1"></div></div>\
  7927. <div class="lr-form-row"><label>结束时间</label><div id="lr_search_date_custmer2"></div></div>\
  7928. </div >\
  7929. </div>';
  7930. var _$html = $(_html);
  7931. $self.parents('.f-page').append(_$html);
  7932. _$html.fpopright({
  7933. restBtn: '',
  7934. callBack: function (type, $content) {
  7935. if (type === 'ok') {
  7936. var btn = $content.find('.lr-search-date-btn.active').attr('data-value');
  7937. if (btn === '4') {
  7938. setTimeout(function () {
  7939. var begin = ($content.find('#lr_search_date_custmer1').lrdateGet() || '1000-01-01') + " 00:00:00";
  7940. var end = ($content.find('#lr_search_date_custmer2').lrdateGet() || fui.date.get('yyyy-MM-dd')) + " 23:59:59";
  7941. op.callback && op.callback(begin, end);
  7942. }, 300);
  7943. }
  7944. }
  7945. }
  7946. });
  7947. _$html.find('#lr_search_date_custmer1').lrdate({
  7948. type: 'date'
  7949. });
  7950. _$html.find('#lr_search_date_custmer2').lrdate({
  7951. type: 'date'
  7952. });
  7953. _$html.find('.lr-search-date-btn').on('tap', { dfop: op }, function (e) {
  7954. var $this = $(this);
  7955. var v = $this.attr('data-value');
  7956. var _op = e.data.dfop;
  7957. var $p = $this.parents('.lr-search-date');
  7958. var begin = '';
  7959. var end = '';
  7960. $p.find('.lr-search-date-custmer').hide();
  7961. $p.find('.lr-search-date-btn').removeClass('active');
  7962. $this.addClass('active');
  7963. switch (v) {
  7964. case '0':// 今天
  7965. $p.fpoprightHide();
  7966. setTimeout(function () {
  7967. begin = fui.date.get('yyyy-MM-dd 00:00:00');
  7968. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7969. _op.callback && _op.callback(begin, end);
  7970. }, 300);
  7971. break;
  7972. case '1':// 近7天
  7973. $p.fpoprightHide();
  7974. setTimeout(function () {
  7975. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'd', -6);
  7976. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7977. _op.callback && _op.callback(begin, end);
  7978. }, 300);
  7979. break;
  7980. case '2':// 近1个月
  7981. $p.fpoprightHide();
  7982. setTimeout(function () {
  7983. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'm', -1);
  7984. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7985. _op.callback && _op.callback(begin, end);
  7986. }, 300);
  7987. break;
  7988. case '3':// 近3个月
  7989. $p.fpoprightHide();
  7990. setTimeout(function () {
  7991. begin = fui.date.get('yyyy-MM-dd 00:00:00', 'm', -3);
  7992. end = fui.date.get('yyyy-MM-dd 23:59:59');
  7993. _op.callback && _op.callback(begin, end);
  7994. }, 300);
  7995. break;
  7996. case '4':// 自定义
  7997. $p.find('.lr-search-date-custmer').show();
  7998. break;
  7999. }
  8000. });
  8001. $self.on('tap', { $content: _$html }, function (e) {
  8002. e.data.$content.fpoprightShow();
  8003. });
  8004. }
  8005. };
  8006. $.fn.searchdate = function (op) {
  8007. var $this = $(this);
  8008. if ($this.length === 0) {
  8009. return $this;
  8010. }
  8011. if ($this[0].dfop) {
  8012. return $this;
  8013. }
  8014. var dfop = {
  8015. callback: false
  8016. };
  8017. $.extend(dfop, op || {});
  8018. $this[0].dfop = dfop;
  8019. _searchdate.init($this, dfop);
  8020. return $this;
  8021. };
  8022. })(window.jQuery, window.lrmui, window.fui, window);/*
  8023. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  8024. * Copyright (c) 2013-2018 前端技术开发小组
  8025. * 创建人:任联-前端开发组
  8026. * 日 期:2018.06.12
  8027. * 描 述:任联移动端框架 列表左移按钮
  8028. */
  8029. (function ($, renlian, fui, window) {
  8030. "use strict";
  8031. var _lrlistswipe = {
  8032. init: function ($this, op) {
  8033. $this.addClass('f-swipebtn');
  8034. var $handler = $('<div class="f-swipebtn-handler">' + $this.html() + '</div>');
  8035. var $btn = $('<div class="f-swipebtn-right"></div>');
  8036. $this.html($handler);
  8037. $this.append($btn);
  8038. $.each(op.btns, function (_index, _item) {
  8039. var _$item = $(_item).addClass('f-swipebtn-btn');
  8040. $btn.append(_$item);
  8041. });
  8042. $this.fswipebtn();
  8043. $this = null;
  8044. $handler = null;
  8045. $btn = null;
  8046. }
  8047. };
  8048. $.fn.lrlistswipe = function (op) {
  8049. var dfop = {
  8050. btns: []
  8051. };
  8052. $.extend(dfop, op || {});
  8053. $(this).each(function () {
  8054. _lrlistswipe.init($(this), dfop);
  8055. });
  8056. };
  8057. })(window.jQuery, window.lrmui, window.fui, window);/*
  8058. * 版 本 Learun-Mobile V2.0.0 任联敏捷开发框架(http://www.renlian.cn)
  8059. * Copyright (c) 2013-2018 前端技术开发小组
  8060. * 创建人:任联-前端开发组
  8061. * 日 期:2017.12.15
  8062. * 描 述:任联移动端框架 多选框插件
  8063. */
  8064. (function ($, renlian, fui, window) {
  8065. "use strict";
  8066. // 多选框(初始化)
  8067. $.fn.lrcheckbox = function (op) {
  8068. var $this = $(this);
  8069. if ($this.length === 0) {
  8070. return $this;
  8071. }
  8072. var dfop = {
  8073. placeholder: '请选择',
  8074. data: [],
  8075. ivalue: 'value',
  8076. itext: 'text',
  8077. change: false
  8078. };
  8079. $.extend(dfop, op || {});
  8080. dfop.callback = function () {
  8081. renlian.formblur();
  8082. };
  8083. $this.attr('type', 'lrcheckbox');
  8084. $this.addClass('lr-checkbox');
  8085. $this.html('<div class="text">' + dfop.placeholder + '</div>');
  8086. setTimeout(function () {
  8087. $this.fcheckbox(dfop).on('change', function () {
  8088. var $self = $(this);
  8089. var text = $self[0].fop.text || '';
  8090. var $text = $self.find('.text');
  8091. if (text === ''){
  8092. $self.find('.text').text($self[0].fop.placeholder);
  8093. }
  8094. else {
  8095. $text.html('');
  8096. var textlist = text.split(',');
  8097. $.each(textlist, function (_index, _item) {
  8098. var _html = '<div class="lr-checkbox-item" >' + _item + '</div>';
  8099. $text.append(_html);
  8100. });
  8101. }
  8102. $text = null;
  8103. });
  8104. }, 100);
  8105. return $this;
  8106. };
  8107. // 多选框(获取数据值)
  8108. $.fn.lrcheckboxGet = function (type) {
  8109. var $this = $(this);
  8110. if ($this.length === 0) {
  8111. return "";
  8112. }
  8113. var fop = $this[0].fop;
  8114. if (type === 'text') {
  8115. return fop.text;
  8116. }
  8117. else {
  8118. return fop.value;
  8119. }
  8120. };
  8121. // 多选框(设置数据值)
  8122. $.fn.lrcheckboxSet = function (value) {
  8123. var $this = $(this);
  8124. if ($this.length === 0) {
  8125. return false;
  8126. }
  8127. function set(value, $this) {
  8128. if (!$this[0].fop) {
  8129. setTimeout(function () {
  8130. set(value, $this);
  8131. }, 100);
  8132. }
  8133. else {
  8134. var fop = $this[0].fop;
  8135. if (value) {
  8136. fop._lrTmpValue = value;
  8137. }
  8138. $this.fcheckboxSet(value);
  8139. if (value === '') {
  8140. fop.value = '';
  8141. fop.text = '';
  8142. $this.find('.text').text(fop.placeholder);
  8143. }
  8144. }
  8145. }
  8146. set(value, $this);
  8147. };
  8148. // 多选框(更新数据)
  8149. $.fn.lrcheckboxSetData = function (data) {
  8150. var $this = $(this);
  8151. if ($this.length === 0) {
  8152. return false;
  8153. }
  8154. function updateData(data, $this) {
  8155. if (!$this[0].fop) {
  8156. setTimeout(function () {
  8157. updateData(data, $this);
  8158. }, 100);
  8159. }
  8160. else {
  8161. $this.fcheckboxSetData(data);
  8162. $this.lrcheckboxSet($this[0].fop._lrTmpValue);
  8163. }
  8164. }
  8165. updateData(data, $this);
  8166. };
  8167. })(window.jQuery, window.lrmui, window.fui, window);