amazeui.min.js 339 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484
  1. /*! Amaze UI v2.7.2 | by Amaze UI Team | (c) 2016 AllMobilize, Inc. | Licensed under MIT | 2016-08-17T16:17:24+0800 */ ! function (t, e) {
  2. "object" == typeof exports && "object" == typeof module ? module.exports = e(require("jquery")) : "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? exports.AMUI = e(require("jquery")) : t.AMUI = e(t.jQuery)
  3. }(this, function (t) {
  4. return function (t) {
  5. function e(n) {
  6. if (i[n]) return i[n].exports;
  7. var s = i[n] = {
  8. exports: {},
  9. id: n,
  10. loaded: !1
  11. };
  12. return t[n].call(s.exports, s, s.exports, e), s.loaded = !0, s.exports
  13. }
  14. var i = {};
  15. return e.m = t, e.c = i, e.p = "", e(0)
  16. }([function (t, e, i) {
  17. "use strict";
  18. var n = i(1),
  19. s = i(2);
  20. i(3), i(4), i(5), i(6), i(7), i(8), i(9), i(10), i(11), i(14), i(15), i(16), i(17), i(18), i(19), i(20), i(21), i(22), i(24), i(25), i(23), i(27), i(28), i(29), i(30), i(31), i(32), i(33), i(26), i(34), i(35), i(36), i(37), i(38), i(39), i(40), i(41), i(42), i(43), i(44), i(45), i(46), i(47), i(48), i(49), i(50), i(51), i(52), i(53), i(54), t.exports = n.AMUI = s
  21. }, function (e, i) {
  22. e.exports = t
  23. }, function (t, e, i) {
  24. "use strict";
  25. var n = i(1);
  26. if ("undefined" == typeof n) throw new Error("Amaze UI 2.x requires jQuery :-(\n\u7231\u4e0a\u4e00\u5339\u91ce\u9a6c\uff0c\u53ef\u4f60\u7684\u5bb6\u91cc\u6ca1\u6709\u8349\u539f\u2026");
  27. var s = n.AMUI || {},
  28. o = n(window),
  29. a = window.document,
  30. r = n("html");
  31. s.VERSION = "2.7.2", s.support = {}, s.support.transition = function () {
  32. var t = function () {
  33. var t = a.body || a.documentElement,
  34. e = {
  35. WebkitTransition: "webkitTransitionEnd",
  36. MozTransition: "transitionend",
  37. OTransition: "oTransitionEnd otransitionend",
  38. transition: "transitionend"
  39. };
  40. for (var i in e)
  41. if (void 0 !== t.style[i]) return e[i]
  42. }();
  43. return t && {
  44. end: t
  45. }
  46. }(), s.support.animation = function () {
  47. var t = function () {
  48. var t = a.body || a.documentElement,
  49. e = {
  50. WebkitAnimation: "webkitAnimationEnd",
  51. MozAnimation: "animationend",
  52. OAnimation: "oAnimationEnd oanimationend",
  53. animation: "animationend"
  54. };
  55. for (var i in e)
  56. if (void 0 !== t.style[i]) return e[i]
  57. }();
  58. return t && {
  59. end: t
  60. }
  61. }(), s.support.touch = "ontouchstart" in window && navigator.userAgent.toLowerCase().match(/mobile|tablet/) || window.DocumentTouch && document instanceof window.DocumentTouch || window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 0 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 0 || !1, s.support.mutationobserver = window.MutationObserver || window.WebKitMutationObserver || null, s.support.formValidation = "function" == typeof document.createElement("form").checkValidity, s.utils = {}, s.utils.debounce = function (t, e, i) {
  62. var n;
  63. return function () {
  64. var s = this,
  65. o = arguments,
  66. a = function () {
  67. n = null, i || t.apply(s, o)
  68. },
  69. r = i && !n;
  70. clearTimeout(n), n = setTimeout(a, e), r && t.apply(s, o)
  71. }
  72. }, s.utils.isInView = function (t, e) {
  73. var i = n(t),
  74. s = !(!i.width() && !i.height()) && "none" !== i.css("display");
  75. if (!s) return !1;
  76. var a = o.scrollLeft(),
  77. r = o.scrollTop(),
  78. l = i.offset(),
  79. c = l.left,
  80. u = l.top;
  81. return e = n.extend({
  82. topOffset: 0,
  83. leftOffset: 0
  84. }, e), u + i.height() >= r && u - e.topOffset <= r + o.height() && c + i.width() >= a && c - e.leftOffset <= a + o.width()
  85. }, s.utils.parseOptions = s.utils.options = function (t) {
  86. if (n.isPlainObject(t)) return t;
  87. var e = t ? t.indexOf("{") : -1,
  88. i = {};
  89. if (e != -1) try {
  90. i = new Function("", "var json = " + t.substr(e) + "; return JSON.parse(JSON.stringify(json));")()
  91. } catch (s) {}
  92. return i
  93. }, s.utils.generateGUID = function (t) {
  94. var e = t + "-" || "am-";
  95. do e += Math.random().toString(36).substring(2, 7); while (document.getElementById(e));
  96. return e
  97. }, s.utils.getAbsoluteUrl = function () {
  98. var t;
  99. return function (e) {
  100. return t || (t = document.createElement("a")), t.href = e, t.href
  101. }
  102. }(), s.plugin = function (t, e, i) {
  103. var o = n.fn[t];
  104. i = i || {}, n.fn[t] = function (o) {
  105. var a, r = Array.prototype.slice.call(arguments, 0),
  106. l = r.slice(1),
  107. c = this.each(function () {
  108. var c = n(this),
  109. u = "amui." + t,
  110. h = i.dataOptions || "data-am-" + t,
  111. d = c.data(u),
  112. p = n.extend({}, s.utils.parseOptions(c.attr(h)), "object" == typeof o && o);
  113. (d || "destroy" !== o) && (d || c.data(u, d = new e(this, p)), i.methodCall ? i.methodCall.call(c, r, d) : (i.before && i.before.call(c, r, d), "string" == typeof o && (a = "function" == typeof d[o] ? d[o].apply(d, l) : d[o]), i.after && i.after.call(c, r, d)))
  114. });
  115. return void 0 === a ? c : a
  116. }, n.fn[t].Constructor = e, n.fn[t].noConflict = function () {
  117. return n.fn[t] = o, this
  118. }, s[t] = e
  119. }, n.fn.emulateTransitionEnd = function (t) {
  120. var e = !1,
  121. i = this;
  122. n(this).one(s.support.transition.end, function () {
  123. e = !0
  124. });
  125. var o = function () {
  126. e || n(i).trigger(s.support.transition.end), i.transitionEndTimmer = void 0
  127. };
  128. return this.transitionEndTimmer = setTimeout(o, t), this
  129. }, n.fn.redraw = function () {
  130. return this.each(function () {
  131. this.offsetHeight
  132. })
  133. }, n.fn.transitionEnd = function (t) {
  134. function e(s) {
  135. t.call(this, s), i && n.off(i, e)
  136. }
  137. var i = s.support.transition.end,
  138. n = this;
  139. return t && i && n.on(i, e), this
  140. }, n.fn.removeClassRegEx = function () {
  141. return this.each(function (t) {
  142. var e = n(this).attr("class");
  143. if (!e || !t) return !1;
  144. var i = [];
  145. e = e.split(" ");
  146. for (var s = 0, o = e.length; s < o; s++) e[s].match(t) || i.push(e[s]);
  147. n(this).attr("class", i.join(" "))
  148. })
  149. }, n.fn.alterClass = function (t, e) {
  150. var i = this;
  151. if (t.indexOf("*") === -1) return i.removeClass(t), e ? i.addClass(e) : i;
  152. var s = new RegExp("\\s" + t.replace(/\*/g, "[A-Za-z0-9-_]+").split(" ").join("\\s|\\s") + "\\s", "g");
  153. return i.each(function (t, e) {
  154. for (var i = " " + e.className + " "; s.test(i);) i = i.replace(s, " ");
  155. e.className = n.trim(i)
  156. }), e ? i.addClass(e) : i
  157. }, s.utils.rAF = function () {
  158. return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || function (t) {
  159. return window.setTimeout(t, 1e3 / 60)
  160. }
  161. }(), s.utils.cancelAF = function () {
  162. return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || function (t) {
  163. window.clearTimeout(t)
  164. }
  165. }(), s.utils.measureScrollbar = function () {
  166. if (document.body.clientWidth >= window.innerWidth) return 0;
  167. var t = n('<div style="width: 100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;"></div>');
  168. n(document.body).append(t);
  169. var e = t[0].offsetWidth - t[0].clientWidth;
  170. return t.remove(), e
  171. }, s.utils.imageLoader = function (t, e) {
  172. function i() {
  173. e(t[0])
  174. }
  175. function n() {
  176. if (this.one("load", i), /MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
  177. var t = this.attr("src"),
  178. e = t.match(/\?/) ? "&" : "?";
  179. e += "random=" + (new Date).getTime(), this.attr("src", t + e)
  180. }
  181. }
  182. return t.attr("src") ? void(t[0].complete || 4 === t[0].readyState ? i() : n.call(t)) : void i()
  183. }, s.template = function (t, e) {
  184. var i = s.template;
  185. return i.cache[t] || (i.cache[t] = function () {
  186. var e = t,
  187. n = /^[\w\-]+$/.test(t) ? i.get(t) : (e = "template(string)", t),
  188. s = 1,
  189. o = ("try { " + (i.variable ? "var " + i.variable + " = this.stash;" : "with (this.stash) { ") + "this.ret += '" + n.replace(/<%/g, "\x11").replace(/%>/g, "\x13").replace(/'(?![^\x11\x13]+?\x13)/g, "\\x27").replace(/^\s*|\s*$/g, "").replace(/\n/g, function () {
  190. return "';\nthis.line = " + ++s + "; this.ret += '\\n"
  191. }).replace(/\x11-(.+?)\x13/g, "' + ($1) + '").replace(/\x11=(.+?)\x13/g, "' + this.escapeHTML($1) + '").replace(/\x11(.+?)\x13/g, "'; $1; this.ret += '") + "'; " + (i.variable ? "" : "}") + "return this.ret;} catch (e) { throw 'TemplateError: ' + e + ' (on " + e + "' + ' line ' + this.line + ')'; } //@ sourceURL=" + e + "\n").replace(/this\.ret \+= '';/g, ""),
  192. a = new Function(o),
  193. r = {
  194. "&": "&amp;",
  195. "<": "&lt;",
  196. ">": "&gt;",
  197. '"': "&#x22;",
  198. "'": "&#x27;"
  199. },
  200. l = function (t) {
  201. return ("" + t).replace(/[&<>\'\"]/g, function (t) {
  202. return r[t]
  203. })
  204. };
  205. return function (t) {
  206. return a.call(i.context = {
  207. escapeHTML: l,
  208. line: 1,
  209. ret: "",
  210. stash: t
  211. })
  212. }
  213. }()), e ? i.cache[t](e) : i.cache[t]
  214. }, s.template.cache = {}, s.template.get = function (t) {
  215. if (t) {
  216. var e = document.getElementById(t);
  217. return e && e.innerHTML || ""
  218. }
  219. }, s.DOMWatchers = [], s.DOMReady = !1, s.ready = function (t) {
  220. s.DOMWatchers.push(t), s.DOMReady && t(document)
  221. }, s.DOMObserve = function (t, e, i) {
  222. var o = s.support.mutationobserver;
  223. o && (e = n.isPlainObject(e) ? e : {
  224. childList: !0,
  225. subtree: !0
  226. }, i = "function" == typeof i && i || function () {}, n(t).each(function () {
  227. var t = this,
  228. a = n(t);
  229. if (!a.data("am.observer")) try {
  230. var r = new o(s.utils.debounce(function (e, n) {
  231. i.call(t, e, n), a.trigger("changed.dom.amui")
  232. }, 50));
  233. r.observe(t, e), a.data("am.observer", r)
  234. } catch (l) {}
  235. }))
  236. }, n.fn.DOMObserve = function (t, e) {
  237. return this.each(function () {
  238. s.DOMObserve(this, t, e)
  239. })
  240. }, s.support.touch && r.addClass("am-touch"), n(document).on("changed.dom.amui", function (t) {
  241. var e = t.target;
  242. n.each(s.DOMWatchers, function (t, i) {
  243. i(e)
  244. })
  245. }), n(function () {
  246. var t = n(document.body);
  247. s.DOMReady = !0, n.each(s.DOMWatchers, function (t, e) {
  248. e(document)
  249. }), s.DOMObserve("[data-am-observe]"), r.removeClass("no-js").addClass("js"), s.support.animation && r.addClass("cssanimations"), window.navigator.standalone && r.addClass("am-standalone"), n(".am-topbar-fixed-top").length && t.addClass("am-with-topbar-fixed-top"), n(".am-topbar-fixed-bottom").length && t.addClass("am-with-topbar-fixed-bottom");
  250. var e = n(".am-layout");
  251. e.find('[class*="md-block-grid"]').alterClass("md-block-grid-*"), e.find('[class*="lg-block-grid"]').alterClass("lg-block-grid"), n("[data-am-widget]").each(function () {
  252. var t = n(this);
  253. 0 === t.parents(".am-layout").length && t.addClass("am-no-layout")
  254. })
  255. }), t.exports = s
  256. }, function (t, e, i) {
  257. "use strict";
  258. function n(t, e, i) {
  259. return setTimeout(l(t, i), e)
  260. }
  261. function s(t, e, i) {
  262. return !!Array.isArray(t) && (o(t, i[e], i), !0)
  263. }
  264. function o(t, e, i) {
  265. var n;
  266. if (t)
  267. if (t.forEach) t.forEach(e, i);
  268. else if (void 0 !== t.length)
  269. for (n = 0; n < t.length;) e.call(i, t[n], n, t), n++;
  270. else
  271. for (n in t) t.hasOwnProperty(n) && e.call(i, t[n], n, t)
  272. }
  273. function a(t, e, i) {
  274. var n = "DEPRECATED METHOD: " + e + "\n" + i + " AT \n";
  275. return function () {
  276. var e = new Error("get-stack-trace"),
  277. i = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace",
  278. s = window.console && (window.console.warn || window.console.log);
  279. return s && s.call(window.console, n, i), t.apply(this, arguments)
  280. }
  281. }
  282. function r(t, e, i) {
  283. var n, s = e.prototype;
  284. n = t.prototype = Object.create(s), n.constructor = t, n._super = s, i && ut(n, i)
  285. }
  286. function l(t, e) {
  287. return function () {
  288. return t.apply(e, arguments)
  289. }
  290. }
  291. function c(t, e) {
  292. return typeof t == ft ? t.apply(e ? e[0] || void 0 : void 0, e) : t
  293. }
  294. function u(t, e) {
  295. return void 0 === t ? e : t
  296. }
  297. function h(t, e, i) {
  298. o(f(e), function (e) {
  299. t.addEventListener(e, i, !1)
  300. })
  301. }
  302. function d(t, e, i) {
  303. o(f(e), function (e) {
  304. t.removeEventListener(e, i, !1)
  305. })
  306. }
  307. function p(t, e) {
  308. for (; t;) {
  309. if (t == e) return !0;
  310. t = t.parentNode
  311. }
  312. return !1
  313. }
  314. function m(t, e) {
  315. return t.indexOf(e) > -1
  316. }
  317. function f(t) {
  318. return t.trim().split(/\s+/g)
  319. }
  320. function v(t, e, i) {
  321. if (t.indexOf && !i) return t.indexOf(e);
  322. for (var n = 0; n < t.length;) {
  323. if (i && t[n][i] == e || !i && t[n] === e) return n;
  324. n++
  325. }
  326. return -1
  327. }
  328. function g(t) {
  329. return Array.prototype.slice.call(t, 0)
  330. }
  331. function y(t, e, i) {
  332. for (var n = [], s = [], o = 0; o < t.length;) {
  333. var a = e ? t[o][e] : t[o];
  334. v(s, a) < 0 && n.push(t[o]), s[o] = a, o++
  335. }
  336. return i && (n = e ? n.sort(function (t, i) {
  337. return t[e] > i[e]
  338. }) : n.sort()), n
  339. }
  340. function w(t, e) {
  341. for (var i, n, s = e[0].toUpperCase() + e.slice(1), o = 0; o < pt.length;) {
  342. if (i = pt[o], n = i ? i + s : e, n in t) return n;
  343. o++
  344. }
  345. }
  346. function b() {
  347. return Tt++
  348. }
  349. function T(t) {
  350. var e = t.ownerDocument || t;
  351. return e.defaultView || e.parentWindow || window
  352. }
  353. function x(t, e) {
  354. var i = this;
  355. this.manager = t, this.callback = e, this.element = t.element, this.target = t.options.inputTarget, this.domHandler = function (e) {
  356. c(t.options.enable, [t]) && i.handler(e)
  357. }, this.init()
  358. }
  359. function C(t) {
  360. var e, i = t.options.inputClass;
  361. return new(e = i ? i : Et ? _ : St ? q : Ct ? H : L)(t, E)
  362. }
  363. function E(t, e, i) {
  364. var n = i.pointers.length,
  365. s = i.changedPointers.length,
  366. o = e & Mt && n - s === 0,
  367. a = e & (Nt | It) && n - s === 0;
  368. i.isFirst = !!o, i.isFinal = !!a, o && (t.session = {}), i.eventType = e, S(t, i), t.emit("hammer.input", i), t.recognize(i), t.session.prevInput = i
  369. }
  370. function S(t, e) {
  371. var i = t.session,
  372. n = e.pointers,
  373. s = n.length;
  374. i.firstInput || (i.firstInput = F(e)), s > 1 && !i.firstMultiple ? i.firstMultiple = F(e) : 1 === s && (i.firstMultiple = !1);
  375. var o = i.firstInput,
  376. a = i.firstMultiple,
  377. r = a ? a.center : o.center,
  378. l = e.center = A(n);
  379. e.timeStamp = yt(), e.deltaTime = e.timeStamp - o.timeStamp, e.angle = N(r, l), e.distance = P(r, l), k(i, e), e.offsetDirection = M(e.deltaX, e.deltaY);
  380. var c = $(e.deltaTime, e.deltaX, e.deltaY);
  381. e.overallVelocityX = c.x, e.overallVelocityY = c.y, e.overallVelocity = gt(c.x) > gt(c.y) ? c.x : c.y, e.scale = a ? O(a.pointers, n) : 1, e.rotation = a ? I(a.pointers, n) : 0, e.maxPointers = i.prevInput ? e.pointers.length > i.prevInput.maxPointers ? e.pointers.length : i.prevInput.maxPointers : e.pointers.length, D(i, e);
  382. var u = t.element;
  383. p(e.srcEvent.target, u) && (u = e.srcEvent.target), e.target = u
  384. }
  385. function k(t, e) {
  386. var i = e.center,
  387. n = t.offsetDelta || {},
  388. s = t.prevDelta || {},
  389. o = t.prevInput || {};
  390. e.eventType !== Mt && o.eventType !== Nt || (s = t.prevDelta = {
  391. x: o.deltaX || 0,
  392. y: o.deltaY || 0
  393. }, n = t.offsetDelta = {
  394. x: i.x,
  395. y: i.y
  396. }), e.deltaX = s.x + (i.x - n.x), e.deltaY = s.y + (i.y - n.y)
  397. }
  398. function D(t, e) {
  399. var i, n, s, o, a = t.lastInterval || e,
  400. r = e.timeStamp - a.timeStamp;
  401. if (e.eventType != It && (r > $t || void 0 === a.velocity)) {
  402. var l = e.deltaX - a.deltaX,
  403. c = e.deltaY - a.deltaY,
  404. u = $(r, l, c);
  405. n = u.x, s = u.y, i = gt(u.x) > gt(u.y) ? u.x : u.y, o = M(l, c), t.lastInterval = e
  406. } else i = a.velocity, n = a.velocityX, s = a.velocityY, o = a.direction;
  407. e.velocity = i, e.velocityX = n, e.velocityY = s, e.direction = o
  408. }
  409. function F(t) {
  410. for (var e = [], i = 0; i < t.pointers.length;) e[i] = {
  411. clientX: vt(t.pointers[i].clientX),
  412. clientY: vt(t.pointers[i].clientY)
  413. }, i++;
  414. return {
  415. timeStamp: yt(),
  416. pointers: e,
  417. center: A(e),
  418. deltaX: t.deltaX,
  419. deltaY: t.deltaY
  420. }
  421. }
  422. function A(t) {
  423. var e = t.length;
  424. if (1 === e) return {
  425. x: vt(t[0].clientX),
  426. y: vt(t[0].clientY)
  427. };
  428. for (var i = 0, n = 0, s = 0; s < e;) i += t[s].clientX, n += t[s].clientY, s++;
  429. return {
  430. x: vt(i / e),
  431. y: vt(n / e)
  432. }
  433. }
  434. function $(t, e, i) {
  435. return {
  436. x: e / t || 0,
  437. y: i / t || 0
  438. }
  439. }
  440. function M(t, e) {
  441. return t === e ? Ot : gt(t) >= gt(e) ? t < 0 ? Lt : _t : e < 0 ? zt : Rt
  442. }
  443. function P(t, e, i) {
  444. i || (i = Bt);
  445. var n = e[i[0]] - t[i[0]],
  446. s = e[i[1]] - t[i[1]];
  447. return Math.sqrt(n * n + s * s)
  448. }
  449. function N(t, e, i) {
  450. i || (i = Bt);
  451. var n = e[i[0]] - t[i[0]],
  452. s = e[i[1]] - t[i[1]];
  453. return 180 * Math.atan2(s, n) / Math.PI
  454. }
  455. function I(t, e) {
  456. return N(e[1], e[0], Ut) + N(t[1], t[0], Ut)
  457. }
  458. function O(t, e) {
  459. return P(e[0], e[1], Ut) / P(t[0], t[1], Ut)
  460. }
  461. function L() {
  462. this.evEl = Xt, this.evWin = Yt, this.pressed = !1, x.apply(this, arguments)
  463. }
  464. function _() {
  465. this.evEl = Gt, this.evWin = Kt, x.apply(this, arguments), this.store = this.manager.session.pointerEvents = []
  466. }
  467. function z() {
  468. this.evTarget = Qt, this.evWin = te, this.started = !1, x.apply(this, arguments)
  469. }
  470. function R(t, e) {
  471. var i = g(t.touches),
  472. n = g(t.changedTouches);
  473. return e & (Nt | It) && (i = y(i.concat(n), "identifier", !0)), [i, n]
  474. }
  475. function q() {
  476. this.evTarget = ie, this.targetIds = {}, x.apply(this, arguments)
  477. }
  478. function W(t, e) {
  479. var i = g(t.touches),
  480. n = this.targetIds;
  481. if (e & (Mt | Pt) && 1 === i.length) return n[i[0].identifier] = !0, [i, i];
  482. var s, o, a = g(t.changedTouches),
  483. r = [],
  484. l = this.target;
  485. if (o = i.filter(function (t) {
  486. return p(t.target, l)
  487. }), e === Mt)
  488. for (s = 0; s < o.length;) n[o[s].identifier] = !0, s++;
  489. for (s = 0; s < a.length;) n[a[s].identifier] && r.push(a[s]), e & (Nt | It) && delete n[a[s].identifier], s++;
  490. return r.length ? [y(o.concat(r), "identifier", !0), r] : void 0
  491. }
  492. function H() {
  493. x.apply(this, arguments);
  494. var t = l(this.handler, this);
  495. this.touch = new q(this.manager, t), this.mouse = new L(this.manager, t), this.primaryTouch = null, this.lastTouches = []
  496. }
  497. function B(t, e) {
  498. t & Mt ? (this.primaryTouch = e.changedPointers[0].identifier, U.call(this, e)) : t & (Nt | It) && U.call(this, e)
  499. }
  500. function U(t) {
  501. var e = t.changedPointers[0];
  502. if (e.identifier === this.primaryTouch) {
  503. var i = {
  504. x: e.clientX,
  505. y: e.clientY
  506. };
  507. this.lastTouches.push(i);
  508. var n = this.lastTouches,
  509. s = function () {
  510. var t = n.indexOf(i);
  511. t > -1 && n.splice(t, 1)
  512. };
  513. setTimeout(s, ne)
  514. }
  515. }
  516. function V(t) {
  517. for (var e = t.srcEvent.clientX, i = t.srcEvent.clientY, n = 0; n < this.lastTouches.length; n++) {
  518. var s = this.lastTouches[n],
  519. o = Math.abs(e - s.x),
  520. a = Math.abs(i - s.y);
  521. if (o <= se && a <= se) return !0
  522. }
  523. return !1
  524. }
  525. function X(t, e) {
  526. this.manager = t, this.set(e)
  527. }
  528. function Y(t) {
  529. if (m(t, ue)) return ue;
  530. var e = m(t, he),
  531. i = m(t, de);
  532. return e && i ? ue : e || i ? e ? he : de : m(t, ce) ? ce : le
  533. }
  534. function j() {
  535. if (!ae) return !1;
  536. var t = {},
  537. e = window.CSS && window.CSS.supports;
  538. return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (i) {
  539. t[i] = !e || window.CSS.supports("touch-action", i)
  540. }), t
  541. }
  542. function Z(t) {
  543. this.options = ut({}, this.defaults, t || {}), this.id = b(), this.manager = null, this.options.enable = u(this.options.enable, !0), this.state = me, this.simultaneous = {}, this.requireFail = []
  544. }
  545. function G(t) {
  546. return t & we ? "cancel" : t & ge ? "end" : t & ve ? "move" : t & fe ? "start" : ""
  547. }
  548. function K(t) {
  549. return t == Rt ? "down" : t == zt ? "up" : t == Lt ? "left" : t == _t ? "right" : ""
  550. }
  551. function J(t, e) {
  552. var i = e.manager;
  553. return i ? i.get(t) : t
  554. }
  555. function Q() {
  556. Z.apply(this, arguments)
  557. }
  558. function tt() {
  559. Q.apply(this, arguments), this.pX = null, this.pY = null
  560. }
  561. function et() {
  562. Q.apply(this, arguments)
  563. }
  564. function it() {
  565. Z.apply(this, arguments), this._timer = null, this._input = null
  566. }
  567. function nt() {
  568. Q.apply(this, arguments)
  569. }
  570. function st() {
  571. Q.apply(this, arguments)
  572. }
  573. function ot() {
  574. Z.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0
  575. }
  576. function at(t, e) {
  577. return e = e || {}, e.recognizers = u(e.recognizers, at.defaults.preset), new rt(t, e)
  578. }
  579. function rt(t, e) {
  580. this.options = ut({}, at.defaults, e || {}), this.options.inputTarget = this.options.inputTarget || t, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = t, this.input = C(this), this.touchAction = new X(this, this.options.touchAction), lt(this, !0), o(this.options.recognizers, function (t) {
  581. var e = this.add(new t[0](t[1]));
  582. t[2] && e.recognizeWith(t[2]), t[3] && e.requireFailure(t[3])
  583. }, this)
  584. }
  585. function lt(t, e) {
  586. var i = t.element;
  587. if (i.style) {
  588. var n;
  589. o(t.options.cssProps, function (s, o) {
  590. n = w(i.style, o), e ? (t.oldCssProps[n] = i.style[n], i.style[n] = s) : i.style[n] = t.oldCssProps[n] || ""
  591. }), e || (t.oldCssProps = {})
  592. }
  593. }
  594. function ct(t, e) {
  595. var i = document.createEvent("Event");
  596. i.initEvent(t, !0, !0), i.gesture = e, e.target.dispatchEvent(i)
  597. }
  598. var ut, ht = i(1),
  599. dt = i(2),
  600. pt = ["", "webkit", "Moz", "MS", "ms", "o"],
  601. mt = document.createElement("div"),
  602. ft = "function",
  603. vt = Math.round,
  604. gt = Math.abs,
  605. yt = Date.now;
  606. ut = "function" != typeof Object.assign ? function (t) {
  607. if (void 0 === t || null === t) throw new TypeError("Cannot convert undefined or null to object");
  608. for (var e = Object(t), i = 1; i < arguments.length; i++) {
  609. var n = arguments[i];
  610. if (void 0 !== n && null !== n)
  611. for (var s in n) n.hasOwnProperty(s) && (e[s] = n[s])
  612. }
  613. return e
  614. } : Object.assign;
  615. var wt = a(function (t, e, i) {
  616. for (var n = Object.keys(e), s = 0; s < n.length;)(!i || i && void 0 === t[n[s]]) && (t[n[s]] = e[n[s]]), s++;
  617. return t
  618. }, "extend", "Use `assign`."),
  619. bt = a(function (t, e) {
  620. return wt(t, e, !0)
  621. }, "merge", "Use `assign`."),
  622. Tt = 1,
  623. xt = /mobile|tablet|ip(ad|hone|od)|android/i,
  624. Ct = "ontouchstart" in window,
  625. Et = void 0 !== w(window, "PointerEvent"),
  626. St = Ct && xt.test(navigator.userAgent),
  627. kt = "touch",
  628. Dt = "pen",
  629. Ft = "mouse",
  630. At = "kinect",
  631. $t = 25,
  632. Mt = 1,
  633. Pt = 2,
  634. Nt = 4,
  635. It = 8,
  636. Ot = 1,
  637. Lt = 2,
  638. _t = 4,
  639. zt = 8,
  640. Rt = 16,
  641. qt = Lt | _t,
  642. Wt = zt | Rt,
  643. Ht = qt | Wt,
  644. Bt = ["x", "y"],
  645. Ut = ["clientX", "clientY"];
  646. x.prototype = {
  647. handler: function () {},
  648. init: function () {
  649. this.evEl && h(this.element, this.evEl, this.domHandler), this.evTarget && h(this.target, this.evTarget, this.domHandler), this.evWin && h(T(this.element), this.evWin, this.domHandler)
  650. },
  651. destroy: function () {
  652. this.evEl && d(this.element, this.evEl, this.domHandler), this.evTarget && d(this.target, this.evTarget, this.domHandler), this.evWin && d(T(this.element), this.evWin, this.domHandler)
  653. }
  654. };
  655. var Vt = {
  656. mousedown: Mt,
  657. mousemove: Pt,
  658. mouseup: Nt
  659. },
  660. Xt = "mousedown",
  661. Yt = "mousemove mouseup";
  662. r(L, x, {
  663. handler: function (t) {
  664. var e = Vt[t.type];
  665. e & Mt && 0 === t.button && (this.pressed = !0), e & Pt && 1 !== t.which && (e = Nt), this.pressed && (e & Nt && (this.pressed = !1), this.callback(this.manager, e, {
  666. pointers: [t],
  667. changedPointers: [t],
  668. pointerType: Ft,
  669. srcEvent: t
  670. }))
  671. }
  672. });
  673. var jt = {
  674. pointerdown: Mt,
  675. pointermove: Pt,
  676. pointerup: Nt,
  677. pointercancel: It,
  678. pointerout: It
  679. },
  680. Zt = {
  681. 2: kt,
  682. 3: Dt,
  683. 4: Ft,
  684. 5: At
  685. },
  686. Gt = "pointerdown",
  687. Kt = "pointermove pointerup pointercancel";
  688. window.MSPointerEvent && !window.PointerEvent && (Gt = "MSPointerDown", Kt = "MSPointerMove MSPointerUp MSPointerCancel"), r(_, x, {
  689. handler: function (t) {
  690. var e = this.store,
  691. i = !1,
  692. n = t.type.toLowerCase().replace("ms", ""),
  693. s = jt[n],
  694. o = Zt[t.pointerType] || t.pointerType,
  695. a = o == kt,
  696. r = v(e, t.pointerId, "pointerId");
  697. s & Mt && (0 === t.button || a) ? r < 0 && (e.push(t), r = e.length - 1) : s & (Nt | It) && (i = !0), r < 0 || (e[r] = t, this.callback(this.manager, s, {
  698. pointers: e,
  699. changedPointers: [t],
  700. pointerType: o,
  701. srcEvent: t
  702. }), i && e.splice(r, 1))
  703. }
  704. });
  705. var Jt = {
  706. touchstart: Mt,
  707. touchmove: Pt,
  708. touchend: Nt,
  709. touchcancel: It
  710. },
  711. Qt = "touchstart",
  712. te = "touchstart touchmove touchend touchcancel";
  713. r(z, x, {
  714. handler: function (t) {
  715. var e = Jt[t.type];
  716. if (e === Mt && (this.started = !0), this.started) {
  717. var i = R.call(this, t, e);
  718. e & (Nt | It) && i[0].length - i[1].length === 0 && (this.started = !1), this.callback(this.manager, e, {
  719. pointers: i[0],
  720. changedPointers: i[1],
  721. pointerType: kt,
  722. srcEvent: t
  723. })
  724. }
  725. }
  726. });
  727. var ee = {
  728. touchstart: Mt,
  729. touchmove: Pt,
  730. touchend: Nt,
  731. touchcancel: It
  732. },
  733. ie = "touchstart touchmove touchend touchcancel";
  734. r(q, x, {
  735. handler: function (t) {
  736. var e = ee[t.type],
  737. i = W.call(this, t, e);
  738. i && this.callback(this.manager, e, {
  739. pointers: i[0],
  740. changedPointers: i[1],
  741. pointerType: kt,
  742. srcEvent: t
  743. })
  744. }
  745. });
  746. var ne = 2500,
  747. se = 25;
  748. r(H, x, {
  749. handler: function (t, e, i) {
  750. var n = i.pointerType == kt,
  751. s = i.pointerType == Ft;
  752. if (!(s && i.sourceCapabilities && i.sourceCapabilities.firesTouchEvents)) {
  753. if (n) B.call(this, e, i);
  754. else if (s && V.call(this, i)) return;
  755. this.callback(t, e, i)
  756. }
  757. },
  758. destroy: function () {
  759. this.touch.destroy(), this.mouse.destroy()
  760. }
  761. });
  762. var oe = w(mt.style, "touchAction"),
  763. ae = void 0 !== oe,
  764. re = "compute",
  765. le = "auto",
  766. ce = "manipulation",
  767. ue = "none",
  768. he = "pan-x",
  769. de = "pan-y",
  770. pe = j();
  771. X.prototype = {
  772. set: function (t) {
  773. t == re && (t = this.compute()), ae && this.manager.element.style && pe[t] && (this.manager.element.style[oe] = t), this.actions = t.toLowerCase().trim()
  774. },
  775. update: function () {
  776. this.set(this.manager.options.touchAction)
  777. },
  778. compute: function () {
  779. var t = [];
  780. return o(this.manager.recognizers, function (e) {
  781. c(e.options.enable, [e]) && (t = t.concat(e.getTouchAction()))
  782. }), Y(t.join(" "))
  783. },
  784. preventDefaults: function (t) {
  785. var e = t.srcEvent,
  786. i = t.offsetDirection;
  787. if (this.manager.session.prevented) return void e.preventDefault();
  788. var n = this.actions,
  789. s = m(n, ue) && !pe[ue],
  790. o = m(n, de) && !pe[de],
  791. a = m(n, he) && !pe[he];
  792. if (s) {
  793. var r = 1 === t.pointers.length,
  794. l = t.distance < 2,
  795. c = t.deltaTime < 250;
  796. if (r && l && c) return
  797. }
  798. return a && o ? void 0 : s || o && i & qt || a && i & Wt ? this.preventSrc(e) : void 0
  799. },
  800. preventSrc: function (t) {
  801. this.manager.session.prevented = !0, t.preventDefault()
  802. }
  803. };
  804. var me = 1,
  805. fe = 2,
  806. ve = 4,
  807. ge = 8,
  808. ye = ge,
  809. we = 16,
  810. be = 32;
  811. Z.prototype = {
  812. defaults: {},
  813. set: function (t) {
  814. return ut(this.options, t), this.manager && this.manager.touchAction.update(), this
  815. },
  816. recognizeWith: function (t) {
  817. if (s(t, "recognizeWith", this)) return this;
  818. var e = this.simultaneous;
  819. return t = J(t, this), e[t.id] || (e[t.id] = t, t.recognizeWith(this)), this
  820. },
  821. dropRecognizeWith: function (t) {
  822. return s(t, "dropRecognizeWith", this) ? this : (t = J(t, this), delete this.simultaneous[t.id], this)
  823. },
  824. requireFailure: function (t) {
  825. if (s(t, "requireFailure", this)) return this;
  826. var e = this.requireFail;
  827. return t = J(t, this), v(e, t) === -1 && (e.push(t), t.requireFailure(this)), this
  828. },
  829. dropRequireFailure: function (t) {
  830. if (s(t, "dropRequireFailure", this)) return this;
  831. t = J(t, this);
  832. var e = v(this.requireFail, t);
  833. return e > -1 && this.requireFail.splice(e, 1), this
  834. },
  835. hasRequireFailures: function () {
  836. return this.requireFail.length > 0
  837. },
  838. canRecognizeWith: function (t) {
  839. return !!this.simultaneous[t.id]
  840. },
  841. emit: function (t) {
  842. function e(e) {
  843. i.manager.emit(e, t)
  844. }
  845. var i = this,
  846. n = this.state;
  847. n < ge && e(i.options.event + G(n)), e(i.options.event), t.additionalEvent && e(t.additionalEvent), n >= ge && e(i.options.event + G(n))
  848. },
  849. tryEmit: function (t) {
  850. return this.canEmit() ? this.emit(t) : void(this.state = be)
  851. },
  852. canEmit: function () {
  853. for (var t = 0; t < this.requireFail.length;) {
  854. if (!(this.requireFail[t].state & (be | me))) return !1;
  855. t++
  856. }
  857. return !0
  858. },
  859. recognize: function (t) {
  860. var e = ut({}, t);
  861. return c(this.options.enable, [this, e]) ? (this.state & (ye | we | be) && (this.state = me), this.state = this.process(e), void(this.state & (fe | ve | ge | we) && this.tryEmit(e))) : (this.reset(), void(this.state = be))
  862. },
  863. process: function (t) {},
  864. getTouchAction: function () {},
  865. reset: function () {}
  866. }, r(Q, Z, {
  867. defaults: {
  868. pointers: 1
  869. },
  870. attrTest: function (t) {
  871. var e = this.options.pointers;
  872. return 0 === e || t.pointers.length === e
  873. },
  874. process: function (t) {
  875. var e = this.state,
  876. i = t.eventType,
  877. n = e & (fe | ve),
  878. s = this.attrTest(t);
  879. return n && (i & It || !s) ? e | we : n || s ? i & Nt ? e | ge : e & fe ? e | ve : fe : be
  880. }
  881. }), r(tt, Q, {
  882. defaults: {
  883. event: "pan",
  884. threshold: 10,
  885. pointers: 1,
  886. direction: Ht
  887. },
  888. getTouchAction: function () {
  889. var t = this.options.direction,
  890. e = [];
  891. return t & qt && e.push(de), t & Wt && e.push(he), e
  892. },
  893. directionTest: function (t) {
  894. var e = this.options,
  895. i = !0,
  896. n = t.distance,
  897. s = t.direction,
  898. o = t.deltaX,
  899. a = t.deltaY;
  900. return s & e.direction || (e.direction & qt ? (s = 0 === o ? Ot : o < 0 ? Lt : _t, i = o != this.pX, n = Math.abs(t.deltaX)) : (s = 0 === a ? Ot : a < 0 ? zt : Rt, i = a != this.pY, n = Math.abs(t.deltaY))), t.direction = s, i && n > e.threshold && s & e.direction
  901. },
  902. attrTest: function (t) {
  903. return Q.prototype.attrTest.call(this, t) && (this.state & fe || !(this.state & fe) && this.directionTest(t))
  904. },
  905. emit: function (t) {
  906. this.pX = t.deltaX, this.pY = t.deltaY;
  907. var e = K(t.direction);
  908. e && (t.additionalEvent = this.options.event + e), this._super.emit.call(this, t)
  909. }
  910. }), r(et, Q, {
  911. defaults: {
  912. event: "pinch",
  913. threshold: 0,
  914. pointers: 2
  915. },
  916. getTouchAction: function () {
  917. return [ue]
  918. },
  919. attrTest: function (t) {
  920. return this._super.attrTest.call(this, t) && (Math.abs(t.scale - 1) > this.options.threshold || this.state & fe)
  921. },
  922. emit: function (t) {
  923. if (1 !== t.scale) {
  924. var e = t.scale < 1 ? "in" : "out";
  925. t.additionalEvent = this.options.event + e
  926. }
  927. this._super.emit.call(this, t)
  928. }
  929. }), r(it, Z, {
  930. defaults: {
  931. event: "press",
  932. pointers: 1,
  933. time: 251,
  934. threshold: 9
  935. },
  936. getTouchAction: function () {
  937. return [le]
  938. },
  939. process: function (t) {
  940. var e = this.options,
  941. i = t.pointers.length === e.pointers,
  942. s = t.distance < e.threshold,
  943. o = t.deltaTime > e.time;
  944. if (this._input = t, !s || !i || t.eventType & (Nt | It) && !o) this.reset();
  945. else if (t.eventType & Mt) this.reset(), this._timer = n(function () {
  946. this.state = ye, this.tryEmit()
  947. }, e.time, this);
  948. else if (t.eventType & Nt) return ye;
  949. return be
  950. },
  951. reset: function () {
  952. clearTimeout(this._timer)
  953. },
  954. emit: function (t) {
  955. this.state === ye && (t && t.eventType & Nt ? this.manager.emit(this.options.event + "up", t) : (this._input.timeStamp = yt(), this.manager.emit(this.options.event, this._input)))
  956. }
  957. }), r(nt, Q, {
  958. defaults: {
  959. event: "rotate",
  960. threshold: 0,
  961. pointers: 2
  962. },
  963. getTouchAction: function () {
  964. return [ue]
  965. },
  966. attrTest: function (t) {
  967. return this._super.attrTest.call(this, t) && (Math.abs(t.rotation) > this.options.threshold || this.state & fe)
  968. }
  969. }), r(st, Q, {
  970. defaults: {
  971. event: "swipe",
  972. threshold: 10,
  973. velocity: .3,
  974. direction: qt | Wt,
  975. pointers: 1
  976. },
  977. getTouchAction: function () {
  978. return tt.prototype.getTouchAction.call(this)
  979. },
  980. attrTest: function (t) {
  981. var e, i = this.options.direction;
  982. return i & (qt | Wt) ? e = t.overallVelocity : i & qt ? e = t.overallVelocityX : i & Wt && (e = t.overallVelocityY), this._super.attrTest.call(this, t) && i & t.offsetDirection && t.distance > this.options.threshold && t.maxPointers == this.options.pointers && gt(e) > this.options.velocity && t.eventType & Nt
  983. },
  984. emit: function (t) {
  985. var e = K(t.offsetDirection);
  986. e && this.manager.emit(this.options.event + e, t), this.manager.emit(this.options.event, t)
  987. }
  988. }), r(ot, Z, {
  989. defaults: {
  990. event: "tap",
  991. pointers: 1,
  992. taps: 1,
  993. interval: 300,
  994. time: 250,
  995. threshold: 9,
  996. posThreshold: 10
  997. },
  998. getTouchAction: function () {
  999. return [ce]
  1000. },
  1001. process: function (t) {
  1002. var e = this.options,
  1003. i = t.pointers.length === e.pointers,
  1004. s = t.distance < e.threshold,
  1005. o = t.deltaTime < e.time;
  1006. if (this.reset(), t.eventType & Mt && 0 === this.count) return this.failTimeout();
  1007. if (s && o && i) {
  1008. if (t.eventType != Nt) return this.failTimeout();
  1009. var a = !this.pTime || t.timeStamp - this.pTime < e.interval,
  1010. r = !this.pCenter || P(this.pCenter, t.center) < e.posThreshold;
  1011. this.pTime = t.timeStamp, this.pCenter = t.center, r && a ? this.count += 1 : this.count = 1, this._input = t;
  1012. var l = this.count % e.taps;
  1013. if (0 === l) return this.hasRequireFailures() ? (this._timer = n(function () {
  1014. this.state = ye, this.tryEmit()
  1015. }, e.interval, this), fe) : ye
  1016. }
  1017. return be
  1018. },
  1019. failTimeout: function () {
  1020. return this._timer = n(function () {
  1021. this.state = be
  1022. }, this.options.interval, this), be
  1023. },
  1024. reset: function () {
  1025. clearTimeout(this._timer)
  1026. },
  1027. emit: function () {
  1028. this.state == ye && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input))
  1029. }
  1030. }), at.VERSION = "2.0.7", at.defaults = {
  1031. domEvents: !1,
  1032. touchAction: re,
  1033. enable: !0,
  1034. inputTarget: null,
  1035. inputClass: null,
  1036. preset: [
  1037. [nt, {
  1038. enable: !1
  1039. }],
  1040. [et, {
  1041. enable: !1
  1042. },
  1043. ["rotate"]
  1044. ],
  1045. [st, {
  1046. direction: qt
  1047. }],
  1048. [tt, {
  1049. direction: qt
  1050. },
  1051. ["swipe"]
  1052. ],
  1053. [ot],
  1054. [ot, {
  1055. event: "doubletap",
  1056. taps: 2
  1057. },
  1058. ["tap"]
  1059. ],
  1060. [it]
  1061. ],
  1062. cssProps: {
  1063. userSelect: "none",
  1064. touchSelect: "none",
  1065. touchCallout: "none",
  1066. contentZooming: "none",
  1067. userDrag: "none",
  1068. tapHighlightColor: "rgba(0,0,0,0)"
  1069. }
  1070. };
  1071. var Te = 1,
  1072. xe = 2;
  1073. rt.prototype = {
  1074. set: function (t) {
  1075. return ut(this.options, t), t.touchAction && this.touchAction.update(), t.inputTarget && (this.input.destroy(), this.input.target = t.inputTarget, this.input.init()), this
  1076. },
  1077. stop: function (t) {
  1078. this.session.stopped = t ? xe : Te
  1079. },
  1080. recognize: function (t) {
  1081. var e = this.session;
  1082. if (!e.stopped) {
  1083. this.touchAction.preventDefaults(t);
  1084. var i, n = this.recognizers,
  1085. s = e.curRecognizer;
  1086. (!s || s && s.state & ye) && (s = e.curRecognizer = null);
  1087. for (var o = 0; o < n.length;) i = n[o], e.stopped === xe || s && i != s && !i.canRecognizeWith(s) ? i.reset() : i.recognize(t), !s && i.state & (fe | ve | ge) && (s = e.curRecognizer = i), o++
  1088. }
  1089. },
  1090. get: function (t) {
  1091. if (t instanceof Z) return t;
  1092. for (var e = this.recognizers, i = 0; i < e.length; i++)
  1093. if (e[i].options.event == t) return e[i];
  1094. return null
  1095. },
  1096. add: function (t) {
  1097. if (s(t, "add", this)) return this;
  1098. var e = this.get(t.options.event);
  1099. return e && this.remove(e), this.recognizers.push(t), t.manager = this, this.touchAction.update(), t
  1100. },
  1101. remove: function (t) {
  1102. if (s(t, "remove", this)) return this;
  1103. if (t = this.get(t)) {
  1104. var e = this.recognizers,
  1105. i = v(e, t);
  1106. i !== -1 && (e.splice(i, 1), this.touchAction.update())
  1107. }
  1108. return this
  1109. },
  1110. on: function (t, e) {
  1111. if (void 0 !== t && void 0 !== e) {
  1112. var i = this.handlers;
  1113. return o(f(t), function (t) {
  1114. i[t] = i[t] || [], i[t].push(e)
  1115. }), this
  1116. }
  1117. },
  1118. off: function (t, e) {
  1119. if (void 0 !== t) {
  1120. var i = this.handlers;
  1121. return o(f(t), function (t) {
  1122. e ? i[t] && i[t].splice(v(i[t], e), 1) : delete i[t]
  1123. }), this
  1124. }
  1125. },
  1126. emit: function (t, e) {
  1127. this.options.domEvents && ct(t, e);
  1128. var i = this.handlers[t] && this.handlers[t].slice();
  1129. if (i && i.length) {
  1130. e.type = t, e.preventDefault = function () {
  1131. e.srcEvent.preventDefault()
  1132. };
  1133. for (var n = 0; n < i.length;) i[n](e), n++
  1134. }
  1135. },
  1136. destroy: function () {
  1137. this.element && lt(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null
  1138. }
  1139. }, ut(at, {
  1140. INPUT_START: Mt,
  1141. INPUT_MOVE: Pt,
  1142. INPUT_END: Nt,
  1143. INPUT_CANCEL: It,
  1144. STATE_POSSIBLE: me,
  1145. STATE_BEGAN: fe,
  1146. STATE_CHANGED: ve,
  1147. STATE_ENDED: ge,
  1148. STATE_RECOGNIZED: ye,
  1149. STATE_CANCELLED: we,
  1150. STATE_FAILED: be,
  1151. DIRECTION_NONE: Ot,
  1152. DIRECTION_LEFT: Lt,
  1153. DIRECTION_RIGHT: _t,
  1154. DIRECTION_UP: zt,
  1155. DIRECTION_DOWN: Rt,
  1156. DIRECTION_HORIZONTAL: qt,
  1157. DIRECTION_VERTICAL: Wt,
  1158. DIRECTION_ALL: Ht,
  1159. Manager: rt,
  1160. Input: x,
  1161. TouchAction: X,
  1162. TouchInput: q,
  1163. MouseInput: L,
  1164. PointerEventInput: _,
  1165. TouchMouseInput: H,
  1166. SingleTouchInput: z,
  1167. Recognizer: Z,
  1168. AttrRecognizer: Q,
  1169. Tap: ot,
  1170. Pan: tt,
  1171. Swipe: st,
  1172. Pinch: et,
  1173. Rotate: nt,
  1174. Press: it,
  1175. on: h,
  1176. off: d,
  1177. each: o,
  1178. merge: bt,
  1179. extend: wt,
  1180. assign: ut,
  1181. inherit: r,
  1182. bindFn: l,
  1183. prefixed: w
  1184. }),
  1185. function (t, e) {
  1186. function i(i, n) {
  1187. var s = t(i);
  1188. s.data("hammer") || s.data("hammer", new e(s[0], n))
  1189. }
  1190. t.fn.hammer = function (t) {
  1191. return this.each(function () {
  1192. i(this, t)
  1193. })
  1194. }, e.Manager.prototype.emit = function (e) {
  1195. return function (i, n) {
  1196. e.call(this, i, n), t(this.element).trigger({
  1197. type: i,
  1198. gesture: n
  1199. })
  1200. }
  1201. }(e.Manager.prototype.emit)
  1202. }(ht, at), t.exports = dt.Hammer = at
  1203. }, function (t, e, i) {
  1204. "use strict";
  1205. function n() {
  1206. window.removeEventListener("load", n, !1), c = !0
  1207. }
  1208. function s(t) {
  1209. return u = u || new s.Class(t)
  1210. }
  1211. function o(t, e) {
  1212. for (var i in e) t[i] = e[i];
  1213. return t
  1214. }
  1215. function a() {
  1216. "#ath" == document.location.hash && history.replaceState("", window.document.title, document.location.href.split("#")[0]), h.test(document.location.href) && history.replaceState("", window.document.title, document.location.href.replace(h, "$1")), d.test(document.location.search) && history.replaceState("", window.document.title, document.location.href.replace(d, "$2"))
  1217. }
  1218. var r = i(2),
  1219. l = "addEventListener" in window,
  1220. c = !1;
  1221. "complete" === document.readyState ? c = !0 : l && window.addEventListener("load", n, !1);
  1222. var u, h = /\/ath(\/)?$/,
  1223. d = /([\?&]ath=[^&]*$|&ath=[^&]*(&))/;
  1224. s.intl = {
  1225. en_us: {
  1226. ios: "To add this web app to the home screen: tap %icon and then <strong>Add to Home Screen</strong>.",
  1227. android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon <span class="ath-action-icon">icon</span>.</small>'
  1228. },
  1229. zh_cn: {
  1230. ios: "\u5982\u8981\u628a\u5e94\u7528\u7a0b\u5f0f\u52a0\u81f3\u4e3b\u5c4f\u5e55,\u8bf7\u70b9\u51fb%icon, \u7136\u540e<strong>\u52a0\u81f3\u4e3b\u5c4f\u5e55</strong>",
  1231. android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon <span class="ath-action-icon">icon</span>.</small>'
  1232. },
  1233. zh_tw: {
  1234. ios: "\u5982\u8981\u628a\u61c9\u7528\u7a0b\u5f0f\u52a0\u81f3\u4e3b\u5c4f\u5e55, \u8acb\u9ede\u64ca%icon, \u7136\u5f8c<strong>\u52a0\u81f3\u4e3b\u5c4f\u5e55</strong>.",
  1235. android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon <span class="ath-action-icon">icon</span>.</small>'
  1236. }
  1237. };
  1238. for (var p in s.intl) s.intl[p.substr(0, 2)] = s.intl[p];
  1239. s.defaults = {
  1240. appID: "org.cubiq.addtohome",
  1241. fontSize: 15,
  1242. debug: !1,
  1243. logging: !1,
  1244. modal: !1,
  1245. mandatory: !1,
  1246. autostart: !0,
  1247. skipFirstVisit: !1,
  1248. startDelay: 1,
  1249. lifespan: 15,
  1250. displayPace: 1440,
  1251. maxDisplayCount: 0,
  1252. icon: !0,
  1253. message: "",
  1254. validLocation: [],
  1255. onInit: null,
  1256. onShow: null,
  1257. onRemove: null,
  1258. onAdd: null,
  1259. onPrivate: null,
  1260. privateModeOverride: !1,
  1261. detectHomescreen: !1
  1262. };
  1263. var m = window.navigator.userAgent,
  1264. f = window.navigator;
  1265. o(s, {
  1266. hasToken: "#ath" == document.location.hash || h.test(document.location.href) || d.test(document.location.search),
  1267. isRetina: window.devicePixelRatio && window.devicePixelRatio > 1,
  1268. isIDevice: /iphone|ipod|ipad/i.test(m),
  1269. isMobileChrome: m.indexOf("Android") > -1 && /Chrome\/[.0-9]*/.test(m) && m.indexOf("Version") == -1,
  1270. isMobileIE: m.indexOf("Windows Phone") > -1,
  1271. language: f.language && f.language.toLowerCase().replace("-", "_") || ""
  1272. }), s.language = s.language && s.language in s.intl ? s.language : "en_us", s.isMobileSafari = s.isIDevice && m.indexOf("Safari") > -1 && m.indexOf("CriOS") < 0, s.OS = s.isIDevice ? "ios" : s.isMobileChrome ? "android" : s.isMobileIE ? "windows" : "unsupported", s.OSVersion = m.match(/(OS|Android) (\d+[_\.]\d+)/), s.OSVersion = s.OSVersion && s.OSVersion[2] ? +s.OSVersion[2].replace("_", ".") : 0, s.isStandalone = "standalone" in window.navigator && window.navigator.standalone, s.isTablet = s.isMobileSafari && m.indexOf("iPad") > -1 || s.isMobileChrome && m.indexOf("Mobile") < 0, s.isCompatible = s.isMobileSafari && s.OSVersion >= 6 || s.isMobileChrome;
  1273. var v = {
  1274. lastDisplayTime: 0,
  1275. returningVisitor: !1,
  1276. displayCount: 0,
  1277. optedout: !1,
  1278. added: !1
  1279. };
  1280. s.removeSession = function (t) {
  1281. try {
  1282. if (!localStorage) throw new Error("localStorage is not defined");
  1283. localStorage.removeItem(t || s.defaults.appID)
  1284. } catch (e) {}
  1285. }, s.doLog = function (t) {
  1286. this.options.logging && console.log(t)
  1287. }, s.Class = function (t) {
  1288. if (this.doLog = s.doLog, this.options = o({}, s.defaults), o(this.options, t), this.options.debug && (this.options.logging = !0), l) {
  1289. if (this.options.mandatory = this.options.mandatory && ("standalone" in window.navigator || this.options.debug), this.options.modal = this.options.modal || this.options.mandatory, this.options.mandatory && (this.options.startDelay = -.5), this.options.detectHomescreen = this.options.detectHomescreen === !0 ? "hash" : this.options.detectHomescreen, this.options.debug && (s.isCompatible = !0, s.OS = "string" == typeof this.options.debug ? this.options.debug : "unsupported" == s.OS ? "android" : s.OS, s.OSVersion = "ios" == s.OS ? "8" : "4"), this.container = document.documentElement, this.session = this.getItem(this.options.appID), this.session = this.session ? JSON.parse(this.session) : void 0, !s.hasToken || s.isCompatible && this.session || (s.hasToken = !1, a()), !s.isCompatible) return void this.doLog("Add to homescreen: not displaying callout because device not supported");
  1290. this.session = this.session || v;
  1291. try {
  1292. if (!localStorage) throw new Error("localStorage is not defined");
  1293. localStorage.setItem(this.options.appID, JSON.stringify(this.session)), s.hasLocalStorage = !0
  1294. } catch (e) {
  1295. s.hasLocalStorage = !1, this.options.onPrivate && this.options.onPrivate.call(this)
  1296. }
  1297. for (var i = !this.options.validLocation.length, n = this.options.validLocation.length; n--;)
  1298. if (this.options.validLocation[n].test(document.location.href)) {
  1299. i = !0;
  1300. break
  1301. } if (this.getItem("addToHome") && this.optOut(), this.session.optedout) return void this.doLog("Add to homescreen: not displaying callout because user opted out");
  1302. if (this.session.added) return void this.doLog("Add to homescreen: not displaying callout because already added to the homescreen");
  1303. if (!i) return void this.doLog("Add to homescreen: not displaying callout because not a valid location");
  1304. if (s.isStandalone) return this.session.added || (this.session.added = !0, this.updateSession(), this.options.onAdd && s.hasLocalStorage && this.options.onAdd.call(this)), void this.doLog("Add to homescreen: not displaying callout because in standalone mode");
  1305. if (this.options.detectHomescreen) {
  1306. if (s.hasToken) return a(), this.session.added || (this.session.added = !0, this.updateSession(), this.options.onAdd && s.hasLocalStorage && this.options.onAdd.call(this)), void this.doLog("Add to homescreen: not displaying callout because URL has token, so we are likely coming from homescreen");
  1307. "hash" == this.options.detectHomescreen ? history.replaceState("", window.document.title, document.location.href + "#ath") : "smartURL" == this.options.detectHomescreen ? history.replaceState("", window.document.title, document.location.href.replace(/(\/)?$/, "/ath$1")) : history.replaceState("", window.document.title, document.location.href + (document.location.search ? "&" : "?") + "ath=")
  1308. }
  1309. if (!this.session.returningVisitor && (this.session.returningVisitor = !0, this.updateSession(), this.options.skipFirstVisit)) return void this.doLog("Add to homescreen: not displaying callout because skipping first visit");
  1310. if (!this.options.privateModeOverride && !s.hasLocalStorage) return void this.doLog("Add to homescreen: not displaying callout because browser is in private mode");
  1311. this.ready = !0, this.options.onInit && this.options.onInit.call(this), this.options.autostart && (this.doLog("Add to homescreen: autostart displaying callout"), this.show())
  1312. }
  1313. }, s.Class.prototype = {
  1314. events: {
  1315. load: "_delayedShow",
  1316. error: "_delayedShow",
  1317. orientationchange: "resize",
  1318. resize: "resize",
  1319. scroll: "resize",
  1320. click: "remove",
  1321. touchmove: "_preventDefault",
  1322. transitionend: "_removeElements",
  1323. webkitTransitionEnd: "_removeElements",
  1324. MSTransitionEnd: "_removeElements"
  1325. },
  1326. handleEvent: function (t) {
  1327. var e = this.events[t.type];
  1328. e && this[e](t)
  1329. },
  1330. show: function (t) {
  1331. if (this.options.autostart && !c) return void setTimeout(this.show.bind(this), 50);
  1332. if (this.shown) return void this.doLog("Add to homescreen: not displaying callout because already shown on screen");
  1333. var e = Date.now(),
  1334. i = this.session.lastDisplayTime;
  1335. if (t !== !0) {
  1336. if (!this.ready) return void this.doLog("Add to homescreen: not displaying callout because not ready");
  1337. if (e - i < 6e4 * this.options.displayPace) return void this.doLog("Add to homescreen: not displaying callout because displayed recently");
  1338. if (this.options.maxDisplayCount && this.session.displayCount >= this.options.maxDisplayCount) return void this.doLog("Add to homescreen: not displaying callout because displayed too many times already")
  1339. }
  1340. this.shown = !0, this.session.lastDisplayTime = e, this.session.displayCount++, this.updateSession(), this.applicationIcon || ("ios" == s.OS ? this.applicationIcon = document.querySelector('head link[rel^=apple-touch-icon][sizes="152x152"],head link[rel^=apple-touch-icon][sizes="144x144"],head link[rel^=apple-touch-icon][sizes="120x120"],head link[rel^=apple-touch-icon][sizes="114x114"],head link[rel^=apple-touch-icon]') : this.applicationIcon = document.querySelector('head link[rel^="shortcut icon"][sizes="196x196"],head link[rel^=apple-touch-icon]'));
  1341. var n = "";
  1342. "object" == typeof this.options.message && s.language in this.options.message ? n = this.options.message[s.language][s.OS] : "object" == typeof this.options.message && s.OS in this.options.message ? n = this.options.message[s.OS] : this.options.message in s.intl ? n = s.intl[this.options.message][s.OS] : "" !== this.options.message ? n = this.options.message : s.OS in s.intl[s.language] && (n = s.intl[s.language][s.OS]), n = "<p>" + n.replace("%icon", '<span class="ath-action-icon">icon</span>') + "</p>", this.viewport = document.createElement("div"), this.viewport.className = "ath-viewport", this.options.modal && (this.viewport.className += " ath-modal"), this.options.mandatory && (this.viewport.className += " ath-mandatory"), this.viewport.style.position = "absolute", this.element = document.createElement("div"), this.element.className = "ath-container ath-" + s.OS + " ath-" + s.OS + (s.OSVersion + "").substr(0, 1) + " ath-" + (s.isTablet ? "tablet" : "phone"), this.element.style.cssText = "-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0s;-webkit-transition-timing-function:ease-out;transition-property:transform,opacity;transition-duration:0s;transition-timing-function:ease-out;", this.element.style.webkitTransform = "translate3d(0,-" + window.innerHeight + "px,0)", this.element.style.transform = "translate3d(0,-" + window.innerHeight + "px,0)", this.options.icon && this.applicationIcon && (this.element.className += " ath-icon", this.img = document.createElement("img"), this.img.className = "ath-application-icon", this.img.addEventListener("load", this, !1), this.img.addEventListener("error", this, !1), this.img.src = this.applicationIcon.href, this.element.appendChild(this.img)), this.element.innerHTML += n, this.viewport.style.left = "-99999em", this.viewport.appendChild(this.element), this.container.appendChild(this.viewport), this.img ? this.doLog("Add to homescreen: not displaying callout because waiting for img to load") : this._delayedShow()
  1343. },
  1344. _delayedShow: function (t) {
  1345. setTimeout(this._show.bind(this), 1e3 * this.options.startDelay + 500)
  1346. },
  1347. _show: function () {
  1348. var t = this;
  1349. this.updateViewport(), window.addEventListener("resize", this, !1), window.addEventListener("scroll", this, !1), window.addEventListener("orientationchange", this, !1), this.options.modal && document.addEventListener("touchmove", this, !0), this.options.mandatory || setTimeout(function () {
  1350. t.element.addEventListener("click", t, !0)
  1351. }, 1e3), setTimeout(function () {
  1352. t.element.style.webkitTransitionDuration = "1.2s", t.element.style.transitionDuration = "1.2s", t.element.style.webkitTransform = "translate3d(0,0,0)", t.element.style.transform = "translate3d(0,0,0)"
  1353. }, 0), this.options.lifespan && (this.removeTimer = setTimeout(this.remove.bind(this), 1e3 * this.options.lifespan)), this.options.onShow && this.options.onShow.call(this)
  1354. },
  1355. remove: function () {
  1356. clearTimeout(this.removeTimer), this.img && (this.img.removeEventListener("load", this, !1), this.img.removeEventListener("error", this, !1)), window.removeEventListener("resize", this, !1), window.removeEventListener("scroll", this, !1), window.removeEventListener("orientationchange", this, !1), document.removeEventListener("touchmove", this, !0), this.element.removeEventListener("click", this, !0), this.element.addEventListener("transitionend", this, !1), this.element.addEventListener("webkitTransitionEnd", this, !1), this.element.addEventListener("MSTransitionEnd", this, !1), this.element.style.webkitTransitionDuration = "0.3s", this.element.style.opacity = "0"
  1357. },
  1358. _removeElements: function () {
  1359. this.element.removeEventListener("transitionend", this, !1), this.element.removeEventListener("webkitTransitionEnd", this, !1), this.element.removeEventListener("MSTransitionEnd", this, !1), this.container.removeChild(this.viewport), this.shown = !1, this.options.onRemove && this.options.onRemove.call(this)
  1360. },
  1361. updateViewport: function () {
  1362. if (this.shown) {
  1363. this.viewport.style.width = window.innerWidth + "px", this.viewport.style.height = window.innerHeight + "px", this.viewport.style.left = window.scrollX + "px", this.viewport.style.top = window.scrollY + "px";
  1364. var t = document.documentElement.clientWidth;
  1365. this.orientation = t > document.documentElement.clientHeight ? "landscape" : "portrait";
  1366. var e = "ios" == s.OS ? "portrait" == this.orientation ? screen.width : screen.height : screen.width;
  1367. this.scale = screen.width > t ? 1 : e / window.innerWidth, this.element.style.fontSize = this.options.fontSize / this.scale + "px"
  1368. }
  1369. },
  1370. resize: function () {
  1371. clearTimeout(this.resizeTimer), this.resizeTimer = setTimeout(this.updateViewport.bind(this), 100)
  1372. },
  1373. updateSession: function () {
  1374. s.hasLocalStorage !== !1 && localStorage && localStorage.setItem(this.options.appID, JSON.stringify(this.session))
  1375. },
  1376. clearSession: function () {
  1377. this.session = v, this.updateSession()
  1378. },
  1379. getItem: function (t) {
  1380. try {
  1381. if (!localStorage) throw new Error("localStorage is not defined");
  1382. return localStorage.getItem(t)
  1383. } catch (e) {
  1384. s.hasLocalStorage = !1
  1385. }
  1386. },
  1387. optOut: function () {
  1388. this.session.optedout = !0, this.updateSession()
  1389. },
  1390. optIn: function () {
  1391. this.session.optedout = !1, this.updateSession()
  1392. },
  1393. clearDisplayCount: function () {
  1394. this.session.displayCount = 0, this.updateSession()
  1395. },
  1396. _preventDefault: function (t) {
  1397. t.preventDefault(), t.stopPropagation()
  1398. }
  1399. }, s.VERSION = "3.2.2", t.exports = r.addToHomescreen = s
  1400. }, function (t, e, i) {
  1401. "use strict";
  1402. var n = i(1),
  1403. s = i(2),
  1404. o = function (t, e) {
  1405. var i = this;
  1406. this.options = n.extend({}, o.DEFAULTS, e), this.$element = n(t), this.$element.addClass("am-fade am-in").on("click.alert.amui", ".am-close", function () {
  1407. i.close()
  1408. })
  1409. };
  1410. o.DEFAULTS = {
  1411. removeElement: !0
  1412. }, o.prototype.close = function () {
  1413. function t() {
  1414. e.trigger("closed.alert.amui").remove()
  1415. }
  1416. var e = this.$element;
  1417. e.trigger("close.alert.amui").removeClass("am-in"), s.support.transition && e.hasClass("am-fade") ? e.one(s.support.transition.end, t).emulateTransitionEnd(200) : t()
  1418. }, s.plugin("alert", o), n(document).on("click.alert.amui.data-api", "[data-am-alert]", function (t) {
  1419. var e = n(t.target);
  1420. e.is(".am-close") && n(this).alert("close")
  1421. }), t.exports = o
  1422. }, function (t, e, i) {
  1423. "use strict";
  1424. var n = i(1),
  1425. s = i(2),
  1426. o = function (t, e) {
  1427. this.$element = n(t), this.options = n.extend({}, o.DEFAULTS, e), this.isLoading = !1, this.hasSpinner = !1
  1428. };
  1429. o.DEFAULTS = {
  1430. loadingText: "loading...",
  1431. disabledClassName: "am-disabled",
  1432. activeClassName: "am-active",
  1433. spinner: void 0
  1434. }, o.prototype.setState = function (t, e) {
  1435. var i = this.$element,
  1436. o = "disabled",
  1437. a = i.data(),
  1438. r = this.options,
  1439. l = i.is("input") ? "val" : "html",
  1440. c = "am-btn-" + t + " " + r.disabledClassName;
  1441. t += "Text", r.resetText || (r.resetText = i[l]()), s.support.animation && r.spinner && "html" === l && !this.hasSpinner && (r.loadingText = '<span class="am-icon-' + r.spinner + ' am-icon-spin"></span>' + r.loadingText, this.hasSpinner = !0), e = e || (void 0 === a[t] ? r[t] : a[t]), i[l](e), setTimeout(n.proxy(function () {
  1442. "loadingText" === t ? (i.addClass(c).attr(o, o), this.isLoading = !0) : this.isLoading && (i.removeClass(c).removeAttr(o), this.isLoading = !1)
  1443. }, this), 0)
  1444. }, o.prototype.toggle = function () {
  1445. var t = !0,
  1446. e = this.$element,
  1447. i = this.$element.parent('[class*="am-btn-group"]'),
  1448. n = o.DEFAULTS.activeClassName;
  1449. if (i.length) {
  1450. var s = this.$element.find("input");
  1451. "radio" == s.prop("type") && (s.prop("checked") && e.hasClass(n) ? t = !1 : i.find("." + n).removeClass(n)), t && s.prop("checked", !e.hasClass(n)).trigger("change")
  1452. }
  1453. t && (e.toggleClass(n), e.hasClass(n) || e.blur())
  1454. }, s.plugin("button", o, {
  1455. dataOptions: "data-am-loading",
  1456. methodCall: function (t, e) {
  1457. "toggle" === t[0] ? e.toggle() : "string" == typeof t[0] && e.setState.apply(e, t)
  1458. }
  1459. }), n(document).on("click.button.amui.data-api", "[data-am-button]", function (t) {
  1460. t.preventDefault();
  1461. var e = n(t.target);
  1462. e.hasClass("am-btn") || (e = e.closest(".am-btn")), e.button("toggle")
  1463. }), s.ready(function (t) {
  1464. n("[data-am-loading]", t).button(), n("[data-am-button]", t).find("input:checked").each(function () {
  1465. n(this).parent("label").addClass(o.DEFAULTS.activeClassName)
  1466. })
  1467. }), t.exports = s.button = o
  1468. }, function (t, e, i) {
  1469. "use strict";
  1470. function n(t) {
  1471. return this.each(function () {
  1472. var e = s(this),
  1473. i = e.data("amui.collapse"),
  1474. n = s.extend({}, a.DEFAULTS, o.utils.options(e.attr("data-am-collapse")), "object" == typeof t && t);
  1475. !i && n.toggle && "open" === t && (t = !t), i || e.data("amui.collapse", i = new a(this, n)), "string" == typeof t && i[t]()
  1476. })
  1477. }
  1478. var s = i(1),
  1479. o = i(2),
  1480. a = function (t, e) {
  1481. this.$element = s(t), this.options = s.extend({}, a.DEFAULTS, e), this.transitioning = null, this.options.parent && (this.$parent = s(this.options.parent)), this.options.toggle && this.toggle()
  1482. };
  1483. a.DEFAULTS = {
  1484. toggle: !0
  1485. }, a.prototype.open = function () {
  1486. if (!this.transitioning && !this.$element.hasClass("am-in")) {
  1487. var t = s.Event("open.collapse.amui");
  1488. if (this.$element.trigger(t), !t.isDefaultPrevented()) {
  1489. var e = this.$parent && this.$parent.find("> .am-panel > .am-in");
  1490. if (e && e.length) {
  1491. var i = e.data("amui.collapse");
  1492. if (i && i.transitioning) return;
  1493. n.call(e, "close"), i || e.data("amui.collapse", null)
  1494. }
  1495. this.$element.removeClass("am-collapse").addClass("am-collapsing").height(0), this.transitioning = 1;
  1496. var a = function () {
  1497. this.$element.removeClass("am-collapsing").addClass("am-collapse am-in").height("").trigger("opened.collapse.amui"), this.transitioning = 0
  1498. };
  1499. if (!o.support.transition) return a.call(this);
  1500. var r = this.$element[0].scrollHeight;
  1501. this.$element.one(o.support.transition.end, s.proxy(a, this)).emulateTransitionEnd(300).css({
  1502. height: r
  1503. })
  1504. }
  1505. }
  1506. }, a.prototype.close = function () {
  1507. if (!this.transitioning && this.$element.hasClass("am-in")) {
  1508. var t = s.Event("close.collapse.amui");
  1509. if (this.$element.trigger(t), !t.isDefaultPrevented()) {
  1510. this.$element.height(this.$element.height()).redraw(), this.$element.addClass("am-collapsing").removeClass("am-collapse am-in"), this.transitioning = 1;
  1511. var e = function () {
  1512. this.transitioning = 0, this.$element.trigger("closed.collapse.amui").removeClass("am-collapsing").addClass("am-collapse")
  1513. };
  1514. return o.support.transition ? void this.$element.height(0).one(o.support.transition.end, s.proxy(e, this)).emulateTransitionEnd(300) : e.call(this)
  1515. }
  1516. }
  1517. }, a.prototype.toggle = function () {
  1518. this[this.$element.hasClass("am-in") ? "close" : "open"]()
  1519. }, s.fn.collapse = n, s(document).on("click.collapse.amui.data-api", "[data-am-collapse]", function (t) {
  1520. var e, i = s(this),
  1521. a = o.utils.options(i.attr("data-am-collapse")),
  1522. r = a.target || t.preventDefault() || (e = i.attr("href")) && e.replace(/.*(?=#[^\s]+$)/, ""),
  1523. l = s(r),
  1524. c = l.data("amui.collapse"),
  1525. u = c ? "toggle" : a,
  1526. h = a.parent,
  1527. d = h && s(h);
  1528. c && c.transitioning || (d && d.find("[data-am-collapse]").not(i).addClass("am-collapsed"), i[l.hasClass("am-in") ? "addClass" : "removeClass"]("am-collapsed")), n.call(l, u)
  1529. }), t.exports = o.collapse = a
  1530. }, function (t, e, i) {
  1531. "use strict";
  1532. var n = i(1),
  1533. s = i(2),
  1534. o = n(document),
  1535. a = function (t, e) {
  1536. if (this.$element = n(t), this.options = n.extend({}, a.DEFAULTS, e), this.format = r.parseFormat(this.options.format), this.$element.data("date", this.options.date), this.language = this.getLocale(this.options.locale), this.theme = this.options.theme, this.$picker = n(r.template).appendTo("body").on({
  1537. click: n.proxy(this.click, this)
  1538. }), this.isInput = this.$element.is("input"), this.component = !!this.$element.is(".am-datepicker-date") && this.$element.find(".am-datepicker-add-on"), this.isInput ? this.$element.on({
  1539. "click.datepicker.amui": n.proxy(this.open, this),
  1540. "keyup.datepicker.amui": n.proxy(this.update, this)
  1541. }) : this.component ? this.component.on("click.datepicker.amui", n.proxy(this.open, this)) : this.$element.on("click.datepicker.amui", n.proxy(this.open, this)), this.minViewMode = this.options.minViewMode, "string" == typeof this.minViewMode) switch (this.minViewMode) {
  1542. case "months":
  1543. this.minViewMode = 1;
  1544. break;
  1545. case "years":
  1546. this.minViewMode = 2;
  1547. break;
  1548. default:
  1549. this.minViewMode = 0
  1550. }
  1551. if (this.viewMode = this.options.viewMode, "string" == typeof this.viewMode) switch (this.viewMode) {
  1552. case "months":
  1553. this.viewMode = 1;
  1554. break;
  1555. case "years":
  1556. this.viewMode = 2;
  1557. break;
  1558. default:
  1559. this.viewMode = 0
  1560. }
  1561. this.startViewMode = this.viewMode, this.weekStart = (this.options.weekStart || a.locales[this.language].weekStart || 0) % 7, this.weekEnd = (this.weekStart + 6) % 7, this.onRender = this.options.onRender, this.setTheme(), this.fillDow(), this.fillMonths(), this.update(), this.showMode()
  1562. };
  1563. a.DEFAULTS = {
  1564. locale: "zh_CN",
  1565. format: "yyyy-mm-dd",
  1566. weekStart: void 0,
  1567. viewMode: 0,
  1568. minViewMode: 0,
  1569. date: "",
  1570. theme: "",
  1571. autoClose: 1,
  1572. onRender: function (t) {
  1573. return ""
  1574. }
  1575. }, a.prototype.open = function (t) {
  1576. this.$picker.show(), this.height = this.component ? this.component.outerHeight() : this.$element.outerHeight(), this.place(), n(window).on("resize.datepicker.amui", n.proxy(this.place, this)), t && (t.stopPropagation(), t.preventDefault());
  1577. var e = this;
  1578. o.on("mousedown.datapicker.amui touchstart.datepicker.amui", function (t) {
  1579. 0 === n(t.target).closest(".am-datepicker").length && e.close()
  1580. }), this.$element.trigger({
  1581. type: "open.datepicker.amui",
  1582. date: this.date
  1583. })
  1584. }, a.prototype.close = function () {
  1585. this.$picker.hide(), n(window).off("resize.datepicker.amui", this.place), this.viewMode = this.startViewMode, this.showMode(), this.isInput || n(document).off("mousedown.datapicker.amui touchstart.datepicker.amui", this.close), this.$element.trigger({
  1586. type: "close.datepicker.amui",
  1587. date: this.date
  1588. })
  1589. }, a.prototype.set = function () {
  1590. var t, e = r.formatDate(this.date, this.format);
  1591. this.isInput ? t = this.$element.attr("value", e) : (this.component && (t = this.$element.find("input").attr("value", e)), this.$element.data("date", e)), t && t.trigger("change")
  1592. }, a.prototype.setValue = function (t) {
  1593. "string" == typeof t ? this.date = r.parseDate(t, this.format) : this.date = new Date(t), this.set(), this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0), this.fill()
  1594. }, a.prototype.place = function () {
  1595. var t = this.component ? this.component.offset() : this.$element.offset(),
  1596. e = this.component ? this.component.width() : this.$element.width(),
  1597. i = t.top + this.height,
  1598. n = t.left,
  1599. s = o.width() - t.left - e,
  1600. a = this.isOutView();
  1601. if (this.$picker.removeClass("am-datepicker-right"), this.$picker.removeClass("am-datepicker-up"), o.width() > 640) {
  1602. if (a.outRight) return this.$picker.addClass("am-datepicker-right"), void this.$picker.css({
  1603. top: i,
  1604. left: "auto",
  1605. right: s
  1606. });
  1607. a.outBottom && (this.$picker.addClass("am-datepicker-up"), i = t.top - this.$picker.outerHeight(!0))
  1608. } else n = 0;
  1609. this.$picker.css({
  1610. top: i,
  1611. left: n
  1612. })
  1613. }, a.prototype.update = function (t) {
  1614. this.date = r.parseDate("string" == typeof t ? t : this.isInput ? this.$element.prop("value") : this.$element.data("date"), this.format), this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0), this.fill()
  1615. }, a.prototype.fillDow = function () {
  1616. for (var t = this.weekStart, e = "<tr>"; t < this.weekStart + 7;) e += '<th class="am-datepicker-dow">' + a.locales[this.language].daysMin[t++ % 7] + "</th>";
  1617. e += "</tr>", this.$picker.find(".am-datepicker-days thead").append(e)
  1618. }, a.prototype.fillMonths = function () {
  1619. for (var t = "", e = 0; e < 12;) t += '<span class="am-datepicker-month">' + a.locales[this.language].monthsShort[e++] + "</span>";
  1620. this.$picker.find(".am-datepicker-months td").append(t)
  1621. }, a.prototype.fill = function () {
  1622. var t = new Date(this.viewDate),
  1623. e = t.getFullYear(),
  1624. i = t.getMonth(),
  1625. n = this.date.valueOf(),
  1626. s = new Date(e, i - 1, 28, 0, 0, 0, 0),
  1627. o = r.getDaysInMonth(s.getFullYear(), s.getMonth()),
  1628. l = this.$picker.find(".am-datepicker-days .am-datepicker-select");
  1629. "zh_CN" === this.language ? l.text(e + a.locales[this.language].year[0] + " " + a.locales[this.language].months[i]) : l.text(a.locales[this.language].months[i] + " " + e), s.setDate(o), s.setDate(o - (s.getDay() - this.weekStart + 7) % 7);
  1630. var c = new Date(s);
  1631. c.setDate(c.getDate() + 42), c = c.valueOf();
  1632. for (var u, h, d, p = []; s.valueOf() < c;) s.getDay() === this.weekStart && p.push("<tr>"), u = this.onRender(s, 0), h = s.getFullYear(), d = s.getMonth(), d < i && h === e || h < e ? u += " am-datepicker-old" : (d > i && h === e || h > e) && (u += " am-datepicker-new"), s.valueOf() === n && (u += " am-active"), p.push('<td class="am-datepicker-day ' + u + '">' + s.getDate() + "</td>"), s.getDay() === this.weekEnd && p.push("</tr>"), s.setDate(s.getDate() + 1);
  1633. this.$picker.find(".am-datepicker-days tbody").empty().append(p.join(""));
  1634. var m = this.date.getFullYear(),
  1635. f = this.$picker.find(".am-datepicker-months").find(".am-datepicker-select").text(e);
  1636. f = f.end().find("span").removeClass("am-active").removeClass("am-disabled");
  1637. for (var v = 0; v < 12;) this.onRender(t.setFullYear(e, v), 1) && f.eq(v).addClass("am-disabled"), v++;
  1638. m === e && f.eq(this.date.getMonth()).removeClass("am-disabled").addClass("am-active"), p = "", e = 10 * parseInt(e / 10, 10);
  1639. var g, y = this.$picker.find(".am-datepicker-years").find(".am-datepicker-select").text(e + "-" + (e + 9)).end().find("td"),
  1640. w = new Date(this.viewDate);
  1641. e -= 1;
  1642. for (var b = -1; b < 11; b++) g = this.onRender(w.setFullYear(e), 2), p += '<span class="' + g + (b === -1 || 10 === b ? " am-datepicker-old" : "") + (m === e ? " am-active" : "") + '">' + e + "</span>", e += 1;
  1643. y.html(p)
  1644. }, a.prototype.click = function (t) {
  1645. t.stopPropagation(), t.preventDefault();
  1646. var e, i, s = this.$picker.find(".am-datepicker-days").find(".am-active"),
  1647. o = this.$picker.find(".am-datepicker-months"),
  1648. a = o.find(".am-active").index(),
  1649. l = n(t.target).closest("span, td, th");
  1650. if (1 === l.length) switch (l[0].nodeName.toLowerCase()) {
  1651. case "th":
  1652. switch (l[0].className) {
  1653. case "am-datepicker-switch":
  1654. this.showMode(1);
  1655. break;
  1656. case "am-datepicker-prev":
  1657. case "am-datepicker-next":
  1658. this.viewDate["set" + r.modes[this.viewMode].navFnc].call(this.viewDate, this.viewDate["get" + r.modes[this.viewMode].navFnc].call(this.viewDate) + r.modes[this.viewMode].navStep * ("am-datepicker-prev" === l[0].className ? -1 : 1)), this.fill(), this.set()
  1659. }
  1660. break;
  1661. case "span":
  1662. if (l.is(".am-disabled")) return;
  1663. l.is(".am-datepicker-month") ? (e = l.parent().find("span").index(l), l.is(".am-active") ? this.viewDate.setMonth(e, s.text()) : this.viewDate.setMonth(e)) : (i = parseInt(l.text(), 10) || 0, l.is(".am-active") ? this.viewDate.setFullYear(i, a, s.text()) : this.viewDate.setFullYear(i)), 0 !== this.viewMode && (this.date = new Date(this.viewDate), this.$element.trigger({
  1664. type: "changeDate.datepicker.amui",
  1665. date: this.date,
  1666. viewMode: r.modes[this.viewMode].clsName
  1667. })), this.showMode(-1), this.fill(), this.set();
  1668. break;
  1669. case "td":
  1670. if (l.is(".am-datepicker-day") && !l.is(".am-disabled")) {
  1671. var c = parseInt(l.text(), 10) || 1;
  1672. e = this.viewDate.getMonth(), l.is(".am-datepicker-old") ? e -= 1 : l.is(".am-datepicker-new") && (e += 1), i = this.viewDate.getFullYear(), this.date = new Date(i, e, c, 0, 0, 0, 0), this.viewDate = new Date(i, e, Math.min(28, c), 0, 0, 0, 0), this.fill(), this.set(), this.$element.trigger({
  1673. type: "changeDate.datepicker.amui",
  1674. date: this.date,
  1675. viewMode: r.modes[this.viewMode].clsName
  1676. }), this.options.autoClose && this.close()
  1677. }
  1678. }
  1679. }, a.prototype.mousedown = function (t) {
  1680. t.stopPropagation(), t.preventDefault()
  1681. }, a.prototype.showMode = function (t) {
  1682. t && (this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + t))), this.$picker.find(">div").hide().filter(".am-datepicker-" + r.modes[this.viewMode].clsName).show()
  1683. }, a.prototype.isOutView = function () {
  1684. var t = this.component ? this.component.offset() : this.$element.offset(),
  1685. e = {
  1686. outRight: !1,
  1687. outBottom: !1
  1688. },
  1689. i = this.$picker,
  1690. n = t.left + i.outerWidth(!0),
  1691. s = t.top + i.outerHeight(!0) + this.$element.innerHeight();
  1692. return n > o.width() && (e.outRight = !0), s > o.height() && (e.outBottom = !0), e
  1693. }, a.prototype.getLocale = function (t) {
  1694. return t || (t = navigator.language && navigator.language.split("-"), t[1] = t[1].toUpperCase(), t = t.join("_")), a.locales[t] || (t = "en_US"), t
  1695. }, a.prototype.setTheme = function () {
  1696. this.theme && this.$picker.addClass("am-datepicker-" + this.theme)
  1697. }, a.locales = {
  1698. en_US: {
  1699. days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  1700. daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  1701. daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  1702. months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  1703. monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  1704. weekStart: 0
  1705. },
  1706. zh_CN: {
  1707. days: ["\u661f\u671f\u65e5", "\u661f\u671f\u4e00", "\u661f\u671f\u4e8c", "\u661f\u671f\u4e09", "\u661f\u671f\u56db", "\u661f\u671f\u4e94", "\u661f\u671f\u516d"],
  1708. daysShort: ["\u5468\u65e5", "\u5468\u4e00", "\u5468\u4e8c", "\u5468\u4e09", "\u5468\u56db", "\u5468\u4e94", "\u5468\u516d"],
  1709. daysMin: ["\u65e5", "\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d"],
  1710. months: ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708", "\u4e03\u6708", "\u516b\u6708", "\u4e5d\u6708", "\u5341\u6708", "\u5341\u4e00\u6708", "\u5341\u4e8c\u6708"],
  1711. monthsShort: ["\u4e00\u6708", "\u4e8c\u6708", "\u4e09\u6708", "\u56db\u6708", "\u4e94\u6708", "\u516d\u6708", "\u4e03\u6708", "\u516b\u6708", "\u4e5d\u6708", "\u5341\u6708", "\u5341\u4e00\u6708", "\u5341\u4e8c\u6708"],
  1712. weekStart: 1,
  1713. year: ["\u5e74"]
  1714. }
  1715. };
  1716. var r = {
  1717. modes: [{
  1718. clsName: "days",
  1719. navFnc: "Month",
  1720. navStep: 1
  1721. }, {
  1722. clsName: "months",
  1723. navFnc: "FullYear",
  1724. navStep: 1
  1725. }, {
  1726. clsName: "years",
  1727. navFnc: "FullYear",
  1728. navStep: 10
  1729. }],
  1730. isLeapYear: function (t) {
  1731. return t % 4 === 0 && t % 100 !== 0 || t % 400 === 0
  1732. },
  1733. getDaysInMonth: function (t, e) {
  1734. return [31, r.isLeapYear(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][e]
  1735. },
  1736. parseFormat: function (t) {
  1737. var e = t.match(/[.\/\-\s].*?/),
  1738. i = t.split(/\W+/);
  1739. if (!e || !i || 0 === i.length) throw new Error("Invalid date format.");
  1740. return {
  1741. separator: e,
  1742. parts: i
  1743. }
  1744. },
  1745. parseDate: function (t, e) {
  1746. var i, n = t.split(e.separator);
  1747. if (t = new Date, t.setHours(0), t.setMinutes(0), t.setSeconds(0), t.setMilliseconds(0), n.length === e.parts.length) {
  1748. for (var s = t.getFullYear(), o = t.getDate(), a = t.getMonth(), r = 0, l = e.parts.length; r < l; r++) switch (i = parseInt(n[r], 10) || 1, e.parts[r]) {
  1749. case "dd":
  1750. case "d":
  1751. o = i, t.setDate(i);
  1752. break;
  1753. case "mm":
  1754. case "m":
  1755. a = i - 1, t.setMonth(i - 1);
  1756. break;
  1757. case "yy":
  1758. s = 2e3 + i, t.setFullYear(2e3 + i);
  1759. break;
  1760. case "yyyy":
  1761. s = i, t.setFullYear(i)
  1762. }
  1763. t = new Date(s, a, o, 0, 0, 0)
  1764. }
  1765. return t
  1766. },
  1767. formatDate: function (t, e) {
  1768. var i = {
  1769. d: t.getDate(),
  1770. m: t.getMonth() + 1,
  1771. yy: t.getFullYear().toString().substring(2),
  1772. yyyy: t.getFullYear()
  1773. },
  1774. n = [];
  1775. i.dd = (i.d < 10 ? "0" : "") + i.d, i.mm = (i.m < 10 ? "0" : "") + i.m;
  1776. for (var s = 0, o = e.parts.length; s < o; s++) n.push(i[e.parts[s]]);
  1777. return n.join(e.separator)
  1778. },
  1779. headTemplate: '<thead><tr class="am-datepicker-header"><th class="am-datepicker-prev"><i class="am-datepicker-prev-icon"></i></th><th colspan="5" class="am-datepicker-switch"><div class="am-datepicker-select"></div></th><th class="am-datepicker-next"><i class="am-datepicker-next-icon"></i></th></tr></thead>',
  1780. contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
  1781. };
  1782. r.template = '<div class="am-datepicker am-datepicker-dropdown"><div class="am-datepicker-caret"></div><div class="am-datepicker-days"><table class="am-datepicker-table">' + r.headTemplate + '<tbody></tbody></table></div><div class="am-datepicker-months"><table class="am-datepicker-table">' + r.headTemplate + r.contTemplate + '</table></div><div class="am-datepicker-years"><table class="am-datepicker-table">' + r.headTemplate + r.contTemplate + "</table></div></div>", s.plugin("datepicker", a), s.ready(function (t) {
  1783. n("[data-am-datepicker]").datepicker()
  1784. }), t.exports = s.datepicker = a
  1785. }, function (t, e, i) {
  1786. "use strict";
  1787. var n = i(1),
  1788. s = i(2),
  1789. o = n(document),
  1790. a = s.support.transition,
  1791. r = function () {
  1792. this.id = s.utils.generateGUID("am-dimmer"), this.$element = n(r.DEFAULTS.tpl, {
  1793. id: this.id
  1794. }), this.inited = !1, this.scrollbarWidth = 0, this.$used = n([])
  1795. };
  1796. r.DEFAULTS = {
  1797. tpl: '<div class="am-dimmer" data-am-dimmer></div>'
  1798. }, r.prototype.init = function () {
  1799. return this.inited || (n(document.body).append(this.$element), this.inited = !0, o.trigger("init.dimmer.amui"), this.$element.on("touchmove.dimmer.amui", function (t) {
  1800. t.preventDefault()
  1801. })), this
  1802. }, r.prototype.open = function (t) {
  1803. this.inited || this.init();
  1804. var e = this.$element;
  1805. return t && (this.$used = this.$used.add(n(t))), this.checkScrollbar().setScrollbar(), e.show().trigger("open.dimmer.amui"), a && e.off(a.end), setTimeout(function () {
  1806. e.addClass("am-active")
  1807. }, 0), this
  1808. }, r.prototype.close = function (t, e) {
  1809. function i() {
  1810. s.hide(), this.resetScrollbar()
  1811. }
  1812. if (this.$used = this.$used.not(n(t)), !e && this.$used.length) return this;
  1813. var s = this.$element;
  1814. return s.removeClass("am-active").trigger("close.dimmer.amui"), i.call(this), this
  1815. }, r.prototype.checkScrollbar = function () {
  1816. return this.scrollbarWidth = s.utils.measureScrollbar(), this
  1817. }, r.prototype.setScrollbar = function () {
  1818. var t = n(document.body),
  1819. e = parseInt(t.css("padding-right") || 0, 10);
  1820. return this.scrollbarWidth && t.css("padding-right", e + this.scrollbarWidth), t.addClass("am-dimmer-active"), this
  1821. }, r.prototype.resetScrollbar = function () {
  1822. return n(document.body).css("padding-right", "").removeClass("am-dimmer-active"), this
  1823. }, t.exports = s.dimmer = new r
  1824. }, function (t, e, i) {
  1825. "use strict";
  1826. var n = i(1),
  1827. s = i(2),
  1828. o = s.support.animation,
  1829. a = function (t, e) {
  1830. this.options = n.extend({}, a.DEFAULTS, e), e = this.options, this.$element = n(t), this.$toggle = this.$element.find(e.selector.toggle), this.$dropdown = this.$element.find(e.selector.dropdown), this.$boundary = e.boundary === window ? n(window) : this.$element.closest(e.boundary), this.$justify = e.justify && n(e.justify).length && n(e.justify) || void 0, !this.$boundary.length && (this.$boundary = n(window)), this.active = !!this.$element.hasClass("am-active"), this.animating = null, this.events()
  1831. };
  1832. a.DEFAULTS = {
  1833. animation: "am-animation-slide-top-fixed",
  1834. boundary: window,
  1835. justify: void 0,
  1836. selector: {
  1837. dropdown: ".am-dropdown-content",
  1838. toggle: ".am-dropdown-toggle"
  1839. },
  1840. trigger: "click"
  1841. }, a.prototype.toggle = function () {
  1842. this.clear(), this.animating || this[this.active ? "close" : "open"]()
  1843. }, a.prototype.open = function (t) {
  1844. var e = this.$toggle,
  1845. i = this.$element,
  1846. s = this.$dropdown;
  1847. if (!e.is(".am-disabled, :disabled") && !this.active) {
  1848. i.trigger("open.dropdown.amui").addClass("am-active"), e.trigger("focus"), this.checkDimensions(t);
  1849. var a = n.proxy(function () {
  1850. i.trigger("opened.dropdown.amui"), this.active = !0, this.animating = 0
  1851. }, this);
  1852. o ? (this.animating = 1, s.addClass(this.options.animation).on(o.end + ".open.dropdown.amui", n.proxy(function () {
  1853. a(), s.removeClass(this.options.animation)
  1854. }, this))) : a()
  1855. }
  1856. }, a.prototype.close = function () {
  1857. if (this.active) {
  1858. var t = "am-dropdown-animation",
  1859. e = this.$element,
  1860. i = this.$dropdown;
  1861. e.trigger("close.dropdown.amui");
  1862. var s = n.proxy(function () {
  1863. e.removeClass("am-active").trigger("closed.dropdown.amui"), this.active = !1, this.animating = 0, this.$toggle.blur()
  1864. }, this);
  1865. o ? (i.removeClass(this.options.animation), i.addClass(t), this.animating = 1, i.one(o.end + ".close.dropdown.amui", function () {
  1866. i.removeClass(t), s()
  1867. })) : s()
  1868. }
  1869. }, a.prototype.enable = function () {
  1870. this.$toggle.prop("disabled", !1)
  1871. }, a.prototype.disable = function () {
  1872. this.$toggle.prop("disabled", !0)
  1873. }, a.prototype.checkDimensions = function (t) {
  1874. if (this.$dropdown.length) {
  1875. var e = this.$dropdown;
  1876. t && t.offset && e.offset(t.offset);
  1877. var i = e.offset(),
  1878. s = e.outerWidth(),
  1879. o = this.$boundary.width(),
  1880. a = n.isWindow(this.boundary) && this.$boundary.offset() ? this.$boundary.offset().left : 0;
  1881. this.$justify && e.css({
  1882. "min-width": this.$justify.css("width")
  1883. }), s + (i.left - a) > o && this.$element.addClass("am-dropdown-flip")
  1884. }
  1885. }, a.prototype.clear = function () {
  1886. n("[data-am-dropdown]").not(this.$element).each(function () {
  1887. var t = n(this).data("amui.dropdown");
  1888. t && t.close()
  1889. })
  1890. }, a.prototype.events = function () {
  1891. var t = "dropdown.amui",
  1892. e = this.$toggle;
  1893. e.on("click." + t, n.proxy(function (t) {
  1894. t.preventDefault(), this.toggle()
  1895. }, this)), n(document).on("keydown.dropdown.amui", n.proxy(function (t) {
  1896. 27 === t.keyCode && this.active && this.close()
  1897. }, this)).on("click.outer.dropdown.amui", n.proxy(function (t) {
  1898. !this.active || this.$element[0] !== t.target && this.$element.find(t.target).length || this.close()
  1899. }, this))
  1900. }, s.plugin("dropdown", a), s.ready(function (t) {
  1901. n("[data-am-dropdown]", t).dropdown()
  1902. }), n(document).on("click.dropdown.amui.data-api", ".am-dropdown form", function (t) {
  1903. t.stopPropagation()
  1904. }), t.exports = s.dropdown = a
  1905. }, function (t, e, i) {
  1906. (function (e) {
  1907. var n = i(1),
  1908. s = i(2),
  1909. o = !0;
  1910. n.flexslider = function (t, i) {
  1911. var s = n(t);
  1912. s.vars = n.extend({}, n.flexslider.defaults, i);
  1913. var a, r = s.vars.namespace,
  1914. l = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
  1915. c = ("ontouchstart" in window || l || window.DocumentTouch && document instanceof DocumentTouch) && s.vars.touch,
  1916. u = "click touchend MSPointerUp keyup",
  1917. h = "",
  1918. d = "vertical" === s.vars.direction,
  1919. p = s.vars.reverse,
  1920. m = s.vars.itemWidth > 0,
  1921. f = "fade" === s.vars.animation,
  1922. v = "" !== s.vars.asNavFor,
  1923. g = {};
  1924. n.data(t, "flexslider", s), g = {
  1925. init: function () {
  1926. s.animating = !1, s.currentSlide = parseInt(s.vars.startAt ? s.vars.startAt : 0, 10), isNaN(s.currentSlide) && (s.currentSlide = 0), s.animatingTo = s.currentSlide, s.atEnd = 0 === s.currentSlide || s.currentSlide === s.last, s.containerSelector = s.vars.selector.substr(0, s.vars.selector.search(" ")), s.slides = n(s.vars.selector, s), s.container = n(s.containerSelector, s), s.count = s.slides.length, s.syncExists = n(s.vars.sync).length > 0, "slide" === s.vars.animation && (s.vars.animation = "swing"), s.prop = d ? "top" : "marginLeft", s.args = {}, s.manualPause = !1, s.stopped = !1, s.started = !1, s.startTimeout = null, s.transitions = !s.vars.video && !f && s.vars.useCSS && function () {
  1927. var t = document.createElement("div"),
  1928. e = ["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"];
  1929. for (var i in e)
  1930. if (void 0 !== t.style[e[i]]) return s.pfx = e[i].replace("Perspective", "").toLowerCase(), s.prop = "-" + s.pfx + "-transform", !0;
  1931. return !1
  1932. }(), s.ensureAnimationEnd = "", "" !== s.vars.controlsContainer && (s.controlsContainer = n(s.vars.controlsContainer).length > 0 && n(s.vars.controlsContainer)), "" !== s.vars.manualControls && (s.manualControls = n(s.vars.manualControls).length > 0 && n(s.vars.manualControls)), "" !== s.vars.customDirectionNav && (s.customDirectionNav = 2 === n(s.vars.customDirectionNav).length && n(s.vars.customDirectionNav)), s.vars.randomize && (s.slides.sort(function () {
  1933. return Math.round(Math.random()) - .5
  1934. }), s.container.empty().append(s.slides)), s.doMath(), s.setup("init"), s.vars.controlNav && g.controlNav.setup(), s.vars.directionNav && g.directionNav.setup(), s.vars.keyboard && (1 === n(s.containerSelector).length || s.vars.multipleKeyboard) && n(document).bind("keyup", function (t) {
  1935. var e = t.keyCode;
  1936. if (!s.animating && (39 === e || 37 === e)) {
  1937. var i = 39 === e ? s.getTarget("next") : 37 === e && s.getTarget("prev");
  1938. s.flexAnimate(i, s.vars.pauseOnAction)
  1939. }
  1940. }), s.vars.mousewheel && s.bind("mousewheel", function (t, e, i, n) {
  1941. t.preventDefault();
  1942. var o = e < 0 ? s.getTarget("next") : s.getTarget("prev");
  1943. s.flexAnimate(o, s.vars.pauseOnAction)
  1944. }), s.vars.pausePlay && g.pausePlay.setup(), s.vars.slideshow && s.vars.pauseInvisible && g.pauseInvisible.init(), s.vars.slideshow && (s.vars.pauseOnHover && s.hover(function () {
  1945. s.manualPlay || s.manualPause || s.pause()
  1946. }, function () {
  1947. s.manualPause || s.manualPlay || s.stopped || s.play()
  1948. }), s.vars.pauseInvisible && g.pauseInvisible.isHidden() || (s.vars.initDelay > 0 ? s.startTimeout = setTimeout(s.play, s.vars.initDelay) : s.play())), v && g.asNav.setup(), c && s.vars.touch && g.touch(), (!f || f && s.vars.smoothHeight) && n(window).bind("resize orientationchange focus", g.resize), s.find("img").attr("draggable", "false"), setTimeout(function () {
  1949. s.vars.start(s)
  1950. }, 200)
  1951. },
  1952. asNav: {
  1953. setup: function () {
  1954. s.asNav = !0, s.animatingTo = Math.floor(s.currentSlide / s.move), s.currentItem = s.currentSlide, s.slides.removeClass(r + "active-slide").eq(s.currentItem).addClass(r + "active-slide"), l ? (t._slider = s, s.slides.each(function () {
  1955. var t = this;
  1956. t._gesture = new MSGesture, t._gesture.target = t, t.addEventListener("MSPointerDown", function (t) {
  1957. t.preventDefault(), t.currentTarget._gesture && t.currentTarget._gesture.addPointer(t.pointerId)
  1958. }, !1), t.addEventListener("MSGestureTap", function (t) {
  1959. t.preventDefault();
  1960. var e = n(this),
  1961. i = e.index();
  1962. n(s.vars.asNavFor).data("flexslider").animating || e.hasClass("active") || (s.direction = s.currentItem < i ? "next" : "prev", s.flexAnimate(i, s.vars.pauseOnAction, !1, !0, !0))
  1963. })
  1964. })) : s.slides.on(u, function (t) {
  1965. t.preventDefault();
  1966. var e = n(this),
  1967. i = e.index(),
  1968. o = e.offset().left - n(s).scrollLeft();
  1969. o <= 0 && e.hasClass(r + "active-slide") ? s.flexAnimate(s.getTarget("prev"), !0) : n(s.vars.asNavFor).data("flexslider").animating || e.hasClass(r + "active-slide") || (s.direction = s.currentItem < i ? "next" : "prev", s.flexAnimate(i, s.vars.pauseOnAction, !1, !0, !0))
  1970. })
  1971. }
  1972. },
  1973. controlNav: {
  1974. setup: function () {
  1975. s.manualControls ? g.controlNav.setupManual() : g.controlNav.setupPaging()
  1976. },
  1977. setupPaging: function () {
  1978. var t, e, i = "thumbnails" === s.vars.controlNav ? "control-thumbs" : "control-paging",
  1979. o = 1;
  1980. if (s.controlNavScaffold = n('<ol class="' + r + "control-nav " + r + i + '"></ol>'), s.pagingCount > 1)
  1981. for (var a = 0; a < s.pagingCount; a++) {
  1982. e = s.slides.eq(a), void 0 === e.attr("data-thumb-alt") && e.attr("data-thumb-alt", "");
  1983. var l = "" !== e.attr("data-thumb-alt") ? l = ' alt="' + e.attr("data-thumb-alt") + '"' : "";
  1984. if (t = "thumbnails" === s.vars.controlNav ? '<img src="' + e.attr("data-thumb") + '"' + l + "/>" : '<a href="#">' + o + "</a>", "thumbnails" === s.vars.controlNav && !0 === s.vars.thumbCaptions) {
  1985. var c = e.attr("data-thumbcaption");
  1986. "" !== c && void 0 !== c && (t += '<span class="' + r + 'caption">' + c + "</span>")
  1987. }
  1988. s.controlNavScaffold.append("<li>" + t + "<i></i></li>"), o++
  1989. }
  1990. s.controlsContainer ? n(s.controlsContainer).append(s.controlNavScaffold) : s.append(s.controlNavScaffold), g.controlNav.set(), g.controlNav.active(), s.controlNavScaffold.delegate("a, img", u, function (t) {
  1991. if (t.preventDefault(), "" === h || h === t.type) {
  1992. var e = n(this),
  1993. i = s.controlNav.index(e);
  1994. e.hasClass(r + "active") || (s.direction = i > s.currentSlide ? "next" : "prev", s.flexAnimate(i, s.vars.pauseOnAction))
  1995. }
  1996. "" === h && (h = t.type), g.setToClearWatchedEvent()
  1997. })
  1998. },
  1999. setupManual: function () {
  2000. s.controlNav = s.manualControls, g.controlNav.active(), s.controlNav.bind(u, function (t) {
  2001. if (t.preventDefault(), "" === h || h === t.type) {
  2002. var e = n(this),
  2003. i = s.controlNav.index(e);
  2004. e.hasClass(r + "active") || (i > s.currentSlide ? s.direction = "next" : s.direction = "prev", s.flexAnimate(i, s.vars.pauseOnAction))
  2005. }
  2006. "" === h && (h = t.type), g.setToClearWatchedEvent()
  2007. })
  2008. },
  2009. set: function () {
  2010. var t = "thumbnails" === s.vars.controlNav ? "img" : "a";
  2011. s.controlNav = n("." + r + "control-nav li " + t, s.controlsContainer ? s.controlsContainer : s)
  2012. },
  2013. active: function () {
  2014. s.controlNav.removeClass(r + "active").eq(s.animatingTo).addClass(r + "active")
  2015. },
  2016. update: function (t, e) {
  2017. s.pagingCount > 1 && "add" === t ? s.controlNavScaffold.append(n('<li><a href="#">' + s.count + "</a></li>")) : 1 === s.pagingCount ? s.controlNavScaffold.find("li").remove() : s.controlNav.eq(e).closest("li").remove(), g.controlNav.set(), s.pagingCount > 1 && s.pagingCount !== s.controlNav.length ? s.update(e, t) : g.controlNav.active()
  2018. }
  2019. },
  2020. directionNav: {
  2021. setup: function () {
  2022. var t = n('<ul class="' + r + 'direction-nav"><li class="' + r + 'nav-prev"><a class="' + r + 'prev" href="#">' + s.vars.prevText + '</a></li><li class="' + r + 'nav-next"><a class="' + r + 'next" href="#">' + s.vars.nextText + "</a></li></ul>");
  2023. s.customDirectionNav ? s.directionNav = s.customDirectionNav : s.controlsContainer ? (n(s.controlsContainer).append(t), s.directionNav = n("." + r + "direction-nav li a", s.controlsContainer)) : (s.append(t), s.directionNav = n("." + r + "direction-nav li a", s)), g.directionNav.update(), s.directionNav.bind(u, function (t) {
  2024. t.preventDefault();
  2025. var e;
  2026. "" !== h && h !== t.type || (e = n(this).hasClass(r + "next") ? s.getTarget("next") : s.getTarget("prev"), s.flexAnimate(e, s.vars.pauseOnAction)), "" === h && (h = t.type), g.setToClearWatchedEvent()
  2027. })
  2028. },
  2029. update: function () {
  2030. var t = r + "disabled";
  2031. 1 === s.pagingCount ? s.directionNav.addClass(t).attr("tabindex", "-1") : s.vars.animationLoop ? s.directionNav.removeClass(t).removeAttr("tabindex") : 0 === s.animatingTo ? s.directionNav.removeClass(t).filter("." + r + "prev").addClass(t).attr("tabindex", "-1") : s.animatingTo === s.last ? s.directionNav.removeClass(t).filter("." + r + "next").addClass(t).attr("tabindex", "-1") : s.directionNav.removeClass(t).removeAttr("tabindex")
  2032. }
  2033. },
  2034. pausePlay: {
  2035. setup: function () {
  2036. var t = n('<div class="' + r + 'pauseplay"><a href="#"></a></div>');
  2037. s.controlsContainer ? (s.controlsContainer.append(t), s.pausePlay = n("." + r + "pauseplay a", s.controlsContainer)) : (s.append(t), s.pausePlay = n("." + r + "pauseplay a", s)), g.pausePlay.update(s.vars.slideshow ? r + "pause" : r + "play"), s.pausePlay.bind(u, function (t) {
  2038. t.preventDefault(), "" !== h && h !== t.type || (n(this).hasClass(r + "pause") ? (s.manualPause = !0, s.manualPlay = !1, s.pause()) : (s.manualPause = !1, s.manualPlay = !0, s.play())), "" === h && (h = t.type), g.setToClearWatchedEvent()
  2039. })
  2040. },
  2041. update: function (t) {
  2042. "play" === t ? s.pausePlay.removeClass(r + "pause").addClass(r + "play").html(s.vars.playText) : s.pausePlay.removeClass(r + "play").addClass(r + "pause").html(s.vars.pauseText)
  2043. }
  2044. },
  2045. touch: function () {
  2046. function i(e) {
  2047. e.stopPropagation(), s.animating ? e.preventDefault() : (s.pause(), t._gesture.addPointer(e.pointerId), C = 0, u = d ? s.h : s.w, v = Number(new Date), c = m && p && s.animatingTo === s.last ? 0 : m && p ? s.limit - (s.itemW + s.vars.itemMargin) * s.move * s.animatingTo : m && s.currentSlide === s.last ? s.limit : m ? (s.itemW + s.vars.itemMargin) * s.move * s.currentSlide : p ? (s.last - s.currentSlide + s.cloneOffset) * u : (s.currentSlide + s.cloneOffset) * u)
  2048. }
  2049. function n(i) {
  2050. i.stopPropagation();
  2051. var n = i.target._slider;
  2052. if (n) {
  2053. var s = -i.translationX,
  2054. o = -i.translationY;
  2055. return C += d ? o : s, h = C, b = d ? Math.abs(C) < Math.abs(-s) : Math.abs(C) < Math.abs(-o), i.detail === i.MSGESTURE_FLAG_INERTIA ? void e(function () {
  2056. t._gesture.stop()
  2057. }) : void((!b || Number(new Date) - v > 500) && (i.preventDefault(), !f && n.transitions && (n.vars.animationLoop || (h = C / (0 === n.currentSlide && C < 0 || n.currentSlide === n.last && C > 0 ? Math.abs(C) / u + 2 : 1)), n.setProps(c + h, "setTouch"))))
  2058. }
  2059. }
  2060. function o(t) {
  2061. t.stopPropagation();
  2062. var e = t.target._slider;
  2063. if (e) {
  2064. if (e.animatingTo === e.currentSlide && !b && null !== h) {
  2065. var i = p ? -h : h,
  2066. n = i > 0 ? e.getTarget("next") : e.getTarget("prev");
  2067. e.canAdvance(n) && (Number(new Date) - v < 550 && Math.abs(i) > 50 || Math.abs(i) > u / 2) ? e.flexAnimate(n, e.vars.pauseOnAction) : f || e.flexAnimate(e.currentSlide, e.vars.pauseOnAction, !0)
  2068. }
  2069. a = null, r = null, h = null, c = null, C = 0
  2070. }
  2071. }
  2072. var a, r, c, u, h, v, g, y, w, b = !1,
  2073. T = 0,
  2074. x = 0,
  2075. C = 0;
  2076. l ? (t.style.msTouchAction = "none", t._gesture = new MSGesture, t._gesture.target = t, t.addEventListener("MSPointerDown", i, !1), t._slider = s, t.addEventListener("MSGestureChange", n, !1), t.addEventListener("MSGestureEnd", o, !1)) : (g = function (e) {
  2077. s.animating ? e.preventDefault() : (window.navigator.msPointerEnabled || 1 === e.touches.length) && (s.pause(), u = d ? s.h : s.w, v = Number(new Date), T = e.touches[0].pageX, x = e.touches[0].pageY, c = m && p && s.animatingTo === s.last ? 0 : m && p ? s.limit - (s.itemW + s.vars.itemMargin) * s.move * s.animatingTo : m && s.currentSlide === s.last ? s.limit : m ? (s.itemW + s.vars.itemMargin) * s.move * s.currentSlide : p ? (s.last - s.currentSlide + s.cloneOffset) * u : (s.currentSlide + s.cloneOffset) * u, a = d ? x : T, r = d ? T : x, t.addEventListener("touchmove", y, !1), t.addEventListener("touchend", w, !1))
  2078. }, y = function (t) {
  2079. T = t.touches[0].pageX, x = t.touches[0].pageY, h = d ? a - x : a - T, b = d ? Math.abs(h) < Math.abs(T - r) : Math.abs(h) < Math.abs(x - r);
  2080. var e = 500;
  2081. (!b || Number(new Date) - v > e) && (t.preventDefault(), !f && s.transitions && (s.vars.animationLoop || (h /= 0 === s.currentSlide && h < 0 || s.currentSlide === s.last && h > 0 ? Math.abs(h) / u + 2 : 1), s.setProps(c + h, "setTouch")))
  2082. }, w = function (e) {
  2083. if (t.removeEventListener("touchmove", y, !1), s.animatingTo === s.currentSlide && !b && null !== h) {
  2084. var i = p ? -h : h,
  2085. n = i > 0 ? s.getTarget("next") : s.getTarget("prev");
  2086. s.canAdvance(n) && (Number(new Date) - v < 550 && Math.abs(i) > 50 || Math.abs(i) > u / 2) ? s.flexAnimate(n, s.vars.pauseOnAction) : f || s.flexAnimate(s.currentSlide, s.vars.pauseOnAction, !0)
  2087. }
  2088. t.removeEventListener("touchend", w, !1), a = null, r = null, h = null, c = null
  2089. }, t.addEventListener("touchstart", g, !1))
  2090. },
  2091. resize: function () {
  2092. !s.animating && s.is(":visible") && (m || s.doMath(), f ? g.smoothHeight() : m ? (s.slides.width(s.computedW), s.update(s.pagingCount), s.setProps()) : d ? (s.viewport.height(s.h), s.setProps(s.h, "setTotal")) : (s.vars.smoothHeight && g.smoothHeight(), s.newSlides.width(s.computedW), s.setProps(s.computedW, "setTotal")))
  2093. },
  2094. smoothHeight: function (t) {
  2095. if (!d || f) {
  2096. var e = f ? s : s.viewport;
  2097. t ? e.animate({
  2098. height: s.slides.eq(s.animatingTo).innerHeight()
  2099. }, t) : e.innerHeight(s.slides.eq(s.animatingTo).innerHeight())
  2100. }
  2101. },
  2102. sync: function (t) {
  2103. var e = n(s.vars.sync).data("flexslider"),
  2104. i = s.animatingTo;
  2105. switch (t) {
  2106. case "animate":
  2107. e.flexAnimate(i, s.vars.pauseOnAction, !1, !0);
  2108. break;
  2109. case "play":
  2110. e.playing || e.asNav || e.play();
  2111. break;
  2112. case "pause":
  2113. e.pause()
  2114. }
  2115. },
  2116. uniqueID: function (t) {
  2117. return t.filter("[id]").add(t.find("[id]")).each(function () {
  2118. var t = n(this);
  2119. t.attr("id", t.attr("id") + "_clone")
  2120. }), t
  2121. },
  2122. pauseInvisible: {
  2123. visProp: null,
  2124. init: function () {
  2125. var t = g.pauseInvisible.getHiddenProp();
  2126. if (t) {
  2127. var e = t.replace(/[H|h]idden/, "") + "visibilitychange";
  2128. document.addEventListener(e, function () {
  2129. g.pauseInvisible.isHidden() ? s.startTimeout ? clearTimeout(s.startTimeout) : s.pause() : s.started ? s.play() : s.vars.initDelay > 0 ? setTimeout(s.play, s.vars.initDelay) : s.play()
  2130. })
  2131. }
  2132. },
  2133. isHidden: function () {
  2134. var t = g.pauseInvisible.getHiddenProp();
  2135. return !!t && document[t]
  2136. },
  2137. getHiddenProp: function () {
  2138. var t = ["webkit", "moz", "ms", "o"];
  2139. if ("hidden" in document) return "hidden";
  2140. for (var e = 0; e < t.length; e++)
  2141. if (t[e] + "Hidden" in document) return t[e] + "Hidden";
  2142. return null
  2143. }
  2144. },
  2145. setToClearWatchedEvent: function () {
  2146. clearTimeout(a), a = setTimeout(function () {
  2147. h = ""
  2148. }, 3e3)
  2149. }
  2150. }, s.flexAnimate = function (t, e, i, o, a) {
  2151. if (s.vars.animationLoop || t === s.currentSlide || (s.direction = t > s.currentSlide ? "next" : "prev"), v && 1 === s.pagingCount && (s.direction = s.currentItem < t ? "next" : "prev"), !s.animating && (s.canAdvance(t, a) || i) && s.is(":visible")) {
  2152. if (v && o) {
  2153. var l = n(s.vars.asNavFor).data("flexslider");
  2154. if (s.atEnd = 0 === t || t === s.count - 1, l.flexAnimate(t, !0, !1, !0, a), s.direction = s.currentItem < t ? "next" : "prev", l.direction = s.direction, Math.ceil((t + 1) / s.visible) - 1 === s.currentSlide || 0 === t) return s.currentItem = t, s.slides.removeClass(r + "active-slide").eq(t).addClass(r + "active-slide"), !1;
  2155. s.currentItem = t, s.slides.removeClass(r + "active-slide").eq(t).addClass(r + "active-slide"), t = Math.floor(t / s.visible)
  2156. }
  2157. if (s.animating = !0, s.animatingTo = t, e && s.pause(), s.vars.before(s), s.syncExists && !a && g.sync("animate"), s.vars.controlNav && g.controlNav.active(), m || s.slides.removeClass(r + "active-slide").eq(t).addClass(r + "active-slide"), s.atEnd = 0 === t || t === s.last, s.vars.directionNav && g.directionNav.update(), t === s.last && (s.vars.end(s), s.vars.animationLoop || s.pause()), f) c ? (s.slides.eq(s.currentSlide).css({
  2158. opacity: 0,
  2159. zIndex: 1
  2160. }), s.slides.eq(t).css({
  2161. opacity: 1,
  2162. zIndex: 2
  2163. }), s.wrapup(w)) : (s.slides.eq(s.currentSlide).css({
  2164. zIndex: 1
  2165. }).animate({
  2166. opacity: 0
  2167. }, s.vars.animationSpeed, s.vars.easing), s.slides.eq(t).css({
  2168. zIndex: 2
  2169. }).animate({
  2170. opacity: 1
  2171. }, s.vars.animationSpeed, s.vars.easing, s.wrapup));
  2172. else {
  2173. var u, h, y, w = d ? s.slides.filter(":first").height() : s.computedW;
  2174. m ? (u = s.vars.itemMargin, y = (s.itemW + u) * s.move * s.animatingTo, h = y > s.limit && 1 !== s.visible ? s.limit : y) : h = 0 === s.currentSlide && t === s.count - 1 && s.vars.animationLoop && "next" !== s.direction ? p ? (s.count + s.cloneOffset) * w : 0 : s.currentSlide === s.last && 0 === t && s.vars.animationLoop && "prev" !== s.direction ? p ? 0 : (s.count + 1) * w : p ? (s.count - 1 - t + s.cloneOffset) * w : (t + s.cloneOffset) * w, s.setProps(h, "", s.vars.animationSpeed), s.transitions ? (s.vars.animationLoop && s.atEnd || (s.animating = !1, s.currentSlide = s.animatingTo), s.container.unbind("webkitTransitionEnd transitionend"), s.container.bind("webkitTransitionEnd transitionend", function () {
  2175. clearTimeout(s.ensureAnimationEnd), s.wrapup(w)
  2176. }), clearTimeout(s.ensureAnimationEnd), s.ensureAnimationEnd = setTimeout(function () {
  2177. s.wrapup(w)
  2178. }, s.vars.animationSpeed + 100)) : s.container.animate(s.args, s.vars.animationSpeed, s.vars.easing, function () {
  2179. s.wrapup(w)
  2180. })
  2181. }
  2182. s.vars.smoothHeight && g.smoothHeight(s.vars.animationSpeed)
  2183. }
  2184. }, s.wrapup = function (t) {
  2185. f || m || (0 === s.currentSlide && s.animatingTo === s.last && s.vars.animationLoop ? s.setProps(t, "jumpEnd") : s.currentSlide === s.last && 0 === s.animatingTo && s.vars.animationLoop && s.setProps(t, "jumpStart")), s.animating = !1, s.currentSlide = s.animatingTo, s.vars.after(s)
  2186. }, s.animateSlides = function () {
  2187. !s.animating && o && s.flexAnimate(s.getTarget("next"))
  2188. }, s.pause = function () {
  2189. clearInterval(s.animatedSlides), s.animatedSlides = null, s.playing = !1, s.vars.pausePlay && g.pausePlay.update("play"), s.syncExists && g.sync("pause")
  2190. }, s.play = function () {
  2191. s.playing && clearInterval(s.animatedSlides), s.animatedSlides = s.animatedSlides || setInterval(s.animateSlides, s.vars.slideshowSpeed), s.started = s.playing = !0, s.vars.pausePlay && g.pausePlay.update("pause"), s.syncExists && g.sync("play")
  2192. }, s.stop = function () {
  2193. s.pause(), s.stopped = !0
  2194. }, s.canAdvance = function (t, e) {
  2195. var i = v ? s.pagingCount - 1 : s.last;
  2196. return !!e || (!(!v || s.currentItem !== s.count - 1 || 0 !== t || "prev" !== s.direction) || (!v || 0 !== s.currentItem || t !== s.pagingCount - 1 || "next" === s.direction) && (!(t === s.currentSlide && !v) && (!!s.vars.animationLoop || (!s.atEnd || 0 !== s.currentSlide || t !== i || "next" === s.direction) && (!s.atEnd || s.currentSlide !== i || 0 !== t || "next" !== s.direction))))
  2197. }, s.getTarget = function (t) {
  2198. return s.direction = t, "next" === t ? s.currentSlide === s.last ? 0 : s.currentSlide + 1 : 0 === s.currentSlide ? s.last : s.currentSlide - 1
  2199. }, s.setProps = function (t, e, i) {
  2200. var n = function () {
  2201. var i = t ? t : (s.itemW + s.vars.itemMargin) * s.move * s.animatingTo,
  2202. n = function () {
  2203. if (m) return "setTouch" === e ? t : p && s.animatingTo === s.last ? 0 : p ? s.limit - (s.itemW + s.vars.itemMargin) * s.move * s.animatingTo : s.animatingTo === s.last ? s.limit : i;
  2204. switch (e) {
  2205. case "setTotal":
  2206. return p ? (s.count - 1 - s.currentSlide + s.cloneOffset) * t : (s.currentSlide + s.cloneOffset) * t;
  2207. case "setTouch":
  2208. return p ? t : t;
  2209. case "jumpEnd":
  2210. return p ? t : s.count * t;
  2211. case "jumpStart":
  2212. return p ? s.count * t : t;
  2213. default:
  2214. return t
  2215. }
  2216. }();
  2217. return n * -1 + "px"
  2218. }();
  2219. s.transitions && (n = d ? "translate3d(0," + n + ",0)" : "translate3d(" + n + ",0,0)", i = void 0 !== i ? i / 1e3 + "s" : "0s", s.container.css("-" + s.pfx + "-transition-duration", i), s.container.css("transition-duration", i)), s.args[s.prop] = n, (s.transitions || void 0 === i) && s.container.css(s.args), s.container.css("transform", n)
  2220. }, s.setup = function (t) {
  2221. if (f) s.slides.css({
  2222. width: "100%",
  2223. "float": "left",
  2224. marginRight: "-100%",
  2225. position: "relative"
  2226. }), "init" === t && (c ? s.slides.css({
  2227. opacity: 0,
  2228. display: "block",
  2229. webkitTransition: "opacity " + s.vars.animationSpeed / 1e3 + "s ease",
  2230. zIndex: 1
  2231. }).eq(s.currentSlide).css({
  2232. opacity: 1,
  2233. zIndex: 2
  2234. }) : 0 == s.vars.fadeFirstSlide ? s.slides.css({
  2235. opacity: 0,
  2236. display: "block",
  2237. zIndex: 1
  2238. }).eq(s.currentSlide).css({
  2239. zIndex: 2
  2240. }).css({
  2241. opacity: 1
  2242. }) : s.slides.css({
  2243. opacity: 0,
  2244. display: "block",
  2245. zIndex: 1
  2246. }).eq(s.currentSlide).css({
  2247. zIndex: 2
  2248. }).animate({
  2249. opacity: 1
  2250. }, s.vars.animationSpeed, s.vars.easing)), s.vars.smoothHeight && g.smoothHeight();
  2251. else {
  2252. var e, i;
  2253. "init" === t && (s.viewport = n('<div class="' + r + 'viewport"></div>').css({
  2254. overflow: "hidden",
  2255. position: "relative"
  2256. }).appendTo(s).append(s.container), s.cloneCount = 0, s.cloneOffset = 0, p && (i = n.makeArray(s.slides).reverse(), s.slides = n(i), s.container.empty().append(s.slides))), s.vars.animationLoop && !m && (s.cloneCount = 2, s.cloneOffset = 1, "init" !== t && s.container.find(".clone").remove(), s.container.append(g.uniqueID(s.slides.first().clone().addClass("clone")).attr("aria-hidden", "true")).prepend(g.uniqueID(s.slides.last().clone().addClass("clone")).attr("aria-hidden", "true"))), s.newSlides = n(s.vars.selector, s), e = p ? s.count - 1 - s.currentSlide + s.cloneOffset : s.currentSlide + s.cloneOffset, d && !m ? (s.container.height(200 * (s.count + s.cloneCount) + "%").css("position", "absolute").width("100%"), setTimeout(function () {
  2257. s.newSlides.css({
  2258. display: "block"
  2259. }), s.doMath(), s.viewport.height(s.h), s.setProps(e * s.h, "init")
  2260. }, "init" === t ? 100 : 0)) : (s.container.width(200 * (s.count + s.cloneCount) + "%"), s.setProps(e * s.computedW, "init"), setTimeout(function () {
  2261. s.doMath(), s.newSlides.css({
  2262. width: s.computedW,
  2263. marginRight: s.computedM,
  2264. "float": "left",
  2265. display: "block"
  2266. }), s.vars.smoothHeight && g.smoothHeight()
  2267. }, "init" === t ? 100 : 0))
  2268. }
  2269. m || s.slides.removeClass(r + "active-slide").eq(s.currentSlide).addClass(r + "active-slide"), s.vars.init(s)
  2270. }, s.doMath = function () {
  2271. var t = s.slides.first(),
  2272. e = s.vars.itemMargin,
  2273. i = s.vars.minItems,
  2274. n = s.vars.maxItems;
  2275. s.w = void 0 === s.viewport ? s.width() : s.viewport.width(), s.h = t.height(), s.boxPadding = t.outerWidth() - t.width(), m ? (s.itemT = s.vars.itemWidth + e, s.itemM = e, s.minW = i ? i * s.itemT : s.w, s.maxW = n ? n * s.itemT - e : s.w, s.itemW = s.minW > s.w ? (s.w - e * (i - 1)) / i : s.maxW < s.w ? (s.w - e * (n - 1)) / n : s.vars.itemWidth > s.w ? s.w : s.vars.itemWidth, s.visible = Math.floor(s.w / s.itemW), s.move = s.vars.move > 0 && s.vars.move < s.visible ? s.vars.move : s.visible, s.pagingCount = Math.ceil((s.count - s.visible) / s.move + 1), s.last = s.pagingCount - 1, s.limit = 1 === s.pagingCount ? 0 : s.vars.itemWidth > s.w ? s.itemW * (s.count - 1) + e * (s.count - 1) : (s.itemW + e) * s.count - s.w - e) : (s.itemW = s.w, s.itemM = e, s.pagingCount = s.count, s.last = s.count - 1), s.computedW = s.itemW - s.boxPadding, s.computedM = s.itemM
  2276. }, s.update = function (t, e) {
  2277. s.doMath(), m || (t < s.currentSlide ? s.currentSlide += 1 : t <= s.currentSlide && 0 !== t && (s.currentSlide -= 1), s.animatingTo = s.currentSlide), s.vars.controlNav && !s.manualControls && ("add" === e && !m || s.pagingCount > s.controlNav.length ? g.controlNav.update("add") : ("remove" === e && !m || s.pagingCount < s.controlNav.length) && (m && s.currentSlide > s.last && (s.currentSlide -= 1, s.animatingTo -= 1), g.controlNav.update("remove", s.last))), s.vars.directionNav && g.directionNav.update()
  2278. }, s.addSlide = function (t, e) {
  2279. var i = n(t);
  2280. s.count += 1, s.last = s.count - 1, d && p ? void 0 !== e ? s.slides.eq(s.count - e).after(i) : s.container.prepend(i) : void 0 !== e ? s.slides.eq(e).before(i) : s.container.append(i), s.update(e, "add"), s.slides = n(s.vars.selector + ":not(.clone)", s), s.setup(), s.vars.added(s)
  2281. }, s.removeSlide = function (t) {
  2282. var e = isNaN(t) ? s.slides.index(n(t)) : t;
  2283. s.count -= 1, s.last = s.count - 1, isNaN(t) ? n(t, s.slides).remove() : d && p ? s.slides.eq(s.last).remove() : s.slides.eq(t).remove(), s.doMath(), s.update(e, "remove"), s.slides = n(s.vars.selector + ":not(.clone)", s), s.setup(), s.vars.removed(s)
  2284. }, g.init()
  2285. }, n(window).blur(function (t) {
  2286. o = !1
  2287. }).focus(function (t) {
  2288. o = !0
  2289. }), n.flexslider.defaults = {
  2290. namespace: "am-",
  2291. selector: ".am-slides > li",
  2292. animation: "slide",
  2293. easing: "swing",
  2294. direction: "horizontal",
  2295. reverse: !1,
  2296. animationLoop: !0,
  2297. smoothHeight: !1,
  2298. startAt: 0,
  2299. slideshow: !0,
  2300. slideshowSpeed: 5e3,
  2301. animationSpeed: 600,
  2302. initDelay: 0,
  2303. randomize: !1,
  2304. fadeFirstSlide: !0,
  2305. thumbCaptions: !1,
  2306. pauseOnAction: !0,
  2307. pauseOnHover: !1,
  2308. pauseInvisible: !0,
  2309. useCSS: !0,
  2310. touch: !0,
  2311. video: !1,
  2312. controlNav: !0,
  2313. directionNav: !0,
  2314. prevText: " ",
  2315. nextText: " ",
  2316. keyboard: !0,
  2317. multipleKeyboard: !1,
  2318. mousewheel: !1,
  2319. pausePlay: !1,
  2320. pauseText: "Pause",
  2321. playText: "Play",
  2322. controlsContainer: "",
  2323. manualControls: "",
  2324. customDirectionNav: "",
  2325. sync: "",
  2326. asNavFor: "",
  2327. itemWidth: 0,
  2328. itemMargin: 0,
  2329. minItems: 1,
  2330. maxItems: 0,
  2331. move: 0,
  2332. allowOneSlide: !0,
  2333. start: function () {},
  2334. before: function () {},
  2335. after: function () {},
  2336. end: function () {},
  2337. added: function () {},
  2338. removed: function () {},
  2339. init: function () {}
  2340. }, n.fn.flexslider = function (t) {
  2341. var e = Array.prototype.slice.call(arguments, 1);
  2342. if (void 0 === t && (t = {}), "object" == typeof t) return this.each(function () {
  2343. var e = n(this),
  2344. i = t.selector ? t.selector : ".am-slides > li",
  2345. s = e.find(i);
  2346. 1 === s.length && t.allowOneSlide === !1 || 0 === s.length ? (s.fadeIn(400), t.start && t.start(e)) : void 0 === e.data("flexslider") && new n.flexslider(this, t)
  2347. });
  2348. var i, s = n(this).data("flexslider");
  2349. switch (t) {
  2350. case "next":
  2351. s.flexAnimate(s.getTarget("next"), !0);
  2352. break;
  2353. case "prev":
  2354. case "previous":
  2355. s.flexAnimate(s.getTarget("prev"), !0);
  2356. break;
  2357. default:
  2358. "number" == typeof t ? s.flexAnimate(t, !0) : "string" == typeof t && (i = "function" == typeof s[t] ? s[t].apply(s, e) : s[t])
  2359. }
  2360. return void 0 === i ? this : i
  2361. }, s.ready(function (t) {
  2362. n("[data-am-flexslider]", t).each(function (t, e) {
  2363. var i = n(e),
  2364. o = s.utils.parseOptions(i.data("amFlexslider"));
  2365. o.before = function (t) {
  2366. t._pausedTimer && (window.clearTimeout(t._pausedTimer), t._pausedTimer = null)
  2367. }, o.after = function (t) {
  2368. var e = t.vars.playAfterPaused;
  2369. !e || isNaN(e) || t.playing || t.manualPause || t.manualPlay || t.stopped || (t._pausedTimer = window.setTimeout(function () {
  2370. t.play()
  2371. }, e))
  2372. }, i.flexslider(o)
  2373. })
  2374. }), t.exports = n.flexslider
  2375. }).call(e, i(12).setImmediate)
  2376. }, function (t, e, i) {
  2377. (function (t, n) {
  2378. function s(t, e) {
  2379. this._id = t, this._clearFn = e
  2380. }
  2381. var o = i(13).nextTick,
  2382. a = Function.prototype.apply,
  2383. r = Array.prototype.slice,
  2384. l = {},
  2385. c = 0;
  2386. e.setTimeout = function () {
  2387. return new s(a.call(setTimeout, window, arguments), clearTimeout)
  2388. }, e.setInterval = function () {
  2389. return new s(a.call(setInterval, window, arguments), clearInterval)
  2390. }, e.clearTimeout = e.clearInterval = function (t) {
  2391. t.close()
  2392. }, s.prototype.unref = s.prototype.ref = function () {}, s.prototype.close = function () {
  2393. this._clearFn.call(window, this._id)
  2394. }, e.enroll = function (t, e) {
  2395. clearTimeout(t._idleTimeoutId), t._idleTimeout = e
  2396. }, e.unenroll = function (t) {
  2397. clearTimeout(t._idleTimeoutId), t._idleTimeout = -1
  2398. }, e._unrefActive = e.active = function (t) {
  2399. clearTimeout(t._idleTimeoutId);
  2400. var e = t._idleTimeout;
  2401. e >= 0 && (t._idleTimeoutId = setTimeout(function () {
  2402. t._onTimeout && t._onTimeout()
  2403. }, e))
  2404. }, e.setImmediate = "function" == typeof t ? t : function (t) {
  2405. var i = c++,
  2406. n = !(arguments.length < 2) && r.call(arguments, 1);
  2407. return l[i] = !0, o(function () {
  2408. l[i] && (n ? t.apply(null, n) : t.call(null), e.clearImmediate(i))
  2409. }), i
  2410. }, e.clearImmediate = "function" == typeof n ? n : function (t) {
  2411. delete l[t]
  2412. }
  2413. }).call(e, i(12).setImmediate, i(12).clearImmediate)
  2414. }, function (t, e) {
  2415. function i(t) {
  2416. if (l === setTimeout) return setTimeout(t, 0);
  2417. try {
  2418. return l(t, 0)
  2419. } catch (e) {
  2420. try {
  2421. return l.call(null, t, 0)
  2422. } catch (e) {
  2423. return l.call(this, t, 0)
  2424. }
  2425. }
  2426. }
  2427. function n(t) {
  2428. if (c === clearTimeout) return clearTimeout(t);
  2429. try {
  2430. return c(t)
  2431. } catch (e) {
  2432. try {
  2433. return c.call(null, t)
  2434. } catch (e) {
  2435. return c.call(this, t)
  2436. }
  2437. }
  2438. }
  2439. function s() {
  2440. p && h && (p = !1, h.length ? d = h.concat(d) : m = -1, d.length && o())
  2441. }
  2442. function o() {
  2443. if (!p) {
  2444. var t = i(s);
  2445. p = !0;
  2446. for (var e = d.length; e;) {
  2447. for (h = d, d = []; ++m < e;) h && h[m].run();
  2448. m = -1, e = d.length
  2449. }
  2450. h = null, p = !1, n(t)
  2451. }
  2452. }
  2453. function a(t, e) {
  2454. this.fun = t, this.array = e
  2455. }
  2456. function r() {}
  2457. var l, c, u = t.exports = {};
  2458. ! function () {
  2459. try {
  2460. l = setTimeout
  2461. } catch (t) {
  2462. l = function () {
  2463. throw new Error("setTimeout is not defined")
  2464. }
  2465. }
  2466. try {
  2467. c = clearTimeout
  2468. } catch (t) {
  2469. c = function () {
  2470. throw new Error("clearTimeout is not defined")
  2471. }
  2472. }
  2473. }();
  2474. var h, d = [],
  2475. p = !1,
  2476. m = -1;
  2477. u.nextTick = function (t) {
  2478. var e = new Array(arguments.length - 1);
  2479. if (arguments.length > 1)
  2480. for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
  2481. d.push(new a(t, e)), 1 !== d.length || p || i(o)
  2482. }, a.prototype.run = function () {
  2483. this.fun.apply(null, this.array)
  2484. }, u.title = "browser", u.browser = !0, u.env = {}, u.argv = [], u.version = "", u.versions = {}, u.on = r, u.addListener = r, u.once = r, u.off = r, u.removeListener = r, u.removeAllListeners = r, u.emit = r, u.binding = function (t) {
  2485. throw new Error("process.binding is not supported")
  2486. }, u.cwd = function () {
  2487. return "/"
  2488. }, u.chdir = function (t) {
  2489. throw new Error("process.chdir is not supported")
  2490. }, u.umask = function () {
  2491. return 0
  2492. }
  2493. }, function (t, e, i) {
  2494. "use strict";
  2495. function n(t, e) {
  2496. this.wrapper = "string" == typeof t ? document.querySelector(t) : t, this.scroller = this.wrapper.children[0], this.scrollerStyle = this.scroller.style, this.options = {
  2497. disablePointer: !a.hasPointer,
  2498. disableTouch: a.hasPointer || !a.hasTouch,
  2499. disableMouse: a.hasPointer || a.hasTouch,
  2500. startX: 0,
  2501. startY: 0,
  2502. scrollY: !0,
  2503. directionLockThreshold: 5,
  2504. momentum: !0,
  2505. bounce: !0,
  2506. bounceTime: 600,
  2507. bounceEasing: "",
  2508. preventDefault: !0,
  2509. preventDefaultException: {
  2510. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/
  2511. },
  2512. HWCompositing: !0,
  2513. useTransition: !0,
  2514. useTransform: !0,
  2515. bindToWrapper: "undefined" == typeof window.onmousedown
  2516. };
  2517. for (var i in e) this.options[i] = e[i];
  2518. this.translateZ = this.options.HWCompositing && a.hasPerspective ? " translateZ(0)" : "", this.options.useTransition = a.hasTransition && this.options.useTransition, this.options.useTransform = a.hasTransform && this.options.useTransform, this.options.eventPassthrough = this.options.eventPassthrough === !0 ? "vertical" : this.options.eventPassthrough, this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault, this.options.scrollY = "vertical" != this.options.eventPassthrough && this.options.scrollY, this.options.scrollX = "horizontal" != this.options.eventPassthrough && this.options.scrollX, this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough, this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold, this.options.bounceEasing = "string" == typeof this.options.bounceEasing ? a.ease[this.options.bounceEasing] || a.ease.circular : this.options.bounceEasing, this.options.resizePolling = void 0 === this.options.resizePolling ? 60 : this.options.resizePolling, this.options.tap === !0 && (this.options.tap = "tap"), this.options.useTransition || this.options.useTransform || /relative|absolute/i.test(this.scrollerStyle.position) || (this.scrollerStyle.position = "relative"), this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._events = {}, this._init(), this.refresh(), this.scrollTo(this.options.startX, this.options.startY), this.enable()
  2519. }
  2520. var s = i(2),
  2521. o = s.utils.rAF,
  2522. a = function () {
  2523. function t(t) {
  2524. return n !== !1 && ("" === n ? t : n + t.charAt(0).toUpperCase() + t.substr(1))
  2525. }
  2526. var e = {},
  2527. i = document.createElement("div").style,
  2528. n = function () {
  2529. for (var t, e = ["t", "webkitT", "MozT", "msT", "OT"], n = 0, s = e.length; n < s; n++)
  2530. if (t = e[n] + "ransform", t in i) return e[n].substr(0, e[n].length - 1);
  2531. return !1
  2532. }();
  2533. e.getTime = Date.now || function () {
  2534. return (new Date).getTime()
  2535. }, e.extend = function (t, e) {
  2536. for (var i in e) t[i] = e[i]
  2537. }, e.addEvent = function (t, e, i, n) {
  2538. t.addEventListener(e, i, !!n)
  2539. }, e.removeEvent = function (t, e, i, n) {
  2540. t.removeEventListener(e, i, !!n)
  2541. }, e.prefixPointerEvent = function (t) {
  2542. return window.MSPointerEvent ? "MSPointer" + t.charAt(7).toUpperCase() + t.substr(8) : t
  2543. }, e.momentum = function (t, e, i, n, s, o) {
  2544. var a, r, l = t - e,
  2545. c = Math.abs(l) / i;
  2546. return o = void 0 === o ? 6e-4 : o, a = t + c * c / (2 * o) * (l < 0 ? -1 : 1), r = c / o, a < n ? (a = s ? n - s / 2.5 * (c / 8) : n, l = Math.abs(a - t), r = l / c) : a > 0 && (a = s ? s / 2.5 * (c / 8) : 0, l = Math.abs(t) + a, r = l / c), {
  2547. destination: Math.round(a),
  2548. duration: r
  2549. }
  2550. };
  2551. var s = t("transform");
  2552. return e.extend(e, {
  2553. hasTransform: s !== !1,
  2554. hasPerspective: t("perspective") in i,
  2555. hasTouch: "ontouchstart" in window,
  2556. hasPointer: !(!window.PointerEvent && !window.MSPointerEvent),
  2557. hasTransition: t("transition") in i
  2558. }), e.isBadAndroid = function () {
  2559. var t = window.navigator.appVersion;
  2560. if (/Android/.test(t) && !/Chrome\/\d/.test(t)) {
  2561. var e = t.match(/Safari\/(\d+.\d)/);
  2562. return !(e && "object" == typeof e && e.length >= 2) || parseFloat(e[1]) < 535.19
  2563. }
  2564. return !1
  2565. }(), e.extend(e.style = {}, {
  2566. transform: s,
  2567. transitionTimingFunction: t("transitionTimingFunction"),
  2568. transitionDuration: t("transitionDuration"),
  2569. transitionDelay: t("transitionDelay"),
  2570. transformOrigin: t("transformOrigin")
  2571. }), e.hasClass = function (t, e) {
  2572. var i = new RegExp("(^|\\s)" + e + "(\\s|$)");
  2573. return i.test(t.className)
  2574. }, e.addClass = function (t, i) {
  2575. if (!e.hasClass(t, i)) {
  2576. var n = t.className.split(" ");
  2577. n.push(i), t.className = n.join(" ")
  2578. }
  2579. }, e.removeClass = function (t, i) {
  2580. if (e.hasClass(t, i)) {
  2581. var n = new RegExp("(^|\\s)" + i + "(\\s|$)", "g");
  2582. t.className = t.className.replace(n, " ")
  2583. }
  2584. }, e.offset = function (t) {
  2585. for (var e = -t.offsetLeft, i = -t.offsetTop; t = t.offsetParent;) e -= t.offsetLeft, i -= t.offsetTop;
  2586. return {
  2587. left: e,
  2588. top: i
  2589. }
  2590. }, e.preventDefaultException = function (t, e) {
  2591. for (var i in e)
  2592. if (e[i].test(t[i])) return !0;
  2593. return !1
  2594. }, e.extend(e.eventType = {}, {
  2595. touchstart: 1,
  2596. touchmove: 1,
  2597. touchend: 1,
  2598. mousedown: 2,
  2599. mousemove: 2,
  2600. mouseup: 2,
  2601. pointerdown: 3,
  2602. pointermove: 3,
  2603. pointerup: 3,
  2604. MSPointerDown: 3,
  2605. MSPointerMove: 3,
  2606. MSPointerUp: 3
  2607. }), e.extend(e.ease = {}, {
  2608. quadratic: {
  2609. style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
  2610. fn: function (t) {
  2611. return t * (2 - t)
  2612. }
  2613. },
  2614. circular: {
  2615. style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
  2616. fn: function (t) {
  2617. return Math.sqrt(1 - --t * t)
  2618. }
  2619. },
  2620. back: {
  2621. style: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
  2622. fn: function (t) {
  2623. var e = 4;
  2624. return (t -= 1) * t * ((e + 1) * t + e) + 1
  2625. }
  2626. },
  2627. bounce: {
  2628. style: "",
  2629. fn: function (t) {
  2630. return (t /= 1) < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  2631. }
  2632. },
  2633. elastic: {
  2634. style: "",
  2635. fn: function (t) {
  2636. var e = .22,
  2637. i = .4;
  2638. return 0 === t ? 0 : 1 == t ? 1 : i * Math.pow(2, -10 * t) * Math.sin((t - e / 4) * (2 * Math.PI) / e) + 1
  2639. }
  2640. }
  2641. }), e.tap = function (t, e) {
  2642. var i = document.createEvent("Event");
  2643. i.initEvent(e, !0, !0), i.pageX = t.pageX, i.pageY = t.pageY, t.target.dispatchEvent(i)
  2644. }, e.click = function (t) {
  2645. var e, i = t.target;
  2646. /(SELECT|INPUT|TEXTAREA)/i.test(i.tagName) || (e = document.createEvent(window.MouseEvent ? "MouseEvents" : "Event"), e.initEvent("click", !0, !0), e.view = t.view || window, e.detail = 1, e.screenX = i.screenX || 0, e.screenY = i.screenY || 0, e.clientX = i.clientX || 0, e.clientY = i.clientY || 0, e.ctrlKey = !!t.ctrlKey, e.altKey = !!t.altKey, e.shiftKey = !!t.shiftKey, e.metaKey = !!t.metaKey, e.button = 0, e.relatedTarget = null, e._constructed = !0, i.dispatchEvent(e))
  2647. }, e
  2648. }();
  2649. n.prototype = {
  2650. version: "5.2.0",
  2651. _init: function () {
  2652. this._initEvents()
  2653. },
  2654. destroy: function () {
  2655. this._initEvents(!0), clearTimeout(this.resizeTimeout), this.resizeTimeout = null, this._execEvent("destroy")
  2656. },
  2657. _transitionEnd: function (t) {
  2658. t.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, this._execEvent("scrollEnd")))
  2659. },
  2660. _start: function (t) {
  2661. if (1 != a.eventType[t.type]) {
  2662. var e;
  2663. if (e = t.which ? t.button : t.button < 2 ? 0 : 4 == t.button ? 1 : 2, 0 !== e) return
  2664. }
  2665. if (this.enabled && (!this.initiated || a.eventType[t.type] === this.initiated)) {
  2666. !this.options.preventDefault || a.isBadAndroid || a.preventDefaultException(t.target, this.options.preventDefaultException) || t.preventDefault();
  2667. var i, n = t.touches ? t.touches[0] : t;
  2668. this.initiated = a.eventType[t.type], this.moved = !1, this.distX = 0, this.distY = 0, this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this.startTime = a.getTime(), this.options.useTransition && this.isInTransition ? (this._transitionTime(), this.isInTransition = !1, i = this.getComputedPosition(), this._translate(Math.round(i.x), Math.round(i.y)), this._execEvent("scrollEnd")) : !this.options.useTransition && this.isAnimating && (this.isAnimating = !1,
  2669. this._execEvent("scrollEnd")), this.startX = this.x, this.startY = this.y, this.absStartX = this.x, this.absStartY = this.y, this.pointX = n.pageX, this.pointY = n.pageY, this._execEvent("beforeScrollStart")
  2670. }
  2671. },
  2672. _move: function (t) {
  2673. if (this.enabled && a.eventType[t.type] === this.initiated) {
  2674. this.options.preventDefault && t.preventDefault();
  2675. var e, i, n, s, o = t.touches ? t.touches[0] : t,
  2676. r = o.pageX - this.pointX,
  2677. l = o.pageY - this.pointY,
  2678. c = a.getTime();
  2679. if (this.pointX = o.pageX, this.pointY = o.pageY, this.distX += r, this.distY += l, n = Math.abs(this.distX), s = Math.abs(this.distY), !(c - this.endTime > 300 && n < 10 && s < 10)) {
  2680. if (this.directionLocked || this.options.freeScroll || (n > s + this.options.directionLockThreshold ? this.directionLocked = "h" : s >= n + this.options.directionLockThreshold ? this.directionLocked = "v" : this.directionLocked = "n"), "h" == this.directionLocked) {
  2681. if ("vertical" == this.options.eventPassthrough) t.preventDefault();
  2682. else if ("horizontal" == this.options.eventPassthrough) return void(this.initiated = !1);
  2683. l = 0
  2684. } else if ("v" == this.directionLocked) {
  2685. if ("horizontal" == this.options.eventPassthrough) t.preventDefault();
  2686. else if ("vertical" == this.options.eventPassthrough) return void(this.initiated = !1);
  2687. r = 0
  2688. }
  2689. r = this.hasHorizontalScroll ? r : 0, l = this.hasVerticalScroll ? l : 0, e = this.x + r, i = this.y + l, (e > 0 || e < this.maxScrollX) && (e = this.options.bounce ? this.x + r / 3 : e > 0 ? 0 : this.maxScrollX), (i > 0 || i < this.maxScrollY) && (i = this.options.bounce ? this.y + l / 3 : i > 0 ? 0 : this.maxScrollY), this.directionX = r > 0 ? -1 : r < 0 ? 1 : 0, this.directionY = l > 0 ? -1 : l < 0 ? 1 : 0, this.moved || this._execEvent("scrollStart"), this.moved = !0, this._translate(e, i), c - this.startTime > 300 && (this.startTime = c, this.startX = this.x, this.startY = this.y)
  2690. }
  2691. }
  2692. },
  2693. _end: function (t) {
  2694. if (this.enabled && a.eventType[t.type] === this.initiated) {
  2695. this.options.preventDefault && !a.preventDefaultException(t.target, this.options.preventDefaultException) && t.preventDefault();
  2696. var e, i, n = (t.changedTouches ? t.changedTouches[0] : t, a.getTime() - this.startTime),
  2697. s = Math.round(this.x),
  2698. o = Math.round(this.y),
  2699. r = Math.abs(s - this.startX),
  2700. l = Math.abs(o - this.startY),
  2701. c = 0,
  2702. u = "";
  2703. if (this.isInTransition = 0, this.initiated = 0, this.endTime = a.getTime(), !this.resetPosition(this.options.bounceTime)) return this.scrollTo(s, o), this.moved ? this._events.flick && n < 200 && r < 100 && l < 100 ? void this._execEvent("flick") : (this.options.momentum && n < 300 && (e = this.hasHorizontalScroll ? a.momentum(this.x, this.startX, n, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
  2704. destination: s,
  2705. duration: 0
  2706. }, i = this.hasVerticalScroll ? a.momentum(this.y, this.startY, n, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
  2707. destination: o,
  2708. duration: 0
  2709. }, s = e.destination, o = i.destination, c = Math.max(e.duration, i.duration), this.isInTransition = 1), s != this.x || o != this.y ? ((s > 0 || s < this.maxScrollX || o > 0 || o < this.maxScrollY) && (u = a.ease.quadratic), void this.scrollTo(s, o, c, u)) : void this._execEvent("scrollEnd")) : (this.options.tap && a.tap(t, this.options.tap), this.options.click && a.click(t), void this._execEvent("scrollCancel"))
  2710. }
  2711. },
  2712. _resize: function () {
  2713. var t = this;
  2714. clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function () {
  2715. t.refresh()
  2716. }, this.options.resizePolling)
  2717. },
  2718. resetPosition: function (t) {
  2719. var e = this.x,
  2720. i = this.y;
  2721. return t = t || 0, !this.hasHorizontalScroll || this.x > 0 ? e = 0 : this.x < this.maxScrollX && (e = this.maxScrollX), !this.hasVerticalScroll || this.y > 0 ? i = 0 : this.y < this.maxScrollY && (i = this.maxScrollY), (e != this.x || i != this.y) && (this.scrollTo(e, i, t, this.options.bounceEasing), !0)
  2722. },
  2723. disable: function () {
  2724. this.enabled = !1
  2725. },
  2726. enable: function () {
  2727. this.enabled = !0
  2728. },
  2729. refresh: function () {
  2730. this.wrapper.offsetHeight;
  2731. this.wrapperWidth = this.wrapper.clientWidth, this.wrapperHeight = this.wrapper.clientHeight, this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight, this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = a.offset(this.wrapper), this._execEvent("refresh"), this.resetPosition()
  2732. },
  2733. on: function (t, e) {
  2734. this._events[t] || (this._events[t] = []), this._events[t].push(e)
  2735. },
  2736. off: function (t, e) {
  2737. if (this._events[t]) {
  2738. var i = this._events[t].indexOf(e);
  2739. i > -1 && this._events[t].splice(i, 1)
  2740. }
  2741. },
  2742. _execEvent: function (t) {
  2743. if (this._events[t]) {
  2744. var e = 0,
  2745. i = this._events[t].length;
  2746. if (i)
  2747. for (; e < i; e++) this._events[t][e].apply(this, [].slice.call(arguments, 1))
  2748. }
  2749. },
  2750. scrollBy: function (t, e, i, n) {
  2751. t = this.x + t, e = this.y + e, i = i || 0, this.scrollTo(t, e, i, n)
  2752. },
  2753. scrollTo: function (t, e, i, n) {
  2754. n = n || a.ease.circular, this.isInTransition = this.options.useTransition && i > 0;
  2755. var s = this.options.useTransition && n.style;
  2756. !i || s ? (s && (this._transitionTimingFunction(n.style), this._transitionTime(i)), this._translate(t, e)) : this._animate(t, e, i, n.fn)
  2757. },
  2758. scrollToElement: function (t, e, i, n, s) {
  2759. if (t = t.nodeType ? t : this.scroller.querySelector(t)) {
  2760. var o = a.offset(t);
  2761. o.left -= this.wrapperOffset.left, o.top -= this.wrapperOffset.top, i === !0 && (i = Math.round(t.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), n === !0 && (n = Math.round(t.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), o.left -= i || 0, o.top -= n || 0, o.left = o.left > 0 ? 0 : o.left < this.maxScrollX ? this.maxScrollX : o.left, o.top = o.top > 0 ? 0 : o.top < this.maxScrollY ? this.maxScrollY : o.top, e = void 0 === e || null === e || "auto" === e ? Math.max(Math.abs(this.x - o.left), Math.abs(this.y - o.top)) : e, this.scrollTo(o.left, o.top, e, s)
  2762. }
  2763. },
  2764. _transitionTime: function (t) {
  2765. if (this.options.useTransition) {
  2766. t = t || 0;
  2767. var e = a.style.transitionDuration;
  2768. if (e && (this.scrollerStyle[e] = t + "ms", !t && a.isBadAndroid)) {
  2769. this.scrollerStyle[e] = "0.0001ms";
  2770. var i = this;
  2771. o(function () {
  2772. "0.0001ms" === i.scrollerStyle[e] && (i.scrollerStyle[e] = "0s")
  2773. })
  2774. }
  2775. }
  2776. },
  2777. _transitionTimingFunction: function (t) {
  2778. this.scrollerStyle[a.style.transitionTimingFunction] = t
  2779. },
  2780. _translate: function (t, e) {
  2781. this.options.useTransform ? this.scrollerStyle[a.style.transform] = "translate(" + t + "px," + e + "px)" + this.translateZ : (t = Math.round(t), e = Math.round(e), this.scrollerStyle.left = t + "px", this.scrollerStyle.top = e + "px"), this.x = t, this.y = e
  2782. },
  2783. _initEvents: function (t) {
  2784. var e = t ? a.removeEvent : a.addEvent,
  2785. i = this.options.bindToWrapper ? this.wrapper : window;
  2786. e(window, "orientationchange", this), e(window, "resize", this), this.options.click && e(this.wrapper, "click", this, !0), this.options.disableMouse || (e(this.wrapper, "mousedown", this), e(i, "mousemove", this), e(i, "mousecancel", this), e(i, "mouseup", this)), a.hasPointer && !this.options.disablePointer && (e(this.wrapper, a.prefixPointerEvent("pointerdown"), this), e(i, a.prefixPointerEvent("pointermove"), this), e(i, a.prefixPointerEvent("pointercancel"), this), e(i, a.prefixPointerEvent("pointerup"), this)), a.hasTouch && !this.options.disableTouch && (e(this.wrapper, "touchstart", this), e(i, "touchmove", this), e(i, "touchcancel", this), e(i, "touchend", this)), e(this.scroller, "transitionend", this), e(this.scroller, "webkitTransitionEnd", this), e(this.scroller, "oTransitionEnd", this), e(this.scroller, "MSTransitionEnd", this)
  2787. },
  2788. getComputedPosition: function () {
  2789. var t, e, i = window.getComputedStyle(this.scroller, null);
  2790. return this.options.useTransform ? (i = i[a.style.transform].split(")")[0].split(", "), t = +(i[12] || i[4]), e = +(i[13] || i[5])) : (t = +i.left.replace(/[^-\d.]/g, ""), e = +i.top.replace(/[^-\d.]/g, "")), {
  2791. x: t,
  2792. y: e
  2793. }
  2794. },
  2795. _animate: function (t, e, i, n) {
  2796. function s() {
  2797. var d, p, m, f = a.getTime();
  2798. return f >= h ? (r.isAnimating = !1, r._translate(t, e), void(r.resetPosition(r.options.bounceTime) || r._execEvent("scrollEnd"))) : (f = (f - u) / i, m = n(f), d = (t - l) * m + l, p = (e - c) * m + c, r._translate(d, p), void(r.isAnimating && o(s)))
  2799. }
  2800. var r = this,
  2801. l = this.x,
  2802. c = this.y,
  2803. u = a.getTime(),
  2804. h = u + i;
  2805. this.isAnimating = !0, s()
  2806. },
  2807. handleEvent: function (t) {
  2808. switch (t.type) {
  2809. case "touchstart":
  2810. case "pointerdown":
  2811. case "MSPointerDown":
  2812. case "mousedown":
  2813. this._start(t);
  2814. break;
  2815. case "touchmove":
  2816. case "pointermove":
  2817. case "MSPointerMove":
  2818. case "mousemove":
  2819. this._move(t);
  2820. break;
  2821. case "touchend":
  2822. case "pointerup":
  2823. case "MSPointerUp":
  2824. case "mouseup":
  2825. case "touchcancel":
  2826. case "pointercancel":
  2827. case "MSPointerCancel":
  2828. case "mousecancel":
  2829. this._end(t);
  2830. break;
  2831. case "orientationchange":
  2832. case "resize":
  2833. this._resize();
  2834. break;
  2835. case "transitionend":
  2836. case "webkitTransitionEnd":
  2837. case "oTransitionEnd":
  2838. case "MSTransitionEnd":
  2839. this._transitionEnd(t);
  2840. break;
  2841. case "wheel":
  2842. case "DOMMouseScroll":
  2843. case "mousewheel":
  2844. this._wheel(t);
  2845. break;
  2846. case "keydown":
  2847. this._key(t);
  2848. break;
  2849. case "click":
  2850. this.enabled && !t._constructed && (t.preventDefault(), t.stopPropagation())
  2851. }
  2852. }
  2853. }, n.utils = a, t.exports = s.iScroll = n
  2854. }, function (t, e, i) {
  2855. "use strict";
  2856. function n(t, e) {
  2857. return this.each(function () {
  2858. var i = s(this),
  2859. n = i.data("amui.modal"),
  2860. o = "object" == typeof t && t;
  2861. n || i.data("amui.modal", n = new c(this, o)), "string" == typeof t ? n[t] && n[t](e) : n.toggle(t && t.relatedTarget || void 0)
  2862. })
  2863. }
  2864. var s = i(1),
  2865. o = i(2),
  2866. a = i(9),
  2867. r = s(document),
  2868. l = o.support.transition,
  2869. c = function (t, e) {
  2870. this.options = s.extend({}, c.DEFAULTS, e || {}), this.$element = s(t), this.$dialog = this.$element.find(".am-modal-dialog"), this.$element.attr("id") || this.$element.attr("id", o.utils.generateGUID("am-modal")), this.isPopup = this.$element.hasClass("am-popup"), this.isActions = this.$element.hasClass("am-modal-actions"), this.isPrompt = this.$element.hasClass("am-modal-prompt"), this.isLoading = this.$element.hasClass("am-modal-loading"), this.active = this.transitioning = this.relatedTarget = null, this.dimmer = this.options.dimmer ? a : {
  2871. open: function () {},
  2872. close: function () {}
  2873. }, this.events()
  2874. };
  2875. c.DEFAULTS = {
  2876. className: {
  2877. active: "am-modal-active",
  2878. out: "am-modal-out"
  2879. },
  2880. selector: {
  2881. modal: ".am-modal",
  2882. active: ".am-modal-active"
  2883. },
  2884. closeViaDimmer: !0,
  2885. cancelable: !0,
  2886. onConfirm: function () {},
  2887. onCancel: function () {},
  2888. closeOnCancel: !0,
  2889. closeOnConfirm: !0,
  2890. dimmer: !0,
  2891. height: void 0,
  2892. width: void 0,
  2893. duration: 300,
  2894. transitionEnd: l && l.end + ".modal.amui"
  2895. }, c.prototype.toggle = function (t) {
  2896. return this.active ? this.close() : this.open(t)
  2897. }, c.prototype.open = function (t) {
  2898. var e = this.$element,
  2899. i = this.options,
  2900. n = this.isPopup,
  2901. o = i.width,
  2902. a = i.height,
  2903. r = {};
  2904. if (!this.active && this.$element.length) {
  2905. t && (this.relatedTarget = t), this.transitioning && (clearTimeout(e.transitionEndTimmer), e.transitionEndTimmer = null, e.trigger(i.transitionEnd).off(i.transitionEnd)), n && this.$element.show(), this.active = !0, e.trigger(s.Event("open.modal.amui", {
  2906. relatedTarget: t
  2907. })), this.dimmer.open(e), e.show().redraw(), n || this.isActions || (o && (r.width = parseInt(o, 10) + "px"), a && (r.height = parseInt(a, 10) + "px"), this.$dialog.css(r)), e.removeClass(i.className.out).addClass(i.className.active), this.transitioning = 1;
  2908. var c = function () {
  2909. e.trigger(s.Event("opened.modal.amui", {
  2910. relatedTarget: t
  2911. })), this.transitioning = 0, this.isPrompt && this.$dialog.find("input").eq(0).focus()
  2912. };
  2913. return l ? void e.one(i.transitionEnd, s.proxy(c, this)).emulateTransitionEnd(i.duration) : c.call(this)
  2914. }
  2915. }, c.prototype.close = function (t) {
  2916. if (this.active) {
  2917. var e = this.$element,
  2918. i = this.options,
  2919. n = this.isPopup;
  2920. this.transitioning && (clearTimeout(e.transitionEndTimmer), e.transitionEndTimmer = null, e.trigger(i.transitionEnd).off(i.transitionEnd), this.dimmer.close(e, !0)), this.$element.trigger(s.Event("close.modal.amui", {
  2921. relatedTarget: t
  2922. })), this.transitioning = 1;
  2923. var o = function () {
  2924. e.trigger("closed.modal.amui"), n && e.removeClass(i.className.out), e.hide(), this.transitioning = 0, this.dimmer.close(e, !1), this.active = !1
  2925. };
  2926. return e.removeClass(i.className.active).addClass(i.className.out), l ? void e.one(i.transitionEnd, s.proxy(o, this)).emulateTransitionEnd(i.duration) : o.call(this)
  2927. }
  2928. }, c.prototype.events = function () {
  2929. var t = this,
  2930. e = this.options,
  2931. i = this.$element,
  2932. n = this.dimmer.$element,
  2933. o = i.find(".am-modal-prompt-input"),
  2934. a = i.find("[data-am-modal-confirm]"),
  2935. r = i.find("[data-am-modal-cancel]"),
  2936. l = function () {
  2937. var t = [];
  2938. return o.each(function () {
  2939. t.push(s(this).val())
  2940. }), 0 === t.length ? void 0 : 1 === t.length ? t[0] : t
  2941. };
  2942. this.options.cancelable && i.on("keyup.modal.amui", function (e) {
  2943. t.active && 27 === e.which && (i.trigger("cancel.modal.amui"), t.close())
  2944. }), this.options.dimmer && this.options.closeViaDimmer && !this.isLoading && n.on("click.dimmer.modal.amui", function () {
  2945. t.close()
  2946. }), i.on("click.close.modal.amui", "[data-am-modal-close], .am-modal-btn", function (i) {
  2947. i.preventDefault();
  2948. var n = s(this);
  2949. n.is(a) ? e.closeOnConfirm && t.close() : n.is(r) ? e.closeOnCancel && t.close() : t.close()
  2950. }).on("click", function (t) {
  2951. s(t.target).is(i) && n.trigger("click.dimmer.modal.amui")
  2952. }), a.on("click.confirm.modal.amui", function () {
  2953. i.trigger(s.Event("confirm.modal.amui", {
  2954. trigger: this
  2955. }))
  2956. }), r.on("click.cancel.modal.amui", function () {
  2957. i.trigger(s.Event("cancel.modal.amui", {
  2958. trigger: this
  2959. }))
  2960. }), i.on("confirm.modal.amui", function (e) {
  2961. e.data = l(), t.options.onConfirm.call(t, e)
  2962. }).on("cancel.modal.amui", function (e) {
  2963. e.data = l(), t.options.onCancel.call(t, e)
  2964. })
  2965. }, s.fn.modal = n, r.on("click.modal.amui.data-api", "[data-am-modal]", function () {
  2966. var t = s(this),
  2967. e = o.utils.parseOptions(t.attr("data-am-modal")),
  2968. i = s(e.target || this.href && this.href.replace(/.*(?=#[^\s]+$)/, "")),
  2969. a = i.data("amui.modal") ? "toggle" : e;
  2970. n.call(i, a, this)
  2971. }), t.exports = o.modal = c
  2972. }, function (t, e, i) {
  2973. "use strict";
  2974. function n(t, e) {
  2975. var i = Array.prototype.slice.call(arguments, 1);
  2976. return this.each(function () {
  2977. var n = s(this),
  2978. o = n.data("amui.offcanvas"),
  2979. a = s.extend({}, "object" == typeof t && t);
  2980. o || (n.data("amui.offcanvas", o = new c(this, a)), (!t || "object" == typeof t) && o.open(e)), "string" == typeof t && o[t] && o[t].apply(o, i)
  2981. })
  2982. }
  2983. var s = i(1),
  2984. o = i(2);
  2985. i(3);
  2986. var a, r = s(window),
  2987. l = s(document),
  2988. c = function (t, e) {
  2989. this.$element = s(t), this.options = s.extend({}, c.DEFAULTS, e), this.active = null, this.bindEvents()
  2990. };
  2991. c.DEFAULTS = {
  2992. duration: 300,
  2993. effect: "overlay"
  2994. }, c.prototype.open = function (t) {
  2995. var e = this,
  2996. i = this.$element;
  2997. if (i.length && !i.hasClass("am-active")) {
  2998. var n = this.options.effect,
  2999. o = s("html"),
  3000. l = s("body"),
  3001. c = i.find(".am-offcanvas-bar").first(),
  3002. u = c.hasClass("am-offcanvas-bar-flip") ? -1 : 1;
  3003. c.addClass("am-offcanvas-bar-" + n), a = {
  3004. x: window.scrollX,
  3005. y: window.scrollY
  3006. }, i.addClass("am-active"), l.css({
  3007. width: window.innerWidth,
  3008. height: r.height()
  3009. }).addClass("am-offcanvas-page"), "overlay" !== n && l.css({
  3010. "margin-left": c.outerWidth() * u
  3011. }).width(), o.css("margin-top", a.y * -1), setTimeout(function () {
  3012. c.addClass("am-offcanvas-bar-active").width()
  3013. }, 0), i.trigger("open.offcanvas.amui"), this.active = 1, i.on("click.offcanvas.amui", function (t) {
  3014. var i = s(t.target);
  3015. i.hasClass("am-offcanvas-bar") || i.parents(".am-offcanvas-bar").first().length || (t.stopImmediatePropagation(), e.close())
  3016. }), o.on("keydown.offcanvas.amui", function (t) {
  3017. 27 === t.keyCode && e.close()
  3018. })
  3019. }
  3020. }, c.prototype.close = function (t) {
  3021. function e() {
  3022. r.removeClass("am-offcanvas-page").css({
  3023. width: "",
  3024. height: "",
  3025. "margin-left": "",
  3026. "margin-right": ""
  3027. }), l.removeClass("am-active"), c.removeClass("am-offcanvas-bar-active"), n.css("margin-top", ""), window.scrollTo(a.x, a.y), l.trigger("closed.offcanvas.amui"), i.active = 0
  3028. }
  3029. var i = this,
  3030. n = s("html"),
  3031. r = s("body"),
  3032. l = this.$element,
  3033. c = l.find(".am-offcanvas-bar").first();
  3034. l.length && this.active && l.hasClass("am-active") && (l.trigger("close.offcanvas.amui"), o.support.transition ? (setTimeout(function () {
  3035. c.removeClass("am-offcanvas-bar-active")
  3036. }, 0), r.css("margin-left", "").one(o.support.transition.end, function () {
  3037. e()
  3038. }).emulateTransitionEnd(this.options.duration)) : e(), l.off("click.offcanvas.amui"), n.off(".offcanvas.amui"))
  3039. }, c.prototype.bindEvents = function () {
  3040. var t = this;
  3041. return l.on("click.offcanvas.amui", '[data-am-dismiss="offcanvas"]', function (e) {
  3042. e.preventDefault(), t.close()
  3043. }), r.on("resize.offcanvas.amui orientationchange.offcanvas.amui", function () {
  3044. t.active && t.close()
  3045. }), this.$element.hammer().on("swipeleft swipeleft", function (e) {
  3046. e.preventDefault(), t.close()
  3047. }), this
  3048. }, s.fn.offCanvas = n, l.on("click.offcanvas.amui", "[data-am-offcanvas]", function (t) {
  3049. t.preventDefault();
  3050. var e = s(this),
  3051. i = o.utils.parseOptions(e.data("amOffcanvas")),
  3052. a = s(i.target || this.href && this.href.replace(/.*(?=#[^\s]+$)/, "")),
  3053. r = a.data("amui.offcanvas") ? "open" : i;
  3054. n.call(a, r, this)
  3055. }), t.exports = o.offcanvas = c
  3056. }, function (t, e, i) {
  3057. "use strict";
  3058. var n = i(1),
  3059. s = i(2),
  3060. o = s.utils.rAF,
  3061. a = function (t) {
  3062. var e = function (e, i) {
  3063. this.el = t(e), this.zoomFactor = 1, this.lastScale = 1, this.offset = {
  3064. x: 0,
  3065. y: 0
  3066. }, this.options = t.extend({}, this.defaults, i), this.setupMarkup(), this.bindEvents(), this.update(), this.enable()
  3067. },
  3068. i = function (t, e) {
  3069. return t + e
  3070. },
  3071. n = function (t, e) {
  3072. return t > e - .01 && t < e + .01
  3073. };
  3074. e.prototype = {
  3075. defaults: {
  3076. tapZoomFactor: 2,
  3077. zoomOutFactor: 1.3,
  3078. animationDuration: 300,
  3079. maxZoom: 4,
  3080. minZoom: .5,
  3081. lockDragAxis: !1,
  3082. use2d: !0,
  3083. zoomStartEventName: "pz_zoomstart",
  3084. zoomEndEventName: "pz_zoomend",
  3085. dragStartEventName: "pz_dragstart",
  3086. dragEndEventName: "pz_dragend",
  3087. doubleTapEventName: "pz_doubletap"
  3088. },
  3089. handleDragStart: function (t) {
  3090. this.el.trigger(this.options.dragStartEventName), this.stopAnimation(), this.lastDragPosition = !1, this.hasInteraction = !0, this.handleDrag(t)
  3091. },
  3092. handleDrag: function (t) {
  3093. if (this.zoomFactor > 1) {
  3094. var e = this.getTouches(t)[0];
  3095. this.drag(e, this.lastDragPosition), this.offset = this.sanitizeOffset(this.offset), this.lastDragPosition = e
  3096. }
  3097. },
  3098. handleDragEnd: function () {
  3099. this.el.trigger(this.options.dragEndEventName), this.end()
  3100. },
  3101. handleZoomStart: function (t) {
  3102. this.el.trigger(this.options.zoomStartEventName), this.stopAnimation(), this.lastScale = 1, this.nthZoom = 0, this.lastZoomCenter = !1, this.hasInteraction = !0
  3103. },
  3104. handleZoom: function (t, e) {
  3105. var i = this.getTouchCenter(this.getTouches(t)),
  3106. n = e / this.lastScale;
  3107. this.lastScale = e, this.nthZoom += 1, this.nthZoom > 3 && (this.scale(n, i), this.drag(i, this.lastZoomCenter)), this.lastZoomCenter = i
  3108. },
  3109. handleZoomEnd: function () {
  3110. this.el.trigger(this.options.zoomEndEventName), this.end()
  3111. },
  3112. handleDoubleTap: function (t) {
  3113. var e = this.getTouches(t)[0],
  3114. i = this.zoomFactor > 1 ? 1 : this.options.tapZoomFactor,
  3115. n = this.zoomFactor,
  3116. s = function (t) {
  3117. this.scaleTo(n + t * (i - n), e)
  3118. }.bind(this);
  3119. this.hasInteraction || (n > i && (e = this.getCurrentZoomCenter()), this.animate(this.options.animationDuration, s, this.swing), this.el.trigger(this.options.doubleTapEventName))
  3120. },
  3121. sanitizeOffset: function (t) {
  3122. var e = (this.zoomFactor - 1) * this.getContainerX(),
  3123. i = (this.zoomFactor - 1) * this.getContainerY(),
  3124. n = Math.max(e, 0),
  3125. s = Math.max(i, 0),
  3126. o = Math.min(e, 0),
  3127. a = Math.min(i, 0);
  3128. return {
  3129. x: Math.min(Math.max(t.x, o), n),
  3130. y: Math.min(Math.max(t.y, a), s)
  3131. }
  3132. },
  3133. scaleTo: function (t, e) {
  3134. this.scale(t / this.zoomFactor, e)
  3135. },
  3136. scale: function (t, e) {
  3137. t = this.scaleZoomFactor(t), this.addOffset({
  3138. x: (t - 1) * (e.x + this.offset.x),
  3139. y: (t - 1) * (e.y + this.offset.y)
  3140. })
  3141. },
  3142. scaleZoomFactor: function (t) {
  3143. var e = this.zoomFactor;
  3144. return this.zoomFactor *= t, this.zoomFactor = Math.min(this.options.maxZoom, Math.max(this.zoomFactor, this.options.minZoom)), this.zoomFactor / e
  3145. },
  3146. drag: function (t, e) {
  3147. e && (this.options.lockDragAxis ? Math.abs(t.x - e.x) > Math.abs(t.y - e.y) ? this.addOffset({
  3148. x: -(t.x - e.x),
  3149. y: 0
  3150. }) : this.addOffset({
  3151. y: -(t.y - e.y),
  3152. x: 0
  3153. }) : this.addOffset({
  3154. y: -(t.y - e.y),
  3155. x: -(t.x - e.x)
  3156. }))
  3157. },
  3158. getTouchCenter: function (t) {
  3159. return this.getVectorAvg(t)
  3160. },
  3161. getVectorAvg: function (t) {
  3162. return {
  3163. x: t.map(function (t) {
  3164. return t.x
  3165. }).reduce(i) / t.length,
  3166. y: t.map(function (t) {
  3167. return t.y
  3168. }).reduce(i) / t.length
  3169. }
  3170. },
  3171. addOffset: function (t) {
  3172. this.offset = {
  3173. x: this.offset.x + t.x,
  3174. y: this.offset.y + t.y
  3175. }
  3176. },
  3177. sanitize: function () {
  3178. this.zoomFactor < this.options.zoomOutFactor ? this.zoomOutAnimation() : this.isInsaneOffset(this.offset) && this.sanitizeOffsetAnimation()
  3179. },
  3180. isInsaneOffset: function (t) {
  3181. var e = this.sanitizeOffset(t);
  3182. return e.x !== t.x || e.y !== t.y
  3183. },
  3184. sanitizeOffsetAnimation: function () {
  3185. var t = this.sanitizeOffset(this.offset),
  3186. e = {
  3187. x: this.offset.x,
  3188. y: this.offset.y
  3189. },
  3190. i = function (i) {
  3191. this.offset.x = e.x + i * (t.x - e.x), this.offset.y = e.y + i * (t.y - e.y), this.update()
  3192. }.bind(this);
  3193. this.animate(this.options.animationDuration, i, this.swing)
  3194. },
  3195. zoomOutAnimation: function () {
  3196. var t = this.zoomFactor,
  3197. e = 1,
  3198. i = this.getCurrentZoomCenter(),
  3199. n = function (n) {
  3200. this.scaleTo(t + n * (e - t), i)
  3201. }.bind(this);
  3202. this.animate(this.options.animationDuration, n, this.swing)
  3203. },
  3204. updateAspectRatio: function () {
  3205. this.setContainerY(this.getContainerX() / this.getAspectRatio())
  3206. },
  3207. getInitialZoomFactor: function () {
  3208. return this.container[0].offsetWidth / this.el[0].offsetWidth
  3209. },
  3210. getAspectRatio: function () {
  3211. return this.el[0].offsetWidth / this.el[0].offsetHeight
  3212. },
  3213. getCurrentZoomCenter: function () {
  3214. var t = this.container[0].offsetWidth * this.zoomFactor,
  3215. e = this.offset.x,
  3216. i = t - e - this.container[0].offsetWidth,
  3217. n = e / i,
  3218. s = n * this.container[0].offsetWidth / (n + 1),
  3219. o = this.container[0].offsetHeight * this.zoomFactor,
  3220. a = this.offset.y,
  3221. r = o - a - this.container[0].offsetHeight,
  3222. l = a / r,
  3223. c = l * this.container[0].offsetHeight / (l + 1);
  3224. return 0 === i && (s = this.container[0].offsetWidth), 0 === r && (c = this.container[0].offsetHeight), {
  3225. x: s,
  3226. y: c
  3227. }
  3228. },
  3229. canDrag: function () {
  3230. return !n(this.zoomFactor, 1)
  3231. },
  3232. getTouches: function (t) {
  3233. var e = this.container.offset();
  3234. return Array.prototype.slice.call(t.touches).map(function (t) {
  3235. return {
  3236. x: t.pageX - e.left,
  3237. y: t.pageY - e.top
  3238. }
  3239. })
  3240. },
  3241. animate: function (t, e, i, n) {
  3242. var s = (new Date).getTime(),
  3243. a = function () {
  3244. if (this.inAnimation) {
  3245. var r = (new Date).getTime() - s,
  3246. l = r / t;
  3247. r >= t ? (e(1), n && n(), this.update(), this.stopAnimation(), this.update()) : (i && (l = i(l)), e(l), this.update(), o(a))
  3248. }
  3249. }.bind(this);
  3250. this.inAnimation = !0, o(a)
  3251. },
  3252. stopAnimation: function () {
  3253. this.inAnimation = !1
  3254. },
  3255. swing: function (t) {
  3256. return -Math.cos(t * Math.PI) / 2 + .5
  3257. },
  3258. getContainerX: function () {
  3259. return this.container[0].offsetWidth
  3260. },
  3261. getContainerY: function () {
  3262. return this.container[0].offsetHeight
  3263. },
  3264. setContainerY: function (t) {
  3265. return this.container.height(t)
  3266. },
  3267. setupMarkup: function () {
  3268. this.container = t('<div class="pinch-zoom-container"></div>'), this.el.before(this.container), this.container.append(this.el), this.container.css({
  3269. overflow: "hidden",
  3270. position: "relative"
  3271. }), this.el.css({
  3272. "-webkit-transform-origin": "0% 0%",
  3273. "-moz-transform-origin": "0% 0%",
  3274. "-ms-transform-origin": "0% 0%",
  3275. "-o-transform-origin": "0% 0%",
  3276. "transform-origin": "0% 0%",
  3277. position: "absolute"
  3278. })
  3279. },
  3280. end: function () {
  3281. this.hasInteraction = !1, this.sanitize(), this.update()
  3282. },
  3283. bindEvents: function () {
  3284. s(this.container.get(0), this), t(window).on("resize", this.update.bind(this)), t(this.el).find("img").on("load", this.update.bind(this))
  3285. },
  3286. update: function () {
  3287. this.updatePlaned || (this.updatePlaned = !0, setTimeout(function () {
  3288. this.updatePlaned = !1, this.updateAspectRatio();
  3289. var t = this.getInitialZoomFactor() * this.zoomFactor,
  3290. e = -this.offset.x / t,
  3291. i = -this.offset.y / t,
  3292. n = "scale3d(" + t + ", " + t + ",1) translate3d(" + e + "px," + i + "px,0px)",
  3293. s = "scale(" + t + ", " + t + ") translate(" + e + "px," + i + "px)",
  3294. o = function () {
  3295. this.clone && (this.clone.remove(), delete this.clone)
  3296. }.bind(this);
  3297. !this.options.use2d || this.hasInteraction || this.inAnimation ? (this.is3d = !0, o(), this.el.css({
  3298. "-webkit-transform": n,
  3299. "-o-transform": s,
  3300. "-ms-transform": s,
  3301. "-moz-transform": s,
  3302. transform: n
  3303. })) : (this.is3d && (this.clone = this.el.clone(), this.clone.css("pointer-events", "none"), this.clone.appendTo(this.container), setTimeout(o, 200)), this.el.css({
  3304. "-webkit-transform": s,
  3305. "-o-transform": s,
  3306. "-ms-transform": s,
  3307. "-moz-transform": s,
  3308. transform: s
  3309. }), this.is3d = !1)
  3310. }.bind(this), 0))
  3311. },
  3312. enable: function () {
  3313. this.enabled = !0
  3314. },
  3315. disable: function () {
  3316. this.enabled = !1
  3317. }
  3318. };
  3319. var s = function (t, e) {
  3320. var i = null,
  3321. n = 0,
  3322. s = null,
  3323. o = null,
  3324. a = function (t, n) {
  3325. if (i !== t) {
  3326. if (i && !t) switch (i) {
  3327. case "zoom":
  3328. e.handleZoomEnd(n);
  3329. break;
  3330. case "drag":
  3331. e.handleDragEnd(n)
  3332. }
  3333. switch (t) {
  3334. case "zoom":
  3335. e.handleZoomStart(n);
  3336. break;
  3337. case "drag":
  3338. e.handleDragStart(n)
  3339. }
  3340. }
  3341. i = t
  3342. },
  3343. r = function (t) {
  3344. 2 === n ? a("zoom") : 1 === n && e.canDrag() ? a("drag", t) : a(null, t)
  3345. },
  3346. l = function (t) {
  3347. return Array.prototype.slice.call(t).map(function (t) {
  3348. return {
  3349. x: t.pageX,
  3350. y: t.pageY
  3351. }
  3352. })
  3353. },
  3354. c = function (t, e) {
  3355. var i, n;
  3356. return i = t.x - e.x, n = t.y - e.y, Math.sqrt(i * i + n * n)
  3357. },
  3358. u = function (t, e) {
  3359. var i = c(t[0], t[1]),
  3360. n = c(e[0], e[1]);
  3361. return n / i
  3362. },
  3363. h = function (t) {
  3364. t.stopPropagation(), t.preventDefault()
  3365. },
  3366. d = function (t) {
  3367. var o = (new Date).getTime();
  3368. if (n > 1 && (s = null), o - s < 300) switch (h(t), e.handleDoubleTap(t), i) {
  3369. case "zoom":
  3370. e.handleZoomEnd(t);
  3371. break;
  3372. case "drag":
  3373. e.handleDragEnd(t)
  3374. }
  3375. 1 === n && (s = o)
  3376. },
  3377. p = !0;
  3378. t.addEventListener("touchstart", function (t) {
  3379. e.enabled && (p = !0, n = t.touches.length, d(t))
  3380. }), t.addEventListener("touchmove", function (t) {
  3381. if (e.enabled) {
  3382. if (p) r(t), i && h(t), o = l(t.touches);
  3383. else {
  3384. switch (i) {
  3385. case "zoom":
  3386. e.handleZoom(t, u(o, l(t.touches)));
  3387. break;
  3388. case "drag":
  3389. e.handleDrag(t)
  3390. }
  3391. i && (h(t), e.update())
  3392. }
  3393. p = !1
  3394. }
  3395. }), t.addEventListener("touchend", function (t) {
  3396. e.enabled && (n = t.touches.length, r(t))
  3397. })
  3398. };
  3399. return e
  3400. };
  3401. t.exports = s.pichzoom = a(n)
  3402. }, function (t, e, i) {
  3403. "use strict";
  3404. var n = i(1),
  3405. s = i(2),
  3406. o = n(window),
  3407. a = function (t, e) {
  3408. this.options = n.extend({}, a.DEFAULTS, e), this.$element = n(t), this.active = null, this.$popover = this.options.target && n(this.options.target) || null, this.init(), this._bindEvents()
  3409. };
  3410. a.DEFAULTS = {
  3411. theme: null,
  3412. trigger: "click",
  3413. content: "",
  3414. open: !1,
  3415. target: null,
  3416. tpl: '<div class="am-popover"><div class="am-popover-inner"></div><div class="am-popover-caret"></div></div>'
  3417. }, a.prototype.init = function () {
  3418. function t() {
  3419. i.sizePopover()
  3420. }
  3421. var e, i = this,
  3422. o = this.$element;
  3423. this.options.target || (this.$popover = this.getPopover(), this.setContent()), e = this.$popover, e.appendTo(n("body")), this.sizePopover(), o.on("open.popover.amui", function () {
  3424. n(window).on("resize.popover.amui", s.utils.debounce(t, 50))
  3425. }), o.on("close.popover.amui", function () {
  3426. n(window).off("resize.popover.amui", t)
  3427. }), this.options.open && this.open()
  3428. }, a.prototype.sizePopover = function () {
  3429. var t = this.$element,
  3430. e = this.$popover;
  3431. if (e && e.length) {
  3432. var i = e.outerWidth(),
  3433. n = e.outerHeight(),
  3434. s = e.find(".am-popover-caret"),
  3435. a = s.outerWidth() / 2 || 8,
  3436. r = n + 8,
  3437. l = t.outerWidth(),
  3438. c = t.outerHeight(),
  3439. u = t.offset(),
  3440. h = t[0].getBoundingClientRect(),
  3441. d = o.height(),
  3442. p = o.width(),
  3443. m = 0,
  3444. f = 0,
  3445. v = 0,
  3446. g = 2,
  3447. y = "top";
  3448. e.css({
  3449. left: "",
  3450. top: ""
  3451. }).removeClass("am-popover-left am-popover-right am-popover-top am-popover-bottom"), r - g < h.top + g ? m = u.top - r - g : r < d - h.top - h.height ? (y = "bottom", m = u.top + c + a + g) : (y = "middle", m = c / 2 + u.top - n / 2), "top" === y || "bottom" === y ? (f = l / 2 + u.left - i / 2, v = f, f < 5 && (f = 5), f + i > p && (f = p - i - 20), "top" === y && e.addClass("am-popover-top"), "bottom" === y && e.addClass("am-popover-bottom"), v -= f) : "middle" === y && (f = u.left - i - a, e.addClass("am-popover-left"), f < 5 && (f = u.left + l + a, e.removeClass("am-popover-left").addClass("am-popover-right")), f + i > p && (f = p - i - 5, e.removeClass("am-popover-left").addClass("am-popover-right"))), e.css({
  3452. top: m + "px",
  3453. left: f + "px"
  3454. })
  3455. }
  3456. }, a.prototype.toggle = function () {
  3457. return this[this.active ? "close" : "open"]()
  3458. }, a.prototype.open = function () {
  3459. var t = this.$popover;
  3460. this.$element.trigger("open.popover.amui"), this.sizePopover(), t.show().addClass("am-active"), this.active = !0
  3461. }, a.prototype.close = function () {
  3462. var t = this.$popover;
  3463. this.$element.trigger("close.popover.amui"), t.removeClass("am-active").trigger("closed.popover.amui").hide(), this.active = !1
  3464. }, a.prototype.getPopover = function () {
  3465. var t = s.utils.generateGUID("am-popover"),
  3466. e = [];
  3467. return this.options.theme && n.each(this.options.theme.split(" "), function (t, i) {
  3468. e.push("am-popover-" + n.trim(i))
  3469. }), n(this.options.tpl).attr("id", t).addClass(e.join(" "))
  3470. }, a.prototype.setContent = function (t) {
  3471. t = t || this.options.content, this.$popover && this.$popover.find(".am-popover-inner").empty().html(t)
  3472. }, a.prototype._bindEvents = function () {
  3473. for (var t = "popover.amui", e = this.options.trigger.split(" "), i = e.length; i--;) {
  3474. var s = e[i];
  3475. if ("click" === s) this.$element.on("click." + t, n.proxy(this.toggle, this));
  3476. else {
  3477. var o = "hover" == s ? "mouseenter" : "focusin",
  3478. a = "hover" == s ? "mouseleave" : "focusout";
  3479. this.$element.on(o + "." + t, n.proxy(this.open, this)), this.$element.on(a + "." + t, n.proxy(this.close, this))
  3480. }
  3481. }
  3482. }, a.prototype.destroy = function () {
  3483. this.$element.off(".popover.amui").removeData("amui.popover"), this.$popover.remove()
  3484. }, s.plugin("popover", a), s.ready(function (t) {
  3485. n("[data-am-popover]", t).popover()
  3486. }), t.exports = a
  3487. }, function (t, e, i) {
  3488. "use strict";
  3489. var n = i(2),
  3490. s = function () {
  3491. function t(t, e, i) {
  3492. return t < e ? e : t > i ? i : t
  3493. }
  3494. function e(t) {
  3495. return 100 * (-1 + t)
  3496. }
  3497. function i(t, i, n) {
  3498. var s;
  3499. return s = "translate3d" === c.positionUsing ? {
  3500. transform: "translate3d(" + e(t) + "%,0,0)"
  3501. } : "translate" === c.positionUsing ? {
  3502. transform: "translate(" + e(t) + "%,0)"
  3503. } : {
  3504. "margin-left": e(t) + "%"
  3505. }, s.transition = "all " + i + "ms " + n, s
  3506. }
  3507. function n(t, e) {
  3508. var i = "string" == typeof t ? t : a(t);
  3509. return i.indexOf(" " + e + " ") >= 0
  3510. }
  3511. function s(t, e) {
  3512. var i = a(t),
  3513. s = i + e;
  3514. n(i, e) || (t.className = s.substring(1))
  3515. }
  3516. function o(t, e) {
  3517. var i, s = a(t);
  3518. n(t, e) && (i = s.replace(" " + e + " ", " "), t.className = i.substring(1, i.length - 1))
  3519. }
  3520. function a(t) {
  3521. return (" " + (t.className || "") + " ").replace(/\s+/gi, " ")
  3522. }
  3523. function r(t) {
  3524. t && t.parentNode && t.parentNode.removeChild(t)
  3525. }
  3526. var l = {};
  3527. l.version = "0.2.0";
  3528. var c = l.settings = {
  3529. minimum: .08,
  3530. easing: "ease",
  3531. positionUsing: "",
  3532. speed: 200,
  3533. trickle: !0,
  3534. trickleRate: .02,
  3535. trickleSpeed: 800,
  3536. showSpinner: !0,
  3537. parent: "body",
  3538. barSelector: '[role="nprogress-bar"]',
  3539. spinnerSelector: '[role="nprogress-spinner"]',
  3540. template: '<div class="nprogress-bar" role="nprogress-bar"><div class="nprogress-peg"></div></div><div class="nprogress-spinner" role="nprogress-spinner"><div class="nprogress-spinner-icon"></div></div>'
  3541. };
  3542. l.configure = function (t) {
  3543. var e, i;
  3544. for (e in t) i = t[e], void 0 !== i && t.hasOwnProperty(e) && (c[e] = i);
  3545. return this
  3546. }, l.status = null, l.set = function (e) {
  3547. var n = l.isStarted();
  3548. e = t(e, c.minimum, 1), l.status = 1 === e ? null : e;
  3549. var s = l.render(!n),
  3550. o = s.querySelector(c.barSelector),
  3551. a = c.speed,
  3552. r = c.easing;
  3553. return s.offsetWidth, u(function (t) {
  3554. "" === c.positionUsing && (c.positionUsing = l.getPositioningCSS()), h(o, i(e, a, r)), 1 === e ? (h(s, {
  3555. transition: "none",
  3556. opacity: 1
  3557. }), s.offsetWidth, setTimeout(function () {
  3558. h(s, {
  3559. transition: "all " + a + "ms linear",
  3560. opacity: 0
  3561. }), setTimeout(function () {
  3562. l.remove(), t()
  3563. }, a)
  3564. }, a)) : setTimeout(t, a)
  3565. }), this
  3566. }, l.isStarted = function () {
  3567. return "number" == typeof l.status
  3568. }, l.start = function () {
  3569. l.status || l.set(0);
  3570. var t = function () {
  3571. setTimeout(function () {
  3572. l.status && (l.trickle(), t())
  3573. }, c.trickleSpeed)
  3574. };
  3575. return c.trickle && t(), this
  3576. }, l.done = function (t) {
  3577. return t || l.status ? l.inc(.3 + .5 * Math.random()).set(1) : this
  3578. }, l.inc = function (e) {
  3579. var i = l.status;
  3580. return i ? ("number" != typeof e && (e = (1 - i) * t(Math.random() * i, .1, .95)), i = t(i + e, 0, .994), l.set(i)) : l.start()
  3581. }, l.trickle = function () {
  3582. return l.inc(Math.random() * c.trickleRate)
  3583. },
  3584. function () {
  3585. var t = 0,
  3586. e = 0;
  3587. l.promise = function (i) {
  3588. return i && "resolved" !== i.state() ? (0 === e && l.start(), t++, e++, i.always(function () {
  3589. e--, 0 === e ? (t = 0, l.done()) : l.set((t - e) / t)
  3590. }), this) : this
  3591. }
  3592. }(), l.render = function (t) {
  3593. if (l.isRendered()) return document.getElementById("nprogress");
  3594. s(document.documentElement, "nprogress-busy");
  3595. var i = document.createElement("div");
  3596. i.id = "nprogress", i.innerHTML = c.template;
  3597. var n, o = i.querySelector(c.barSelector),
  3598. a = t ? "-100" : e(l.status || 0),
  3599. u = document.querySelector(c.parent);
  3600. return h(o, {
  3601. transition: "all 0 linear",
  3602. transform: "translate3d(" + a + "%,0,0)"
  3603. }), c.showSpinner || (n = i.querySelector(c.spinnerSelector), n && r(n)), u != document.body && s(u, "nprogress-custom-parent"), u.appendChild(i), i
  3604. }, l.remove = function () {
  3605. o(document.documentElement, "nprogress-busy"), o(document.querySelector(c.parent), "nprogress-custom-parent");
  3606. var t = document.getElementById("nprogress");
  3607. t && r(t)
  3608. }, l.isRendered = function () {
  3609. return !!document.getElementById("nprogress")
  3610. }, l.getPositioningCSS = function () {
  3611. var t = document.body.style,
  3612. e = "WebkitTransform" in t ? "Webkit" : "MozTransform" in t ? "Moz" : "msTransform" in t ? "ms" : "OTransform" in t ? "O" : "";
  3613. return e + "Perspective" in t ? "translate3d" : e + "Transform" in t ? "translate" : "margin"
  3614. };
  3615. var u = function () {
  3616. function t() {
  3617. var i = e.shift();
  3618. i && i(t)
  3619. }
  3620. var e = [];
  3621. return function (i) {
  3622. e.push(i), 1 == e.length && t()
  3623. }
  3624. }(),
  3625. h = function () {
  3626. function t(t) {
  3627. return t.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (t, e) {
  3628. return e.toUpperCase()
  3629. })
  3630. }
  3631. function e(t) {
  3632. var e = document.body.style;
  3633. if (t in e) return t;
  3634. for (var i, n = s.length, o = t.charAt(0).toUpperCase() + t.slice(1); n--;)
  3635. if (i = s[n] + o, i in e) return i;
  3636. return t
  3637. }
  3638. function i(i) {
  3639. return i = t(i), o[i] || (o[i] = e(i))
  3640. }
  3641. function n(t, e, n) {
  3642. e = i(e), t.style[e] = n
  3643. }
  3644. var s = ["Webkit", "O", "Moz", "ms"],
  3645. o = {};
  3646. return function (t, e) {
  3647. var i, s, o = arguments;
  3648. if (2 == o.length)
  3649. for (i in e) s = e[i], void 0 !== s && e.hasOwnProperty(i) && n(t, i, s);
  3650. else n(t, o[1], o[2])
  3651. }
  3652. }();
  3653. return l
  3654. }();
  3655. t.exports = n.progress = s
  3656. }, function (t, e, i) {
  3657. "use strict";
  3658. var n = i(1),
  3659. s = i(2),
  3660. o = i(17),
  3661. a = i(3),
  3662. r = s.support.animation,
  3663. l = s.support.transition,
  3664. c = function (t, e) {
  3665. this.$element = n(t), this.$body = n(document.body), this.options = n.extend({}, c.DEFAULTS, e), this.$pureview = n(this.options.tpl).attr("id", s.utils.generateGUID("am-pureview")), this.$slides = null, this.transitioning = null, this.scrollbarWidth = 0, this.init()
  3666. };
  3667. c.DEFAULTS = {
  3668. tpl: '<div class="am-pureview am-pureview-bar-active"><ul class="am-pureview-slider"></ul><ul class="am-pureview-direction"><li class="am-pureview-prev"><a href=""></a></li><li class="am-pureview-next"><a href=""></a></li></ul><ol class="am-pureview-nav"></ol><div class="am-pureview-bar am-active"><span class="am-pureview-title"></span><div class="am-pureview-counter"><span class="am-pureview-current"></span> / <span class="am-pureview-total"></span></div></div><div class="am-pureview-actions am-active"><a href="javascript: void(0)" class="am-icon-chevron-left" data-am-close="pureview"></a></div></div>',
  3669. className: {
  3670. prevSlide: "am-pureview-slide-prev",
  3671. nextSlide: "am-pureview-slide-next",
  3672. onlyOne: "am-pureview-only",
  3673. active: "am-active",
  3674. barActive: "am-pureview-bar-active",
  3675. activeBody: "am-pureview-active"
  3676. },
  3677. selector: {
  3678. slider: ".am-pureview-slider",
  3679. close: '[data-am-close="pureview"]',
  3680. total: ".am-pureview-total",
  3681. current: ".am-pureview-current",
  3682. title: ".am-pureview-title",
  3683. actions: ".am-pureview-actions",
  3684. bar: ".am-pureview-bar",
  3685. pinchZoom: ".am-pinch-zoom",
  3686. nav: ".am-pureview-nav"
  3687. },
  3688. shareBtn: !1,
  3689. toggleToolbar: !0,
  3690. target: "img",
  3691. weChatImagePreview: !0
  3692. }, c.prototype.init = function () {
  3693. var t = this,
  3694. e = this.options,
  3695. i = this.$element,
  3696. s = this.$pureview;
  3697. this.refreshSlides(), n("body").append(s), this.$title = s.find(e.selector.title), this.$current = s.find(e.selector.current), this.$bar = s.find(e.selector.bar), this.$actions = s.find(e.selector.actions), e.shareBtn && this.$actions.append('<a href="javascript: void(0)" class="am-icon-share-square-o" data-am-toggle="share"></a>'), this.$element.on("click.pureview.amui", e.target, function (i) {
  3698. i.preventDefault();
  3699. var n = t.$images.index(this);
  3700. e.weChatImagePreview && window.WeixinJSBridge ? window.WeixinJSBridge.invoke("imagePreview", {
  3701. current: t.imgUrls[n],
  3702. urls: t.imgUrls
  3703. }) : t.open(n)
  3704. }), s.find(".am-pureview-direction").on("click.direction.pureview.amui", "li", function (e) {
  3705. e.preventDefault(), n(this).is(".am-pureview-prev") ? t.prevSlide() : t.nextSlide()
  3706. }), s.find(e.selector.nav).on("click.nav.pureview.amui", "li", function () {
  3707. var e = t.$navItems.index(n(this));
  3708. t.activate(t.$slides.eq(e))
  3709. }), s.find(e.selector.close).on("click.close.pureview.amui", function (e) {
  3710. e.preventDefault(), t.close()
  3711. }), this.$slider.hammer().on("swipeleft.pureview.amui", function (e) {
  3712. e.preventDefault(), t.nextSlide()
  3713. }).on("swiperight.pureview.amui", function (e) {
  3714. e.preventDefault(), t.prevSlide()
  3715. }).on("press.pureview.amui", function (i) {
  3716. i.preventDefault(), e.toggleToolbar && t.toggleToolBar()
  3717. }), this.$slider.data("hammer").get("swipe").set({
  3718. direction: a.DIRECTION_HORIZONTAL,
  3719. velocity: .35
  3720. }), i.DOMObserve({
  3721. childList: !0,
  3722. subtree: !0
  3723. }, function (t, e) {}), i.on("changed.dom.amui", function (e) {
  3724. e.stopPropagation(), t.refreshSlides()
  3725. }), n(document).on("keydown.pureview.amui", n.proxy(function (t) {
  3726. var e = t.keyCode;
  3727. 37 == e ? this.prevSlide() : 39 == e ? this.nextSlide() : 27 == e && this.close()
  3728. }, this))
  3729. }, c.prototype.refreshSlides = function () {
  3730. this.$images = this.$element.find(this.options.target);
  3731. var t = this,
  3732. e = this.options,
  3733. i = this.$pureview,
  3734. o = n([]),
  3735. a = n([]),
  3736. r = this.$images,
  3737. l = r.length;
  3738. this.$slider = i.find(e.selector.slider), this.$nav = i.find(e.selector.nav);
  3739. var c = "data-am-pureviewed";
  3740. this.imgUrls = this.imgUrls || [], l && (1 === l && i.addClass(e.className.onlyOne), r.not("[" + c + "]").each(function (e, i) {
  3741. var r, l;
  3742. "A" === i.nodeName ? (r = i.href, l = i.title || "") : (r = n(i).data("rel") || i.src, r = s.utils.getAbsoluteUrl(r), l = n(i).attr("alt") || ""), i.setAttribute(c, "1"), t.imgUrls.push(r), o = o.add(n('<li data-src="' + r + '" data-title="' + l + '"></li>')), a = a.add(n("<li>" + (e + 1) + "</li>"))
  3743. }), i.find(e.selector.total).text(l), this.$slider.append(o), this.$nav.append(a), this.$navItems = this.$nav.find("li"), this.$slides = this.$slider.find("li"))
  3744. }, c.prototype.loadImage = function (t, e) {
  3745. var i = "image-appended";
  3746. if (!t.data(i)) {
  3747. var s = n("<img>", {
  3748. src: t.data("src"),
  3749. alt: t.data("title")
  3750. });
  3751. t.html(s).wrapInner('<div class="am-pinch-zoom"></div>').redraw();
  3752. var a = t.find(this.options.selector.pinchZoom);
  3753. a.data("amui.pinchzoom", new o(a[0], {})), t.data("image-appended", !0)
  3754. }
  3755. e && e.call(this)
  3756. }, c.prototype.activate = function (t) {
  3757. var e = this.options,
  3758. i = this.$slides,
  3759. o = i.index(t),
  3760. a = t.data("title") || "",
  3761. r = e.className.active;
  3762. i.find("." + r).is(t) || this.transitioning || (this.loadImage(t, function () {
  3763. s.utils.imageLoader(t.find("img"), function (e) {
  3764. t.find(".am-pinch-zoom").addClass("am-pureview-loaded"), n(e).addClass("am-img-loaded")
  3765. })
  3766. }), this.transitioning = 1, this.$title.text(a), this.$current.text(o + 1), i.removeClass(), t.addClass(r), i.eq(o - 1).addClass(e.className.prevSlide), i.eq(o + 1).addClass(e.className.nextSlide), this.$navItems.removeClass().eq(o).addClass(e.className.active), l ? t.one(l.end, n.proxy(function () {
  3767. this.transitioning = 0
  3768. }, this)).emulateTransitionEnd(300) : this.transitioning = 0)
  3769. }, c.prototype.nextSlide = function () {
  3770. if (1 !== this.$slides.length) {
  3771. var t = this.$slides,
  3772. e = t.filter(".am-active"),
  3773. i = t.index(e),
  3774. n = "am-animation-right-spring";
  3775. i + 1 >= t.length ? r && e.addClass(n).on(r.end, function () {
  3776. e.removeClass(n)
  3777. }) : this.activate(t.eq(i + 1))
  3778. }
  3779. }, c.prototype.prevSlide = function () {
  3780. if (1 !== this.$slides.length) {
  3781. var t = this.$slides,
  3782. e = t.filter(".am-active"),
  3783. i = this.$slides.index(e),
  3784. n = "am-animation-left-spring";
  3785. 0 === i ? r && e.addClass(n).on(r.end, function () {
  3786. e.removeClass(n)
  3787. }) : this.activate(t.eq(i - 1))
  3788. }
  3789. }, c.prototype.toggleToolBar = function () {
  3790. this.$pureview.toggleClass(this.options.className.barActive)
  3791. }, c.prototype.open = function (t) {
  3792. var e = t || 0;
  3793. this.checkScrollbar(), this.setScrollbar(), this.activate(this.$slides.eq(e)), this.$pureview.show().redraw().addClass(this.options.className.active), this.$body.addClass(this.options.className.activeBody)
  3794. }, c.prototype.close = function () {
  3795. function t() {
  3796. this.$pureview.hide(), this.$body.removeClass(e.className.activeBody), this.resetScrollbar()
  3797. }
  3798. var e = this.options;
  3799. this.$pureview.removeClass(e.className.active), this.$slides.removeClass(), l ? this.$pureview.one(l.end, n.proxy(t, this)).emulateTransitionEnd(300) : t.call(this)
  3800. }, c.prototype.checkScrollbar = function () {
  3801. this.scrollbarWidth = s.utils.measureScrollbar()
  3802. }, c.prototype.setScrollbar = function () {
  3803. var t = parseInt(this.$body.css("padding-right") || 0, 10);
  3804. this.scrollbarWidth && this.$body.css("padding-right", t + this.scrollbarWidth)
  3805. }, c.prototype.resetScrollbar = function () {
  3806. this.$body.css("padding-right", "")
  3807. }, s.plugin("pureview", c), s.ready(function (t) {
  3808. n("[data-am-pureview]", t).pureview()
  3809. }), t.exports = c
  3810. }, function (t, e, i) {
  3811. "use strict";
  3812. var n = i(1),
  3813. s = i(2),
  3814. o = function (t, e) {
  3815. if (s.support.animation) {
  3816. this.options = n.extend({}, o.DEFAULTS, e), this.$element = n(t);
  3817. var i = function () {
  3818. s.utils.rAF.call(window, n.proxy(this.checkView, this))
  3819. }.bind(this);
  3820. this.$window = n(window).on("scroll.scrollspy.amui", i).on("resize.scrollspy.amui orientationchange.scrollspy.amui", s.utils.debounce(i, 50)), this.timer = this.inViewState = this.initInView = null, i()
  3821. }
  3822. };
  3823. o.DEFAULTS = {
  3824. animation: "fade",
  3825. className: {
  3826. inView: "am-scrollspy-inview",
  3827. init: "am-scrollspy-init"
  3828. },
  3829. repeat: !0,
  3830. delay: 0,
  3831. topOffset: 0,
  3832. leftOffset: 0
  3833. }, o.prototype.checkView = function () {
  3834. var t = this.$element,
  3835. e = this.options,
  3836. i = s.utils.isInView(t, e),
  3837. n = e.animation ? " am-animation-" + e.animation : "";
  3838. i && !this.inViewState && (this.timer && clearTimeout(this.timer), this.initInView || (t.addClass(e.className.init), this.offset = t.offset(), this.initInView = !0, t.trigger("init.scrollspy.amui")), this.timer = setTimeout(function () {
  3839. i && t.addClass(e.className.inView + n).width()
  3840. }, e.delay), this.inViewState = !0, t.trigger("inview.scrollspy.amui")), !i && this.inViewState && e.repeat && (t.removeClass(e.className.inView + n), this.inViewState = !1, t.trigger("outview.scrollspy.amui"))
  3841. }, o.prototype.check = function () {
  3842. s.utils.rAF.call(window, n.proxy(this.checkView, this))
  3843. }, s.plugin("scrollspy", o), s.ready(function (t) {
  3844. n("[data-am-scrollspy]", t).scrollspy()
  3845. }), t.exports = o
  3846. }, function (t, e, i) {
  3847. "use strict";
  3848. var n = i(1),
  3849. s = i(2);
  3850. i(23);
  3851. var o = function (t, e) {
  3852. this.options = n.extend({}, o.DEFAULTS, e), this.$element = n(t), this.anchors = [], this.$links = this.$element.find('a[href^="#"]').each(function (t, e) {
  3853. this.anchors.push(n(e).attr("href"))
  3854. }.bind(this)), this.$targets = n(this.anchors.join(", "));
  3855. var i = function () {
  3856. s.utils.rAF.call(window, n.proxy(this.process, this))
  3857. }.bind(this);
  3858. this.$window = n(window).on("scroll.scrollspynav.amui", i).on("resize.scrollspynav.amui orientationchange.scrollspynav.amui", s.utils.debounce(i, 50)), i(), this.scrollProcess()
  3859. };
  3860. o.DEFAULTS = {
  3861. className: {
  3862. active: "am-active"
  3863. },
  3864. closest: !1,
  3865. smooth: !0,
  3866. offsetTop: 0
  3867. }, o.prototype.process = function () {
  3868. var t = this.$window.scrollTop(),
  3869. e = this.options,
  3870. i = [],
  3871. o = this.$links,
  3872. a = this.$targets;
  3873. if (a.each(function (t, n) {
  3874. s.utils.isInView(n, e) && i.push(n)
  3875. }), i.length) {
  3876. var r;
  3877. if (n.each(i, function (e, i) {
  3878. if (n(i).offset().top >= t) return r = n(i), !1
  3879. }), !r) return;
  3880. e.closest ? (o.closest(e.closest).removeClass(e.className.active), o.filter('a[href="#' + r.attr("id") + '"]').closest(e.closest).addClass(e.className.active)) : o.removeClass(e.className.active).filter('a[href="#' + r.attr("id") + '"]').addClass(e.className.active)
  3881. }
  3882. }, o.prototype.scrollProcess = function () {
  3883. var t = this.$links,
  3884. e = this.options;
  3885. e.smooth && n.fn.smoothScroll && t.on("click", function (t) {
  3886. t.preventDefault();
  3887. var i = n(this),
  3888. s = n(i.attr("href"));
  3889. if (s) {
  3890. var o = e.offsetTop && !isNaN(parseInt(e.offsetTop)) && parseInt(e.offsetTop) || 0;
  3891. n(window).smoothScroll({
  3892. position: s.offset().top - o
  3893. })
  3894. }
  3895. })
  3896. }, s.plugin("scrollspynav", o), s.ready(function (t) {
  3897. n("[data-am-scrollspynav]", t).scrollspynav()
  3898. }), t.exports = o
  3899. }, function (t, e, i) {
  3900. "use strict";
  3901. var n = i(1),
  3902. s = i(2),
  3903. o = s.utils.rAF,
  3904. a = s.utils.cancelAF,
  3905. r = !1,
  3906. l = function (t, e) {
  3907. function i(t) {
  3908. return (t /= .5) < 1 ? .5 * Math.pow(t, 5) : .5 * (Math.pow(t - 2, 5) + 2)
  3909. }
  3910. function s() {
  3911. p.off("touchstart.smoothscroll.amui", w), r = !1
  3912. }
  3913. function c(t) {
  3914. r && (u || (u = t), h = Math.min(1, Math.max((t - u) / y, 0)), d = Math.round(f + g * i(h)), g > 0 && d > m && (d = m), g < 0 && d < m && (d = m), v != d && p.scrollTop(d), v = d, d !== m ? (a(b), b = o(c)) : (a(b), s()))
  3915. }
  3916. e = e || {};
  3917. var u, h, d, p = n(t),
  3918. m = parseInt(e.position) || l.DEFAULTS.position,
  3919. f = p.scrollTop(),
  3920. v = f,
  3921. g = m - f,
  3922. y = e.speed || Math.min(750, Math.min(1500, Math.abs(f - m))),
  3923. w = function () {
  3924. s()
  3925. };
  3926. if (!r && 0 !== g) {
  3927. p.on("touchstart.smoothscroll.amui", w), r = !0;
  3928. var b = o(c)
  3929. }
  3930. };
  3931. l.DEFAULTS = {
  3932. position: 0
  3933. }, n.fn.smoothScroll = function (t) {
  3934. return this.each(function () {
  3935. new l(this, t)
  3936. })
  3937. }, n(document).on("click.smoothScroll.amui.data-api", "[data-am-smooth-scroll]", function (t) {
  3938. t.preventDefault();
  3939. var e = s.utils.parseOptions(n(this).data("amSmoothScroll"));
  3940. n(window).smoothScroll(e)
  3941. }), t.exports = l
  3942. }, function (t, e, i) {
  3943. "use strict";
  3944. var n = i(1),
  3945. s = i(2);
  3946. n.expr[":"].containsNC = function (t, e, i, n) {
  3947. return (t.textContent || t.innerText || "").toLowerCase().indexOf((i[3] || "").toLowerCase()) >= 0
  3948. };
  3949. var o = function (t, e) {
  3950. this.$element = n(t), this.options = n.extend({}, o.DEFAULTS, {
  3951. placeholder: t.getAttribute("placeholder") || o.DEFAULTS.placeholder
  3952. }, e), this.$originalOptions = this.$element.find("option"), this.multiple = t.multiple, this.$selector = null, this.initialized = !1, this.init()
  3953. };
  3954. o.DEFAULTS = {
  3955. btnWidth: null,
  3956. btnSize: null,
  3957. btnStyle: "default",
  3958. dropUp: 0,
  3959. maxHeight: null,
  3960. maxChecked: null,
  3961. placeholder: "\u70b9\u51fb\u9009\u62e9...",
  3962. selectedClass: "am-checked",
  3963. disabledClass: "am-disabled",
  3964. searchBox: !1,
  3965. tpl: '<div class="am-selected am-dropdown <%= dropUp ? \'am-dropdown-up\': \'\' %>" id="<%= id %>" data-am-dropdown> <button type="button" class="am-selected-btn am-btn am-dropdown-toggle"> <span class="am-selected-status am-fl"></span> <i class="am-selected-icon am-icon-caret-<%= dropUp ? \'up\' : \'down\' %>"></i> </button> <div class="am-selected-content am-dropdown-content"> <h2 class="am-selected-header"><span class="am-icon-chevron-left">\u8fd4\u56de</span></h2> <% if (searchBox) { %> <div class="am-selected-search"> <input autocomplete="off" class="am-form-field am-input-sm" /> </div> <% } %> <ul class="am-selected-list"> <% for (var i = 0; i < options.length; i++) { %> <% var option = options[i] %> <% if (option.header) { %> <li data-group="<%= option.group %>" class="am-selected-list-header"> <%= option.text %></li> <% } else { %> <li class="<%= option.classNames%>" data-index="<%= option.index %>" data-group="<%= option.group || 0 %>" data-value="<%= option.value %>" > <span class="am-selected-text"><%= option.text %></span> <i class="am-icon-check"></i></li> <% } %> <% } %> </ul> <div class="am-selected-hint"></div> </div></div>',
  3966. listTpl: '<% for (var i = 0; i < options.length; i++) { %> <% var option = options[i] %> <% if (option.header) { %> <li data-group="<%= option.group %>" class="am-selected-list-header"> <%= option.text %></li> <% } else { %> <li class="<%= option.classNames %>" data-index="<%= option.index %>" data-group="<%= option.group || 0 %>" data-value="<%= option.value %>" > <span class="am-selected-text"><%= option.text %></span> <i class="am-icon-check"></i></li> <% } %> <% } %>'
  3967. }, o.prototype.init = function () {
  3968. var t = this,
  3969. e = this.$element,
  3970. i = this.options;
  3971. e.hide();
  3972. var o = {
  3973. id: s.utils.generateGUID("am-selected"),
  3974. multiple: this.multiple,
  3975. options: [],
  3976. searchBox: i.searchBox,
  3977. dropUp: i.dropUp,
  3978. placeholder: i.placeholder
  3979. };
  3980. this.$selector = n(s.template(this.options.tpl, o)), this.$selector.css({
  3981. width: this.options.btnWidth
  3982. }), this.$list = this.$selector.find(".am-selected-list"), this.$searchField = this.$selector.find(".am-selected-search input"), this.$hint = this.$selector.find(".am-selected-hint");
  3983. var a = this.$selector.find(".am-selected-btn"),
  3984. r = [];
  3985. i.btnSize && r.push("am-btn-" + i.btnSize), i.btnStyle && r.push("am-btn-" + i.btnStyle), a.addClass(r.join(" ")), this.$selector.dropdown({
  3986. justify: a
  3987. }), e[0].disabled && this.disable(), i.maxHeight && this.$selector.find(".am-selected-list").css({
  3988. "max-height": i.maxHeight,
  3989. "overflow-y": "scroll"
  3990. });
  3991. var l = [],
  3992. c = e.attr("minchecked"),
  3993. u = e.attr("maxchecked") || i.maxChecked;
  3994. this.maxChecked = u || 1 / 0, e[0].required && l.push("\u5fc5\u9009"), (c || u) && (c && l.push("\u81f3\u5c11\u9009\u62e9 " + c + " \u9879"), u && l.push("\u81f3\u591a\u9009\u62e9 " + u + " \u9879")), this.$hint.text(l.join("\uff0c")), this.renderOptions(), this.$element.after(this.$selector), this.dropdown = this.$selector.data("amui.dropdown"), this.$status = this.$selector.find(".am-selected-status"), setTimeout(function () {
  3995. t.syncData(), t.initialized = !0
  3996. }, 0), this.bindEvents()
  3997. }, o.prototype.renderOptions = function () {
  3998. function t(t, e, s) {
  3999. if ("" === e.value) return !0;
  4000. var o = "";
  4001. e.disabled && (o += i.disabledClass), !e.disabled && e.selected && (o += i.selectedClass), n.push({
  4002. group: s,
  4003. index: t,
  4004. classNames: o,
  4005. text: e.text,
  4006. value: e.value
  4007. })
  4008. }
  4009. var e = this.$element,
  4010. i = this.options,
  4011. n = [],
  4012. o = e.find("optgroup");
  4013. this.$originalOptions = this.$element.find("option"), this.multiple || null !== e.val() || this.$originalOptions.length && (this.$originalOptions.get(0).selected = !0), o.length ? o.each(function (e) {
  4014. n.push({
  4015. header: !0,
  4016. group: e + 1,
  4017. text: this.label
  4018. }), o.eq(e).find("option").each(function (i, n) {
  4019. t(i, n, e)
  4020. })
  4021. }) : this.$originalOptions.each(function (e, i) {
  4022. t(e, i, null)
  4023. }), this.$list.html(s.template(i.listTpl, {
  4024. options: n
  4025. })), this.$shadowOptions = this.$list.find("> li").not(".am-selected-list-header")
  4026. }, o.prototype.setChecked = function (t) {
  4027. var e = this.options,
  4028. i = n(t),
  4029. s = i.hasClass(e.selectedClass);
  4030. if (this.multiple) {
  4031. var o = this.$list.find("." + e.selectedClass).length;
  4032. if (!s && this.maxChecked <= o) return this.$element.trigger("checkedOverflow.selected.amui", {
  4033. selected: this
  4034. }), !1
  4035. } else {
  4036. if (this.dropdown.close(), s) return !1;
  4037. this.$shadowOptions.not(i).removeClass(e.selectedClass)
  4038. }
  4039. i.toggleClass(e.selectedClass), this.syncData(t)
  4040. }, o.prototype.syncData = function (t) {
  4041. var e = this,
  4042. i = this.options,
  4043. s = [],
  4044. o = n([]);
  4045. if (this.$shadowOptions.filter("." + i.selectedClass).each(function () {
  4046. var i = n(this);
  4047. s.push(i.find(".am-selected-text").text()), t || (o = o.add(e.$originalOptions.filter('[value="' + i.data("value") + '"]').prop("selected", !0)))
  4048. }), t) {
  4049. var a = n(t);
  4050. this.$originalOptions.filter('[value="' + a.data("value") + '"]').prop("selected", a.hasClass(i.selectedClass))
  4051. } else this.$originalOptions.not(o).prop("selected", !1);
  4052. this.$element.val() || (s = [i.placeholder]), this.$status.text(s.join(", ")), this.initialized && this.$element.trigger("change")
  4053. }, o.prototype.bindEvents = function () {
  4054. var t = this,
  4055. e = "am-selected-list-header",
  4056. i = s.utils.debounce(function (i) {
  4057. t.$shadowOptions.not("." + e).hide().filter(':containsNC("' + i.target.value + '")').show()
  4058. }, 100);
  4059. this.$list.on("click", "> li", function (i) {
  4060. var s = n(this);
  4061. !s.hasClass(t.options.disabledClass) && !s.hasClass(e) && t.setChecked(this)
  4062. }), this.$searchField.on("keyup.selected.amui", i), this.$selector.on("closed.dropdown.amui", function () {
  4063. t.$searchField.val(""), t.$shadowOptions.css({
  4064. display: ""
  4065. })
  4066. }), this.$element.on("validated.field.validator.amui", function (e) {
  4067. if (e.validity) {
  4068. var i = e.validity.valid,
  4069. n = "am-invalid";
  4070. t.$selector[(i ? "remove" : "add") + "Class"](n)
  4071. }
  4072. }), s.support.mutationobserver && (this.observer = new s.support.mutationobserver(function () {
  4073. t.$element.trigger("changed.selected.amui")
  4074. }), this.observer.observe(this.$element[0], {
  4075. childList: !0,
  4076. subtree: !0,
  4077. characterData: !0
  4078. })), this.$element.on("changed.selected.amui", function () {
  4079. t.renderOptions(), t.syncData()
  4080. })
  4081. }, o.prototype.select = function (t) {
  4082. var e;
  4083. e = "number" == typeof t ? this.$list.find("> li").not(".am-selected-list-header").eq(t) : "string" == typeof t ? this.$list.find(t) : n(t), e.trigger("click")
  4084. }, o.prototype.enable = function () {
  4085. this.$element.prop("disable", !1), this.$selector.dropdown("enable")
  4086. }, o.prototype.disable = function () {
  4087. this.$element.prop("disable", !0), this.$selector.dropdown("disable")
  4088. }, o.prototype.destroy = function () {
  4089. this.$element.removeData("amui.selected").show(), this.$selector.remove()
  4090. }, s.plugin("selected", o), s.ready(function (t) {
  4091. n("[data-am-selected]", t).selected()
  4092. }), t.exports = o
  4093. }, function (t, e, i) {
  4094. "use strict";
  4095. i(15);
  4096. var n = i(1),
  4097. s = i(2),
  4098. o = i(26),
  4099. a = document,
  4100. r = n(a),
  4101. l = function (t) {
  4102. this.options = n.extend({}, l.DEFAULTS, t || {}), this.$element = null, this.$wechatQr = null, this.pics = null, this.inited = !1, this.active = !1
  4103. };
  4104. l.DEFAULTS = {
  4105. sns: ["weibo", "qq", "qzone", "tqq", "wechat", "renren"],
  4106. title: "\u5206\u4eab\u5230",
  4107. cancel: "\u53d6\u6d88",
  4108. closeOnShare: !0,
  4109. id: s.utils.generateGUID("am-share"),
  4110. desc: "Hi\uff0c\u5b64\u591c\u89c2\u5929\u8c61\uff0c\u53d1\u73b0\u4e00\u4e2a\u4e0d\u9519\u7684\u897f\u897f\uff0c\u5206\u4eab\u4e00\u4e0b\u4e0b ;-)",
  4111. via: "Amaze UI",
  4112. tpl: '<div class="am-share am-modal-actions" id="<%= id %>"><h3 class="am-share-title"><%= title %></h3><ul class="am-share-sns am-avg-sm-3"><% for(var i = 0; i < sns.length; i++) {%><li><a href="<%= sns[i].shareUrl %>" data-am-share-to="<%= sns[i].id %>" ><i class="am-icon-<%= sns[i].icon %>"></i><span><%= sns[i].title %></span></a></li><% } %></ul><div class="am-share-footer"><button class="am-btn am-btn-default am-btn-block" data-am-share-close><%= cancel %></button></div></div>'
  4113. }, l.SNS = {
  4114. weibo: {
  4115. title: "\u65b0\u6d6a\u5fae\u535a",
  4116. url: "http://service.weibo.com/share/share.php",
  4117. width: 620,
  4118. height: 450,
  4119. icon: "weibo"
  4120. },
  4121. qq: {
  4122. title: "QQ \u597d\u53cb",
  4123. url: "http://connect.qq.com/widget/shareqq/index.html",
  4124. icon: "qq"
  4125. },
  4126. qzone: {
  4127. title: "QQ \u7a7a\u95f4",
  4128. url: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey",
  4129. icon: "star"
  4130. },
  4131. tqq: {
  4132. title: "\u817e\u8baf\u5fae\u535a",
  4133. url: "http://v.t.qq.com/share/share.php",
  4134. icon: "tencent-weibo"
  4135. },
  4136. wechat: {
  4137. title: "\u5fae\u4fe1",
  4138. url: "[qrcode]",
  4139. icon: "wechat"
  4140. },
  4141. renren: {
  4142. title: "\u4eba\u4eba\u7f51",
  4143. url: "http://widget.renren.com/dialog/share",
  4144. icon: "renren"
  4145. },
  4146. douban: {
  4147. title: "\u8c46\u74e3",
  4148. url: "http://www.douban.com/recommend/",
  4149. icon: "share-alt"
  4150. },
  4151. mail: {
  4152. title: "\u90ae\u4ef6\u5206\u4eab",
  4153. url: "mailto:",
  4154. icon: "envelope-o"
  4155. },
  4156. sms: {
  4157. title: "\u77ed\u4fe1\u5206\u4eab",
  4158. url: "sms:",
  4159. icon: "comment"
  4160. }
  4161. }, l.prototype.render = function () {
  4162. var t = this.options,
  4163. e = [],
  4164. i = encodeURIComponent(a.title),
  4165. o = encodeURIComponent(a.location),
  4166. r = "?body=" + i + o;
  4167. return t.sns.forEach(function (n, s) {
  4168. if (l.SNS[n]) {
  4169. var a, c = l.SNS[n];
  4170. c.id = n, a = "mail" === n ? r + "&subject=" + t.desc : "sms" === n ? r : "?url=" + o + "&title=" + i, c.shareUrl = c.url + a, e.push(c)
  4171. }
  4172. }), s.template(t.tpl, n.extend({}, t, {
  4173. sns: e
  4174. }))
  4175. }, l.prototype.init = function () {
  4176. if (!this.inited) {
  4177. var t = this,
  4178. e = "[data-am-share-to]";
  4179. r.ready(n.proxy(function () {
  4180. n("body").append(this.render()), this.$element = n("#" + this.options.id), this.$element.find("[data-am-share-close]").on("click.share.amui", function () {
  4181. t.close()
  4182. })
  4183. }, this)), r.on("click.share.amui", e, n.proxy(function (t) {
  4184. var i = n(t.target),
  4185. s = i.is(e) && i || i.parent(e),
  4186. o = s.attr("data-am-share-to");
  4187. "mail" !== o && "sms" !== o && (t.preventDefault(), this.shareTo(o, this.setData(o))), this.close()
  4188. }, this)), this.inited = !0
  4189. }
  4190. }, l.prototype.open = function () {
  4191. !this.inited && this.init(), this.$element && this.$element.modal("open"), this.$element.trigger("open.share.amui"), this.active = !0
  4192. }, l.prototype.close = function () {
  4193. this.$element && this.$element.modal("close"), this.$element.trigger("close.share.amui"), this.active = !1
  4194. }, l.prototype.toggle = function () {
  4195. this.active ? this.close() : this.open()
  4196. }, l.prototype.setData = function (t) {
  4197. if (t) {
  4198. var e = {
  4199. url: a.location,
  4200. title: a.title
  4201. },
  4202. i = this.options.desc,
  4203. n = this.pics || [],
  4204. s = /^(qzone|qq|tqq)$/;
  4205. if (s.test(t) && !n.length) {
  4206. for (var o = a.images, r = 0; r < o.length && r < 10; r++) !!o[r].src && n.push(encodeURIComponent(o[r].src));
  4207. this.pics = n
  4208. }
  4209. switch (t) {
  4210. case "qzone":
  4211. e.desc = i, e.site = this.options.via, e.pics = n.join("|");
  4212. break;
  4213. case "qq":
  4214. e.desc = i, e.site = this.options.via, e.pics = n[0];
  4215. break;
  4216. case "tqq":
  4217. e.pic = n.join("|")
  4218. }
  4219. return e
  4220. }
  4221. }, l.prototype.shareTo = function (t, e) {
  4222. var i = l.SNS[t];
  4223. if (i) {
  4224. if ("wechat" === t || "weixin" === t) return this.wechatQr();
  4225. var n = [];
  4226. for (var s in e) e[s] && n.push(s.toString() + "=" + ("pic" === s || "pics" === s ? e[s] : encodeURIComponent(e[s])));
  4227. window.open(i.url + "?" + n.join("&"))
  4228. }
  4229. }, l.prototype.wechatQr = function () {
  4230. if (!this.$wechatQr) {
  4231. var t = s.utils.generateGUID("am-share-wechat"),
  4232. e = n('<div class="am-modal am-modal-no-btn am-share-wechat-qr"><div class="am-modal-dialog"><div class="am-modal-hd">\u5206\u4eab\u5230\u5fae\u4fe1 <a href="" class="am-close am-close-spin" data-am-modal-close>&times;</a> </div><div class="am-modal-bd"><div class="am-share-wx-qr"></div><div class="am-share-wechat-tip">\u6253\u5f00\u5fae\u4fe1\uff0c\u70b9\u51fb\u5e95\u90e8\u7684<em>\u53d1\u73b0</em>\uff0c<br/> \u4f7f\u7528<em>\u626b\u4e00\u626b</em>\u5c06\u7f51\u9875\u5206\u4eab\u81f3\u670b\u53cb\u5708</div></div></div></div>');
  4233. e.attr("id", t);
  4234. var i = new o({
  4235. render: "canvas",
  4236. correctLevel: 0,
  4237. text: a.location.href,
  4238. width: 180,
  4239. height: 180,
  4240. background: "#fff",
  4241. foreground: "#000"
  4242. });
  4243. e.find(".am-share-wx-qr").html(i), e.appendTo(n("body")), this.$wechatQr = n("#" + t)
  4244. }
  4245. this.$wechatQr.modal("open")
  4246. };
  4247. var c = new l;
  4248. r.on("click.share.amui.data-api", '[data-am-toggle="share"]', function (t) {
  4249. t.preventDefault(), c.toggle()
  4250. }), t.exports = s.share = c
  4251. }, function (t, e, i) {
  4252. function n(t) {
  4253. return t < 128 ? [t] : t < 2048 ? (c0 = 192 + (t >> 6), c1 = 128 + (63 & t), [c0, c1]) : (c0 = 224 + (t >> 12), c1 = 128 + (t >> 6 & 63), c2 = 128 + (63 & t), [c0, c1, c2])
  4254. }
  4255. function s(t) {
  4256. for (var e = [], i = 0; i < t.length; i++)
  4257. for (var s = t.charCodeAt(i), o = n(s), a = 0; a < o.length; a++) e.push(o[a]);
  4258. return e
  4259. }
  4260. function o(t, e) {
  4261. this.typeNumber = -1, this.errorCorrectLevel = e, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.rsBlocks = null, this.totalDataCount = -1, this.data = t, this.utf8bytes = s(t), this.make()
  4262. }
  4263. function a(t, e) {
  4264. if (void 0 == t.length) throw new Error(t.length + "/" + e);
  4265. for (var i = 0; i < t.length && 0 == t[i];) i++;
  4266. this.num = new Array(t.length - i + e);
  4267. for (var n = 0; n < t.length - i; n++) this.num[n] = t[n + i]
  4268. }
  4269. function r() {
  4270. this.buffer = new Array, this.length = 0
  4271. }
  4272. function n(t) {
  4273. return t < 128 ? [t] : t < 2048 ? (c0 = 192 + (t >> 6), c1 = 128 + (63 & t), [c0, c1]) : (c0 = 224 + (t >> 12), c1 = 128 + (t >> 6 & 63), c2 = 128 + (63 & t), [c0, c1, c2])
  4274. }
  4275. function s(t) {
  4276. for (var e = [], i = 0; i < t.length; i++)
  4277. for (var s = t.charCodeAt(i), o = n(s), a = 0; a < o.length; a++) e.push(o[a]);
  4278. return e
  4279. }
  4280. function o(t, e) {
  4281. this.typeNumber = -1, this.errorCorrectLevel = e, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.rsBlocks = null, this.totalDataCount = -1, this.data = t, this.utf8bytes = s(t), this.make()
  4282. }
  4283. function a(t, e) {
  4284. if (void 0 == t.length) throw new Error(t.length + "/" + e);
  4285. for (var i = 0; i < t.length && 0 == t[i];) i++;
  4286. this.num = new Array(t.length - i + e);
  4287. for (var n = 0; n < t.length - i; n++) this.num[n] = t[n + i]
  4288. }
  4289. function r() {
  4290. this.buffer = new Array, this.length = 0
  4291. }
  4292. var c = i(1),
  4293. u = i(2),
  4294. h = [],
  4295. d = function (t) {
  4296. "string" == typeof t && (t = {
  4297. text: t
  4298. }), this.options = c.extend({}, {
  4299. text: "",
  4300. render: "",
  4301. width: 256,
  4302. height: 256,
  4303. correctLevel: 3,
  4304. background: "#ffffff",
  4305. foreground: "#000000"
  4306. }, t);
  4307. for (var e = null, i = 0, n = h.length; i < n; i++)
  4308. if (h[i].text == this.options.text && h[i].text.correctLevel == this.options.correctLevel) {
  4309. e = h[i].obj;
  4310. break
  4311. } if (i == n && (e = new o(this.options.text, this.options.correctLevel), h.push({
  4312. text: this.options.text,
  4313. correctLevel: this.options.correctLevel,
  4314. obj: e
  4315. })), this.options.render) switch (this.options.render) {
  4316. case "canvas":
  4317. return this.createCanvas(e);
  4318. case "table":
  4319. return this.createTable(e);
  4320. case "svg":
  4321. return this.createSVG(e);
  4322. default:
  4323. return this.createDefault(e)
  4324. }
  4325. return this.createDefault(e)
  4326. };
  4327. d.prototype.createDefault = function (t) {
  4328. var e = document.createElement("canvas");
  4329. return e.getContext ? this.createCanvas(t) : document.createElementNS && document.createElementNS(SVG_NS, "svg").createSVGRect ? this.createSVG(t) : this.createTable(t)
  4330. }, d.prototype.createCanvas = function (t) {
  4331. var e = document.createElement("canvas");
  4332. e.width = this.options.width, e.height = this.options.height;
  4333. for (var i = e.getContext("2d"), n = (this.options.width / t.getModuleCount()).toPrecision(4), s = this.options.height / t.getModuleCount().toPrecision(4), o = 0; o < t.getModuleCount(); o++)
  4334. for (var a = 0; a < t.getModuleCount(); a++) {
  4335. i.fillStyle = t.modules[o][a] ? this.options.foreground : this.options.background;
  4336. var r = Math.ceil((a + 1) * n) - Math.floor(a * n),
  4337. l = Math.ceil((o + 1) * n) - Math.floor(o * n);
  4338. i.fillRect(Math.round(a * n), Math.round(o * s), r, l)
  4339. }
  4340. return e
  4341. }, d.prototype.createTable = function (t) {
  4342. var e = [];
  4343. e.push('<table style="border:0px; margin:0px; padding:0px; border-collapse:collapse; background-color: ' + this.options.background + ';">');
  4344. var i = -1,
  4345. n = -1,
  4346. s = -1,
  4347. o = -1;
  4348. i = s = Math.floor(this.options.width / t.getModuleCount()), n = o = Math.floor(this.options.height / t.getModuleCount()), s <= 0 && (i = t.getModuleCount() < 80 ? 2 : 1), o <= 0 && (n = t.getModuleCount() < 80 ? 2 : 1), foreTd = '<td style="border:0px; margin:0px; padding:0px; width:' + i + "px; background-color: " + this.options.foreground + '"></td>', backTd = '<td style="border:0px; margin:0px; padding:0px; width:' + i + "px; background-color: " + this.options.background + '"></td>', l = t.getModuleCount();
  4349. for (var a = 0; a < l; a++) {
  4350. e.push('<tr style="border:0px; margin:0px; padding:0px; height: ' + n + 'px">');
  4351. for (var r = 0; r < l; r++) e.push(t.modules[a][r] ? foreTd : backTd);
  4352. e.push("</tr>")
  4353. }
  4354. e.push("</table>");
  4355. var c = document.createElement("span");
  4356. return c.innerHTML = e.join(""), c.firstChild
  4357. }, d.prototype.createSVG = function (t) {
  4358. for (var e, i, n, s, o = t.getModuleCount(), a = this.options.height / this.options.width, r = '<svg xmlns="http://www.w3.org/2000/svg" width="' + this.options.width + 'px" height="' + this.options.height + 'px" viewbox="0 0 ' + 10 * o + " " + 10 * o * a + '">', l = "<path ", u = ' style="stroke-width:0.5;stroke:' + this.options.foreground + ";fill:" + this.options.foreground + ';"></path>', h = ' style="stroke-width:0.5;stroke:' + this.options.background + ";fill:" + this.options.background + ';"></path>', d = 0; d < o; d++)
  4359. for (var p = 0; p < o; p++) e = 10 * p, n = 10 * d * a, i = 10 * (p + 1), s = 10 * (d + 1) * a, r += l + 'd="M ' + e + "," + n + " L " + i + "," + n + " L " + i + "," + s + " L " + e + "," + s + ' Z"', r += t.modules[d][p] ? u : h;
  4360. return r += "</svg>", c(r)[0]
  4361. }, o.prototype = {
  4362. constructor: o,
  4363. getModuleCount: function () {
  4364. return this.moduleCount
  4365. },
  4366. make: function () {
  4367. this.getRightType(), this.dataCache = this.createData(), this.createQrcode()
  4368. },
  4369. makeImpl: function (t) {
  4370. this.moduleCount = 4 * this.typeNumber + 17, this.modules = new Array(this.moduleCount);
  4371. for (var e = 0; e < this.moduleCount; e++) this.modules[e] = new Array(this.moduleCount);
  4372. this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(!0, t), this.typeNumber >= 7 && this.setupTypeNumber(!0), this.mapData(this.dataCache, t)
  4373. },
  4374. setupPositionProbePattern: function (t, e) {
  4375. for (var i = -1; i <= 7; i++)
  4376. if (!(t + i <= -1 || this.moduleCount <= t + i))
  4377. for (var n = -1; n <= 7; n++) e + n <= -1 || this.moduleCount <= e + n || (0 <= i && i <= 6 && (0 == n || 6 == n) || 0 <= n && n <= 6 && (0 == i || 6 == i) || 2 <= i && i <= 4 && 2 <= n && n <= 4 ? this.modules[t + i][e + n] = !0 : this.modules[t + i][e + n] = !1)
  4378. },
  4379. createQrcode: function () {
  4380. for (var t = 0, e = 0, i = null, n = 0; n < 8; n++) {
  4381. this.makeImpl(n);
  4382. var s = f.getLostPoint(this);
  4383. (0 == n || t > s) && (t = s, e = n, i = this.modules)
  4384. }
  4385. this.modules = i, this.setupTypeInfo(!1, e), this.typeNumber >= 7 && this.setupTypeNumber(!1)
  4386. },
  4387. setupTimingPattern: function () {
  4388. for (var t = 8; t < this.moduleCount - 8; t++) null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0, null == this.modules[6][t] && (this.modules[6][t] = t % 2 == 0))
  4389. },
  4390. setupPositionAdjustPattern: function () {
  4391. for (var t = f.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++)
  4392. for (var i = 0; i < t.length; i++) {
  4393. var n = t[e],
  4394. s = t[i];
  4395. if (null == this.modules[n][s])
  4396. for (var o = -2; o <= 2; o++)
  4397. for (var a = -2; a <= 2; a++) o == -2 || 2 == o || a == -2 || 2 == a || 0 == o && 0 == a ? this.modules[n + o][s + a] = !0 : this.modules[n + o][s + a] = !1
  4398. }
  4399. },
  4400. setupTypeNumber: function (t) {
  4401. for (var e = f.getBCHTypeNumber(this.typeNumber), i = 0; i < 18; i++) {
  4402. var n = !t && 1 == (e >> i & 1);
  4403. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = n, this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = n
  4404. }
  4405. },
  4406. setupTypeInfo: function (t, e) {
  4407. for (var i = p[this.errorCorrectLevel] << 3 | e, n = f.getBCHTypeInfo(i), s = 0; s < 15; s++) {
  4408. var o = !t && 1 == (n >> s & 1);
  4409. s < 6 ? this.modules[s][8] = o : s < 8 ? this.modules[s + 1][8] = o : this.modules[this.moduleCount - 15 + s][8] = o;
  4410. var o = !t && 1 == (n >> s & 1);
  4411. s < 8 ? this.modules[8][this.moduleCount - s - 1] = o : s < 9 ? this.modules[8][15 - s - 1 + 1] = o : this.modules[8][15 - s - 1] = o
  4412. }
  4413. this.modules[this.moduleCount - 8][8] = !t
  4414. },
  4415. createData: function () {
  4416. var t = new r,
  4417. e = this.typeNumber > 9 ? 16 : 8;
  4418. t.put(4, 4), t.put(this.utf8bytes.length, e);
  4419. for (var i = 0, n = this.utf8bytes.length; i < n; i++) t.put(this.utf8bytes[i], 8);
  4420. for (t.length + 4 <= 8 * this.totalDataCount && t.put(0, 4); t.length % 8 != 0;) t.putBit(!1);
  4421. for (;;) {
  4422. if (t.length >= 8 * this.totalDataCount) break;
  4423. if (t.put(o.PAD0, 8), t.length >= 8 * this.totalDataCount) break;
  4424. t.put(o.PAD1, 8)
  4425. }
  4426. return this.createBytes(t)
  4427. },
  4428. createBytes: function (t) {
  4429. for (var e = 0, i = 0, n = 0, s = this.rsBlock.length / 3, o = new Array, r = 0; r < s; r++)
  4430. for (var l = this.rsBlock[3 * r + 0], c = this.rsBlock[3 * r + 1], u = this.rsBlock[3 * r + 2], h = 0; h < l; h++) o.push([u, c]);
  4431. for (var d = new Array(o.length), p = new Array(o.length), m = 0; m < o.length; m++) {
  4432. var v = o[m][0],
  4433. g = o[m][1] - v;
  4434. i = Math.max(i, v), n = Math.max(n, g), d[m] = new Array(v);
  4435. for (var r = 0; r < d[m].length; r++) d[m][r] = 255 & t.buffer[r + e];
  4436. e += v;
  4437. var y = f.getErrorCorrectPolynomial(g),
  4438. w = new a(d[m], y.getLength() - 1),
  4439. b = w.mod(y);
  4440. p[m] = new Array(y.getLength() - 1);
  4441. for (var r = 0; r < p[m].length; r++) {
  4442. var T = r + b.getLength() - p[m].length;
  4443. p[m][r] = T >= 0 ? b.get(T) : 0
  4444. }
  4445. }
  4446. for (var x = new Array(this.totalDataCount), C = 0, r = 0; r < i; r++)
  4447. for (var m = 0; m < o.length; m++) r < d[m].length && (x[C++] = d[m][r]);
  4448. for (var r = 0; r < n; r++)
  4449. for (var m = 0; m < o.length; m++) r < p[m].length && (x[C++] = p[m][r]);
  4450. return x
  4451. },
  4452. mapData: function (t, e) {
  4453. for (var i = -1, n = this.moduleCount - 1, s = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2)
  4454. for (6 == a && a--;;) {
  4455. for (var r = 0; r < 2; r++)
  4456. if (null == this.modules[n][a - r]) {
  4457. var l = !1;
  4458. o < t.length && (l = 1 == (t[o] >>> s & 1));
  4459. var c = f.getMask(e, n, a - r);
  4460. c && (l = !l), this.modules[n][a - r] = l, s--, s == -1 && (o++, s = 7)
  4461. } if (n += i, n < 0 || this.moduleCount <= n) {
  4462. n -= i, i = -i;
  4463. break
  4464. }
  4465. }
  4466. }
  4467. }, o.PAD0 = 236, o.PAD1 = 17;
  4468. for (var p = [1, 0, 3, 2], m = {
  4469. PATTERN000: 0,
  4470. PATTERN001: 1,
  4471. PATTERN010: 2,
  4472. PATTERN011: 3,
  4473. PATTERN100: 4,
  4474. PATTERN101: 5,
  4475. PATTERN110: 6,
  4476. PATTERN111: 7
  4477. }, f = {
  4478. PATTERN_POSITION_TABLE: [
  4479. [],
  4480. [6, 18],
  4481. [6, 22],
  4482. [6, 26],
  4483. [6, 30],
  4484. [6, 34],
  4485. [6, 22, 38],
  4486. [6, 24, 42],
  4487. [6, 26, 46],
  4488. [6, 28, 50],
  4489. [6, 30, 54],
  4490. [6, 32, 58],
  4491. [6, 34, 62],
  4492. [6, 26, 46, 66],
  4493. [6, 26, 48, 70],
  4494. [6, 26, 50, 74],
  4495. [6, 30, 54, 78],
  4496. [6, 30, 56, 82],
  4497. [6, 30, 58, 86],
  4498. [6, 34, 62, 90],
  4499. [6, 28, 50, 72, 94],
  4500. [6, 26, 50, 74, 98],
  4501. [6, 30, 54, 78, 102],
  4502. [6, 28, 54, 80, 106],
  4503. [6, 32, 58, 84, 110],
  4504. [6, 30, 58, 86, 114],
  4505. [6, 34, 62, 90, 118],
  4506. [6, 26, 50, 74, 98, 122],
  4507. [6, 30, 54, 78, 102, 126],
  4508. [6, 26, 52, 78, 104, 130],
  4509. [6, 30, 56, 82, 108, 134],
  4510. [6, 34, 60, 86, 112, 138],
  4511. [6, 30, 58, 86, 114, 142],
  4512. [6, 34, 62, 90, 118, 146],
  4513. [6, 30, 54, 78, 102, 126, 150],
  4514. [6, 24, 50, 76, 102, 128, 154],
  4515. [6, 28, 54, 80, 106, 132, 158],
  4516. [6, 32, 58, 84, 110, 136, 162],
  4517. [6, 26, 54, 82, 110, 138, 166],
  4518. [6, 30, 58, 86, 114, 142, 170]
  4519. ],
  4520. G15: 1335,
  4521. G18: 7973,
  4522. G15_MASK: 21522,
  4523. getBCHTypeInfo: function (t) {
  4524. for (var e = t << 10; f.getBCHDigit(e) - f.getBCHDigit(f.G15) >= 0;) e ^= f.G15 << f.getBCHDigit(e) - f.getBCHDigit(f.G15);
  4525. return (t << 10 | e) ^ f.G15_MASK
  4526. },
  4527. getBCHTypeNumber: function (t) {
  4528. for (var e = t << 12; f.getBCHDigit(e) - f.getBCHDigit(f.G18) >= 0;) e ^= f.G18 << f.getBCHDigit(e) - f.getBCHDigit(f.G18);
  4529. return t << 12 | e
  4530. },
  4531. getBCHDigit: function (t) {
  4532. for (var e = 0; 0 != t;) e++, t >>>= 1;
  4533. return e
  4534. },
  4535. getPatternPosition: function (t) {
  4536. return f.PATTERN_POSITION_TABLE[t - 1]
  4537. },
  4538. getMask: function (t, e, i) {
  4539. switch (t) {
  4540. case m.PATTERN000:
  4541. return (e + i) % 2 == 0;
  4542. case m.PATTERN001:
  4543. return e % 2 == 0;
  4544. case m.PATTERN010:
  4545. return i % 3 == 0;
  4546. case m.PATTERN011:
  4547. return (e + i) % 3 == 0;
  4548. case m.PATTERN100:
  4549. return (Math.floor(e / 2) + Math.floor(i / 3)) % 2 == 0;
  4550. case m.PATTERN101:
  4551. return e * i % 2 + e * i % 3 == 0;
  4552. case m.PATTERN110:
  4553. return (e * i % 2 + e * i % 3) % 2 == 0;
  4554. case m.PATTERN111:
  4555. return (e * i % 3 + (e + i) % 2) % 2 == 0;
  4556. default:
  4557. throw new Error("bad maskPattern:" + t)
  4558. }
  4559. },
  4560. getErrorCorrectPolynomial: function (t) {
  4561. for (var e = new a([1], 0), i = 0; i < t; i++) e = e.multiply(new a([1, v.gexp(i)], 0));
  4562. return e
  4563. },
  4564. getLostPoint: function (t) {
  4565. for (var e = t.getModuleCount(), i = 0, n = 0, s = 0; s < e; s++)
  4566. for (var o = 0, a = t.modules[s][0], r = 0; r < e; r++) {
  4567. var l = t.modules[s][r];
  4568. if (r < e - 6 && l && !t.modules[s][r + 1] && t.modules[s][r + 2] && t.modules[s][r + 3] && t.modules[s][r + 4] && !t.modules[s][r + 5] && t.modules[s][r + 6] && (r < e - 10 ? t.modules[s][r + 7] && t.modules[s][r + 8] && t.modules[s][r + 9] && t.modules[s][r + 10] && (i += 40) : r > 3 && t.modules[s][r - 1] && t.modules[s][r - 2] && t.modules[s][r - 3] && t.modules[s][r - 4] && (i += 40)), s < e - 1 && r < e - 1) {
  4569. var c = 0;
  4570. l && c++, t.modules[s + 1][r] && c++, t.modules[s][r + 1] && c++, t.modules[s + 1][r + 1] && c++, 0 != c && 4 != c || (i += 3)
  4571. }
  4572. a ^ l ? o++ : (a = l, o >= 5 && (i += 3 + o - 5), o = 1), l && n++
  4573. }
  4574. for (var r = 0; r < e; r++)
  4575. for (var o = 0, a = t.modules[0][r], s = 0; s < e; s++) {
  4576. var l = t.modules[s][r];
  4577. s < e - 6 && l && !t.modules[s + 1][r] && t.modules[s + 2][r] && t.modules[s + 3][r] && t.modules[s + 4][r] && !t.modules[s + 5][r] && t.modules[s + 6][r] && (s < e - 10 ? t.modules[s + 7][r] && t.modules[s + 8][r] && t.modules[s + 9][r] && t.modules[s + 10][r] && (i += 40) : s > 3 && t.modules[s - 1][r] && t.modules[s - 2][r] && t.modules[s - 3][r] && t.modules[s - 4][r] && (i += 40)),
  4578. a ^ l ? o++ : (a = l, o >= 5 && (i += 3 + o - 5), o = 1)
  4579. }
  4580. var u = Math.abs(100 * n / e / e - 50) / 5;
  4581. return i += 10 * u
  4582. }
  4583. }, v = {
  4584. glog: function (t) {
  4585. if (t < 1) throw new Error("glog(" + t + ")");
  4586. return v.LOG_TABLE[t]
  4587. },
  4588. gexp: function (t) {
  4589. for (; t < 0;) t += 255;
  4590. for (; t >= 256;) t -= 255;
  4591. return v.EXP_TABLE[t]
  4592. },
  4593. EXP_TABLE: new Array(256),
  4594. LOG_TABLE: new Array(256)
  4595. }, g = 0; g < 8; g++) v.EXP_TABLE[g] = 1 << g;
  4596. for (var g = 8; g < 256; g++) v.EXP_TABLE[g] = v.EXP_TABLE[g - 4] ^ v.EXP_TABLE[g - 5] ^ v.EXP_TABLE[g - 6] ^ v.EXP_TABLE[g - 8];
  4597. for (var g = 0; g < 255; g++) v.LOG_TABLE[v.EXP_TABLE[g]] = g;
  4598. a.prototype = {
  4599. get: function (t) {
  4600. return this.num[t]
  4601. },
  4602. getLength: function () {
  4603. return this.num.length
  4604. },
  4605. multiply: function (t) {
  4606. for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++)
  4607. for (var n = 0; n < t.getLength(); n++) e[i + n] ^= v.gexp(v.glog(this.get(i)) + v.glog(t.get(n)));
  4608. return new a(e, 0)
  4609. },
  4610. mod: function (t) {
  4611. var e = this.getLength(),
  4612. i = t.getLength();
  4613. if (e - i < 0) return this;
  4614. for (var n = new Array(e), s = 0; s < e; s++) n[s] = this.get(s);
  4615. for (; n.length >= i;) {
  4616. for (var o = v.glog(n[0]) - v.glog(t.get(0)), s = 0; s < t.getLength(); s++) n[s] ^= v.gexp(v.glog(t.get(s)) + o);
  4617. for (; 0 == n[0];) n.shift()
  4618. }
  4619. return new a(n, 0)
  4620. }
  4621. };
  4622. var y = [
  4623. [1, 26, 19],
  4624. [1, 26, 16],
  4625. [1, 26, 13],
  4626. [1, 26, 9],
  4627. [1, 44, 34],
  4628. [1, 44, 28],
  4629. [1, 44, 22],
  4630. [1, 44, 16],
  4631. [1, 70, 55],
  4632. [1, 70, 44],
  4633. [2, 35, 17],
  4634. [2, 35, 13],
  4635. [1, 100, 80],
  4636. [2, 50, 32],
  4637. [2, 50, 24],
  4638. [4, 25, 9],
  4639. [1, 134, 108],
  4640. [2, 67, 43],
  4641. [2, 33, 15, 2, 34, 16],
  4642. [2, 33, 11, 2, 34, 12],
  4643. [2, 86, 68],
  4644. [4, 43, 27],
  4645. [4, 43, 19],
  4646. [4, 43, 15],
  4647. [2, 98, 78],
  4648. [4, 49, 31],
  4649. [2, 32, 14, 4, 33, 15],
  4650. [4, 39, 13, 1, 40, 14],
  4651. [2, 121, 97],
  4652. [2, 60, 38, 2, 61, 39],
  4653. [4, 40, 18, 2, 41, 19],
  4654. [4, 40, 14, 2, 41, 15],
  4655. [2, 146, 116],
  4656. [3, 58, 36, 2, 59, 37],
  4657. [4, 36, 16, 4, 37, 17],
  4658. [4, 36, 12, 4, 37, 13],
  4659. [2, 86, 68, 2, 87, 69],
  4660. [4, 69, 43, 1, 70, 44],
  4661. [6, 43, 19, 2, 44, 20],
  4662. [6, 43, 15, 2, 44, 16],
  4663. [4, 101, 81],
  4664. [1, 80, 50, 4, 81, 51],
  4665. [4, 50, 22, 4, 51, 23],
  4666. [3, 36, 12, 8, 37, 13],
  4667. [2, 116, 92, 2, 117, 93],
  4668. [6, 58, 36, 2, 59, 37],
  4669. [4, 46, 20, 6, 47, 21],
  4670. [7, 42, 14, 4, 43, 15],
  4671. [4, 133, 107],
  4672. [8, 59, 37, 1, 60, 38],
  4673. [8, 44, 20, 4, 45, 21],
  4674. [12, 33, 11, 4, 34, 12],
  4675. [3, 145, 115, 1, 146, 116],
  4676. [4, 64, 40, 5, 65, 41],
  4677. [11, 36, 16, 5, 37, 17],
  4678. [11, 36, 12, 5, 37, 13],
  4679. [5, 109, 87, 1, 110, 88],
  4680. [5, 65, 41, 5, 66, 42],
  4681. [5, 54, 24, 7, 55, 25],
  4682. [11, 36, 12],
  4683. [5, 122, 98, 1, 123, 99],
  4684. [7, 73, 45, 3, 74, 46],
  4685. [15, 43, 19, 2, 44, 20],
  4686. [3, 45, 15, 13, 46, 16],
  4687. [1, 135, 107, 5, 136, 108],
  4688. [10, 74, 46, 1, 75, 47],
  4689. [1, 50, 22, 15, 51, 23],
  4690. [2, 42, 14, 17, 43, 15],
  4691. [5, 150, 120, 1, 151, 121],
  4692. [9, 69, 43, 4, 70, 44],
  4693. [17, 50, 22, 1, 51, 23],
  4694. [2, 42, 14, 19, 43, 15],
  4695. [3, 141, 113, 4, 142, 114],
  4696. [3, 70, 44, 11, 71, 45],
  4697. [17, 47, 21, 4, 48, 22],
  4698. [9, 39, 13, 16, 40, 14],
  4699. [3, 135, 107, 5, 136, 108],
  4700. [3, 67, 41, 13, 68, 42],
  4701. [15, 54, 24, 5, 55, 25],
  4702. [15, 43, 15, 10, 44, 16],
  4703. [4, 144, 116, 4, 145, 117],
  4704. [17, 68, 42],
  4705. [17, 50, 22, 6, 51, 23],
  4706. [19, 46, 16, 6, 47, 17],
  4707. [2, 139, 111, 7, 140, 112],
  4708. [17, 74, 46],
  4709. [7, 54, 24, 16, 55, 25],
  4710. [34, 37, 13],
  4711. [4, 151, 121, 5, 152, 122],
  4712. [4, 75, 47, 14, 76, 48],
  4713. [11, 54, 24, 14, 55, 25],
  4714. [16, 45, 15, 14, 46, 16],
  4715. [6, 147, 117, 4, 148, 118],
  4716. [6, 73, 45, 14, 74, 46],
  4717. [11, 54, 24, 16, 55, 25],
  4718. [30, 46, 16, 2, 47, 17],
  4719. [8, 132, 106, 4, 133, 107],
  4720. [8, 75, 47, 13, 76, 48],
  4721. [7, 54, 24, 22, 55, 25],
  4722. [22, 45, 15, 13, 46, 16],
  4723. [10, 142, 114, 2, 143, 115],
  4724. [19, 74, 46, 4, 75, 47],
  4725. [28, 50, 22, 6, 51, 23],
  4726. [33, 46, 16, 4, 47, 17],
  4727. [8, 152, 122, 4, 153, 123],
  4728. [22, 73, 45, 3, 74, 46],
  4729. [8, 53, 23, 26, 54, 24],
  4730. [12, 45, 15, 28, 46, 16],
  4731. [3, 147, 117, 10, 148, 118],
  4732. [3, 73, 45, 23, 74, 46],
  4733. [4, 54, 24, 31, 55, 25],
  4734. [11, 45, 15, 31, 46, 16],
  4735. [7, 146, 116, 7, 147, 117],
  4736. [21, 73, 45, 7, 74, 46],
  4737. [1, 53, 23, 37, 54, 24],
  4738. [19, 45, 15, 26, 46, 16],
  4739. [5, 145, 115, 10, 146, 116],
  4740. [19, 75, 47, 10, 76, 48],
  4741. [15, 54, 24, 25, 55, 25],
  4742. [23, 45, 15, 25, 46, 16],
  4743. [13, 145, 115, 3, 146, 116],
  4744. [2, 74, 46, 29, 75, 47],
  4745. [42, 54, 24, 1, 55, 25],
  4746. [23, 45, 15, 28, 46, 16],
  4747. [17, 145, 115],
  4748. [10, 74, 46, 23, 75, 47],
  4749. [10, 54, 24, 35, 55, 25],
  4750. [19, 45, 15, 35, 46, 16],
  4751. [17, 145, 115, 1, 146, 116],
  4752. [14, 74, 46, 21, 75, 47],
  4753. [29, 54, 24, 19, 55, 25],
  4754. [11, 45, 15, 46, 46, 16],
  4755. [13, 145, 115, 6, 146, 116],
  4756. [14, 74, 46, 23, 75, 47],
  4757. [44, 54, 24, 7, 55, 25],
  4758. [59, 46, 16, 1, 47, 17],
  4759. [12, 151, 121, 7, 152, 122],
  4760. [12, 75, 47, 26, 76, 48],
  4761. [39, 54, 24, 14, 55, 25],
  4762. [22, 45, 15, 41, 46, 16],
  4763. [6, 151, 121, 14, 152, 122],
  4764. [6, 75, 47, 34, 76, 48],
  4765. [46, 54, 24, 10, 55, 25],
  4766. [2, 45, 15, 64, 46, 16],
  4767. [17, 152, 122, 4, 153, 123],
  4768. [29, 74, 46, 14, 75, 47],
  4769. [49, 54, 24, 10, 55, 25],
  4770. [24, 45, 15, 46, 46, 16],
  4771. [4, 152, 122, 18, 153, 123],
  4772. [13, 74, 46, 32, 75, 47],
  4773. [48, 54, 24, 14, 55, 25],
  4774. [42, 45, 15, 32, 46, 16],
  4775. [20, 147, 117, 4, 148, 118],
  4776. [40, 75, 47, 7, 76, 48],
  4777. [43, 54, 24, 22, 55, 25],
  4778. [10, 45, 15, 67, 46, 16],
  4779. [19, 148, 118, 6, 149, 119],
  4780. [18, 75, 47, 31, 76, 48],
  4781. [34, 54, 24, 34, 55, 25],
  4782. [20, 45, 15, 61, 46, 16]
  4783. ];
  4784. o.prototype.getRightType = function () {
  4785. for (var t = 1; t < 41; t++) {
  4786. var e = y[4 * (t - 1) + this.errorCorrectLevel];
  4787. if (void 0 == e) throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + this.errorCorrectLevel);
  4788. for (var i = e.length / 3, n = 0, s = 0; s < i; s++) {
  4789. var o = e[3 * s + 0],
  4790. a = e[3 * s + 2];
  4791. n += a * o
  4792. }
  4793. var r = t > 9 ? 2 : 1;
  4794. if (this.utf8bytes.length + r < n || 40 == t) {
  4795. this.typeNumber = t, this.rsBlock = e, this.totalDataCount = n;
  4796. break
  4797. }
  4798. }
  4799. }, r.prototype = {
  4800. get: function (t) {
  4801. var e = Math.floor(t / 8);
  4802. return this.buffer[e] >>> 7 - t % 8 & 1
  4803. },
  4804. put: function (t, e) {
  4805. for (var i = 0; i < e; i++) this.putBit(t >>> e - i - 1 & 1)
  4806. },
  4807. putBit: function (t) {
  4808. var e = Math.floor(this.length / 8);
  4809. this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++
  4810. }
  4811. }, o.prototype = {
  4812. constructor: o,
  4813. getModuleCount: function () {
  4814. return this.moduleCount
  4815. },
  4816. make: function () {
  4817. this.getRightType(), this.dataCache = this.createData(), this.createQrcode()
  4818. },
  4819. makeImpl: function (t) {
  4820. this.moduleCount = 4 * this.typeNumber + 17, this.modules = new Array(this.moduleCount);
  4821. for (var e = 0; e < this.moduleCount; e++) this.modules[e] = new Array(this.moduleCount);
  4822. this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(!0, t), this.typeNumber >= 7 && this.setupTypeNumber(!0), this.mapData(this.dataCache, t)
  4823. },
  4824. setupPositionProbePattern: function (t, e) {
  4825. for (var i = -1; i <= 7; i++)
  4826. if (!(t + i <= -1 || this.moduleCount <= t + i))
  4827. for (var n = -1; n <= 7; n++) e + n <= -1 || this.moduleCount <= e + n || (0 <= i && i <= 6 && (0 == n || 6 == n) || 0 <= n && n <= 6 && (0 == i || 6 == i) || 2 <= i && i <= 4 && 2 <= n && n <= 4 ? this.modules[t + i][e + n] = !0 : this.modules[t + i][e + n] = !1)
  4828. },
  4829. createQrcode: function () {
  4830. for (var t = 0, e = 0, i = null, n = 0; n < 8; n++) {
  4831. this.makeImpl(n);
  4832. var s = f.getLostPoint(this);
  4833. (0 == n || t > s) && (t = s, e = n, i = this.modules)
  4834. }
  4835. this.modules = i, this.setupTypeInfo(!1, e), this.typeNumber >= 7 && this.setupTypeNumber(!1)
  4836. },
  4837. setupTimingPattern: function () {
  4838. for (var t = 8; t < this.moduleCount - 8; t++) null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0, null == this.modules[6][t] && (this.modules[6][t] = t % 2 == 0))
  4839. },
  4840. setupPositionAdjustPattern: function () {
  4841. for (var t = f.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++)
  4842. for (var i = 0; i < t.length; i++) {
  4843. var n = t[e],
  4844. s = t[i];
  4845. if (null == this.modules[n][s])
  4846. for (var o = -2; o <= 2; o++)
  4847. for (var a = -2; a <= 2; a++) o == -2 || 2 == o || a == -2 || 2 == a || 0 == o && 0 == a ? this.modules[n + o][s + a] = !0 : this.modules[n + o][s + a] = !1
  4848. }
  4849. },
  4850. setupTypeNumber: function (t) {
  4851. for (var e = f.getBCHTypeNumber(this.typeNumber), i = 0; i < 18; i++) {
  4852. var n = !t && 1 == (e >> i & 1);
  4853. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = n, this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = n
  4854. }
  4855. },
  4856. setupTypeInfo: function (t, e) {
  4857. for (var i = p[this.errorCorrectLevel] << 3 | e, n = f.getBCHTypeInfo(i), s = 0; s < 15; s++) {
  4858. var o = !t && 1 == (n >> s & 1);
  4859. s < 6 ? this.modules[s][8] = o : s < 8 ? this.modules[s + 1][8] = o : this.modules[this.moduleCount - 15 + s][8] = o;
  4860. var o = !t && 1 == (n >> s & 1);
  4861. s < 8 ? this.modules[8][this.moduleCount - s - 1] = o : s < 9 ? this.modules[8][15 - s - 1 + 1] = o : this.modules[8][15 - s - 1] = o
  4862. }
  4863. this.modules[this.moduleCount - 8][8] = !t
  4864. },
  4865. createData: function () {
  4866. var t = new r,
  4867. e = this.typeNumber > 9 ? 16 : 8;
  4868. t.put(4, 4), t.put(this.utf8bytes.length, e);
  4869. for (var i = 0, n = this.utf8bytes.length; i < n; i++) t.put(this.utf8bytes[i], 8);
  4870. for (t.length + 4 <= 8 * this.totalDataCount && t.put(0, 4); t.length % 8 != 0;) t.putBit(!1);
  4871. for (;;) {
  4872. if (t.length >= 8 * this.totalDataCount) break;
  4873. if (t.put(o.PAD0, 8), t.length >= 8 * this.totalDataCount) break;
  4874. t.put(o.PAD1, 8)
  4875. }
  4876. return this.createBytes(t)
  4877. },
  4878. createBytes: function (t) {
  4879. for (var e = 0, i = 0, n = 0, s = this.rsBlock.length / 3, o = new Array, r = 0; r < s; r++)
  4880. for (var l = this.rsBlock[3 * r + 0], c = this.rsBlock[3 * r + 1], u = this.rsBlock[3 * r + 2], h = 0; h < l; h++) o.push([u, c]);
  4881. for (var d = new Array(o.length), p = new Array(o.length), m = 0; m < o.length; m++) {
  4882. var v = o[m][0],
  4883. g = o[m][1] - v;
  4884. i = Math.max(i, v), n = Math.max(n, g), d[m] = new Array(v);
  4885. for (var r = 0; r < d[m].length; r++) d[m][r] = 255 & t.buffer[r + e];
  4886. e += v;
  4887. var y = f.getErrorCorrectPolynomial(g),
  4888. w = new a(d[m], y.getLength() - 1),
  4889. b = w.mod(y);
  4890. p[m] = new Array(y.getLength() - 1);
  4891. for (var r = 0; r < p[m].length; r++) {
  4892. var T = r + b.getLength() - p[m].length;
  4893. p[m][r] = T >= 0 ? b.get(T) : 0
  4894. }
  4895. }
  4896. for (var x = new Array(this.totalDataCount), C = 0, r = 0; r < i; r++)
  4897. for (var m = 0; m < o.length; m++) r < d[m].length && (x[C++] = d[m][r]);
  4898. for (var r = 0; r < n; r++)
  4899. for (var m = 0; m < o.length; m++) r < p[m].length && (x[C++] = p[m][r]);
  4900. return x
  4901. },
  4902. mapData: function (t, e) {
  4903. for (var i = -1, n = this.moduleCount - 1, s = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2)
  4904. for (6 == a && a--;;) {
  4905. for (var r = 0; r < 2; r++)
  4906. if (null == this.modules[n][a - r]) {
  4907. var l = !1;
  4908. o < t.length && (l = 1 == (t[o] >>> s & 1));
  4909. var c = f.getMask(e, n, a - r);
  4910. c && (l = !l), this.modules[n][a - r] = l, s--, s == -1 && (o++, s = 7)
  4911. } if (n += i, n < 0 || this.moduleCount <= n) {
  4912. n -= i, i = -i;
  4913. break
  4914. }
  4915. }
  4916. }
  4917. }, o.PAD0 = 236, o.PAD1 = 17;
  4918. for (var p = [1, 0, 3, 2], m = {
  4919. PATTERN000: 0,
  4920. PATTERN001: 1,
  4921. PATTERN010: 2,
  4922. PATTERN011: 3,
  4923. PATTERN100: 4,
  4924. PATTERN101: 5,
  4925. PATTERN110: 6,
  4926. PATTERN111: 7
  4927. }, f = {
  4928. PATTERN_POSITION_TABLE: [
  4929. [],
  4930. [6, 18],
  4931. [6, 22],
  4932. [6, 26],
  4933. [6, 30],
  4934. [6, 34],
  4935. [6, 22, 38],
  4936. [6, 24, 42],
  4937. [6, 26, 46],
  4938. [6, 28, 50],
  4939. [6, 30, 54],
  4940. [6, 32, 58],
  4941. [6, 34, 62],
  4942. [6, 26, 46, 66],
  4943. [6, 26, 48, 70],
  4944. [6, 26, 50, 74],
  4945. [6, 30, 54, 78],
  4946. [6, 30, 56, 82],
  4947. [6, 30, 58, 86],
  4948. [6, 34, 62, 90],
  4949. [6, 28, 50, 72, 94],
  4950. [6, 26, 50, 74, 98],
  4951. [6, 30, 54, 78, 102],
  4952. [6, 28, 54, 80, 106],
  4953. [6, 32, 58, 84, 110],
  4954. [6, 30, 58, 86, 114],
  4955. [6, 34, 62, 90, 118],
  4956. [6, 26, 50, 74, 98, 122],
  4957. [6, 30, 54, 78, 102, 126],
  4958. [6, 26, 52, 78, 104, 130],
  4959. [6, 30, 56, 82, 108, 134],
  4960. [6, 34, 60, 86, 112, 138],
  4961. [6, 30, 58, 86, 114, 142],
  4962. [6, 34, 62, 90, 118, 146],
  4963. [6, 30, 54, 78, 102, 126, 150],
  4964. [6, 24, 50, 76, 102, 128, 154],
  4965. [6, 28, 54, 80, 106, 132, 158],
  4966. [6, 32, 58, 84, 110, 136, 162],
  4967. [6, 26, 54, 82, 110, 138, 166],
  4968. [6, 30, 58, 86, 114, 142, 170]
  4969. ],
  4970. G15: 1335,
  4971. G18: 7973,
  4972. G15_MASK: 21522,
  4973. getBCHTypeInfo: function (t) {
  4974. for (var e = t << 10; f.getBCHDigit(e) - f.getBCHDigit(f.G15) >= 0;) e ^= f.G15 << f.getBCHDigit(e) - f.getBCHDigit(f.G15);
  4975. return (t << 10 | e) ^ f.G15_MASK
  4976. },
  4977. getBCHTypeNumber: function (t) {
  4978. for (var e = t << 12; f.getBCHDigit(e) - f.getBCHDigit(f.G18) >= 0;) e ^= f.G18 << f.getBCHDigit(e) - f.getBCHDigit(f.G18);
  4979. return t << 12 | e
  4980. },
  4981. getBCHDigit: function (t) {
  4982. for (var e = 0; 0 != t;) e++, t >>>= 1;
  4983. return e
  4984. },
  4985. getPatternPosition: function (t) {
  4986. return f.PATTERN_POSITION_TABLE[t - 1]
  4987. },
  4988. getMask: function (t, e, i) {
  4989. switch (t) {
  4990. case m.PATTERN000:
  4991. return (e + i) % 2 == 0;
  4992. case m.PATTERN001:
  4993. return e % 2 == 0;
  4994. case m.PATTERN010:
  4995. return i % 3 == 0;
  4996. case m.PATTERN011:
  4997. return (e + i) % 3 == 0;
  4998. case m.PATTERN100:
  4999. return (Math.floor(e / 2) + Math.floor(i / 3)) % 2 == 0;
  5000. case m.PATTERN101:
  5001. return e * i % 2 + e * i % 3 == 0;
  5002. case m.PATTERN110:
  5003. return (e * i % 2 + e * i % 3) % 2 == 0;
  5004. case m.PATTERN111:
  5005. return (e * i % 3 + (e + i) % 2) % 2 == 0;
  5006. default:
  5007. throw new Error("bad maskPattern:" + t)
  5008. }
  5009. },
  5010. getErrorCorrectPolynomial: function (t) {
  5011. for (var e = new a([1], 0), i = 0; i < t; i++) e = e.multiply(new a([1, v.gexp(i)], 0));
  5012. return e
  5013. },
  5014. getLostPoint: function (t) {
  5015. for (var e = t.getModuleCount(), i = 0, n = 0, s = 0; s < e; s++)
  5016. for (var o = 0, a = t.modules[s][0], r = 0; r < e; r++) {
  5017. var l = t.modules[s][r];
  5018. if (r < e - 6 && l && !t.modules[s][r + 1] && t.modules[s][r + 2] && t.modules[s][r + 3] && t.modules[s][r + 4] && !t.modules[s][r + 5] && t.modules[s][r + 6] && (r < e - 10 ? t.modules[s][r + 7] && t.modules[s][r + 8] && t.modules[s][r + 9] && t.modules[s][r + 10] && (i += 40) : r > 3 && t.modules[s][r - 1] && t.modules[s][r - 2] && t.modules[s][r - 3] && t.modules[s][r - 4] && (i += 40)), s < e - 1 && r < e - 1) {
  5019. var c = 0;
  5020. l && c++, t.modules[s + 1][r] && c++, t.modules[s][r + 1] && c++, t.modules[s + 1][r + 1] && c++, 0 != c && 4 != c || (i += 3)
  5021. }
  5022. a ^ l ? o++ : (a = l, o >= 5 && (i += 3 + o - 5), o = 1), l && n++
  5023. }
  5024. for (var r = 0; r < e; r++)
  5025. for (var o = 0, a = t.modules[0][r], s = 0; s < e; s++) {
  5026. var l = t.modules[s][r];
  5027. s < e - 6 && l && !t.modules[s + 1][r] && t.modules[s + 2][r] && t.modules[s + 3][r] && t.modules[s + 4][r] && !t.modules[s + 5][r] && t.modules[s + 6][r] && (s < e - 10 ? t.modules[s + 7][r] && t.modules[s + 8][r] && t.modules[s + 9][r] && t.modules[s + 10][r] && (i += 40) : s > 3 && t.modules[s - 1][r] && t.modules[s - 2][r] && t.modules[s - 3][r] && t.modules[s - 4][r] && (i += 40)), a ^ l ? o++ : (a = l, o >= 5 && (i += 3 + o - 5), o = 1)
  5028. }
  5029. var u = Math.abs(100 * n / e / e - 50) / 5;
  5030. return i += 10 * u
  5031. }
  5032. }, v = {
  5033. glog: function (t) {
  5034. if (t < 1) throw new Error("glog(" + t + ")");
  5035. return v.LOG_TABLE[t]
  5036. },
  5037. gexp: function (t) {
  5038. for (; t < 0;) t += 255;
  5039. for (; t >= 256;) t -= 255;
  5040. return v.EXP_TABLE[t]
  5041. },
  5042. EXP_TABLE: new Array(256),
  5043. LOG_TABLE: new Array(256)
  5044. }, g = 0; g < 8; g++) v.EXP_TABLE[g] = 1 << g;
  5045. for (var g = 8; g < 256; g++) v.EXP_TABLE[g] = v.EXP_TABLE[g - 4] ^ v.EXP_TABLE[g - 5] ^ v.EXP_TABLE[g - 6] ^ v.EXP_TABLE[g - 8];
  5046. for (var g = 0; g < 255; g++) v.LOG_TABLE[v.EXP_TABLE[g]] = g;
  5047. a.prototype = {
  5048. get: function (t) {
  5049. return this.num[t]
  5050. },
  5051. getLength: function () {
  5052. return this.num.length
  5053. },
  5054. multiply: function (t) {
  5055. for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++)
  5056. for (var n = 0; n < t.getLength(); n++) e[i + n] ^= v.gexp(v.glog(this.get(i)) + v.glog(t.get(n)));
  5057. return new a(e, 0)
  5058. },
  5059. mod: function (t) {
  5060. var e = this.getLength(),
  5061. i = t.getLength();
  5062. if (e - i < 0) return this;
  5063. for (var n = new Array(e), s = 0; s < e; s++) n[s] = this.get(s);
  5064. for (; n.length >= i;) {
  5065. for (var o = v.glog(n[0]) - v.glog(t.get(0)), s = 0; s < t.getLength(); s++) n[s] ^= v.gexp(v.glog(t.get(s)) + o);
  5066. for (; 0 == n[0];) n.shift()
  5067. }
  5068. return new a(n, 0)
  5069. }
  5070. }, y = [
  5071. [1, 26, 19],
  5072. [1, 26, 16],
  5073. [1, 26, 13],
  5074. [1, 26, 9],
  5075. [1, 44, 34],
  5076. [1, 44, 28],
  5077. [1, 44, 22],
  5078. [1, 44, 16],
  5079. [1, 70, 55],
  5080. [1, 70, 44],
  5081. [2, 35, 17],
  5082. [2, 35, 13],
  5083. [1, 100, 80],
  5084. [2, 50, 32],
  5085. [2, 50, 24],
  5086. [4, 25, 9],
  5087. [1, 134, 108],
  5088. [2, 67, 43],
  5089. [2, 33, 15, 2, 34, 16],
  5090. [2, 33, 11, 2, 34, 12],
  5091. [2, 86, 68],
  5092. [4, 43, 27],
  5093. [4, 43, 19],
  5094. [4, 43, 15],
  5095. [2, 98, 78],
  5096. [4, 49, 31],
  5097. [2, 32, 14, 4, 33, 15],
  5098. [4, 39, 13, 1, 40, 14],
  5099. [2, 121, 97],
  5100. [2, 60, 38, 2, 61, 39],
  5101. [4, 40, 18, 2, 41, 19],
  5102. [4, 40, 14, 2, 41, 15],
  5103. [2, 146, 116],
  5104. [3, 58, 36, 2, 59, 37],
  5105. [4, 36, 16, 4, 37, 17],
  5106. [4, 36, 12, 4, 37, 13],
  5107. [2, 86, 68, 2, 87, 69],
  5108. [4, 69, 43, 1, 70, 44],
  5109. [6, 43, 19, 2, 44, 20],
  5110. [6, 43, 15, 2, 44, 16],
  5111. [4, 101, 81],
  5112. [1, 80, 50, 4, 81, 51],
  5113. [4, 50, 22, 4, 51, 23],
  5114. [3, 36, 12, 8, 37, 13],
  5115. [2, 116, 92, 2, 117, 93],
  5116. [6, 58, 36, 2, 59, 37],
  5117. [4, 46, 20, 6, 47, 21],
  5118. [7, 42, 14, 4, 43, 15],
  5119. [4, 133, 107],
  5120. [8, 59, 37, 1, 60, 38],
  5121. [8, 44, 20, 4, 45, 21],
  5122. [12, 33, 11, 4, 34, 12],
  5123. [3, 145, 115, 1, 146, 116],
  5124. [4, 64, 40, 5, 65, 41],
  5125. [11, 36, 16, 5, 37, 17],
  5126. [11, 36, 12, 5, 37, 13],
  5127. [5, 109, 87, 1, 110, 88],
  5128. [5, 65, 41, 5, 66, 42],
  5129. [5, 54, 24, 7, 55, 25],
  5130. [11, 36, 12],
  5131. [5, 122, 98, 1, 123, 99],
  5132. [7, 73, 45, 3, 74, 46],
  5133. [15, 43, 19, 2, 44, 20],
  5134. [3, 45, 15, 13, 46, 16],
  5135. [1, 135, 107, 5, 136, 108],
  5136. [10, 74, 46, 1, 75, 47],
  5137. [1, 50, 22, 15, 51, 23],
  5138. [2, 42, 14, 17, 43, 15],
  5139. [5, 150, 120, 1, 151, 121],
  5140. [9, 69, 43, 4, 70, 44],
  5141. [17, 50, 22, 1, 51, 23],
  5142. [2, 42, 14, 19, 43, 15],
  5143. [3, 141, 113, 4, 142, 114],
  5144. [3, 70, 44, 11, 71, 45],
  5145. [17, 47, 21, 4, 48, 22],
  5146. [9, 39, 13, 16, 40, 14],
  5147. [3, 135, 107, 5, 136, 108],
  5148. [3, 67, 41, 13, 68, 42],
  5149. [15, 54, 24, 5, 55, 25],
  5150. [15, 43, 15, 10, 44, 16],
  5151. [4, 144, 116, 4, 145, 117],
  5152. [17, 68, 42],
  5153. [17, 50, 22, 6, 51, 23],
  5154. [19, 46, 16, 6, 47, 17],
  5155. [2, 139, 111, 7, 140, 112],
  5156. [17, 74, 46],
  5157. [7, 54, 24, 16, 55, 25],
  5158. [34, 37, 13],
  5159. [4, 151, 121, 5, 152, 122],
  5160. [4, 75, 47, 14, 76, 48],
  5161. [11, 54, 24, 14, 55, 25],
  5162. [16, 45, 15, 14, 46, 16],
  5163. [6, 147, 117, 4, 148, 118],
  5164. [6, 73, 45, 14, 74, 46],
  5165. [11, 54, 24, 16, 55, 25],
  5166. [30, 46, 16, 2, 47, 17],
  5167. [8, 132, 106, 4, 133, 107],
  5168. [8, 75, 47, 13, 76, 48],
  5169. [7, 54, 24, 22, 55, 25],
  5170. [22, 45, 15, 13, 46, 16],
  5171. [10, 142, 114, 2, 143, 115],
  5172. [19, 74, 46, 4, 75, 47],
  5173. [28, 50, 22, 6, 51, 23],
  5174. [33, 46, 16, 4, 47, 17],
  5175. [8, 152, 122, 4, 153, 123],
  5176. [22, 73, 45, 3, 74, 46],
  5177. [8, 53, 23, 26, 54, 24],
  5178. [12, 45, 15, 28, 46, 16],
  5179. [3, 147, 117, 10, 148, 118],
  5180. [3, 73, 45, 23, 74, 46],
  5181. [4, 54, 24, 31, 55, 25],
  5182. [11, 45, 15, 31, 46, 16],
  5183. [7, 146, 116, 7, 147, 117],
  5184. [21, 73, 45, 7, 74, 46],
  5185. [1, 53, 23, 37, 54, 24],
  5186. [19, 45, 15, 26, 46, 16],
  5187. [5, 145, 115, 10, 146, 116],
  5188. [19, 75, 47, 10, 76, 48],
  5189. [15, 54, 24, 25, 55, 25],
  5190. [23, 45, 15, 25, 46, 16],
  5191. [13, 145, 115, 3, 146, 116],
  5192. [2, 74, 46, 29, 75, 47],
  5193. [42, 54, 24, 1, 55, 25],
  5194. [23, 45, 15, 28, 46, 16],
  5195. [17, 145, 115],
  5196. [10, 74, 46, 23, 75, 47],
  5197. [10, 54, 24, 35, 55, 25],
  5198. [19, 45, 15, 35, 46, 16],
  5199. [17, 145, 115, 1, 146, 116],
  5200. [14, 74, 46, 21, 75, 47],
  5201. [29, 54, 24, 19, 55, 25],
  5202. [11, 45, 15, 46, 46, 16],
  5203. [13, 145, 115, 6, 146, 116],
  5204. [14, 74, 46, 23, 75, 47],
  5205. [44, 54, 24, 7, 55, 25],
  5206. [59, 46, 16, 1, 47, 17],
  5207. [12, 151, 121, 7, 152, 122],
  5208. [12, 75, 47, 26, 76, 48],
  5209. [39, 54, 24, 14, 55, 25],
  5210. [22, 45, 15, 41, 46, 16],
  5211. [6, 151, 121, 14, 152, 122],
  5212. [6, 75, 47, 34, 76, 48],
  5213. [46, 54, 24, 10, 55, 25],
  5214. [2, 45, 15, 64, 46, 16],
  5215. [17, 152, 122, 4, 153, 123],
  5216. [29, 74, 46, 14, 75, 47],
  5217. [49, 54, 24, 10, 55, 25],
  5218. [24, 45, 15, 46, 46, 16],
  5219. [4, 152, 122, 18, 153, 123],
  5220. [13, 74, 46, 32, 75, 47],
  5221. [48, 54, 24, 14, 55, 25],
  5222. [42, 45, 15, 32, 46, 16],
  5223. [20, 147, 117, 4, 148, 118],
  5224. [40, 75, 47, 7, 76, 48],
  5225. [43, 54, 24, 22, 55, 25],
  5226. [10, 45, 15, 67, 46, 16],
  5227. [19, 148, 118, 6, 149, 119],
  5228. [18, 75, 47, 31, 76, 48],
  5229. [34, 54, 24, 34, 55, 25],
  5230. [20, 45, 15, 61, 46, 16]
  5231. ], o.prototype.getRightType = function () {
  5232. for (var t = 1; t < 41; t++) {
  5233. var e = y[4 * (t - 1) + this.errorCorrectLevel];
  5234. if (void 0 == e) throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + this.errorCorrectLevel);
  5235. for (var i = e.length / 3, n = 0, s = 0; s < i; s++) {
  5236. var o = e[3 * s + 0],
  5237. a = e[3 * s + 2];
  5238. n += a * o
  5239. }
  5240. var r = t > 9 ? 2 : 1;
  5241. if (this.utf8bytes.length + r < n || 40 == t) {
  5242. this.typeNumber = t, this.rsBlock = e, this.totalDataCount = n;
  5243. break
  5244. }
  5245. }
  5246. }, r.prototype = {
  5247. get: function (t) {
  5248. var e = Math.floor(t / 8);
  5249. return this.buffer[e] >>> 7 - t % 8 & 1
  5250. },
  5251. put: function (t, e) {
  5252. for (var i = 0; i < e; i++) this.putBit(t >>> e - i - 1 & 1)
  5253. },
  5254. putBit: function (t) {
  5255. var e = Math.floor(this.length / 8);
  5256. this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++
  5257. }
  5258. }, c.fn.qrcode = function (t) {
  5259. return this.each(function () {
  5260. c(this).append(new d(t))
  5261. })
  5262. }, t.exports = u.qrcode = d
  5263. }, function (t, e, i) {
  5264. "use strict";
  5265. var n = i(1),
  5266. s = i(2),
  5267. o = function (t, e) {
  5268. var i = this;
  5269. this.options = n.extend({}, o.DEFAULTS, e), this.$element = n(t), this.sticked = null, this.inited = null, this.$holder = void 0, this.$window = n(window).on("scroll.sticky.amui", s.utils.debounce(n.proxy(this.checkPosition, this), 10)).on("resize.sticky.amui orientationchange.sticky.amui", s.utils.debounce(function () {
  5270. i.reset(!0, function () {
  5271. i.checkPosition()
  5272. })
  5273. }, 50)).on("load.sticky.amui", n.proxy(this.checkPosition, this)), this.offset = this.$element.offset(), this.init()
  5274. };
  5275. o.DEFAULTS = {
  5276. top: 0,
  5277. bottom: 0,
  5278. animation: "",
  5279. className: {
  5280. sticky: "am-sticky",
  5281. resetting: "am-sticky-resetting",
  5282. stickyBtm: "am-sticky-bottom",
  5283. animationRev: "am-animation-reverse"
  5284. }
  5285. }, o.prototype.init = function () {
  5286. var t = this.check();
  5287. if (!t) return !1;
  5288. var e = this.$element,
  5289. i = "";
  5290. n.each(e.css(["marginTop", "marginRight", "marginBottom", "marginLeft"]), function (t, e) {
  5291. return i += " " + e
  5292. });
  5293. var s = n('<div class="am-sticky-placeholder"></div>').css({
  5294. height: "absolute" !== e.css("position") ? e.outerHeight() : "",
  5295. "float": "none" != e.css("float") ? e.css("float") : "",
  5296. margin: i
  5297. });
  5298. return this.$holder = e.css("margin", 0).wrap(s).parent(), this.inited = 1, !0
  5299. }, o.prototype.reset = function (t, e) {
  5300. var i = this.options,
  5301. n = this.$element,
  5302. o = i.animation ? " am-animation-" + i.animation : "",
  5303. a = function () {
  5304. n.css({
  5305. position: "",
  5306. top: "",
  5307. width: "",
  5308. left: "",
  5309. margin: 0
  5310. }), n.removeClass([o, i.className.animationRev, i.className.sticky, i.className.resetting].join(" ")), this.animating = !1, this.sticked = !1, this.offset = n.offset(), e && e()
  5311. }.bind(this);
  5312. n.addClass(i.className.resetting), !t && i.animation && s.support.animation ? (this.animating = !0, n.removeClass(o).one(s.support.animation.end, function () {
  5313. a()
  5314. }).width(), n.addClass(o + " " + i.className.animationRev)) : a()
  5315. }, o.prototype.check = function () {
  5316. if (!this.$element.is(":visible")) return !1;
  5317. var t = this.options.media;
  5318. if (t) switch (typeof t) {
  5319. case "number":
  5320. if (window.innerWidth < t) return !1;
  5321. break;
  5322. case "string":
  5323. if (window.matchMedia && !window.matchMedia(t).matches) return !1
  5324. }
  5325. return !0
  5326. }, o.prototype.checkPosition = function () {
  5327. if (!this.inited) {
  5328. var t = this.init();
  5329. if (!t) return
  5330. }
  5331. var e = this.options,
  5332. i = this.$window.scrollTop(),
  5333. n = e.top,
  5334. s = e.bottom,
  5335. o = this.$element,
  5336. a = e.animation ? " am-animation-" + e.animation : "",
  5337. r = [e.className.sticky, a].join(" ");
  5338. "function" == typeof s && (s = s(this.$element));
  5339. var l = i > this.$holder.offset().top;
  5340. !this.sticked && l ? o.addClass(r) : this.sticked && !l && this.reset(), this.$holder.css({
  5341. height: o.is(":visible") && "absolute" !== o.css("position") ? o.outerHeight() : ""
  5342. }), l && o.css({
  5343. top: n,
  5344. left: this.$holder.offset().left,
  5345. width: this.$holder.width()
  5346. }), this.sticked = l
  5347. }, s.plugin("sticky", o), n(window).on("load", function () {
  5348. n("[data-am-sticky]").sticky()
  5349. }), t.exports = o
  5350. }, function (t, e, i) {
  5351. "use strict";
  5352. function n(t) {
  5353. var e, i = Array.prototype.slice.call(arguments, 1);
  5354. return this.each(function () {
  5355. var n = s(this),
  5356. a = n.is(".am-tabs") && n || n.closest(".am-tabs"),
  5357. r = a.data("amui.tabs"),
  5358. l = s.extend({}, o.utils.parseOptions(n.data("amTabs")), s.isPlainObject(t) && t);
  5359. r || a.data("amui.tabs", r = new c(a[0], l)), "string" == typeof t && ("open" === t && n.is(".am-tabs-nav a") ? r.open(n) : e = "function" == typeof r[t] ? r[t].apply(r, i) : r[t])
  5360. }), void 0 === e ? this : e
  5361. }
  5362. var s = i(1),
  5363. o = i(2),
  5364. a = i(3),
  5365. r = o.support.transition,
  5366. l = o.support.animation,
  5367. c = function (t, e) {
  5368. this.$element = s(t), this.options = s.extend({}, c.DEFAULTS, e || {}), this.transitioning = this.activeIndex = null, this.refresh(), this.init()
  5369. };
  5370. c.DEFAULTS = {
  5371. selector: {
  5372. nav: "> .am-tabs-nav",
  5373. content: "> .am-tabs-bd",
  5374. panel: "> .am-tab-panel"
  5375. },
  5376. activeClass: "am-active"
  5377. }, c.prototype.refresh = function () {
  5378. var t = this.options.selector;
  5379. this.$tabNav = this.$element.find(t.nav), this.$navs = this.$tabNav.find("a"), this.$content = this.$element.find(t.content), this.$tabPanels = this.$content.find(t.panel);
  5380. var e = this.$tabNav.find("> ." + this.options.activeClass);
  5381. 1 !== e.length ? this.open(0) : this.activeIndex = this.$navs.index(e.children("a"))
  5382. }, c.prototype.init = function () {
  5383. var t = this,
  5384. e = this.options;
  5385. if (this.$element.on("click.tabs.amui", e.selector.nav + " a", function (e) {
  5386. e.preventDefault(), t.open(s(this))
  5387. }), !e.noSwipe) {
  5388. if (!this.$content.length) return this;
  5389. var i = new a.Manager(this.$content[0]),
  5390. n = new a.Swipe({
  5391. direction: a.DIRECTION_HORIZONTAL
  5392. });
  5393. i.add(n), i.on("swipeleft", o.utils.debounce(function (e) {
  5394. e.preventDefault(), t.goTo("next")
  5395. }, 100)), i.on("swiperight", o.utils.debounce(function (e) {
  5396. e.preventDefault(), t.goTo("prev")
  5397. }, 100)), this._hammer = i
  5398. }
  5399. }, c.prototype.open = function (t) {
  5400. var e = this.options.activeClass,
  5401. i = "number" == typeof t ? t : this.$navs.index(s(t));
  5402. if (t = "number" == typeof t ? this.$navs.eq(i) : s(t), t && t.length && !this.transitioning && !t.parent("li").hasClass(e)) {
  5403. var n = this.$tabNav,
  5404. o = t.attr("href"),
  5405. a = /^#.+$/,
  5406. r = a.test(o) && this.$content.find(o) || this.$tabPanels.eq(i),
  5407. l = n.find("." + e + " a")[0],
  5408. c = s.Event("open.tabs.amui", {
  5409. relatedTarget: l
  5410. });
  5411. t.trigger(c), c.isDefaultPrevented() || (this.activate(t.closest("li"), n), this.activate(r, this.$content, function () {
  5412. t.trigger({
  5413. type: "opened.tabs.amui",
  5414. relatedTarget: l
  5415. })
  5416. }), this.activeIndex = i)
  5417. }
  5418. }, c.prototype.activate = function (t, e, i) {
  5419. this.transitioning = !0;
  5420. var n = this.options.activeClass,
  5421. o = e.find("> ." + n),
  5422. a = i && r && !!o.length;
  5423. o.removeClass(n + " am-in"), t.addClass(n), a ? (t.redraw(), t.addClass("am-in")) : t.removeClass("am-fade");
  5424. var l = s.proxy(function () {
  5425. i && i(), this.transitioning = !1
  5426. }, this);
  5427. a && !this.$content.is(".am-tabs-bd-ofv") ? o.one(r.end, l) : l()
  5428. }, c.prototype.goTo = function (t) {
  5429. var e = this.activeIndex,
  5430. i = "next" === t,
  5431. n = i ? "am-animation-right-spring" : "am-animation-left-spring";
  5432. if (i && e + 1 >= this.$navs.length || !i && 0 === e) {
  5433. var s = this.$tabPanels.eq(e);
  5434. l && s.addClass(n).on(l.end, function () {
  5435. s.removeClass(n)
  5436. })
  5437. } else this.open(i ? e + 1 : e - 1)
  5438. }, c.prototype.destroy = function () {
  5439. this.$element.off(".tabs.amui"), a.off(this.$content[0], "swipeleft swiperight"), this._hammer && this._hammer.destroy(), s.removeData(this.$element, "amui.tabs")
  5440. }, s.fn.tabs = n, o.ready(function (t) {
  5441. s("[data-am-tabs]", t).tabs()
  5442. }), s(document).on("click.tabs.amui.data-api", "[data-am-tabs] .am-tabs-nav a", function (t) {
  5443. t.preventDefault(), n.call(s(this), "open")
  5444. }), t.exports = o.tabs = c
  5445. }, function (t, e, i) {
  5446. "use strict";
  5447. var n = i(1),
  5448. s = i(2),
  5449. o = function (t, e) {
  5450. this.options = n.extend({}, o.DEFAULTS, e), this.$element = n(t), this.init()
  5451. };
  5452. o.DEFAULTS = {
  5453. checkboxClass: "am-ucheck-checkbox",
  5454. radioClass: "am-ucheck-radio",
  5455. checkboxTpl: '<span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i class="am-icon-checked"></i></span>',
  5456. radioTpl: '<span class="am-ucheck-icons"><i class="am-icon-unchecked"></i><i class="am-icon-checked"></i></span>'
  5457. }, o.prototype.init = function () {
  5458. var t = this.$element,
  5459. e = t[0],
  5460. i = this.options;
  5461. "checkbox" === e.type ? t.addClass(i.checkboxClass).after(i.checkboxTpl) : "radio" === e.type && t.addClass(i.radioClass).after(i.radioTpl)
  5462. }, o.prototype.check = function () {
  5463. this.$element.prop("checked", !0).trigger("change.ucheck.amui").trigger("checked.ucheck.amui")
  5464. }, o.prototype.uncheck = function () {
  5465. this.$element.prop("checked", !1).trigger("change").trigger("unchecked.ucheck.amui")
  5466. }, o.prototype.toggle = function () {
  5467. this.$element.prop("checked", function (t, e) {
  5468. return !e
  5469. }).trigger("change.ucheck.amui").trigger("toggled.ucheck.amui")
  5470. }, o.prototype.disable = function () {
  5471. this.$element.prop("disabled", !0).trigger("change.ucheck.amui").trigger("disabled.ucheck.amui")
  5472. }, o.prototype.enable = function () {
  5473. this.$element.prop("disabled", !1), this.$element.trigger("change.ucheck.amui").trigger("enabled.ucheck.amui")
  5474. }, o.prototype.destroy = function () {
  5475. this.$element.removeData("amui.ucheck").removeClass(this.options.checkboxClass + " " + this.options.radioClass).next(".am-ucheck-icons").remove().end().trigger("destroyed.ucheck.amui")
  5476. }, s.plugin("uCheck", o, {
  5477. after: function () {
  5478. s.support.touch && this.parent().hover(function () {
  5479. n(this).addClass("am-nohover")
  5480. }, function () {
  5481. n(this).removeClass("am-nohover")
  5482. })
  5483. }
  5484. }), s.ready(function (t) {
  5485. n("[data-am-ucheck]", t).uCheck()
  5486. }), t.exports = o
  5487. }, function (t, e, i) {
  5488. "use strict";
  5489. var n = i(1),
  5490. s = i(2),
  5491. o = function (t, e) {
  5492. this.options = n.extend({}, o.DEFAULTS, e), this.options.patterns = n.extend({}, o.patterns, this.options.patterns);
  5493. var i = this.options.locales;
  5494. !o.validationMessages[i] && (this.options.locales = "zh_CN"), this.$element = n(t), this.init()
  5495. };
  5496. o.DEFAULTS = {
  5497. debug: !1,
  5498. locales: "zh_CN",
  5499. H5validation: !1,
  5500. H5inputType: ["email", "url", "number"],
  5501. patterns: {},
  5502. patternClassPrefix: "js-pattern-",
  5503. activeClass: "am-active",
  5504. inValidClass: "am-field-error",
  5505. validClass: "am-field-valid",
  5506. validateOnSubmit: !0,
  5507. alwaysRevalidate: !1,
  5508. allFields: ":input:not(:submit, :button, :disabled, .am-novalidate)",
  5509. ignore: ":hidden:not([data-am-selected], .am-validate)",
  5510. customEvents: "validate",
  5511. keyboardFields: ":input:not(:submit, :button, :disabled, .am-novalidate)",
  5512. keyboardEvents: "focusout, change",
  5513. activeKeyup: !1,
  5514. textareaMaxlenthKeyup: !0,
  5515. pointerFields: 'input[type="range"]:not(:disabled, .am-novalidate), input[type="radio"]:not(:disabled, .am-novalidate), input[type="checkbox"]:not(:disabled, .am-novalidate), select:not(:disabled, .am-novalidate), option:not(:disabled, .am-novalidate)',
  5516. pointerEvents: "click",
  5517. onValid: function (t) {},
  5518. onInValid: function (t) {},
  5519. markValid: function (t) {
  5520. var e = this.options,
  5521. i = n(t.field),
  5522. s = i.closest(".am-form-group");
  5523. i.addClass(e.validClass).removeClass(e.inValidClass), s.addClass("am-form-success").removeClass("am-form-error"), e.onValid.call(this, t)
  5524. },
  5525. markInValid: function (t) {
  5526. var e = this.options,
  5527. i = n(t.field),
  5528. s = i.closest(".am-form-group");
  5529. i.addClass(e.inValidClass + " " + e.activeClass).removeClass(e.validClass), s.addClass("am-form-error").removeClass("am-form-success"), e.onInValid.call(this, t)
  5530. },
  5531. validate: function (t) {},
  5532. submit: null
  5533. }, o.VERSION = "2.7.2", o.patterns = {
  5534. email: /^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
  5535. url: /^(https?|ftp):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
  5536. number: /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/,
  5537. dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
  5538. integer: /^-?\d+$/
  5539. }, o.validationMessages = {
  5540. zh_CN: {
  5541. valueMissing: "\u8bf7\u586b\u5199\uff08\u9009\u62e9\uff09\u6b64\u5b57\u6bb5",
  5542. customError: {
  5543. tooShort: "\u81f3\u5c11\u586b\u5199 %s \u4e2a\u5b57\u7b26",
  5544. checkedOverflow: "\u81f3\u591a\u9009\u62e9 %s \u9879",
  5545. checkedUnderflow: "\u81f3\u5c11\u9009\u62e9 %s \u9879"
  5546. },
  5547. patternMismatch: "\u8bf7\u6309\u7167\u8981\u6c42\u7684\u683c\u5f0f\u586b\u5199",
  5548. rangeOverflow: "\u8bf7\u586b\u5199\u5c0f\u4e8e\u7b49\u4e8e %s \u7684\u503c",
  5549. rangeUnderflow: "\u8bf7\u586b\u5199\u5927\u4e8e\u7b49\u4e8e %s \u7684\u503c",
  5550. stepMismatch: "",
  5551. tooLong: "\u81f3\u591a\u586b\u5199 %s \u4e2a\u5b57\u7b26",
  5552. typeMismatch: "\u8bf7\u6309\u7167\u8981\u6c42\u7684\u7c7b\u578b\u586b\u5199"
  5553. }
  5554. }, o.ERROR_MAP = {
  5555. tooShort: "minlength",
  5556. checkedOverflow: "maxchecked",
  5557. checkedUnderflow: "minchecked",
  5558. rangeOverflow: "max",
  5559. rangeUnderflow: "min",
  5560. tooLong: "maxlength"
  5561. }, o.prototype.init = function () {
  5562. function t(t) {
  5563. var e = t.toString();
  5564. return e.substring(1, e.length - 1)
  5565. }
  5566. function e(t, e, a) {
  5567. var r = e.split(","),
  5568. l = function (t) {
  5569. i.validate(this)
  5570. };
  5571. a && (l = s.utils.debounce(l, a)), n.each(r, function (e, i) {
  5572. o.on(i + ".validator.amui", t, l)
  5573. })
  5574. }
  5575. var i = this,
  5576. o = this.$element,
  5577. a = this.options;
  5578. return (!a.H5validation || !s.support.formValidation) && (o.attr("novalidate", "novalidate"), n.each(a.H5inputType, function (e, i) {
  5579. var n = o.find("input[type=" + i + "]");
  5580. n.attr("pattern") || n.is("[class*=" + a.patternClassPrefix + "]") || n.attr("pattern", t(a.patterns[i]))
  5581. }), n.each(a.patterns, function (e, i) {
  5582. var n = o.find("." + a.patternClassPrefix + e);
  5583. !n.attr("pattern") && n.attr("pattern", t(i))
  5584. }), o.on("submit.validator.amui", function (t) {
  5585. if ("function" == typeof a.submit) return a.submit.call(i, t);
  5586. if (a.validateOnSubmit) {
  5587. var e = i.isFormValid();
  5588. return "boolean" === n.type(e) ? e : !!o.data("amui.checked") || (n.when(e).then(function () {
  5589. o.data("amui.checked", !0).submit()
  5590. }, function () {
  5591. o.data("amui.checked", !1).find("." + a.inValidClass).eq(0).focus()
  5592. }), !1)
  5593. }
  5594. }), e(":input", a.customEvents), e(a.keyboardFields, a.keyboardEvents), e(a.pointerFields, a.pointerEvents), a.textareaMaxlenthKeyup && e("textarea[maxlength]", "keyup", 50), void(a.activeKeyup && e(".am-active", "keyup", 50)))
  5595. }, o.prototype.isValid = function (t) {
  5596. var e = n(t),
  5597. i = this.options;
  5598. return (void 0 === e.data("validity") || i.alwaysRevalidate) && this.validate(t), e.data("validity") && e.data("validity").valid
  5599. }, o.prototype.validate = function (t) {
  5600. var e = this,
  5601. i = this.$element,
  5602. s = this.options,
  5603. o = n(t),
  5604. a = o.data("equalTo");
  5605. a && o.attr("pattern", "^" + i.find(a).val() + "$");
  5606. var r = o.attr("pattern") || !1,
  5607. l = new RegExp(r),
  5608. c = null,
  5609. u = null,
  5610. h = o.is("[type=checkbox]") ? (u = i.find('input[name="' + t.name + '"]')).filter(":checked").length : o.is("[type=radio]") ? (c = this.$element.find('input[name="' + t.name + '"]')).filter(":checked").length > 0 : o.val();
  5611. o = u && u.length ? u.first() : o;
  5612. var d = void 0 !== o.attr("required") && "false" !== o.attr("required"),
  5613. p = parseInt(o.attr("maxlength"), 10),
  5614. m = parseInt(o.attr("minlength"), 10),
  5615. f = Number(o.attr("min")),
  5616. v = Number(o.attr("max")),
  5617. g = this.createValidity({
  5618. field: o[0],
  5619. valid: !0
  5620. });
  5621. if (s.debug && window.console && (console.log("Validate: value -> [" + h + ", regex -> [" + l + "], required -> " + d), console.log("Regex test: " + l.test(h) + ", Pattern: " + r)), !isNaN(p) && h.length > p && (g.valid = !1, g.tooLong = !0), !isNaN(m) && h.length < m && (g.valid = !1, g.customError = "tooShort"), !isNaN(f) && Number(h) < f && (g.valid = !1, g.rangeUnderflow = !0), !isNaN(v) && Number(h) > v && (g.valid = !1, g.rangeOverflow = !0), d && !h) g.valid = !1, g.valueMissing = !0;
  5622. else if ((u || o.is('select[multiple="multiple"]')) && h) {
  5623. h = u ? h : h.length;
  5624. var y = parseInt(o.attr("minchecked"), 10),
  5625. w = parseInt(o.attr("maxchecked"), 10);
  5626. !isNaN(y) && h < y && (g.valid = !1, g.customError = "checkedUnderflow"), !isNaN(w) && h > w && (g.valid = !1, g.customError = "checkedOverflow")
  5627. } else r && !l.test(h) && h && (g.valid = !1, g.patternMismatch = !0);
  5628. var b, T = function (t) {
  5629. this.markField(t);
  5630. var i = n.Event("validated.field.validator.amui");
  5631. i.validity = t, o.trigger(i).data("validity", t);
  5632. var s = c || u;
  5633. return s && s.not(o).data("validity", t).each(function () {
  5634. t.field = this, e.markField(t)
  5635. }), t
  5636. };
  5637. if ("function" == typeof s.validate && (b = s.validate.call(this, g)), b) {
  5638. var x = new n.Deferred;
  5639. return o.data("amui.dfdValidity", x.promise()), n.when(b).always(function (t) {
  5640. x[t.valid ? "resolve" : "reject"](t), T.call(e, t)
  5641. })
  5642. }
  5643. T.call(this, g)
  5644. }, o.prototype.markField = function (t) {
  5645. var e = this.options,
  5646. i = "mark" + (t.valid ? "" : "In") + "Valid";
  5647. e[i] && e[i].call(this, t)
  5648. }, o.prototype.validateForm = function () {
  5649. var t = this,
  5650. e = this.$element,
  5651. i = this.options,
  5652. s = e.find(i.allFields).not(i.ignore),
  5653. o = [],
  5654. a = !0,
  5655. r = [],
  5656. l = n([]),
  5657. c = [],
  5658. u = !1;
  5659. e.trigger("validate.form.validator.amui");
  5660. var h = s.filter(function (t) {
  5661. var e;
  5662. if ("INPUT" === this.tagName && "radio" === this.type) {
  5663. if (e = this.name, o[e] === !0) return !1;
  5664. o[e] = !0;
  5665. }
  5666. return !0
  5667. });
  5668. h.each(function () {
  5669. var i = n(this),
  5670. s = t.isValid(this),
  5671. o = i.data("validity");
  5672. a = !!s && a, r.push(o), s || (l = l.add(n(this), e));
  5673. var h = i.data("amui.dfdValidity");
  5674. if (h) c.push(h), u = !0;
  5675. else {
  5676. var d = new n.Deferred;
  5677. c.push(d.promise()), d[s ? "resolve" : "reject"](o)
  5678. }
  5679. });
  5680. var d = {
  5681. valid: a,
  5682. $invalidFields: l,
  5683. validity: r,
  5684. promises: c,
  5685. async: u
  5686. };
  5687. return e.trigger("validated.form.validator.amui", d), d
  5688. }, o.prototype.isFormValid = function () {
  5689. var t = this,
  5690. e = this.validateForm(),
  5691. i = function (e) {
  5692. t.$element.trigger(e + ".validator.amui")
  5693. };
  5694. if (e.async) {
  5695. var s = new n.Deferred;
  5696. return n.when.apply(null, e.promises).then(function () {
  5697. s.resolve(), i("valid")
  5698. }, function () {
  5699. s.reject(), i("invalid")
  5700. }), s.promise()
  5701. }
  5702. if (!e.valid) {
  5703. var o = e.$invalidFields.first();
  5704. return o.is("[data-am-selected]") && (o = o.next(".am-selected").find(".am-selected-btn")), o.focus(), i("invalid"), !1
  5705. }
  5706. return i("valid"), !0
  5707. }, o.prototype.createValidity = function (t) {
  5708. return n.extend({
  5709. customError: t.customError || !1,
  5710. patternMismatch: t.patternMismatch || !1,
  5711. rangeOverflow: t.rangeOverflow || !1,
  5712. rangeUnderflow: t.rangeUnderflow || !1,
  5713. stepMismatch: t.stepMismatch || !1,
  5714. tooLong: t.tooLong || !1,
  5715. typeMismatch: t.typeMismatch || !1,
  5716. valid: t.valid || !0,
  5717. valueMissing: t.valueMissing || !1
  5718. }, t)
  5719. }, o.prototype.getValidationMessage = function (t) {
  5720. var e, i, s = o.validationMessages[this.options.locales],
  5721. a = "%s",
  5722. r = n(t.field);
  5723. return (r.is('[type="checkbox"]') || r.is('[type="radio"]')) && (r = this.$element.find("[name=" + r.attr("name") + "]").first()), n.each(t, function (t, i) {
  5724. return "field" === t || "valid" === t ? t : "customError" === t && i ? (e = i, s = s.customError, !1) : i === !0 ? (e = t, !1) : void 0
  5725. }), i = s[e] || void 0, i && o.ERROR_MAP[e] && (i = i.replace(a, r.attr(o.ERROR_MAP[e]) || "\u89c4\u5b9a\u7684")), i
  5726. }, o.prototype.removeMark = function () {
  5727. this.$element.find(".am-form-success, .am-form-error, ." + this.options.inValidClass + ", ." + this.options.validClass).removeClass(["am-form-success", "am-form-error", this.options.inValidClass, this.options.validClass].join(" "))
  5728. }, o.prototype.destroy = function () {
  5729. this.removeMark(), this.$element.removeData("amui.validator amui.checked").off(".validator.amui").find(this.options.allFields).removeData("validity amui.dfdValidity")
  5730. }, s.plugin("validator", o), s.ready(function (t) {
  5731. n("[data-am-validator]", t).validator()
  5732. }), t.exports = o
  5733. }, function (t, e, i) {
  5734. "use strict";
  5735. var n = i(2),
  5736. s = {
  5737. get: function (t) {
  5738. var e, i = encodeURIComponent(t) + "=",
  5739. n = document.cookie.indexOf(i),
  5740. s = null;
  5741. return n > -1 && (e = document.cookie.indexOf(";", n), e == -1 && (e = document.cookie.length), s = decodeURIComponent(document.cookie.substring(n + i.length, e))), s
  5742. },
  5743. set: function (t, e, i, n, s, o) {
  5744. var a = encodeURIComponent(t) + "=" + encodeURIComponent(e);
  5745. i instanceof Date && (a += "; expires=" + i.toUTCString()), n && (a += "; path=" + n), s && (a += "; domain=" + s), o && (a += "; secure"), document.cookie = a
  5746. },
  5747. unset: function (t, e, i, n) {
  5748. this.set(t, "", new Date(0), e, i, n)
  5749. }
  5750. };
  5751. n.utils = n.utils || {}, t.exports = n.utils.cookie = s
  5752. }, function (t, e, i) {
  5753. "use strict";
  5754. var n = i(2),
  5755. s = function () {
  5756. var t = "undefined" != typeof Element && "ALLOW_KEYBOARD_INPUT" in Element,
  5757. e = function () {
  5758. for (var t, e, i = [
  5759. ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"],
  5760. ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"],
  5761. ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"],
  5762. ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"],
  5763. ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]
  5764. ], n = 0, s = i.length, o = {}; n < s; n++)
  5765. if (t = i[n], t && t[1] in document) {
  5766. for (n = 0, e = t.length; n < e; n++) o[i[0][n]] = t[n];
  5767. return o
  5768. } return !1
  5769. }(),
  5770. i = {
  5771. request: function (i) {
  5772. var n = e.requestFullscreen;
  5773. i = i || document.documentElement, /5\.1[\.\d]* Safari/.test(navigator.userAgent) ? i[n]() : i[n](t && Element.ALLOW_KEYBOARD_INPUT)
  5774. },
  5775. exit: function () {
  5776. document[e.exitFullscreen]()
  5777. },
  5778. toggle: function (t) {
  5779. this.isFullscreen ? this.exit() : this.request(t)
  5780. },
  5781. raw: e
  5782. };
  5783. return !!e && (Object.defineProperties(i, {
  5784. isFullscreen: {
  5785. get: function () {
  5786. return !!document[e.fullscreenElement]
  5787. }
  5788. },
  5789. element: {
  5790. enumerable: !0,
  5791. get: function () {
  5792. return document[e.fullscreenElement]
  5793. }
  5794. },
  5795. enabled: {
  5796. enumerable: !0,
  5797. get: function () {
  5798. return !!document[e.fullscreenEnabled]
  5799. }
  5800. }
  5801. }), i.VERSION = "3.0.0", i)
  5802. }();
  5803. t.exports = n.fullscreen = s
  5804. }, function (t, e, i) {
  5805. "use strict";
  5806. var n = i(1),
  5807. s = i(2);
  5808. s.support.geolocation = window.navigator && window.navigator.geolocation;
  5809. var o = s.support.geolocation,
  5810. a = function (t) {
  5811. this.options = t || {}
  5812. };
  5813. a.MESSAGES = {
  5814. unsupportedBrowser: "Browser does not support location services",
  5815. permissionDenied: "You have rejected access to your location",
  5816. positionUnavailable: "Unable to determine your location",
  5817. timeout: "Service timeout has been reached"
  5818. }, a.ERROR_CODE = {
  5819. 0: "unsupportedBrowser",
  5820. 1: "permissionDenied",
  5821. 2: "positionUnavailable",
  5822. 3: "timeout"
  5823. }, a.prototype.get = function (t) {
  5824. var e = this;
  5825. t = n.extend({}, this.options, t);
  5826. var i = new n.Deferred;
  5827. return o ? this.watchID = o.getCurrentPosition(function (t) {
  5828. i.resolve.call(e, t)
  5829. }, function (t) {
  5830. i.reject(a.MESSAGES[a.ERROR_CODE[t.code]])
  5831. }, t) : i.reject(a.MESSAGES.unsupportedBrowser), i.promise()
  5832. }, a.prototype.watch = function (t) {
  5833. if (o && (t = n.extend({}, this.options, t), n.isFunction(t.done))) {
  5834. this.clearWatch();
  5835. var e = n.isFunction(t.fail) ? t.fail : null;
  5836. return this.watchID = o.watchPosition(t.done, e, t), this.watchID
  5837. }
  5838. }, a.prototype.clearWatch = function () {
  5839. o && this.watchID && (o.clearWatch(this.watchID), this.watchID = null)
  5840. }, t.exports = s.Geolocation = a
  5841. }, function (t, e, i) {
  5842. (function (e) {
  5843. "use strict";
  5844. function n() {
  5845. try {
  5846. return l in r && r[l]
  5847. } catch (t) {
  5848. return !1
  5849. }
  5850. }
  5851. var s, o = i(2),
  5852. a = {},
  5853. r = "undefined" != typeof window ? window : e,
  5854. l = "localStorage";
  5855. a.disabled = !1, a.version = "1.3.20", a.set = function (t, e) {}, a.get = function (t, e) {}, a.has = function (t) {
  5856. return void 0 !== a.get(t)
  5857. }, a.remove = function (t) {}, a.clear = function () {}, a.transact = function (t, e, i) {
  5858. null == i && (i = e, e = null), null == e && (e = {});
  5859. var n = a.get(t, e);
  5860. i(n), a.set(t, n)
  5861. }, a.getAll = function () {}, a.forEach = function () {}, a.serialize = function (t) {
  5862. return JSON.stringify(t)
  5863. }, a.deserialize = function (t) {
  5864. if ("string" == typeof t) try {
  5865. return JSON.parse(t)
  5866. } catch (e) {
  5867. return t || void 0
  5868. }
  5869. }, n() && (s = r[l], a.set = function (t, e) {
  5870. return void 0 === e ? a.remove(t) : (s.setItem(t, a.serialize(e)), e)
  5871. }, a.get = function (t, e) {
  5872. var i = a.deserialize(s.getItem(t));
  5873. return void 0 === i ? e : i
  5874. }, a.remove = function (t) {
  5875. s.removeItem(t)
  5876. }, a.clear = function () {
  5877. s.clear()
  5878. }, a.getAll = function () {
  5879. var t = {};
  5880. return a.forEach(function (e, i) {
  5881. t[e] = i
  5882. }), t
  5883. }, a.forEach = function (t) {
  5884. for (var e = 0; e < s.length; e++) {
  5885. var i = s.key(e);
  5886. t(i, a.get(i))
  5887. }
  5888. });
  5889. try {
  5890. var c = "__storejs__";
  5891. a.set(c, c), a.get(c) != c && (a.disabled = !0), a.remove(c)
  5892. } catch (u) {
  5893. a.disabled = !0
  5894. }
  5895. a.enabled = !a.disabled, t.exports = o.store = a
  5896. }).call(e, function () {
  5897. return this
  5898. }())
  5899. }, function (t, e, i) {
  5900. "use strict";
  5901. function n() {
  5902. var t = s('[data-am-widget="accordion"]'),
  5903. e = {
  5904. item: ".am-accordion-item",
  5905. title: ".am-accordion-title",
  5906. body: ".am-accordion-bd",
  5907. disabled: ".am-disabled"
  5908. };
  5909. t.each(function (t, i) {
  5910. var n = o.utils.parseOptions(s(i).attr("data-am-accordion")),
  5911. a = s(i).find(e.title);
  5912. a.on("click.accordion.amui", function () {
  5913. var t = s(this).next(e.body),
  5914. o = s(this).parent(e.item),
  5915. a = t.data("amui.collapse");
  5916. o.is(e.disabled) || (o.toggleClass("am-active"), a ? t.collapse("toggle") : t.collapse(), !n.multiple && s(i).children(".am-active").not(o).not(e.disabled).removeClass("am-active").find(e.body + ".am-in").collapse("close"))
  5917. })
  5918. })
  5919. }
  5920. var s = i(1),
  5921. o = i(2);
  5922. i(7), s(n), t.exports = o.accordion = {
  5923. VERSION: "2.1.0",
  5924. init: n
  5925. }
  5926. }, function (t, e) {
  5927. "use strict";
  5928. t.exports = {
  5929. VERSION: "2.0.1"
  5930. }
  5931. }, function (t, e, i) {
  5932. "use strict";
  5933. function n() {
  5934. var t = s(".ds-thread"),
  5935. e = t.parent('[data-am-widget="duoshuo"]').attr("data-ds-short-name"),
  5936. i = ("https:" == document.location.protocol ? "https:" : "http:") + "//static.duoshuo.com/embed.js";
  5937. if (t.length && e && (window.duoshuoQuery = {
  5938. short_name: e
  5939. }, !s('script[src="' + i + '"]').length)) {
  5940. var n = s("<script>", {
  5941. async: !0,
  5942. type: "text/javascript",
  5943. src: i,
  5944. charset: "utf-8"
  5945. });
  5946. s("body").append(n)
  5947. }
  5948. }
  5949. var s = i(1),
  5950. o = i(2);
  5951. s(window).on("load", n), t.exports = o.duoshuo = {
  5952. VERSION: "2.0.1",
  5953. init: n
  5954. }
  5955. }, function (t, e, i) {
  5956. "use strict";
  5957. function n() {
  5958. s(".am-figure").each(function (t, e) {
  5959. var i, n = o.utils.parseOptions(s(e).attr("data-am-figure")),
  5960. a = s(e);
  5961. if (n.pureview)
  5962. if ("auto" === n.pureview) {
  5963. var r = s.isImgZoomAble(a.find("img")[0]);
  5964. r && a.pureview()
  5965. } else a.addClass("am-figure-zoomable").pureview();
  5966. i = a.data("amui.pureview"), i && a.on("click", ":not(img)", function () {
  5967. i.open(0)
  5968. })
  5969. })
  5970. }
  5971. var s = i(1),
  5972. o = i(2);
  5973. i(20), s.isImgZoomAble = function (t) {
  5974. var e = new Image;
  5975. e.src = t.src;
  5976. var i = s(t).width() < e.width;
  5977. return i && s(t).closest(".am-figure").addClass("am-figure-zoomable"), i
  5978. }, s(window).on("load", n), t.exports = o.figure = {
  5979. VERSION: "2.0.3",
  5980. init: n
  5981. }
  5982. }, function (t, e, i) {
  5983. "use strict";
  5984. function n() {
  5985. s(".am-footer-ysp").on("click", function () {
  5986. s("#am-footer-modal").modal()
  5987. });
  5988. var t = o.utils.parseOptions(s(".am-footer").data("amFooter"));
  5989. t.addToHS && a(), s('[data-rel="desktop"]').on("click", function (t) {
  5990. t.preventDefault(), window.AMPlatform ? window.AMPlatform.util.goDesktop() : (r.set("allmobilize", "desktop", "", "/"), window.location = window.location)
  5991. })
  5992. }
  5993. var s = i(1),
  5994. o = i(2);
  5995. i(15);
  5996. var a = i(4),
  5997. r = i(31);
  5998. s(n), t.exports = o.footer = {
  5999. VERSION: "3.1.2",
  6000. init: n
  6001. }
  6002. }, function (t, e, i) {
  6003. "use strict";
  6004. function n() {
  6005. var t = s('[data-am-widget="gallery"]');
  6006. t.each(function () {
  6007. var t = o.utils.parseOptions(s(this).attr("data-am-gallery"));
  6008. t.pureview && ("object" == typeof t.pureview ? s(this).pureview(t.pureview) : s(this).pureview())
  6009. })
  6010. }
  6011. var s = i(1),
  6012. o = i(2);
  6013. i(20), s(n), t.exports = o.gallery = {
  6014. VERSION: "3.0.0",
  6015. init: n
  6016. }
  6017. }, function (t, e, i) {
  6018. "use strict";
  6019. function n() {
  6020. function t() {
  6021. i[(n.scrollTop() > 50 ? "add" : "remove") + "Class"]("am-active")
  6022. }
  6023. var e = s('[data-am-widget="gotop"]'),
  6024. i = e.filter(".am-gotop-fixed"),
  6025. n = s(window);
  6026. e.data("init") || (e.find("a").on("click", function (t) {
  6027. t.preventDefault(), n.smoothScroll()
  6028. }), t(), n.on("scroll.gotop.amui", o.utils.debounce(t, 100)), e.data("init", !0))
  6029. }
  6030. var s = i(1),
  6031. o = i(2);
  6032. i(23), s(n), t.exports = o.gotop = {
  6033. VERSION: "4.0.2",
  6034. init: n
  6035. }
  6036. }, function (t, e, i) {
  6037. "use strict";
  6038. function n() {
  6039. s('[data-am-widget="header"]').each(function () {
  6040. if (s(this).hasClass("am-header-fixed")) return s("body").addClass("am-with-fixed-header"), !1
  6041. })
  6042. }
  6043. var s = i(1),
  6044. o = i(2);
  6045. s(n), t.exports = o.header = {
  6046. VERSION: "2.0.0",
  6047. init: n
  6048. }
  6049. }, function (t, e, i) {
  6050. "use strict";
  6051. var n = i(2);
  6052. t.exports = n.intro = {
  6053. VERSION: "4.0.2",
  6054. init: function () {}
  6055. }
  6056. }, function (t, e, i) {
  6057. "use strict";
  6058. var n = i(2);
  6059. t.exports = n.listNews = {
  6060. VERSION: "4.0.0",
  6061. init: function () {}
  6062. }
  6063. }, function (t, e, i) {
  6064. function n(t) {
  6065. var e = o("<script />", {
  6066. id: "am-map-api-0"
  6067. });
  6068. o("body").append(e), e.on("load", function () {
  6069. console.log("load");
  6070. var e = o("<script/>", {
  6071. id: "am-map-api-1"
  6072. });
  6073. o("body").append(e), e.on("load", function () {
  6074. var e = document.createElement("script");
  6075. e.textContent = "(" + t.toString() + ")();", o("body")[0].appendChild(e)
  6076. }).attr("src", "http://api.map.baidu.com/getscript?type=quick&file=feature&ak=WVAXZ05oyNRXS5egLImmentg&t=20140109092002")
  6077. }).attr("src", "http://api.map.baidu.com/getscript?type=quick&file=api&ak=WVAXZ05oyNRXS5egLImmentg&t=20140109092002")
  6078. }
  6079. function s() {
  6080. var t = document.querySelector(".am-map"),
  6081. e = 116.331398,
  6082. i = 39.897445,
  6083. n = t.getAttribute("data-name"),
  6084. s = t.getAttribute("data-address"),
  6085. o = t.getAttribute("data-longitude") || e,
  6086. a = t.getAttribute("data-latitude") || i,
  6087. r = t.getAttribute("data-setZoom") || 17,
  6088. l = t.getAttribute("data-icon"),
  6089. c = new BMap.Map("bd-map"),
  6090. u = new BMap.Point(o, a);
  6091. c.centerAndZoom(u, r), t.getAttribute("data-zoomControl") && c.addControl(new BMap.ZoomControl), t.getAttribute("data-scaleControl") && c.addControl(new BMap.ScaleControl);
  6092. var h = new BMap.Marker(u);
  6093. l && h.setIcon(new BMap.Icon(l, new BMap.Size(40, 40)));
  6094. var d = {
  6095. width: 200,
  6096. title: n
  6097. },
  6098. p = new BMap.InfoWindow("\u5730\u5740\uff1a" + s, d),
  6099. m = new BMap.Geocoder;
  6100. o == e && a == i ? m.getPoint(s, function (t) {
  6101. t && (c.centerAndZoom(t, r), h.setPosition(t), c.addOverlay(h), c.openInfoWindow(p, t))
  6102. }, "") : m.getLocation(u, function (t) {
  6103. c.centerAndZoom(u, r), h.setPosition(u), c.addOverlay(h), s ? c.openInfoWindow(p, u) : c.openInfoWindow(new BMap.InfoWindow(s, d), u)
  6104. })
  6105. }
  6106. var o = i(1),
  6107. a = i(2),
  6108. r = function () {
  6109. o(".am-map").length && n(s)
  6110. };
  6111. o(r), t.exports = a.map = {
  6112. VERSION: "2.0.2",
  6113. init: r
  6114. }
  6115. }, function (t, e, i) {
  6116. "use strict";
  6117. function n() {
  6118. if (s("#mechat").length) {
  6119. var t = s('[data-am-widget="mechat"]'),
  6120. e = t.data("am-mechat-unitid"),
  6121. i = s("<script>", {
  6122. charset: "utf-8",
  6123. src: "http://mechatim.com/js/unit/button.js?id=" + e
  6124. });
  6125. s("body").append(i)
  6126. }
  6127. }
  6128. var s = i(1),
  6129. o = i(2);
  6130. s(window).on("load", n), t.exports = o.mechat = {
  6131. VERSION: "2.0.1",
  6132. init: n
  6133. }
  6134. }, function (t, e, i) {
  6135. "use strict";
  6136. var n = i(1),
  6137. s = i(2),
  6138. o = i(14);
  6139. i(16), i(7);
  6140. var a = function () {
  6141. var t = n('[data-am-widget="menu"]');
  6142. t.find(".am-menu-nav .am-parent > a").on("click", function (t) {
  6143. t.preventDefault();
  6144. var e = n(this),
  6145. i = e.parent(),
  6146. s = e.next(".am-menu-sub");
  6147. i.toggleClass("am-open"), s.collapse("toggle"), i.siblings(".am-parent").removeClass("am-open").children(".am-menu-sub.am-in").collapse("close")
  6148. }), t.filter("[data-am-menu-collapse]").find("> .am-menu-toggle").on("click", function (t) {
  6149. t.preventDefault();
  6150. var e = n(this),
  6151. i = e.next(".am-menu-nav");
  6152. e.toggleClass("am-active"), i.collapse("toggle")
  6153. }), t.filter("[data-am-menu-offcanvas]").find("> .am-menu-toggle").on("click", function (t) {
  6154. t.preventDefault();
  6155. var e = n(this),
  6156. i = e.next(".am-offcanvas");
  6157. e.toggleClass("am-active"), i.offCanvas("open")
  6158. });
  6159. var e = '.am-offcanvas[data-dismiss-on="click"]',
  6160. i = n(e);
  6161. i.find("a").not(".am-parent>a").on("click", function (t) {
  6162. n(this).parents(e).offCanvas("close")
  6163. }), t.filter(".am-menu-one").each(function (t) {
  6164. var e, i = n(this),
  6165. s = n('<div class="am-menu-nav-sub-wrap"></div>'),
  6166. a = 0,
  6167. r = i.find(".am-menu-nav"),
  6168. l = r.children("li");
  6169. l.filter(".am-parent").each(function (t) {
  6170. n(this).attr("data-rel", "#am-menu-sub-" + t), n(this).find(".am-menu-sub").attr("id", "am-menu-sub-" + t).appendTo(s)
  6171. }), i.append(s), r.wrap('<div class="am-menu-nav-wrap" id="am-menu-' + t + '">'), l.each(function (t) {
  6172. a += parseFloat(n(this).css("width"))
  6173. }), r.width(a);
  6174. var c = new o("#am-menu-" + t, {
  6175. eventPassthrough: !0,
  6176. scrollX: !0,
  6177. scrollY: !1,
  6178. preventDefault: !1
  6179. });
  6180. l.on("click", function () {
  6181. var t = n(this);
  6182. t.addClass("am-active").siblings().removeClass("am-active"), s.find(".am-menu-sub.am-in").collapse("close"), t.is(".am-parent") ? !t.hasClass(".am-open") && s.find(t.attr("data-rel")).collapse("open") : t.siblings().removeClass("am-open"), void 0 === e && (e = n(this).index() ? 0 : 1);
  6183. var o, a = n(this).index() > e,
  6184. l = n(this)[a ? "next" : "prev"](),
  6185. u = l.offset() || n(this).offset(),
  6186. h = i.offset(),
  6187. d = parseInt(i.css("padding-left"));
  6188. (a ? u.left + u.width > h.left + h.width : u.left < h.left) && (o = r.offset(), c.scrollTo(a ? h.width - u.left + o.left - u.width - d : o.left - u.left, 0, 400)), e = n(this).index()
  6189. }), i.on("touchmove", function (t) {
  6190. t.preventDefault()
  6191. })
  6192. })
  6193. };
  6194. n(a), t.exports = s.menu = {
  6195. VERSION: "4.0.3",
  6196. init: a
  6197. }
  6198. }, function (t, e, i) {
  6199. "use strict";
  6200. function n() {
  6201. function t() {
  6202. u.append(b), u.find("li").not(".am-navbar-more").slice(i() - 1).appendTo(w), n.append(w)
  6203. }
  6204. function e() {
  6205. return i() >= d ? (b.hide(), void w.find("li").insertBefore(b)) : (!n.find(".am-navbar-actions").length && t(), b.show(), void(u.find("li").length < i() ? w.find("li").slice(0, i() - u.find("li").length).insertBefore(b) : u.find("li").length > i() && (w.find("li").length ? u.find("li").not(b).slice(i() - 1).insertBefore(w.find("li").first()) : u.find("li").not(b).slice(i() - 1).appendTo(w))))
  6206. }
  6207. function i() {
  6208. return Math.floor((l.width() - f) / m)
  6209. }
  6210. var n = s('[data-am-widget="navbar"]');
  6211. if (n.length) {
  6212. var l = s(window),
  6213. c = s("body"),
  6214. u = n.find(".am-navbar-nav"),
  6215. h = n.find("li"),
  6216. d = h.length,
  6217. p = u.attr("class") && parseInt(u.attr("class").match(/am-avg-sm-(\d+)/)[1]) || 3,
  6218. m = 60,
  6219. f = 16,
  6220. v = h.filter("[data-am-navbar-share]"),
  6221. g = h.filter("[data-am-navbar-qrcode]"),
  6222. y = "am-active",
  6223. w = s('<ul class="am-navbar-actions"></ul>', {
  6224. id: o.utils.generateGUID("am-navbar-actions")
  6225. }),
  6226. b = s('<li class="am-navbar-labels am-navbar-more"><a href="javascript: void(0);"><span class="am-icon-angle-up"></span><span class="am-navbar-label">\u66f4\u591a</span></a></li>');
  6227. if ("fixed" == n.css("position") && c.addClass("am-with-fixed-navbar"), g.length) {
  6228. var T = "am-navbar-qrcode";
  6229. if (C = s("#" + T), !C.length) {
  6230. var x = g.attr("data-am-navbar-qrcode"),
  6231. C = s('<div class="am-modal am-modal-no-btn" id=""><div class="am-modal-dialog"><div class="am-modal-bd"></div></div></div>', {
  6232. id: T
  6233. }),
  6234. E = C.find(".am-modal-bd");
  6235. if (x) E.html('<img src="' + x + '"/>');
  6236. else {
  6237. var S = new r({
  6238. render: "canvas",
  6239. correctLevel: 0,
  6240. text: window.location.href,
  6241. width: 200,
  6242. height: 200,
  6243. background: "#fff",
  6244. foreground: "#000"
  6245. });
  6246. E.html(S)
  6247. }
  6248. c.append(C)
  6249. }
  6250. g.on("click", function (t) {
  6251. t.preventDefault(), C.modal()
  6252. })
  6253. }
  6254. d > p && d > i() && t(), n.on("click.navbar.amui", ".am-navbar-more", function (t) {
  6255. t.preventDefault(), b[w.hasClass(y) ? "removeClass" : "addClass"](y), w.toggleClass(y)
  6256. }), v.length && v.on("click.navbar.amui", function (t) {
  6257. t.preventDefault(), a.toggle()
  6258. }), l.on("resize.navbar.amui orientationchange.navbar.amui", o.utils.debounce(e, 150))
  6259. }
  6260. }
  6261. var s = i(1),
  6262. o = i(2),
  6263. a = i(25),
  6264. r = i(26);
  6265. i(15), s(n), t.exports = o.navbar = {
  6266. VERSION: "2.0.2",
  6267. init: n
  6268. }
  6269. }, function (t, e, i) {
  6270. "use strict";
  6271. var n = i(2);
  6272. t.exports = n.pagination = {
  6273. VERSION: "3.0.1"
  6274. }
  6275. }, function (t, e, i) {
  6276. "use strict";
  6277. function n() {
  6278. var t = s('[data-am-widget="paragraph"]');
  6279. t.each(function (t) {
  6280. var e = s(this),
  6281. i = o.utils.parseOptions(e.attr("data-am-paragraph")),
  6282. n = t;
  6283. i.pureview && e.pureview(), i.tableScrollable && e.find("table").each(function (t) {
  6284. s(this).width() > s(window).width() && s(this).scrollTable(n + "-" + t)
  6285. })
  6286. })
  6287. }
  6288. var s = i(1),
  6289. o = i(2),
  6290. a = i(14);
  6291. i(20), s.fn.scrollTable = function (t) {
  6292. var e, i = s(this);
  6293. i.wrap('<div class="am-paragraph-table-container" id="am-paragraph-table-' + t + '"><div class="am-paragraph-table-scroller"></div></div>'), e = i.parent(), e.width(i.width()), e.height(i.height()), new a("#am-paragraph-table-" + t, {
  6294. eventPassthrough: !0,
  6295. scrollX: !0,
  6296. scrollY: !1,
  6297. preventDefault: !1
  6298. })
  6299. }, s(window).on("load", n), t.exports = o.paragraph = {
  6300. VERSION: "2.0.1",
  6301. init: n
  6302. }
  6303. }, function (t, e, i) {
  6304. "use strict";
  6305. function n() {
  6306. var t = s('[data-am-widget="slider"]');
  6307. t.not(".am-slider-manual").each(function (t, e) {
  6308. var i = o.utils.parseOptions(s(e).attr("data-am-slider"));
  6309. s(e).flexslider(i)
  6310. })
  6311. }
  6312. var s = i(1),
  6313. o = i(2);
  6314. i(11), s(n), t.exports = o.slider = {
  6315. VERSION: "3.0.1",
  6316. init: n
  6317. }
  6318. }, function (t, e, i) {
  6319. "use strict";
  6320. function n() {
  6321. s('[data-am-widget="tabs"]').each(function () {
  6322. var t = s(this).data("amTabsNoswipe") ? {
  6323. noSwipe: 1
  6324. } : {};
  6325. s(this).tabs(t)
  6326. })
  6327. }
  6328. var s = i(1),
  6329. o = i(2);
  6330. i(28), s(n), t.exports = o.tab = {
  6331. VERSION: "4.0.1",
  6332. init: n
  6333. }
  6334. }, function (t, e, i) {
  6335. "use strict";
  6336. var n = i(2);
  6337. t.exports = n.titlebar = {
  6338. VERSION: "4.0.1"
  6339. }
  6340. }, function (t, e, i) {
  6341. "use strict";
  6342. function n() {
  6343. var t = s('[data-am-widget="wechatpay"]');
  6344. return a ? void t.on("click", ".am-wechatpay-btn", function (t) {
  6345. t.preventDefault();
  6346. var e = o.utils.parseOptions(s(this).parent().data("wechatPay"));
  6347. return window.wx ? void wx.checkJsApi({
  6348. jsApiList: ["chooseWXPay"],
  6349. success: function (t) {
  6350. t.checkResult.chooseWXPay ? wx.chooseWXPay(e) : alert("\u5fae\u4fe1\u7248\u672c\u4e0d\u652f\u6301\u652f\u4ed8\u63a5\u53e3\u6216\u6ca1\u6709\u5f00\u542f\uff01")
  6351. },
  6352. fail: function () {
  6353. alert("\u8c03\u7528 checkJsApi \u63a5\u53e3\u65f6\u53d1\u751f\u9519\u8bef!")
  6354. }
  6355. }) : void alert("\u6ca1\u6709\u5fae\u4fe1 JS SDK")
  6356. }) : (t.hide(), !1)
  6357. }
  6358. var s = i(1),
  6359. o = i(2),
  6360. a = window.navigator.userAgent.indexOf("MicroMessenger") > -1,
  6361. r = n;
  6362. s(r), t.exports = o.pay = {
  6363. VERSION: "1.0.0",
  6364. init: r
  6365. }
  6366. }])
  6367. });