Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
c76be454
Commit
c76be454
authored
Sep 19, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充preload函数
parent
39192bcc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
287 additions
and
236 deletions
+287
-236
dist/js/mui.js
dist/js/mui.js
+176
-127
dist/js/mui.min.js
dist/js/mui.min.js
+2
-2
examples/hello-mui/examples/offcanvas-left-plus-main.html
examples/hello-mui/examples/offcanvas-left-plus-main.html
+5
-4
examples/hello-mui/examples/offcanvas-right-plus-main.html
examples/hello-mui/examples/offcanvas-right-plus-main.html
+4
-2
examples/hello-mui/js/mui.min.js
examples/hello-mui/js/mui.min.js
+2
-2
examples/hello-mui/list.html
examples/hello-mui/list.html
+98
-99
No files found.
dist/js/mui.js
View file @
c76be454
...
...
@@ -204,8 +204,8 @@ var mui = (function(document, undefined) {
};
return
$
;
})(
document
);
window
.
mui
=
mui
;
'
$
'
in
window
||
(
window
.
$
=
mui
);
//window.mui = mui;
//
'$' in window || (window.$ = mui);
/**
* mui target(action>popover>modal>tab>toggle)
*/
...
...
@@ -855,37 +855,42 @@ window.mui = mui;
* @param {type} $
* @returns {undefined}
*/
(
function
(
$
)
{
function
detect
(
ua
)
{
this
.
os
=
{};
var
funcs
=
[
function
()
{
//android
var
android
=
ua
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
if
(
android
)
{
this
.
os
.
android
=
true
;
this
.
os
.
version
=
android
[
2
];
}
return
this
.
os
.
android
===
true
;
},
function
()
{
//ios
var
iphone
=
ua
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
iphone
)
{
//iphone
this
.
os
.
ios
=
this
.
os
.
iphone
=
true
;
this
.
os
.
version
=
iphone
[
2
].
replace
(
/_/g
,
'
.
'
);
}
else
{
var
ipad
=
ua
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
if
(
ipad
)
{
//ipad
this
.
os
.
ios
=
this
.
os
.
ipad
=
true
;
this
.
os
.
version
=
ipad
[
2
].
replace
(
/_/g
,
'
.
'
);
}
}
return
this
.
os
.
ios
===
true
;
}];
[].
every
.
call
(
funcs
,
function
(
func
)
{
return
!
func
.
call
(
$
);
});
}
detect
.
call
(
$
,
navigator
.
userAgent
);
})(
mui
);
(
function
(
$
,
window
)
{
function
detect
(
ua
)
{
this
.
os
=
{};
var
funcs
=
[
function
()
{
//android
var
android
=
ua
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
if
(
android
)
{
this
.
os
.
android
=
true
;
this
.
os
.
version
=
android
[
2
];
this
.
os
.
isBadAndroid
=
!
(
/Chrome
\/\d
/
.
test
(
window
.
navigator
.
appVersion
));
}
return
this
.
os
.
android
===
true
;
},
function
()
{
//ios
var
iphone
=
ua
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
iphone
)
{
//iphone
this
.
os
.
ios
=
this
.
os
.
iphone
=
true
;
this
.
os
.
version
=
iphone
[
2
].
replace
(
/_/g
,
'
.
'
);
}
else
{
var
ipad
=
ua
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
if
(
ipad
)
{
//ipad
this
.
os
.
ios
=
this
.
os
.
ipad
=
true
;
this
.
os
.
version
=
ipad
[
2
].
replace
(
/_/g
,
'
.
'
);
}
}
return
this
.
os
.
ios
===
true
;
}
];
[].
every
.
call
(
funcs
,
function
(
func
)
{
return
!
func
.
call
(
$
);
});
}
detect
.
call
(
$
,
navigator
.
userAgent
);
})(
mui
,
window
);
/**
* $.os.plus
* @param {type} $
...
...
@@ -1231,6 +1236,17 @@ window.mui = mui;
return
webview
;
};
/**
* 预加载
*/
$
.
preload
=
function
(
options
){
//调用预加载函数,不管是否传递preload参数,强制变为true
if
(
!
options
.
preload
){
options
.
preload
=
true
;
}
$
.
createWindow
(
options
);
}
/**
*关闭当前webview打开的所有webview;
*/
...
...
@@ -1344,38 +1360,41 @@ window.mui = mui;
* @returns {undefined}
*/
(
function
(
$
)
{
$
.
init
.
add
(
function
()
{
var
options
=
$
.
options
;
var
pullRefreshOptions
=
options
.
pullRefresh
||
{};
//需要判断是否为plus,这个需要等一下;
setTimeout
(
function
()
{
if
(
$
.
os
.
plus
&&
$
.
os
.
android
){
//只要是android手机,必须使用原生的下拉刷新;
if
(
pullRefreshOptions
.
down
){
$
.
plus_pulldownRefresh
(
pullRefreshOptions
.
down
);
}
if
(
pullRefreshOptions
.
up
){
var
container
=
pullRefreshOptions
.
container
;
if
(
container
)
{
var
$container
=
$
(
container
);
if
(
$container
.
length
===
1
)
{
$container
.
pullRefresh
(
pullRefreshOptions
);
}
}
}
}
else
{
var
container
=
pullRefreshOptions
.
container
;
if
(
container
)
{
var
$container
=
$
(
container
);
if
(
$container
.
length
===
1
)
{
$container
.
pullRefresh
(
pullRefreshOptions
);
}
}
}
},
1000
);
$
.
init
.
add
(
function
()
{
var
options
=
$
.
options
;
var
pullRefreshOptions
=
options
.
pullRefresh
||
{};
});
//需要判断是否为plus,这个需要等一下;
setTimeout
(
function
()
{
if
(
$
.
os
.
plus
&&
$
.
os
.
android
)
{
//只要是android手机,必须使用原生的下拉刷新;
if
(
pullRefreshOptions
.
down
)
{
$
.
plus_pulldownRefresh
(
pullRefreshOptions
.
down
);
}
if
(
pullRefreshOptions
.
up
)
{
var
container
=
pullRefreshOptions
.
container
;
if
(
container
)
{
var
$container
=
$
(
container
);
if
(
$container
.
length
===
1
)
{
$container
.
pullRefresh
({
container
:
container
,
up
:
pullRefreshOptions
.
up
});
}
}
}
}
else
{
var
container
=
pullRefreshOptions
.
container
;
if
(
container
)
{
var
$container
=
$
(
container
);
if
(
$container
.
length
===
1
)
{
$container
.
pullRefresh
(
pullRefreshOptions
);
}
}
}
},
1000
);
});
})(
mui
);
/**
* mui ajax
...
...
@@ -1543,7 +1562,7 @@ window.mui = mui;
};
PullRefresh
.
prototype
.
initPocket
=
function
()
{
var
options
=
this
.
options
;
if
(
options
.
down
&&
options
.
down
.
hasOwnProperty
(
'
callback
'
)
&&!
(
$
.
os
.
plus
&&
$
.
os
.
android
)
)
{
if
(
options
.
down
&&
options
.
down
.
hasOwnProperty
(
'
callback
'
))
{
this
.
topPocket
=
this
.
element
.
querySelector
(
'
.
'
+
CLASS_PULL_TOP_POCKET
);
if
(
!
this
.
topPocket
)
{
this
.
topPocket
=
this
.
createPocket
(
CLASS_PULL_TOP_POCKET
,
options
.
down
);
...
...
@@ -1600,8 +1619,10 @@ window.mui = mui;
window
.
addEventListener
(
'
scroll
'
,
function
()
{
scrolling
=
true
;
});
window
.
addEventListener
(
'
touchmove
'
,
function
()
{
scrolling
=
true
;
window
.
addEventListener
(
'
dragend
'
,
function
(
event
)
{
if
(
event
.
detail
.
direction
===
'
up
'
)
{
scrolling
=
true
;
}
});
}
...
...
@@ -2029,9 +2050,6 @@ window.mui = mui;
if
(
$
.
os
.
android
)
{
return
;
}
var
CLASS_SLIDER
=
'
mui-slider
'
;
var
CLASS_SWITCH
=
'
mui-switch
'
;
var
CLASS_TABLE_VIEW_CELL
=
'
mui-table-view-cell
'
;
var
CLASS_SLIDER_HANDLE
=
'
mui-slider-handle
'
;
var
CLASS_OFF_CANVAS_LEFT
=
'
mui-off-canvas-left
'
;
var
CLASS_OFF_CANVAS_RIGHT
=
'
mui-off-canvas-right
'
;
...
...
@@ -2124,17 +2142,6 @@ window.mui = mui;
for
(;
target
&&
target
!==
document
;
target
=
target
.
parentNode
)
{
var
classList
=
target
.
classList
;
if
(
classList
)
{
if
(
classList
.
contains
(
CLASS_SWITCH
))
{
//switch
break
;
}
if
(
classList
.
contains
(
CLASS_TABLE_VIEW_CELL
))
{
//swipe table view cell
if
(
target
.
querySelector
(
'
.
'
+
CLASS_SLIDER_HANDLE
))
{
break
;
}
}
if
(
classList
.
contains
(
CLASS_SLIDER
))
{
//slider
break
;
}
if
(
classList
.
contains
(
CLASS_OFF_CANVAS_WRAP
)
&&
classList
.
contains
(
CLASS_DRAGGABLE
))
{
container
=
target
;
innerContainer
=
container
.
querySelector
(
SELECTOR_INNER_WRAP
);
...
...
@@ -2585,7 +2592,7 @@ window.mui = mui;
slider
.
addEventListener
(
'
dragstart
'
,
function
(
event
)
{
var
detail
=
event
.
detail
;
var
direction
=
detail
.
direction
;
if
(
direction
==
'
left
'
||
direction
==
'
right
'
)
{
//reset
if
(
direction
==
=
'
left
'
||
direction
=
==
'
right
'
)
{
//reset
isDragable
=
true
;
self
.
translateX
=
self
.
lastTranslateX
=
0
;
self
.
scrollX
=
self
.
getScroll
();
...
...
@@ -2597,6 +2604,15 @@ window.mui = mui;
}
self
.
maxTranslateX
=
((
self
.
sliderLength
-
1
)
*
self
.
sliderWidth
);
event
.
detail
.
gesture
.
preventDefault
();
var
isStopPropagation
=
true
;
if
(
!
self
.
isLoop
)
{
if
(
direction
===
'
right
'
&&
self
.
scrollX
===
0
)
{
isStopPropagation
=
false
;
}
else
if
(
direction
===
'
left
'
&&
self
.
scrollX
===
-
self
.
maxTranslateX
)
{
isStopPropagation
=
false
;
}
}
isStopPropagation
&&
event
.
stopPropagation
();
}
});
slider
.
addEventListener
(
'
drag
'
,
function
(
event
)
{
...
...
@@ -2915,7 +2931,7 @@ window.mui = mui;
$
.
trigger
(
toggle
,
'
toggle
'
,
{
isActive
:
slideOn
});
toggle
.
removeEventListener
(
'
dragstart
'
,
$
.
stopPropagation
);
};
var
dragToggle
=
function
(
event
)
{
if
(
!
toggle
)
{
...
...
@@ -2936,6 +2952,7 @@ window.mui = mui;
window
.
addEventListener
(
$
.
EVENT_START
,
function
(
e
)
{
toggle
=
$
.
targets
.
toggle
;
if
(
toggle
)
{
toggle
.
addEventListener
(
'
dragstart
'
,
$
.
stopPropagation
);
handle
=
toggle
.
querySelector
(
SELECTOR_SWITCH_HANDLE
);
toggleWidth
=
toggle
.
clientWidth
;
handleWidth
=
handle
.
clientWidth
;
...
...
@@ -3219,6 +3236,7 @@ window.mui = mui;
if
(
sliderCell
&&
sliderCell
.
parentNode
===
cell
)
{
var
handle
=
sliderCell
.
querySelector
(
SELECTOR_SLIDER_HANDLE
);
if
(
handle
)
{
//slider
toggleEvents
(
cell
);
sliderHandle
=
handle
;
sliderHandleWidth
=
sliderHandle
.
offsetWidth
;
sliderHandleLeft
=
$
.
getStyles
(
sliderHandle
,
'
margin-left
'
);
...
...
@@ -3255,52 +3273,71 @@ window.mui = mui;
window
.
addEventListener
(
'
touchmove
'
,
function
(
event
)
{
toggleActive
(
false
);
});
window
.
addEventListener
(
'
dragstart
'
,
function
(
event
)
{
if
(
!
sliderHandle
)
{
return
;
}
var
detail
=
event
.
detail
;
var
direction
=
detail
.
direction
;
var
angle
=
detail
.
angle
;
if
(
direction
===
'
left
'
)
{
if
((
sliderRight
||
sliderHandle
)
&&
(
angle
>
150
||
angle
<
-
150
))
{
if
(
!
sliderRight
&&
sliderLeft
&&
sliderTranslateX
===
0
)
{
//仅有左侧按钮时不允许左拖
return
;
var
handleEvent
=
{
handleEvent
:
function
(
event
)
{
switch
(
event
.
type
)
{
case
'
dragstart
'
:
this
.
dragstart
(
event
);
break
;
case
'
drag
'
:
this
.
drag
(
event
);
break
;
case
'
dragend
'
:
this
.
dragend
(
event
);
break
;
case
'
swiperight
'
:
this
.
swiperight
(
event
);
break
;
case
'
swipeleft
'
:
this
.
swipeleft
(
event
);
break
;
}
},
dragstart
:
function
(
event
)
{
var
detail
=
event
.
detail
;
var
direction
=
detail
.
direction
;
var
angle
=
detail
.
angle
;
if
(
direction
===
'
left
'
)
{
if
((
sliderRight
||
sliderHandle
)
&&
(
angle
>
150
||
angle
<
-
150
))
{
if
(
!
sliderRight
&&
sliderLeft
&&
sliderTranslateX
===
0
)
{
//仅有左侧按钮时不允许左拖
return
;
}
if
(
sliderHandle
&&
!
sliderRight
&&
!
sliderLeft
&&
sliderTranslateX
===
0
)
{
//抽屉式已展开,不允许左拖
return
;
}
isDraging
=
true
;
}
if
(
sliderHandle
&&
!
sliderRight
&&
!
sliderLeft
&&
sliderTranslateX
===
0
)
{
//抽屉式已展开,不允许左拖
return
;
}
else
if
(
direction
===
'
right
'
)
{
if
((
sliderLeft
||
sliderHandle
)
&&
angle
>
-
30
&&
angle
<
30
)
{
if
(
!
sliderLeft
&&
sliderRight
&&
sliderTranslateX
===
0
)
{
//仅有右侧按钮时不允许右拖
return
;
}
if
(
sliderHandle
&&
!
sliderRight
&&
!
sliderLeft
&&
sliderTranslateX
===
sliderHandleWidth
)
{
//抽屉式已关闭,不允许右拖
return
;
}
isDraging
=
true
;
}
isDraging
=
true
;
}
}
else
if
(
direction
===
'
right
'
)
{
if
((
sliderLeft
||
sliderHandle
)
&&
angle
>
-
30
&&
angle
<
30
)
{
if
(
!
sliderLeft
&&
sliderRight
&&
sliderTranslateX
===
0
)
{
//仅有右侧按钮时不允许右拖
return
;
}
if
(
sliderHandle
&&
!
sliderRight
&&
!
sliderLeft
&&
sliderTranslateX
===
sliderHandleWidth
)
{
//抽屉式已关闭,不允许右拖
return
;
if
(
isDraging
){
event
.
stopPropagation
();
}
},
drag
:
function
(
event
)
{
if
(
isDraging
)
{
if
(
!
sliderRequestAnimationFrame
)
{
updateTranslate
();
}
isDraging
=
true
;
translateX
=
event
.
detail
.
deltaX
*
factor
;
event
.
detail
.
gesture
.
preventDefault
();
}
}
});
window
.
addEventListener
(
'
drag
'
,
function
(
event
)
{
if
(
isDraging
)
{
if
(
!
sliderRequestAnimationFrame
)
{
updateTranslate
();
},
dragend
:
function
(
event
)
{
if
(
isDraging
)
{
endDraging
(
false
,
event
.
detail
);
}
translateX
=
event
.
detail
.
deltaX
*
factor
;
event
.
detail
.
gesture
.
preventDefault
();
}
});
window
.
addEventListener
(
'
dragend
'
,
function
(
event
)
{
if
(
isDraging
)
{
endDraging
(
false
,
event
.
detail
);
}
});
window
.
addEventListener
(
'
swiperight
'
,
function
(
event
)
{
if
(
sliderHandle
)
{
},
swiperight
:
function
(
event
)
{
var
isSwipeable
=
false
;
if
(
sliderLeft
&&
!
sliderLeft
.
classList
.
contains
(
CLASS_BOUNCE
)
&&
sliderTranslateX
===
0
)
{
//left show
...
...
@@ -3318,10 +3355,8 @@ window.mui = mui;
event
.
stopImmediatePropagation
();
endDraging
(
true
,
event
.
detail
);
}
}
});
window
.
addEventListener
(
'
swipeleft
'
,
function
(
event
)
{
if
(
sliderHandle
)
{
},
swipeleft
:
function
(
event
)
{
var
isSwipeable
=
false
;
if
(
sliderRight
&&
!
sliderRight
.
classList
.
contains
(
CLASS_BOUNCE
)
&&
sliderTranslateX
===
0
)
{
//right show
...
...
@@ -3340,18 +3375,32 @@ window.mui = mui;
endDraging
(
true
,
event
.
detail
);
}
}
});
}
function
toggleEvents
(
element
,
isRemove
)
{
var
method
=
!!
isRemove
?
'
removeEventListener
'
:
'
addEventListener
'
;
element
[
method
](
'
dragstart
'
,
handleEvent
);
element
[
method
](
'
drag
'
,
handleEvent
);
element
[
method
](
'
dragend
'
,
handleEvent
);
element
[
method
](
'
swiperight
'
,
handleEvent
);
element
[
method
](
'
swipeleft
'
,
handleEvent
);
}
window
.
addEventListener
(
'
touchend
'
,
function
(
event
)
{
//使用touchend来取消高亮,避免一次点击既不触发tap,doubletap,longtap的事件
if
(
!
cell
)
{
return
;
}
toggleActive
(
false
);
sliderHandle
&&
toggleEvents
(
cell
,
true
);
});
window
.
addEventListener
(
'
touchcancel
'
,
function
(
event
)
{
//使用touchcancel来取消高亮,避免一次点击既不触发tap,doubletap,longtap的事件
if
(
!
cell
)
{
return
;
}
toggleActive
(
false
);
sliderHandle
&&
toggleEvents
(
cell
,
true
);
});
var
radioOrCheckboxClick
=
function
()
{
var
classList
=
cell
.
classList
;
...
...
dist/js/mui.min.js
View file @
c76be454
...
...
@@ -3,5 +3,5 @@
* Mui v0.5.7 (https://github.com/dcloudio/mui)
* =====================================================
*/
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
if
(
"
function
"
==
typeof
b
)
return
i
.
ready
(
b
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
a
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
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
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
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
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
b
.
addEventListener
(
a
.
EVENT_CLICK
,
function
(
b
){(
a
.
targets
.
popover
||
a
.
targets
.
tab
||
a
.
targets
.
offcanvas
||
a
.
targets
.
modal
)
&&
b
.
preventDefault
()}),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
autoShow
:
!
0
,
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({
autoShow
:
!
0
,
title
:
""
},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
,
j
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
k
=
a
.
webviews
[
c
];
return
g
=
k
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
k
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
k
.
afterShowMethodName
&&
g
.
evalJS
(
k
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
),
g
}
var
l
=
a
.
waitingOptions
(
f
.
waiting
);
return
l
.
autoShow
&&
(
i
=
plus
.
nativeUI
.
showWaiting
(
l
.
title
,
l
.
options
)),
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
}),
g
=
a
.
createWindow
(
f
),
h
=
a
.
showOptions
(
f
.
show
),
h
.
autoShow
&&
g
.
addEventListener
(
"
loaded
"
,
function
(){
i
&&
i
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
)},
!
1
),
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),
a
.
extend
({
preload
:
!
0
},
b
.
extras
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
a
.
extend
({
preload
:
!
0
},
c
.
extras
));
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
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
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
c
.
extras
);
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
,
b
.
extras
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
if
(
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
)),
a
.
os
.
ios
){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)}})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
setTimeout
(
function
(){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
){
if
(
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
),
c
.
up
){
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}}
else
{
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}},
1
e3
)})}(
mui
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner-cycle
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在加载...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
b
=
this
.
options
;
!
b
.
down
||!
b
.
down
.
hasOwnProperty
(
"
callback
"
)
||
a
.
os
.
plus
&&
a
.
os
.
android
||
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
b
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
b
.
up
&&
b
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
b
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
d
=
this
;
if
(
d
.
bottomPocket
)
if
(
d
.
options
.
up
.
draggable
)
d
.
element
.
addEventListener
(
"
dragup
"
,
function
(
a
){
d
.
dragUp
(
a
)});
else
{
var
e
=
d
.
options
.
up
.
callback
;
if
(
e
){
var
f
=!
1
,
h
=!
1
;
setInterval
(
function
(){
if
(
f
){
if
(
f
=!
1
,
h
)
return
;
var
j
=
c
.
body
.
scrollHeight
;
b
.
innerHeight
+
b
.
scrollY
+
5
>
j
&&
(
d
.
isLoading
=
h
=!
0
,
a
.
gestures
.
stoped
=!
0
,
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
setCaption
(
k
),
e
(
function
(){
d
.
isLoading
=
h
=!
1
,
d
.
setCaption
(
i
),
d
.
pullOptions
=
null
}))}},
250
),
b
.
addEventListener
(
"
scroll
"
,
function
(){
f
=!
0
}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
f
=!
0
})}}
d
.
topPocket
&&
d
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
a
){
d
.
dragDown
(
a
)}),(
d
.
bottomPocket
&&
d
.
options
.
up
.
draggable
===!
0
||
d
.
topPocket
)
&&
(
d
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
d
.
dragStart
(
a
)}),
d
.
element
.
addEventListener
(
"
drag
"
,
function
(
a
){
var
b
=
a
.
detail
.
direction
;
d
.
dragDirection
&&
"
up
"
!==
b
&&
"
down
"
!==
b
&&
d
.
pullOptions
&&
(
d
.
pullOptions
.
height
>
0
?
d
.
dragDown
(
a
):
d
.
dragUp
(
a
))}),
d
.
element
.
addEventListener
(
"
dragend
"
,
function
(
a
){
d
.
dragEnd
(
a
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
a
.
setCaption
(
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
j
:
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
setCaption
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
a
===
k
?
t
+
"
"
+
p
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
b
.
preventDefault
(),
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
a
.
preventDefault
(),
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?(
b
.
preventDefault
(),
d
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?(
a
.
preventDefault
(),
b
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){(
1
!==
b
||
this
.
getSlideNumber
()
!==
b
)
&&
(
b
=
b
>
0
?
-
b
:
b
);
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
var
e
=
null
;
return
this
.
each
(
function
(){
var
f
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
f
=
this
.
querySelector
(
"
.
"
+
d
));
var
g
=
f
.
getAttribute
(
"
data-slider
"
);
g
?(
e
=
a
.
data
[
g
],
e
&&
b
&&
e
.
refresh
(
b
)):(
g
=++
a
.
uuid
,
a
.
data
[
g
]
=
e
=
new
m
(
f
,
b
),
f
.
setAttribute
(
"
data-slider
"
,
g
))}),
e
},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-grid-view
"
,
x
=
"
mui-table-view-cell
"
,
y
=
"
mui-disabled
"
,
z
=
"
mui-switch
"
,
A
=
"
mui-btn
"
,
B
=
"
mui-slider-cell
"
,
C
=
"
mui-slider-handle
"
,
D
=
"
mui-slider-left
"
,
E
=
"
mui-slider-right
"
,
F
=
"
mui-bounce
"
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
"
.
"
+
E
,
K
=
.
4
,
L
=
1
,
M
=
1
,
N
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
O
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
P
(
g
,
s
):
P
(
g
,
h
+
s
):
k
?
0
===
h
?
P
(
g
,
Math
.
max
(
s
,
0
)):
P
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
P
(
g
,
Math
.
min
(
s
,
0
)):
P
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
P
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
P
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
P
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
P
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
P
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
O
()})},
P
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
Q
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
P
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
P
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
a
){
g
&&
(
a
?(
P
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
T
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
S
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
R
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
F
)?(
k
.
setAttribute
(
"
style
"
,
""
),
P
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
Q
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
Q
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
F
)?(
n
.
setAttribute
(
"
style
"
,
""
),
P
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
R
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
B
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
C
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
C
.
contains
(
z
)
||
C
.
contains
(
A
)
||
C
.
contains
(
y
))
&&
(
B
=!
0
),
C
.
contains
(
x
)){
d
=
u
;
var
D
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
D
&&
D
!=
d
){
D
.
classList
.
remove
(
v
);
var
E
=
D
.
querySelector
(
H
);
if
(
E
){
var
F
=
D
.
querySelector
(
I
);
F
&&
F
.
setAttribute
(
"
style
"
,
""
);
var
O
=
D
.
querySelector
(
J
);
O
&&
O
.
setAttribute
(
"
style
"
,
""
),
F
||
O
?
P
(
E
,
0
):
P
(
E
,
E
.
offsetWidth
)}}
if
(
!
d
.
parentNode
.
classList
.
contains
(
w
)){
var
Q
=
d
.
querySelector
(
"
a
"
);
Q
&&
Q
.
parentNode
===
d
&&
(
e
=
Q
)}
if
(
f
=
d
.
querySelector
(
G
),
f
&&
f
.
parentNode
===
d
){
var
R
=
f
.
querySelector
(
H
);
if
(
R
){
g
=
R
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
M
=
L
;
var
S
=
f
.
querySelector
(
I
);
S
&&
(
k
=
S
,
l
=
a
.
getStyles
(
S
,
"
background-color
"
),
m
=
S
.
offsetWidth
);
var
T
=
f
.
querySelector
(
J
);
T
&&
(
n
=
T
,
o
=
a
.
getStyles
(
T
,
"
background-color
"
),
p
=
T
.
offsetWidth
),(
k
||
n
)
&&
(
M
=
K
);
var
U
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
V
=
a
.
parseTranslateMatrix
(
U
);
h
=
V
?
V
.
x
:
0
}}
B
||
N
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
N
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
O
(),
s
=
a
.
detail
.
deltaX
*
M
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
T
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
F
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
R
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
T
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
F
)
&&
0
===
h
?(
R
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
T
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
N
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
N
(
!
1
)});
var
U
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
U
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
U
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
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
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
if
(
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
){
if
(
a
.
targets
.
toggle
)
return
;
a
.
back
()}})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
f
&&
(
e
=
f
),
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
var
d
=
e
.
opener
();
d
&&
(
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
))}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
if
(
"
function
"
==
typeof
b
)
return
i
.
ready
(
b
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
a
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
!
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
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
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
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
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
b
.
addEventListener
(
a
.
EVENT_CLICK
,
function
(
b
){(
a
.
targets
.
popover
||
a
.
targets
.
tab
||
a
.
targets
.
offcanvas
||
a
.
targets
.
modal
)
&&
b
.
preventDefault
()}),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
,
b
){
function
c
(
c
){
this
.
os
=
{};
var
d
=
[
function
(){
var
a
=
c
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
],
this
.
os
.
isBadAndroid
=!
/Chrome
\/\d
/
.
test
(
b
.
navigator
.
appVersion
)),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
c
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
b
=
c
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
b
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
b
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
d
,
function
(
b
){
return
!
b
.
call
(
a
)})}
c
.
call
(
a
,
navigator
.
userAgent
)}(
mui
,
window
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
autoShow
:
!
0
,
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({
autoShow
:
!
0
,
title
:
""
},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
,
j
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
k
=
a
.
webviews
[
c
];
return
g
=
k
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
k
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
k
.
afterShowMethodName
&&
g
.
evalJS
(
k
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
),
g
}
var
l
=
a
.
waitingOptions
(
f
.
waiting
);
return
l
.
autoShow
&&
(
i
=
plus
.
nativeUI
.
showWaiting
(
l
.
title
,
l
.
options
)),
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
}),
g
=
a
.
createWindow
(
f
),
h
=
a
.
showOptions
(
f
.
show
),
h
.
autoShow
&&
g
.
addEventListener
(
"
loaded
"
,
function
(){
i
&&
i
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
)},
!
1
),
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),
a
.
extend
({
preload
:
!
0
},
b
.
extras
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
a
.
extend
({
preload
:
!
0
},
c
.
extras
));
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
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
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
c
.
extras
);
d
.
append
(
e
)}));
return
d
}},
a
.
preload
=
function
(
b
){
b
.
preload
||
(
b
.
preload
=!
0
),
a
.
createWindow
(
b
)},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
,
b
.
extras
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
if
(
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
)),
a
.
os
.
ios
){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)}})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
setTimeout
(
function
(){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
){
if
(
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
),
c
.
up
){
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
({
container
:
b
,
up
:
c
.
up
})}}}
else
{
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}},
1
e3
)})}(
mui
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner-cycle
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在加载...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
d
=
this
;
if
(
d
.
bottomPocket
)
if
(
d
.
options
.
up
.
draggable
)
d
.
element
.
addEventListener
(
"
dragup
"
,
function
(
a
){
d
.
dragUp
(
a
)});
else
{
var
e
=
d
.
options
.
up
.
callback
;
if
(
e
){
var
f
=!
1
,
h
=!
1
;
setInterval
(
function
(){
if
(
f
){
if
(
f
=!
1
,
h
)
return
;
var
j
=
c
.
body
.
scrollHeight
;
b
.
innerHeight
+
b
.
scrollY
+
5
>
j
&&
(
d
.
isLoading
=
h
=!
0
,
a
.
gestures
.
stoped
=!
0
,
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
setCaption
(
k
),
e
(
function
(){
d
.
isLoading
=
h
=!
1
,
d
.
setCaption
(
i
),
d
.
pullOptions
=
null
}))}},
250
),
b
.
addEventListener
(
"
scroll
"
,
function
(){
f
=!
0
}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
"
up
"
===
a
.
detail
.
direction
&&
(
f
=!
0
)})}}
d
.
topPocket
&&
d
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
a
){
d
.
dragDown
(
a
)}),(
d
.
bottomPocket
&&
d
.
options
.
up
.
draggable
===!
0
||
d
.
topPocket
)
&&
(
d
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
d
.
dragStart
(
a
)}),
d
.
element
.
addEventListener
(
"
drag
"
,
function
(
a
){
var
b
=
a
.
detail
.
direction
;
d
.
dragDirection
&&
"
up
"
!==
b
&&
"
down
"
!==
b
&&
d
.
pullOptions
&&
(
d
.
pullOptions
.
height
>
0
?
d
.
dragDown
(
a
):
d
.
dragUp
(
a
))}),
d
.
element
.
addEventListener
(
"
dragend
"
,
function
(
a
){
d
.
dragEnd
(
a
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
a
.
setCaption
(
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
j
:
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
setCaption
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
a
===
k
?
t
+
"
"
+
p
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
b
.
preventDefault
(),
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-off-canvas-left
"
,
i
=
"
mui-off-canvas-right
"
,
j
=
"
mui-off-canvas-wrap
"
,
k
=
"
mui-off-canvas-height-fixed
"
,
l
=
"
mui-left
"
,
m
=
"
mui-right
"
,
n
=
"
mui-sliding
"
,
o
=
"
mui-draggable
"
,
p
=
"
.mui-inner-wrap
"
,
q
=
"
.
"
+
h
,
r
=
"
.
"
+
i
,
s
=!
1
,
t
=
1
,
u
=
0
,
v
=
0
,
w
=
0
,
x
=
0
,
y
=
function
(){
u
!==
v
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
u
>
0
?(
u
=
Math
.
min
(
u
,
x
),
0
>
w
?
z
(
e
,
w
+
u
):
z
(
e
,
u
)):
"
left
"
===
g
&&
0
>
u
&&
(
u
=
Math
.
max
(
u
,
-
x
),
w
>
0
?
z
(
e
,
w
+
u
):
z
(
e
,
u
)),
v
=
u
),
f
=
requestAnimationFrame
(
function
(){
y
()})},
z
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
A
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
k
),
f
.
classList
.
add
(
k
),
d
&&
d
.
classList
.
add
(
k
)):(
e
.
classList
.
remove
(
k
),
f
.
classList
.
remove
(
k
),
d
&&
d
.
classList
.
remove
(
k
))},
B
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
n
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
B
),
b
.
contains
(
m
)
||
b
.
contains
(
l
)
||
A
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
s
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
&&
f
.
contains
(
j
)
&&
f
.
contains
(
o
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
p
),
!
e
)
return
;
break
}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
m
)?
s
=!
0
:
d
.
querySelector
(
r
)
&&!
d
.
classList
.
contains
(
l
)
&&
(
s
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
l
)?
s
=!
0
:
d
.
querySelector
(
q
)
&&!
d
.
classList
.
contains
(
m
)
&&
(
s
=!
0
)),
s
){
g
=
c
.
direction
,
x
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
w
=
u
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
n
),
i
.
contains
(
m
)
||
i
.
contains
(
l
)
||
A
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
s
){
var
b
=
a
.
detail
;
f
||
y
(),
u
=
b
.
deltaX
*
t
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
s
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
B
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
u
>
0
?(
a
=
m
,
0
>
w
&&
(
c
.
reverse
(),
a
=
l
),
u
>
x
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
u
&&
(
a
=
l
,
w
>
0
&&
(
c
.
reverse
(),
a
=
m
),
-
u
>
x
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
a
.
preventDefault
(),
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?(
b
.
preventDefault
(),
d
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?(
a
.
preventDefault
(),
b
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;
if
(
"
left
"
===
g
||
"
right
"
===
g
){
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
();
var
h
=!
0
;
b
.
isLoop
||
(
"
right
"
===
g
&&
0
===
b
.
scrollX
?
h
=!
1
:
"
left
"
===
g
&&
b
.
scrollX
===-
b
.
maxTranslateX
&&
(
h
=!
1
)),
h
&&
a
.
stopPropagation
()}}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){(
1
!==
b
||
this
.
getSlideNumber
()
!==
b
)
&&
(
b
=
b
>
0
?
-
b
:
b
);
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
var
e
=
null
;
return
this
.
each
(
function
(){
var
f
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
f
=
this
.
querySelector
(
"
.
"
+
d
));
var
g
=
f
.
getAttribute
(
"
data-slider
"
);
g
?(
e
=
a
.
data
[
g
],
e
&&
b
&&
e
.
refresh
(
b
)):(
g
=++
a
.
uuid
,
a
.
data
[
g
]
=
e
=
new
m
(
f
,
b
),
f
.
setAttribute
(
"
data-slider
"
,
g
))}),
e
},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
}),
j
.
removeEventListener
(
"
dragstart
"
,
a
.
stopPropagation
)}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
j
.
addEventListener
(
"
dragstart
"
,
a
.
stopPropagation
),
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
function
d
(
a
,
b
){
var
c
=
b
?
"
removeEventListener
"
:
"
addEventListener
"
;
a
[
c
](
"
dragstart
"
,
V
),
a
[
c
](
"
drag
"
,
V
),
a
[
c
](
"
dragend
"
,
V
),
a
[
c
](
"
swiperight
"
,
V
),
a
[
c
](
"
swipeleft
"
,
V
)}
var
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
,
v
=
"
mui-active
"
,
w
=
"
mui-selected
"
,
x
=
"
mui-grid-view
"
,
y
=
"
mui-table-view-cell
"
,
z
=
"
mui-disabled
"
,
A
=
"
mui-switch
"
,
B
=
"
mui-btn
"
,
C
=
"
mui-slider-cell
"
,
D
=
"
mui-slider-handle
"
,
E
=
"
mui-slider-left
"
,
F
=
"
mui-slider-right
"
,
G
=
"
mui-bounce
"
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
"
.
"
+
E
,
K
=
"
.
"
+
F
,
L
=
.
4
,
M
=
1
,
N
=
1
,
O
=
function
(
a
){
a
?
f
?
f
.
classList
.
add
(
v
):
e
&&
e
.
classList
.
add
(
v
):
f
?
f
.
classList
.
remove
(
v
):
e
&&
e
.
classList
.
remove
(
v
)},
P
=
function
(){
t
!==
u
&&
(
l
||
o
?(
l
&&
o
?
0
===
i
?
Q
(
h
,
t
):
Q
(
h
,
i
+
t
):
l
?
0
===
i
?
Q
(
h
,
Math
.
max
(
t
,
0
)):
Q
(
h
,
Math
.
max
(
i
+
t
,
0
)):
o
&&
(
0
===
i
?
Q
(
h
,
Math
.
min
(
t
,
0
)):
Q
(
h
,
Math
.
min
(
i
+
t
,
0
))),
l
&&
(
0
===
i
?
t
>
n
&&
(
g
.
style
.
backgroundColor
=
m
,
Q
(
l
,
Math
.
max
(
t
-
n
,
0
))):(
g
.
style
.
backgroundColor
=
t
>
0
?
m
:
""
,
Q
(
l
,
Math
.
max
(
t
,
0
)))),
o
&&
(
0
===
i
?
-
t
>
q
&&
(
g
.
style
.
backgroundColor
=
p
,
Q
(
o
,
Math
.
min
(
-
(
-
t
-
q
),
0
))):(
g
.
style
.
backgroundColor
=
t
>
0
&&!
l
?
""
:
p
,
Q
(
o
,
Math
.
min
(
t
,
0
))))):
h
&&
(
0
===
i
&&
t
>
0
||
i
===
j
&&
0
>
t
)
&&
Math
.
abs
(
t
)
<=
j
&&
Q
(
h
,
i
+
t
),
u
=
t
),
s
=
requestAnimationFrame
(
function
(){
P
()})},
Q
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
R
=
function
(
b
,
c
){
l
&&
(
l
.
setAttribute
(
"
style
"
,
""
),
o
&&
o
.
setAttribute
(
"
style
"
,
""
),
b
?(
Q
(
h
,
n
),
c
&&
a
.
trigger
(
h
,
"
slideright
"
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
0
),
e
.
classList
.
remove
(
w
)))},
S
=
function
(
b
,
c
){
o
&&
(
o
.
setAttribute
(
"
style
"
,
""
),
l
&&
l
.
setAttribute
(
"
style
"
,
""
),
b
?(
Q
(
h
,
-
q
),
c
&&
a
.
trigger
(
h
,
"
slideleft
"
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
0
),
e
.
classList
.
remove
(
w
)))},
T
=
function
(
a
){
h
&&
(
a
?(
Q
(
h
,
0
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
j
),
e
.
classList
.
remove
(
w
)))},
U
=
function
(
b
,
c
){
r
=!
1
,
s
&&
(
cancelAnimationFrame
(
s
),
s
=
null
),
g
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
t
);
if
(
b
||!
l
&&!
o
)
l
||
o
||
T
(
0
===
i
?
!
(
d
>
j
/
2
):
d
>
j
/
2
);
else
if
(
t
>
0
){
var
e
=
n
/
2
;
if
(
0
!==
i
&&
o
&&
(
S
(
!
(
d
>=
q
/
2
),
!
1
),
e
=
n
/
2
+
q
),
l
){
var
f
=
d
>=
e
;
l
.
classList
.
contains
(
G
)?(
l
.
setAttribute
(
"
style
"
,
""
),
Q
(
h
,
0
),
f
&&!
c
.
swipe
&&
a
.
trigger
(
h
,
"
slideright
"
)):
R
(
f
,
!
0
)}}
else
{
var
e
=
n
/
2
;
if
(
0
!==
i
&&
l
&&
(
R
(
!
(
d
>=
n
/
2
),
!
1
),
e
=
q
/
2
+
n
),
o
){
var
f
=
d
>=
e
;
o
.
classList
.
contains
(
G
)?(
o
.
setAttribute
(
"
style
"
,
""
),
Q
(
h
,
0
),
f
&&!
c
.
swipe
&&
a
.
trigger
(
h
,
"
slideleft
"
)):
S
(
f
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
e
=
f
=
h
=
l
=
o
=
r
=
s
=!
1
,
t
=
u
=
i
=
j
=
n
=
q
=
0
,
m
=
p
=
""
;
for
(
var
v
=
b
.
target
,
C
=!
1
;
v
&&
v
!==
c
;
v
=
v
.
parentNode
)
if
(
v
.
classList
){
var
D
=
v
.
classList
;
if
((
"
INPUT
"
===
v
.
tagName
&&
"
radio
"
!==
v
.
type
&&
"
checkbox
"
!==
v
.
type
||
"
BUTTON
"
===
v
.
tagName
||
D
.
contains
(
A
)
||
D
.
contains
(
B
)
||
D
.
contains
(
z
))
&&
(
C
=!
0
),
D
.
contains
(
y
)){
e
=
v
;
var
E
=
e
.
parentNode
.
querySelector
(
"
.
"
+
w
);
if
(
E
&&
E
!=
e
){
E
.
classList
.
remove
(
w
);
var
F
=
E
.
querySelector
(
I
);
if
(
F
){
var
G
=
E
.
querySelector
(
J
);
G
&&
G
.
setAttribute
(
"
style
"
,
""
);
var
P
=
E
.
querySelector
(
K
);
P
&&
P
.
setAttribute
(
"
style
"
,
""
),
G
||
P
?
Q
(
F
,
0
):
Q
(
F
,
F
.
offsetWidth
)}}
if
(
!
e
.
parentNode
.
classList
.
contains
(
x
)){
var
R
=
e
.
querySelector
(
"
a
"
);
R
&&
R
.
parentNode
===
e
&&
(
f
=
R
)}
if
(
g
=
e
.
querySelector
(
H
),
g
&&
g
.
parentNode
===
e
){
var
S
=
g
.
querySelector
(
I
);
if
(
S
){
d
(
e
),
h
=
S
,
j
=
h
.
offsetWidth
,
k
=
a
.
getStyles
(
h
,
"
margin-left
"
),
N
=
M
;
var
T
=
g
.
querySelector
(
J
);
T
&&
(
l
=
T
,
m
=
a
.
getStyles
(
T
,
"
background-color
"
),
n
=
T
.
offsetWidth
);
var
U
=
g
.
querySelector
(
K
);
U
&&
(
o
=
U
,
p
=
a
.
getStyles
(
U
,
"
background-color
"
),
q
=
U
.
offsetWidth
),(
l
||
o
)
&&
(
N
=
L
);
var
V
=
a
.
getStyles
(
h
,
"
webkitTransform
"
),
W
=
a
.
parseTranslateMatrix
(
V
);
i
=
W
?
W
.
x
:
0
}}
C
||
O
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
O
(
!
1
)});
var
V
=
{
handleEvent
:
function
(
a
){
switch
(
a
.
type
){
case
"
dragstart
"
:
this
.
dragstart
(
a
);
break
;
case
"
drag
"
:
this
.
drag
(
a
);
break
;
case
"
dragend
"
:
this
.
dragend
(
a
);
break
;
case
"
swiperight
"
:
this
.
swiperight
(
a
);
break
;
case
"
swipeleft
"
:
this
.
swipeleft
(
a
)}},
dragstart
:
function
(
a
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
o
||
h
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
o
&&
l
&&
0
===
i
)
return
;
if
(
h
&&!
o
&&!
l
&&
0
===
i
)
return
;
r
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
l
||
h
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
l
&&
o
&&
0
===
i
)
return
;
if
(
h
&&!
o
&&!
l
&&
i
===
j
)
return
;
r
=!
0
}
r
&&
a
.
stopPropagation
()},
drag
:
function
(
a
){
r
&&
(
s
||
P
(),
t
=
a
.
detail
.
deltaX
*
N
,
a
.
detail
.
gesture
.
preventDefault
())},
dragend
:
function
(
a
){
r
&&
U
(
!
1
,
a
.
detail
)},
swiperight
:
function
(
b
){
var
c
=!
1
;
l
&&!
l
.
classList
.
contains
(
G
)
&&
0
===
i
?(
R
(
!
0
,
!
0
),
c
=!
0
):
o
&&
0
>
i
?(
S
(
!
1
,
!
1
),
c
=!
0
):
l
||
o
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
U
(
!
0
,
b
.
detail
))},
swipeleft
:
function
(
b
){
var
c
=!
1
;
o
&&!
o
.
classList
.
contains
(
G
)
&&
0
===
i
?(
S
(
!
0
,
!
0
),
c
=!
0
):
l
&&
i
>
0
?(
R
(
!
1
,
!
1
),
c
=!
0
):
l
||
o
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
U
(
!
0
,
b
.
detail
))}};
b
.
addEventListener
(
"
touchend
"
,
function
(){
e
&&
(
O
(
!
1
),
h
&&
d
(
e
,
!
0
))}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
e
&&
(
O
(
!
1
),
h
&&
d
(
e
,
!
0
))});
var
W
=
function
(){
var
a
=
e
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
e
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
e
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
e
&&
W
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
e
){
var
b
=!
1
,
c
=
e
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
v
)){
var
d
=
e
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
d
&&
d
.
classList
.
remove
(
v
),
b
=!
0
}
c
.
toggle
(
v
),
b
&&
a
.
trigger
(
e
,
"
expand
"
)}
W
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
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
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
if
(
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
){
if
(
a
.
targets
.
toggle
)
return
;
a
.
back
()}})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
f
&&
(
e
=
f
),
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
var
d
=
e
.
opener
();
d
&&
(
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
))}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
examples/hello-mui/examples/offcanvas-left-plus-main.html
View file @
c76be454
...
...
@@ -127,18 +127,19 @@
if
(
slideTogether
)
{
left
=
'
-70%
'
;
}
menu
=
mui
.
create
Window
({
menu
=
mui
.
open
Window
({
id
:
'
offcanvas-plus-menu
'
,
url
:
'
offcanvas-plus-menu.html
'
,
styles
:
{
left
:
left
,
width
:
'
70%
'
,
zindex
:
9998
},
show
:{
aniShow
:
'
none
'
}
});
if
(
menu
)
{
menu
.
show
(
'
none
'
);
}
//初始化主页面位置
mui
.
currentWebview
.
setStyle
({
left
:
0
});
...
...
examples/hello-mui/examples/offcanvas-right-plus-main.html
View file @
c76be454
...
...
@@ -124,16 +124,18 @@
if
(
slideTogether
){
left
=
'
100%
'
;
}
menu
=
mui
.
create
Window
({
menu
=
mui
.
open
Window
({
id
:
'
offcanvas-plus-menu
'
,
url
:
'
offcanvas-plus-menu.html
'
,
styles
:
{
left
:
'
30%
'
,
width
:
'
70%
'
,
zindex
:
9998
},
show
:{
aniShow
:
'
none
'
}
});
menu
.
show
(
'
none
'
);
mui
.
currentWebview
.
setStyle
({
left
:
0
});
});
//点击侧滑按钮
...
...
examples/hello-mui/js/mui.min.js
View file @
c76be454
...
...
@@ -3,5 +3,5 @@
* Mui v0.5.7 (https://github.com/dcloudio/mui)
* =====================================================
*/
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
if
(
"
function
"
==
typeof
b
)
return
i
.
ready
(
b
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
a
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
window
.
mui
=
mui
,
"
$
"
in
window
||
(
window
.
$
=
mui
),
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
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
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
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
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
b
.
addEventListener
(
a
.
EVENT_CLICK
,
function
(
b
){(
a
.
targets
.
popover
||
a
.
targets
.
tab
||
a
.
targets
.
offcanvas
||
a
.
targets
.
modal
)
&&
b
.
preventDefault
()}),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
){
function
b
(
b
){
this
.
os
=
{};
var
c
=
[
function
(){
var
a
=
b
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
]),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
b
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
c
=
b
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
c
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
c
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
c
,
function
(
b
){
return
!
b
.
call
(
a
)})}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
autoShow
:
!
0
,
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({
autoShow
:
!
0
,
title
:
""
},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
,
j
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
k
=
a
.
webviews
[
c
];
return
g
=
k
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
k
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
k
.
afterShowMethodName
&&
g
.
evalJS
(
k
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
),
g
}
var
l
=
a
.
waitingOptions
(
f
.
waiting
);
return
l
.
autoShow
&&
(
i
=
plus
.
nativeUI
.
showWaiting
(
l
.
title
,
l
.
options
)),
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
}),
g
=
a
.
createWindow
(
f
),
h
=
a
.
showOptions
(
f
.
show
),
h
.
autoShow
&&
g
.
addEventListener
(
"
loaded
"
,
function
(){
i
&&
i
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
)},
!
1
),
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),
a
.
extend
({
preload
:
!
0
},
b
.
extras
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
a
.
extend
({
preload
:
!
0
},
c
.
extras
));
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
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
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
c
.
extras
);
d
.
append
(
e
)}));
return
d
}},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
,
b
.
extras
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
if
(
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
)),
a
.
os
.
ios
){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)}})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
setTimeout
(
function
(){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
){
if
(
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
),
c
.
up
){
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}}
else
{
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}},
1
e3
)})}(
mui
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner-cycle
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在加载...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
b
=
this
.
options
;
!
b
.
down
||!
b
.
down
.
hasOwnProperty
(
"
callback
"
)
||
a
.
os
.
plus
&&
a
.
os
.
android
||
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
b
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
b
.
up
&&
b
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
b
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
d
=
this
;
if
(
d
.
bottomPocket
)
if
(
d
.
options
.
up
.
draggable
)
d
.
element
.
addEventListener
(
"
dragup
"
,
function
(
a
){
d
.
dragUp
(
a
)});
else
{
var
e
=
d
.
options
.
up
.
callback
;
if
(
e
){
var
f
=!
1
,
h
=!
1
;
setInterval
(
function
(){
if
(
f
){
if
(
f
=!
1
,
h
)
return
;
var
j
=
c
.
body
.
scrollHeight
;
b
.
innerHeight
+
b
.
scrollY
+
5
>
j
&&
(
d
.
isLoading
=
h
=!
0
,
a
.
gestures
.
stoped
=!
0
,
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
setCaption
(
k
),
e
(
function
(){
d
.
isLoading
=
h
=!
1
,
d
.
setCaption
(
i
),
d
.
pullOptions
=
null
}))}},
250
),
b
.
addEventListener
(
"
scroll
"
,
function
(){
f
=!
0
}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
f
=!
0
})}}
d
.
topPocket
&&
d
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
a
){
d
.
dragDown
(
a
)}),(
d
.
bottomPocket
&&
d
.
options
.
up
.
draggable
===!
0
||
d
.
topPocket
)
&&
(
d
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
d
.
dragStart
(
a
)}),
d
.
element
.
addEventListener
(
"
drag
"
,
function
(
a
){
var
b
=
a
.
detail
.
direction
;
d
.
dragDirection
&&
"
up
"
!==
b
&&
"
down
"
!==
b
&&
d
.
pullOptions
&&
(
d
.
pullOptions
.
height
>
0
?
d
.
dragDown
(
a
):
d
.
dragUp
(
a
))}),
d
.
element
.
addEventListener
(
"
dragend
"
,
function
(
a
){
d
.
dragEnd
(
a
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
a
.
setCaption
(
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
j
:
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
setCaption
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
a
===
k
?
t
+
"
"
+
p
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
b
.
preventDefault
(),
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-slider
"
,
i
=
"
mui-switch
"
,
j
=
"
mui-table-view-cell
"
,
k
=
"
mui-slider-handle
"
,
l
=
"
mui-off-canvas-left
"
,
m
=
"
mui-off-canvas-right
"
,
n
=
"
mui-off-canvas-wrap
"
,
o
=
"
mui-off-canvas-height-fixed
"
,
p
=
"
mui-left
"
,
q
=
"
mui-right
"
,
r
=
"
mui-sliding
"
,
s
=
"
mui-draggable
"
,
t
=
"
.mui-inner-wrap
"
,
u
=
"
.
"
+
l
,
v
=
"
.
"
+
m
,
w
=!
1
,
x
=
1
,
y
=
0
,
z
=
0
,
A
=
0
,
B
=
0
,
C
=
function
(){
y
!==
z
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
y
>
0
?(
y
=
Math
.
min
(
y
,
B
),
0
>
A
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)):
"
left
"
===
g
&&
0
>
y
&&
(
y
=
Math
.
max
(
y
,
-
B
),
A
>
0
?
D
(
e
,
A
+
y
):
D
(
e
,
y
)),
z
=
y
),
f
=
requestAnimationFrame
(
function
(){
C
()})},
D
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
E
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
o
),
f
.
classList
.
add
(
o
),
d
&&
d
.
classList
.
add
(
o
)):(
e
.
classList
.
remove
(
o
),
f
.
classList
.
remove
(
o
),
d
&&
d
.
classList
.
remove
(
o
))},
F
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
r
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
F
),
b
.
contains
(
q
)
||
b
.
contains
(
p
)
||
E
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
w
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
){
if
(
f
.
contains
(
i
))
break
;
if
(
f
.
contains
(
j
)
&&
b
.
querySelector
(
"
.
"
+
k
))
break
;
if
(
f
.
contains
(
h
))
break
;
if
(
f
.
contains
(
n
)
&&
f
.
contains
(
s
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
t
),
!
e
)
return
;
break
}}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
q
)?
w
=!
0
:
d
.
querySelector
(
v
)
&&!
d
.
classList
.
contains
(
p
)
&&
(
w
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
p
)?
w
=!
0
:
d
.
querySelector
(
u
)
&&!
d
.
classList
.
contains
(
q
)
&&
(
w
=!
0
)),
w
){
g
=
c
.
direction
,
B
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
A
=
y
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
r
),
i
.
contains
(
q
)
||
i
.
contains
(
p
)
||
E
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
w
){
var
b
=
a
.
detail
;
f
||
C
(),
y
=
b
.
deltaX
*
x
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
w
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
F
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
y
>
0
?(
a
=
q
,
0
>
A
&&
(
c
.
reverse
(),
a
=
p
),
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
y
&&
(
a
=
p
,
A
>
0
&&
(
c
.
reverse
(),
a
=
q
),
-
y
>
B
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
a
.
preventDefault
(),
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?(
b
.
preventDefault
(),
d
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?(
a
.
preventDefault
(),
b
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;(
"
left
"
==
g
||
"
right
"
==
g
)
&&
(
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
())}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){(
1
!==
b
||
this
.
getSlideNumber
()
!==
b
)
&&
(
b
=
b
>
0
?
-
b
:
b
);
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
var
e
=
null
;
return
this
.
each
(
function
(){
var
f
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
f
=
this
.
querySelector
(
"
.
"
+
d
));
var
g
=
f
.
getAttribute
(
"
data-slider
"
);
g
?(
e
=
a
.
data
[
g
],
e
&&
b
&&
e
.
refresh
(
b
)):(
g
=++
a
.
uuid
,
a
.
data
[
g
]
=
e
=
new
m
(
f
,
b
),
f
.
setAttribute
(
"
data-slider
"
,
g
))}),
e
},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
})}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
var
d
,
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
=
"
mui-active
"
,
v
=
"
mui-selected
"
,
w
=
"
mui-grid-view
"
,
x
=
"
mui-table-view-cell
"
,
y
=
"
mui-disabled
"
,
z
=
"
mui-switch
"
,
A
=
"
mui-btn
"
,
B
=
"
mui-slider-cell
"
,
C
=
"
mui-slider-handle
"
,
D
=
"
mui-slider-left
"
,
E
=
"
mui-slider-right
"
,
F
=
"
mui-bounce
"
,
G
=
"
.
"
+
B
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
"
.
"
+
E
,
K
=
.
4
,
L
=
1
,
M
=
1
,
N
=
function
(
a
){
a
?
e
?
e
.
classList
.
add
(
u
):
d
&&
d
.
classList
.
add
(
u
):
e
?
e
.
classList
.
remove
(
u
):
d
&&
d
.
classList
.
remove
(
u
)},
O
=
function
(){
s
!==
t
&&
(
k
||
n
?(
k
&&
n
?
0
===
h
?
P
(
g
,
s
):
P
(
g
,
h
+
s
):
k
?
0
===
h
?
P
(
g
,
Math
.
max
(
s
,
0
)):
P
(
g
,
Math
.
max
(
h
+
s
,
0
)):
n
&&
(
0
===
h
?
P
(
g
,
Math
.
min
(
s
,
0
)):
P
(
g
,
Math
.
min
(
h
+
s
,
0
))),
k
&&
(
0
===
h
?
s
>
m
&&
(
f
.
style
.
backgroundColor
=
l
,
P
(
k
,
Math
.
max
(
s
-
m
,
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
?
l
:
""
,
P
(
k
,
Math
.
max
(
s
,
0
)))),
n
&&
(
0
===
h
?
-
s
>
p
&&
(
f
.
style
.
backgroundColor
=
o
,
P
(
n
,
Math
.
min
(
-
(
-
s
-
p
),
0
))):(
f
.
style
.
backgroundColor
=
s
>
0
&&!
k
?
""
:
o
,
P
(
n
,
Math
.
min
(
s
,
0
))))):
g
&&
(
0
===
h
&&
s
>
0
||
h
===
i
&&
0
>
s
)
&&
Math
.
abs
(
s
)
<=
i
&&
P
(
g
,
h
+
s
),
t
=
s
),
r
=
requestAnimationFrame
(
function
(){
O
()})},
P
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
Q
=
function
(
b
,
c
){
k
&&
(
k
.
setAttribute
(
"
style
"
,
""
),
n
&&
n
.
setAttribute
(
"
style
"
,
""
),
b
?(
P
(
g
,
m
),
c
&&
a
.
trigger
(
g
,
"
slideright
"
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
R
=
function
(
b
,
c
){
n
&&
(
n
.
setAttribute
(
"
style
"
,
""
),
k
&&
k
.
setAttribute
(
"
style
"
,
""
),
b
?(
P
(
g
,
-
p
),
c
&&
a
.
trigger
(
g
,
"
slideleft
"
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
0
),
d
.
classList
.
remove
(
v
)))},
S
=
function
(
a
){
g
&&
(
a
?(
P
(
g
,
0
),
d
.
classList
.
add
(
v
)):(
P
(
g
,
i
),
d
.
classList
.
remove
(
v
)))},
T
=
function
(
b
,
c
){
q
=!
1
,
r
&&
(
cancelAnimationFrame
(
r
),
r
=
null
),
f
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
s
);
if
(
b
||!
k
&&!
n
)
k
||
n
||
S
(
0
===
h
?
!
(
d
>
i
/
2
):
d
>
i
/
2
);
else
if
(
s
>
0
){
var
e
=
m
/
2
;
if
(
0
!==
h
&&
n
&&
(
R
(
!
(
d
>=
p
/
2
),
!
1
),
e
=
m
/
2
+
p
),
k
){
var
j
=
d
>=
e
;
k
.
classList
.
contains
(
F
)?(
k
.
setAttribute
(
"
style
"
,
""
),
P
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideright
"
)):
Q
(
j
,
!
0
)}}
else
{
var
e
=
m
/
2
;
if
(
0
!==
h
&&
k
&&
(
Q
(
!
(
d
>=
m
/
2
),
!
1
),
e
=
p
/
2
+
m
),
n
){
var
j
=
d
>=
e
;
n
.
classList
.
contains
(
F
)?(
n
.
setAttribute
(
"
style
"
,
""
),
P
(
g
,
0
),
j
&&!
c
.
swipe
&&
a
.
trigger
(
g
,
"
slideleft
"
)):
R
(
j
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
d
=
e
=
g
=
k
=
n
=
q
=
r
=!
1
,
s
=
t
=
h
=
i
=
m
=
p
=
0
,
l
=
o
=
""
;
for
(
var
u
=
b
.
target
,
B
=!
1
;
u
&&
u
!==
c
;
u
=
u
.
parentNode
)
if
(
u
.
classList
){
var
C
=
u
.
classList
;
if
((
"
INPUT
"
===
u
.
tagName
&&
"
radio
"
!==
u
.
type
&&
"
checkbox
"
!==
u
.
type
||
"
BUTTON
"
===
u
.
tagName
||
C
.
contains
(
z
)
||
C
.
contains
(
A
)
||
C
.
contains
(
y
))
&&
(
B
=!
0
),
C
.
contains
(
x
)){
d
=
u
;
var
D
=
d
.
parentNode
.
querySelector
(
"
.
"
+
v
);
if
(
D
&&
D
!=
d
){
D
.
classList
.
remove
(
v
);
var
E
=
D
.
querySelector
(
H
);
if
(
E
){
var
F
=
D
.
querySelector
(
I
);
F
&&
F
.
setAttribute
(
"
style
"
,
""
);
var
O
=
D
.
querySelector
(
J
);
O
&&
O
.
setAttribute
(
"
style
"
,
""
),
F
||
O
?
P
(
E
,
0
):
P
(
E
,
E
.
offsetWidth
)}}
if
(
!
d
.
parentNode
.
classList
.
contains
(
w
)){
var
Q
=
d
.
querySelector
(
"
a
"
);
Q
&&
Q
.
parentNode
===
d
&&
(
e
=
Q
)}
if
(
f
=
d
.
querySelector
(
G
),
f
&&
f
.
parentNode
===
d
){
var
R
=
f
.
querySelector
(
H
);
if
(
R
){
g
=
R
,
i
=
g
.
offsetWidth
,
j
=
a
.
getStyles
(
g
,
"
margin-left
"
),
M
=
L
;
var
S
=
f
.
querySelector
(
I
);
S
&&
(
k
=
S
,
l
=
a
.
getStyles
(
S
,
"
background-color
"
),
m
=
S
.
offsetWidth
);
var
T
=
f
.
querySelector
(
J
);
T
&&
(
n
=
T
,
o
=
a
.
getStyles
(
T
,
"
background-color
"
),
p
=
T
.
offsetWidth
),(
k
||
n
)
&&
(
M
=
K
);
var
U
=
a
.
getStyles
(
g
,
"
webkitTransform
"
),
V
=
a
.
parseTranslateMatrix
(
U
);
h
=
V
?
V
.
x
:
0
}}
B
||
N
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
N
(
!
1
)}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
if
(
g
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
n
||
g
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
n
&&
k
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
0
===
h
)
return
;
q
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
k
||
g
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
k
&&
n
&&
0
===
h
)
return
;
if
(
g
&&!
n
&&!
k
&&
h
===
i
)
return
;
q
=!
0
}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
q
&&
(
r
||
O
(),
s
=
a
.
detail
.
deltaX
*
M
,
a
.
detail
.
gesture
.
preventDefault
())}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
q
&&
T
(
!
1
,
a
.
detail
)}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
k
&&!
k
.
classList
.
contains
(
F
)
&&
0
===
h
?(
Q
(
!
0
,
!
0
),
c
=!
0
):
n
&&
0
>
h
?(
R
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
T
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
swipeleft
"
,
function
(
b
){
if
(
g
){
var
c
=!
1
;
n
&&!
n
.
classList
.
contains
(
F
)
&&
0
===
h
?(
R
(
!
0
,
!
0
),
c
=!
0
):
k
&&
h
>
0
?(
Q
(
!
1
,
!
1
),
c
=!
0
):
k
||
n
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
T
(
!
0
,
b
.
detail
))}}),
b
.
addEventListener
(
"
touchend
"
,
function
(){
d
&&
N
(
!
1
)}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
d
&&
N
(
!
1
)});
var
U
=
function
(){
var
a
=
d
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
d
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
d
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
d
&&
U
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
d
){
var
b
=!
1
,
c
=
d
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
u
)){
var
e
=
d
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
e
&&
e
.
classList
.
remove
(
u
),
b
=!
0
}
c
.
toggle
(
u
),
b
&&
a
.
trigger
(
d
,
"
expand
"
)}
U
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
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
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
if
(
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
){
if
(
a
.
targets
.
toggle
)
return
;
a
.
back
()}})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
f
&&
(
e
=
f
),
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
var
d
=
e
.
opener
();
d
&&
(
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
))}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
var
mui
=
function
(
a
,
b
){
var
c
=
/complete|loaded|interactive/
,
d
=
/^#
([\w
-
]
*
)
$/
,
e
=
/^
\.([\w
-
]
+
)
$/
,
f
=
/^
[\w
-
]
+$/
,
g
=
/translate
(?:
3d
)?\((
.+
?)\)
/
,
h
=
/matrix
(
3d
)?\((
.+
?)\)
/
,
i
=
function
(
b
,
c
){
if
(
c
=
c
||
a
,
!
b
)
return
j
();
if
(
"
object
"
==
typeof
b
)
return
j
([
b
],
null
);
if
(
"
function
"
==
typeof
b
)
return
i
.
ready
(
b
);
try
{
if
(
d
.
test
(
b
)){
var
e
=
a
.
getElementById
(
RegExp
.
$1
);
return
j
(
e
?[
e
]:[])}
return
j
(
i
.
qsa
(
b
,
c
),
b
)}
catch
(
f
){}
return
j
()},
j
=
function
(
a
,
b
){
return
a
=
a
||
[],
a
.
__proto__
=
i
.
fn
,
a
.
selector
=
b
||
""
,
a
};
return
i
.
uuid
=
0
,
i
.
data
=
{},
i
.
extend
=
function
(
a
,
c
,
d
){
a
||
(
a
=
{}),
c
||
(
c
=
{});
for
(
var
e
in
c
)
c
[
e
]
!==
b
&&
(
d
&&
"
object
"
==
typeof
a
[
e
]?
i
.
extend
(
a
[
e
],
c
[
e
],
d
):
a
[
e
]
=
c
[
e
]);
return
a
},
i
.
slice
=
[].
slice
,
i
.
qsa
=
function
(
b
,
c
){
return
c
=
c
||
a
,
i
.
slice
.
call
(
e
.
test
(
b
)?
c
.
getElementsByClassName
(
RegExp
.
$1
):
f
.
test
(
b
)?
c
.
getElementsByTagName
(
b
):
c
.
querySelectorAll
(
b
))},
i
.
ready
=
function
(
b
){
return
c
.
test
(
a
.
readyState
)?
b
(
i
):
a
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(){
b
(
i
)},
!
1
),
this
},
i
.
each
=
function
(
a
,
b
){
return
[].
every
.
call
(
a
,
function
(
a
,
c
){
return
b
.
call
(
a
,
c
,
a
)
!==!
1
}),
this
},
i
.
trigger
=
function
(
a
,
b
,
c
){
return
a
.
dispatchEvent
(
new
CustomEvent
(
b
,{
detail
:
c
,
bubbles
:
!
0
,
cancelable
:
!
0
})),
this
},
i
.
getStyles
=
function
(
a
,
b
){
var
c
=
a
.
ownerDocument
.
defaultView
.
getComputedStyle
(
a
,
null
);
return
b
?
c
.
getPropertyValue
(
b
)
||
c
[
b
]:
c
},
i
.
parseTranslate
=
function
(
a
,
b
){
var
c
=
a
.
match
(
g
||
""
);
return
c
&&
c
[
1
]
||
(
c
=
[
""
,
"
0,0,0
"
]),
c
=
c
[
1
].
split
(
"
,
"
),
c
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])},
b
&&
c
.
hasOwnProperty
(
b
)?
c
[
b
]:
c
},
i
.
parseTranslateMatrix
=
function
(
a
,
b
){
var
c
=
a
.
match
(
h
),
d
=
c
&&
c
[
1
];
c
?(
c
=
c
[
2
].
split
(
"
,
"
),
"
3d
"
===
d
?
c
=
c
.
slice
(
12
,
15
):(
c
.
push
(
0
),
c
=
c
.
slice
(
4
,
7
))):
c
=
[
0
,
0
,
0
];
var
e
=
{
x
:
parseFloat
(
c
[
0
]),
y
:
parseFloat
(
c
[
1
]),
z
:
parseFloat
(
c
[
2
])};
return
b
&&
e
.
hasOwnProperty
(
b
)?
e
[
b
]:
e
},
i
.
fn
=
{
each
:
function
(
a
){
return
[].
every
.
call
(
this
,
function
(
b
,
c
){
return
a
.
call
(
b
,
c
,
b
)
!==!
1
}),
this
}},
i
}(
document
);
!
function
(
a
,
b
,
c
){
a
.
targets
=
{},
a
.
targetHandles
=
[],
a
.
registerTarget
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
targetHandles
.
push
(
b
),
a
.
targetHandles
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
targetHandles
},
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
for
(
var
d
=
b
.
target
,
e
=
{};
d
&&
d
!==
c
;
d
=
d
.
parentNode
){
var
f
=!
1
;
if
(
a
.
each
(
a
.
targetHandles
,
function
(
c
,
g
){
var
h
=
g
.
name
;
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
)))}),
f
)
break
}})}(
mui
,
window
,
document
),
function
(
a
){
String
.
prototype
.
trim
===
a
&&
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
""
)})}(),
function
(){
function
a
(
a
,
b
){
b
=
b
||
{
bubbles
:
!
1
,
cancelable
:
!
1
,
detail
:
void
0
};
var
c
=
document
.
createEvent
(
"
Events
"
),
d
=!
0
;
if
(
b
)
for
(
var
e
in
b
)
"
bubbles
"
===
e
?
d
=!!
b
[
e
]:
c
[
e
]
=
b
[
e
];
return
c
.
initEvent
(
a
,
d
,
!
0
),
c
}
"
undefined
"
==
typeof
window
.
CustomEvent
&&
(
a
.
prototype
=
window
.
Event
.
prototype
,
window
.
CustomEvent
=
a
)}(),
function
(
a
){
"
classList
"
in
a
.
documentElement
||!
Object
.
defineProperty
||
"
undefined
"
==
typeof
HTMLElement
||
Object
.
defineProperty
(
HTMLElement
.
prototype
,
"
classList
"
,{
get
:
function
(){
function
a
(
a
){
return
function
(
c
){
var
d
=
b
.
className
.
split
(
/
\s
+/
),
e
=
d
.
indexOf
(
c
);
a
(
d
,
e
,
c
),
b
.
className
=
d
.
join
(
"
"
)}}
var
b
=
this
,
c
=
{
add
:
a
(
function
(
a
,
b
,
c
){
~
b
||
a
.
push
(
c
)}),
remove
:
a
(
function
(
a
,
b
){
~
b
&&
a
.
splice
(
b
,
1
)}),
toggle
:
a
(
function
(
a
,
b
,
c
){
~
b
?
a
.
splice
(
b
,
1
):
a
.
push
(
c
)}),
contains
:
function
(
a
){
return
!!~
b
.
className
.
split
(
/
\s
+/
).
indexOf
(
a
)},
item
:
function
(
a
){
return
b
.
className
.
split
(
/
\s
+/
)[
a
]
||
null
}};
return
Object
.
defineProperty
(
c
,
"
length
"
,{
get
:
function
(){
return
b
.
className
.
split
(
/
\s
+/
).
length
}}),
c
}})}(
document
),
function
(
a
){
var
b
=
0
;
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
a
.
webkitRequestAnimationFrame
,
a
.
cancelAnimationFrame
=
a
.
webkitCancelAnimationFrame
||
a
.
webkitCancelRequestAnimationFrame
),
a
.
requestAnimationFrame
||
(
a
.
requestAnimationFrame
=
function
(
c
){
var
d
=
(
new
Date
).
getTime
(),
e
=
Math
.
max
(
0
,
16.7
-
(
d
-
b
)),
f
=
a
.
setTimeout
(
function
(){
c
(
d
+
e
)},
e
);
return
b
=
d
+
e
,
f
}),
a
.
cancelAnimationFrame
||
(
a
.
cancelAnimationFrame
=
function
(
a
){
clearTimeout
(
a
)})}(
window
),
function
(
a
,
b
,
c
){
if
(
!
b
.
FastClick
){
var
d
=
function
(
a
,
b
){
return
!
b
.
type
||
"
radio
"
!==
b
.
type
&&
"
checkbox
"
!==
b
.
type
?
!
1
:
b
};
a
.
registerTarget
({
name
:
c
,
index
:
40
,
handle
:
d
,
target
:
!
1
});
var
e
=
function
(
c
){
var
d
=
a
.
targets
.
click
;
if
(
d
){
var
e
,
f
;
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
)}};
b
.
addEventListener
(
"
tap
"
,
e
),
b
.
addEventListener
(
"
doubletap
"
,
e
),
b
.
addEventListener
(
"
click
"
,
function
(
b
){
return
a
.
targets
.
click
&&!
b
.
forwardedTouchEvent
?(
b
.
stopImmediatePropagation
?
b
.
stopImmediatePropagation
():
b
.
propagationStopped
=!
0
,
b
.
stopPropagation
(),
b
.
preventDefault
(),
!
1
):
void
0
},
!
0
)}}(
mui
,
window
,
"
click
"
),
function
(
a
){
a
.
namespace
=
"
mui
"
,
a
.
classNamePrefix
=
a
.
namespace
+
"
-
"
,
a
.
classSelectorPrefix
=
"
.
"
+
a
.
classNamePrefix
,
a
.
className
=
function
(
b
){
return
a
.
classNamePrefix
+
b
},
a
.
classSelector
=
function
(
b
){
return
b
.
replace
(
/
\.
/g
,
a
.
classSelectorPrefix
)},
a
.
eventName
=
function
(
b
,
c
){
return
b
+
(
a
.
namespace
?
"
.
"
+
a
.
namespace
:
""
)
+
(
c
?
"
.
"
+
c
:
""
)}}(
mui
),
function
(
a
,
b
){
a
.
EVENT_START
=
"
touchstart
"
,
a
.
EVENT_MOVE
=
"
touchmove
"
,
a
.
EVENT_END
=
"
touchend
"
,
a
.
EVENT_CANCEL
=
"
touchcancel
"
,
a
.
EVENT_CLICK
=
"
click
"
,
a
.
preventDefault
=
function
(
a
){
a
.
preventDefault
()},
a
.
stopPropagation
=
function
(
a
){
a
.
stopPropagation
()},
a
.
gestures
=
[],
a
.
registerGesture
=
function
(
b
){
return
b
.
index
=
b
.
index
||
1
e3
,
a
.
gestures
.
push
(
b
),
a
.
gestures
.
sort
(
function
(
a
,
b
){
return
a
.
index
-
b
.
index
}),
a
.
gestures
};
var
c
=
function
(
a
,
b
){
var
c
=
b
.
x
-
a
.
x
,
d
=
b
.
y
-
a
.
y
;
return
Math
.
sqrt
(
c
*
c
+
d
*
d
)},
d
=
function
(
a
,
b
){
return
180
*
Math
.
atan2
(
b
.
y
-
a
.
y
,
b
.
x
-
a
.
x
)
/
Math
.
PI
},
e
=
function
(
a
){
return
-
45
>
a
&&
a
>-
135
?
"
up
"
:
a
>=
45
&&
135
>
a
?
"
down
"
:
a
>=
135
||-
135
>=
a
?
"
left
"
:
a
>=-
45
&&
45
>=
a
?
"
right
"
:
null
},
f
=
function
(
b
,
c
){
a
.
gestures
.
stoped
||
a
.
each
(
a
.
gestures
,
function
(
d
,
e
){
a
.
gestures
.
stoped
||
a
.
options
.
gestureConfig
[
e
.
name
]
&&
e
.
hasOwnProperty
(
"
handle
"
)
&&
e
.
handle
(
b
,
c
)})},
g
=
{},
h
=
function
(
b
){
a
.
gestures
.
stoped
=!
1
,
g
=
{
target
:
b
.
target
,
lastTarget
:
g
.
lastTarget
?
g
.
lastTarget
:
null
,
startTime
:
Date
.
now
(),
touchTime
:
0
,
lastTapTime
:
g
.
lastTapTime
?
g
.
lastTapTime
:
0
,
start
:{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
move
:{
x
:
0
,
y
:
0
},
deltaX
:
0
,
deltaY
:
0
,
lastDeltaX
:
0
,
lastDeltaY
:
0
,
angle
:
""
,
direction
:
""
,
distance
:
0
,
drag
:
!
1
,
swipe
:
!
1
,
gesture
:
b
},
f
(
b
,
g
)},
i
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
move
=
{
x
:
b
.
touches
[
0
].
pageX
,
y
:
b
.
touches
[
0
].
pageY
},
g
.
distance
=
c
(
g
.
start
,
g
.
move
),
g
.
angle
=
d
(
g
.
start
,
g
.
move
),
g
.
direction
=
e
(
g
.
angle
),
g
.
lastDeltaX
=
g
.
deltaX
,
g
.
lastDeltaY
=
g
.
deltaY
,
g
.
deltaX
=
g
.
move
.
x
-
g
.
start
.
x
,
g
.
deltaY
=
g
.
move
.
y
-
g
.
start
.
y
,
g
.
gesture
=
b
,
f
(
b
,
g
))},
j
=
function
(
b
){
a
.
gestures
.
stoped
||
(
g
.
touchTime
=
Date
.
now
()
-
g
.
startTime
,
g
.
gesture
=
b
,
f
(
b
,
g
))};
b
.
addEventListener
(
a
.
EVENT_START
,
h
),
b
.
addEventListener
(
a
.
EVENT_MOVE
,
i
),
b
.
addEventListener
(
a
.
EVENT_END
,
j
),
b
.
addEventListener
(
a
.
EVENT_CANCEL
,
j
),
b
.
addEventListener
(
a
.
EVENT_CLICK
,
function
(
b
){(
a
.
targets
.
popover
||
a
.
targets
.
tab
||
a
.
targets
.
offcanvas
||
a
.
targets
.
modal
)
&&
b
.
preventDefault
()}),
a
.
fn
.
on
=
function
(
b
,
c
,
d
){
this
.
each
(
function
(){
var
e
=
this
;
e
.
addEventListener
(
b
,
function
(
b
){
var
f
=
a
.
qsa
(
c
,
e
),
g
=
b
.
target
;
if
(
f
&&
f
.
length
>
0
)
for
(;
g
&&
g
!==
document
&&
g
!==
e
;
g
=
g
.
parentNode
)
g
&&~
f
.
indexOf
(
g
)
&&
(
b
.
detail
?
b
.
detail
.
currentTarget
=
g
:
b
.
detail
=
{
currentTarget
:
g
},
d
.
call
(
g
,
b
))}),
e
.
removeEventListener
(
a
.
EVENT_CLICK
,
k
),
e
.
addEventListener
(
a
.
EVENT_CLICK
,
k
)})};
var
k
=
function
(
a
){
a
.
target
&&
"
INPUT
"
!==
a
.
target
.
tagName
&&
a
.
preventDefault
()}}(
mui
,
window
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
d
.
direction
&&
e
.
swipeMaxTime
>
d
.
touchTime
&&
d
.
distance
>
e
.
swipeMinDistince
&&
"
range
"
!==
c
.
target
.
type
&&
(
d
.
swipe
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
))}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
c
,
options
:{
swipeMaxTime
:
300
,
swipeMinDistince
:
18
}})}(
mui
,
"
swipe
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
switch
(
c
.
type
){
case
a
.
EVENT_MOVE
:
d
.
direction
&&
(
d
.
drag
||
(
d
.
drag
=!
0
,
a
.
trigger
(
c
.
target
,
b
+
"
start
"
,
d
)),
a
.
trigger
(
c
.
target
,
b
,
d
),
a
.
trigger
(
c
.
target
,
b
+
d
.
direction
,
d
));
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
d
.
drag
&&
a
.
trigger
(
c
.
target
,
b
+
"
end
"
,
d
)}};
a
.
registerGesture
({
name
:
b
,
index
:
20
,
handle
:
c
,
options
:{}})}(
mui
,
"
drag
"
),
function
(
a
,
b
){
var
c
=
function
(
c
,
d
){
if
(
c
.
type
===
a
.
EVENT_END
||
c
.
type
===
a
.
EVENT_CANCEL
){
var
e
=
this
.
options
;
if
(
d
.
distance
<
e
.
tabMaxDistance
&&
d
.
touchTime
<
e
.
tapMaxTime
){
if
(
a
.
options
.
gestureConfig
.
doubletap
&&
d
.
lastTarget
&&
d
.
lastTarget
===
c
.
target
&&
d
.
lastTapTime
&&
d
.
startTime
-
d
.
lastTapTime
<
e
.
tabMaxInterval
)
return
a
.
trigger
(
c
.
target
,
"
doubletap
"
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
void
(
d
.
lastTarget
=
c
.
target
);
a
.
trigger
(
c
.
target
,
b
,
d
),
d
.
lastTapTime
=
Date
.
now
(),
d
.
lastTarget
=
c
.
target
}}};
a
.
registerGesture
({
name
:
b
,
index
:
30
,
handle
:
c
,
options
:{
tabMaxInterval
:
300
,
tabMaxDistance
:
5
,
tapMaxTime
:
250
}})}(
mui
,
"
tap
"
),
function
(
a
,
b
){
var
c
,
d
=
function
(
d
,
e
){
var
f
=
this
.
options
;
switch
(
d
.
type
){
case
a
.
EVENT_START
:
clearTimeout
(
c
),
c
=
setTimeout
(
function
(){
e
.
drag
||
a
.
trigger
(
d
.
target
,
b
,
e
)},
f
.
holdTimeout
);
break
;
case
a
.
EVENT_MOVE
:
e
.
distance
>
f
.
holdThreshold
&&
clearTimeout
(
c
);
break
;
case
a
.
EVENT_END
:
case
a
.
EVENT_CANCEL
:
clearTimeout
(
c
)}};
a
.
registerGesture
({
name
:
b
,
index
:
10
,
handle
:
d
,
options
:{
holdTimeout
:
500
,
holdThreshold
:
2
}})}(
mui
,
"
longtap
"
),
function
(
a
,
b
){
function
c
(
c
){
this
.
os
=
{};
var
d
=
[
function
(){
var
a
=
c
.
match
(
/
(
Android
)
;
?[\s\/]
+
([\d
.
]
+
)?
/
);
return
a
&&
(
this
.
os
.
android
=!
0
,
this
.
os
.
version
=
a
[
2
],
this
.
os
.
isBadAndroid
=!
/Chrome
\/\d
/
.
test
(
b
.
navigator
.
appVersion
)),
this
.
os
.
android
===!
0
},
function
(){
var
a
=
c
.
match
(
/
(
iPhone
\s
OS
)\s([\d
_
]
+
)
/
);
if
(
a
)
this
.
os
.
ios
=
this
.
os
.
iphone
=!
0
,
this
.
os
.
version
=
a
[
2
].
replace
(
/_/g
,
"
.
"
);
else
{
var
b
=
c
.
match
(
/
(
iPad
)
.*OS
\s([\d
_
]
+
)
/
);
b
&&
(
this
.
os
.
ios
=
this
.
os
.
ipad
=!
0
,
this
.
os
.
version
=
b
[
2
].
replace
(
/_/g
,
"
.
"
))}
return
this
.
os
.
ios
===!
0
}];[].
every
.
call
(
d
,
function
(
b
){
return
!
b
.
call
(
a
)})}
c
.
call
(
a
,
navigator
.
userAgent
)}(
mui
,
window
),
function
(
a
){
function
b
(
a
){
this
.
os
=
this
.
os
||
{};
var
b
=
a
.
match
(
/Html5Plus/i
);
b
&&
(
this
.
os
.
plus
=!
0
)}
b
.
call
(
a
,
navigator
.
userAgent
)}(
mui
),
function
(
a
){
var
b
=
[];
a
.
global
=
a
.
options
=
{
gestureConfig
:{
tap
:
!
0
,
doubletap
:
!
0
,
longtap
:
!
0
,
swipe
:
!
0
,
drag
:
!
0
}},
a
.
initGlobal
=
function
(
b
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
b
,
!
0
),
this
},
a
.
init
=
function
(
c
){
return
a
.
options
=
a
.
extend
(
a
.
global
,
c
||
{},
!
0
),
a
.
ready
(
function
(){
for
(
var
c
=
0
,
d
=
b
.
length
;
d
>
c
;
c
++
)
b
[
c
].
call
(
a
)}),
this
},
a
.
init
.
add
=
function
(
a
){
b
.
push
(
a
)}}(
mui
),
function
(
a
){
var
b
=
{
optimize
:
!
0
,
swipeBack
:
!
1
,
preloadPages
:[],
preloadLimit
:
10
},
c
=
{
autoShow
:
!
0
,
duration
:
a
.
os
.
ios
?
200
:
100
,
aniShow
:
"
slide-in-right
"
};
a
.
options
.
show
&&
(
c
=
a
.
extend
(
c
,
a
.
options
.
show
,
!
0
)),
a
.
currentWebview
=
null
,
a
.
isHomePage
=!
1
,
a
.
extend
(
a
.
global
,
b
),
a
.
extend
(
a
.
options
,
b
),
a
.
waitingOptions
=
function
(
b
){
return
a
.
extend
({
autoShow
:
!
0
,
title
:
""
},
b
)},
a
.
showOptions
=
function
(
b
){
return
a
.
extend
(
c
,
b
)},
a
.
windowOptions
=
function
(
b
){
return
a
.
extend
({
scalable
:
!
1
,
bounce
:
""
},
b
)},
a
.
plusReady
=
function
(
a
){
return
window
.
plus
?
a
():
document
.
addEventListener
(
"
plusready
"
,
function
(){
a
()},
!
1
),
this
},
a
.
fire
=
function
(
a
,
b
,
c
){
a
&&
a
.
evalJS
(
"
mui&&mui.receive('
"
+
b
+
"
','
"
+
JSON
.
stringify
(
c
||
{})
+
"
')
"
)},
a
.
receive
=
function
(
b
,
c
){
b
&&
(
c
=
JSON
.
parse
(
c
),
a
.
trigger
(
document
,
b
,
c
))};
var
d
=
function
(
b
){
if
(
!
b
.
preloaded
){
a
.
fire
(
b
,
"
preload
"
);
for
(
var
c
=
b
.
children
(),
d
=
0
;
d
<
c
.
length
;
d
++
)
a
.
fire
(
c
[
d
],
"
preload
"
);
b
.
preloaded
=!
0
}},
e
=
function
(
b
,
c
,
d
){
if
(
d
){
if
(
!
b
[
c
+
"
ed
"
]){
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
);
b
[
c
+
"
ed
"
]
=!
0
}}
else
{
a
.
fire
(
b
,
c
);
for
(
var
e
=
b
.
children
(),
f
=
0
;
f
<
e
.
length
;
f
++
)
a
.
fire
(
e
[
f
],
c
)}};
a
.
openWindow
=
function
(
b
,
c
,
f
){
if
(
window
.
plus
){
"
object
"
==
typeof
b
?(
f
=
b
,
b
=
f
.
url
,
c
=
f
.
id
||
b
):
"
object
"
==
typeof
c
?(
f
=
c
,
c
=
b
):
c
=
c
||
b
,
f
=
f
||
{};
var
g
,
h
,
i
,
j
=
f
.
params
||
{};
if
(
a
.
webviews
[
c
]){
var
k
=
a
.
webviews
[
c
];
return
g
=
k
.
webview
,
g
&&
g
.
getURL
()
||
(
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
,
preload
:
!
0
}),
g
=
a
.
createWindow
(
f
)),
h
=
k
.
show
,
h
=
f
.
show
?
a
.
extend
(
h
,
f
.
show
):
h
,
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
k
.
afterShowMethodName
&&
g
.
evalJS
(
k
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
),
g
}
var
l
=
a
.
waitingOptions
(
f
.
waiting
);
return
l
.
autoShow
&&
(
i
=
plus
.
nativeUI
.
showWaiting
(
l
.
title
,
l
.
options
)),
f
=
a
.
extend
(
f
,{
id
:
c
,
url
:
b
}),
g
=
a
.
createWindow
(
f
),
h
=
a
.
showOptions
(
f
.
show
),
h
.
autoShow
&&
g
.
addEventListener
(
"
loaded
"
,
function
(){
i
&&
i
.
close
(),
g
.
show
(
h
.
aniShow
,
h
.
duration
,
function
(){
d
(
g
),
e
(
g
,
"
pagebeforeshow
"
,
!
1
)}),
g
.
showed
=!
0
,
f
.
afterShowMethodName
&&
g
.
evalJS
(
f
.
afterShowMethodName
+
"
('
"
+
JSON
.
stringify
(
j
)
+
"
')
"
)},
!
1
),
g
}},
a
.
createWindow
=
function
(
b
,
c
){
if
(
window
.
plus
){
var
d
,
e
=
b
.
id
||
b
.
url
;
if
(
b
.
preload
){
a
.
webviews
[
e
]
&&
a
.
webviews
[
e
].
webview
.
getURL
()?
d
=
a
.
webviews
[
e
].
webview
:(
d
=
plus
.
webview
.
create
(
b
.
url
,
e
,
a
.
windowOptions
(
b
.
styles
),
a
.
extend
({
preload
:
!
0
},
b
.
extras
)),
b
.
subpages
&&
a
.
each
(
b
.
subpages
,
function
(
b
,
c
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
a
.
extend
({
preload
:
!
0
},
c
.
extras
));
d
.
append
(
e
)})),
a
.
webviews
[
e
]
=
{
webview
:
d
,
preload
:
!
0
,
show
:
a
.
showOptions
(
b
.
show
),
afterShowMethodName
:
b
.
afterShowMethodName
};
var
f
=
a
.
data
.
preloads
,
g
=
f
.
indexOf
(
e
);
if
(
~
g
&&
f
.
splice
(
g
,
1
),
f
.
push
(
e
),
f
.
length
>
a
.
options
.
preloadLimit
){
var
h
=
a
.
data
.
preloads
.
shift
(),
i
=
a
.
webviews
[
h
];
i
&&
i
.
webview
&&
a
.
closeAll
(
i
.
webview
),
delete
a
.
webviews
[
h
]}}
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
){
var
e
=
plus
.
webview
.
create
(
c
.
url
,
c
.
id
||
c
.
url
,
a
.
windowOptions
(
c
.
styles
),
c
.
extras
);
d
.
append
(
e
)}));
return
d
}},
a
.
preload
=
function
(
b
){
b
.
preload
||
(
b
.
preload
=!
0
),
a
.
createWindow
(
b
)},
a
.
closeOpened
=
function
(
b
){
var
c
=
b
.
opened
();
if
(
c
)
for
(
var
d
=
0
,
e
=
c
.
length
;
e
>
d
;
d
++
){
var
f
=
c
[
d
],
g
=
f
.
opened
();
g
&&
g
.
length
>
0
?
a
.
closeOpened
(
f
):
f
.
parent
()
!==
b
&&
f
.
close
(
"
none
"
)}},
a
.
closeAll
=
function
(
b
,
c
){
a
.
closeOpened
(
b
),
c
?
b
.
close
(
c
):
b
.
close
()},
a
.
createWindows
=
function
(
b
){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
c
,
!
1
)})},
a
.
appendWebview
=
function
(
b
){
if
(
window
.
plus
){
var
c
,
d
=
b
.
id
||
b
.
url
;
return
a
.
webviews
[
d
]
||
(
c
=
plus
.
webview
.
create
(
b
.
url
,
d
,
b
.
styles
,
b
.
extras
),
c
.
addEventListener
(
"
loaded
"
,
function
(){
a
.
currentWebview
.
append
(
c
)}),
a
.
webviews
[
d
]
=
b
),
c
}},
a
.
webviews
=
{},
a
.
data
.
preloads
=
[],
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
subpages
||
[];
a
.
plusReady
(
function
(){
if
(
a
.
currentWebview
=
plus
.
webview
.
currentWebview
(),
a
.
each
(
c
,
function
(
b
,
c
){
a
.
appendWebview
(
c
)}),
a
.
currentWebview
==
plus
.
webview
.
getWebviewById
(
plus
.
runtime
.
appid
)
&&
(
a
.
isHomePage
=!
0
,
setTimeout
(
function
(){
d
(
a
.
currentWebview
)},
300
)),
a
.
os
.
ios
){
var
b
=
a
.
options
.
statusBarBackground
?
a
.
options
.
statusBarBackground
:
"
#f7f7f7
"
;
plus
.
navigator
.
setStatusBarBackground
(
b
)}})}),
window
.
addEventListener
(
"
preload
"
,
function
(){
var
b
=
a
.
options
.
preloadPages
||
[];
a
.
plusReady
(
function
(){
a
.
each
(
b
,
function
(
b
,
c
){
a
.
createWindow
(
a
.
extend
(
c
,{
preload
:
!
0
}))})})})}(
mui
),
function
(
a
){
a
.
init
.
add
(
function
(){
var
b
=
a
.
options
,
c
=
b
.
pullRefresh
||
{};
setTimeout
(
function
(){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
){
if
(
c
.
down
&&
a
.
plus_pulldownRefresh
(
c
.
down
),
c
.
up
){
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
({
container
:
b
,
up
:
c
.
up
})}}}
else
{
var
b
=
c
.
container
;
if
(
b
){
var
d
=
a
(
b
);
1
===
d
.
length
&&
d
.
pullRefresh
(
c
)}}},
1
e3
)})}(
mui
),
function
(
a
){
a
.
get
=
function
(
a
,
c
,
d
){
b
(
"
GET
"
,
a
,
c
,
d
)},
a
.
post
=
function
(
a
,
c
,
d
){
b
(
"
POST
"
,
a
,
c
,
d
)};
var
b
=
function
(
a
,
b
,
c
,
d
){
var
e
=
new
XMLHttpRequest
,
f
=
/^
([\w
-
]
+:
)\/\/
/
.
test
(
b
)?
RegExp
.
$1
:
window
.
location
.
protocol
;
e
.
onreadystatechange
=
function
(){
4
===
e
.
readyState
&&
(
e
.
status
>=
200
&&
e
.
status
<
300
||
304
===
e
.
status
||
0
===
e
.
status
&&
"
file:
"
===
f
?
c
&&
c
(
e
.
responseText
):
d
&&
d
())},
e
.
open
(
a
,
b
,
!
0
),
e
.
send
()}}(
mui
),
function
(
a
,
b
,
c
){
a
.
offset
=
function
(
a
){
var
d
=
{
top
:
0
,
left
:
0
};
return
typeof
a
.
getBoundingClientRect
!==
c
&&
(
d
=
a
.
getBoundingClientRect
()),{
top
:
d
.
top
+
b
.
pageYOffset
-
a
.
clientTop
,
left
:
d
.
left
+
b
.
pageXOffset
-
a
.
clientLeft
}}}(
mui
,
window
),
function
(
a
,
b
){
a
.
scrollTo
=
function
(
a
,
c
,
d
){
c
=
c
||
1
e3
;
var
e
=
function
(
c
){
if
(
0
>=
c
)
return
void
(
d
&&
d
());
var
f
=
a
-
b
.
scrollY
;
setTimeout
(
function
(){
b
.
scrollTo
(
0
,
b
.
scrollY
+
f
/
c
*
10
),
e
(
c
-
10
)},
16.7
)};
e
(
c
)}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-pull-top-pocket
"
,
e
=
"
mui-pull-bottom-pocket
"
,
f
=
"
mui-pull
"
,
g
=
"
mui-pull-loading
"
,
h
=
"
mui-pull-caption
"
,
i
=
h
+
"
-down
"
,
j
=
h
+
"
-over
"
,
k
=
h
+
"
-refresh
"
,
l
=
"
mui-icon
"
,
m
=
"
mui-icon-spinner-cycle
"
,
n
=
"
mui-icon-pulldown
"
,
o
=
"
mui-spin
"
,
p
=
"
mui-in
"
,
q
=
"
mui-reverse
"
,
r
=
g
+
"
"
+
l
+
"
"
+
n
+
"
"
+
q
,
s
=
g
+
"
"
+
l
+
"
"
+
n
,
t
=
g
+
"
"
+
l
+
"
"
+
m
+
"
"
+
o
,
u
=
{
down
:{
height
:
50
,
contentdown
:
"
下拉可刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
},
up
:{
height
:
50
,
contentdown
:
"
上拉显示更多
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在加载...
"
,
duration
:
300
}},
v
=
[
'
<div class="
'
+
f
+
'
">
'
,
'
<div class="
'
+
s
+
'
"></div>
'
,
'
<div class="
'
+
h
+
'
">
'
,
'
<span class="
'
+
i
+
"
"
+
p
+
'
">{downCaption}</span>
'
,
'
<span class="
'
+
j
+
'
">{overCaption}</span>
'
,
'
<span class="
'
+
k
+
'
">{refreshCaption}</span>
'
,
"
</div>
"
,
"
</div>
"
],
w
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
(
u
,
c
,
!
0
),
this
.
options
.
up
.
height
=-
this
.
options
.
up
.
height
,
this
.
pullOptions
=
null
,
this
.
init
()};
w
.
prototype
.
init
=
function
(){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
this
.
element
.
style
.
position
=
"
relative
"
,
this
.
element
.
style
[
"
-webkit-backface-visibility
"
]
=
"
hidden
"
,
this
.
translateY
=
0
,
this
.
lastTranslateY
=
0
,
this
.
initPocket
(),
this
.
initEvent
()},
w
.
prototype
.
initPocket
=
function
(){
var
a
=
this
.
options
;
a
.
down
&&
a
.
down
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
topPocket
=
this
.
element
.
querySelector
(
"
.
"
+
d
),
this
.
topPocket
||
(
this
.
topPocket
=
this
.
createPocket
(
d
,
a
.
down
),
this
.
element
.
insertBefore
(
this
.
topPocket
,
this
.
element
.
firstChild
))),
a
.
up
&&
a
.
up
.
hasOwnProperty
(
"
callback
"
)
&&
(
this
.
bottomPocket
=
this
.
element
.
querySelector
(
"
.
"
+
e
),
this
.
bottomPocket
||
(
this
.
bottomPocket
=
this
.
createPocket
(
e
,
a
.
up
),
this
.
element
.
appendChild
(
this
.
bottomPocket
)))},
w
.
prototype
.
createPocket
=
function
(
a
,
b
){
var
d
=
c
.
createElement
(
"
div
"
);
return
d
.
className
=
a
,
d
.
innerHTML
=
v
.
join
(
""
).
replace
(
"
{downCaption}
"
,
b
.
contentdown
).
replace
(
"
{overCaption}
"
,
b
.
contentover
).
replace
(
"
{refreshCaption}
"
,
b
.
contentrefresh
),
d
},
w
.
prototype
.
initEvent
=
function
(){
var
d
=
this
;
if
(
d
.
bottomPocket
)
if
(
d
.
options
.
up
.
draggable
)
d
.
element
.
addEventListener
(
"
dragup
"
,
function
(
a
){
d
.
dragUp
(
a
)});
else
{
var
e
=
d
.
options
.
up
.
callback
;
if
(
e
){
var
f
=!
1
,
h
=!
1
;
setInterval
(
function
(){
if
(
f
){
if
(
f
=!
1
,
h
)
return
;
var
j
=
c
.
body
.
scrollHeight
;
b
.
innerHeight
+
b
.
scrollY
+
5
>
j
&&
(
d
.
isLoading
=
h
=!
0
,
a
.
gestures
.
stoped
=!
0
,
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
setCaption
(
k
),
e
(
function
(){
d
.
isLoading
=
h
=!
1
,
d
.
setCaption
(
i
),
d
.
pullOptions
=
null
}))}},
250
),
b
.
addEventListener
(
"
scroll
"
,
function
(){
f
=!
0
}),
b
.
addEventListener
(
"
dragend
"
,
function
(
a
){
"
up
"
===
a
.
detail
.
direction
&&
(
f
=!
0
)})}}
d
.
topPocket
&&
d
.
element
.
addEventListener
(
"
dragdown
"
,
function
(
a
){
d
.
dragDown
(
a
)}),(
d
.
bottomPocket
&&
d
.
options
.
up
.
draggable
===!
0
||
d
.
topPocket
)
&&
(
d
.
element
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
d
.
dragStart
(
a
)}),
d
.
element
.
addEventListener
(
"
drag
"
,
function
(
a
){
var
b
=
a
.
detail
.
direction
;
d
.
dragDirection
&&
"
up
"
!==
b
&&
"
down
"
!==
b
&&
d
.
pullOptions
&&
(
d
.
pullOptions
.
height
>
0
?
d
.
dragDown
(
a
):
d
.
dragUp
(
a
))}),
d
.
element
.
addEventListener
(
"
dragend
"
,
function
(
a
){
d
.
dragEnd
(
a
)}))},
w
.
prototype
.
dragStart
=
function
(
a
){
var
b
=
a
.
detail
;(
"
up
"
===
b
.
direction
||
"
down
"
===
b
.
direction
)
&&
(
this
.
element
.
style
.
webkitTransitionDuration
=
"
0s
"
,
this
.
isLoading
=
this
.
dragDirection
=!
1
)},
w
.
prototype
.
dragUp
=
function
(
a
){
var
d
=
this
;
if
(
!
d
.
isLoading
&&
"
down
"
!==
d
.
dragDirection
){
var
e
=
c
.
body
.
scrollHeight
;
!
d
.
dragDirection
&&
b
.
innerHeight
+
b
.
scrollY
+
40
<
e
||
(
b
.
scrollTo
(
0
,
e
),
d
.
pullOptions
=
d
.
options
.
up
,
d
.
loading
=
d
.
bottomPocket
.
querySelector
(
"
.
"
+
g
),
d
.
drag
(
a
))}},
w
.
prototype
.
dragDown
=
function
(
a
){
var
c
=
this
;
if
(
!
c
.
isLoading
&&
"
up
"
!==
c
.
dragDirection
){
var
d
=
b
.
scrollY
;
!
c
.
dragDirection
&&
d
>
5
||
(
0
!==
d
&&
b
.
scrollTo
(
0
,
0
),
c
.
pullOptions
=
c
.
options
.
down
,
c
.
loading
=
c
.
topPocket
.
querySelector
(
"
.
"
+
g
),
c
.
drag
(
a
))}},
w
.
prototype
.
drag
=
function
(
a
){
this
.
pullOptions
&&
(
this
.
pullOptions
.
height
>
0
&&
a
.
detail
.
deltaY
<
0
||
(
this
.
dragDirection
=
this
.
pullOptions
.
height
>
0
?
"
down
"
:
"
up
"
,
this
.
requestAnimationFrame
||
this
.
updateTranslate
(),
a
.
detail
.
gesture
.
preventDefault
(),
this
.
translateY
=
.
4
*
a
.
detail
.
deltaY
))},
w
.
prototype
.
dragEnd
=
function
(
b
){
var
c
=
this
;
c
.
pullOptions
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
Math
.
abs
(.
4
*
b
.
detail
.
deltaY
)
>=
Math
.
abs
(
c
.
pullOptions
.
height
)?
c
.
load
():
this
.
hide
(),
a
.
gestures
.
stoped
=!
0
)},
w
.
prototype
.
hide
=
function
(){
this
.
translateY
=
0
,
this
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
this
.
requestAnimationFrame
),
this
.
requestAnimationFrame
=
null
),
this
.
element
.
style
.
webkitTransitionDuration
=
"
0.5s
"
,
this
.
setTranslate
(
0
),
this
.
setCaption
(
i
),
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
&&
this
.
loading
.
classList
.
remove
(
q
),
this
.
pullOptions
=
null
},
w
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
translateY
!==
a
.
lastTranslateY
&&
(
a
.
translateY
=
Math
.
abs
(
a
.
translateY
)
<
2
?
0
:
a
.
translateY
,
a
.
setTranslate
(
a
.
translateY
),
a
.
setCaption
(
Math
.
abs
(
a
.
translateY
)
>=
Math
.
abs
(
a
.
pullOptions
.
height
)?
j
:
i
),
a
.
lastTranslateY
=
a
.
translateY
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
w
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(0,
"
+
a
+
"
px,0)
"
,
this
.
bottomPocket
&&
(
0
>
a
?
this
.
bottomPocket
.
style
.
bottom
=
(
a
>
this
.
pullOptions
.
height
?
a
:
this
.
pullOptions
.
height
)
+
"
px
"
:
0
===
a
&&
this
.
bottomPocket
.
setAttribute
(
"
style
"
,
""
))},
w
.
prototype
.
load
=
function
(){
var
d
=
this
;
d
.
isLoading
=!
0
,
d
.
setCaption
(
k
),
d
.
setTranslate
(
d
.
pullOptions
.
height
);
var
e
=
d
.
pullOptions
.
callback
;
e
&&
e
(
function
(){
if
(
d
.
pullOptions
&&
d
.
pullOptions
.
height
<
0
){
var
e
=
Math
.
min
(
1
e3
,
d
.
pullOptions
.
duration
);
setTimeout
(
function
(){
a
.
scrollTo
(
c
.
body
.
scrollHeight
-
b
.
innerHeight
,
e
,
function
(){
d
.
isLoading
=!
1
})},
100
)}
else
d
.
isLoading
=!
1
;
d
.
hide
()})},
w
.
prototype
.
setCaption
=
function
(
a
){
var
b
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
this
.
topPocket
:
this
.
bottomPocket
;
if
(
b
){
var
c
=
b
.
querySelector
(
"
.
"
+
h
),
d
=
c
.
querySelector
(
"
.
"
+
p
);
d
&&
d
.
classList
.
remove
(
p
);
var
e
=
c
.
querySelector
(
"
.
"
+
a
);
e
&&
e
.
classList
.
add
(
p
),
this
.
loading
.
className
=
this
.
pullOptions
&&
this
.
pullOptions
.
height
>
0
?
a
===
k
?
t
:
a
===
j
?
r
:
s
:
a
===
k
?
t
+
"
"
+
p
:
t
}},
a
.
fn
.
pullRefresh
=
function
(
b
){
this
.
each
(
function
(){
var
c
=
this
.
getAttribute
(
"
data-pullrefresh
"
);
if
(
!
c
){
var
d
=++
a
.
uuid
;
a
.
data
[
d
]
=
new
w
(
this
,
b
),
this
.
setAttribute
(
"
data-pullrefresh
"
,
d
)}})}}(
mui
,
window
,
document
),
function
(
a
){
var
b
=
{
height
:
50
,
contentdown
:
"
下拉可以刷新
"
,
contentover
:
"
释放立即刷新
"
,
contentrefresh
:
"
正在刷新...
"
};
a
.
plus_pulldownRefresh
=
function
(
c
){
c
=
a
.
extend
(
b
,
c
,
!
0
),
a
.
plusReady
(
function
(){
var
b
=
document
.
body
,
d
=
b
.
getAttribute
(
"
data-pullrefresh-plus
"
);
if
(
!
d
){
d
=++
a
.
uuid
,
b
.
setAttribute
(
"
data-pullrefresh-plus
"
,
d
);
var
e
=
a
.
currentWebview
;
e
.
setPullToRefresh
({
support
:
!
0
,
height
:
c
.
height
+
"
px
"
,
range
:
"
200px
"
,
contentdown
:{
caption
:
c
.
contentdown
},
contentover
:{
caption
:
c
.
contentover
},
contentrefresh
:{
caption
:
c
.
contentrefresh
}},
function
(){
c
.
callback
&&
c
.
callback
(
function
(){
e
.
endPullToRefresh
()})})}})}}(
mui
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-off-canvas-left
"
,
f
=
"
mui-off-canvas-right
"
,
g
=
"
mui-off-canvas-backdrop
"
,
h
=
"
mui-off-canvas-wrap
"
,
i
=
"
mui-off-canvas-height-fixed
"
,
j
=
"
mui-left
"
,
k
=
"
mui-right
"
,
l
=
"
mui-sliding
"
,
m
=
"
.mui-inner-wrap
"
,
n
=
function
(
a
){
if
(
parentNode
=
a
.
parentNode
){
if
(
parentNode
.
classList
.
contains
(
h
))
return
parentNode
;
if
(
parentNode
=
parentNode
.
parentNode
,
parentNode
.
classList
.
contains
(
h
))
return
parentNode
}},
o
=
function
(
b
,
d
){
if
(
d
.
classList
&&
d
.
classList
.
contains
(
g
)){
var
e
=
n
(
d
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
d
}
else
if
(
"
A
"
===
d
.
tagName
&&
d
.
hash
){
var
f
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
));
if
(
f
){
var
e
=
n
(
f
);
if
(
e
)
return
a
.
targets
.
_container
=
e
,
b
.
preventDefault
(),
f
}}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
o
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
p
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
i
),
f
.
classList
.
add
(
i
),
d
&&
d
.
classList
.
add
(
i
)):(
e
.
classList
.
remove
(
i
),
f
.
classList
.
remove
(
i
),
d
&&
d
.
classList
.
remove
(
i
))},
q
=
function
(){
var
a
=
this
.
parentNode
;
a
.
classList
.
remove
(
l
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
1
)},
r
=
function
(
a
,
b
){
if
(
a
&&
b
){
var
c
=
b
.
classList
;
a
.
querySelector
(
m
).
addEventListener
(
"
webkitTransitionEnd
"
,
q
),
a
.
classList
.
contains
(
k
)
||
a
.
classList
.
contains
(
j
)
||
p
(
a
,
!
0
),
c
.
contains
(
e
)?
a
.
classList
.
toggle
(
k
):
c
.
contains
(
f
)?
a
.
classList
.
toggle
(
j
):
c
.
contains
(
g
)
&&
(
a
.
classList
.
remove
(
k
),
a
.
classList
.
remove
(
j
)),
a
.
classList
.
add
(
l
)}};
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
offcanvas
&&
r
(
a
.
targets
.
_container
,
a
.
targets
.
offcanvas
)}),
a
.
fn
.
offCanvas
=
function
(){
var
a
=
arguments
;
this
.
each
(
function
(){
if
(
"
show
"
===
a
[
0
]
||
"
hide
"
===
a
[
0
]
||
"
toggle
"
===
a
[
0
]){
var
b
=
this
.
classList
;
if
(
b
.
contains
(
e
)
||
b
.
contains
(
f
)){
var
c
=
n
(
this
);
c
&&
r
(
c
,
this
)}}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
){
if
(
!
a
.
os
.
android
){
var
d
,
e
,
f
,
g
,
h
=
"
mui-off-canvas-left
"
,
i
=
"
mui-off-canvas-right
"
,
j
=
"
mui-off-canvas-wrap
"
,
k
=
"
mui-off-canvas-height-fixed
"
,
l
=
"
mui-left
"
,
m
=
"
mui-right
"
,
n
=
"
mui-sliding
"
,
o
=
"
mui-draggable
"
,
p
=
"
.mui-inner-wrap
"
,
q
=
"
.
"
+
h
,
r
=
"
.
"
+
i
,
s
=!
1
,
t
=
1
,
u
=
0
,
v
=
0
,
w
=
0
,
x
=
0
,
y
=
function
(){
u
!==
v
&&
(
e
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
"
right
"
===
g
&&
u
>
0
?(
u
=
Math
.
min
(
u
,
x
),
0
>
w
?
z
(
e
,
w
+
u
):
z
(
e
,
u
)):
"
left
"
===
g
&&
0
>
u
&&
(
u
=
Math
.
max
(
u
,
-
x
),
w
>
0
?
z
(
e
,
w
+
u
):
z
(
e
,
u
)),
v
=
u
),
f
=
requestAnimationFrame
(
function
(){
y
()})},
z
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
A
=
function
(
a
,
b
){
var
d
=
a
.
querySelector
(
"
.mui-content
"
),
e
=
c
.
getElementsByTagName
(
"
html
"
)[
0
],
f
=
c
.
body
;
b
?(
e
.
classList
.
add
(
k
),
f
.
classList
.
add
(
k
),
d
&&
d
.
classList
.
add
(
k
)):(
e
.
classList
.
remove
(
k
),
f
.
classList
.
remove
(
k
),
d
&&
d
.
classList
.
remove
(
k
))},
B
=
function
(){
var
a
=
this
.
parentNode
,
b
=
a
.
classList
;
b
.
remove
(
n
),
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
B
),
b
.
contains
(
m
)
||
b
.
contains
(
l
)
||
A
(
a
,
!
1
)};
b
.
addEventListener
(
"
touchstart
"
,
function
(
a
){
var
b
=
a
.
target
;
for
(
s
=!
1
,
d
=
e
=
null
;
b
&&
b
!==
c
;
b
=
b
.
parentNode
){
var
f
=
b
.
classList
;
if
(
f
&&
f
.
contains
(
j
)
&&
f
.
contains
(
o
)){
if
(
d
=
b
,
e
=
d
.
querySelector
(
p
),
!
e
)
return
;
break
}}}),
b
.
addEventListener
(
"
dragstart
"
,
function
(
b
){
if
(
d
){
var
c
=
b
.
detail
;
if
(
"
left
"
===
c
.
direction
?
d
.
classList
.
contains
(
m
)?
s
=!
0
:
d
.
querySelector
(
r
)
&&!
d
.
classList
.
contains
(
l
)
&&
(
s
=!
0
):
"
right
"
===
c
.
direction
&&
(
d
.
classList
.
contains
(
l
)?
s
=!
0
:
d
.
querySelector
(
q
)
&&!
d
.
classList
.
contains
(
m
)
&&
(
s
=!
0
)),
s
){
g
=
c
.
direction
,
x
=
.
8
*
d
.
offsetWidth
;
var
f
=
a
.
getStyles
(
e
,
"
webkitTransform
"
),
h
=
a
.
parseTranslateMatrix
(
f
);
w
=
u
=
h
?
h
.
x
:
0
;
var
i
=
d
.
classList
;
i
.
add
(
n
),
i
.
contains
(
m
)
||
i
.
contains
(
l
)
||
A
(
d
,
!
0
),
c
.
gesture
.
preventDefault
()}}}),
b
.
addEventListener
(
"
drag
"
,
function
(
a
){
if
(
s
){
var
b
=
a
.
detail
;
f
||
y
(),
u
=
b
.
deltaX
*
t
}}),
b
.
addEventListener
(
"
dragend
"
,
function
(){
if
(
s
){
f
&&
(
cancelAnimationFrame
(
f
),
f
=
null
),
e
.
setAttribute
(
"
style
"
,
""
),
e
.
addEventListener
(
"
webkitTransitionEnd
"
,
B
);
var
a
,
b
=
d
.
classList
,
c
=
[
"
add
"
,
"
remove
"
];
"
right
"
===
g
&&
u
>
0
?(
a
=
m
,
0
>
w
&&
(
c
.
reverse
(),
a
=
l
),
u
>
x
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
)):
"
left
"
===
g
&&
0
>
u
&&
(
a
=
l
,
w
>
0
&&
(
c
.
reverse
(),
a
=
m
),
-
u
>
x
/
2
?
b
[
c
[
0
]](
a
):
b
[
c
[
1
]](
a
))}})}}(
mui
,
window
,
document
,
"
offcanvas
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-action
"
,
f
=
function
(
a
,
b
){
return
b
.
className
&&~
b
.
className
.
indexOf
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
})}(
mui
,
window
,
document
,
"
action
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-modal
"
,
f
=
function
(
a
,
b
){
if
(
"
A
"
===
b
.
tagName
&&
b
.
hash
){
var
d
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
));
if
(
d
&&
d
.
classList
.
contains
(
e
))
return
a
.
preventDefault
(),
d
}
return
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
50
,
handle
:
f
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
modal
&&
a
.
targets
.
modal
.
classList
.
toggle
(
"
mui-active
"
)})}(
mui
,
window
,
document
,
"
modal
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-popover
"
,
f
=
"
mui-bar-popover
"
,
g
=
"
mui-popover-action
"
,
h
=
"
mui-backdrop
"
,
i
=
"
mui-bar-backdrop
"
,
j
=
"
mui-backdrop-action
"
,
k
=
"
mui-active
"
,
l
=
function
(
b
,
d
){
return
"
A
"
===
d
.
tagName
&&
d
.
hash
&&
(
a
.
targets
.
_popover
=
c
.
getElementById
(
d
.
hash
.
replace
(
"
#
"
,
""
)),
a
.
targets
.
_popover
&&
a
.
targets
.
_popover
.
classList
.
contains
(
e
))?(
b
.
preventDefault
(),
d
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
60
,
handle
:
l
,
target
:
!
1
,
isReset
:
!
1
,
isContinue
:
!
0
});
var
m
=
function
(
a
){
a
?
c
.
body
.
setAttribute
(
"
style
"
,
"
position:fixed;width:100%;height:100%;overflow:hidden;
"
):
c
.
body
.
setAttribute
(
"
style
"
,
""
)},
n
=
function
(){
this
.
style
.
display
=
"
none
"
,
this
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
)},
o
=
function
(){
var
b
=
c
.
createElement
(
"
div
"
);
return
b
.
classList
.
add
(
h
),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
_popover
;
b
&&
(
b
.
addEventListener
(
"
webkitTransitionEnd
"
,
n
),
b
.
classList
.
remove
(
k
),
b
.
parentNode
.
removeChild
(
o
))}),
b
}();
b
.
addEventListener
(
"
tap
"
,
function
(){
a
.
targets
.
popover
&&
p
(
a
.
targets
.
_popover
,
a
.
targets
.
popover
)});
var
p
=
function
(
a
,
d
){
o
.
classList
.
remove
(
i
),
o
.
classList
.
remove
(
j
);
var
e
=
c
.
querySelector
(
"
.mui-popover.mui-active
"
);
if
(
!
e
||
(
e
.
style
.
display
=
"
none
"
,
e
.
classList
.
remove
(
k
),
e
.
removeEventListener
(
"
webkitTransitionEnd
"
,
n
),
m
(
!
1
),
e
.
parentNode
.
removeChild
(
o
),
a
!==
e
)){
if
(
a
.
classList
.
contains
(
f
)
||
a
.
classList
.
contains
(
g
))
if
(
a
.
classList
.
contains
(
g
))
o
.
classList
.
add
(
j
);
else
if
(
o
.
classList
.
add
(
i
),
d
&&
d
.
parentNode
){
var
h
=
d
.
offsetWidth
,
l
=
d
.
offsetLeft
,
p
=
b
.
innerWidth
;
a
.
style
.
left
=
Math
.
min
(
Math
.
max
(
l
,
5
),
p
-
h
-
5
)
+
"
px
"
}
a
.
style
.
display
=
"
block
"
,
a
.
offsetHeight
,
a
.
classList
.
add
(
k
),
a
.
parentNode
.
appendChild
(
o
),
m
(
!
0
),
o
.
classList
.
add
(
k
)}};
a
.
fn
.
popover
=
function
(){
var
b
=
arguments
;
this
.
each
(
function
(){
a
.
targets
.
_popover
=
this
,(
"
show
"
===
b
[
0
]
||
"
hide
"
===
b
[
0
]
||
"
toggle
"
===
b
[
0
])
&&
p
(
this
,
b
[
1
])})}}(
mui
,
window
,
document
,
"
popover
"
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-control-item
"
,
f
=
"
mui-control-content
"
,
g
=
"
mui-tab-item
"
,
h
=
function
(
a
,
b
){
return
b
.
classList
&&
(
b
.
classList
.
contains
(
e
)
||
b
.
classList
.
contains
(
g
))?(
a
.
preventDefault
(),
b
):
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
80
,
handle
:
h
,
target
:
!
1
}),
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
tab
;
if
(
b
){
var
e
,
g
,
h
,
i
=
"
mui-active
"
,
j
=
"
.
"
+
i
;
e
=
b
.
parentNode
.
querySelector
(
j
),
e
&&
e
.
classList
.
remove
(
i
);
var
k
=
b
===
e
;
if
(
b
&&
b
.
classList
.
add
(
i
),
b
.
hash
&&
(
h
=
c
.
getElementById
(
b
.
hash
.
replace
(
"
#
"
,
""
)))){
if
(
!
h
.
classList
.
contains
(
f
))
return
void
b
.
classList
[
k
?
"
remove
"
:
"
add
"
](
i
);
if
(
!
k
){
g
=
h
.
parentNode
.
getElementsByClassName
(
i
);
for
(
var
l
=
0
;
l
<
g
.
length
;
l
++
)
g
[
l
].
classList
.
remove
(
i
);
h
.
classList
.
add
(
i
);
var
m
=
h
.
parentNode
.
querySelectorAll
(
"
.
"
+
f
);
a
.
trigger
(
h
,
a
.
eventName
(
"
shown
"
,
d
),{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
m
,
h
)})}}}})}(
mui
,
window
,
document
,
"
tab
"
),
function
(
a
,
b
){
var
c
=
"
mui-slider
"
,
d
=
"
mui-slider-group
"
,
e
=
"
mui-slider-loop
"
,
f
=
"
mui-slider-indicator
"
,
g
=
"
mui-action-previous
"
,
h
=
"
mui-action-next
"
,
i
=
"
mui-slider-item
"
,
j
=
"
.
"
+
i
,
k
=
"
.
"
+
f
,
l
=
"
.mui-slider-progress-bar
"
,
m
=
function
(
b
,
c
){
this
.
element
=
b
,
this
.
options
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
c
),
this
.
init
()};
m
.
prototype
.
init
=
function
(){
this
.
initEvent
(),
this
.
initTimer
()},
m
.
prototype
.
refresh
=
function
(
b
){
var
c
=
a
.
extend
({
slideshowDelay
:
0
,
factor
:
1
},
b
);
this
.
options
.
slideshowDelay
!=
c
.
slideshowDelay
&&
(
this
.
options
.
slideshowDelay
=
c
.
slideshowDelay
,
this
.
options
.
slideshowDelay
&&
this
.
nextItem
())},
m
.
prototype
.
initEvent
=
function
(){
var
b
=
this
,
c
=
b
.
element
,
d
=
c
.
parentNode
;
b
.
translateX
=
0
,
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBarWidth
=
0
,
b
.
progressBar
=
d
.
querySelector
(
l
),
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
);
var
f
=!
1
;
b
.
isSwipeable
=!
1
,
d
.
addEventListener
(
"
dragstart
"
,
function
(
a
){
var
d
=
a
.
detail
,
g
=
d
.
direction
;
if
(
"
left
"
===
g
||
"
right
"
===
g
){
f
=!
0
,
b
.
translateX
=
b
.
lastTranslateX
=
0
,
b
.
scrollX
=
b
.
getScroll
(),
b
.
sliderWidth
=
c
.
offsetWidth
,
b
.
isLoop
=
c
.
classList
.
contains
(
e
),
b
.
sliderLength
=
c
.
querySelectorAll
(
j
).
length
,
b
.
progressBar
&&
(
b
.
progressBarWidth
=
b
.
progressBar
.
offsetWidth
),
b
.
maxTranslateX
=
(
b
.
sliderLength
-
1
)
*
b
.
sliderWidth
,
a
.
detail
.
gesture
.
preventDefault
();
var
h
=!
0
;
b
.
isLoop
||
(
"
right
"
===
g
&&
0
===
b
.
scrollX
?
h
=!
1
:
"
left
"
===
g
&&
b
.
scrollX
===-
b
.
maxTranslateX
&&
(
h
=!
1
)),
h
&&
a
.
stopPropagation
()}}),
d
.
addEventListener
(
"
drag
"
,
function
(
a
){
f
&&
b
.
dragItem
(
a
)}),
d
.
addEventListener
(
"
dragend
"
,
function
(){
f
&&
(
b
.
gotoItem
(
b
.
getSlideNumber
()),
f
=
b
.
isSwipeable
=!
1
)}),
d
.
addEventListener
(
"
swipeleft
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
nextItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
swiperight
"
,
function
(
c
){
b
.
isSwipeable
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
prevItem
(),
f
=
b
.
isSwipeable
=!
1
,
c
.
stopImmediatePropagation
())}),
d
.
addEventListener
(
"
slide
"
,
function
(
a
){
var
b
=
a
.
detail
;
b
.
slideNumber
=
b
.
slideNumber
||
0
;
var
c
=
d
.
querySelector
(
"
.mui-slider-indicator .mui-number span
"
);
c
&&
(
c
.
innerText
=
b
.
slideNumber
+
1
);
for
(
var
e
=
d
.
querySelectorAll
(
"
.mui-slider-indicator .mui-indicator
"
),
f
=
0
,
g
=
e
.
length
;
g
>
f
;
f
++
)
e
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
);
for
(
var
h
=
d
.
querySelectorAll
(
"
.mui-control-item
"
),
f
=
0
,
g
=
h
.
length
;
g
>
f
;
f
++
)
h
[
f
].
classList
[
f
===
b
.
slideNumber
?
"
add
"
:
"
remove
"
](
"
mui-active
"
)}),
d
.
addEventListener
(
a
.
eventName
(
"
shown
"
,
"
tab
"
),
function
(
a
){
b
.
gotoItem
(
-
(
a
.
detail
.
tabNumber
||
0
))});
var
i
=
c
.
parentNode
.
querySelector
(
k
);
i
&&
i
.
addEventListener
(
"
tap
"
,
function
(
a
){
var
c
=
a
.
target
;(
c
.
classList
.
contains
(
g
)
||
c
.
classList
.
contains
(
h
))
&&
(
b
[
c
.
classList
.
contains
(
g
)?
"
prevItem
"
:
"
nextItem
"
](),
a
.
stopPropagation
())})},
m
.
prototype
.
dragItem
=
function
(
a
){
var
b
=
this
,
c
=
a
.
detail
;
if
(
c
.
deltaX
!==
c
.
lastDeltaX
){
var
d
=
c
.
deltaX
*
b
.
options
.
factor
+
b
.
scrollX
;
b
.
element
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
;
var
e
=
0
,
f
=-
b
.
maxTranslateX
;
if
(
b
.
isLoop
&&
(
e
=
b
.
sliderWidth
,
f
+=
e
),
d
>
e
||
f
>
d
)
return
void
(
b
.
isSwipeable
=!
1
);
b
.
requestAnimationFrame
||
b
.
updateTranslate
(),
b
.
isSwipeable
=!
0
,
b
.
translateX
=
d
}
b
.
timer
&&
clearTimeout
(
b
.
timer
),
b
.
timer
=
setTimeout
(
function
(){
b
.
initTimer
()},
100
)},
m
.
prototype
.
updateTranslate
=
function
(){
var
a
=
this
;
a
.
lastTranslateX
!==
a
.
translateX
&&
(
a
.
setTranslate
(
a
.
translateX
),
a
.
lastTranslateX
=
a
.
translateX
),
a
.
requestAnimationFrame
=
requestAnimationFrame
(
function
(){
a
.
updateTranslate
()})},
m
.
prototype
.
setTranslate
=
function
(
a
){
this
.
element
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
,
this
.
updateProcess
(
a
)},
m
.
prototype
.
updateProcess
=
function
(
a
){
var
b
=
this
.
progressBarWidth
;
b
&&
(
a
=
Math
.
abs
(
a
),
this
.
setProcess
(
a
*
(
b
/
this
.
sliderWidth
)))},
m
.
prototype
.
setProcess
=
function
(
a
){
var
b
=
this
.
progressBar
;
b
&&
(
b
.
style
.
webkitTransform
=
"
translate3d(
"
+
a
+
"
px,0,0)
"
)},
m
.
prototype
.
nextItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
next
"
)
-
1
)},
m
.
prototype
.
prevItem
=
function
(){
this
.
gotoItem
(
this
.
getCurrentSlideNumber
(
"
prev
"
)
+
1
)},
m
.
prototype
.
gotoItem
=
function
(
b
){(
1
!==
b
||
this
.
getSlideNumber
()
!==
b
)
&&
(
b
=
b
>
0
?
-
b
:
b
);
var
c
=
this
,
d
=
c
.
element
,
e
=
c
.
sliderLength
;
c
.
isLoop
?
e
-=
2
:(
e
-=
1
,
b
=
Math
.
min
(
0
,
b
),
b
=
Math
.
max
(
b
,
-
e
)),
c
.
requestAnimationFrame
&&
(
cancelAnimationFrame
(
c
.
requestAnimationFrame
),
c
.
requestAnimationFrame
=
null
);
var
f
=
Math
.
max
(
b
,
-
e
)
*
d
.
offsetWidth
;
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
c
.
setTranslate
(
f
);
var
g
=
function
(){
d
.
style
[
"
-webkit-transition-duration
"
]
=
"
0
"
,
d
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
*
d
.
offsetWidth
+
"
px,0,0)
"
,
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
)};
d
.
removeEventListener
(
"
webkitTransitionEnd
"
,
g
),
c
.
isLoop
&&
(
1
===
b
||
b
===-
e
)
&&
(
b
=
1
===
b
?
-
e
+
1
:
0
,
d
.
addEventListener
(
"
webkitTransitionEnd
"
,
g
)),
a
.
trigger
(
d
.
parentNode
,
"
slide
"
,{
slideNumber
:
Math
.
abs
(
b
)}),
this
.
initTimer
()},
m
.
prototype
.
getSlideNumber
=
function
(){
return
Math
.
round
(
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getCurrentSlideNumber
=
function
(
a
){
return
Math
[
"
next
"
===
a
?
"
ceil
"
:
"
floor
"
](
this
.
getScroll
()
/
this
.
sliderWidth
)},
m
.
prototype
.
getScroll
=
function
(){
var
b
=
this
.
element
,
c
=
0
;
if
(
"
webkitTransform
"
in
b
.
style
){
var
d
=
a
.
parseTranslate
(
b
.
style
.
webkitTransform
);
c
=
d
?
d
.
x
:
0
}
return
c
},
m
.
prototype
.
initTimer
=
function
(){
var
a
=
this
,
c
=
a
.
options
.
slideshowDelay
;
if
(
c
){
var
d
=
a
.
element
,
e
=
d
.
getAttribute
(
"
data-slidershowTimer
"
);
e
&&
b
.
clearTimeout
(
e
),
e
=
b
.
setTimeout
(
function
(){
d
&&
((
d
.
offsetWidth
||
d
.
offsetHeight
)
&&
a
.
nextItem
(),
a
.
initTimer
())},
c
),
d
.
setAttribute
(
"
data-slidershowTimer
"
,
e
)}},
a
.
fn
.
slider
=
function
(
b
){
var
e
=
null
;
return
this
.
each
(
function
(){
var
f
=
this
;
this
.
classList
.
contains
(
c
)
&&
(
f
=
this
.
querySelector
(
"
.
"
+
d
));
var
g
=
f
.
getAttribute
(
"
data-slider
"
);
g
?(
e
=
a
.
data
[
g
],
e
&&
b
&&
e
.
refresh
(
b
)):(
g
=++
a
.
uuid
,
a
.
data
[
g
]
=
e
=
new
m
(
f
,
b
),
f
.
setAttribute
(
"
data-slider
"
,
g
))}),
e
},
a
.
ready
(
function
(){
a
(
"
.mui-slider-group
"
).
slider
()})}(
mui
,
window
),
function
(
a
,
b
,
c
,
d
){
var
e
=
"
mui-switch
"
,
f
=
"
mui-switch-handle
"
,
g
=
"
mui-active
"
,
h
=
"
.
"
+
f
,
i
=
function
(
a
,
b
){
return
b
.
classList
&&
b
.
classList
.
contains
(
e
)?
b
:
!
1
};
a
.
registerTarget
({
name
:
d
,
index
:
100
,
handle
:
i
,
target
:
!
1
});
var
j
,
i
,
k
,
l
,
m
,
n
=
function
(
b
){
if
(
j
){
var
c
=
b
.
detail
;
a
.
gestures
.
stoped
=!
0
;
var
d
=!
c
.
drag
&&!
j
.
classList
.
contains
(
g
)
||
c
.
drag
&&
c
.
deltaX
>
k
/
2
-
l
/
2
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
.2s
"
,
d
?(
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
,
j
.
classList
.
add
(
g
)):(
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
,
j
.
classList
.
remove
(
g
)),
a
.
trigger
(
j
,
"
toggle
"
,{
isActive
:
d
}),
j
.
removeEventListener
(
"
dragstart
"
,
a
.
stopPropagation
)}},
o
=
function
(
a
){
if
(
j
){
var
b
=
a
.
detail
.
deltaX
;
if
(
0
>
b
)
return
i
.
style
.
webkitTransform
=
"
translate3d(0,0,0)
"
;
if
(
b
>
m
)
return
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
m
+
"
px,0,0)
"
;
i
.
style
[
"
-webkit-transition-duration
"
]
=
"
0s
"
,
i
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
,
j
.
classList
[
b
>
k
/
2
-
l
/
2
?
"
add
"
:
"
remove
"
](
g
)}};
b
.
addEventListener
(
a
.
EVENT_START
,
function
(
b
){
j
=
a
.
targets
.
toggle
,
j
&&
(
j
.
addEventListener
(
"
dragstart
"
,
a
.
stopPropagation
),
i
=
j
.
querySelector
(
h
),
k
=
j
.
clientWidth
,
l
=
i
.
clientWidth
,
m
=
k
-
l
+
3
,
b
.
preventDefault
())}),
b
.
addEventListener
(
"
tap
"
,
n
),
b
.
addEventListener
(
"
drag
"
,
o
),
b
.
addEventListener
(
"
dragend
"
,
n
)}(
mui
,
window
,
document
,
"
toggle
"
),
function
(
a
,
b
,
c
){
function
d
(
a
,
b
){
var
c
=
b
?
"
removeEventListener
"
:
"
addEventListener
"
;
a
[
c
](
"
dragstart
"
,
V
),
a
[
c
](
"
drag
"
,
V
),
a
[
c
](
"
dragend
"
,
V
),
a
[
c
](
"
swiperight
"
,
V
),
a
[
c
](
"
swipeleft
"
,
V
)}
var
e
,
f
,
g
,
h
,
i
,
j
,
k
,
l
,
m
,
n
,
o
,
p
,
q
,
r
,
s
,
t
,
u
,
v
=
"
mui-active
"
,
w
=
"
mui-selected
"
,
x
=
"
mui-grid-view
"
,
y
=
"
mui-table-view-cell
"
,
z
=
"
mui-disabled
"
,
A
=
"
mui-switch
"
,
B
=
"
mui-btn
"
,
C
=
"
mui-slider-cell
"
,
D
=
"
mui-slider-handle
"
,
E
=
"
mui-slider-left
"
,
F
=
"
mui-slider-right
"
,
G
=
"
mui-bounce
"
,
H
=
"
.
"
+
C
,
I
=
"
.
"
+
D
,
J
=
"
.
"
+
E
,
K
=
"
.
"
+
F
,
L
=
.
4
,
M
=
1
,
N
=
1
,
O
=
function
(
a
){
a
?
f
?
f
.
classList
.
add
(
v
):
e
&&
e
.
classList
.
add
(
v
):
f
?
f
.
classList
.
remove
(
v
):
e
&&
e
.
classList
.
remove
(
v
)},
P
=
function
(){
t
!==
u
&&
(
l
||
o
?(
l
&&
o
?
0
===
i
?
Q
(
h
,
t
):
Q
(
h
,
i
+
t
):
l
?
0
===
i
?
Q
(
h
,
Math
.
max
(
t
,
0
)):
Q
(
h
,
Math
.
max
(
i
+
t
,
0
)):
o
&&
(
0
===
i
?
Q
(
h
,
Math
.
min
(
t
,
0
)):
Q
(
h
,
Math
.
min
(
i
+
t
,
0
))),
l
&&
(
0
===
i
?
t
>
n
&&
(
g
.
style
.
backgroundColor
=
m
,
Q
(
l
,
Math
.
max
(
t
-
n
,
0
))):(
g
.
style
.
backgroundColor
=
t
>
0
?
m
:
""
,
Q
(
l
,
Math
.
max
(
t
,
0
)))),
o
&&
(
0
===
i
?
-
t
>
q
&&
(
g
.
style
.
backgroundColor
=
p
,
Q
(
o
,
Math
.
min
(
-
(
-
t
-
q
),
0
))):(
g
.
style
.
backgroundColor
=
t
>
0
&&!
l
?
""
:
p
,
Q
(
o
,
Math
.
min
(
t
,
0
))))):
h
&&
(
0
===
i
&&
t
>
0
||
i
===
j
&&
0
>
t
)
&&
Math
.
abs
(
t
)
<=
j
&&
Q
(
h
,
i
+
t
),
u
=
t
),
s
=
requestAnimationFrame
(
function
(){
P
()})},
Q
=
function
(
a
,
b
){
a
&&
(
a
.
style
.
webkitTransform
=
"
translate3d(
"
+
b
+
"
px,0,0)
"
)},
R
=
function
(
b
,
c
){
l
&&
(
l
.
setAttribute
(
"
style
"
,
""
),
o
&&
o
.
setAttribute
(
"
style
"
,
""
),
b
?(
Q
(
h
,
n
),
c
&&
a
.
trigger
(
h
,
"
slideright
"
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
0
),
e
.
classList
.
remove
(
w
)))},
S
=
function
(
b
,
c
){
o
&&
(
o
.
setAttribute
(
"
style
"
,
""
),
l
&&
l
.
setAttribute
(
"
style
"
,
""
),
b
?(
Q
(
h
,
-
q
),
c
&&
a
.
trigger
(
h
,
"
slideleft
"
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
0
),
e
.
classList
.
remove
(
w
)))},
T
=
function
(
a
){
h
&&
(
a
?(
Q
(
h
,
0
),
e
.
classList
.
add
(
w
)):(
Q
(
h
,
j
),
e
.
classList
.
remove
(
w
)))},
U
=
function
(
b
,
c
){
r
=!
1
,
s
&&
(
cancelAnimationFrame
(
s
),
s
=
null
),
g
.
setAttribute
(
"
style
"
,
""
);
var
d
=
Math
.
abs
(
t
);
if
(
b
||!
l
&&!
o
)
l
||
o
||
T
(
0
===
i
?
!
(
d
>
j
/
2
):
d
>
j
/
2
);
else
if
(
t
>
0
){
var
e
=
n
/
2
;
if
(
0
!==
i
&&
o
&&
(
S
(
!
(
d
>=
q
/
2
),
!
1
),
e
=
n
/
2
+
q
),
l
){
var
f
=
d
>=
e
;
l
.
classList
.
contains
(
G
)?(
l
.
setAttribute
(
"
style
"
,
""
),
Q
(
h
,
0
),
f
&&!
c
.
swipe
&&
a
.
trigger
(
h
,
"
slideright
"
)):
R
(
f
,
!
0
)}}
else
{
var
e
=
n
/
2
;
if
(
0
!==
i
&&
l
&&
(
R
(
!
(
d
>=
n
/
2
),
!
1
),
e
=
q
/
2
+
n
),
o
){
var
f
=
d
>=
e
;
o
.
classList
.
contains
(
G
)?(
o
.
setAttribute
(
"
style
"
,
""
),
Q
(
h
,
0
),
f
&&!
c
.
swipe
&&
a
.
trigger
(
h
,
"
slideleft
"
)):
S
(
f
,
!
0
)}}};
b
.
addEventListener
(
"
touchstart
"
,
function
(
b
){
e
=
f
=
h
=
l
=
o
=
r
=
s
=!
1
,
t
=
u
=
i
=
j
=
n
=
q
=
0
,
m
=
p
=
""
;
for
(
var
v
=
b
.
target
,
C
=!
1
;
v
&&
v
!==
c
;
v
=
v
.
parentNode
)
if
(
v
.
classList
){
var
D
=
v
.
classList
;
if
((
"
INPUT
"
===
v
.
tagName
&&
"
radio
"
!==
v
.
type
&&
"
checkbox
"
!==
v
.
type
||
"
BUTTON
"
===
v
.
tagName
||
D
.
contains
(
A
)
||
D
.
contains
(
B
)
||
D
.
contains
(
z
))
&&
(
C
=!
0
),
D
.
contains
(
y
)){
e
=
v
;
var
E
=
e
.
parentNode
.
querySelector
(
"
.
"
+
w
);
if
(
E
&&
E
!=
e
){
E
.
classList
.
remove
(
w
);
var
F
=
E
.
querySelector
(
I
);
if
(
F
){
var
G
=
E
.
querySelector
(
J
);
G
&&
G
.
setAttribute
(
"
style
"
,
""
);
var
P
=
E
.
querySelector
(
K
);
P
&&
P
.
setAttribute
(
"
style
"
,
""
),
G
||
P
?
Q
(
F
,
0
):
Q
(
F
,
F
.
offsetWidth
)}}
if
(
!
e
.
parentNode
.
classList
.
contains
(
x
)){
var
R
=
e
.
querySelector
(
"
a
"
);
R
&&
R
.
parentNode
===
e
&&
(
f
=
R
)}
if
(
g
=
e
.
querySelector
(
H
),
g
&&
g
.
parentNode
===
e
){
var
S
=
g
.
querySelector
(
I
);
if
(
S
){
d
(
e
),
h
=
S
,
j
=
h
.
offsetWidth
,
k
=
a
.
getStyles
(
h
,
"
margin-left
"
),
N
=
M
;
var
T
=
g
.
querySelector
(
J
);
T
&&
(
l
=
T
,
m
=
a
.
getStyles
(
T
,
"
background-color
"
),
n
=
T
.
offsetWidth
);
var
U
=
g
.
querySelector
(
K
);
U
&&
(
o
=
U
,
p
=
a
.
getStyles
(
U
,
"
background-color
"
),
q
=
U
.
offsetWidth
),(
l
||
o
)
&&
(
N
=
L
);
var
V
=
a
.
getStyles
(
h
,
"
webkitTransform
"
),
W
=
a
.
parseTranslateMatrix
(
V
);
i
=
W
?
W
.
x
:
0
}}
C
||
O
(
!
0
);
break
}}}),
b
.
addEventListener
(
"
touchmove
"
,
function
(){
O
(
!
1
)});
var
V
=
{
handleEvent
:
function
(
a
){
switch
(
a
.
type
){
case
"
dragstart
"
:
this
.
dragstart
(
a
);
break
;
case
"
drag
"
:
this
.
drag
(
a
);
break
;
case
"
dragend
"
:
this
.
dragend
(
a
);
break
;
case
"
swiperight
"
:
this
.
swiperight
(
a
);
break
;
case
"
swipeleft
"
:
this
.
swipeleft
(
a
)}},
dragstart
:
function
(
a
){
var
b
=
a
.
detail
,
c
=
b
.
direction
,
d
=
b
.
angle
;
if
(
"
left
"
===
c
){
if
((
o
||
h
)
&&
(
d
>
150
||-
150
>
d
)){
if
(
!
o
&&
l
&&
0
===
i
)
return
;
if
(
h
&&!
o
&&!
l
&&
0
===
i
)
return
;
r
=!
0
}}
else
if
(
"
right
"
===
c
&&
(
l
||
h
)
&&
d
>-
30
&&
30
>
d
){
if
(
!
l
&&
o
&&
0
===
i
)
return
;
if
(
h
&&!
o
&&!
l
&&
i
===
j
)
return
;
r
=!
0
}
r
&&
a
.
stopPropagation
()},
drag
:
function
(
a
){
r
&&
(
s
||
P
(),
t
=
a
.
detail
.
deltaX
*
N
,
a
.
detail
.
gesture
.
preventDefault
())},
dragend
:
function
(
a
){
r
&&
U
(
!
1
,
a
.
detail
)},
swiperight
:
function
(
b
){
var
c
=!
1
;
l
&&!
l
.
classList
.
contains
(
G
)
&&
0
===
i
?(
R
(
!
0
,
!
0
),
c
=!
0
):
o
&&
0
>
i
?(
S
(
!
1
,
!
1
),
c
=!
0
):
l
||
o
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
U
(
!
0
,
b
.
detail
))},
swipeleft
:
function
(
b
){
var
c
=!
1
;
o
&&!
o
.
classList
.
contains
(
G
)
&&
0
===
i
?(
S
(
!
0
,
!
0
),
c
=!
0
):
l
&&
i
>
0
?(
R
(
!
1
,
!
1
),
c
=!
0
):
l
||
o
||
(
c
=!
0
),
c
&&
(
a
.
gestures
.
stoped
=!
0
,
b
.
stopImmediatePropagation
(),
U
(
!
0
,
b
.
detail
))}};
b
.
addEventListener
(
"
touchend
"
,
function
(){
e
&&
(
O
(
!
1
),
h
&&
d
(
e
,
!
0
))}),
b
.
addEventListener
(
"
touchcancel
"
,
function
(){
e
&&
(
O
(
!
1
),
h
&&
d
(
e
,
!
0
))});
var
W
=
function
(){
var
a
=
e
.
classList
;
if
(
a
.
contains
(
"
mui-radio
"
)){
var
b
=
e
.
querySelector
(
"
input[type=radio]
"
);
b
&&
b
.
click
()}
else
if
(
a
.
contains
(
"
mui-checkbox
"
)){
var
b
=
e
.
querySelector
(
"
input[type=checkbox]
"
);
b
&&
b
.
click
()}};
b
.
addEventListener
(
"
doubletap
"
,
function
(){
e
&&
W
()}),
b
.
addEventListener
(
"
tap
"
,
function
(){
if
(
e
){
var
b
=!
1
,
c
=
e
.
classList
;
if
(
c
.
contains
(
"
mui-collapse
"
)){
if
(
!
c
.
contains
(
v
)){
var
d
=
e
.
parentNode
.
querySelector
(
"
.mui-collapse.mui-active
"
);
d
&&
d
.
classList
.
remove
(
v
),
b
=!
0
}
c
.
toggle
(
v
),
b
&&
a
.
trigger
(
e
,
"
expand
"
)}
W
()}})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
alert
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
"
确定
"
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
alert
(
c
,
f
,
d
,
e
)}
else
b
.
alert
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
confirm
=
function
(
c
,
d
,
e
,
f
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
c
)
return
;
"
function
"
==
typeof
d
?(
f
=
d
,
d
=
null
,
e
=
null
):
"
function
"
==
typeof
e
&&
(
f
=
e
,
e
=
null
),
plus
.
nativeUI
.
confirm
(
c
,
f
,
d
,
e
)}
else
b
.
confirm
(
c
)}}(
mui
,
window
),
function
(
a
,
b
){
a
.
prompt
=
function
(
c
,
d
,
e
,
f
,
g
){
if
(
a
.
os
.
plus
){
if
(
void
0
===
typeof
message
)
return
;
"
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
),
plus
.
nativeUI
.
prompt
(
c
,
g
,
e
,
d
,
f
)}
else
b
.
prompt
(
c
)}}(
mui
,
window
),
function
(
a
){
a
.
toast
=
function
(
b
){
if
(
a
.
os
.
plus
&&
a
.
os
.
android
)
plus
.
nativeUI
.
toast
(
b
,{
verticalAlign
:
"
bottom
"
});
else
{
var
c
=
document
.
createElement
(
"
div
"
);
c
.
classList
.
add
(
"
mui-toast-container
"
),
c
.
innerHTML
=
'
<div class="mui-toast-message">
'
+
b
+
"
</div>
"
,
document
.
body
.
appendChild
(
c
),
setTimeout
(
function
(){
document
.
body
.
removeChild
(
c
)},
2
e3
)}}}(
mui
,
window
),
function
(
a
,
b
,
c
){
var
d
=
"
mui-icon
"
,
e
=
"
mui-icon-clear
"
,
f
=
"
mui-icon-speech
"
,
g
=
"
mui-icon-search
"
,
h
=
"
mui-input-row
"
,
i
=
"
mui-placeholder
"
,
j
=
"
mui-tooltip
"
,
k
=
"
mui-hidden
"
,
l
=
"
.
"
+
e
,
m
=
"
.
"
+
f
,
n
=
"
.
"
+
i
,
o
=
"
.
"
+
j
,
p
=
function
(
a
){
for
(;
a
&&
a
!==
c
;
a
=
a
.
parentNode
)
if
(
a
.
classList
&&
a
.
classList
.
contains
(
h
))
return
a
;
return
null
},
q
=
function
(
a
,
b
){
this
.
element
=
a
,
this
.
options
=
b
||
{
actions
:
"
clear
"
},
~
this
.
options
.
actions
.
indexOf
(
"
slider
"
)?(
this
.
sliderActionClass
=
j
+
"
"
+
k
,
this
.
sliderActionSelector
=
o
):(
~
this
.
options
.
actions
.
indexOf
(
"
clear
"
)
&&
(
this
.
clearActionClass
=
d
+
"
"
+
e
+
(
a
.
value
?
""
:
"
"
+
k
),
this
.
clearActionSelector
=
l
),
~
this
.
options
.
actions
.
indexOf
(
"
speech
"
)
&&
(
this
.
speechActionClass
=
d
+
"
"
+
f
,
this
.
speechActionSelector
=
m
),
~
this
.
options
.
actions
.
indexOf
(
"
search
"
)
&&
(
this
.
searchActionClass
=
i
,
this
.
searchActionSelector
=
n
)),
this
.
init
()};
q
.
prototype
.
init
=
function
(){
this
.
initAction
(),
this
.
initElementEvent
()},
q
.
prototype
.
initAction
=
function
(){
var
a
=
this
,
b
=
a
.
element
.
parentNode
;
b
&&
(
a
.
sliderActionClass
?
a
.
sliderAction
=
a
.
createAction
(
b
,
a
.
sliderActionClass
,
a
.
sliderActionSelector
):(
a
.
searchActionClass
&&
(
a
.
searchAction
=
a
.
createAction
(
b
,
a
.
searchActionClass
,
a
.
searchActionSelector
),
a
.
searchAction
.
addEventListener
(
"
tap
"
,
function
(){
setTimeout
(
function
(){
a
.
element
.
focus
()},
0
)})),
a
.
speechActionClass
&&
(
a
.
speechAction
=
a
.
createAction
(
b
,
a
.
speechActionClass
,
a
.
speechActionSelector
),
a
.
speechAction
.
addEventListener
(
"
click
"
,
function
(
a
){
a
.
stopPropagation
()}),
a
.
speechAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
speechActionClick
(
b
)})),
a
.
clearActionClass
&&
(
a
.
clearAction
=
a
.
createAction
(
b
,
a
.
clearActionClass
,
a
.
clearActionSelector
),
a
.
clearAction
.
addEventListener
(
"
tap
"
,
function
(
b
){
a
.
clearActionClick
(
b
)}))))},
q
.
prototype
.
createAction
=
function
(
a
,
b
,
e
){
var
f
=
a
.
querySelector
(
e
);
if
(
!
f
){
var
f
=
c
.
createElement
(
"
span
"
);
f
.
className
=
b
,
b
===
this
.
searchActionClass
&&
(
f
.
innerHTML
=
'
<span class="
'
+
d
+
"
"
+
g
+
'
"></span>
'
+
this
.
element
.
getAttribute
(
"
placeholder
"
),
this
.
element
.
setAttribute
(
"
placeholder
"
,
""
)),
a
.
insertBefore
(
f
,
this
.
element
.
nextSibling
)}
return
f
},
q
.
prototype
.
initElementEvent
=
function
(){
var
b
=
this
.
element
;
if
(
this
.
sliderActionClass
){
var
c
=
this
.
sliderAction
,
d
=
b
.
offsetLeft
,
e
=
b
.
offsetWidth
-
28
,
f
=
c
.
offsetWidth
,
g
=
Math
.
abs
(
b
.
max
-
b
.
min
),
h
=
null
,
i
=
function
(){
c
.
classList
.
remove
(
k
),
f
=
f
||
c
.
offsetWidth
;
var
a
=
Math
.
abs
(
b
.
value
)
/
g
*
e
;
c
.
style
.
left
=
14
+
d
+
a
-
f
/
2
+
"
px
"
,
c
.
innerText
=
b
.
value
,
h
&&
clearTimeout
(
h
),
h
=
setTimeout
(
function
(){
c
.
classList
.
add
(
k
)},
1
e3
)};
b
.
addEventListener
(
"
input
"
,
i
),
b
.
addEventListener
(
"
tap
"
,
i
)}
else
{
if
(
this
.
clearActionClass
){
var
j
=
this
.
clearAction
;
if
(
!
j
)
return
;
a
.
each
([
"
keyup
"
,
"
change
"
,
"
input
"
,
"
focus
"
,
"
blur
"
,
"
cut
"
,
"
paste
"
],
function
(
a
,
c
){
!
function
(
a
){
b
.
addEventListener
(
a
,
function
(){
j
.
classList
[
b
.
value
.
trim
()?
"
remove
"
:
"
add
"
](
k
)})}(
c
)})}
this
.
searchActionClass
&&
(
b
.
addEventListener
(
"
focus
"
,
function
(){
b
.
parentNode
.
classList
.
add
(
"
mui-active
"
)}),
b
.
addEventListener
(
"
blur
"
,
function
(){
b
.
value
.
trim
()
||
b
.
parentNode
.
classList
.
remove
(
"
mui-active
"
)}))}},
q
.
prototype
.
clearActionClick
=
function
(
a
){
this
.
element
.
value
=
""
,
this
.
element
.
focus
(),
this
.
clearAction
.
classList
.
add
(
k
),
a
.
preventDefault
()},
q
.
prototype
.
speechActionClick
=
function
(
a
){
if
(
b
.
plus
){
var
c
=
this
;
c
.
element
.
value
=
""
,
plus
.
speech
.
startRecognize
({
engine
:
"
iFly
"
},
function
(
a
){
c
.
element
.
value
+=
a
,
setTimeout
(
function
(){
c
.
element
.
focus
()},
0
),
plus
.
speech
.
stopRecognize
()},
function
(){})}
else
alert
(
"
only for 5+
"
);
a
.
preventDefault
()},
a
.
fn
.
input
=
function
(){
this
.
each
(
function
(){
var
b
=
[],
c
=
p
(
this
.
parentNode
);
if
(
"
range
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-input-range
"
))
b
.
push
(
"
slider
"
);
else
{
var
d
=
this
.
classList
;
d
.
contains
(
"
mui-input-clear
"
)
&&
b
.
push
(
"
clear
"
),
d
.
contains
(
"
mui-input-speech
"
)
&&
b
.
push
(
"
speech
"
),
"
search
"
===
this
.
type
&&
c
.
classList
.
contains
(
"
mui-search
"
)
&&
b
.
push
(
"
search
"
)}
var
e
=
this
.
getAttribute
(
"
data-input-
"
+
b
[
0
]);
if
(
!
e
){
e
=++
a
.
uuid
,
a
.
data
[
e
]
=
new
q
(
this
,{
actions
:
b
.
join
(
"
,
"
)});
for
(
var
f
=
0
,
g
=
b
.
length
;
g
>
f
;
f
++
)
this
.
setAttribute
(
"
data-input-
"
+
b
[
f
],
e
)}})},
a
.
ready
(
function
(){
a
(
"
.mui-input-row input
"
).
input
()})}(
mui
,
window
,
document
),
function
(
a
,
b
){
a
.
back
=
function
(){
b
.
history
.
length
>
1
&&
(
"
function
"
==
typeof
a
.
options
.
back
?
a
.
options
.
back
()
!==!
1
&&
b
.
history
.
back
():
b
.
history
.
back
())},
b
.
addEventListener
(
"
tap
"
,
function
(){
var
b
=
a
.
targets
.
action
;
b
&&
b
.
classList
.
contains
(
"
mui-action-back
"
)
&&
a
.
back
()}),
b
.
addEventListener
(
"
swiperight
"
,
function
(
b
){
var
c
=
b
.
detail
;
if
(
c
.
angle
>-
15
&&
c
.
angle
<
15
&&
a
.
options
.
swipeBack
===!
0
){
if
(
a
.
targets
.
toggle
)
return
;
a
.
back
()}})}(
mui
,
window
),
function
(
a
,
b
){
a
.
back
=
function
(){
var
c
=!
0
,
d
=!
1
;
if
(
"
function
"
==
typeof
a
.
options
.
back
&&
(
d
=
a
.
options
.
back
(),
d
===!
1
&&
(
c
=!
1
)),
c
)
if
(
b
.
plus
){
var
e
=
a
.
currentWebview
,
f
=
e
.
parent
();
f
&&
(
e
=
f
),
e
.
canBack
(
function
(
c
){
if
(
c
.
canBack
)
b
.
history
.
back
();
else
{
var
d
=
e
.
opener
();
d
&&
(
e
.
preload
?
e
.
hide
(
"
auto
"
):
a
.
closeAll
(
e
))}})}
else
b
.
history
.
length
>
1
?
b
.
history
.
back
():
b
.
close
()},
a
.
menu
=
function
(){
var
c
=
document
.
querySelector
(
"
.mui-action-menu
"
);
if
(
c
)
a
.
trigger
(
c
,
"
tap
"
);
else
if
(
b
.
plus
){
var
d
=
a
.
currentWebview
,
e
=
d
.
parent
();
e
&&
e
.
evalJS
(
"
mui&&mui.menu();
"
)}},
a
.
plusReady
(
function
(){
plus
.
key
.
addEventListener
(
"
backbutton
"
,
function
(){
a
.
back
()},
!
1
),
plus
.
key
.
addEventListener
(
"
menubutton
"
,
function
(){
a
.
menu
()},
!
1
)})}(
mui
,
window
);
\ No newline at end of file
examples/hello-mui/list.html
View file @
c76be454
...
...
@@ -127,7 +127,7 @@
</li>-->
</ul>
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/icons.html"
>
icon(图标)
...
...
@@ -361,7 +361,7 @@
</li>
</ul>
</li>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/radio.html"
>
radio(单选框)
...
...
@@ -394,9 +394,9 @@
switch(开关)
</a>
</li>
<li
class=
"mui-table-view-cell mui-collapse"
>
<a
class=
"mui-navigate-right"
href=
"#"
>
tab bar(选项卡)
...
...
@@ -407,7 +407,7 @@
div模式
</a>
</li>
<li
class=
"mui-table-view-cell"
>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
href=
"examples/tab-webview-main.html"
>
webview模式
</a>
...
...
@@ -453,7 +453,7 @@
弹出窗口(Modals)
</a>
</li>-->
<!--<li class="mui-table-view-cell">
<a class="mui-navigate-right" href="examples/preload.html">
...
...
@@ -502,110 +502,109 @@
</ul>
</div>
<script>
var
limit
=
5
,
count
=
0
;
var
limit
=
3
,
count
=
0
;
mui
.
init
({
preloadLimit
:
limit
,
//同时并存的预加载窗口数量
swipeBack
:
false
,
});
$
.
plusReady
(
function
()
{
//初始化一级列表的预加载
$
(
'
#list>.mui-table-view-cell
'
,
document
.
body
).
each
(
function
()
{
//只预加载一级列表,二级列表在其展开时再预加载;
if
(
!
this
.
classList
.
contains
(
'
mui-collapse
'
))
{
var
url
=
this
.
querySelector
(
'
a
'
).
getAttribute
(
"
href
"
);
//预加载,默认使用url作为其id
$
.
createWindow
({
url
:
url
,
preload
:
true
});
if
(
++
count
>=
limit
)
{
return
false
;
(
function
(
$
)
{
$
.
plusReady
(
function
()
{
//初始化一级列表的预加载
$
(
'
#list>.mui-table-view-cell
'
,
document
.
body
).
each
(
function
()
{
//只预加载一级列表,二级列表在其展开时再预加载;
if
(
!
this
.
classList
.
contains
(
'
mui-collapse
'
))
{
var
url
=
this
.
querySelector
(
'
a
'
).
getAttribute
(
"
href
"
);
//预加载,默认使用url作为其id
$
.
preload
({
url
:
url
,
});
if
(
++
count
>=
limit
)
{
return
false
;
}
}
}
});
});
//监听展开事件,预加载二级列表的前几个;
$
(
'
#list
'
).
on
(
'
expand
'
,
'
.mui-collapse
'
,
function
(
e
)
{
count
=
0
;
$
(
'
.mui-table-view a
'
,
this
).
each
(
function
()
{
var
url
=
this
.
getAttribute
(
"
href
"
);
if
(
~
url
.
indexOf
(
'
.html
'
))
{
//单独处理侧滑导航的index
if
(
~
url
.
indexOf
(
'
offcanvas-
'
)){
$
.
createWindow
({
url
:
url
,
styles
:{
zindex
:
9999
},
preload
:
true
});
}
else
{
$
.
createWindow
({
url
:
url
,
preload
:
true
});
}
if
(
++
count
>=
limit
){
return
false
;
//监听展开事件,预加载二级列表的前几个;
$
(
'
#list
'
).
on
(
'
expand
'
,
'
.mui-collapse
'
,
function
(
e
)
{
count
=
0
;
$
(
'
.mui-table-view a
'
,
this
).
each
(
function
()
{
var
url
=
this
.
getAttribute
(
"
href
"
);
if
(
~
url
.
indexOf
(
'
.html
'
))
{
//单独处理侧滑导航的index
if
(
~
url
.
indexOf
(
'
offcanvas-
'
))
{
$
.
preload
({
url
:
url
,
styles
:
{
zindex
:
9999
},
});
}
else
{
$
.
preload
({
url
:
url
,
});
}
if
(
++
count
>=
limit
)
{
return
false
;
}
}
}
});
});
});
});
// 关闭启动界面
plus
.
navigator
.
closeSplashscreen
();
//下拉刷新两个平台有区别;
if
(
$
.
os
.
ios
)
{
document
.
getElementById
(
'
pull-refresh-pandora
'
).
style
.
display
=
"
none
"
;
}
else
if
(
$
.
os
.
android
)
{
document
.
getElementById
(
'
pull-refresh-h5
'
).
style
.
display
=
"
none
"
;
var
list
=
document
.
querySelectorAll
(
'
.ios-only
'
);
if
(
list
){
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
list
[
i
].
style
.
display
=
'
none
'
;
// 关闭启动界面
plus
.
navigator
.
closeSplashscreen
();
//下拉刷新两个平台有区别;
if
(
$
.
os
.
ios
)
{
document
.
getElementById
(
'
pull-refresh-pandora
'
).
style
.
display
=
"
none
"
;
}
else
if
(
$
.
os
.
android
)
{
document
.
getElementById
(
'
pull-refresh-h5
'
).
style
.
display
=
"
none
"
;
var
list
=
document
.
querySelectorAll
(
'
.ios-only
'
);
if
(
list
)
{
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
list
[
i
].
style
.
display
=
'
none
'
;
}
}
}
}
});
/**
* 处理链接点击事件
*/
$
.
ready
(
function
()
{
$
(
'
body
'
).
on
(
'
tap
'
,
'
a
'
,
function
(
e
)
{
var
id
=
this
.
getAttribute
(
'
href
'
);
if
(
id
)
{
if
(
~
id
.
indexOf
(
'
.html
'
))
{
if
(
window
.
plus
)
{
//侧滑导航涉及Index问题,需要单独处理;
if
(
~
id
.
indexOf
(
'
offcanvas-
'
)){
$
.
openWindow
({
id
:
id
,
url
:
this
.
href
,
styles
:{
zindex
:
9999
},
preload
:
true
});
}
else
{
$
.
openWindow
({
id
:
id
,
url
:
this
.
href
,
preload
:
true
});
});
/**
* 处理链接点击事件
*/
$
.
ready
(
function
()
{
$
(
'
body
'
).
on
(
'
tap
'
,
'
a
'
,
function
(
e
)
{
var
id
=
this
.
getAttribute
(
'
href
'
);
if
(
id
)
{
if
(
~
id
.
indexOf
(
'
.html
'
))
{
if
(
window
.
plus
)
{
//侧滑导航涉及Index问题,需要单独处理;
if
(
~
id
.
indexOf
(
'
offcanvas-
'
))
{
$
.
openWindow
({
id
:
id
,
url
:
this
.
href
,
styles
:
{
zindex
:
9999
},
preload
:
true
});
}
else
{
$
.
openWindow
({
id
:
id
,
url
:
this
.
href
,
preload
:
true
});
}
}
else
{
document
.
location
.
href
=
this
.
href
;
}
}
else
{
if
(
typeof
plus
!==
'
undefined
'
)
{
plus
.
runtime
.
openURL
(
id
);
}
}
}
}
else
{
document
.
location
.
href
=
this
.
href
;
}
}
else
{
if
(
typeof
plus
!==
'
undefined
'
)
{
plus
.
runtime
.
openURL
(
id
);
}
}
}
});
});
});
});
})(
mui
);
</script>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment