Нет описания

mui.min.js 153KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693
  1. /*!
  2. * =====================================================
  3. * Mui v3.7.0 (http://dev.dcloud.net.cn/mui)
  4. * =====================================================
  5. */
  6. var mui = function(a, b) {
  7. var c = /complete|loaded|interactive/,
  8. d = /^#([\w-]+)$/,
  9. e = /^\.([\w-]+)$/,
  10. f = /^[\w-]+$/,
  11. g = /translate(?:3d)?\((.+?)\)/,
  12. h = /matrix(3d)?\((.+?)\)/,
  13. i = function(b, c) {
  14. if(c = c || a, !b) return j();
  15. if("object" == typeof b) return i.isArrayLike(b) ? j(i.slice.call(b), null) : j([b], null);
  16. if("function" == typeof b) return i.ready(b);
  17. if("string" == typeof b) try {
  18. if(b = b.trim(), d.test(b)) {
  19. var e = a.getElementById(RegExp.$1);
  20. return j(e ? [e] : [])
  21. }
  22. return j(i.qsa(b, c), b)
  23. } catch(f) {}
  24. return j()
  25. },
  26. j = function(a, b) {
  27. return a = a || [], Object.setPrototypeOf(a, i.fn), a.selector = b || "", a
  28. };
  29. i.uuid = 0, i.data = {}, i.extend = function() {
  30. var a, c, d, e, f, g, h = arguments[0] || {},
  31. j = 1,
  32. k = arguments.length,
  33. l = !1;
  34. for("boolean" == typeof h && (l = h, h = arguments[j] || {}, j++), "object" == typeof h || i.isFunction(h) || (h = {}), j === k && (h = this, j--); k > j; j++)
  35. if(null != (a = arguments[j]))
  36. for(c in a) d = h[c], e = a[c], h !== e && (l && e && (i.isPlainObject(e) || (f = i.isArray(e))) ? (f ? (f = !1, g = d && i.isArray(d) ? d : []) : g = d && i.isPlainObject(d) ? d : {}, h[c] = i.extend(l, g, e)) : e !== b && (h[c] = e));
  37. return h
  38. }, i.noop = function() {}, i.slice = [].slice, i.filter = [].filter, i.type = function(a) {
  39. return null == a ? String(a) : k[{}.toString.call(a)] || "object"
  40. }, i.isArray = Array.isArray || function(a) {
  41. return a instanceof Array
  42. }, i.isArrayLike = function(a) {
  43. var b = !!a && "length" in a && a.length,
  44. c = i.type(a);
  45. return "function" === c || i.isWindow(a) ? !1 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a
  46. }, i.isWindow = function(a) {
  47. return null != a && a === a.window
  48. }, i.isObject = function(a) {
  49. return "object" === i.type(a)
  50. }, i.isPlainObject = function(a) {
  51. return i.isObject(a) && !i.isWindow(a) && Object.getPrototypeOf(a) === Object.prototype
  52. }, i.isEmptyObject = function(a) {
  53. for(var c in a)
  54. if(c !== b) return !1;
  55. return !0
  56. }, i.isFunction = function(a) {
  57. return "function" === i.type(a)
  58. }, i.qsa = function(b, c) {
  59. return c = c || a, i.slice.call(e.test(b) ? c.getElementsByClassName(RegExp.$1) : f.test(b) ? c.getElementsByTagName(b) : c.querySelectorAll(b))
  60. }, i.ready = function(b) {
  61. return c.test(a.readyState) ? b(i) : a.addEventListener("DOMContentLoaded", function() {
  62. b(i)
  63. }, !1), this
  64. }, i.buffer = function(a, b, c) {
  65. function d() {
  66. e && (e.cancel(), e = 0), f = i.now(), a.apply(c || this, arguments), g = i.now()
  67. }
  68. var e, f = 0,
  69. g = 0,
  70. b = b || 150;
  71. return i.extend(function() {
  72. !f || g >= f && i.now() - g > b || f > g && i.now() - f > 8 * b ? d.apply(this, arguments) : (e && e.cancel(), e = i.later(d, b, null, i.slice.call(arguments)))
  73. }, {
  74. stop: function() {
  75. e && (e.cancel(), e = 0)
  76. }
  77. })
  78. }, i.each = function(a, b, c) {
  79. if(!a) return this;
  80. if("number" == typeof a.length)[].every.call(a, function(a, c) {
  81. return b.call(a, c, a) !== !1
  82. });
  83. else
  84. for(var d in a)
  85. if(c) {
  86. if(a.hasOwnProperty(d) && b.call(a[d], d, a[d]) === !1) return a
  87. } else if(b.call(a[d], d, a[d]) === !1) return a;
  88. return this
  89. }, i.focus = function(a) {
  90. i.os.ios ? setTimeout(function() {
  91. a.focus()
  92. }, 10) : a.focus()
  93. }, i.trigger = function(a, b, c) {
  94. return a.dispatchEvent(new CustomEvent(b, {
  95. detail: c,
  96. bubbles: !0,
  97. cancelable: !0
  98. })), this
  99. }, i.getStyles = function(a, b) {
  100. var c = a.ownerDocument.defaultView.getComputedStyle(a, null);
  101. return b ? c.getPropertyValue(b) || c[b] : c
  102. }, i.parseTranslate = function(a, b) {
  103. var c = a.match(g || "");
  104. return c && c[1] || (c = ["", "0,0,0"]), c = c[1].split(","), c = {
  105. x: parseFloat(c[0]),
  106. y: parseFloat(c[1]),
  107. z: parseFloat(c[2])
  108. }, b && c.hasOwnProperty(b) ? c[b] : c
  109. }, i.parseTranslateMatrix = function(a, b) {
  110. var c = a.match(h),
  111. d = c && c[1];
  112. c ? (c = c[2].split(","), "3d" === d ? c = c.slice(12, 15) : (c.push(0), c = c.slice(4, 7))) : c = [0, 0, 0];
  113. var e = {
  114. x: parseFloat(c[0]),
  115. y: parseFloat(c[1]),
  116. z: parseFloat(c[2])
  117. };
  118. return b && e.hasOwnProperty(b) ? e[b] : e
  119. }, i.hooks = {}, i.addAction = function(a, b) {
  120. var c = i.hooks[a];
  121. return c || (c = []), b.index = b.index || 1e3, c.push(b), c.sort(function(a, b) {
  122. return a.index - b.index
  123. }), i.hooks[a] = c, i.hooks[a]
  124. }, i.doAction = function(a, b) {
  125. i.isFunction(b) ? i.each(i.hooks[a], b) : i.each(i.hooks[a], function(a, b) {
  126. return !b.handle()
  127. })
  128. }, i.later = function(a, b, c, d) {
  129. b = b || 0;
  130. var e, f, g = a,
  131. h = d;
  132. return "string" == typeof a && (g = c[a]), e = function() {
  133. g.apply(c, i.isArray(h) ? h : [h])
  134. }, f = setTimeout(e, b), {
  135. id: f,
  136. cancel: function() {
  137. clearTimeout(f)
  138. }
  139. }
  140. }, i.now = Date.now || function() {
  141. return +new Date
  142. };
  143. var k = {};
  144. return i.each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"], function(a, b) {
  145. k["[object " + b + "]"] = b.toLowerCase()
  146. }), window.JSON && (i.parseJSON = JSON.parse), i.fn = {
  147. each: function(a) {
  148. return [].every.call(this, function(b, c) {
  149. return a.call(b, c, b) !== !1
  150. }), this
  151. }
  152. }, "function" == typeof define && define.amd && define("mui", [], function() {
  153. return i
  154. }), i
  155. }(document);
  156. ! function(a, b) {
  157. function c(c) {
  158. this.os = {};
  159. var d = [function() {
  160. var a = c.match(/(MicroMessenger)\/([\d\.]+)/i);
  161. return a && (this.os.wechat = {
  162. version: a[2].replace(/_/g, ".")
  163. }), !1
  164. }, function() {
  165. var a = c.match(/(Android);?[\s\/]+([\d.]+)?/);
  166. return a && (this.os.android = !0, this.os.version = a[2], this.os.isBadAndroid = !/Chrome\/\d/.test(b.navigator.appVersion)), this.os.android === !0
  167. }, function() {
  168. var a = c.match(/(iPhone\sOS)\s([\d_]+)/);
  169. if(a) this.os.ios = this.os.iphone = !0, this.os.version = a[2].replace(/_/g, ".");
  170. else {
  171. var b = c.match(/(iPad).*OS\s([\d_]+)/);
  172. b && (this.os.ios = this.os.ipad = !0, this.os.version = b[2].replace(/_/g, "."))
  173. }
  174. return this.os.ios === !0
  175. }];
  176. [].every.call(d, function(b) {
  177. return !b.call(a)
  178. })
  179. }
  180. c.call(a, navigator.userAgent)
  181. }(mui, window),
  182. function(a, b) {
  183. function c(c) {
  184. this.os = this.os || {};
  185. var d = c.match(/Html5Plus/i);
  186. d && (this.os.plus = !0, a(function() {
  187. b.body.classList.add("mui-plus")
  188. }), c.match(/StreamApp/i) && (this.os.stream = !0, a(function() {
  189. b.body.classList.add("mui-plus-stream")
  190. })))
  191. }
  192. c.call(a, navigator.userAgent)
  193. }(mui, document),
  194. function(a) {
  195. "ontouchstart" in window ? (a.isTouchable = !0, a.EVENT_START = "touchstart", a.EVENT_MOVE = "touchmove", a.EVENT_END = "touchend") : (a.isTouchable = !1, a.EVENT_START = "mousedown", a.EVENT_MOVE = "mousemove", a.EVENT_END = "mouseup"), a.EVENT_CANCEL = "touchcancel", a.EVENT_CLICK = "click";
  196. var b = 1,
  197. c = {},
  198. d = {
  199. preventDefault: "isDefaultPrevented",
  200. stopImmediatePropagation: "isImmediatePropagationStopped",
  201. stopPropagation: "isPropagationStopped"
  202. },
  203. e = function() {
  204. return !0
  205. },
  206. f = function() {
  207. return !1
  208. },
  209. g = function(b, c) {
  210. return b.detail ? b.detail.currentTarget = c : b.detail = {
  211. currentTarget: c
  212. }, a.each(d, function(a, c) {
  213. var d = b[a];
  214. b[a] = function() {
  215. return this[c] = e, d && d.apply(b, arguments)
  216. }, b[c] = f
  217. }, !0), b
  218. },
  219. h = function(a) {
  220. return a && (a._mid || (a._mid = b++))
  221. },
  222. i = {},
  223. j = function(b, d, e, f) {
  224. return function(e) {
  225. for(var f = c[b._mid][d], h = [], i = e.target, j = {}; i && i !== document && i !== b && (!~["click", "tap", "doubletap", "longtap", "hold"].indexOf(d) || !i.disabled && !i.classList.contains("mui-disabled")); i = i.parentNode) {
  226. var k = {};
  227. a.each(f, function(c, d) {
  228. j[c] || (j[c] = a.qsa(c, b)), j[c] && ~j[c].indexOf(i) && (k[c] || (k[c] = d))
  229. }, !0), a.isEmptyObject(k) || h.push({
  230. element: i,
  231. handlers: k
  232. })
  233. }
  234. j = null, e = g(e), a.each(h, function(b, c) {
  235. i = c.element;
  236. var f = i.tagName;
  237. return "tap" === d && "INPUT" !== f && "TEXTAREA" !== f && "SELECT" !== f && (e.preventDefault(), e.detail && e.detail.gesture && e.detail.gesture.preventDefault()), a.each(c.handlers, function(b, c) {
  238. a.each(c, function(a, b) {
  239. b.call(i, e) === !1 && (e.preventDefault(), e.stopPropagation())
  240. }, !0)
  241. }, !0), e.isPropagationStopped() ? !1 : void 0
  242. }, !0)
  243. }
  244. },
  245. k = function(a, b) {
  246. var c = i[h(a)],
  247. d = [];
  248. if(c) {
  249. if(d = [], b) {
  250. var e = function(a) {
  251. return a.type === b
  252. };
  253. return c.filter(e)
  254. }
  255. d = c
  256. }
  257. return d
  258. },
  259. l = /^(INPUT|TEXTAREA|BUTTON|SELECT)$/;
  260. a.fn.on = function(b, d, e) {
  261. return this.each(function() {
  262. var f = this;
  263. h(f), h(e);
  264. var g = !1,
  265. k = c[f._mid] || (c[f._mid] = {}),
  266. m = k[b] || (k[b] = {});
  267. a.isEmptyObject(m) && (g = !0);
  268. var n = m[d] || (m[d] = []);
  269. if(n.push(e), g) {
  270. var o = i[h(f)];
  271. o || (o = []);
  272. var p = j(f, b, d, e);
  273. o.push(p), p.i = o.length - 1, p.type = b, i[h(f)] = o, f.addEventListener(b, p), "tap" === b && f.addEventListener("click", function(a) {
  274. if(a.target) {
  275. var b = a.target.tagName;
  276. if(!l.test(b))
  277. if("A" === b) {
  278. var c = a.target.href;
  279. c && ~c.indexOf("tel:") || a.preventDefault()
  280. } else a.preventDefault()
  281. }
  282. })
  283. }
  284. })
  285. }, a.fn.off = function(b, d, e) {
  286. return this.each(function() {
  287. var f = h(this);
  288. if(b)
  289. if(d)
  290. if(e) {
  291. var g = c[f] && c[f][b] && c[f][b][d];
  292. a.each(g, function(a, b) {
  293. return h(b) === h(e) ? (g.splice(a, 1), !1) : void 0
  294. }, !0)
  295. } else c[f] && c[f][b] && delete c[f][b][d];
  296. else c[f] && delete c[f][b];
  297. else c[f] && delete c[f];
  298. c[f] ? (!c[f][b] || a.isEmptyObject(c[f][b])) && k(this, b).forEach(function(a) {
  299. this.removeEventListener(a.type, a), delete i[f][a.i]
  300. }.bind(this)) : k(this).forEach(function(a) {
  301. this.removeEventListener(a.type, a), delete i[f][a.i]
  302. }.bind(this))
  303. })
  304. }
  305. }(mui),
  306. function(a, b, c) {
  307. a.targets = {}, a.targetHandles = [], a.registerTarget = function(b) {
  308. return b.index = b.index || 1e3, a.targetHandles.push(b), a.targetHandles.sort(function(a, b) {
  309. return a.index - b.index
  310. }), a.targetHandles
  311. }, b.addEventListener(a.EVENT_START, function(b) {
  312. for(var d = b.target, e = {}; d && d !== c; d = d.parentNode) {
  313. var f = !1;
  314. if(a.each(a.targetHandles, function(c, g) {
  315. var h = g.name;
  316. f || e[h] || !g.hasOwnProperty("handle") ? e[h] || g.isReset !== !1 && (a.targets[h] = !1) : (a.targets[h] = g.handle(b, d), a.targets[h] && (e[h] = !0, g.isContinue !== !0 && (f = !0)))
  317. }), f) break
  318. }
  319. }), b.addEventListener("click", function(b) {
  320. for(var d = b.target, e = !1; d && d !== c && ("A" !== d.tagName || (a.each(a.targetHandles, function(a, c) {
  321. c.name;
  322. return c.hasOwnProperty("handle") && c.handle(b, d) ? (e = !0, b.preventDefault(), !1) : void 0
  323. }), !e)); d = d.parentNode);
  324. })
  325. }(mui, window, document),
  326. function(a) {
  327. String.prototype.trim === a && (String.prototype.trim = function() {
  328. return this.replace(/^\s+|\s+$/g, "")
  329. }), Object.setPrototypeOf = Object.setPrototypeOf || function(a, b) {
  330. return a.__proto__ = b, a
  331. }
  332. }(),
  333. function() {
  334. function a(a, b) {
  335. b = b || {
  336. bubbles: !1,
  337. cancelable: !1,
  338. detail: void 0
  339. };
  340. var c = document.createEvent("Events"),
  341. d = !0;
  342. for(var e in b) "bubbles" === e ? d = !!b[e] : c[e] = b[e];
  343. return c.initEvent(a, d, !0), c
  344. }
  345. "undefined" == typeof window.CustomEvent && (a.prototype = window.Event.prototype, window.CustomEvent = a)
  346. }(), Function.prototype.bind = Function.prototype.bind || function(a) {
  347. var b = Array.prototype.splice.call(arguments, 1),
  348. c = this,
  349. d = function() {
  350. var e = b.concat(Array.prototype.splice.call(arguments, 0));
  351. return this instanceof d ? void c.apply(this, e) : c.apply(a, e)
  352. };
  353. return d.prototype = c.prototype, d
  354. },
  355. function(a) {
  356. "classList" in a.documentElement || !Object.defineProperty || "undefined" == typeof HTMLElement || Object.defineProperty(HTMLElement.prototype, "classList", {
  357. get: function() {
  358. function a(a) {
  359. return function(c) {
  360. var d = b.className.split(/\s+/),
  361. e = d.indexOf(c);
  362. a(d, e, c), b.className = d.join(" ")
  363. }
  364. }
  365. var b = this,
  366. c = {
  367. add: a(function(a, b, c) {
  368. ~b || a.push(c)
  369. }),
  370. remove: a(function(a, b) {
  371. ~b && a.splice(b, 1)
  372. }),
  373. toggle: a(function(a, b, c) {
  374. ~b ? a.splice(b, 1) : a.push(c)
  375. }),
  376. contains: function(a) {
  377. return !!~b.className.split(/\s+/).indexOf(a)
  378. },
  379. item: function(a) {
  380. return b.className.split(/\s+/)[a] || null
  381. }
  382. };
  383. return Object.defineProperty(c, "length", {
  384. get: function() {
  385. return b.className.split(/\s+/).length
  386. }
  387. }), c
  388. }
  389. })
  390. }(document),
  391. function(a) {
  392. if(!a.requestAnimationFrame) {
  393. var b = 0;
  394. a.requestAnimationFrame = a.webkitRequestAnimationFrame || function(c, d) {
  395. var e = (new Date).getTime(),
  396. f = Math.max(0, 16.7 - (e - b)),
  397. g = a.setTimeout(function() {
  398. c(e + f)
  399. }, f);
  400. return b = e + f, g
  401. }, a.cancelAnimationFrame = a.webkitCancelAnimationFrame || a.webkitCancelRequestAnimationFrame || function(a) {
  402. clearTimeout(a)
  403. }
  404. }
  405. }(window),
  406. function(a, b, c) {
  407. if((a.os.android || a.os.ios) && !b.FastClick) {
  408. var d = function(a, b) {
  409. return "LABEL" === b.tagName && b.parentNode && (b = b.parentNode.querySelector("input")), !b || "radio" !== b.type && "checkbox" !== b.type || b.disabled ? !1 : b
  410. };
  411. a.registerTarget({
  412. name: c,
  413. index: 40,
  414. handle: d,
  415. target: !1
  416. });
  417. var e = function(c) {
  418. var d = a.targets.click;
  419. if(d) {
  420. var e, f;
  421. document.activeElement && document.activeElement !== d && document.activeElement.blur(), f = c.detail.gesture.changedTouches[0], e = document.createEvent("MouseEvents"), e.initMouseEvent("click", !0, !0, b, 1, f.screenX, f.screenY, f.clientX, f.clientY, !1, !1, !1, !1, 0, null), e.forwardedTouchEvent = !0, d.dispatchEvent(e), c.detail && c.detail.gesture.preventDefault()
  422. }
  423. };
  424. b.addEventListener("tap", e), b.addEventListener("doubletap", e), b.addEventListener("click", function(b) {
  425. return a.targets.click && !b.forwardedTouchEvent ? (b.stopImmediatePropagation ? b.stopImmediatePropagation() : b.propagationStopped = !0, b.stopPropagation(), b.preventDefault(), !1) : void 0
  426. }, !0)
  427. }
  428. }(mui, window, "click"),
  429. function(a, b) {
  430. a(function() {
  431. if(a.os.ios) {
  432. var c = "mui-focusin",
  433. d = "mui-bar-tab",
  434. e = "mui-bar-footer",
  435. f = "mui-bar-footer-secondary",
  436. g = "mui-bar-footer-secondary-tab";
  437. b.addEventListener("focusin", function(h) {
  438. if(!(a.os.plus && window.plus && plus.webview.currentWebview().children().length > 0)) {
  439. var i = h.target;
  440. if(i.tagName && ("TEXTAREA" === i.tagName || "INPUT" === i.tagName && ("text" === i.type || "search" === i.type || "number" === i.type))) {
  441. if(i.disabled || i.readOnly) return;
  442. b.body.classList.add(c);
  443. for(var j = !1; i && i !== b; i = i.parentNode) {
  444. var k = i.classList;
  445. if(k && k.contains(d) || k.contains(e) || k.contains(f) || k.contains(g)) {
  446. j = !0;
  447. break
  448. }
  449. }
  450. if(j) {
  451. var l = b.body.scrollHeight,
  452. m = b.body.scrollLeft;
  453. setTimeout(function() {
  454. window.scrollTo(m, l)
  455. }, 20)
  456. }
  457. }
  458. }
  459. }), b.addEventListener("focusout", function(a) {
  460. var d = b.body.classList;
  461. d.contains(c) && (d.remove(c), setTimeout(function() {
  462. window.scrollTo(b.body.scrollLeft, b.body.scrollTop)
  463. }, 20))
  464. })
  465. }
  466. })
  467. }(mui, document),
  468. function(a) {
  469. a.namespace = "mui", a.classNamePrefix = a.namespace + "-", a.classSelectorPrefix = "." + a.classNamePrefix, a.className = function(b) {
  470. return a.classNamePrefix + b
  471. }, a.classSelector = function(b) {
  472. return b.replace(/\./g, a.classSelectorPrefix)
  473. }, a.eventName = function(b, c) {
  474. return b + (a.namespace ? "." + a.namespace : "") + (c ? "." + c : "")
  475. }
  476. }(mui),
  477. function(a, b) {
  478. a.gestures = {
  479. session: {}
  480. }, a.preventDefault = function(a) {
  481. a.preventDefault()
  482. }, a.stopPropagation = function(a) {
  483. a.stopPropagation()
  484. }, a.addGesture = function(b) {
  485. return a.addAction("gestures", b)
  486. };
  487. var c = Math.round,
  488. d = Math.abs,
  489. e = Math.sqrt,
  490. f = (Math.atan, Math.atan2),
  491. g = function(a, b, c) {
  492. c || (c = ["x", "y"]);
  493. var d = b[c[0]] - a[c[0]],
  494. f = b[c[1]] - a[c[1]];
  495. return e(d * d + f * f)
  496. },
  497. h = function(a, b) {
  498. if(a.length >= 2 && b.length >= 2) {
  499. var c = ["pageX", "pageY"];
  500. return g(b[1], b[0], c) / g(a[1], a[0], c)
  501. }
  502. return 1
  503. },
  504. i = function(a, b, c) {
  505. c || (c = ["x", "y"]);
  506. var d = b[c[0]] - a[c[0]],
  507. e = b[c[1]] - a[c[1]];
  508. return 180 * f(e, d) / Math.PI
  509. },
  510. j = function(a, b) {
  511. return a === b ? "" : d(a) >= d(b) ? a > 0 ? "left" : "right" : b > 0 ? "up" : "down"
  512. },
  513. k = function(a, b) {
  514. var c = ["pageX", "pageY"];
  515. return i(b[1], b[0], c) - i(a[1], a[0], c)
  516. },
  517. l = function(a, b, c) {
  518. return {
  519. x: b / a || 0,
  520. y: c / a || 0
  521. }
  522. },
  523. m = function(b, c) {
  524. a.gestures.stoped || a.doAction("gestures", function(d, e) {
  525. a.gestures.stoped || a.options.gestureConfig[e.name] !== !1 && e.handle(b, c)
  526. })
  527. },
  528. n = function(a, b) {
  529. for(; a;) {
  530. if(a == b) return !0;
  531. a = a.parentNode
  532. }
  533. return !1
  534. },
  535. o = function(a, b, c) {
  536. for(var d = [], e = [], f = 0; f < a.length;) {
  537. var g = b ? a[f][b] : a[f];
  538. e.indexOf(g) < 0 && d.push(a[f]), e[f] = g, f++
  539. }
  540. return c && (d = b ? d.sort(function(a, c) {
  541. return a[b] > c[b]
  542. }) : d.sort()), d
  543. },
  544. p = function(a) {
  545. var b = a.length;
  546. if(1 === b) return {
  547. x: c(a[0].pageX),
  548. y: c(a[0].pageY)
  549. };
  550. for(var d = 0, e = 0, f = 0; b > f;) d += a[f].pageX, e += a[f].pageY, f++;
  551. return {
  552. x: c(d / b),
  553. y: c(e / b)
  554. }
  555. },
  556. q = function() {
  557. return a.options.gestureConfig.pinch
  558. },
  559. r = function(b) {
  560. for(var d = [], e = 0; e < b.touches.length;) d[e] = {
  561. pageX: c(b.touches[e].pageX),
  562. pageY: c(b.touches[e].pageY)
  563. }, e++;
  564. return {
  565. timestamp: a.now(),
  566. gesture: b.gesture,
  567. touches: d,
  568. center: p(b.touches),
  569. deltaX: b.deltaX,
  570. deltaY: b.deltaY
  571. }
  572. },
  573. s = function(b) {
  574. var c = a.gestures.session,
  575. d = b.center,
  576. e = c.offsetDelta || {},
  577. f = c.prevDelta || {},
  578. g = c.prevTouch || {};
  579. (b.gesture.type === a.EVENT_START || b.gesture.type === a.EVENT_END) && (f = c.prevDelta = {
  580. x: g.deltaX || 0,
  581. y: g.deltaY || 0
  582. }, e = c.offsetDelta = {
  583. x: d.x,
  584. y: d.y
  585. }), b.deltaX = f.x + (d.x - e.x), b.deltaY = f.y + (d.y - e.y)
  586. },
  587. t = function(b) {
  588. var c = a.gestures.session,
  589. d = b.touches,
  590. e = d.length;
  591. c.firstTouch || (c.firstTouch = r(b)), q() && e > 1 && !c.firstMultiTouch ? c.firstMultiTouch = r(b) : 1 === e && (c.firstMultiTouch = !1);
  592. var f = c.firstTouch,
  593. l = c.firstMultiTouch,
  594. m = l ? l.center : f.center,
  595. n = b.center = p(d);
  596. b.timestamp = a.now(), b.deltaTime = b.timestamp - f.timestamp, b.angle = i(m, n), b.distance = g(m, n), s(b), b.offsetDirection = j(b.deltaX, b.deltaY), b.scale = l ? h(l.touches, d) : 1, b.rotation = l ? k(l.touches, d) : 0, v(b)
  597. },
  598. u = 25,
  599. v = function(b) {
  600. var c, e, f, g, h = a.gestures.session,
  601. i = h.lastInterval || b,
  602. k = b.timestamp - i.timestamp;
  603. if(b.gesture.type != a.EVENT_CANCEL && (k > u || void 0 === i.velocity)) {
  604. var m = i.deltaX - b.deltaX,
  605. n = i.deltaY - b.deltaY,
  606. o = l(k, m, n);
  607. e = o.x, f = o.y, c = d(o.x) > d(o.y) ? o.x : o.y, g = j(m, n) || i.direction, h.lastInterval = b
  608. } else c = i.velocity, e = i.velocityX, f = i.velocityY, g = i.direction;
  609. b.velocity = c, b.velocityX = e, b.velocityY = f, b.direction = g
  610. },
  611. w = {},
  612. x = function(a) {
  613. for(var b = 0; b < a.length; b++) !a.identifier && (a.identifier = 0);
  614. return a
  615. },
  616. y = function(b, c) {
  617. var d = x(a.slice.call(b.touches || [b])),
  618. e = b.type,
  619. f = [],
  620. g = [];
  621. if(e !== a.EVENT_START && e !== a.EVENT_MOVE || 1 !== d.length) {
  622. var h = 0,
  623. f = [],
  624. g = [],
  625. i = x(a.slice.call(b.changedTouches || [b]));
  626. c.target = b.target;
  627. var j = a.gestures.session.target || b.target;
  628. if(f = d.filter(function(a) {
  629. return n(a.target, j)
  630. }), e === a.EVENT_START)
  631. for(h = 0; h < f.length;) w[f[h].identifier] = !0, h++;
  632. for(h = 0; h < i.length;) w[i[h].identifier] && g.push(i[h]), (e === a.EVENT_END || e === a.EVENT_CANCEL) && delete w[i[h].identifier], h++;
  633. if(!g.length) return !1
  634. } else w[d[0].identifier] = !0, f = d, g = d, c.target = b.target;
  635. f = o(f.concat(g), "identifier", !0);
  636. var k = f.length,
  637. l = g.length;
  638. return e === a.EVENT_START && k - l === 0 && (c.isFirst = !0, a.gestures.touch = a.gestures.session = {
  639. target: b.target
  640. }), c.isFinal = (e === a.EVENT_END || e === a.EVENT_CANCEL) && k - l === 0, c.touches = f, c.changedTouches = g, !0
  641. },
  642. z = function(b) {
  643. var c = {
  644. gesture: b
  645. },
  646. d = y(b, c);
  647. d && (t(c), m(b, c), a.gestures.session.prevTouch = c, b.type !== a.EVENT_END || a.isTouchable || (a.gestures.touch = a.gestures.session = {}))
  648. };
  649. b.addEventListener(a.EVENT_START, z), b.addEventListener(a.EVENT_MOVE, z), b.addEventListener(a.EVENT_END, z), b.addEventListener(a.EVENT_CANCEL, z), b.addEventListener(a.EVENT_CLICK, function(b) {
  650. (a.os.android || a.os.ios) && (a.targets.popover && b.target === a.targets.popover || a.targets.tab || a.targets.offcanvas || a.targets.modal) && b.preventDefault()
  651. }, !0), a.isScrolling = !1;
  652. var A = null;
  653. b.addEventListener("scroll", function() {
  654. a.isScrolling = !0, A && clearTimeout(A), A = setTimeout(function() {
  655. a.isScrolling = !1
  656. }, 250)
  657. })
  658. }(mui, window),
  659. function(a, b) {
  660. var c = 0,
  661. d = function(d, e) {
  662. var f = a.gestures.session,
  663. g = this.options,
  664. h = a.now();
  665. switch(d.type) {
  666. case a.EVENT_MOVE:
  667. h - c > 300 && (c = h, f.flickStart = e.center);
  668. break;
  669. case a.EVENT_END:
  670. case a.EVENT_CANCEL:
  671. e.flick = !1, f.flickStart && g.flickMaxTime > h - c && e.distance > g.flickMinDistince && (e.flick = !0, e.flickTime = h - c, e.flickDistanceX = e.center.x - f.flickStart.x, e.flickDistanceY = e.center.y - f.flickStart.y, a.trigger(f.target, b, e), a.trigger(f.target, b + e.direction, e))
  672. }
  673. };
  674. a.addGesture({
  675. name: b,
  676. index: 5,
  677. handle: d,
  678. options: {
  679. flickMaxTime: 200,
  680. flickMinDistince: 10
  681. }
  682. })
  683. }(mui, "flick"),
  684. function(a, b) {
  685. var c = function(c, d) {
  686. var e = a.gestures.session;
  687. if(c.type === a.EVENT_END || c.type === a.EVENT_CANCEL) {
  688. var f = this.options;
  689. d.swipe = !1, d.direction && f.swipeMaxTime > d.deltaTime && d.distance > f.swipeMinDistince && (d.swipe = !0, a.trigger(e.target, b, d), a.trigger(e.target, b + d.direction, d))
  690. }
  691. };
  692. a.addGesture({
  693. name: b,
  694. index: 10,
  695. handle: c,
  696. options: {
  697. swipeMaxTime: 300,
  698. swipeMinDistince: 18
  699. }
  700. })
  701. }(mui, "swipe"),
  702. function(a, b) {
  703. var c = function(c, d) {
  704. var e = a.gestures.session;
  705. switch(c.type) {
  706. case a.EVENT_START:
  707. break;
  708. case a.EVENT_MOVE:
  709. if(!d.direction || !e.target) return;
  710. e.lockDirection && e.startDirection && e.startDirection && e.startDirection !== d.direction && ("up" === e.startDirection || "down" === e.startDirection ? d.direction = d.deltaY < 0 ? "up" : "down" : d.direction = d.deltaX < 0 ? "left" : "right"), e.drag || (e.drag = !0, a.trigger(e.target, b + "start", d)), a.trigger(e.target, b, d), a.trigger(e.target, b + d.direction, d);
  711. break;
  712. case a.EVENT_END:
  713. case a.EVENT_CANCEL:
  714. e.drag && d.isFinal && a.trigger(e.target, b + "end", d)
  715. }
  716. };
  717. a.addGesture({
  718. name: b,
  719. index: 20,
  720. handle: c,
  721. options: {
  722. fingers: 1
  723. }
  724. })
  725. }(mui, "drag"),
  726. function(a, b) {
  727. var c, d, e = function(e, f) {
  728. var g = a.gestures.session,
  729. h = this.options;
  730. switch(e.type) {
  731. case a.EVENT_END:
  732. if(!f.isFinal) return;
  733. var i = g.target;
  734. if(!i || i.disabled || i.classList && i.classList.contains("mui-disabled")) return;
  735. if(f.distance < h.tapMaxDistance && f.deltaTime < h.tapMaxTime) {
  736. if(a.options.gestureConfig.doubletap && c && c === i && d && f.timestamp - d < h.tapMaxInterval) return a.trigger(i, "doubletap", f), d = a.now(), void(c = i);
  737. a.trigger(i, b, f), d = a.now(), c = i
  738. }
  739. }
  740. };
  741. a.addGesture({
  742. name: b,
  743. index: 30,
  744. handle: e,
  745. options: {
  746. fingers: 1,
  747. tapMaxInterval: 300,
  748. tapMaxDistance: 5,
  749. tapMaxTime: 250
  750. }
  751. })
  752. }(mui, "tap"),
  753. function(a, b) {
  754. var c, d = function(d, e) {
  755. var f = a.gestures.session,
  756. g = this.options;
  757. switch(d.type) {
  758. case a.EVENT_START:
  759. clearTimeout(c), c = setTimeout(function() {
  760. a.trigger(f.target, b, e)
  761. }, g.holdTimeout);
  762. break;
  763. case a.EVENT_MOVE:
  764. e.distance > g.holdThreshold && clearTimeout(c);
  765. break;
  766. case a.EVENT_END:
  767. case a.EVENT_CANCEL:
  768. clearTimeout(c)
  769. }
  770. };
  771. a.addGesture({
  772. name: b,
  773. index: 10,
  774. handle: d,
  775. options: {
  776. fingers: 1,
  777. holdTimeout: 500,
  778. holdThreshold: 2
  779. }
  780. })
  781. }(mui, "longtap"),
  782. function(a, b) {
  783. var c, d = function(d, e) {
  784. var f = a.gestures.session,
  785. g = this.options;
  786. switch(d.type) {
  787. case a.EVENT_START:
  788. a.options.gestureConfig.hold && (c && clearTimeout(c), c = setTimeout(function() {
  789. e.hold = !0, a.trigger(f.target, b, e)
  790. }, g.holdTimeout));
  791. break;
  792. case a.EVENT_MOVE:
  793. break;
  794. case a.EVENT_END:
  795. case a.EVENT_CANCEL:
  796. c && (clearTimeout(c) && (c = null), a.trigger(f.target, "release", e))
  797. }
  798. };
  799. a.addGesture({
  800. name: b,
  801. index: 10,
  802. handle: d,
  803. options: {
  804. fingers: 1,
  805. holdTimeout: 0
  806. }
  807. })
  808. }(mui, "hold"),
  809. function(a, b) {
  810. var c = function(c, d) {
  811. var e = this.options,
  812. f = a.gestures.session;
  813. switch(c.type) {
  814. case a.EVENT_START:
  815. break;
  816. case a.EVENT_MOVE:
  817. if(a.options.gestureConfig.pinch) {
  818. if(d.touches.length < 2) return;
  819. f.pinch || (f.pinch = !0, a.trigger(f.target, b + "start", d)), a.trigger(f.target, b, d);
  820. var g = d.scale,
  821. h = d.rotation,
  822. i = "undefined" == typeof d.lastScale ? 1 : d.lastScale,
  823. j = 1e-12;
  824. g > i ? (i = g - j, a.trigger(f.target, b + "out", d)) : i > g && (i = g + j, a.trigger(f.target, b + "in", d)), Math.abs(h) > e.minRotationAngle && a.trigger(f.target, "rotate", d)
  825. }
  826. break;
  827. case a.EVENT_END:
  828. case a.EVENT_CANCEL:
  829. a.options.gestureConfig.pinch && f.pinch && 2 === d.touches.length && (f.pinch = !1, a.trigger(f.target, b + "end", d))
  830. }
  831. };
  832. a.addGesture({
  833. name: b,
  834. index: 10,
  835. handle: c,
  836. options: {
  837. minRotationAngle: 0
  838. }
  839. })
  840. }(mui, "pinch"),
  841. function(a) {
  842. function b(a, b) {
  843. var c = "MUI_SCROLL_POSITION_" + document.location.href + "_" + b.src,
  844. d = parseFloat(localStorage.getItem(c)) || 0;
  845. d && ! function(a) {
  846. b.onload = function() {
  847. window.scrollTo(0, a)
  848. }
  849. }(d), setInterval(function() {
  850. var a = window.scrollY;
  851. d !== a && (localStorage.setItem(c, a + ""), d = a)
  852. }, 100)
  853. }
  854. a.global = a.options = {
  855. gestureConfig: {
  856. tap: !0,
  857. doubletap: !1,
  858. longtap: !1,
  859. hold: !1,
  860. flick: !0,
  861. swipe: !0,
  862. drag: !0,
  863. pinch: !1
  864. }
  865. }, a.initGlobal = function(b) {
  866. return a.options = a.extend(!0, a.global, b), this
  867. };
  868. var c = {};
  869. a.init = function(b) {
  870. return a.options = a.extend(!0, a.global, b || {}), a.ready(function() {
  871. a.doAction("inits", function(b, d) {
  872. var e = !(c[d.name] && !d.repeat);
  873. e && (d.handle.call(a), c[d.name] = !0)
  874. })
  875. }), this
  876. }, a.addInit = function(b) {
  877. return a.addAction("inits", b)
  878. }, a.addInit({
  879. name: "iframe",
  880. index: 100,
  881. handle: function() {
  882. var b = a.options,
  883. c = b.subpages || [];
  884. !a.os.plus && c.length && d(c[0])
  885. }
  886. });
  887. var d = function(c) {
  888. var d = document.createElement("div");
  889. d.className = "mui-iframe-wrapper";
  890. var e = c.styles || {};
  891. "string" != typeof e.top && (e.top = "0px"), "string" != typeof e.bottom && (e.bottom = "0px"), d.style.top = e.top, d.style.bottom = e.bottom;
  892. var f = document.createElement("iframe");
  893. f.src = c.url, f.id = c.id || c.url, f.name = f.id, d.appendChild(f), document.body.appendChild(d), a.os.wechat && b(d, f)
  894. };
  895. a(function() {
  896. var b = document.body.classList,
  897. c = [];
  898. a.os.ios ? (c.push({
  899. os: "ios",
  900. version: a.os.version
  901. }), b.add("mui-ios")) : a.os.android && (c.push({
  902. os: "android",
  903. version: a.os.version
  904. }), b.add("mui-android")), a.os.wechat && (c.push({
  905. os: "wechat",
  906. version: a.os.wechat.version
  907. }), b.add("mui-wechat")), c.length && a.each(c, function(c, d) {
  908. var e = "";
  909. d.version && a.each(d.version.split("."), function(c, f) {
  910. e = e + (e ? "-" : "") + f, b.add(a.className(d.os + "-" + e))
  911. })
  912. })
  913. })
  914. }(mui),
  915. function(a) {
  916. var b = {
  917. swipeBack: !1,
  918. preloadPages: [],
  919. preloadLimit: 10,
  920. keyEventBind: {
  921. backbutton: !0,
  922. menubutton: !0
  923. },
  924. titleConfig: {
  925. height: "44px",
  926. backgroundColor: "#f7f7f7",
  927. bottomBorderColor: "#cccccc",
  928. title: {
  929. text: "",
  930. position: {
  931. top: 0,
  932. left: 0,
  933. width: "100%",
  934. height: "100%"
  935. },
  936. styles: {
  937. color: "#000000",
  938. align: "center",
  939. family: "'Helvetica Neue',Helvetica,sans-serif",
  940. size: "17px",
  941. style: "normal",
  942. weight: "normal",
  943. fontSrc: ""
  944. }
  945. },
  946. back: {
  947. image: {
  948. base64Data: "",
  949. imgSrc: "",
  950. sprite: {
  951. top: "0px",
  952. left: "0px",
  953. width: "100%",
  954. height: "100%"
  955. },
  956. position: {
  957. top: "10px",
  958. left: "10px",
  959. width: "24px",
  960. height: "24px"
  961. }
  962. }
  963. }
  964. }
  965. },
  966. c = {
  967. event: "titleUpdate",
  968. autoShow: !0,
  969. duration: 300,
  970. aniShow: "slide-in-right",
  971. extras: {}
  972. };
  973. a.options.show && (c = a.extend(!0, c, a.options.show)), a.currentWebview = null, a.extend(!0, a.global, b), a.extend(!0, a.options, b), a.waitingOptions = function(b) {
  974. return a.extend(!0, {}, {
  975. autoShow: !0,
  976. title: "",
  977. modal: !1
  978. }, b)
  979. }, a.showOptions = function(b) {
  980. return a.extend(!0, {}, c, b)
  981. }, a.windowOptions = function(b) {
  982. return a.extend({
  983. scalable: !1,
  984. bounce: ""
  985. }, b)
  986. }, a.plusReady = function(a) {
  987. return window.plus ? setTimeout(function() {
  988. a()
  989. }, 0) : document.addEventListener("plusready", function() {
  990. a()
  991. }, !1), this
  992. }, a.fire = function(b, c, d) {
  993. if(b) {
  994. if("undefined" == typeof d) d = "";
  995. else {
  996. if("boolean" == typeof d || "number" == typeof d) return void b.evalJS("typeof mui!=='undefined'&&mui.receive('" + c + "'," + d + ")");
  997. (a.isPlainObject(d) || a.isArray(d)) && (d = JSON.stringify(d || {}).replace(/\'/g, "\\u0027").replace(/\\/g, "\\u005c"))
  998. }
  999. b.evalJS("typeof mui!=='undefined'&&mui.receive('" + c + "','" + d + "')")
  1000. }
  1001. }, a.receive = function(b, c) {
  1002. if(b) {
  1003. try {
  1004. c && "string" == typeof c && (c = JSON.parse(c))
  1005. } catch(d) {}
  1006. a.trigger(document, b, c)
  1007. }
  1008. };
  1009. var d = function(b) {
  1010. if(!b.preloaded) {
  1011. a.fire(b, "preload");
  1012. for(var c = b.children(), d = 0; d < c.length; d++) a.fire(c[d], "preload");
  1013. b.preloaded = !0
  1014. }
  1015. },
  1016. e = function(b, c, d) {
  1017. if(d) {
  1018. if(!b[c + "ed"]) {
  1019. a.fire(b, c);
  1020. for(var e = b.children(), f = 0; f < e.length; f++) a.fire(e[f], c);
  1021. b[c + "ed"] = !0
  1022. }
  1023. } else {
  1024. a.fire(b, c);
  1025. for(var e = b.children(), f = 0; f < e.length; f++) a.fire(e[f], c)
  1026. }
  1027. };
  1028. a.openWindow = function(b, f, g) {
  1029. if("object" == typeof b ? (g = b, b = g.url, f = g.id || b) : "object" == typeof f ? (g = f, f = g.id || b) : f = f || b, !a.os.plus) return void(a.os.ios || a.os.android ? window.top.location.href = b : window.parent.location.href = b);
  1030. if(window.plus) {
  1031. g = g || {};
  1032. var h, i, j = g.params || {},
  1033. k = null,
  1034. l = null;
  1035. if(a.webviews[f] ? (l = a.webviews[f], plus.webview.getWebviewById(f) && (k = l.webview)) : g.createNew !== !0 && (k = plus.webview.getWebviewById(f)), k) return h = l ? l.show : c, h = g.show ? a.extend(h, g.show) : h, h.autoShow && k.show(h.aniShow, h.duration, function() {
  1036. d(k), e(k, "pagebeforeshow", !1)
  1037. }), l && l.afterShowMethodName && k.evalJS(l.afterShowMethodName + "('" + JSON.stringify(j) + "')"), k;
  1038. if(!b) throw new Error("webview[" + f + "] does not exist");
  1039. var m = a.waitingOptions(g.waiting);
  1040. if(m.autoShow && (i = plus.nativeUI.showWaiting(m.title, m.options)), g = a.extend(g, {
  1041. id: f,
  1042. url: b
  1043. }), k = a.createWindow(g), h = a.showOptions(g.show), h.autoShow) {
  1044. var n = function() {
  1045. i && i.close(), k.show(h.aniShow, h.duration, function() {}, h.extras), g.afterShowMethodName && k.evalJS(g.afterShowMethodName + "('" + JSON.stringify(j) + "')")
  1046. };
  1047. k.addEventListener(h.event, n, !1), k.addEventListener("loaded", function() {
  1048. d(k), e(k, "pagebeforeshow", !1)
  1049. }, !1)
  1050. }
  1051. return k
  1052. }
  1053. }, a.openWindowWithTitle = function(b, f) {
  1054. b = b || {};
  1055. var g = b.url,
  1056. h = b.id || g;
  1057. if(!a.os.plus) return void(a.os.ios || a.os.android ? window.top.location.href = g : window.parent.location.href = g);
  1058. if(window.plus) {
  1059. var i, j, k = b.params || {},
  1060. l = null,
  1061. m = null;
  1062. if(a.webviews[h] ? (m = a.webviews[h], plus.webview.getWebviewById(h) && (l = m.webview)) : b.createNew !== !0 && (l = plus.webview.getWebviewById(h)), l) return i = m ? m.show : c, i = b.show ? a.extend(i, b.show) : i, i.autoShow && l.show(i.aniShow, i.duration, function() {
  1063. d(l), e(l, "pagebeforeshow", !1)
  1064. }), m && m.afterShowMethodName && l.evalJS(m.afterShowMethodName + "('" + JSON.stringify(k) + "')"), l;
  1065. if(!g) throw new Error("webview[" + h + "] does not exist");
  1066. var n = a.waitingOptions(b.waiting);
  1067. if(n.autoShow && (j = plus.nativeUI.showWaiting(n.title, n.options)), b = a.extend(b, {
  1068. id: h,
  1069. url: g
  1070. }), l = a.createWindow(b), f) {
  1071. a.extend(!0, a.options.titleConfig, f);
  1072. var o = a.options.titleConfig.id ? a.options.titleConfig.id : h + "_title",
  1073. p = new plus.nativeObj.View(o, {
  1074. top: 0,
  1075. height: a.options.titleConfig.height,
  1076. width: "100%",
  1077. dock: "top",
  1078. position: "dock"
  1079. });
  1080. p.drawRect(a.options.titleConfig.backgroundColor);
  1081. var q = parseInt(a.options.titleConfig.height) - 1;
  1082. if(p.drawRect(a.options.titleConfig.bottomBorderColor, {
  1083. top: q + "px",
  1084. left: "0px"
  1085. }), a.options.titleConfig.title.text) {
  1086. var r = a.options.titleConfig.title;
  1087. p.drawText(r.text, r.position, r.styles)
  1088. }
  1089. var s = a.options.titleConfig.back,
  1090. t = null,
  1091. u = s.image;
  1092. if(u.base64Data || u.imgSrc) {
  1093. t = {
  1094. left: parseInt(u.position.left),
  1095. right: parseInt(u.position.left) + parseInt(u.position.width)
  1096. };
  1097. var v = new plus.nativeObj.Bitmap(h + "_back");
  1098. u.base64Data ? v.loadBase64Data(u.base64Data) : v.load(u.imgSrc), p.drawBitmap(v, u.sprite, u.position)
  1099. }
  1100. p.setTouchEventRect({
  1101. top: "0px",
  1102. left: "0px",
  1103. width: "100%",
  1104. height: "100%"
  1105. }), p.interceptTouchEvent(!0), p.addEventListener("click", function(b) {
  1106. var c = b.clientX;
  1107. t && c > t.left && c < t.right && (s.click && a.isFunction(s.click) ? s.click() : l.evalJS("window.mui&&mui.back();"))
  1108. }, !1), l.append(p)
  1109. }
  1110. return i = a.showOptions(b.show), i.autoShow && l.addEventListener(i.event, function() {
  1111. j && j.close(), l.show(i.aniShow, i.duration, function() {}, i.extras)
  1112. }, !1), l
  1113. }
  1114. }, a.createWindow = function(b, c) {
  1115. if(window.plus) {
  1116. var d, e = b.id || b.url;
  1117. if(b.preload) {
  1118. a.webviews[e] && a.webviews[e].webview.getURL() ? d = a.webviews[e].webview : (b.createNew !== !0 && (d = plus.webview.getWebviewById(e)), d || (d = plus.webview.create(b.url, e, a.windowOptions(b.styles), a.extend({
  1119. preload: !0
  1120. }, b.extras)), b.subpages && a.each(b.subpages, function(b, c) {
  1121. var e = c.id || c.url;
  1122. if(e) {
  1123. var f = plus.webview.getWebviewById(e);
  1124. f || (f = plus.webview.create(c.url, e, a.windowOptions(c.styles), a.extend({
  1125. preload: !0
  1126. }, c.extras))), d.append(f)
  1127. }
  1128. }))), a.webviews[e] = {
  1129. webview: d,
  1130. preload: !0,
  1131. show: a.showOptions(b.show),
  1132. afterShowMethodName: b.afterShowMethodName
  1133. };
  1134. var f = a.data.preloads,
  1135. g = f.indexOf(e);
  1136. if(~g && f.splice(g, 1), f.push(e), f.length > a.options.preloadLimit) {
  1137. var h = a.data.preloads.shift(),
  1138. i = a.webviews[h];
  1139. i && i.webview && a.closeAll(i.webview), delete a.webviews[h]
  1140. }
  1141. } else c !== !1 && (d = plus.webview.create(b.url, e, a.windowOptions(b.styles), b.extras), b.subpages && a.each(b.subpages, function(b, c) {
  1142. var e = c.id || c.url,
  1143. f = plus.webview.getWebviewById(e);
  1144. f || (f = plus.webview.create(c.url, e, a.windowOptions(c.styles), c.extras)), d.append(f)
  1145. }));
  1146. return d
  1147. }
  1148. }, a.preload = function(b) {
  1149. return b.preload || (b.preload = !0), a.createWindow(b)
  1150. }, a.closeOpened = function(b) {
  1151. var c = b.opened();
  1152. if(c)
  1153. for(var d = 0, e = c.length; e > d; d++) {
  1154. var f = c[d],
  1155. g = f.opened();
  1156. g && g.length > 0 ? (a.closeOpened(f), f.close("none")) : f.parent() !== b && f.close("none")
  1157. }
  1158. }, a.closeAll = function(b, c) {
  1159. a.closeOpened(b), c ? b.close(c) : b.close()
  1160. }, a.createWindows = function(b) {
  1161. a.each(b, function(b, c) {
  1162. a.createWindow(c, !1)
  1163. })
  1164. }, a.appendWebview = function(b) {
  1165. if(window.plus) {
  1166. var c, d = b.id || b.url;
  1167. return a.webviews[d] || (plus.webview.getWebviewById(d) || (c = plus.webview.create(b.url, d, b.styles, b.extras)), plus.webview.currentWebview().append(c), a.webviews[d] = b), c
  1168. }
  1169. }, a.webviews = {}, a.data.preloads = [], a.plusReady(function() {
  1170. a.currentWebview = plus.webview.currentWebview()
  1171. }), a.addInit({
  1172. name: "5+",
  1173. index: 100,
  1174. handle: function() {
  1175. var b = a.options,
  1176. c = b.subpages || [];
  1177. a.os.plus && a.plusReady(function() {
  1178. a.each(c, function(b, c) {
  1179. a.appendWebview(c)
  1180. }), plus.webview.currentWebview() === plus.webview.getWebviewById(plus.runtime.appid) && setTimeout(function() {
  1181. d(plus.webview.currentWebview())
  1182. }, 300), a.os.ios && a.options.statusBarBackground && plus.navigator.setStatusBarBackground(a.options.statusBarBackground), a.os.android && parseFloat(a.os.version) < 4.4 && null == plus.webview.currentWebview().parent() && document.addEventListener("resume", function() {
  1183. var a = document.body;
  1184. a.style.display = "none", setTimeout(function() {
  1185. a.style.display = ""
  1186. }, 10)
  1187. })
  1188. })
  1189. }
  1190. }), window.addEventListener("preload", function() {
  1191. var b = a.options.preloadPages || [];
  1192. a.plusReady(function() {
  1193. a.each(b, function(b, c) {
  1194. a.createWindow(a.extend(c, {
  1195. preload: !0
  1196. }))
  1197. })
  1198. })
  1199. }), a.supportStatusbarOffset = function() {
  1200. return a.os.plus && a.os.ios && parseFloat(a.os.version) >= 7
  1201. }, a.ready(function() {
  1202. a.supportStatusbarOffset() && document.body.classList.add("mui-statusbar")
  1203. })
  1204. }(mui),
  1205. function(a, b) {
  1206. a.addBack = function(b) {
  1207. return a.addAction("backs", b)
  1208. }, a.addBack({
  1209. name: "browser",
  1210. index: 100,
  1211. handle: function() {
  1212. return b.history.length > 1 ? (b.history.back(), !0) : !1
  1213. }
  1214. }), a.back = function() {
  1215. ("function" != typeof a.options.beforeback || a.options.beforeback() !== !1) && a.doAction("backs")
  1216. }, b.addEventListener("tap", function(b) {
  1217. var c = a.targets.action;
  1218. c && c.classList.contains("mui-action-back") && (a.back(), a.targets.action = !1)
  1219. }), b.addEventListener("swiperight", function(b) {
  1220. var c = b.detail;
  1221. a.options.swipeBack === !0 && Math.abs(c.angle) < 3 && a.back()
  1222. })
  1223. }(mui, window),
  1224. function(a, b) {
  1225. a.os.plus && a.os.android && a.addBack({
  1226. name: "mui",
  1227. index: 5,
  1228. handle: function() {
  1229. if(a.targets._popover && a.targets._popover.classList.contains("mui-active")) return a(a.targets._popover).popover("hide"), !0;
  1230. var b = document.querySelector(".mui-off-canvas-wrap.mui-active");
  1231. if(b) return a(b).offCanvas("close"), !0;
  1232. var c = a.isFunction(a.getPreviewImage) && a.getPreviewImage();
  1233. return c && c.isShown() ? (c.close(), !0) : a.closePopup()
  1234. }
  1235. }), a.__back__first = null, a.addBack({
  1236. name: "5+",
  1237. index: 10,
  1238. handle: function() {
  1239. if(!b.plus) return !1;
  1240. var c = plus.webview.currentWebview(),
  1241. d = c.parent();
  1242. return d ? d.evalJS("mui&&mui.back();") : c.canBack(function(d) {
  1243. d.canBack ? b.history.back() : c.id === plus.runtime.appid ? a.__back__first ? (new Date).getTime() - a.__back__first < 2e3 && plus.runtime.quit() : (a.__back__first = (new Date).getTime(), mui.toast("再按一次退出应用"), setTimeout(function() {
  1244. a.__back__first = null
  1245. }, 2e3)) : c.preload ? c.hide("auto") : a.closeAll(c)
  1246. }), !0
  1247. }
  1248. }), a.menu = function() {
  1249. var c = document.querySelector(".mui-action-menu");
  1250. if(c) a.trigger(c, a.EVENT_START), a.trigger(c, "tap");
  1251. else if(b.plus) {
  1252. var d = a.currentWebview,
  1253. e = d.parent();
  1254. e && e.evalJS("mui&&mui.menu();")
  1255. }
  1256. };
  1257. var c = function() {
  1258. a.back()
  1259. },
  1260. d = function() {
  1261. a.menu()
  1262. };
  1263. a.plusReady(function() {
  1264. a.options.keyEventBind.backbutton && plus.key.addEventListener("backbutton", c, !1), a.options.keyEventBind.menubutton && plus.key.addEventListener("menubutton", d, !1)
  1265. }), a.addInit({
  1266. name: "keyEventBind",
  1267. index: 1e3,
  1268. handle: function() {
  1269. a.plusReady(function() {
  1270. a.options.keyEventBind.backbutton || plus.key.removeEventListener("backbutton", c), a.options.keyEventBind.menubutton || plus.key.removeEventListener("menubutton", d)
  1271. })
  1272. }
  1273. })
  1274. }(mui, window),
  1275. function(a) {
  1276. a.addInit({
  1277. name: "pullrefresh",
  1278. index: 1e3,
  1279. handle: function() {
  1280. var b = a.options,
  1281. c = b.pullRefresh || {},
  1282. d = c.down && c.down.hasOwnProperty("callback"),
  1283. e = c.up && c.up.hasOwnProperty("callback");
  1284. if(d || e) {
  1285. var f = c.container;
  1286. if(f) {
  1287. var g = a(f);
  1288. 1 === g.length && (a.os.plus ? d && "circle" == c.down.style ? a.plusReady(function() {
  1289. a.fn.pullRefresh = a.fn.pullRefresh_native, g.pullRefresh(c)
  1290. }) : a.os.android ? a.plusReady(function() {
  1291. a.fn.pullRefresh = a.fn.pullRefresh_native;
  1292. var b = plus.webview.currentWebview();
  1293. if(window.__NWin_Enable__ === !1) g.pullRefresh(c);
  1294. else {
  1295. if(e) {
  1296. var f = {};
  1297. f.up = c.up, f.webviewId = b.id || b.getURL(), g.pullRefresh(f)
  1298. }
  1299. if(d) {
  1300. var h = b.parent(),
  1301. i = b.id || b.getURL();
  1302. if(h) {
  1303. e || g.pullRefresh({
  1304. webviewId: i
  1305. });
  1306. var j = {
  1307. webviewId: i
  1308. };
  1309. j.down = a.extend({}, c.down), j.down.callback = "_CALLBACK", h.evalJS("mui.fn.pullRefresh=mui.fn.pullRefresh_native"), h.evalJS("mui&&mui(document.querySelector('.mui-content')).pullRefresh('" + JSON.stringify(j) + "')")
  1310. }
  1311. }
  1312. }
  1313. }) : g.pullRefresh(c) : g.pullRefresh(c))
  1314. }
  1315. }
  1316. }
  1317. })
  1318. }(mui),
  1319. function(a, b, c) {
  1320. var d = "application/json",
  1321. e = "text/html",
  1322. f = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
  1323. g = /^(?:text|application)\/javascript/i,
  1324. h = /^(?:text|application)\/xml/i,
  1325. i = /^\s*$/;
  1326. a.ajaxSettings = {
  1327. type: "GET",
  1328. beforeSend: a.noop,
  1329. success: a.noop,
  1330. error: a.noop,
  1331. complete: a.noop,
  1332. context: null,
  1333. xhr: function(a) {
  1334. return new b.XMLHttpRequest
  1335. },
  1336. accepts: {
  1337. script: "text/javascript, application/javascript, application/x-javascript",
  1338. json: d,
  1339. xml: "application/xml, text/xml",
  1340. html: e,
  1341. text: "text/plain"
  1342. },
  1343. timeout: 0,
  1344. processData: !0,
  1345. cache: !0
  1346. };
  1347. var j = function(a, b) {
  1348. var c = b.context;
  1349. return b.beforeSend.call(c, a, b) === !1 ? !1 : void 0
  1350. },
  1351. k = function(a, b, c) {
  1352. c.success.call(c.context, a, "success", b), m("success", b, c)
  1353. },
  1354. l = function(a, b, c, d) {
  1355. d.error.call(d.context, c, b, a), m(b, c, d)
  1356. },
  1357. m = function(a, b, c) {
  1358. c.complete.call(c.context, b, a)
  1359. },
  1360. n = function(b, c, d, e) {
  1361. var f, g = a.isArray(c),
  1362. h = a.isPlainObject(c);
  1363. a.each(c, function(c, i) {
  1364. f = a.type(i), e && (c = d ? e : e + "[" + (h || "object" === f || "array" === f ? c : "") + "]"), !e && g ? b.add(i.name, i.value) : "array" === f || !d && "object" === f ? n(b, i, d, c) : b.add(c, i)
  1365. })
  1366. },
  1367. o = function(b) {
  1368. if(b.processData && b.data && "string" != typeof b.data) {
  1369. var e = b.contentType;
  1370. !e && b.headers && (e = b.headers["Content-Type"]), e && ~e.indexOf(d) ? b.data = JSON.stringify(b.data) : b.data = a.param(b.data, b.traditional)
  1371. }!b.data || b.type && "GET" !== b.type.toUpperCase() || (b.url = p(b.url, b.data), b.data = c)
  1372. },
  1373. p = function(a, b) {
  1374. return "" === b ? a : (a + "&" + b).replace(/[&?]{1,2}/, "?")
  1375. },
  1376. q = function(a) {
  1377. return a && (a = a.split(";", 2)[0]), a && (a === e ? "html" : a === d ? "json" : g.test(a) ? "script" : h.test(a) && "xml") || "text"
  1378. },
  1379. r = function(b, d, e, f) {
  1380. return a.isFunction(d) && (f = e, e = d, d = c), a.isFunction(e) || (f = e, e = c), {
  1381. url: b,
  1382. data: d,
  1383. success: e,
  1384. dataType: f
  1385. }
  1386. };
  1387. a.ajax = function(d, e) {
  1388. "object" == typeof d && (e = d, d = c);
  1389. var f = e || {};
  1390. f.url = d || f.url;
  1391. for(var g in a.ajaxSettings) f[g] === c && (f[g] = a.ajaxSettings[g]);
  1392. o(f);
  1393. var h = f.dataType;
  1394. f.cache !== !1 && (e && e.cache === !0 || "script" !== h) || (f.url = p(f.url, "_=" + a.now()));
  1395. var m, n = f.accepts[h && h.toLowerCase()],
  1396. r = {},
  1397. s = function(a, b) {
  1398. r[a.toLowerCase()] = [a, b]
  1399. },
  1400. t = /^([\w-]+:)\/\//.test(f.url) ? RegExp.$1 : b.location.protocol,
  1401. u = f.xhr(f),
  1402. v = u.setRequestHeader;
  1403. if(s("X-Requested-With", "XMLHttpRequest"), s("Accept", n || "*/*"), (n = f.mimeType || n) && (n.indexOf(",") > -1 && (n = n.split(",", 2)[0]), u.overrideMimeType && u.overrideMimeType(n)), (f.contentType || f.contentType !== !1 && f.data && "GET" !== f.type.toUpperCase()) && s("Content-Type", f.contentType || "application/x-www-form-urlencoded"), f.headers)
  1404. for(var w in f.headers) s(w, f.headers[w]);
  1405. if(u.setRequestHeader = s, u.onreadystatechange = function() {
  1406. if(4 === u.readyState) {
  1407. u.onreadystatechange = a.noop, clearTimeout(m);
  1408. var b, c = !1,
  1409. d = "file:" === t;
  1410. if(u.status >= 200 && u.status < 300 || 304 === u.status || 0 === u.status && d && u.responseText) {
  1411. h = h || q(f.mimeType || u.getResponseHeader("content-type")), b = u.responseText;
  1412. try {
  1413. "script" === h ? (1, eval)(b) : "xml" === h ? b = u.responseXML : "json" === h && (b = i.test(b) ? null : a.parseJSON(b))
  1414. } catch(e) {
  1415. c = e
  1416. }
  1417. c ? l(c, "parsererror", u, f) : k(b, u, f)
  1418. } else {
  1419. var g = u.status ? "error" : "abort",
  1420. j = u.statusText || null;
  1421. d && (g = "error", j = "404"), l(j, g, u, f)
  1422. }
  1423. }
  1424. }, j(u, f) === !1) return u.abort(), l(null, "abort", u, f), u;
  1425. if(f.xhrFields)
  1426. for(var w in f.xhrFields) u[w] = f.xhrFields[w];
  1427. var x = "async" in f ? f.async : !0;
  1428. u.open(f.type.toUpperCase(), f.url, x, f.username, f.password);
  1429. for(var w in r) r.hasOwnProperty(w) && v.apply(u, r[w]);
  1430. return f.timeout > 0 && (m = setTimeout(function() {
  1431. u.onreadystatechange = a.noop, u.abort(), l(null, "timeout", u, f)
  1432. }, f.timeout)), u.send(f.data ? f.data : null), u
  1433. }, a.param = function(a, b) {
  1434. var c = [];
  1435. return c.add = function(a, b) {
  1436. this.push(encodeURIComponent(a) + "=" + encodeURIComponent(b))
  1437. }, n(c, a, b), c.join("&").replace(/%20/g, "+")
  1438. }, a.get = function() {
  1439. return a.ajax(r.apply(null, arguments))
  1440. }, a.post = function() {
  1441. var b = r.apply(null, arguments);
  1442. return b.type = "POST", a.ajax(b)
  1443. }, a.getJSON = function() {
  1444. var b = r.apply(null, arguments);
  1445. return b.dataType = "json", a.ajax(b)
  1446. }, a.fn.load = function(b, c, d) {
  1447. if(!this.length) return this;
  1448. var e, g = this,
  1449. h = b.split(/\s/),
  1450. i = r(b, c, d),
  1451. j = i.success;
  1452. return h.length > 1 && (i.url = h[0], e = h[1]), i.success = function(a) {
  1453. if(e) {
  1454. var b = document.createElement("div");
  1455. b.innerHTML = a.replace(f, "");
  1456. var c = document.createElement("div"),
  1457. d = b.querySelectorAll(e);
  1458. if(d && d.length > 0)
  1459. for(var h = 0, i = d.length; i > h; h++) c.appendChild(d[h]);
  1460. g[0].innerHTML = c.innerHTML
  1461. } else g[0].innerHTML = a;
  1462. j && j.apply(g, arguments)
  1463. }, a.ajax(i), this
  1464. }
  1465. }(mui, window),
  1466. function(a) {
  1467. var b = document.createElement("a");
  1468. b.href = window.location.href, a.plusReady(function() {
  1469. a.ajaxSettings = a.extend(a.ajaxSettings, {
  1470. xhr: function(c) {
  1471. if(c.crossDomain) return new plus.net.XMLHttpRequest;
  1472. if("file:" !== b.protocol) {
  1473. var d = document.createElement("a");
  1474. if(d.href = c.url, d.href = d.href, c.crossDomain = b.protocol + "//" + b.host != d.protocol + "//" + d.host, c.crossDomain) return new plus.net.XMLHttpRequest
  1475. }
  1476. return a.os.ios && window.webkit && window.webkit.messageHandlers ? new plus.net.XMLHttpRequest : new window.XMLHttpRequest
  1477. }
  1478. })
  1479. })
  1480. }(mui),
  1481. function(a, b, c) {
  1482. a.offset = function(a) {
  1483. var d = {
  1484. top: 0,
  1485. left: 0
  1486. };
  1487. return typeof a.getBoundingClientRect !== c && (d = a.getBoundingClientRect()), {
  1488. top: d.top + b.pageYOffset - a.clientTop,
  1489. left: d.left + b.pageXOffset - a.clientLeft
  1490. }
  1491. }
  1492. }(mui, window),
  1493. function(a, b) {
  1494. a.scrollTo = function(a, c, d) {
  1495. c = c || 1e3;
  1496. var e = function(c) {
  1497. if(0 >= c) return b.scrollTo(0, a), void(d && d());
  1498. var f = a - b.scrollY;
  1499. setTimeout(function() {
  1500. b.scrollTo(0, b.scrollY + f / c * 10), e(c - 10)
  1501. }, 16.7)
  1502. };
  1503. e(c)
  1504. }, a.animationFrame = function(a) {
  1505. var b, c, d;
  1506. return function() {
  1507. b = arguments, d = this, c || (c = !0, requestAnimationFrame(function() {
  1508. a.apply(d, b), c = !1
  1509. }))
  1510. }
  1511. }
  1512. }(mui, window),
  1513. function(a) {
  1514. var b = !1,
  1515. c = /xyz/.test(function() {
  1516. xyz
  1517. }) ? /\b_super\b/ : /.*/,
  1518. d = function() {};
  1519. d.extend = function(a) {
  1520. function d() {
  1521. !b && this.init && this.init.apply(this, arguments)
  1522. }
  1523. var e = this.prototype;
  1524. b = !0;
  1525. var f = new this;
  1526. b = !1;
  1527. for(var g in a) f[g] = "function" == typeof a[g] && "function" == typeof e[g] && c.test(a[g]) ? function(a, b) {
  1528. return function() {
  1529. var c = this._super;
  1530. this._super = e[a];
  1531. var d = b.apply(this, arguments);
  1532. return this._super = c, d
  1533. }
  1534. }(g, a[g]) : a[g];
  1535. return d.prototype = f, d.prototype.constructor = d, d.extend = arguments.callee, d
  1536. }, a.Class = d
  1537. }(mui),
  1538. function(a, b, c) {
  1539. var d = "mui-pull-top-pocket",
  1540. e = "mui-pull-bottom-pocket",
  1541. f = "mui-pull",
  1542. g = "mui-pull-loading",
  1543. h = "mui-pull-caption",
  1544. i = "mui-pull-caption-down",
  1545. j = "mui-pull-caption-refresh",
  1546. k = "mui-pull-caption-nomore",
  1547. l = "mui-icon",
  1548. m = "mui-spinner",
  1549. n = "mui-icon-pulldown",
  1550. o = "mui-block",
  1551. p = "mui-hidden",
  1552. q = "mui-visibility",
  1553. r = g + " " + l + " " + n,
  1554. s = g + " " + l + " " + n,
  1555. t = g + " " + l + " " + m,
  1556. u = ['<div class="' + f + '">', '<div class="{icon}"></div>', '<div class="' + h + '">{contentrefresh}</div>', "</div>"].join(""),
  1557. v = {
  1558. init: function(b, c) {
  1559. this._super(b, a.extend(!0, {
  1560. scrollY: !0,
  1561. scrollX: !1,
  1562. indicators: !0,
  1563. deceleration: .003,
  1564. down: {
  1565. height: 50,
  1566. contentinit: "下拉可以刷新",
  1567. contentdown: "下拉可以刷新",
  1568. contentover: "释放立即刷新",
  1569. contentrefresh: "正在刷新..."
  1570. },
  1571. up: {
  1572. height: 50,
  1573. auto: !1,
  1574. contentinit: "上拉显示更多",
  1575. contentdown: "上拉显示更多",
  1576. contentrefresh: "正在加载...",
  1577. contentnomore: "没有更多数据了",
  1578. duration: 300
  1579. }
  1580. }, c))
  1581. },
  1582. _init: function() {
  1583. this._super(), this._initPocket()
  1584. },
  1585. _initPulldownRefresh: function() {
  1586. this.pulldown = !0, this.topPocket && (this.pullPocket = this.topPocket, this.pullPocket.classList.add(o), this.pullPocket.classList.add(q), this.pullCaption = this.topCaption, this.pullLoading = this.topLoading)
  1587. },
  1588. _initPullupRefresh: function() {
  1589. this.pulldown = !1, this.bottomPocket && (this.pullPocket = this.bottomPocket, this.pullPocket.classList.add(o), this.pullPocket.classList.add(q), this.pullCaption = this.bottomCaption, this.pullLoading = this.bottomLoading)
  1590. },
  1591. _initPocket: function() {
  1592. var a = this.options;
  1593. a.down && a.down.hasOwnProperty("callback") && (this.topPocket = this.scroller.querySelector("." + d), this.topPocket || (this.topPocket = this._createPocket(d, a.down, s), this.wrapper.insertBefore(this.topPocket, this.wrapper.firstChild)), this.topLoading = this.topPocket.querySelector("." + g), this.topCaption = this.topPocket.querySelector("." + h)), a.up && a.up.hasOwnProperty("callback") && (this.bottomPocket = this.scroller.querySelector("." + e), this.bottomPocket || (this.bottomPocket = this._createPocket(e, a.up, t), this.scroller.appendChild(this.bottomPocket)), this.bottomLoading = this.bottomPocket.querySelector("." + g), this.bottomCaption = this.bottomPocket.querySelector("." + h), this.wrapper.addEventListener("scrollbottom", this))
  1594. },
  1595. _createPocket: function(a, c, d) {
  1596. var e = b.createElement("div");
  1597. return e.className = a, e.innerHTML = u.replace("{contentrefresh}", c.contentinit).replace("{icon}", d), e
  1598. },
  1599. _resetPullDownLoading: function() {
  1600. var a = this.pullLoading;
  1601. a && (this.pullCaption.innerHTML = this.options.down.contentdown, a.style.webkitTransition = "", a.style.webkitTransform = "", a.style.webkitAnimation = "", a.className = s)
  1602. },
  1603. _setCaptionClass: function(a, b, c) {
  1604. if(!a) switch(c) {
  1605. case this.options.up.contentdown:
  1606. b.className = h + " " + i;
  1607. break;
  1608. case this.options.up.contentrefresh:
  1609. b.className = h + " " + j;
  1610. break;
  1611. case this.options.up.contentnomore:
  1612. b.className = h + " " + k
  1613. }
  1614. },
  1615. _setCaption: function(a, b) {
  1616. if(!this.loading) {
  1617. var c = this.options,
  1618. d = this.pullPocket,
  1619. e = this.pullCaption,
  1620. f = this.pullLoading,
  1621. g = this.pulldown,
  1622. h = this;
  1623. d && (b ? setTimeout(function() {
  1624. e.innerHTML = h.lastTitle = a, g ? f.className = s : (h._setCaptionClass(!1, e, a), f.className = t), f.style.webkitAnimation = "", f.style.webkitTransition = "", f.style.webkitTransform = ""
  1625. }, 100) : a !== this.lastTitle && (e.innerHTML = a, g ? a === c.down.contentrefresh ? (f.className = t, f.style.webkitAnimation = "spinner-spin 1s step-end infinite") : a === c.down.contentover ? (f.className = r, f.style.webkitTransition = "-webkit-transform 0.3s ease-in", f.style.webkitTransform = "rotate(180deg)") : a === c.down.contentdown && (f.className = s, f.style.webkitTransition = "-webkit-transform 0.3s ease-in", f.style.webkitTransform = "rotate(0deg)") : (a === c.up.contentrefresh ? f.className = t + " " + q : f.className = t + " " + p, h._setCaptionClass(!1, e, a)), this.lastTitle = a))
  1626. }
  1627. }
  1628. };
  1629. a.PullRefresh = v
  1630. }(mui, document),
  1631. function(a, b, c, d) {
  1632. var e = "mui-scroll",
  1633. f = "mui-scrollbar",
  1634. g = "mui-scrollbar-indicator",
  1635. h = f + "-vertical",
  1636. i = f + "-horizontal",
  1637. j = "mui-active",
  1638. k = {
  1639. quadratic: {
  1640. style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
  1641. fn: function(a) {
  1642. return a * (2 - a)
  1643. }
  1644. },
  1645. circular: {
  1646. style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
  1647. fn: function(a) {
  1648. return Math.sqrt(1 - --a * a)
  1649. }
  1650. },
  1651. outCirc: {
  1652. style: "cubic-bezier(0.075, 0.82, 0.165, 1)"
  1653. },
  1654. outCubic: {
  1655. style: "cubic-bezier(0.165, 0.84, 0.44, 1)"
  1656. }
  1657. },
  1658. l = a.Class.extend({
  1659. init: function(b, c) {
  1660. this.wrapper = this.element = b, this.scroller = this.wrapper.children[0], this.scrollerStyle = this.scroller && this.scroller.style, this.stopped = !1, this.options = a.extend(!0, {
  1661. scrollY: !0,
  1662. scrollX: !1,
  1663. startX: 0,
  1664. startY: 0,
  1665. indicators: !0,
  1666. stopPropagation: !1,
  1667. hardwareAccelerated: !0,
  1668. fixedBadAndorid: !1,
  1669. preventDefaultException: {
  1670. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/
  1671. },
  1672. momentum: !0,
  1673. snapX: .5,
  1674. snap: !1,
  1675. bounce: !0,
  1676. bounceTime: 500,
  1677. bounceEasing: k.outCirc,
  1678. scrollTime: 500,
  1679. scrollEasing: k.outCubic,
  1680. directionLockThreshold: 5,
  1681. parallaxElement: !1,
  1682. parallaxRatio: .5
  1683. }, c), this.x = 0, this.y = 0, this.translateZ = this.options.hardwareAccelerated ? " translateZ(0)" : "", this._init(), this.scroller && (this.refresh(), this.scrollTo(this.options.startX, this.options.startY))
  1684. },
  1685. _init: function() {
  1686. this._initParallax(), this._initIndicators(), this._initEvent()
  1687. },
  1688. _initParallax: function() {
  1689. this.options.parallaxElement && (this.parallaxElement = c.querySelector(this.options.parallaxElement), this.parallaxStyle = this.parallaxElement.style, this.parallaxHeight = this.parallaxElement.offsetHeight, this.parallaxImgStyle = this.parallaxElement.querySelector("img").style)
  1690. },
  1691. _initIndicators: function() {
  1692. var a = this;
  1693. if(a.indicators = [], this.options.indicators) {
  1694. var b, c = [];
  1695. a.options.scrollY && (b = {
  1696. el: this._createScrollBar(h),
  1697. listenX: !1
  1698. }, this.wrapper.appendChild(b.el), c.push(b)), this.options.scrollX && (b = {
  1699. el: this._createScrollBar(i),
  1700. listenY: !1
  1701. }, this.wrapper.appendChild(b.el), c.push(b));
  1702. for(var d = c.length; d--;) this.indicators.push(new m(this, c[d]))
  1703. }
  1704. },
  1705. _initSnap: function() {
  1706. this.currentPage = {}, this.pages = [];
  1707. for(var a = this.snaps, b = a.length, c = 0, d = -1, e = 0, f = 0, g = 0, h = 0, i = 0; b > i; i++) {
  1708. var k = a[i],
  1709. l = k.offsetLeft,
  1710. m = k.offsetWidth;
  1711. (0 === i || l <= a[i - 1].offsetLeft) && (c = 0, d++), this.pages[c] || (this.pages[c] = []), e = this._getSnapX(l), h = Math.round(m * this.options.snapX), f = e - h, g = e - m + h, this.pages[c][d] = {
  1712. x: e,
  1713. leftX: f,
  1714. rightX: g,
  1715. pageX: c,
  1716. element: k
  1717. }, k.classList.contains(j) && (this.currentPage = this.pages[c][0]), e >= this.maxScrollX && c++
  1718. }
  1719. this.options.startX = this.currentPage.x || 0
  1720. },
  1721. _getSnapX: function(a) {
  1722. return Math.max(Math.min(0, -a + this.wrapperWidth / 2), this.maxScrollX)
  1723. },
  1724. _gotoPage: function(a) {
  1725. this.currentPage = this.pages[Math.min(a, this.pages.length - 1)][0];
  1726. for(var b = 0, c = this.snaps.length; c > b; b++) b === a ? this.snaps[b].classList.add(j) : this.snaps[b].classList.remove(j);
  1727. this.scrollTo(this.currentPage.x, 0, this.options.scrollTime)
  1728. },
  1729. _nearestSnap: function(a) {
  1730. if(!this.pages.length) return {
  1731. x: 0,
  1732. pageX: 0
  1733. };
  1734. var b = 0,
  1735. c = this.pages.length;
  1736. for(a > 0 ? a = 0 : a < this.maxScrollX && (a = this.maxScrollX); c > b; b++) {
  1737. var d = "left" === this.direction ? this.pages[b][0].leftX : this.pages[b][0].rightX;
  1738. if(a >= d) return this.pages[b][0]
  1739. }
  1740. return {
  1741. x: 0,
  1742. pageX: 0
  1743. }
  1744. },
  1745. _initEvent: function(c) {
  1746. var d = c ? "removeEventListener" : "addEventListener";
  1747. b[d]("orientationchange", this), b[d]("resize", this), this.scroller[d]("webkitTransitionEnd", this), this.wrapper[d](a.EVENT_START, this), this.wrapper[d](a.EVENT_CANCEL, this), this.wrapper[d](a.EVENT_END, this), this.wrapper[d]("drag", this), this.wrapper[d]("dragend", this), this.wrapper[d]("flick", this), this.wrapper[d]("scrollend", this), this.options.scrollX && this.wrapper[d]("swiperight", this);
  1748. var e = this.wrapper.querySelector(".mui-segmented-control");
  1749. e && mui(e)[c ? "off" : "on"]("click", "a", a.preventDefault), this.wrapper[d]("scrollstart", this), this.wrapper[d]("refresh", this)
  1750. },
  1751. _handleIndicatorScrollend: function() {
  1752. this.indicators.map(function(a) {
  1753. a.fade()
  1754. })
  1755. },
  1756. _handleIndicatorScrollstart: function() {
  1757. this.indicators.map(function(a) {
  1758. a.fade(1)
  1759. })
  1760. },
  1761. _handleIndicatorRefresh: function() {
  1762. this.indicators.map(function(a) {
  1763. a.refresh()
  1764. })
  1765. },
  1766. handleEvent: function(b) {
  1767. if(this.stopped) return void this.resetPosition();
  1768. switch(b.type) {
  1769. case a.EVENT_START:
  1770. this._start(b);
  1771. break;
  1772. case "drag":
  1773. this.options.stopPropagation && b.stopPropagation(), this._drag(b);
  1774. break;
  1775. case "dragend":
  1776. case "flick":
  1777. this.options.stopPropagation && b.stopPropagation(), this._flick(b);
  1778. break;
  1779. case a.EVENT_CANCEL:
  1780. case a.EVENT_END:
  1781. this._end(b);
  1782. break;
  1783. case "webkitTransitionEnd":
  1784. this.transitionTimer && this.transitionTimer.cancel(), this._transitionEnd(b);
  1785. break;
  1786. case "scrollstart":
  1787. this._handleIndicatorScrollstart(b);
  1788. break;
  1789. case "scrollend":
  1790. this._handleIndicatorScrollend(b), this._scrollend(b), b.stopPropagation();
  1791. break;
  1792. case "orientationchange":
  1793. case "resize":
  1794. this._resize();
  1795. break;
  1796. case "swiperight":
  1797. b.stopPropagation();
  1798. break;
  1799. case "refresh":
  1800. this._handleIndicatorRefresh(b)
  1801. }
  1802. },
  1803. _start: function(b) {
  1804. if(this.moved = this.needReset = !1, this._transitionTime(), this.isInTransition) {
  1805. this.needReset = !0, this.isInTransition = !1;
  1806. var c = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
  1807. this.setTranslate(Math.round(c.x), Math.round(c.y)), a.trigger(this.scroller, "scrollend", this), b.preventDefault()
  1808. }
  1809. this.reLayout(), a.trigger(this.scroller, "beforescrollstart", this)
  1810. },
  1811. _getDirectionByAngle: function(a) {
  1812. return -80 > a && a > -100 ? "up" : a >= 80 && 100 > a ? "down" : a >= 170 || -170 >= a ? "left" : a >= -35 && 10 >= a ? "right" : null
  1813. },
  1814. _drag: function(c) {
  1815. var d = c.detail;
  1816. if((this.options.scrollY || "up" === d.direction || "down" === d.direction) && a.os.ios && parseFloat(a.os.version) >= 8) {
  1817. var e = d.gesture.touches[0].clientY;
  1818. if(e + 10 > b.innerHeight || 10 > e) return void this.resetPosition(this.options.bounceTime)
  1819. }
  1820. var f = isReturn = !1;
  1821. this._getDirectionByAngle(d.angle);
  1822. if("left" === d.direction || "right" === d.direction ? this.options.scrollX ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollY && !this.moved && (isReturn = !0) : "up" === d.direction || "down" === d.direction ? this.options.scrollY ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollX && !this.moved && (isReturn = !0) : isReturn = !0, (this.moved || f) && (c.stopPropagation(), d.gesture && d.gesture.preventDefault()), !isReturn) {
  1823. this.moved ? c.stopPropagation() : a.trigger(this.scroller, "scrollstart", this);
  1824. var g = 0,
  1825. h = 0;
  1826. this.moved ? (g = d.deltaX - a.gestures.session.prevTouch.deltaX, h = d.deltaY - a.gestures.session.prevTouch.deltaY) : (g = d.deltaX, h = d.deltaY);
  1827. var i = Math.abs(d.deltaX),
  1828. j = Math.abs(d.deltaY);
  1829. i > j + this.options.directionLockThreshold ? h = 0 : j >= i + this.options.directionLockThreshold && (g = 0), g = this.hasHorizontalScroll ? g : 0, h = this.hasVerticalScroll ? h : 0;
  1830. var k = this.x + g,
  1831. l = this.y + h;
  1832. (k > 0 || k < this.maxScrollX) && (k = this.options.bounce ? this.x + g / 3 : k > 0 ? 0 : this.maxScrollX), (l > 0 || l < this.maxScrollY) && (l = this.options.bounce ? this.y + h / 3 : l > 0 ? 0 : this.maxScrollY), this.requestAnimationFrame || this._updateTranslate(), this.direction = d.deltaX > 0 ? "right" : "left", this.moved = !0, this.x = k, this.y = l, a.trigger(this.scroller, "scroll", this)
  1833. }
  1834. },
  1835. _flick: function(b) {
  1836. if(this.moved) {
  1837. b.stopPropagation();
  1838. var c = b.detail;
  1839. if(this._clearRequestAnimationFrame(), "dragend" !== b.type || !c.flick) {
  1840. var d = Math.round(this.x),
  1841. e = Math.round(this.y);
  1842. if(this.isInTransition = !1, !this.resetPosition(this.options.bounceTime)) {
  1843. if(this.scrollTo(d, e), "dragend" === b.type) return void a.trigger(this.scroller, "scrollend", this);
  1844. var f = 0,
  1845. g = "";
  1846. return this.options.momentum && c.flickTime < 300 && (momentumX = this.hasHorizontalScroll ? this._momentum(this.x, c.flickDistanceX, c.flickTime, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
  1847. destination: d,
  1848. duration: 0
  1849. }, momentumY = this.hasVerticalScroll ? this._momentum(this.y, c.flickDistanceY, c.flickTime, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
  1850. destination: e,
  1851. duration: 0
  1852. }, d = momentumX.destination, e = momentumY.destination, f = Math.max(momentumX.duration, momentumY.duration), this.isInTransition = !0), d != this.x || e != this.y ? ((d > 0 || d < this.maxScrollX || e > 0 || e < this.maxScrollY) && (g = k.quadratic), void this.scrollTo(d, e, f, g)) : void a.trigger(this.scroller, "scrollend", this)
  1853. }
  1854. }
  1855. }
  1856. },
  1857. _end: function(b) {
  1858. this.needReset = !1, (!this.moved && this.needReset || b.type === a.EVENT_CANCEL) && this.resetPosition()
  1859. },
  1860. _transitionEnd: function(b) {
  1861. b.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, a.trigger(this.scroller, "scrollend", this)))
  1862. },
  1863. _scrollend: function(b) {
  1864. (0 === this.y && 0 === this.maxScrollY || Math.abs(this.y) > 0 && this.y <= this.maxScrollY) && a.trigger(this.scroller, "scrollbottom", this)
  1865. },
  1866. _resize: function() {
  1867. var a = this;
  1868. clearTimeout(a.resizeTimeout), a.resizeTimeout = setTimeout(function() {
  1869. a.refresh()
  1870. }, a.options.resizePolling)
  1871. },
  1872. _transitionTime: function(b) {
  1873. if(b = b || 0, this.scrollerStyle.webkitTransitionDuration = b + "ms", this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = b + "ms"), this.options.fixedBadAndorid && !b && a.os.isBadAndroid && (this.scrollerStyle.webkitTransitionDuration = "0.001s", this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = "0.001s")), this.indicators)
  1874. for(var c = this.indicators.length; c--;) this.indicators[c].transitionTime(b);
  1875. b && (this.transitionTimer && this.transitionTimer.cancel(), this.transitionTimer = a.later(function() {
  1876. a.trigger(this.scroller, "webkitTransitionEnd")
  1877. }, b + 100, this))
  1878. },
  1879. _transitionTimingFunction: function(a) {
  1880. if(this.scrollerStyle.webkitTransitionTimingFunction = a, this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = a), this.indicators)
  1881. for(var b = this.indicators.length; b--;) this.indicators[b].transitionTimingFunction(a)
  1882. },
  1883. _translate: function(a, b) {
  1884. this.x = a, this.y = b
  1885. },
  1886. _clearRequestAnimationFrame: function() {
  1887. this.requestAnimationFrame && (cancelAnimationFrame(this.requestAnimationFrame), this.requestAnimationFrame = null)
  1888. },
  1889. _updateTranslate: function() {
  1890. var a = this;
  1891. (a.x !== a.lastX || a.y !== a.lastY) && a.setTranslate(a.x, a.y), a.requestAnimationFrame = requestAnimationFrame(function() {
  1892. a._updateTranslate()
  1893. })
  1894. },
  1895. _createScrollBar: function(a) {
  1896. var b = c.createElement("div"),
  1897. d = c.createElement("div");
  1898. return b.className = f + " " + a, d.className = g, b.appendChild(d), a === h ? (this.scrollbarY = b, this.scrollbarIndicatorY = d) : a === i && (this.scrollbarX = b, this.scrollbarIndicatorX = d), this.wrapper.appendChild(b), b
  1899. },
  1900. _preventDefaultException: function(a, b) {
  1901. for(var c in b)
  1902. if(b[c].test(a[c])) return !0;
  1903. return !1
  1904. },
  1905. _reLayout: function() {
  1906. if(this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.indicators.map(function(a) {
  1907. a.refresh()
  1908. }), this.options.snap && "string" == typeof this.options.snap) {
  1909. var a = this.scroller.querySelectorAll(this.options.snap);
  1910. this.itemLength = 0, this.snaps = [];
  1911. for(var b = 0, c = a.length; c > b; b++) {
  1912. var d = a[b];
  1913. d.parentNode === this.scroller && (this.itemLength++, this.snaps.push(d))
  1914. }
  1915. this._initSnap()
  1916. }
  1917. },
  1918. _momentum: function(a, b, c, e, f, g) {
  1919. var h, i, j = parseFloat(Math.abs(b) / c);
  1920. return g = g === d ? 6e-4 : g, h = a + j * j / (2 * g) * (0 > b ? -1 : 1), i = j / g, e > h ? (h = f ? e - f / 2.5 * (j / 8) : e, b = Math.abs(h - a), i = b / j) : h > 0 && (h = f ? f / 2.5 * (j / 8) : 0, b = Math.abs(a) + h, i = b / j), {
  1921. destination: Math.round(h),
  1922. duration: i
  1923. }
  1924. },
  1925. _getTranslateStr: function(a, b) {
  1926. return this.options.hardwareAccelerated ? "translate3d(" + a + "px," + b + "px,0px) " + this.translateZ : "translate(" + a + "px," + b + "px) "
  1927. },
  1928. setStopped: function(a) {
  1929. this.stopped = !!a
  1930. },
  1931. setTranslate: function(b, c) {
  1932. if(this.x = b, this.y = c, this.scrollerStyle.webkitTransform = this._getTranslateStr(b, c), this.parallaxElement && this.options.scrollY) {
  1933. var d = c * this.options.parallaxRatio,
  1934. e = 1 + d / ((this.parallaxHeight - d) / 2);
  1935. e > 1 ? (this.parallaxImgStyle.opacity = 1 - d / 100 * this.options.parallaxRatio, this.parallaxStyle.webkitTransform = this._getTranslateStr(0, -d) + " scale(" + e + "," + e + ")") : (this.parallaxImgStyle.opacity = 1, this.parallaxStyle.webkitTransform = this._getTranslateStr(0, -1) + " scale(1,1)")
  1936. }
  1937. if(this.indicators)
  1938. for(var f = this.indicators.length; f--;) this.indicators[f].updatePosition();
  1939. this.lastX = this.x, this.lastY = this.y, a.trigger(this.scroller, "scroll", this)
  1940. },
  1941. reLayout: function() {
  1942. this.wrapper.offsetHeight;
  1943. var b = parseFloat(a.getStyles(this.wrapper, "padding-left")) || 0,
  1944. c = parseFloat(a.getStyles(this.wrapper, "padding-right")) || 0,
  1945. d = parseFloat(a.getStyles(this.wrapper, "padding-top")) || 0,
  1946. e = parseFloat(a.getStyles(this.wrapper, "padding-bottom")) || 0,
  1947. f = this.wrapper.clientWidth,
  1948. g = this.wrapper.clientHeight;
  1949. this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, this.wrapperWidth = f - b - c, this.wrapperHeight = g - d - e, this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0), this.maxScrollY = Math.min(this.wrapperHeight - this.scrollerHeight, 0), this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this._reLayout()
  1950. },
  1951. resetPosition: function(a) {
  1952. var b = this.x,
  1953. c = this.y;
  1954. return a = a || 0, !this.hasHorizontalScroll || this.x > 0 ? b = 0 : this.x < this.maxScrollX && (b = this.maxScrollX), !this.hasVerticalScroll || this.y > 0 ? c = 0 : this.y < this.maxScrollY && (c = this.maxScrollY), b == this.x && c == this.y ? !1 : (this.scrollTo(b, c, a, this.options.scrollEasing), !0)
  1955. },
  1956. _reInit: function() {
  1957. for(var a = this.wrapper.querySelectorAll("." + e), b = 0, c = a.length; c > b; b++)
  1958. if(a[b].parentNode === this.wrapper) {
  1959. this.scroller = a[b];
  1960. break
  1961. }
  1962. this.scrollerStyle = this.scroller && this.scroller.style
  1963. },
  1964. refresh: function() {
  1965. this._reInit(), this.reLayout(), a.trigger(this.scroller, "refresh", this), this.resetPosition()
  1966. },
  1967. scrollTo: function(a, b, c, d) {
  1968. var d = d || k.circular;
  1969. this.isInTransition = c > 0, this.isInTransition ? (this._clearRequestAnimationFrame(), this._transitionTimingFunction(d.style), this._transitionTime(c), this.setTranslate(a, b)) : this.setTranslate(a, b)
  1970. },
  1971. scrollToBottom: function(a, b) {
  1972. a = a || this.options.scrollTime, this.scrollTo(0, this.maxScrollY, a, b)
  1973. },
  1974. gotoPage: function(a) {
  1975. this._gotoPage(a)
  1976. },
  1977. destroy: function() {
  1978. this._initEvent(!0), delete a.data[this.wrapper.getAttribute("data-scroll")], this.wrapper.setAttribute("data-scroll", "")
  1979. }
  1980. }),
  1981. m = function(b, d) {
  1982. this.wrapper = "string" == typeof d.el ? c.querySelector(d.el) : d.el, this.wrapperStyle = this.wrapper.style, this.indicator = this.wrapper.children[0], this.indicatorStyle = this.indicator.style, this.scroller = b, this.options = a.extend({
  1983. listenX: !0,
  1984. listenY: !0,
  1985. fade: !1,
  1986. speedRatioX: 0,
  1987. speedRatioY: 0
  1988. }, d), this.sizeRatioX = 1, this.sizeRatioY = 1, this.maxPosX = 0, this.maxPosY = 0, this.options.fade && (this.wrapperStyle.webkitTransform = this.scroller.translateZ, this.wrapperStyle.webkitTransitionDuration = this.options.fixedBadAndorid && a.os.isBadAndroid ? "0.001s" : "0ms", this.wrapperStyle.opacity = "0")
  1989. };
  1990. m.prototype = {
  1991. handleEvent: function(a) {},
  1992. transitionTime: function(b) {
  1993. b = b || 0, this.indicatorStyle.webkitTransitionDuration = b + "ms", this.scroller.options.fixedBadAndorid && !b && a.os.isBadAndroid && (this.indicatorStyle.webkitTransitionDuration = "0.001s")
  1994. },
  1995. transitionTimingFunction: function(a) {
  1996. this.indicatorStyle.webkitTransitionTimingFunction = a
  1997. },
  1998. refresh: function() {
  1999. this.transitionTime(), this.options.listenX && !this.options.listenY ? this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? "block" : "none" : this.options.listenY && !this.options.listenX ? this.indicatorStyle.display = this.scroller.hasVerticalScroll ? "block" : "none" : this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? "block" : "none", this.wrapper.offsetHeight, this.options.listenX && (this.wrapperWidth = this.wrapper.clientWidth, this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8), this.indicatorStyle.width = this.indicatorWidth + "px", this.maxPosX = this.wrapperWidth - this.indicatorWidth, this.minBoundaryX = 0, this.maxBoundaryX = this.maxPosX, this.sizeRatioX = this.options.speedRatioX || this.scroller.maxScrollX && this.maxPosX / this.scroller.maxScrollX), this.options.listenY && (this.wrapperHeight = this.wrapper.clientHeight, this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8), this.indicatorStyle.height = this.indicatorHeight + "px", this.maxPosY = this.wrapperHeight - this.indicatorHeight, this.minBoundaryY = 0, this.maxBoundaryY = this.maxPosY, this.sizeRatioY = this.options.speedRatioY || this.scroller.maxScrollY && this.maxPosY / this.scroller.maxScrollY), this.updatePosition()
  2000. },
  2001. updatePosition: function() {
  2002. var a = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
  2003. b = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
  2004. a < this.minBoundaryX ? (this.width = Math.max(this.indicatorWidth + a, 8), this.indicatorStyle.width = this.width + "px", a = this.minBoundaryX) : a > this.maxBoundaryX ? (this.width = Math.max(this.indicatorWidth - (a - this.maxPosX), 8), this.indicatorStyle.width = this.width + "px", a = this.maxPosX + this.indicatorWidth - this.width) : this.width != this.indicatorWidth && (this.width = this.indicatorWidth, this.indicatorStyle.width = this.width + "px"), b < this.minBoundaryY ? (this.height = Math.max(this.indicatorHeight + 3 * b, 8), this.indicatorStyle.height = this.height + "px", b = this.minBoundaryY) : b > this.maxBoundaryY ? (this.height = Math.max(this.indicatorHeight - 3 * (b - this.maxPosY), 8), this.indicatorStyle.height = this.height + "px", b = this.maxPosY + this.indicatorHeight - this.height) : this.height != this.indicatorHeight && (this.height = this.indicatorHeight, this.indicatorStyle.height = this.height + "px"), this.x = a, this.y = b, this.indicatorStyle.webkitTransform = this.scroller._getTranslateStr(a, b)
  2005. },
  2006. fade: function(a, b) {
  2007. if(!b || this.visible) {
  2008. clearTimeout(this.fadeTimeout), this.fadeTimeout = null;
  2009. var c = a ? 250 : 500,
  2010. d = a ? 0 : 300;
  2011. a = a ? "1" : "0", this.wrapperStyle.webkitTransitionDuration = c + "ms", this.fadeTimeout = setTimeout(function(a) {
  2012. this.wrapperStyle.opacity = a, this.visible = +a
  2013. }.bind(this, a), d)
  2014. }
  2015. }
  2016. }, a.Scroll = l, a.fn.scroll = function(b) {
  2017. var c = [];
  2018. return this.each(function() {
  2019. var d = null,
  2020. e = this,
  2021. f = e.getAttribute("data-scroll");
  2022. if(f) d = a.data[f];
  2023. else {
  2024. f = ++a.uuid;
  2025. var g = a.extend({}, b);
  2026. e.classList.contains("mui-segmented-control") && (g = a.extend(g, {
  2027. scrollY: !1,
  2028. scrollX: !0,
  2029. indicators: !1,
  2030. snap: ".mui-control-item"
  2031. })), a.data[f] = d = new l(e, g), e.setAttribute("data-scroll", f)
  2032. }
  2033. c.push(d)
  2034. }), 1 === c.length ? c[0] : c
  2035. }
  2036. }(mui, window, document),
  2037. function(a, b, c, d) {
  2038. var e = "mui-visibility",
  2039. f = "mui-hidden",
  2040. g = a.Scroll.extend(a.extend({
  2041. handleEvent: function(a) {
  2042. this._super(a), "scrollbottom" === a.type && a.target === this.scroller && this._scrollbottom()
  2043. },
  2044. _scrollbottom: function() {
  2045. this.pulldown || this.loading || (this.pulldown = !1, this._initPullupRefresh(), this.pullupLoading())
  2046. },
  2047. _start: function(a) {
  2048. a.touches && a.touches.length && a.touches[0].clientX > 30 && a.target && !this._preventDefaultException(a.target, this.options.preventDefaultException) && a.preventDefault(), this.loading || (this.pulldown = this.pullPocket = this.pullCaption = this.pullLoading = !1), this._super(a)
  2049. },
  2050. _drag: function(a) {
  2051. this._super(a), !this.pulldown && !this.loading && this.topPocket && "down" === a.detail.direction && this.y >= 0 && this._initPulldownRefresh(), this.pulldown && this._setCaption(this.y > this.options.down.height ? this.options.down.contentover : this.options.down.contentdown)
  2052. },
  2053. _reLayout: function() {
  2054. this.hasVerticalScroll = !0, this._super()
  2055. },
  2056. resetPosition: function(a) {
  2057. if(this.pulldown) {
  2058. if(this.y >= this.options.down.height) return this.pulldownLoading(d, a || 0), !0;
  2059. !this.loading && this.topPocket.classList.remove(e)
  2060. }
  2061. return this._super(a)
  2062. },
  2063. pulldownLoading: function(a, b) {
  2064. if("undefined" == typeof a && (a = this.options.down.height), this.scrollTo(0, a, b, this.options.bounceEasing), !this.loading) {
  2065. this._initPulldownRefresh(), this._setCaption(this.options.down.contentrefresh), this.loading = !0, this.indicators.map(function(a) {
  2066. a.fade(0)
  2067. });
  2068. var c = this.options.down.callback;
  2069. c && c.call(this)
  2070. }
  2071. },
  2072. endPulldownToRefresh: function() {
  2073. var a = this;
  2074. a.topPocket && a.loading && this.pulldown && (a.scrollTo(0, 0, a.options.bounceTime, a.options.bounceEasing), a.loading = !1, a._setCaption(a.options.down.contentdown, !0), setTimeout(function() {
  2075. a.loading || a.topPocket.classList.remove(e)
  2076. }, 350))
  2077. },
  2078. pullupLoading: function(a, b, c) {
  2079. b = b || 0, this.scrollTo(b, this.maxScrollY, c, this.options.bounceEasing), this.loading || (this._initPullupRefresh(), this._setCaption(this.options.up.contentrefresh), this.indicators.map(function(a) {
  2080. a.fade(0)
  2081. }), this.loading = !0, a = a || this.options.up.callback, a && a.call(this))
  2082. },
  2083. endPullupToRefresh: function(a) {
  2084. var b = this;
  2085. b.bottomPocket && (b.loading = !1, a ? (this.finished = !0, b._setCaption(b.options.up.contentnomore), b.wrapper.removeEventListener("scrollbottom", b)) : (b._setCaption(b.options.up.contentdown), b.loading || b.bottomPocket.classList.remove(e)))
  2086. },
  2087. disablePullupToRefresh: function() {
  2088. this._initPullupRefresh(), this.bottomPocket.className = "mui-pull-bottom-pocket " + f, this.wrapper.removeEventListener("scrollbottom", this)
  2089. },
  2090. enablePullupToRefresh: function() {
  2091. this._initPullupRefresh(), this.bottomPocket.classList.remove(f), this._setCaption(this.options.up.contentdown), this.wrapper.addEventListener("scrollbottom", this)
  2092. },
  2093. refresh: function(a) {
  2094. a && this.finished && (this.enablePullupToRefresh(), this.finished = !1), this._super()
  2095. }
  2096. }, a.PullRefresh));
  2097. a.fn.pullRefresh = function(b) {
  2098. if(1 === this.length) {
  2099. var c = this[0],
  2100. d = null,
  2101. e = c.getAttribute("data-pullrefresh");
  2102. return e || "undefined" != typeof b ? (b = b || {}, e ? d = a.data[e] : (e = ++a.uuid, a.data[e] = d = new g(c, b), c.setAttribute("data-pullrefresh", e)), b.down && b.down.auto ? d.pulldownLoading(b.down.autoY) : b.up && b.up.auto && d.pullupLoading(), d) : !1
  2103. }
  2104. }
  2105. }(mui, window, document),
  2106. function(a, b) {
  2107. var c = "mui-slider",
  2108. d = "mui-slider-group",
  2109. e = "mui-slider-loop",
  2110. f = "mui-action-previous",
  2111. g = "mui-action-next",
  2112. h = "mui-slider-item",
  2113. i = "mui-active",
  2114. j = "." + h,
  2115. k = ".mui-slider-progress-bar",
  2116. l = a.Slider = a.Scroll.extend({
  2117. init: function(b, c) {
  2118. this._super(b, a.extend(!0, {
  2119. fingers: 1,
  2120. interval: 0,
  2121. scrollY: !1,
  2122. scrollX: !0,
  2123. indicators: !1,
  2124. scrollTime: 1e3,
  2125. startX: !1,
  2126. slideTime: 0,
  2127. snap: j
  2128. }, c)), this.options.startX
  2129. },
  2130. _init: function() {
  2131. this._reInit(), this.scroller && (this.scrollerStyle = this.scroller.style, this.progressBar = this.wrapper.querySelector(k), this.progressBar && (this.progressBarWidth = this.progressBar.offsetWidth, this.progressBarStyle = this.progressBar.style), this._super(), this._initTimer())
  2132. },
  2133. _triggerSlide: function() {
  2134. var b = this;
  2135. b.isInTransition = !1;
  2136. b.currentPage;
  2137. b.slideNumber = b._fixedSlideNumber(), b.loop && (0 === b.slideNumber ? b.setTranslate(b.pages[1][0].x, 0) : b.slideNumber === b.itemLength - 3 && b.setTranslate(b.pages[b.itemLength - 2][0].x, 0)), b.lastSlideNumber != b.slideNumber && (b.lastSlideNumber = b.slideNumber, b.lastPage = b.currentPage, a.trigger(b.wrapper, "slide", {
  2138. slideNumber: b.slideNumber
  2139. })), b._initTimer()
  2140. },
  2141. _handleSlide: function(b) {
  2142. var c = this;
  2143. if(b.target === c.wrapper) {
  2144. var d = b.detail;
  2145. d.slideNumber = d.slideNumber || 0;
  2146. for(var e = c.scroller.querySelectorAll(j), f = [], g = 0, h = e.length; h > g; g++) {
  2147. var k = e[g];
  2148. k.parentNode === c.scroller && f.push(k)
  2149. }
  2150. var l = d.slideNumber;
  2151. if(c.loop && (l += 1), !c.wrapper.classList.contains("mui-segmented-control"))
  2152. for(var g = 0, h = f.length; h > g; g++) {
  2153. var k = f[g];
  2154. k.parentNode === c.scroller && (g === l ? k.classList.add(i) : k.classList.remove(i))
  2155. }
  2156. var m = c.wrapper.querySelector(".mui-slider-indicator");
  2157. if(m) {
  2158. m.getAttribute("data-scroll") && a(m).scroll().gotoPage(d.slideNumber);
  2159. var n = m.querySelectorAll(".mui-indicator");
  2160. if(n.length > 0)
  2161. for(var g = 0, h = n.length; h > g; g++) n[g].classList[g === d.slideNumber ? "add" : "remove"](i);
  2162. else {
  2163. var o = m.querySelector(".mui-number span");
  2164. if(o) o.innerText = d.slideNumber + 1;
  2165. else
  2166. for(var p = m.querySelectorAll(".mui-control-item"), g = 0, h = p.length; h > g; g++) p[g].classList[g === d.slideNumber ? "add" : "remove"](i)
  2167. }
  2168. }
  2169. b.stopPropagation()
  2170. }
  2171. },
  2172. _handleTabShow: function(a) {
  2173. var b = this;
  2174. b.gotoItem(a.detail.tabNumber || 0, b.options.slideTime)
  2175. },
  2176. _handleIndicatorTap: function(a) {
  2177. var b = this,
  2178. c = a.target;
  2179. (c.classList.contains(f) || c.classList.contains(g)) && (b[c.classList.contains(f) ? "prevItem" : "nextItem"](), a.stopPropagation())
  2180. },
  2181. _initEvent: function(b) {
  2182. var c = this;
  2183. c._super(b);
  2184. var d = b ? "removeEventListener" : "addEventListener";
  2185. c.wrapper[d]("slide", this), c.wrapper[d](a.eventName("shown", "tab"), this)
  2186. },
  2187. handleEvent: function(b) {
  2188. switch(this._super(b), b.type) {
  2189. case "slide":
  2190. this._handleSlide(b);
  2191. break;
  2192. case a.eventName("shown", "tab"):
  2193. ~this.snaps.indexOf(b.target) && this._handleTabShow(b)
  2194. }
  2195. },
  2196. _scrollend: function(a) {
  2197. this._super(a), this._triggerSlide(a)
  2198. },
  2199. _drag: function(a) {
  2200. this._super(a);
  2201. var c = a.detail.direction;
  2202. if("left" === c || "right" === c) {
  2203. var d = this.wrapper.getAttribute("data-slidershowTimer");
  2204. d && b.clearTimeout(d), a.stopPropagation()
  2205. }
  2206. },
  2207. _initTimer: function() {
  2208. var a = this,
  2209. c = a.wrapper,
  2210. d = a.options.interval,
  2211. e = c.getAttribute("data-slidershowTimer");
  2212. e && b.clearTimeout(e), d && (e = b.setTimeout(function() {
  2213. c && ((c.offsetWidth || c.offsetHeight) && a.nextItem(!0), a._initTimer())
  2214. }, d), c.setAttribute("data-slidershowTimer", e))
  2215. },
  2216. _fixedSlideNumber: function(a) {
  2217. a = a || this.currentPage;
  2218. var b = a.pageX;
  2219. return this.loop && (b = 0 === a.pageX ? this.itemLength - 3 : a.pageX === this.itemLength - 1 ? 0 : a.pageX - 1), b
  2220. },
  2221. _reLayout: function() {
  2222. this.hasHorizontalScroll = !0, this.loop = this.scroller.classList.contains(e), this._super()
  2223. },
  2224. _getScroll: function() {
  2225. var b = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
  2226. return b ? b.x : 0
  2227. },
  2228. _transitionEnd: function(b) {
  2229. b.target === this.scroller && this.isInTransition && (this._transitionTime(), this.isInTransition = !1, a.trigger(this.wrapper, "scrollend", this))
  2230. },
  2231. _flick: function(a) {
  2232. if(this.moved) {
  2233. var b = a.detail,
  2234. c = b.direction;
  2235. this._clearRequestAnimationFrame(), this.isInTransition = !0, "flick" === a.type ? (b.deltaTime < 200 && (this.x = this._getPage(this.slideNumber + ("right" === c ? -1 : 1), !0).x), this.resetPosition(this.options.bounceTime)) : "dragend" !== a.type || b.flick || this.resetPosition(this.options.bounceTime), a.stopPropagation()
  2236. }
  2237. },
  2238. _initSnap: function() {
  2239. if(this.scrollerWidth = this.itemLength * this.scrollerWidth, this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0), this._super(), this.currentPage.x) this.slideNumber = this._fixedSlideNumber(), this.lastSlideNumber = "undefined" == typeof this.lastSlideNumber ? this.slideNumber : this.lastSlideNumber;
  2240. else {
  2241. var a = this.pages[this.loop ? 1 : 0];
  2242. if(a = a || this.pages[0], !a) return;
  2243. this.currentPage = a[0], this.slideNumber = 0, this.lastSlideNumber = "undefined" == typeof this.lastSlideNumber ? 0 : this.lastSlideNumber
  2244. }
  2245. this.options.startX = this.currentPage.x || 0
  2246. },
  2247. _getSnapX: function(a) {
  2248. return Math.max(-a, this.maxScrollX)
  2249. },
  2250. _getPage: function(a, b) {
  2251. return this.loop ? a > this.itemLength - (b ? 2 : 3) ? (a = 1, time = 0) : (b ? -1 : 0) > a ? (a = this.itemLength - 2, time = 0) : a += 1 : (b || (a > this.itemLength - 1 ? (a = 0, time = 0) : 0 > a && (a = this.itemLength - 1, time = 0)), a = Math.min(Math.max(0, a), this.itemLength - 1)), this.pages[a][0]
  2252. },
  2253. _gotoItem: function(b, c) {
  2254. this.currentPage = this._getPage(b, !0), this.scrollTo(this.currentPage.x, 0, c, this.options.scrollEasing), 0 === c && a.trigger(this.wrapper, "scrollend", this)
  2255. },
  2256. setTranslate: function(a, b) {
  2257. this._super(a, b);
  2258. var c = this.progressBar;
  2259. c && (this.progressBarStyle.webkitTransform = this._getTranslateStr(-a * (this.progressBarWidth / this.wrapperWidth), 0))
  2260. },
  2261. resetPosition: function(a) {
  2262. return a = a || 0, this.x > 0 ? this.x = 0 : this.x < this.maxScrollX && (this.x = this.maxScrollX), this.currentPage = this._nearestSnap(this.x), this.scrollTo(this.currentPage.x, 0, a, this.options.scrollEasing), !0
  2263. },
  2264. gotoItem: function(a, b) {
  2265. this._gotoItem(a, "undefined" == typeof b ? this.options.scrollTime : b)
  2266. },
  2267. nextItem: function() {
  2268. this._gotoItem(this.slideNumber + 1, this.options.scrollTime)
  2269. },
  2270. prevItem: function() {
  2271. this._gotoItem(this.slideNumber - 1, this.options.scrollTime)
  2272. },
  2273. getSlideNumber: function() {
  2274. return this.slideNumber || 0
  2275. },
  2276. _reInit: function() {
  2277. for(var a = this.wrapper.querySelectorAll("." + d), b = 0, c = a.length; c > b; b++)
  2278. if(a[b].parentNode === this.wrapper) {
  2279. this.scroller = a[b];
  2280. break
  2281. }
  2282. this.scrollerStyle = this.scroller && this.scroller.style, this.progressBar && (this.progressBarWidth = this.progressBar.offsetWidth, this.progressBarStyle = this.progressBar.style)
  2283. },
  2284. refresh: function(b) {
  2285. b ? (a.extend(this.options, b), this._super(), this._initTimer()) : this._super()
  2286. },
  2287. destroy: function() {
  2288. this._initEvent(!0), delete a.data[this.wrapper.getAttribute("data-slider")], this.wrapper.setAttribute("data-slider", "")
  2289. }
  2290. });
  2291. a.fn.slider = function(b) {
  2292. var d = null;
  2293. return this.each(function() {
  2294. var e = this;
  2295. if(this.classList.contains(c) || (e = this.querySelector("." + c)), e && e.querySelector(j)) {
  2296. var f = e.getAttribute("data-slider");
  2297. f ? (d = a.data[f], d && b && d.refresh(b)) : (f = ++a.uuid, a.data[f] = d = new l(e, b), e.setAttribute("data-slider", f))
  2298. }
  2299. }), d
  2300. }, a.ready(function() {
  2301. a(".mui-slider").slider(), a(".mui-scroll-wrapper.mui-slider-indicator.mui-segmented-control").scroll({
  2302. scrollY: !1,
  2303. scrollX: !0,
  2304. indicators: !1,
  2305. snap: ".mui-control-item"
  2306. })
  2307. })
  2308. }(mui, window),
  2309. function(a, b) {
  2310. a.os.plus && a.plusReady(function() {
  2311. if(window.__NWin_Enable__ !== !1) {
  2312. var c = "mui-plus-pullrefresh",
  2313. d = "mui-visibility",
  2314. e = "mui-hidden",
  2315. f = "mui-block",
  2316. g = "mui-pull-caption",
  2317. h = "mui-pull-caption-down",
  2318. i = "mui-pull-caption-refresh",
  2319. j = "mui-pull-caption-nomore",
  2320. k = a.Class.extend({
  2321. init: function(a, b) {
  2322. this.element = a, this.options = b, this.wrapper = this.scroller = a, this._init(), this._initPulldownRefreshEvent()
  2323. },
  2324. _init: function() {
  2325. var a = this;
  2326. window.addEventListener("dragup", a), b.addEventListener("plusscrollbottom", a), a.scrollInterval = window.setInterval(function() {
  2327. a.isScroll && !a.loading && window.pageYOffset + window.innerHeight + 10 >= b.documentElement.scrollHeight && (a.isScroll = !1, a.bottomPocket && a.pullupLoading())
  2328. }, 100)
  2329. },
  2330. _initPulldownRefreshEvent: function() {
  2331. var b = this;
  2332. a.plusReady(function() {
  2333. if("circle" == b.options.down.style) b.options.webview = plus.webview.currentWebview(), b.options.webview.setPullToRefresh({
  2334. support: !0,
  2335. color: b.options.down.color || "#2BD009",
  2336. height: b.options.down.height || "50px",
  2337. range: b.options.down.range || "100px",
  2338. style: "circle",
  2339. offset: b.options.down.offset || "0px"
  2340. }, function() {
  2341. b.options.down.callback()
  2342. });
  2343. else if(b.topPocket && b.options.webviewId) {
  2344. var a = plus.webview.getWebviewById(b.options.webviewId);
  2345. if(!a) return;
  2346. b.options.webview = a;
  2347. var c = b.options.down,
  2348. d = c.height;
  2349. a.addEventListener("close", function() {
  2350. var a = b.options.webviewId && b.options.webviewId.replace(/\//g, "_");
  2351. b.element.removeAttribute("data-pullrefresh-plus-" + a)
  2352. }), a.addEventListener("dragBounce", function(d) {
  2353. switch(b.pulldown ? b.pullPocket.classList.add(f) : b._initPulldownRefresh(), d.status) {
  2354. case "beforeChangeOffset":
  2355. b._setCaption(c.contentdown);
  2356. break;
  2357. case "afterChangeOffset":
  2358. b._setCaption(c.contentover);
  2359. break;
  2360. case "dragEndAfterChangeOffset":
  2361. a.evalJS("window.mui&&mui.options.pullRefresh.down.callback()"), b._setCaption(c.contentrefresh)
  2362. }
  2363. }, !1), a.setBounce({
  2364. position: {
  2365. top: 2 * d + "px"
  2366. },
  2367. changeoffset: {
  2368. top: d + "px"
  2369. }
  2370. })
  2371. }
  2372. })
  2373. },
  2374. handleEvent: function(a) {
  2375. var b = this;
  2376. b.stopped || (b.isScroll = !1, ("dragup" === a.type || "plusscrollbottom" === a.type) && (b.isScroll = !0, setTimeout(function() {
  2377. b.isScroll = !1
  2378. }, 1e3)))
  2379. }
  2380. }).extend(a.extend({
  2381. setStopped: function(a) {
  2382. this.stopped = !!a;
  2383. var b = plus.webview.currentWebview();
  2384. if(this.stopped) b.setStyle({
  2385. bounce: "none"
  2386. }), b.setBounce({
  2387. position: {
  2388. top: "none"
  2389. }
  2390. });
  2391. else {
  2392. var c = this.options.down.height;
  2393. b.setStyle({
  2394. bounce: "vertical"
  2395. }), b.setBounce({
  2396. position: {
  2397. top: 2 * c + "px"
  2398. },
  2399. changeoffset: {
  2400. top: c + "px"
  2401. }
  2402. })
  2403. }
  2404. },
  2405. beginPulldown: function() {
  2406. a.plusReady(function() {
  2407. var a = plus.webview.currentWebview(),
  2408. b = this;
  2409. setTimeout(function() {
  2410. "circle" == b.options.down.style ? a.beginPullToRefresh() : a.setBounce({
  2411. offset: {
  2412. top: this.options.down.height + "px"
  2413. }
  2414. })
  2415. }, 15)
  2416. }.bind(this))
  2417. },
  2418. pulldownLoading: function() {
  2419. this.beginPulldown()
  2420. },
  2421. _pulldownLoading: function() {
  2422. var b = this;
  2423. a.plusReady(function() {
  2424. var a = plus.webview.getWebviewById(b.options.webviewId);
  2425. a && a.setBounce({
  2426. offset: {
  2427. top: b.options.down.height + "px"
  2428. }
  2429. })
  2430. })
  2431. },
  2432. endPulldown: function() {
  2433. var a = plus.webview.currentWebview();
  2434. a.parent() && "circle" !== this.options.down.style ? a.parent().evalJS("mui&&mui(document.querySelector('.mui-content')).pullRefresh('" + JSON.stringify({
  2435. webviewId: a.id
  2436. }) + "')._endPulldownToRefresh()") : a.endPullToRefresh()
  2437. },
  2438. endPulldownToRefresh: function() {
  2439. this.endPulldown()
  2440. },
  2441. _endPulldownToRefresh: function() {
  2442. var a = this;
  2443. a.topPocket && a.options.webview && (a.options.webview.endPullToRefresh(), a.loading = !1, a._setCaption(a.options.down.contentdown, !0), setTimeout(function() {
  2444. a.loading || a.topPocket.classList.remove(f)
  2445. }, 350))
  2446. },
  2447. beginPullup: function(a) {
  2448. var b = this;
  2449. b.isLoading || (b.isLoading = !0, b.pulldown !== !1 ? b._initPullupRefresh() : this.pullPocket.classList.add(f), setTimeout(function() {
  2450. b.pullLoading.classList.add(d), b.pullLoading.classList.remove(e), b.pullCaption.innerHTML = "", b.pullCaption.className = g + " " + i, b.pullCaption.innerHTML = b.options.up.contentrefresh, a = a || b.options.up.callback, a && a.call(b)
  2451. }, 300))
  2452. },
  2453. pullupLoading: function(a) {
  2454. this.beginPullup(a)
  2455. },
  2456. endPullup: function(a) {
  2457. var c = this;
  2458. c.pullLoading && (c.pullLoading.classList.remove(d), c.pullLoading.classList.add(e), c.isLoading = !1, a ? (c.finished = !0, c.pullCaption.className = g + " " + j, c.pullCaption.innerHTML = c.options.up.contentnomore, b.removeEventListener("plusscrollbottom", c), window.removeEventListener("dragup", c)) : (c.pullCaption.className = g + " " + h, c.pullCaption.innerHTML = c.options.up.contentdown))
  2459. },
  2460. endPullupToRefresh: function(a) {
  2461. this.endPullup(a)
  2462. },
  2463. disablePullupToRefresh: function() {
  2464. this._initPullupRefresh(), this.bottomPocket.className = "mui-pull-bottom-pocket " + e, window.removeEventListener("dragup", this)
  2465. },
  2466. enablePullupToRefresh: function() {
  2467. this._initPullupRefresh(), this.bottomPocket.classList.remove(e), this.pullCaption.className = g + " " + h, this.pullCaption.innerHTML = this.options.up.contentdown, b.addEventListener("plusscrollbottom", this), window.addEventListener("dragup", this)
  2468. },
  2469. scrollTo: function(b, c, d) {
  2470. a.scrollTo(c, d)
  2471. },
  2472. scrollToBottom: function(c) {
  2473. a.scrollTo(b.documentElement.scrollHeight, c)
  2474. },
  2475. refresh: function(a) {
  2476. a && this.finished && (this.enablePullupToRefresh(), this.finished = !1)
  2477. }
  2478. }, a.PullRefresh));
  2479. a.fn.pullRefresh_native = function(d) {
  2480. var e;
  2481. 0 === this.length ? (e = b.createElement("div"), e.className = "mui-content", b.body.appendChild(e)) : e = this[0];
  2482. var f = d;
  2483. d = d || {}, "string" == typeof d && (d = a.parseJSON(d)), !d.webviewId && (d.webviewId = plus.webview.currentWebview().id || plus.webview.currentWebview().getURL());
  2484. var g = null,
  2485. h = d.webviewId && d.webviewId.replace(/\//g, "_"),
  2486. i = e.getAttribute("data-pullrefresh-plus-" + h);
  2487. return i || "undefined" != typeof f ? (i ? g = a.data[i] : (i = ++a.uuid, e.setAttribute("data-pullrefresh-plus-" + h, i), b.body.classList.add(c), a.data[i] = g = new k(e, d)), d.down && d.down.auto ? g.beginPulldown() : d.up && d.up.auto && g.beginPullup(), g) : !1
  2488. }
  2489. }
  2490. })
  2491. }(mui, document),
  2492. function(a, b, c, d) {
  2493. var e = "mui-off-canvas-left",
  2494. f = "mui-off-canvas-right",
  2495. g = "mui-off-canvas-backdrop",
  2496. h = "mui-off-canvas-wrap",
  2497. i = "mui-slide-in",
  2498. j = "mui-active",
  2499. k = "mui-transitioning",
  2500. l = ".mui-inner-wrap",
  2501. m = a.Class.extend({
  2502. init: function(b, d) {
  2503. this.wrapper = this.element = b, this.scroller = this.wrapper.querySelector(l), this.classList = this.wrapper.classList, this.scroller && (this.options = a.extend(!0, {
  2504. dragThresholdX: 10,
  2505. scale: .8,
  2506. opacity: .1,
  2507. preventDefaultException: {
  2508. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/
  2509. }
  2510. }, d), c.body.classList.add("mui-fullscreen"), this.refresh(), this.initEvent())
  2511. },
  2512. _preventDefaultException: function(a, b) {
  2513. for(var c in b)
  2514. if(b[c].test(a[c])) return !0;
  2515. return !1
  2516. },
  2517. refresh: function(a) {
  2518. this.slideIn = this.classList.contains(i), this.scalable = this.classList.contains("mui-scalable") && !this.slideIn, this.scroller = this.wrapper.querySelector(l), this.offCanvasLefts = this.wrapper.querySelectorAll("." + e), this.offCanvasRights = this.wrapper.querySelectorAll("." + f), a ? a.classList.contains(e) ? this.offCanvasLeft = a : a.classList.contains(f) && (this.offCanvasRight = a) : (this.offCanvasRight = this.wrapper.querySelector("." + f), this.offCanvasLeft = this.wrapper.querySelector("." + e)), this.offCanvasRightWidth = this.offCanvasLeftWidth = 0, this.offCanvasLeftSlideIn = this.offCanvasRightSlideIn = !1, this.offCanvasRight && (this.offCanvasRightWidth = this.offCanvasRight.offsetWidth, this.offCanvasRightSlideIn = this.slideIn && this.offCanvasRight.parentNode === this.wrapper), this.offCanvasLeft && (this.offCanvasLeftWidth = this.offCanvasLeft.offsetWidth, this.offCanvasLeftSlideIn = this.slideIn && this.offCanvasLeft.parentNode === this.wrapper), this.backdrop = this.scroller.querySelector("." + g), this.options.dragThresholdX = this.options.dragThresholdX || 10, this.visible = !1, this.startX = null, this.lastX = null, this.offsetX = null, this.lastTranslateX = null
  2519. },
  2520. handleEvent: function(b) {
  2521. switch(b.type) {
  2522. case a.EVENT_START:
  2523. b.target && !this._preventDefaultException(b.target, this.options.preventDefaultException) && b.preventDefault();
  2524. break;
  2525. case "webkitTransitionEnd":
  2526. b.target === this.scroller && this._dispatchEvent();
  2527. break;
  2528. case "drag":
  2529. var c = b.detail;
  2530. this.startX ? this.lastX = c.center.x : (this.startX = c.center.x, this.lastX = this.startX), !this.isDragging && Math.abs(this.lastX - this.startX) > this.options.dragThresholdX && ("left" === c.direction || "right" === c.direction) && (this.slideIn ? (this.scroller = this.wrapper.querySelector(l), this.classList.contains(j) ? this.offCanvasRight && this.offCanvasRight.classList.contains(j) ? (this.offCanvas = this.offCanvasRight, this.offCanvasWidth = this.offCanvasRightWidth) : (this.offCanvas = this.offCanvasLeft, this.offCanvasWidth = this.offCanvasLeftWidth) : "left" === c.direction && this.offCanvasRight ? (this.offCanvas = this.offCanvasRight, this.offCanvasWidth = this.offCanvasRightWidth) : "right" === c.direction && this.offCanvasLeft ? (this.offCanvas = this.offCanvasLeft, this.offCanvasWidth = this.offCanvasLeftWidth) : this.scroller = null) : this.classList.contains(j) ? "left" === c.direction ? (this.offCanvas = this.offCanvasLeft, this.offCanvasWidth = this.offCanvasLeftWidth) : (this.offCanvas = this.offCanvasRight, this.offCanvasWidth = this.offCanvasRightWidth) : "right" === c.direction ? (this.offCanvas = this.offCanvasLeft, this.offCanvasWidth = this.offCanvasLeftWidth) : (this.offCanvas = this.offCanvasRight, this.offCanvasWidth = this.offCanvasRightWidth), this.offCanvas && this.scroller && (this.startX = this.lastX, this.isDragging = !0, a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = c.direction, this.offCanvas.classList.remove(k), this.scroller.classList.remove(k), this.offsetX = this.getTranslateX(), this._initOffCanvasVisible())), this.isDragging && (this.updateTranslate(this.offsetX + (this.lastX - this.startX)), c.gesture.preventDefault(), b.stopPropagation());
  2531. break;
  2532. case "dragend":
  2533. if(this.isDragging) {
  2534. var c = b.detail,
  2535. d = c.direction;
  2536. this.isDragging = !1, this.offCanvas.classList.add(k), this.scroller.classList.add(k);
  2537. var e = 0,
  2538. f = this.getTranslateX();
  2539. if(this.slideIn) {
  2540. if(e = f >= 0 ? this.offCanvasRightWidth && f / this.offCanvasRightWidth || 0 : this.offCanvasLeftWidth && f / this.offCanvasLeftWidth || 0, "right" === d && 0 >= e && (e >= -.5 || c.swipe) ? this.openPercentage(100) : "right" === d && e > 0 && (e >= .5 || c.swipe) ? this.openPercentage(0) : "right" === d && -.5 >= e ? this.openPercentage(0) : "right" === d && e > 0 && .5 >= e ? this.openPercentage(-100) : "left" === d && e >= 0 && (.5 >= e || c.swipe) ? this.openPercentage(-100) : "left" === d && 0 > e && (-.5 >= e || c.swipe) ? this.openPercentage(0) : "left" === d && e >= .5 ? this.openPercentage(0) : "left" === d && e >= -.5 && 0 > e ? this.openPercentage(100) : this.openPercentage(0), 1 === e || -1 === e || 0 === e) return void this._dispatchEvent()
  2541. } else {
  2542. if(e = f >= 0 ? this.offCanvasLeftWidth && f / this.offCanvasLeftWidth || 0 : this.offCanvasRightWidth && f / this.offCanvasRightWidth || 0, 0 === e) return this.openPercentage(0), void this._dispatchEvent();
  2543. "right" === d && e >= 0 && (e >= .5 || c.swipe) ? this.openPercentage(100) : "right" === d && 0 > e && (e > -.5 || c.swipe) ? this.openPercentage(0) : "right" === d && e > 0 && .5 > e ? this.openPercentage(0) : "right" === d && .5 > e ? this.openPercentage(-100) : "left" === d && 0 >= e && (-.5 >= e || c.swipe) ? this.openPercentage(-100) : "left" === d && e > 0 && (.5 >= e || c.swipe) ? this.openPercentage(0) : "left" === d && 0 > e && e >= -.5 ? this.openPercentage(0) : "left" === d && e > .5 ? this.openPercentage(100) : this.openPercentage(0), (1 === e || -1 === e) && this._dispatchEvent()
  2544. }
  2545. }
  2546. }
  2547. },
  2548. _dispatchEvent: function() {
  2549. this.classList.contains(j) ? a.trigger(this.wrapper, "shown", this) : a.trigger(this.wrapper, "hidden", this)
  2550. },
  2551. _initOffCanvasVisible: function() {
  2552. this.visible || (this.visible = !0, this.offCanvasLeft && (this.offCanvasLeft.style.visibility = "visible"), this.offCanvasRight && (this.offCanvasRight.style.visibility = "visible"))
  2553. },
  2554. initEvent: function() {
  2555. var b = this;
  2556. b.backdrop && b.backdrop.addEventListener("tap", function(a) {
  2557. b.close(), a.detail.gesture.preventDefault()
  2558. }), this.classList.contains("mui-draggable") && (this.wrapper.addEventListener(a.EVENT_START, this), this.wrapper.addEventListener("drag", this), this.wrapper.addEventListener("dragend", this)), this.wrapper.addEventListener("webkitTransitionEnd", this)
  2559. },
  2560. openPercentage: function(a) {
  2561. var b = a / 100;
  2562. this.slideIn ? (this.offCanvasLeft && a >= 0 ? (b = 0 === b ? -1 : 0, this.updateTranslate(this.offCanvasLeftWidth * b), this.offCanvasLeft.classList[0 !== a ? "add" : "remove"](j)) : this.offCanvasRight && 0 >= a && (b = 0 === b ? 1 : 0, this.updateTranslate(this.offCanvasRightWidth * b), this.offCanvasRight.classList[0 !== a ? "add" : "remove"](j)), this.classList[0 !== a ? "add" : "remove"](j)) : (this.offCanvasLeft && a >= 0 ? (this.updateTranslate(this.offCanvasLeftWidth * b), this.offCanvasLeft.classList[0 !== b ? "add" : "remove"](j)) : this.offCanvasRight && 0 >= a && (this.updateTranslate(this.offCanvasRightWidth * b), this.offCanvasRight.classList[0 !== b ? "add" : "remove"](j)), this.classList[0 !== b ? "add" : "remove"](j))
  2563. },
  2564. updateTranslate: function(b) {
  2565. if(b !== this.lastTranslateX) {
  2566. if(this.slideIn) {
  2567. if(this.offCanvas.classList.contains(f)) {
  2568. if(0 > b) return void this.setTranslateX(0);
  2569. if(b > this.offCanvasRightWidth) return void this.setTranslateX(this.offCanvasRightWidth)
  2570. } else {
  2571. if(b > 0) return void this.setTranslateX(0);
  2572. if(b < -this.offCanvasLeftWidth) return void this.setTranslateX(-this.offCanvasLeftWidth)
  2573. }
  2574. this.setTranslateX(b)
  2575. } else {
  2576. if(!this.offCanvasLeft && b > 0 || !this.offCanvasRight && 0 > b) return void this.setTranslateX(0);
  2577. if(this.leftShowing && b > this.offCanvasLeftWidth) return void this.setTranslateX(this.offCanvasLeftWidth);
  2578. if(this.rightShowing && b < -this.offCanvasRightWidth) return void this.setTranslateX(-this.offCanvasRightWidth);
  2579. this.setTranslateX(b), b >= 0 ? (this.leftShowing = !0, this.rightShowing = !1, b > 0 && (this.offCanvasLeft && a.each(this.offCanvasLefts, function(a, b) {
  2580. b === this.offCanvasLeft ? this.offCanvasLeft.style.zIndex = 0 : b.style.zIndex = -1
  2581. }.bind(this)), this.offCanvasRight && (this.offCanvasRight.style.zIndex = -1))) : (this.rightShowing = !0, this.leftShowing = !1, this.offCanvasRight && a.each(this.offCanvasRights, function(a, b) {
  2582. b === this.offCanvasRight ? b.style.zIndex = 0 : b.style.zIndex = -1
  2583. }.bind(this)), this.offCanvasLeft && (this.offCanvasLeft.style.zIndex = -1))
  2584. }
  2585. this.lastTranslateX = b
  2586. }
  2587. },
  2588. setTranslateX: a.animationFrame(function(a) {
  2589. if(this.scroller)
  2590. if(this.scalable && this.offCanvas.parentNode === this.wrapper) {
  2591. var b = Math.abs(a) / this.offCanvasWidth,
  2592. c = 1 - (1 - this.options.scale) * b,
  2593. d = this.options.scale + (1 - this.options.scale) * b,
  2594. f = (1 - (1 - this.options.opacity) * b, this.options.opacity + (1 - this.options.opacity) * b);
  2595. this.offCanvas.classList.contains(e) ? (this.offCanvas.style.webkitTransformOrigin = "-100%", this.scroller.style.webkitTransformOrigin = "left") : (this.offCanvas.style.webkitTransformOrigin = "200%", this.scroller.style.webkitTransformOrigin = "right"), this.offCanvas.style.opacity = f, this.offCanvas.style.webkitTransform = "translate3d(0,0,0) scale(" + d + ")", this.scroller.style.webkitTransform = "translate3d(" + a + "px,0,0) scale(" + c + ")"
  2596. } else this.slideIn ? this.offCanvas.style.webkitTransform = "translate3d(" + a + "px,0,0)" : this.scroller.style.webkitTransform = "translate3d(" + a + "px,0,0)"
  2597. }),
  2598. getTranslateX: function() {
  2599. if(this.offCanvas) {
  2600. var b = this.slideIn ? this.offCanvas : this.scroller,
  2601. c = a.parseTranslateMatrix(a.getStyles(b, "webkitTransform"));
  2602. return c && c.x || 0
  2603. }
  2604. return 0
  2605. },
  2606. isShown: function(a) {
  2607. var b = !1;
  2608. if(this.slideIn) b = "left" === a ? this.classList.contains(j) && this.wrapper.querySelector("." + e + "." + j) : "right" === a ? this.classList.contains(j) && this.wrapper.querySelector("." + f + "." + j) : this.classList.contains(j) && (this.wrapper.querySelector("." + e + "." + j) || this.wrapper.querySelector("." + f + "." + j));
  2609. else {
  2610. var c = this.getTranslateX();
  2611. b = "right" === a ? this.classList.contains(j) && 0 > c : "left" === a ? this.classList.contains(j) && c > 0 : this.classList.contains(j) && 0 !== c
  2612. }
  2613. return b
  2614. },
  2615. close: function() {
  2616. this._initOffCanvasVisible(), this.offCanvas = this.wrapper.querySelector("." + f + "." + j) || this.wrapper.querySelector("." + e + "." + j), this.offCanvasWidth = this.offCanvas.offsetWidth, this.scroller && (this.offCanvas.offsetHeight, this.offCanvas.classList.add(k), this.scroller.classList.add(k), this.openPercentage(0))
  2617. },
  2618. show: function(a) {
  2619. return this._initOffCanvasVisible(), this.isShown(a) ? !1 : (a || (a = this.wrapper.querySelector("." + f) ? "right" : "left"), "right" === a ? (this.offCanvas = this.offCanvasRight, this.offCanvasWidth = this.offCanvasRightWidth) : (this.offCanvas = this.offCanvasLeft, this.offCanvasWidth = this.offCanvasLeftWidth), this.scroller && (this.offCanvas.offsetHeight, this.offCanvas.classList.add(k), this.scroller.classList.add(k), this.openPercentage("left" === a ? 100 : -100)), !0)
  2620. },
  2621. toggle: function(a) {
  2622. var b = a;
  2623. a && a.classList && (b = a.classList.contains(e) ? "left" : "right", this.refresh(a)), this.show(b) || this.close()
  2624. }
  2625. }),
  2626. n = function(a) {
  2627. if(parentNode = a.parentNode, parentNode) {
  2628. if(parentNode.classList.contains(h)) return parentNode;
  2629. if(parentNode = parentNode.parentNode, parentNode.classList.contains(h)) return parentNode
  2630. }
  2631. },
  2632. o = function(b, d) {
  2633. if("A" === d.tagName && d.hash) {
  2634. var e = c.getElementById(d.hash.replace("#", ""));
  2635. if(e) {
  2636. var f = n(e);
  2637. if(f) return a.targets._container = f, e
  2638. }
  2639. }
  2640. return !1
  2641. };
  2642. a.registerTarget({
  2643. name: d,
  2644. index: 60,
  2645. handle: o,
  2646. target: !1,
  2647. isReset: !1,
  2648. isContinue: !0
  2649. }), b.addEventListener("tap", function(b) {
  2650. if(a.targets.offcanvas)
  2651. for(var d = b.target; d && d !== c; d = d.parentNode)
  2652. if("A" === d.tagName && d.hash && d.hash === "#" + a.targets.offcanvas.id) {
  2653. b.detail && b.detail.gesture && b.detail.gesture.preventDefault(), a(a.targets._container).offCanvas().toggle(a.targets.offcanvas), a.targets.offcanvas = a.targets._container = null;
  2654. break
  2655. }
  2656. }), a.fn.offCanvas = function(b) {
  2657. var c = [];
  2658. return this.each(function() {
  2659. var d = null,
  2660. e = this;
  2661. e.classList.contains(h) || (e = n(e));
  2662. var f = e.getAttribute("data-offCanvas");
  2663. f ? d = a.data[f] : (f = ++a.uuid, a.data[f] = d = new m(e, b), e.setAttribute("data-offCanvas", f)), ("show" === b || "close" === b || "toggle" === b) && d.toggle(), c.push(d)
  2664. }), 1 === c.length ? c[0] : c
  2665. }, a.ready(function() {
  2666. a(".mui-off-canvas-wrap").offCanvas()
  2667. })
  2668. }(mui, window, document, "offcanvas"),
  2669. function(a, b) {
  2670. var c = "mui-action",
  2671. d = function(a, b) {
  2672. var d = b.className || "";
  2673. return "string" != typeof d && (d = ""), d && ~d.indexOf(c) ? (b.classList.contains("mui-action-back") && a.preventDefault(), b) : !1
  2674. };
  2675. a.registerTarget({
  2676. name: b,
  2677. index: 50,
  2678. handle: d,
  2679. target: !1,
  2680. isContinue: !0
  2681. })
  2682. }(mui, "action"),
  2683. function(a, b, c, d) {
  2684. var e = "mui-modal",
  2685. f = function(a, b) {
  2686. if("A" === b.tagName && b.hash) {
  2687. var d = c.getElementById(b.hash.replace("#", ""));
  2688. if(d && d.classList.contains(e)) return d
  2689. }
  2690. return !1
  2691. };
  2692. a.registerTarget({
  2693. name: d,
  2694. index: 50,
  2695. handle: f,
  2696. target: !1,
  2697. isReset: !1,
  2698. isContinue: !0
  2699. }), b.addEventListener("tap", function(b) {
  2700. a.targets.modal && (b.detail.gesture.preventDefault(), a.targets.modal.classList.toggle("mui-active"))
  2701. })
  2702. }(mui, window, document, "modal"),
  2703. function(a, b, c, d) {
  2704. var e = "mui-popover",
  2705. f = "mui-popover-arrow",
  2706. g = "mui-popover-action",
  2707. h = "mui-backdrop",
  2708. i = "mui-bar-popover",
  2709. j = "mui-bar-backdrop",
  2710. k = "mui-backdrop-action",
  2711. l = "mui-active",
  2712. m = "mui-bottom",
  2713. n = function(b, d) {
  2714. if("A" === d.tagName && d.hash) {
  2715. if(a.targets._popover = c.getElementById(d.hash.replace("#", "")), a.targets._popover && a.targets._popover.classList.contains(e)) return d;
  2716. a.targets._popover = null
  2717. }
  2718. return !1
  2719. };
  2720. a.registerTarget({
  2721. name: d,
  2722. index: 60,
  2723. handle: n,
  2724. target: !1,
  2725. isReset: !1,
  2726. isContinue: !0
  2727. });
  2728. var o, p = function(b) {
  2729. this.removeEventListener("webkitTransitionEnd", p), this.addEventListener(a.EVENT_MOVE, a.preventDefault), a.trigger(this, "shown", this)
  2730. },
  2731. q = function(b) {
  2732. u(this, "none"), this.removeEventListener("webkitTransitionEnd", q), this.removeEventListener(a.EVENT_MOVE, a.preventDefault), a.trigger(this, "hidden", this)
  2733. },
  2734. r = function() {
  2735. var b = c.createElement("div");
  2736. return b.classList.add(h), b.addEventListener(a.EVENT_MOVE, a.preventDefault), b.addEventListener("tap", function(b) {
  2737. var c = a.targets._popover;
  2738. c && (c.addEventListener("webkitTransitionEnd", q), c.classList.remove(l), s(c))
  2739. }), b
  2740. }(),
  2741. s = function(b) {
  2742. r.setAttribute("style", "opacity:0"), a.targets.popover = a.targets._popover = null, o = a.later(function() {
  2743. !b.classList.contains(l) && r.parentNode && r.parentNode === c.body && c.body.removeChild(r)
  2744. }, 350)
  2745. };
  2746. b.addEventListener("tap", function(b) {
  2747. if(a.targets.popover) {
  2748. for(var d = !1, e = b.target; e && e !== c; e = e.parentNode) e === a.targets.popover && (d = !0);
  2749. d && (b.detail.gesture.preventDefault(), t(a.targets._popover, a.targets.popover))
  2750. }
  2751. });
  2752. var t = function(a, b, d) {
  2753. if(!("show" === d && a.classList.contains(l) || "hide" === d && !a.classList.contains(l))) {
  2754. o && o.cancel(), a.removeEventListener("webkitTransitionEnd", p), a.removeEventListener("webkitTransitionEnd", q), r.classList.remove(j), r.classList.remove(k);
  2755. var e = c.querySelector(".mui-popover.mui-active");
  2756. if(e && (e.addEventListener("webkitTransitionEnd", q), e.classList.remove(l), a === e)) return void s(e);
  2757. var f = !1;
  2758. (a.classList.contains(i) || a.classList.contains(g)) && (a.classList.contains(g) ? (f = !0, r.classList.add(k)) : r.classList.add(j)), u(a, "block"), a.offsetHeight, a.classList.add(l), r.setAttribute("style", ""), c.body.appendChild(r), v(a, b, f), r.classList.add(l), a.addEventListener("webkitTransitionEnd", p)
  2759. }
  2760. },
  2761. u = function(a, b, c, d) {
  2762. var e = a.style;
  2763. "undefined" != typeof b && (e.display = b), "undefined" != typeof c && (e.top = c + "px"), "undefined" != typeof d && (e.left = d + "px")
  2764. },
  2765. v = function(d, e, h) {
  2766. if(d && e) {
  2767. if(h) return void u(d, "block");
  2768. var i = b.innerWidth,
  2769. j = b.innerHeight,
  2770. k = d.offsetWidth,
  2771. l = d.offsetHeight,
  2772. n = e.offsetWidth,
  2773. o = e.offsetHeight,
  2774. p = a.offset(e),
  2775. q = d.querySelector("." + f);
  2776. q || (q = c.createElement("div"), q.className = f, d.appendChild(q));
  2777. var r = q && q.offsetWidth / 2 || 0,
  2778. s = 0,
  2779. t = 0,
  2780. v = 0,
  2781. w = 0,
  2782. x = d.classList.contains(g) ? 0 : 5,
  2783. y = "top";
  2784. l + r < p.top - b.pageYOffset ? s = p.top - l - r : l + r < j - (p.top - b.pageYOffset) - o ? (y = "bottom", s = p.top + o + r) : (y = "middle", s = Math.max((j - l) / 2 + b.pageYOffset, 0), t = Math.max((i - k) / 2 + b.pageXOffset, 0)), "top" === y || "bottom" === y ? (t = n / 2 + p.left - k / 2, v = t, x > t && (t = x), t + k > i && (t = i - k - x), q && ("top" === y ? q.classList.add(m) : q.classList.remove(m), v -= t, w = k / 2 - r / 2 + v, w = Math.max(Math.min(w, k - 2 * r - 6), 6), q.setAttribute("style", "left:" + w + "px"))) : "middle" === y && q.setAttribute("style", "display:none"), u(d, "block", s, t)
  2785. }
  2786. };
  2787. a.createMask = function(b) {
  2788. var d = c.createElement("div");
  2789. d.classList.add(h), d.addEventListener(a.EVENT_MOVE, a.preventDefault), d.addEventListener("tap", function() {
  2790. e.close()
  2791. });
  2792. var e = [d];
  2793. return e._show = !1, e.show = function() {
  2794. return e._show = !0, d.setAttribute("style", "opacity:1"), c.body.appendChild(d), e
  2795. }, e._remove = function() {
  2796. return e._show && (e._show = !1, d.setAttribute("style", "opacity:0"), a.later(function() {
  2797. var a = c.body;
  2798. d.parentNode === a && a.removeChild(d)
  2799. }, 350)), e
  2800. }, e.close = function() {
  2801. b ? b() !== !1 && e._remove() : e._remove()
  2802. }, e
  2803. }, a.fn.popover = function() {
  2804. var b = arguments;
  2805. this.each(function() {
  2806. a.targets._popover = this, ("show" === b[0] || "hide" === b[0] || "toggle" === b[0]) && t(this, b[1], b[0])
  2807. })
  2808. }
  2809. }(mui, window, document, "popover"),
  2810. function(a, b, c, d, e) {
  2811. var f = "mui-control-item",
  2812. g = "mui-segmented-control",
  2813. h = "mui-segmented-control-vertical",
  2814. i = "mui-control-content",
  2815. j = "mui-bar-tab",
  2816. k = "mui-tab-item",
  2817. l = function(a, b) {
  2818. return b.classList && (b.classList.contains(f) || b.classList.contains(k)) ? (b.parentNode && b.parentNode.classList && b.parentNode.classList.contains(h) || a.preventDefault(), b) : !1
  2819. };
  2820. a.registerTarget({
  2821. name: d,
  2822. index: 80,
  2823. handle: l,
  2824. target: !1
  2825. }), b.addEventListener("tap", function(b) {
  2826. var e = a.targets.tab;
  2827. if(e) {
  2828. for(var h, l, m, n = "mui-active", o = "." + n, p = e.parentNode; p && p !== c; p = p.parentNode) {
  2829. if(p.classList.contains(g)) {
  2830. h = p.querySelector(o + "." + f);
  2831. break
  2832. }
  2833. p.classList.contains(j) && (h = p.querySelector(o + "." + k))
  2834. }
  2835. h && h.classList.remove(n);
  2836. var q = e === h;
  2837. if(e && e.classList.add(n), e.hash && (m = c.getElementById(e.hash.replace("#", "")))) {
  2838. if(!m.classList.contains(i)) return void e.classList[q ? "remove" : "add"](n);
  2839. if(!q) {
  2840. var r = m.parentNode;
  2841. l = r.querySelectorAll("." + i + o);
  2842. for(var s = 0; s < l.length; s++) {
  2843. var t = l[s];
  2844. t.parentNode === r && t.classList.remove(n)
  2845. }
  2846. m.classList.add(n);
  2847. for(var u = [], v = r.querySelectorAll("." + i), s = 0; s < v.length; s++) v[s].parentNode === r && u.push(v[s]);
  2848. a.trigger(m, a.eventName("shown", d), {
  2849. tabNumber: Array.prototype.indexOf.call(u, m)
  2850. }), b.detail && b.detail.gesture.preventDefault()
  2851. }
  2852. }
  2853. }
  2854. })
  2855. }(mui, window, document, "tab"),
  2856. function(a, b, c) {
  2857. var d = "mui-switch",
  2858. e = "mui-switch-handle",
  2859. f = "mui-active",
  2860. g = "mui-dragging",
  2861. h = "mui-disabled",
  2862. i = "." + e,
  2863. j = function(a, b) {
  2864. return b.classList && b.classList.contains(d) ? b : !1
  2865. };
  2866. a.registerTarget({
  2867. name: c,
  2868. index: 100,
  2869. handle: j,
  2870. target: !1
  2871. });
  2872. var k = function(a) {
  2873. this.element = a, this.classList = this.element.classList, this.handle = this.element.querySelector(i), this.init(), this.initEvent()
  2874. };
  2875. k.prototype.init = function() {
  2876. this.toggleWidth = this.element.offsetWidth, this.handleWidth = this.handle.offsetWidth, this.handleX = this.toggleWidth - this.handleWidth - 3
  2877. }, k.prototype.initEvent = function() {
  2878. this.element.addEventListener(a.EVENT_START, this), this.element.addEventListener("drag", this), this.element.addEventListener("swiperight", this), this.element.addEventListener(a.EVENT_END, this), this.element.addEventListener(a.EVENT_CANCEL, this)
  2879. }, k.prototype.handleEvent = function(b) {
  2880. if(!this.classList.contains(h)) switch(b.type) {
  2881. case a.EVENT_START:
  2882. this.start(b);
  2883. break;
  2884. case "drag":
  2885. this.drag(b);
  2886. break;
  2887. case "swiperight":
  2888. this.swiperight();
  2889. break;
  2890. case a.EVENT_END:
  2891. case a.EVENT_CANCEL:
  2892. this.end(b)
  2893. }
  2894. }, k.prototype.start = function(a) {
  2895. this.handle.style.webkitTransitionDuration = this.element.style.webkitTransitionDuration = ".2s", this.classList.add(g), (0 === this.toggleWidth || 0 === this.handleWidth) && this.init()
  2896. }, k.prototype.drag = function(a) {
  2897. var b = a.detail;
  2898. this.isDragging || ("left" === b.direction || "right" === b.direction) && (this.isDragging = !0, this.lastChanged = void 0, this.initialState = this.classList.contains(f)), this.isDragging && (this.setTranslateX(b.deltaX), a.stopPropagation(), b.gesture.preventDefault())
  2899. }, k.prototype.swiperight = function(a) {
  2900. this.isDragging && a.stopPropagation()
  2901. }, k.prototype.end = function(b) {
  2902. this.classList.remove(g), this.isDragging ? (this.isDragging = !1, b.stopPropagation(), a.trigger(this.element, "toggle", {
  2903. isActive: this.classList.contains(f)
  2904. })) : this.toggle()
  2905. }, k.prototype.toggle = function(b) {
  2906. var c = this.classList;
  2907. b === !1 ? this.handle.style.webkitTransitionDuration = this.element.style.webkitTransitionDuration = "0s" : this.handle.style.webkitTransitionDuration = this.element.style.webkitTransitionDuration = ".2s", c.contains(f) ? (c.remove(f), this.handle.style.webkitTransform = "translate(0,0)") : (c.add(f), this.handle.style.webkitTransform = "translate(" + this.handleX + "px,0)"), a.trigger(this.element, "toggle", {
  2908. isActive: this.classList.contains(f)
  2909. })
  2910. }, k.prototype.setTranslateX = a.animationFrame(function(a) {
  2911. if(this.isDragging) {
  2912. var b = !1;
  2913. (this.initialState && -a > this.handleX / 2 || !this.initialState && a > this.handleX / 2) && (b = !0), this.lastChanged !== b && (b ? (this.handle.style.webkitTransform = "translate(" + (this.initialState ? 0 : this.handleX) + "px,0)",
  2914. this.classList[this.initialState ? "remove" : "add"](f)) : (this.handle.style.webkitTransform = "translate(" + (this.initialState ? this.handleX : 0) + "px,0)", this.classList[this.initialState ? "add" : "remove"](f)), this.lastChanged = b)
  2915. }
  2916. }), a.fn["switch"] = function(b) {
  2917. var c = [];
  2918. return this.each(function() {
  2919. var b = null,
  2920. d = this.getAttribute("data-switch");
  2921. d ? b = a.data[d] : (d = ++a.uuid, a.data[d] = new k(this), this.setAttribute("data-switch", d)), c.push(b)
  2922. }), c.length > 1 ? c : c[0]
  2923. }, a.ready(function() {
  2924. a("." + d)["switch"]()
  2925. })
  2926. }(mui, window, "toggle"),
  2927. function(a, b, c) {
  2928. function d(a, b) {
  2929. var c = b ? "removeEventListener" : "addEventListener";
  2930. a[c]("drag", F), a[c]("dragend", F), a[c]("swiperight", F), a[c]("swipeleft", F), a[c]("flick", F)
  2931. }
  2932. var e, f, g = "mui-active",
  2933. h = "mui-selected",
  2934. i = "mui-grid-view",
  2935. j = "mui-table-view-radio",
  2936. k = "mui-table-view-cell",
  2937. l = "mui-collapse-content",
  2938. m = "mui-disabled",
  2939. n = "mui-switch",
  2940. o = "mui-btn",
  2941. p = "mui-slider-handle",
  2942. q = "mui-slider-left",
  2943. r = "mui-slider-right",
  2944. s = "mui-transitioning",
  2945. t = "." + p,
  2946. u = "." + q,
  2947. v = "." + r,
  2948. w = "." + h,
  2949. x = "." + o,
  2950. y = .8,
  2951. z = isOpened = openedActions = progress = !1,
  2952. A = sliderActionLeft = sliderActionRight = buttonsLeft = buttonsRight = sliderDirection = sliderRequestAnimationFrame = !1,
  2953. B = translateX = lastTranslateX = sliderActionLeftWidth = sliderActionRightWidth = 0,
  2954. C = function(a) {
  2955. a ? f ? f.classList.add(g) : e && e.classList.add(g) : (B && B.cancel(), f ? f.classList.remove(g) : e && e.classList.remove(g))
  2956. },
  2957. D = function() {
  2958. if(translateX !== lastTranslateX) {
  2959. if(buttonsRight && buttonsRight.length > 0) {
  2960. progress = translateX / sliderActionRightWidth, translateX < -sliderActionRightWidth && (translateX = -sliderActionRightWidth - Math.pow(-translateX - sliderActionRightWidth, y));
  2961. for(var a = 0, b = buttonsRight.length; b > a; a++) {
  2962. var c = buttonsRight[a];
  2963. "undefined" == typeof c._buttonOffset && (c._buttonOffset = c.offsetLeft), buttonOffset = c._buttonOffset, E(c, translateX - buttonOffset * (1 + Math.max(progress, -1)))
  2964. }
  2965. }
  2966. if(buttonsLeft && buttonsLeft.length > 0) {
  2967. progress = translateX / sliderActionLeftWidth, translateX > sliderActionLeftWidth && (translateX = sliderActionLeftWidth + Math.pow(translateX - sliderActionLeftWidth, y));
  2968. for(var a = 0, b = buttonsLeft.length; b > a; a++) {
  2969. var d = buttonsLeft[a];
  2970. "undefined" == typeof d._buttonOffset && (d._buttonOffset = sliderActionLeftWidth - d.offsetLeft - d.offsetWidth), buttonOffset = d._buttonOffset, buttonsLeft.length > 1 && (d.style.zIndex = buttonsLeft.length - a), E(d, translateX + buttonOffset * (1 - Math.min(progress, 1)))
  2971. }
  2972. }
  2973. E(A, translateX), lastTranslateX = translateX
  2974. }
  2975. sliderRequestAnimationFrame = requestAnimationFrame(function() {
  2976. D()
  2977. })
  2978. },
  2979. E = function(a, b) {
  2980. a && (a.style.webkitTransform = "translate(" + b + "px,0)")
  2981. };
  2982. b.addEventListener(a.EVENT_START, function(b) {
  2983. e && C(!1), e = f = !1, z = isOpened = openedActions = !1;
  2984. for(var g = b.target, h = !1; g && g !== c; g = g.parentNode)
  2985. if(g.classList) {
  2986. var p = g.classList;
  2987. if(("INPUT" === g.tagName && "radio" !== g.type && "checkbox" !== g.type || "BUTTON" === g.tagName || p.contains(n) || p.contains(o) || p.contains(m)) && (h = !0), p.contains(l)) break;
  2988. if(p.contains(k)) {
  2989. e = g;
  2990. var q = e.parentNode.querySelector(w);
  2991. if(!e.parentNode.classList.contains(j) && q && q !== e) return a.swipeoutClose(q), void(e = h = !1);
  2992. if(!e.parentNode.classList.contains(i)) {
  2993. var r = e.querySelector("a");
  2994. r && r.parentNode === e && (f = r)
  2995. }
  2996. var s = e.querySelector(t);
  2997. s && (d(e), b.stopPropagation()), h || (s ? (B && B.cancel(), B = a.later(function() {
  2998. C(!0)
  2999. }, 100)) : C(!0));
  3000. break
  3001. }
  3002. }
  3003. }), b.addEventListener(a.EVENT_MOVE, function(a) {
  3004. C(!1)
  3005. });
  3006. var F = {
  3007. handleEvent: function(a) {
  3008. switch(a.type) {
  3009. case "drag":
  3010. this.drag(a);
  3011. break;
  3012. case "dragend":
  3013. this.dragend(a);
  3014. break;
  3015. case "flick":
  3016. this.flick(a);
  3017. break;
  3018. case "swiperight":
  3019. this.swiperight(a);
  3020. break;
  3021. case "swipeleft":
  3022. this.swipeleft(a)
  3023. }
  3024. },
  3025. drag: function(a) {
  3026. if(e) {
  3027. z || (A = sliderActionLeft = sliderActionRight = buttonsLeft = buttonsRight = sliderDirection = sliderRequestAnimationFrame = !1, A = e.querySelector(t), A && (sliderActionLeft = e.querySelector(u), sliderActionRight = e.querySelector(v), sliderActionLeft && (sliderActionLeftWidth = sliderActionLeft.offsetWidth, buttonsLeft = sliderActionLeft.querySelectorAll(x)), sliderActionRight && (sliderActionRightWidth = sliderActionRight.offsetWidth, buttonsRight = sliderActionRight.querySelectorAll(x)), e.classList.remove(s), isOpened = e.classList.contains(h), isOpened && (openedActions = e.querySelector(u + w) ? "left" : "right")));
  3028. var b = a.detail,
  3029. c = b.direction,
  3030. d = b.angle;
  3031. if("left" === c && (d > 150 || -150 > d) ? (buttonsRight || buttonsLeft && isOpened) && (z = !0) : "right" === c && d > -30 && 30 > d && (buttonsLeft || buttonsRight && isOpened) && (z = !0), z) {
  3032. a.stopPropagation(), a.detail.gesture.preventDefault();
  3033. var f = a.detail.deltaX;
  3034. if(isOpened && ("right" === openedActions ? f -= sliderActionRightWidth : f += sliderActionLeftWidth), f > 0 && !buttonsLeft || 0 > f && !buttonsRight) {
  3035. if(!isOpened) return;
  3036. f = 0
  3037. }
  3038. 0 > f ? sliderDirection = "toLeft" : f > 0 ? sliderDirection = "toRight" : sliderDirection || (sliderDirection = "toLeft"), sliderRequestAnimationFrame || D(), translateX = f
  3039. }
  3040. }
  3041. },
  3042. flick: function(a) {
  3043. z && a.stopPropagation()
  3044. },
  3045. swipeleft: function(a) {
  3046. z && a.stopPropagation()
  3047. },
  3048. swiperight: function(a) {
  3049. z && a.stopPropagation()
  3050. },
  3051. dragend: function(b) {
  3052. if(z) {
  3053. b.stopPropagation(), sliderRequestAnimationFrame && (cancelAnimationFrame(sliderRequestAnimationFrame), sliderRequestAnimationFrame = null);
  3054. var c = b.detail;
  3055. z = !1;
  3056. var d = "close",
  3057. f = "toLeft" === sliderDirection ? sliderActionRightWidth : sliderActionLeftWidth,
  3058. g = c.swipe || Math.abs(translateX) > f / 2;
  3059. g && (isOpened ? "left" === c.direction && "right" === openedActions ? d = "open" : "right" === c.direction && "left" === openedActions && (d = "open") : d = "open"), e.classList.add(s);
  3060. var i;
  3061. if("open" === d) {
  3062. var j = "toLeft" === sliderDirection ? -f : f;
  3063. if(E(A, j), i = "toLeft" === sliderDirection ? buttonsRight : buttonsLeft, "undefined" != typeof i) {
  3064. for(var k = null, l = 0; l < i.length; l++) k = i[l], E(k, j);
  3065. k.parentNode.classList.add(h), e.classList.add(h), isOpened || a.trigger(e, "toLeft" === sliderDirection ? "slideleft" : "slideright")
  3066. }
  3067. } else E(A, 0), sliderActionLeft && sliderActionLeft.classList.remove(h), sliderActionRight && sliderActionRight.classList.remove(h), e.classList.remove(h);
  3068. var m;
  3069. if(buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== i)
  3070. for(var l = 0, n = buttonsLeft.length; n > l; l++) {
  3071. var o = buttonsLeft[l];
  3072. m = o._buttonOffset, "undefined" == typeof m && (o._buttonOffset = sliderActionLeftWidth - o.offsetLeft - o.offsetWidth), E(o, m)
  3073. }
  3074. if(buttonsRight && buttonsRight.length > 0 && buttonsRight !== i)
  3075. for(var l = 0, n = buttonsRight.length; n > l; l++) {
  3076. var p = buttonsRight[l];
  3077. m = p._buttonOffset, "undefined" == typeof m && (p._buttonOffset = p.offsetLeft), E(p, -m)
  3078. }
  3079. }
  3080. }
  3081. };
  3082. a.swipeoutOpen = function(b, c) {
  3083. if(b) {
  3084. var d = b.classList;
  3085. if(!d.contains(h)) {
  3086. c || (c = b.querySelector(v) ? "right" : "left");
  3087. var e = b.querySelector(a.classSelector(".slider-" + c));
  3088. if(e) {
  3089. e.classList.add(h), d.add(h), d.remove(s);
  3090. for(var f, g = e.querySelectorAll(x), i = e.offsetWidth, j = "right" === c ? -i : i, k = g.length, l = 0; k > l; l++) f = g[l], "right" === c ? E(f, -f.offsetLeft) : E(f, i - f.offsetWidth - f.offsetLeft);
  3091. d.add(s);
  3092. for(var l = 0; k > l; l++) E(g[l], j);
  3093. E(b.querySelector(t), j)
  3094. }
  3095. }
  3096. }
  3097. }, a.swipeoutClose = function(b) {
  3098. if(b) {
  3099. var c = b.classList;
  3100. if(c.contains(h)) {
  3101. var d = b.querySelector(v + w) ? "right" : "left",
  3102. e = b.querySelector(a.classSelector(".slider-" + d));
  3103. if(e) {
  3104. e.classList.remove(h), c.remove(h), c.add(s);
  3105. var f, g = e.querySelectorAll(x),
  3106. i = e.offsetWidth,
  3107. j = g.length;
  3108. E(b.querySelector(t), 0);
  3109. for(var k = 0; j > k; k++) f = g[k], "right" === d ? E(f, -f.offsetLeft) : E(f, i - f.offsetWidth - f.offsetLeft)
  3110. }
  3111. }
  3112. }
  3113. }, b.addEventListener(a.EVENT_END, function(a) {
  3114. e && (C(!1), A && d(e, !0))
  3115. }), b.addEventListener(a.EVENT_CANCEL, function(a) {
  3116. e && (C(!1), A && d(e, !0))
  3117. });
  3118. var G = function(b) {
  3119. var c = b.target && b.target.type || "";
  3120. if("radio" !== c && "checkbox" !== c) {
  3121. var d = e.classList;
  3122. if(d.contains("mui-radio")) {
  3123. var f = e.querySelector("input[type=radio]");
  3124. f && (f.disabled || f.readOnly || (f.checked = !f.checked, a.trigger(f, "change")))
  3125. } else if(d.contains("mui-checkbox")) {
  3126. var f = e.querySelector("input[type=checkbox]");
  3127. f && (f.disabled || f.readOnly || (f.checked = !f.checked, a.trigger(f, "change")))
  3128. }
  3129. }
  3130. };
  3131. b.addEventListener(a.EVENT_CLICK, function(a) {
  3132. e && e.classList.contains("mui-collapse") && a.preventDefault()
  3133. }), b.addEventListener("doubletap", function(a) {
  3134. e && G(a)
  3135. });
  3136. var H = /^(INPUT|TEXTAREA|BUTTON|SELECT)$/;
  3137. b.addEventListener("tap", function(b) {
  3138. if(e) {
  3139. var c = !1,
  3140. d = e.classList,
  3141. f = e.parentNode;
  3142. if(f && f.classList.contains(j)) {
  3143. if(d.contains(h)) return;
  3144. var i = f.querySelector("li" + w);
  3145. return i && i.classList.remove(h), d.add(h), void a.trigger(e, "selected", {
  3146. el: e
  3147. })
  3148. }
  3149. if(d.contains("mui-collapse") && !e.parentNode.classList.contains("mui-unfold")) {
  3150. if(H.test(b.target.tagName) || b.detail.gesture.preventDefault(), !d.contains(g)) {
  3151. var k = e.parentNode.querySelector(".mui-collapse.mui-active");
  3152. k && k.classList.remove(g), c = !0
  3153. }
  3154. d.toggle(g), c && a.trigger(e, "expand")
  3155. } else G(b)
  3156. }
  3157. })
  3158. }(mui, window, document),
  3159. function(a, b) {
  3160. a.alert = function(c, d, e, f) {
  3161. if(a.os.plus) {
  3162. if("undefined" == typeof c) return;
  3163. "function" == typeof d ? (f = d, d = null, e = "确定") : "function" == typeof e && (f = e, e = null), a.plusReady(function() {
  3164. plus.nativeUI.alert(c, f, d, e)
  3165. })
  3166. } else b.alert(c)
  3167. }
  3168. }(mui, window),
  3169. function(a, b) {
  3170. a.confirm = function(c, d, e, f) {
  3171. if(a.os.plus) {
  3172. if("undefined" == typeof c) return;
  3173. "function" == typeof d ? (f = d, d = null, e = null) : "function" == typeof e && (f = e, e = null), a.plusReady(function() {
  3174. plus.nativeUI.confirm(c, f, d, e)
  3175. })
  3176. } else f(b.confirm(c) ? {
  3177. index: 0
  3178. } : {
  3179. index: 1
  3180. })
  3181. }
  3182. }(mui, window),
  3183. function(a, b) {
  3184. a.prompt = function(c, d, e, f, g) {
  3185. if(a.os.plus) {
  3186. if("undefined" == typeof message) return;
  3187. "function" == typeof d ? (g = d, d = null, e = null, f = null) : "function" == typeof e ? (g = e, e = null, f = null) : "function" == typeof f && (g = f, f = null), a.plusReady(function() {
  3188. plus.nativeUI.prompt(c, g, e, d, f)
  3189. })
  3190. } else {
  3191. var h = b.prompt(c);
  3192. g(h ? {
  3193. index: 0,
  3194. value: h
  3195. } : {
  3196. index: 1,
  3197. value: ""
  3198. })
  3199. }
  3200. }
  3201. }(mui, window),
  3202. function(a, b) {
  3203. var c = "mui-active";
  3204. a.toast = function(b, d) {
  3205. var e = {
  3206. "long": 3500,
  3207. "short": 2e3
  3208. };
  3209. if(d = a.extend({
  3210. duration: "short"
  3211. }, d || {}), !a.os.plus || "div" === d.type) {
  3212. "number" == typeof d.duration ? duration = d.duration > 0 ? d.duration : e["short"] : duration = e[d.duration], duration || (duration = e["short"]);
  3213. var f = document.createElement("div");
  3214. return f.classList.add("mui-toast-container"), f.innerHTML = '<div class="mui-toast-message">' + b + "</div>", f.addEventListener("webkitTransitionEnd", function() {
  3215. f.classList.contains(c) || (f.parentNode.removeChild(f), f = null)
  3216. }), f.addEventListener("click", function() {
  3217. f.parentNode.removeChild(f), f = null
  3218. }), document.body.appendChild(f), f.offsetHeight, f.classList.add(c), setTimeout(function() {
  3219. f && f.classList.remove(c)
  3220. }, duration), {
  3221. isVisible: function() {
  3222. return !!f
  3223. }
  3224. }
  3225. }
  3226. a.plusReady(function() {
  3227. plus.nativeUI.toast(b, {
  3228. verticalAlign: "bottom",
  3229. duration: d.duration
  3230. })
  3231. })
  3232. }
  3233. }(mui, window),
  3234. function(a, b, c) {
  3235. var d = "mui-popup",
  3236. e = "mui-popup-backdrop",
  3237. f = "mui-popup-in",
  3238. g = "mui-popup-out",
  3239. h = "mui-popup-inner",
  3240. i = "mui-popup-title",
  3241. j = "mui-popup-text",
  3242. k = "mui-popup-input",
  3243. l = "mui-popup-buttons",
  3244. m = "mui-popup-button",
  3245. n = "mui-popup-button-bold",
  3246. e = "mui-popup-backdrop",
  3247. o = "mui-active",
  3248. p = [],
  3249. q = function() {
  3250. var b = c.createElement("div");
  3251. return b.classList.add(e), b.addEventListener(a.EVENT_MOVE, a.preventDefault), b.addEventListener("webkitTransitionEnd", function() {
  3252. this.classList.contains(o) || b.parentNode && b.parentNode.removeChild(b)
  3253. }), b
  3254. }(),
  3255. r = function(a) {
  3256. return '<div class="' + k + '"><input type="text" autofocus placeholder="' + (a || "") + '"/></div>'
  3257. },
  3258. s = function(a, b, c) {
  3259. return '<div class="' + h + '"><div class="' + i + '">' + b + '</div><div class="' + j + '">' + a.replace(/\r\n/g, "<br/>").replace(/\n/g, "<br/>") + "</div>" + (c || "") + "</div>"
  3260. },
  3261. t = function(a) {
  3262. for(var b = a.length, c = [], d = 0; b > d; d++) c.push('<span class="' + m + (d === b - 1 ? " " + n : "") + '">' + a[d] + "</span>");
  3263. return '<div class="' + l + '">' + c.join("") + "</div>"
  3264. },
  3265. u = function(b, e) {
  3266. var h = c.createElement("div");
  3267. h.className = d, h.innerHTML = b;
  3268. var i = function() {
  3269. h.parentNode && h.parentNode.removeChild(h), h = null
  3270. };
  3271. h.addEventListener(a.EVENT_MOVE, a.preventDefault), h.addEventListener("webkitTransitionEnd", function(a) {
  3272. h && a.target === h && h.classList.contains(g) && i()
  3273. }), h.style.display = "block", c.body.appendChild(h), h.offsetHeight, h.classList.add(f), q.classList.contains(o) || (q.style.display = "block", c.body.appendChild(q), q.offsetHeight, q.classList.add(o));
  3274. var j = a.qsa("." + m, h),
  3275. l = h.querySelector("." + k + " input"),
  3276. n = {
  3277. element: h,
  3278. close: function(a, b) {
  3279. if(h) {
  3280. var c = e && e({
  3281. index: a || 0,
  3282. value: l && l.value || ""
  3283. });
  3284. if(c === !1) return;
  3285. b !== !1 ? (h.classList.remove(f), h.classList.add(g)) : i(), p.pop(), p.length ? p[p.length - 1].show(b) : q.classList.remove(o)
  3286. }
  3287. }
  3288. },
  3289. r = function(a) {
  3290. n.close(j.indexOf(a.target))
  3291. };
  3292. return a(h).on("tap", "." + m, r), p.length && p[p.length - 1].hide(), p.push({
  3293. close: n.close,
  3294. show: function(a) {
  3295. h.style.display = "block", h.offsetHeight, h.classList.add(f)
  3296. },
  3297. hide: function() {
  3298. h.style.display = "none", h.classList.remove(f)
  3299. }
  3300. }), n
  3301. },
  3302. v = function(b, c, d, e, f) {
  3303. return "undefined" != typeof b ? ("function" == typeof c ? (e = c, f = d, c = null, d = null) : "function" == typeof d && (f = e, e = d, d = null), a.os.plus && "div" !== f ? plus.nativeUI.alert(b, e, c || "提示", d || "确定") : u(s(b, c || "提示") + t([d || "确定"]), e)) : void 0
  3304. },
  3305. w = function(b, c, d, e, f) {
  3306. return "undefined" != typeof b ? ("function" == typeof c ? (e = c, f = d, c = null, d = null) : "function" == typeof d && (f = e, e = d, d = null), a.os.plus && "div" !== f ? plus.nativeUI.confirm(b, e, c, d || ["取消", "确认"]) : u(s(b, c || "提示") + t(d || ["取消", "确认"]), e)) : void 0
  3307. },
  3308. x = function(b, c, d, e, f, g) {
  3309. return "undefined" != typeof b ? ("function" == typeof c ? (f = c, g = d, c = null, d = null, e = null) : "function" == typeof d ? (f = d, g = e, d = null, e = null) : "function" == typeof e && (g = f, f = e, e = null), a.os.plus && "div" !== g ? plus.nativeUI.prompt(b, f, d || "提示", c, e || ["取消", "确认"]) : u(s(b, d || "提示", r(c)) + t(e || ["取消", "确认"]), f)) : void 0
  3310. },
  3311. y = function() {
  3312. return p.length ? (p[p.length - 1].close(), !0) : !1
  3313. },
  3314. z = function() {
  3315. for(; p.length;) p[p.length - 1].close()
  3316. };
  3317. a.closePopup = y, a.closePopups = z, a.alert = v, a.confirm = w, a.prompt = x
  3318. }(mui, window, document),
  3319. function(a, b) {
  3320. var c = "mui-progressbar",
  3321. d = "mui-progressbar-in",
  3322. e = "mui-progressbar-out",
  3323. f = "mui-progressbar-infinite",
  3324. g = ".mui-progressbar",
  3325. h = function(b) {
  3326. if(b = a(b || "body"), 0 !== b.length) {
  3327. if(b = b[0], b.classList.contains(c)) return b;
  3328. var d = b.querySelectorAll(g);
  3329. if(d)
  3330. for(var e = 0, f = d.length; f > e; e++) {
  3331. var h = d[e];
  3332. if(h.parentNode === b) return h
  3333. }
  3334. }
  3335. },
  3336. i = function(h, i, j) {
  3337. if("number" == typeof h && (j = i, i = h, h = "body"), h = a(h || "body"), 0 !== h.length) {
  3338. h = h[0];
  3339. var l;
  3340. if(h.classList.contains(c)) l = h;
  3341. else {
  3342. var m = h.querySelectorAll(g + ":not(." + e + ")");
  3343. if(m)
  3344. for(var n = 0, o = m.length; o > n; n++) {
  3345. var p = m[n];
  3346. if(p.parentNode === h) {
  3347. l = p;
  3348. break
  3349. }
  3350. }
  3351. l ? l.classList.add(d) : (l = b.createElement("span"), l.className = c + " " + d + ("undefined" != typeof i ? "" : " " + f) + (j ? " " + c + "-" + j : ""), "undefined" != typeof i && (l.innerHTML = "<span></span>"), h.appendChild(l))
  3352. }
  3353. return i && k(h, i), l
  3354. }
  3355. },
  3356. j = function(a) {
  3357. var b = h(a);
  3358. if(b) {
  3359. var c = b.classList;
  3360. c.contains(d) && !c.contains(e) && (c.remove(d), c.add(e), b.addEventListener("webkitAnimationEnd", function() {
  3361. b.parentNode && b.parentNode.removeChild(b), b = null
  3362. }))
  3363. }
  3364. },
  3365. k = function(a, b, c) {
  3366. "number" == typeof a && (c = b, b = a, a = !1);
  3367. var d = h(a);
  3368. if(d && !d.classList.contains(f)) {
  3369. b && (b = Math.min(Math.max(b, 0), 100)), d.offsetHeight;
  3370. var e = d.querySelector("span");
  3371. if(e) {
  3372. var g = e.style;
  3373. g.webkitTransform = "translate3d(" + (-100 + b) + "%,0,0)", "undefined" != typeof c ? g.webkitTransitionDuration = c + "ms" : g.webkitTransitionDuration = ""
  3374. }
  3375. return d
  3376. }
  3377. };
  3378. a.fn.progressbar = function(a) {
  3379. var b = [];
  3380. return a = a || {}, this.each(function() {
  3381. var c = this,
  3382. d = c.mui_plugin_progressbar;
  3383. d ? a && d.setOptions(a) : c.mui_plugin_progressbar = d = {
  3384. options: a,
  3385. setOptions: function(a) {
  3386. this.options = a
  3387. },
  3388. show: function() {
  3389. return i(c, this.options.progress, this.options.color)
  3390. },
  3391. setProgress: function(a) {
  3392. return k(c, a)
  3393. },
  3394. hide: function() {
  3395. return j(c)
  3396. }
  3397. }, b.push(d)
  3398. }), 1 === b.length ? b[0] : b
  3399. }
  3400. }(mui, document),
  3401. function(a, b, c) {
  3402. var d = "mui-icon",
  3403. e = "mui-icon-clear",
  3404. f = "mui-icon-speech",
  3405. g = "mui-icon-search",
  3406. h = "mui-icon-eye",
  3407. i = "mui-input-row",
  3408. j = "mui-placeholder",
  3409. k = "mui-tooltip",
  3410. l = "mui-hidden",
  3411. m = "mui-focusin",
  3412. n = "." + e,
  3413. o = "." + f,
  3414. p = "." + h,
  3415. q = "." + j,
  3416. r = "." + k,
  3417. s = function(a) {
  3418. for(; a && a !== c; a = a.parentNode)
  3419. if(a.classList && a.classList.contains(i)) return a;
  3420. return null
  3421. },
  3422. t = function(a, b) {
  3423. this.element = a, this.options = b || {
  3424. actions: "clear"
  3425. }, ~this.options.actions.indexOf("slider") ? (this.sliderActionClass = k + " " + l, this.sliderActionSelector = r) : (~this.options.actions.indexOf("clear") && (this.clearActionClass = d + " " + e + " " + l, this.clearActionSelector = n), ~this.options.actions.indexOf("speech") && (this.speechActionClass = d + " " + f, this.speechActionSelector = o), ~this.options.actions.indexOf("search") && (this.searchActionClass = j, this.searchActionSelector = q), ~this.options.actions.indexOf("password") && (this.passwordActionClass = d + " " + h, this.passwordActionSelector = p)), this.init()
  3426. };
  3427. t.prototype.init = function() {
  3428. this.initAction(), this.initElementEvent()
  3429. }, t.prototype.initAction = function() {
  3430. var b = this,
  3431. c = b.element.parentNode;
  3432. c && (b.sliderActionClass ? b.sliderAction = b.createAction(c, b.sliderActionClass, b.sliderActionSelector) : (b.searchActionClass && (b.searchAction = b.createAction(c, b.searchActionClass, b.searchActionSelector), b.searchAction.addEventListener("tap", function(c) {
  3433. a.focus(b.element), c.stopPropagation()
  3434. })), b.speechActionClass && (b.speechAction = b.createAction(c, b.speechActionClass, b.speechActionSelector), b.speechAction.addEventListener("click", a.stopPropagation), b.speechAction.addEventListener("tap", function(a) {
  3435. b.speechActionClick(a)
  3436. })), b.clearActionClass && (b.clearAction = b.createAction(c, b.clearActionClass, b.clearActionSelector), b.clearAction.addEventListener("tap", function(a) {
  3437. b.clearActionClick(a)
  3438. })), b.passwordActionClass && (b.passwordAction = b.createAction(c, b.passwordActionClass, b.passwordActionSelector), b.passwordAction.addEventListener("tap", function(a) {
  3439. b.passwordActionClick(a)
  3440. }))))
  3441. }, t.prototype.createAction = function(a, b, e) {
  3442. var f = a.querySelector(e);
  3443. if(!f) {
  3444. var f = c.createElement("span");
  3445. f.className = b, b === this.searchActionClass && (f.innerHTML = '<span class="' + d + " " + g + '"></span><span>' + this.element.getAttribute("placeholder") + "</span>", this.element.setAttribute("placeholder", ""), this.element.value.trim() && a.classList.add("mui-active")), a.insertBefore(f, this.element.nextSibling)
  3446. }
  3447. return f
  3448. }, t.prototype.initElementEvent = function() {
  3449. var b = this.element;
  3450. if(this.sliderActionClass) {
  3451. var c = this.sliderAction,
  3452. d = null,
  3453. e = function() {
  3454. c.classList.remove(l);
  3455. var a = b.offsetLeft,
  3456. e = b.offsetWidth - 28,
  3457. f = c.offsetWidth,
  3458. g = Math.abs(b.max - b.min),
  3459. h = e / g * Math.abs(b.value - b.min);
  3460. c.style.left = 14 + a + h - f / 2 + "px", c.innerText = b.value, d && clearTimeout(d), d = setTimeout(function() {
  3461. c.classList.add(l)
  3462. }, 1e3)
  3463. };
  3464. b.addEventListener("input", e), b.addEventListener("tap", e), b.addEventListener(a.EVENT_MOVE, function(a) {
  3465. a.stopPropagation()
  3466. })
  3467. } else {
  3468. if(this.clearActionClass) {
  3469. var f = this.clearAction;
  3470. if(!f) return;
  3471. a.each(["keyup", "change", "input", "focus", "cut", "paste"], function(a, c) {
  3472. ! function(a) {
  3473. b.addEventListener(a, function() {
  3474. f.classList[b.value.trim() ? "remove" : "add"](l)
  3475. })
  3476. }(c)
  3477. }), b.addEventListener("blur", function() {
  3478. f.classList.add(l)
  3479. })
  3480. }
  3481. this.searchActionClass && (b.addEventListener("focus", function() {
  3482. b.parentNode.classList.add("mui-active")
  3483. }), b.addEventListener("blur", function() {
  3484. b.value.trim() || b.parentNode.classList.remove("mui-active")
  3485. }))
  3486. }
  3487. }, t.prototype.setPlaceholder = function(a) {
  3488. if(this.searchActionClass) {
  3489. var b = this.element.parentNode.querySelector(q);
  3490. b && (b.getElementsByTagName("span")[1].innerText = a)
  3491. } else this.element.setAttribute("placeholder", a)
  3492. }, t.prototype.passwordActionClick = function(a) {
  3493. "text" === this.element.type ? this.element.type = "password" : this.element.type = "text", this.passwordAction.classList.toggle("mui-active"), a.preventDefault()
  3494. }, t.prototype.clearActionClick = function(b) {
  3495. var c = this;
  3496. c.element.value = "", a.focus(c.element), c.clearAction.classList.add(l), b.preventDefault()
  3497. }, t.prototype.speechActionClick = function(d) {
  3498. if(b.plus) {
  3499. var e = this,
  3500. f = e.element.value;
  3501. e.element.value = "", c.body.classList.add(m), plus.speech.startRecognize({
  3502. engine: "iFly"
  3503. }, function(b) {
  3504. e.element.value += b, a.focus(e.element), plus.speech.stopRecognize(), a.trigger(e.element, "recognized", {
  3505. value: e.element.value
  3506. }), f !== e.element.value && (a.trigger(e.element, "change"), a.trigger(e.element, "input"))
  3507. }, function(a) {
  3508. c.body.classList.remove(m)
  3509. })
  3510. } else alert("only for 5+");
  3511. d.preventDefault()
  3512. }, a.fn.input = function(b) {
  3513. var c = [];
  3514. return this.each(function() {
  3515. var b = null,
  3516. d = [],
  3517. e = s(this.parentNode);
  3518. if("range" === this.type && e.classList.contains("mui-input-range")) d.push("slider");
  3519. else {
  3520. var f = this.classList;
  3521. f.contains("mui-input-clear") && d.push("clear"), a.os.android && a.os.stream || !f.contains("mui-input-speech") || d.push("speech"), f.contains("mui-input-password") && d.push("password"), "search" === this.type && e.classList.contains("mui-search") && d.push("search")
  3522. }
  3523. var g = this.getAttribute("data-input-" + d[0]);
  3524. if(g) b = a.data[g];
  3525. else {
  3526. g = ++a.uuid, b = a.data[g] = new t(this, {
  3527. actions: d.join(",")
  3528. });
  3529. for(var h = 0, i = d.length; i > h; h++) this.setAttribute("data-input-" + d[h], g)
  3530. }
  3531. c.push(b)
  3532. }), 1 === c.length ? c[0] : c
  3533. }, a.ready(function() {
  3534. a(".mui-input-row input").input()
  3535. })
  3536. }(mui, window, document),
  3537. function(a, b) {
  3538. var c = "mui-active",
  3539. d = /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/,
  3540. e = function(a) {
  3541. var b = a.match(d);
  3542. return b && 5 === b.length ? [b[1], b[2], b[3], b[4]] : []
  3543. },
  3544. f = function(c, d) {
  3545. if(this.element = c, this.options = a.extend({
  3546. top: 0,
  3547. offset: 150,
  3548. duration: 16,
  3549. scrollby: b
  3550. }, d || {}), this.scrollByElem = this.options.scrollby || b, !this.scrollByElem) throw new Error("监听滚动的元素不存在");
  3551. this.isNativeScroll = !1, this.scrollByElem === b ? this.isNativeScroll = !0 : ~this.scrollByElem.className.indexOf("mui-scroll-wrapper") || (this.isNativeScroll = !0), this._style = this.element.style, this._bgColor = this._style.backgroundColor;
  3552. var f = e(mui.getStyles(this.element, "backgroundColor"));
  3553. if(!f.length) throw new Error("元素背景颜色必须为RGBA");
  3554. this._R = f[0], this._G = f[1], this._B = f[2], this._A = parseFloat(f[3]), this.lastOpacity = this._A, this._bufferFn = a.buffer(this.handleScroll, this.options.duration, this), this.initEvent()
  3555. };
  3556. f.prototype.initEvent = function() {
  3557. this.scrollByElem.addEventListener("scroll", this._bufferFn), this.isNativeScroll && this.scrollByElem.addEventListener(a.EVENT_MOVE, this._bufferFn)
  3558. }, f.prototype.handleScroll = function(d) {
  3559. var e = b.scrollY;
  3560. !this.isNativeScroll && d && d.detail && (e = -d.detail.y);
  3561. var f = (e - this.options.top) / this.options.offset + this._A;
  3562. f = Math.min(Math.max(this._A, f), 1), this._style.backgroundColor = "rgba(" + this._R + "," + this._G + "," + this._B + "," + f + ")", f > this._A ? this.element.classList.add(c) : this.element.classList.remove(c), this.lastOpacity !== f && (a.trigger(this.element, "alpha", {
  3563. alpha: f
  3564. }), this.lastOpacity = f)
  3565. }, f.prototype.destory = function() {
  3566. this.scrollByElem.removeEventListener("scroll", this._bufferFn), this.scrollByElem.removeEventListener(a.EVENT_MOVE, this._bufferFn), this.element.style.backgroundColor = this._bgColor, this.element.mui_plugin_transparent = null
  3567. }, a.fn.transparent = function(a) {
  3568. a = a || {};
  3569. var c = [];
  3570. return this.each(function() {
  3571. var d = this.mui_plugin_transparent;
  3572. if(!d) {
  3573. var e = this.getAttribute("data-top"),
  3574. g = this.getAttribute("data-offset"),
  3575. h = this.getAttribute("data-duration"),
  3576. i = this.getAttribute("data-scrollby");
  3577. null !== e && "undefined" == typeof a.top && (a.top = e), null !== g && "undefined" == typeof a.offset && (a.offset = g), null !== h && "undefined" == typeof a.duration && (a.duration = h), null !== i && "undefined" == typeof a.scrollby && (a.scrollby = document.querySelector(i) || b), d = this.mui_plugin_transparent = new f(this, a)
  3578. }
  3579. c.push(d)
  3580. }), 1 === c.length ? c[0] : c
  3581. }, a.ready(function() {
  3582. a(".mui-bar-transparent").transparent()
  3583. })
  3584. }(mui, window),
  3585. function(a) {
  3586. var b = "ontouchstart" in document,
  3587. c = b ? "tap" : "click",
  3588. d = "change",
  3589. e = "mui-numbox",
  3590. f = ".mui-btn-numbox-plus,.mui-numbox-btn-plus",
  3591. g = ".mui-btn-numbox-minus,.mui-numbox-btn-minus",
  3592. h = ".mui-input-numbox,.mui-numbox-input",
  3593. i = a.Numbox = a.Class.extend({
  3594. init: function(b, c) {
  3595. var d = this;
  3596. if(!b) throw "构造 numbox 时缺少容器元素";
  3597. d.holder = b, c = c || {}, c.step = parseInt(c.step || 1), d.options = c, d.input = a.qsa(h, d.holder)[0], d.plus = a.qsa(f, d.holder)[0], d.minus = a.qsa(g, d.holder)[0], d.checkValue(), d.initEvent()
  3598. },
  3599. initEvent: function() {
  3600. var b = this;
  3601. b.plus.addEventListener(c, function(c) {
  3602. var e = parseInt(b.input.value) + b.options.step;
  3603. b.input.value = e.toString(), a.trigger(b.input, d, null)
  3604. }), b.minus.addEventListener(c, function(c) {
  3605. var e = parseInt(b.input.value) - b.options.step;
  3606. b.input.value = e.toString(), a.trigger(b.input, d, null)
  3607. }), b.input.addEventListener(d, function(c) {
  3608. b.checkValue();
  3609. var e = parseInt(b.input.value);
  3610. a.trigger(b.holder, d, {
  3611. value: e
  3612. })
  3613. })
  3614. },
  3615. getValue: function() {
  3616. var a = this;
  3617. return parseInt(a.input.value)
  3618. },
  3619. checkValue: function() {
  3620. var a = this,
  3621. b = a.input.value;
  3622. if(null == b || "" == b || isNaN(b)) a.input.value = a.options.min || 0, a.minus.disabled = null != a.options.min;
  3623. else {
  3624. var b = parseInt(b);
  3625. null != a.options.max && !isNaN(a.options.max) && b >= parseInt(a.options.max) ? (b = a.options.max, a.plus.disabled = !0) : a.plus.disabled = !1, null != a.options.min && !isNaN(a.options.min) && b <= parseInt(a.options.min) ? (b = a.options.min, a.minus.disabled = !0) : a.minus.disabled = !1, a.input.value = b
  3626. }
  3627. },
  3628. setOption: function(a, b) {
  3629. var c = this;
  3630. c.options[a] = b
  3631. },
  3632. setValue: function(a) {
  3633. this.input.value = a, this.checkValue()
  3634. }
  3635. });
  3636. a.fn.numbox = function(a) {
  3637. return this.each(function(a, b) {
  3638. if(!b.numbox)
  3639. if(d) b.numbox = new i(b, d);
  3640. else {
  3641. var c = b.getAttribute("data-numbox-options"),
  3642. d = c ? JSON.parse(c) : {};
  3643. d.step = b.getAttribute("data-numbox-step") || d.step, d.min = b.getAttribute("data-numbox-min") || d.min, d.max = b.getAttribute("data-numbox-max") || d.max, b.numbox = new i(b, d)
  3644. }
  3645. }), this[0] ? this[0].numbox : null
  3646. }, a.ready(function() {
  3647. a("." + e).numbox()
  3648. })
  3649. }(mui),
  3650. function(a, b, c) {
  3651. var d = "mui-disabled",
  3652. e = "reset",
  3653. f = "loading",
  3654. g = {
  3655. loadingText: "Loading...",
  3656. loadingIcon: "mui-spinner mui-spinner-white",
  3657. loadingIconPosition: "left"
  3658. },
  3659. h = function(b, c) {
  3660. this.element = b, this.options = a.extend({}, g, c), this.options.loadingText || (this.options.loadingText = g.loadingText), null === this.options.loadingIcon && (this.options.loadingIcon = "mui-spinner", "rgb(255, 255, 255)" === a.getStyles(this.element, "color") && (this.options.loadingIcon += " mui-spinner-white")), this.isInput = "INPUT" === this.element.tagName, this.resetHTML = this.isInput ? this.element.value : this.element.innerHTML, this.state = ""
  3661. };
  3662. h.prototype.loading = function() {
  3663. this.setState(f)
  3664. }, h.prototype.reset = function() {
  3665. this.setState(e)
  3666. }, h.prototype.setState = function(a) {
  3667. if(this.state === a) return !1;
  3668. if(this.state = a, a === e) this.element.disabled = !1, this.element.classList.remove(d), this.setHtml(this.resetHTML);
  3669. else if(a === f) {
  3670. this.element.disabled = !0, this.element.classList.add(d);
  3671. var b = this.isInput ? this.options.loadingText : "<span>" + this.options.loadingText + "</span>";
  3672. this.options.loadingIcon && !this.isInput && ("right" === this.options.loadingIconPosition ? b += '&nbsp;<span class="' + this.options.loadingIcon + '"></span>' : b = '<span class="' + this.options.loadingIcon + '"></span>&nbsp;' + b), this.setHtml(b)
  3673. }
  3674. }, h.prototype.setHtml = function(a) {
  3675. this.isInput ? this.element.value = a : this.element.innerHTML = a
  3676. }, a.fn.button = function(a) {
  3677. var b = [];
  3678. return this.each(function() {
  3679. var c = this.mui_plugin_button;
  3680. if(!c) {
  3681. var d = this.getAttribute("data-loading-text"),
  3682. g = this.getAttribute("data-loading-icon"),
  3683. i = this.getAttribute("data-loading-icon-position");
  3684. this.mui_plugin_button = c = new h(this, {
  3685. loadingText: d,
  3686. loadingIcon: g,
  3687. loadingIconPosition: i
  3688. })
  3689. }(a === f || a === e) && c.setState(a), b.push(c)
  3690. }), 1 === b.length ? b[0] : b
  3691. }
  3692. }(mui, window, document);