Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
s7-avatar
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8816649c
authored
Jul 21, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
8cbc6e0d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
445 additions
and
428 deletions
+445
-428
.gitignore
+8
-7
Public/static/admin/lib/qiniu/demo/scripts/ui.js
+414
-414
Public/static/js/common.js
+16
-1
Public/static/js/hammer.min.js
+7
-6
No files found.
.gitignore
View file @
8816649c
node_modules
node_modules
/.idea
/.idea
.sass-cache/
.sass-cache/
.DS_Store
.DS_Store
*.css.map
*.css.map
Thumbs.db
Thumbs.db
.phpstorm.meta.php
.phpstorm.meta.php
# Application/Common/Conf
# Application/Common/Conf
\ No newline at end of file
Public/static/admin/lib/qiniu/demo/scripts/ui.js
View file @
8816649c
/*global plupload */
/*global plupload */
/*global qiniu */
/*global qiniu */
function
FileProgress
(
file
,
targetID
)
{
function
FileProgress
(
file
,
targetID
)
{
this
.
fileProgressID
=
file
.
id
;
this
.
fileProgressID
=
file
.
id
;
this
.
file
=
file
;
this
.
file
=
file
;
this
.
opacity
=
100
;
this
.
opacity
=
100
;
this
.
height
=
0
;
this
.
height
=
0
;
this
.
fileProgressWrapper
=
$
(
'#'
+
this
.
fileProgressID
);
this
.
fileProgressWrapper
=
$
(
'#'
+
this
.
fileProgressID
);
if
(
!
this
.
fileProgressWrapper
.
length
)
{
if
(
!
this
.
fileProgressWrapper
.
length
)
{
// <div class="progress">
// <div class="progress">
// <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
// <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
// <span class="sr-only">20% Complete</span>
// <span class="sr-only">20% Complete</span>
// </div>
// </div>
// </div>
// </div>
this
.
fileProgressWrapper
=
$
(
'<tr></tr>'
);
this
.
fileProgressWrapper
=
$
(
'<tr></tr>'
);
var
Wrappeer
=
this
.
fileProgressWrapper
;
var
Wrappeer
=
this
.
fileProgressWrapper
;
Wrappeer
.
attr
(
'id'
,
this
.
fileProgressID
).
addClass
(
'progressContainer'
);
Wrappeer
.
attr
(
'id'
,
this
.
fileProgressID
).
addClass
(
'progressContainer'
);
var
progressText
=
$
(
"<td/>"
);
var
progressText
=
$
(
"<td/>"
);
progressText
.
addClass
(
'progressName'
).
text
(
file
.
name
);
progressText
.
addClass
(
'progressName'
).
text
(
file
.
name
);
var
fileSize
=
plupload
.
formatSize
(
file
.
size
).
toUpperCase
();
var
fileSize
=
plupload
.
formatSize
(
file
.
size
).
toUpperCase
();
var
progressSize
=
$
(
"<td/>"
);
var
progressSize
=
$
(
"<td/>"
);
progressSize
.
addClass
(
"progressFileSize"
).
text
(
fileSize
);
progressSize
.
addClass
(
"progressFileSize"
).
text
(
fileSize
);
var
progressBarTd
=
$
(
"<td/>"
);
var
progressBarTd
=
$
(
"<td/>"
);
var
progressBarBox
=
$
(
"<div/>"
);
var
progressBarBox
=
$
(
"<div/>"
);
progressBarBox
.
addClass
(
'info'
);
progressBarBox
.
addClass
(
'info'
);
var
progressBarWrapper
=
$
(
"<div/>"
);
var
progressBarWrapper
=
$
(
"<div/>"
);
progressBarWrapper
.
addClass
(
"progress progress-striped"
);
progressBarWrapper
.
addClass
(
"progress progress-striped"
);
var
progressBar
=
$
(
"<div/>"
);
var
progressBar
=
$
(
"<div/>"
);
progressBar
.
addClass
(
"progress-bar progress-bar-info"
)
progressBar
.
addClass
(
"progress-bar progress-bar-info"
)
.
attr
(
'role'
,
'progressbar'
)
.
attr
(
'role'
,
'progressbar'
)
.
attr
(
'aria-valuemax'
,
100
)
.
attr
(
'aria-valuemax'
,
100
)
.
attr
(
'aria-valuenow'
,
0
)
.
attr
(
'aria-valuenow'
,
0
)
.
attr
(
'aria-valuein'
,
0
)
.
attr
(
'aria-valuein'
,
0
)
.
width
(
'0%'
);
.
width
(
'0%'
);
var
progressBarPercent
=
$
(
'<span class=sr-only />'
);
var
progressBarPercent
=
$
(
'<span class=sr-only />'
);
progressBarPercent
.
text
(
fileSize
);
progressBarPercent
.
text
(
fileSize
);
var
progressCancel
=
$
(
'<a href=javascript:; />'
);
var
progressCancel
=
$
(
'<a href=javascript:; />'
);
progressCancel
.
show
().
addClass
(
'progressCancel'
).
text
(
'×'
);
progressCancel
.
show
().
addClass
(
'progressCancel'
).
text
(
'×'
);
progressBar
.
append
(
progressBarPercent
);
progressBar
.
append
(
progressBarPercent
);
progressBarWrapper
.
append
(
progressBar
);
progressBarWrapper
.
append
(
progressBar
);
progressBarBox
.
append
(
progressBarWrapper
);
progressBarBox
.
append
(
progressBarWrapper
);
progressBarBox
.
append
(
progressCancel
);
progressBarBox
.
append
(
progressCancel
);
var
progressBarStatus
=
$
(
'<div class="status text-center"/>'
);
var
progressBarStatus
=
$
(
'<div class="status text-center"/>'
);
progressBarBox
.
append
(
progressBarStatus
);
progressBarBox
.
append
(
progressBarStatus
);
progressBarTd
.
append
(
progressBarBox
);
progressBarTd
.
append
(
progressBarBox
);
Wrappeer
.
append
(
progressText
);
Wrappeer
.
append
(
progressText
);
Wrappeer
.
append
(
progressSize
);
Wrappeer
.
append
(
progressSize
);
Wrappeer
.
append
(
progressBarTd
);
Wrappeer
.
append
(
progressBarTd
);
$
(
'#'
+
targetID
).
append
(
Wrappeer
);
$
(
'#'
+
targetID
).
append
(
Wrappeer
);
}
else
{
}
else
{
this
.
reset
();
this
.
reset
();
}
}
this
.
height
=
this
.
fileProgressWrapper
.
offset
().
top
;
this
.
height
=
this
.
fileProgressWrapper
.
offset
().
top
;
this
.
setTimer
(
null
);
this
.
setTimer
(
null
);
}
}
FileProgress
.
prototype
.
setTimer
=
function
(
timer
)
{
FileProgress
.
prototype
.
setTimer
=
function
(
timer
)
{
this
.
fileProgressWrapper
.
FP_TIMER
=
timer
;
this
.
fileProgressWrapper
.
FP_TIMER
=
timer
;
};
};
FileProgress
.
prototype
.
getTimer
=
function
(
timer
)
{
FileProgress
.
prototype
.
getTimer
=
function
(
timer
)
{
return
this
.
fileProgressWrapper
.
FP_TIMER
||
null
;
return
this
.
fileProgressWrapper
.
FP_TIMER
||
null
;
};
};
FileProgress
.
prototype
.
reset
=
function
()
{
FileProgress
.
prototype
.
reset
=
function
()
{
this
.
fileProgressWrapper
.
attr
(
'class'
,
"progressContainer"
);
this
.
fileProgressWrapper
.
attr
(
'class'
,
"progressContainer"
);
this
.
fileProgressWrapper
.
find
(
'td .progress .progress-bar-info'
).
attr
(
'aria-valuenow'
,
0
).
width
(
'0%'
).
find
(
'span'
).
text
(
''
);
this
.
fileProgressWrapper
.
find
(
'td .progress .progress-bar-info'
).
attr
(
'aria-valuenow'
,
0
).
width
(
'0%'
).
find
(
'span'
).
text
(
''
);
this
.
appear
();
this
.
appear
();
};
};
FileProgress
.
prototype
.
setChunkProgess
=
function
(
chunk_size
)
{
FileProgress
.
prototype
.
setChunkProgess
=
function
(
chunk_size
)
{
var
chunk_amount
=
Math
.
ceil
(
this
.
file
.
size
/
chunk_size
);
var
chunk_amount
=
Math
.
ceil
(
this
.
file
.
size
/
chunk_size
);
if
(
chunk_amount
===
1
)
{
if
(
chunk_amount
===
1
)
{
return
false
;
return
false
;
}
}
var
viewProgess
=
$
(
'<button class="btn btn-default">查看分块上传进度</button>'
);
var
viewProgess
=
$
(
'<button class="btn btn-default">查看分块上传进度</button>'
);
var
progressBarChunkTr
=
$
(
'<tr class="chunk-status-tr"><td colspan=3></td></tr>'
);
var
progressBarChunkTr
=
$
(
'<tr class="chunk-status-tr"><td colspan=3></td></tr>'
);
var
progressBarChunk
=
$
(
'<div/>'
);
var
progressBarChunk
=
$
(
'<div/>'
);
for
(
var
i
=
1
;
i
<=
chunk_amount
;
i
++
)
{
for
(
var
i
=
1
;
i
<=
chunk_amount
;
i
++
)
{
var
col
=
$
(
'<div class="col-md-2"/>'
);
var
col
=
$
(
'<div class="col-md-2"/>'
);
var
progressBarWrapper
=
$
(
'<div class="progress progress-striped"></div'
);
var
progressBarWrapper
=
$
(
'<div class="progress progress-striped"></div'
);
var
progressBar
=
$
(
"<div/>"
);
var
progressBar
=
$
(
"<div/>"
);
progressBar
.
addClass
(
"progress-bar progress-bar-info text-left"
)
progressBar
.
addClass
(
"progress-bar progress-bar-info text-left"
)
.
attr
(
'role'
,
'progressbar'
)
.
attr
(
'role'
,
'progressbar'
)
.
attr
(
'aria-valuemax'
,
100
)
.
attr
(
'aria-valuemax'
,
100
)
.
attr
(
'aria-valuenow'
,
0
)
.
attr
(
'aria-valuenow'
,
0
)
.
attr
(
'aria-valuein'
,
0
)
.
attr
(
'aria-valuein'
,
0
)
.
width
(
'0%'
)
.
width
(
'0%'
)
.
attr
(
'id'
,
this
.
file
.
id
+
'_'
+
i
)
.
attr
(
'id'
,
this
.
file
.
id
+
'_'
+
i
)
.
text
(
''
);
.
text
(
''
);
var
progressBarStatus
=
$
(
'<span/>'
);
var
progressBarStatus
=
$
(
'<span/>'
);
progressBarStatus
.
addClass
(
'chunk-status'
).
text
();
progressBarStatus
.
addClass
(
'chunk-status'
).
text
();
progressBarWrapper
.
append
(
progressBar
);
progressBarWrapper
.
append
(
progressBar
);
progressBarWrapper
.
append
(
progressBarStatus
);
progressBarWrapper
.
append
(
progressBarStatus
);
col
.
append
(
progressBarWrapper
);
col
.
append
(
progressBarWrapper
);
progressBarChunk
.
append
(
col
);
progressBarChunk
.
append
(
col
);
}
}
if
(
!
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .btn-default'
).
length
){
if
(
!
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .btn-default'
).
length
){
this
.
fileProgressWrapper
.
find
(
'td>div'
).
append
(
viewProgess
);
this
.
fileProgressWrapper
.
find
(
'td>div'
).
append
(
viewProgess
);
}
}
progressBarChunkTr
.
hide
().
find
(
'td'
).
append
(
progressBarChunk
);
progressBarChunkTr
.
hide
().
find
(
'td'
).
append
(
progressBarChunk
);
progressBarChunkTr
.
insertAfter
(
this
.
fileProgressWrapper
);
progressBarChunkTr
.
insertAfter
(
this
.
fileProgressWrapper
);
};
};
FileProgress
.
prototype
.
setProgress
=
function
(
percentage
,
speed
,
chunk_size
)
{
FileProgress
.
prototype
.
setProgress
=
function
(
percentage
,
speed
,
chunk_size
)
{
this
.
fileProgressWrapper
.
attr
(
'class'
,
"progressContainer green"
);
this
.
fileProgressWrapper
.
attr
(
'class'
,
"progressContainer green"
);
var
file
=
this
.
file
;
var
file
=
this
.
file
;
var
uploaded
=
file
.
loaded
;
var
uploaded
=
file
.
loaded
;
var
size
=
plupload
.
formatSize
(
uploaded
).
toUpperCase
();
var
size
=
plupload
.
formatSize
(
uploaded
).
toUpperCase
();
var
formatSpeed
=
plupload
.
formatSize
(
speed
).
toUpperCase
();
var
formatSpeed
=
plupload
.
formatSize
(
speed
).
toUpperCase
();
var
progressbar
=
this
.
fileProgressWrapper
.
find
(
'td .progress'
).
find
(
'.progress-bar-info'
);
var
progressbar
=
this
.
fileProgressWrapper
.
find
(
'td .progress'
).
find
(
'.progress-bar-info'
);
if
(
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
()
===
'取消上传'
){
if
(
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
()
===
'取消上传'
){
return
;
return
;
}
}
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
(
"已上传: "
+
size
+
" 上传速度: "
+
formatSpeed
+
"/s"
);
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
(
"已上传: "
+
size
+
" 上传速度: "
+
formatSpeed
+
"/s"
);
percentage
=
parseInt
(
percentage
,
10
);
percentage
=
parseInt
(
percentage
,
10
);
if
(
file
.
status
!==
plupload
.
DONE
&&
percentage
===
100
)
{
if
(
file
.
status
!==
plupload
.
DONE
&&
percentage
===
100
)
{
percentage
=
99
;
percentage
=
99
;
}
}
progressbar
.
attr
(
'aria-valuenow'
,
percentage
).
css
(
'width'
,
percentage
+
'%'
);
progressbar
.
attr
(
'aria-valuenow'
,
percentage
).
css
(
'width'
,
percentage
+
'%'
);
if
(
chunk_size
)
{
if
(
chunk_size
)
{
var
chunk_amount
=
Math
.
ceil
(
file
.
size
/
chunk_size
);
var
chunk_amount
=
Math
.
ceil
(
file
.
size
/
chunk_size
);
if
(
chunk_amount
===
1
)
{
if
(
chunk_amount
===
1
)
{
return
false
;
return
false
;
}
}
var
current_uploading_chunk
=
Math
.
ceil
(
uploaded
/
chunk_size
);
var
current_uploading_chunk
=
Math
.
ceil
(
uploaded
/
chunk_size
);
var
pre_chunk
,
text
;
var
pre_chunk
,
text
;
for
(
var
index
=
0
;
index
<
current_uploading_chunk
;
index
++
)
{
for
(
var
index
=
0
;
index
<
current_uploading_chunk
;
index
++
)
{
pre_chunk
=
$
(
'#'
+
file
.
id
+
"_"
+
index
);
pre_chunk
=
$
(
'#'
+
file
.
id
+
"_"
+
index
);
pre_chunk
.
width
(
'100%'
).
removeClass
().
addClass
(
'alert-success'
).
attr
(
'aria-valuenow'
,
100
);
pre_chunk
.
width
(
'100%'
).
removeClass
().
addClass
(
'alert-success'
).
attr
(
'aria-valuenow'
,
100
);
text
=
"块"
+
index
+
"上传进度100%"
;
text
=
"块"
+
index
+
"上传进度100%"
;
pre_chunk
.
next
().
html
(
text
);
pre_chunk
.
next
().
html
(
text
);
}
}
var
currentProgessBar
=
$
(
'#'
+
file
.
id
+
"_"
+
current_uploading_chunk
);
var
currentProgessBar
=
$
(
'#'
+
file
.
id
+
"_"
+
current_uploading_chunk
);
var
current_chunk_percent
;
var
current_chunk_percent
;
if
(
current_uploading_chunk
<
chunk_amount
)
{
if
(
current_uploading_chunk
<
chunk_amount
)
{
if
(
uploaded
%
chunk_size
)
{
if
(
uploaded
%
chunk_size
)
{
current_chunk_percent
=
((
uploaded
%
chunk_size
)
/
chunk_size
*
100
).
toFixed
(
2
);
current_chunk_percent
=
((
uploaded
%
chunk_size
)
/
chunk_size
*
100
).
toFixed
(
2
);
}
else
{
}
else
{
current_chunk_percent
=
100
;
current_chunk_percent
=
100
;
currentProgessBar
.
removeClass
().
addClass
(
'alert-success'
);
currentProgessBar
.
removeClass
().
addClass
(
'alert-success'
);
}
}
}
else
{
}
else
{
var
last_chunk_size
=
file
.
size
-
chunk_size
*
(
chunk_amount
-
1
);
var
last_chunk_size
=
file
.
size
-
chunk_size
*
(
chunk_amount
-
1
);
var
left_file_size
=
file
.
size
-
uploaded
;
var
left_file_size
=
file
.
size
-
uploaded
;
if
(
left_file_size
%
last_chunk_size
)
{
if
(
left_file_size
%
last_chunk_size
)
{
current_chunk_percent
=
((
uploaded
%
chunk_size
)
/
last_chunk_size
*
100
).
toFixed
(
2
);
current_chunk_percent
=
((
uploaded
%
chunk_size
)
/
last_chunk_size
*
100
).
toFixed
(
2
);
}
else
{
}
else
{
current_chunk_percent
=
100
;
current_chunk_percent
=
100
;
currentProgessBar
.
removeClass
().
addClass
(
'alert-success'
);
currentProgessBar
.
removeClass
().
addClass
(
'alert-success'
);
}
}
}
}
currentProgessBar
.
width
(
current_chunk_percent
+
'%'
);
currentProgessBar
.
width
(
current_chunk_percent
+
'%'
);
currentProgessBar
.
attr
(
'aria-valuenow'
,
current_chunk_percent
);
currentProgessBar
.
attr
(
'aria-valuenow'
,
current_chunk_percent
);
text
=
"块"
+
current_uploading_chunk
+
"上传进度"
+
current_chunk_percent
+
'%'
;
text
=
"块"
+
current_uploading_chunk
+
"上传进度"
+
current_chunk_percent
+
'%'
;
currentProgessBar
.
next
().
html
(
text
);
currentProgessBar
.
next
().
html
(
text
);
}
}
this
.
appear
();
this
.
appear
();
};
};
FileProgress
.
prototype
.
setComplete
=
function
(
up
,
info
)
{
FileProgress
.
prototype
.
setComplete
=
function
(
up
,
info
)
{
var
td
=
this
.
fileProgressWrapper
.
find
(
'td:eq(2)'
),
var
td
=
this
.
fileProgressWrapper
.
find
(
'td:eq(2)'
),
tdProgress
=
td
.
find
(
'.progress'
);
tdProgress
=
td
.
find
(
'.progress'
);
var
res
=
$
.
parseJSON
(
info
);
var
res
=
$
.
parseJSON
(
info
);
var
url
;
var
url
;
if
(
res
.
url
)
{
if
(
res
.
url
)
{
url
=
res
.
url
;
url
=
res
.
url
;
str
=
"<div><strong>Link:</strong><a href="
+
res
.
url
+
" target='_blank' > "
+
res
.
url
+
"</a></div>"
+
str
=
"<div><strong>Link:</strong><a href="
+
res
.
url
+
" target='_blank' > "
+
res
.
url
+
"</a></div>"
+
"<div class=hash><strong>Hash:</strong>"
+
res
.
hash
+
"</div>"
;
"<div class=hash><strong>Hash:</strong>"
+
res
.
hash
+
"</div>"
;
}
else
{
}
else
{
var
domain
=
up
.
getOption
(
'domain'
);
var
domain
=
up
.
getOption
(
'domain'
);
url
=
domain
+
encodeURI
(
res
.
key
);
url
=
domain
+
encodeURI
(
res
.
key
);
var
link
=
domain
+
res
.
key
;
var
link
=
domain
+
res
.
key
;
str
=
"<div><strong>Link:</strong><a href="
+
url
+
" target='_blank' > "
+
link
+
"</a></div>"
+
str
=
"<div><strong>Link:</strong><a href="
+
url
+
" target='_blank' > "
+
link
+
"</a></div>"
+
"<div class=hash><strong>Hash:</strong>"
+
res
.
hash
+
"</div>"
;
"<div class=hash><strong>Hash:</strong>"
+
res
.
hash
+
"</div>"
;
}
}
tdProgress
.
html
(
str
).
removeClass
().
next
().
next
(
'.status'
).
hide
();
tdProgress
.
html
(
str
).
removeClass
().
next
().
next
(
'.status'
).
hide
();
td
.
find
(
'.progressCancel'
).
hide
();
td
.
find
(
'.progressCancel'
).
hide
();
var
progressNameTd
=
this
.
fileProgressWrapper
.
find
(
'.progressName'
);
var
progressNameTd
=
this
.
fileProgressWrapper
.
find
(
'.progressName'
);
var
imageView
=
'?imageView2/1/w/100/h/100'
;
var
imageView
=
'?imageView2/1/w/100/h/100'
;
var
isImage
=
function
(
url
)
{
var
isImage
=
function
(
url
)
{
var
res
,
suffix
=
""
;
var
res
,
suffix
=
""
;
var
imageSuffixes
=
[
"png"
,
"jpg"
,
"jpeg"
,
"gif"
,
"bmp"
];
var
imageSuffixes
=
[
"png"
,
"jpg"
,
"jpeg"
,
"gif"
,
"bmp"
];
var
suffixMatch
=
/
\.([
a-zA-Z0-9
]
+
)(\?
|
\@
|$
)
/
;
var
suffixMatch
=
/
\.([
a-zA-Z0-9
]
+
)(\?
|
\@
|$
)
/
;
if
(
!
url
||
!
suffixMatch
.
test
(
url
))
{
if
(
!
url
||
!
suffixMatch
.
test
(
url
))
{
return
false
;
return
false
;
}
}
res
=
suffixMatch
.
exec
(
url
);
res
=
suffixMatch
.
exec
(
url
);
suffix
=
res
[
1
].
toLowerCase
();
suffix
=
res
[
1
].
toLowerCase
();
for
(
var
i
=
0
,
l
=
imageSuffixes
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
,
l
=
imageSuffixes
.
length
;
i
<
l
;
i
++
)
{
if
(
suffix
===
imageSuffixes
[
i
])
{
if
(
suffix
===
imageSuffixes
[
i
])
{
return
true
;
return
true
;
}
}
}
}
return
false
;
return
false
;
};
};
var
isImg
=
isImage
(
url
);
var
isImg
=
isImage
(
url
);
var
Wrapper
=
$
(
'<div class="Wrapper"/>'
);
var
Wrapper
=
$
(
'<div class="Wrapper"/>'
);
var
imgWrapper
=
$
(
'<div class="imgWrapper col-md-3"/>'
);
var
imgWrapper
=
$
(
'<div class="imgWrapper col-md-3"/>'
);
var
linkWrapper
=
$
(
'<a class="linkWrapper" target="_blank"/>'
);
var
linkWrapper
=
$
(
'<a class="linkWrapper" target="_blank"/>'
);
var
showImg
=
$
(
'<img src="images/loading.gif"/>'
);
var
showImg
=
$
(
'<img src="images/loading.gif"/>'
);
progressNameTd
.
append
(
Wrapper
);
progressNameTd
.
append
(
Wrapper
);
if
(
!
isImg
)
{
if
(
!
isImg
)
{
showImg
.
attr
(
'src'
,
'images/default.png'
);
showImg
.
attr
(
'src'
,
'images/default.png'
);
Wrapper
.
addClass
(
'default'
);
Wrapper
.
addClass
(
'default'
);
imgWrapper
.
append
(
showImg
);
imgWrapper
.
append
(
showImg
);
Wrapper
.
append
(
imgWrapper
);
Wrapper
.
append
(
imgWrapper
);
}
else
{
}
else
{
linkWrapper
.
append
(
showImg
);
linkWrapper
.
append
(
showImg
);
imgWrapper
.
append
(
linkWrapper
);
imgWrapper
.
append
(
linkWrapper
);
Wrapper
.
append
(
imgWrapper
);
Wrapper
.
append
(
imgWrapper
);
var
img
=
new
Image
();
var
img
=
new
Image
();
if
(
!
/imageView/
.
test
(
url
))
{
if
(
!
/imageView/
.
test
(
url
))
{
url
+=
imageView
url
+=
imageView
}
}
$
(
img
).
attr
(
'src'
,
url
);
$
(
img
).
attr
(
'src'
,
url
);
var
height_space
=
340
;
var
height_space
=
340
;
$
(
img
).
on
(
'load'
,
function
()
{
$
(
img
).
on
(
'load'
,
function
()
{
showImg
.
attr
(
'src'
,
url
);
showImg
.
attr
(
'src'
,
url
);
linkWrapper
.
attr
(
'href'
,
url
).
attr
(
'title'
,
'查看原图'
);
linkWrapper
.
attr
(
'href'
,
url
).
attr
(
'title'
,
'查看原图'
);
function
initImg
(
url
,
key
,
height
)
{
function
initImg
(
url
,
key
,
height
)
{
$
(
'#myModal-img'
).
modal
();
$
(
'#myModal-img'
).
modal
();
var
modalBody
=
$
(
'#myModal-img'
).
find
(
'.modal-body'
);
var
modalBody
=
$
(
'#myModal-img'
).
find
(
'.modal-body'
);
if
(
height
<=
300
)
{
if
(
height
<=
300
)
{
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
show
();
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
show
();
}
}
var
newImg
=
new
Image
();
var
newImg
=
new
Image
();
modalBody
.
find
(
'img'
).
attr
(
'src'
,
'images/loading.gif'
);
modalBody
.
find
(
'img'
).
attr
(
'src'
,
'images/loading.gif'
);
newImg
.
onload
=
function
()
{
newImg
.
onload
=
function
()
{
modalBody
.
find
(
'img'
).
attr
(
'src'
,
url
).
data
(
'key'
,
key
).
data
(
'h'
,
height
);
modalBody
.
find
(
'img'
).
attr
(
'src'
,
url
).
data
(
'key'
,
key
).
data
(
'h'
,
height
);
modalBody
.
find
(
'.modal-body-wrapper'
).
find
(
'a'
).
attr
(
'href'
,
url
);
modalBody
.
find
(
'.modal-body-wrapper'
).
find
(
'a'
).
attr
(
'href'
,
url
);
};
};
newImg
.
src
=
url
;
newImg
.
src
=
url
;
}
}
var
infoWrapper
=
$
(
'<div class="infoWrapper col-md-6"></div>'
);
var
infoWrapper
=
$
(
'<div class="infoWrapper col-md-6"></div>'
);
var
fopLink
=
$
(
'<a class="fopLink"/>'
);
var
fopLink
=
$
(
'<a class="fopLink"/>'
);
fopLink
.
attr
(
'data-key'
,
res
.
key
).
text
(
'查看处理效果'
);
fopLink
.
attr
(
'data-key'
,
res
.
key
).
text
(
'查看处理效果'
);
infoWrapper
.
append
(
fopLink
);
infoWrapper
.
append
(
fopLink
);
fopLink
.
on
(
'click'
,
function
()
{
fopLink
.
on
(
'click'
,
function
()
{
var
key
=
$
(
this
).
data
(
'key'
);
var
key
=
$
(
this
).
data
(
'key'
);
var
height
=
parseInt
(
$
(
this
).
parents
(
'.Wrapper'
).
find
(
'.origin-height'
).
text
(),
10
);
var
height
=
parseInt
(
$
(
this
).
parents
(
'.Wrapper'
).
find
(
'.origin-height'
).
text
(),
10
);
if
(
height
>
$
(
window
).
height
()
-
height_space
)
{
if
(
height
>
$
(
window
).
height
()
-
height_space
)
{
height
=
parseInt
(
$
(
window
).
height
()
-
height_space
,
10
);
height
=
parseInt
(
$
(
window
).
height
()
-
height_space
,
10
);
}
else
{
}
else
{
height
=
parseInt
(
height
,
10
)
||
300
;
height
=
parseInt
(
height
,
10
)
||
300
;
//set a default height 300 for ie9-
//set a default height 300 for ie9-
}
}
var
fopArr
=
[];
var
fopArr
=
[];
fopArr
.
push
({
fopArr
.
push
({
fop
:
'imageView2'
,
fop
:
'imageView2'
,
mode
:
3
,
mode
:
3
,
h
:
height
,
h
:
height
,
q
:
100
,
q
:
100
,
format
:
'png'
format
:
'png'
});
});
fopArr
.
push
({
fopArr
.
push
({
fop
:
'watermark'
,
fop
:
'watermark'
,
mode
:
1
,
mode
:
1
,
image
:
'http://www.b1.qiniudn.com/images/logo-2.png'
,
image
:
'http://www.b1.qiniudn.com/images/logo-2.png'
,
dissolve
:
100
,
dissolve
:
100
,
gravity
:
'SouthEast'
,
gravity
:
'SouthEast'
,
dx
:
100
,
dx
:
100
,
dy
:
100
dy
:
100
});
});
var
url
=
Qiniu
.
pipeline
(
fopArr
,
key
);
var
url
=
Qiniu
.
pipeline
(
fopArr
,
key
);
$
(
'#myModal-img'
).
on
(
'hide.bs.modal'
,
function
()
{
$
(
'#myModal-img'
).
on
(
'hide.bs.modal'
,
function
()
{
$
(
'#myModal-img'
).
find
(
'.btn-default'
).
removeClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.btn-default'
).
removeClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
hide
();
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
hide
();
}).
on
(
'show.bs.modal'
,
function
()
{
}).
on
(
'show.bs.modal'
,
function
()
{
$
(
'#myModal-img'
).
find
(
'.imageView'
).
find
(
'a:eq(0)'
).
addClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.imageView'
).
find
(
'a:eq(0)'
).
addClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.watermark'
).
find
(
'a:eq(3)'
).
addClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.watermark'
).
find
(
'a:eq(3)'
).
addClass
(
'disabled'
);
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
hide
();
$
(
'#myModal-img'
).
find
(
'.text-warning'
).
hide
();
});
});
initImg
(
url
,
key
,
height
);
initImg
(
url
,
key
,
height
);
return
false
;
return
false
;
});
});
var
ie
=
Qiniu
.
detectIEVersion
();
var
ie
=
Qiniu
.
detectIEVersion
();
if
(
!
(
ie
&&
ie
<=
9
))
{
if
(
!
(
ie
&&
ie
<=
9
))
{
var
exif
=
Qiniu
.
exif
(
res
.
key
);
var
exif
=
Qiniu
.
exif
(
res
.
key
);
if
(
exif
)
{
if
(
exif
)
{
var
exifLink
=
$
(
'<a href="" target="_blank">查看exif</a>'
);
var
exifLink
=
$
(
'<a href="" target="_blank">查看exif</a>'
);
exifLink
.
attr
(
'href'
,
url
+
'?exif'
);
exifLink
.
attr
(
'href'
,
url
+
'?exif'
);
infoWrapper
.
append
(
exifLink
);
infoWrapper
.
append
(
exifLink
);
}
}
var
imageInfo
=
Qiniu
.
imageInfo
(
res
.
key
);
var
imageInfo
=
Qiniu
.
imageInfo
(
res
.
key
);
var
infoArea
=
$
(
'<div/>'
);
var
infoArea
=
$
(
'<div/>'
);
var
infoInner
=
'<div>格式:<span class="origin-format">'
+
imageInfo
.
format
+
'</span></div>'
+
var
infoInner
=
'<div>格式:<span class="origin-format">'
+
imageInfo
.
format
+
'</span></div>'
+
'<div>宽度:<span class="orgin-width">'
+
imageInfo
.
width
+
'px</span></div>'
+
'<div>宽度:<span class="orgin-width">'
+
imageInfo
.
width
+
'px</span></div>'
+
'<div>高度:<span class="origin-height">'
+
imageInfo
.
height
+
'px</span></div>'
;
'<div>高度:<span class="origin-height">'
+
imageInfo
.
height
+
'px</span></div>'
;
infoArea
.
html
(
infoInner
);
infoArea
.
html
(
infoInner
);
infoWrapper
.
append
(
infoArea
);
infoWrapper
.
append
(
infoArea
);
}
}
Wrapper
.
append
(
infoWrapper
);
Wrapper
.
append
(
infoWrapper
);
}).
on
(
'error'
,
function
()
{
}).
on
(
'error'
,
function
()
{
showImg
.
attr
(
'src'
,
'default.png'
);
showImg
.
attr
(
'src'
,
'default.png'
);
Wrapper
.
addClass
(
'default'
);
Wrapper
.
addClass
(
'default'
);
});
});
}
}
};
};
FileProgress
.
prototype
.
setError
=
function
()
{
FileProgress
.
prototype
.
setError
=
function
()
{
this
.
fileProgressWrapper
.
find
(
'td:eq(2)'
).
attr
(
'class'
,
'text-warning'
);
this
.
fileProgressWrapper
.
find
(
'td:eq(2)'
).
attr
(
'class'
,
'text-warning'
);
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .progress'
).
css
(
'width'
,
0
).
hide
();
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .progress'
).
css
(
'width'
,
0
).
hide
();
this
.
fileProgressWrapper
.
find
(
'button'
).
hide
();
this
.
fileProgressWrapper
.
find
(
'button'
).
hide
();
this
.
fileProgressWrapper
.
next
(
'.chunk-status-tr'
).
hide
();
this
.
fileProgressWrapper
.
next
(
'.chunk-status-tr'
).
hide
();
};
};
FileProgress
.
prototype
.
setCancelled
=
function
(
manual
)
{
FileProgress
.
prototype
.
setCancelled
=
function
(
manual
)
{
var
progressContainer
=
'progressContainer'
;
var
progressContainer
=
'progressContainer'
;
if
(
!
manual
)
{
if
(
!
manual
)
{
progressContainer
+=
' red'
;
progressContainer
+=
' red'
;
}
}
this
.
fileProgressWrapper
.
attr
(
'class'
,
progressContainer
);
this
.
fileProgressWrapper
.
attr
(
'class'
,
progressContainer
);
this
.
fileProgressWrapper
.
find
(
'td .progress'
).
remove
();
this
.
fileProgressWrapper
.
find
(
'td .progress'
).
remove
();
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .btn-default'
).
hide
();
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .btn-default'
).
hide
();
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .progressCancel'
).
hide
();
this
.
fileProgressWrapper
.
find
(
'td:eq(2) .progressCancel'
).
hide
();
};
};
FileProgress
.
prototype
.
setStatus
=
function
(
status
,
isUploading
)
{
FileProgress
.
prototype
.
setStatus
=
function
(
status
,
isUploading
)
{
if
(
!
isUploading
)
{
if
(
!
isUploading
)
{
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
(
status
).
attr
(
'class'
,
'status text-left'
);
this
.
fileProgressWrapper
.
find
(
'.status'
).
text
(
status
).
attr
(
'class'
,
'status text-left'
);
}
}
};
};
// 绑定取消上传事件
// 绑定取消上传事件
FileProgress
.
prototype
.
bindUploadCancel
=
function
(
up
)
{
FileProgress
.
prototype
.
bindUploadCancel
=
function
(
up
)
{
var
self
=
this
;
var
self
=
this
;
if
(
up
)
{
if
(
up
)
{
self
.
fileProgressWrapper
.
find
(
'td:eq(2) .progressCancel'
).
on
(
'click'
,
function
(){
self
.
fileProgressWrapper
.
find
(
'td:eq(2) .progressCancel'
).
on
(
'click'
,
function
(){
self
.
setCancelled
(
false
);
self
.
setCancelled
(
false
);
self
.
setStatus
(
"取消上传"
);
self
.
setStatus
(
"取消上传"
);
self
.
fileProgressWrapper
.
find
(
'.status'
).
css
(
'left'
,
'0'
);
self
.
fileProgressWrapper
.
find
(
'.status'
).
css
(
'left'
,
'0'
);
up
.
removeFile
(
self
.
file
);
up
.
removeFile
(
self
.
file
);
});
});
}
}
};
};
FileProgress
.
prototype
.
appear
=
function
()
{
FileProgress
.
prototype
.
appear
=
function
()
{
if
(
this
.
getTimer
()
!==
null
)
{
if
(
this
.
getTimer
()
!==
null
)
{
clearTimeout
(
this
.
getTimer
());
clearTimeout
(
this
.
getTimer
());
this
.
setTimer
(
null
);
this
.
setTimer
(
null
);
}
}
if
(
this
.
fileProgressWrapper
[
0
].
filters
)
{
if
(
this
.
fileProgressWrapper
[
0
].
filters
)
{
try
{
try
{
this
.
fileProgressWrapper
[
0
].
filters
.
item
(
"DXImageTransform.Microsoft.Alpha"
).
opacity
=
100
;
this
.
fileProgressWrapper
[
0
].
filters
.
item
(
"DXImageTransform.Microsoft.Alpha"
).
opacity
=
100
;
}
catch
(
e
)
{
}
catch
(
e
)
{
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this
.
fileProgressWrapper
.
css
(
'filter'
,
"progid:DXImageTransform.Microsoft.Alpha(opacity=100)"
);
this
.
fileProgressWrapper
.
css
(
'filter'
,
"progid:DXImageTransform.Microsoft.Alpha(opacity=100)"
);
}
}
}
else
{
}
else
{
this
.
fileProgressWrapper
.
css
(
'opacity'
,
1
);
this
.
fileProgressWrapper
.
css
(
'opacity'
,
1
);
}
}
this
.
fileProgressWrapper
.
css
(
'height'
,
''
);
this
.
fileProgressWrapper
.
css
(
'height'
,
''
);
this
.
height
=
this
.
fileProgressWrapper
.
offset
().
top
;
this
.
height
=
this
.
fileProgressWrapper
.
offset
().
top
;
this
.
opacity
=
100
;
this
.
opacity
=
100
;
this
.
fileProgressWrapper
.
show
();
this
.
fileProgressWrapper
.
show
();
};
};
Public/static/js/common.js
View file @
8816649c
...
@@ -105,6 +105,9 @@ $(document).ready(function () {
...
@@ -105,6 +105,9 @@ $(document).ready(function () {
return
;
return
;
}
}
}
}
if
(
text
.
gblen
>
10
)
{
showTip
(
'名字最长为5个汉字'
);
}
if
(
text
.
length
===
2
)
{
if
(
text
.
length
===
2
)
{
var
last
=
text
[
1
];
var
last
=
text
[
1
];
text
=
text
[
0
]
+
' '
+
last
;
text
=
text
[
0
]
+
' '
+
last
;
...
@@ -166,7 +169,7 @@ $(document).ready(function () {
...
@@ -166,7 +169,7 @@ $(document).ready(function () {
$
(
'.page:visible'
).
find
(
'.showBox'
).
show
().
html
(
'<img src="'
+
canvas2
.
toDataURL
(
'image/png'
)
+
'">'
);
$
(
'.page:visible'
).
find
(
'.showBox'
).
show
().
html
(
'<img src="'
+
canvas2
.
toDataURL
(
'image/png'
)
+
'">'
);
});
});
});
});
$
(
'input[type=text]'
).
on
(
'input'
,
onInput
);
//
$('input[type=text]').on('input', onInput);
$
(
'.L-arrow'
).
on
(
'click'
,
function
()
{
$
(
'.L-arrow'
).
on
(
'click'
,
function
()
{
if
(
firstSwiper
)
{
if
(
firstSwiper
)
{
firstSwiper
.
slideNext
();
firstSwiper
.
slideNext
();
...
@@ -349,6 +352,18 @@ var limitMaxLength = function (str, maxLength) {
...
@@ -349,6 +352,18 @@ var limitMaxLength = function (str, maxLength) {
return
result
.
join
(
''
);
return
result
.
join
(
''
);
}
}
String
.
prototype
.
gblen
=
function
()
{
var
len
=
0
;
for
(
var
i
=
0
;
i
<
this
.
length
;
i
++
)
{
if
(
this
.
charCodeAt
(
i
)
>
127
||
this
.
charCodeAt
(
i
)
==
94
)
{
len
+=
2
;
}
else
{
len
++
;
}
}
return
len
;
}
var
mc
=
new
Hammer
(
$
(
'.imgTip'
).
get
(
0
));
var
mc
=
new
Hammer
(
$
(
'.imgTip'
).
get
(
0
));
mc
.
get
(
'pan'
).
set
({
mc
.
get
(
'pan'
).
set
({
direction
:
Hammer
.
DIRECTION_ALL
direction
:
Hammer
.
DIRECTION_ALL
...
...
Public/static/js/hammer.min.js
View file @
8816649c
/*! Hammer.JS - v2.0.4 - 2014-09-28
/*! Hammer.JS - v2.0.4 - 2014-09-28
* http://hammerjs.github.io/
* http://hammerjs.github.io/
*
*
* Copyright (c) 2014 Jorik Tangelder;
* Copyright (c) 2014 Jorik Tangelder;
* Licensed under the MIT license */
* Licensed under the MIT license */
!
function
(
a
,
b
,
c
,
d
){
"use strict"
;
function
e
(
a
,
b
,
c
){
return
setTimeout
(
k
(
a
,
c
),
b
)}
function
f
(
a
,
b
,
c
){
return
Array
.
isArray
(
a
)?(
g
(
a
,
c
[
b
],
c
),
!
0
):
!
1
}
function
g
(
a
,
b
,
c
){
var
e
;
if
(
a
)
if
(
a
.
forEach
)
a
.
forEach
(
b
,
c
);
else
if
(
a
.
length
!==
d
)
for
(
e
=
0
;
e
<
a
.
length
;)
b
.
call
(
c
,
a
[
e
],
e
,
a
),
e
++
;
else
for
(
e
in
a
)
a
.
hasOwnProperty
(
e
)
&&
b
.
call
(
c
,
a
[
e
],
e
,
a
)}
function
h
(
a
,
b
,
c
){
for
(
var
e
=
Object
.
keys
(
b
),
f
=
0
;
f
<
e
.
length
;)(
!
c
||
c
&&
a
[
e
[
f
]]
===
d
)
&&
(
a
[
e
[
f
]]
=
b
[
e
[
f
]]),
f
++
;
return
a
}
function
i
(
a
,
b
){
return
h
(
a
,
b
,
!
0
)}
function
j
(
a
,
b
,
c
){
var
d
,
e
=
b
.
prototype
;
d
=
a
.
prototype
=
Object
.
create
(
e
),
d
.
constructor
=
a
,
d
.
_super
=
e
,
c
&&
h
(
d
,
c
)}
function
k
(
a
,
b
){
return
function
(){
return
a
.
apply
(
b
,
arguments
)}}
function
l
(
a
,
b
){
return
typeof
a
==
kb
?
a
.
apply
(
b
?
b
[
0
]
||
d
:
d
,
b
):
a
}
function
m
(
a
,
b
){
return
a
===
d
?
b
:
a
}
function
n
(
a
,
b
,
c
){
g
(
r
(
b
),
function
(
b
){
a
.
addEventListener
(
b
,
c
,
!
1
)})}
function
o
(
a
,
b
,
c
){
g
(
r
(
b
),
function
(
b
){
a
.
removeEventListener
(
b
,
c
,
!
1
)})}
function
p
(
a
,
b
){
for
(;
a
;){
if
(
a
==
b
)
return
!
0
;
a
=
a
.
parentNode
}
return
!
1
}
function
q
(
a
,
b
){
return
a
.
indexOf
(
b
)
>-
1
}
function
r
(
a
){
return
a
.
trim
().
split
(
/
\s
+/g
)}
function
s
(
a
,
b
,
c
){
if
(
a
.
indexOf
&&!
c
)
return
a
.
indexOf
(
b
);
for
(
var
d
=
0
;
d
<
a
.
length
;){
if
(
c
&&
a
[
d
][
c
]
==
b
||!
c
&&
a
[
d
]
===
b
)
return
d
;
d
++
}
return
-
1
}
function
t
(
a
){
return
Array
.
prototype
.
slice
.
call
(
a
,
0
)}
function
u
(
a
,
b
,
c
){
for
(
var
d
=
[],
e
=
[],
f
=
0
;
f
<
a
.
length
;){
var
g
=
b
?
a
[
f
][
b
]:
a
[
f
];
s
(
e
,
g
)
<
0
&&
d
.
push
(
a
[
f
]),
e
[
f
]
=
g
,
f
++
}
return
c
&&
(
d
=
b
?
d
.
sort
(
function
(
a
,
c
){
return
a
[
b
]
>
c
[
b
]}):
d
.
sort
()),
d
}
function
v
(
a
,
b
){
for
(
var
c
,
e
,
f
=
b
[
0
].
toUpperCase
()
+
b
.
slice
(
1
),
g
=
0
;
g
<
ib
.
length
;){
if
(
c
=
ib
[
g
],
e
=
c
?
c
+
f
:
b
,
e
in
a
)
return
e
;
g
++
}
return
d
}
function
w
(){
return
ob
++
}
function
x
(
a
){
var
b
=
a
.
ownerDocument
;
return
b
.
defaultView
||
b
.
parentWindow
}
function
y
(
a
,
b
){
var
c
=
this
;
this
.
manager
=
a
,
this
.
callback
=
b
,
this
.
element
=
a
.
element
,
this
.
target
=
a
.
options
.
inputTarget
,
this
.
domHandler
=
function
(
b
){
l
(
a
.
options
.
enable
,[
a
])
&&
c
.
handler
(
b
)},
this
.
init
()}
function
z
(
a
){
var
b
,
c
=
a
.
options
.
inputClass
;
return
new
(
b
=
c
?
c
:
rb
?
N
:
sb
?
Q
:
qb
?
S
:
M
)(
a
,
A
)}
function
A
(
a
,
b
,
c
){
var
d
=
c
.
pointers
.
length
,
e
=
c
.
changedPointers
.
length
,
f
=
b
&
yb
&&
d
-
e
===
0
,
g
=
b
&
(
Ab
|
Bb
)
&&
d
-
e
===
0
;
c
.
isFirst
=!!
f
,
c
.
isFinal
=!!
g
,
f
&&
(
a
.
session
=
{}),
c
.
eventType
=
b
,
B
(
a
,
c
),
a
.
emit
(
"hammer.input"
,
c
),
a
.
recognize
(
c
),
a
.
session
.
prevInput
=
c
}
function
B
(
a
,
b
){
var
c
=
a
.
session
,
d
=
b
.
pointers
,
e
=
d
.
length
;
c
.
firstInput
||
(
c
.
firstInput
=
E
(
b
)),
e
>
1
&&!
c
.
firstMultiple
?
c
.
firstMultiple
=
E
(
b
):
1
===
e
&&
(
c
.
firstMultiple
=!
1
);
var
f
=
c
.
firstInput
,
g
=
c
.
firstMultiple
,
h
=
g
?
g
.
center
:
f
.
center
,
i
=
b
.
center
=
F
(
d
);
b
.
timeStamp
=
nb
(),
b
.
deltaTime
=
b
.
timeStamp
-
f
.
timeStamp
,
b
.
angle
=
J
(
h
,
i
),
b
.
distance
=
I
(
h
,
i
),
C
(
c
,
b
),
b
.
offsetDirection
=
H
(
b
.
deltaX
,
b
.
deltaY
),
b
.
scale
=
g
?
L
(
g
.
pointers
,
d
):
1
,
b
.
rotation
=
g
?
K
(
g
.
pointers
,
d
):
0
,
D
(
c
,
b
);
var
j
=
a
.
element
;
p
(
b
.
srcEvent
.
target
,
j
)
&&
(
j
=
b
.
srcEvent
.
target
),
b
.
target
=
j
}
function
C
(
a
,
b
){
var
c
=
b
.
center
,
d
=
a
.
offsetDelta
||
{},
e
=
a
.
prevDelta
||
{},
f
=
a
.
prevInput
||
{};(
b
.
eventType
===
yb
||
f
.
eventType
===
Ab
)
&&
(
e
=
a
.
prevDelta
=
{
x
:
f
.
deltaX
||
0
,
y
:
f
.
deltaY
||
0
},
d
=
a
.
offsetDelta
=
{
x
:
c
.
x
,
y
:
c
.
y
}),
b
.
deltaX
=
e
.
x
+
(
c
.
x
-
d
.
x
),
b
.
deltaY
=
e
.
y
+
(
c
.
y
-
d
.
y
)}
function
D
(
a
,
b
){
var
c
,
e
,
f
,
g
,
h
=
a
.
lastInterval
||
b
,
i
=
b
.
timeStamp
-
h
.
timeStamp
;
if
(
b
.
eventType
!=
Bb
&&
(
i
>
xb
||
h
.
velocity
===
d
)){
var
j
=
h
.
deltaX
-
b
.
deltaX
,
k
=
h
.
deltaY
-
b
.
deltaY
,
l
=
G
(
i
,
j
,
k
);
e
=
l
.
x
,
f
=
l
.
y
,
c
=
mb
(
l
.
x
)
>
mb
(
l
.
y
)?
l
.
x
:
l
.
y
,
g
=
H
(
j
,
k
),
a
.
lastInterval
=
b
}
else
c
=
h
.
velocity
,
e
=
h
.
velocityX
,
f
=
h
.
velocityY
,
g
=
h
.
direction
;
b
.
velocity
=
c
,
b
.
velocityX
=
e
,
b
.
velocityY
=
f
,
b
.
direction
=
g
}
function
E
(
a
){
for
(
var
b
=
[],
c
=
0
;
c
<
a
.
pointers
.
length
;)
b
[
c
]
=
{
clientX
:
lb
(
a
.
pointers
[
c
].
clientX
),
clientY
:
lb
(
a
.
pointers
[
c
].
clientY
)},
c
++
;
return
{
timeStamp
:
nb
(),
pointers
:
b
,
center
:
F
(
b
),
deltaX
:
a
.
deltaX
,
deltaY
:
a
.
deltaY
}}
function
F
(
a
){
var
b
=
a
.
length
;
if
(
1
===
b
)
return
{
x
:
lb
(
a
[
0
].
clientX
),
y
:
lb
(
a
[
0
].
clientY
)};
for
(
var
c
=
0
,
d
=
0
,
e
=
0
;
b
>
e
;)
c
+=
a
[
e
].
clientX
,
d
+=
a
[
e
].
clientY
,
e
++
;
return
{
x
:
lb
(
c
/
b
),
y
:
lb
(
d
/
b
)}}
function
G
(
a
,
b
,
c
){
return
{
x
:
b
/
a
||
0
,
y
:
c
/
a
||
0
}}
function
H
(
a
,
b
){
return
a
===
b
?
Cb
:
mb
(
a
)
>=
mb
(
b
)?
a
>
0
?
Db
:
Eb
:
b
>
0
?
Fb
:
Gb
}
function
I
(
a
,
b
,
c
){
c
||
(
c
=
Kb
);
var
d
=
b
[
c
[
0
]]
-
a
[
c
[
0
]],
e
=
b
[
c
[
1
]]
-
a
[
c
[
1
]];
return
Math
.
sqrt
(
d
*
d
+
e
*
e
)}
function
J
(
a
,
b
,
c
){
c
||
(
c
=
Kb
);
var
d
=
b
[
c
[
0
]]
-
a
[
c
[
0
]],
e
=
b
[
c
[
1
]]
-
a
[
c
[
1
]];
return
180
*
Math
.
atan2
(
e
,
d
)
/
Math
.
PI
}
function
K
(
a
,
b
){
return
J
(
b
[
1
],
b
[
0
],
Lb
)
-
J
(
a
[
1
],
a
[
0
],
Lb
)}
function
L
(
a
,
b
){
return
I
(
b
[
0
],
b
[
1
],
Lb
)
/
I
(
a
[
0
],
a
[
1
],
Lb
)}
function
M
(){
this
.
evEl
=
Nb
,
this
.
evWin
=
Ob
,
this
.
allow
=!
0
,
this
.
pressed
=!
1
,
y
.
apply
(
this
,
arguments
)}
function
N
(){
this
.
evEl
=
Rb
,
this
.
evWin
=
Sb
,
y
.
apply
(
this
,
arguments
),
this
.
store
=
this
.
manager
.
session
.
pointerEvents
=
[]}
function
O
(){
this
.
evTarget
=
Ub
,
this
.
evWin
=
Vb
,
this
.
started
=!
1
,
y
.
apply
(
this
,
arguments
)}
function
P
(
a
,
b
){
var
c
=
t
(
a
.
touches
),
d
=
t
(
a
.
changedTouches
);
return
b
&
(
Ab
|
Bb
)
&&
(
c
=
u
(
c
.
concat
(
d
),
"identifier"
,
!
0
)),[
c
,
d
]}
function
Q
(){
this
.
evTarget
=
Xb
,
this
.
targetIds
=
{},
y
.
apply
(
this
,
arguments
)}
function
R
(
a
,
b
){
var
c
=
t
(
a
.
touches
),
d
=
this
.
targetIds
;
if
(
b
&
(
yb
|
zb
)
&&
1
===
c
.
length
)
return
d
[
c
[
0
].
identifier
]
=!
0
,[
c
,
c
];
var
e
,
f
,
g
=
t
(
a
.
changedTouches
),
h
=
[],
i
=
this
.
target
;
if
(
f
=
c
.
filter
(
function
(
a
){
return
p
(
a
.
target
,
i
)}),
b
===
yb
)
for
(
e
=
0
;
e
<
f
.
length
;)
d
[
f
[
e
].
identifier
]
=!
0
,
e
++
;
for
(
e
=
0
;
e
<
g
.
length
;)
d
[
g
[
e
].
identifier
]
&&
h
.
push
(
g
[
e
]),
b
&
(
Ab
|
Bb
)
&&
delete
d
[
g
[
e
].
identifier
],
e
++
;
return
h
.
length
?[
u
(
f
.
concat
(
h
),
"identifier"
,
!
0
),
h
]:
void
0
}
function
S
(){
y
.
apply
(
this
,
arguments
);
var
a
=
k
(
this
.
handler
,
this
);
this
.
touch
=
new
Q
(
this
.
manager
,
a
),
this
.
mouse
=
new
M
(
this
.
manager
,
a
)}
function
T
(
a
,
b
){
this
.
manager
=
a
,
this
.
set
(
b
)}
function
U
(
a
){
if
(
q
(
a
,
bc
))
return
bc
;
var
b
=
q
(
a
,
cc
),
c
=
q
(
a
,
dc
);
return
b
&&
c
?
cc
+
" "
+
dc
:
b
||
c
?
b
?
cc
:
dc
:
q
(
a
,
ac
)?
ac
:
_b
}
function
V
(
a
){
this
.
id
=
w
(),
this
.
manager
=
null
,
this
.
options
=
i
(
a
||
{},
this
.
defaults
),
this
.
options
.
enable
=
m
(
this
.
options
.
enable
,
!
0
),
this
.
state
=
ec
,
this
.
simultaneous
=
{},
this
.
requireFail
=
[]}
function
W
(
a
){
return
a
&
jc
?
"cancel"
:
a
&
hc
?
"end"
:
a
&
gc
?
"move"
:
a
&
fc
?
"start"
:
""
}
function
X
(
a
){
return
a
==
Gb
?
"down"
:
a
==
Fb
?
"up"
:
a
==
Db
?
"left"
:
a
==
Eb
?
"right"
:
""
}
function
Y
(
a
,
b
){
var
c
=
b
.
manager
;
return
c
?
c
.
get
(
a
):
a
}
function
Z
(){
V
.
apply
(
this
,
arguments
)}
function
$
(){
Z
.
apply
(
this
,
arguments
),
this
.
pX
=
null
,
this
.
pY
=
null
}
function
_
(){
Z
.
apply
(
this
,
arguments
)}
function
ab
(){
V
.
apply
(
this
,
arguments
),
this
.
_timer
=
null
,
this
.
_input
=
null
}
function
bb
(){
Z
.
apply
(
this
,
arguments
)}
function
cb
(){
Z
.
apply
(
this
,
arguments
)}
function
db
(){
V
.
apply
(
this
,
arguments
),
this
.
pTime
=!
1
,
this
.
pCenter
=!
1
,
this
.
_timer
=
null
,
this
.
_input
=
null
,
this
.
count
=
0
}
function
eb
(
a
,
b
){
return
b
=
b
||
{},
b
.
recognizers
=
m
(
b
.
recognizers
,
eb
.
defaults
.
preset
),
new
fb
(
a
,
b
)}
function
fb
(
a
,
b
){
b
=
b
||
{},
this
.
options
=
i
(
b
,
eb
.
defaults
),
this
.
options
.
inputTarget
=
this
.
options
.
inputTarget
||
a
,
this
.
handlers
=
{},
this
.
session
=
{},
this
.
recognizers
=
[],
this
.
element
=
a
,
this
.
input
=
z
(
this
),
this
.
touchAction
=
new
T
(
this
,
this
.
options
.
touchAction
),
gb
(
this
,
!
0
),
g
(
b
.
recognizers
,
function
(
a
){
var
b
=
this
.
add
(
new
a
[
0
](
a
[
1
]));
a
[
2
]
&&
b
.
recognizeWith
(
a
[
2
]),
a
[
3
]
&&
b
.
requireFailure
(
a
[
3
])},
this
)}
function
gb
(
a
,
b
){
var
c
=
a
.
element
;
g
(
a
.
options
.
cssProps
,
function
(
a
,
d
){
c
.
style
[
v
(
c
.
style
,
d
)]
=
b
?
a
:
""
})}
function
hb
(
a
,
c
){
var
d
=
b
.
createEvent
(
"Event"
);
d
.
initEvent
(
a
,
!
0
,
!
0
),
d
.
gesture
=
c
,
c
.
target
.
dispatchEvent
(
d
)}
var
ib
=
[
""
,
"webkit"
,
"moz"
,
"MS"
,
"ms"
,
"o"
],
jb
=
b
.
createElement
(
"div"
),
kb
=
"function"
,
lb
=
Math
.
round
,
mb
=
Math
.
abs
,
nb
=
Date
.
now
,
ob
=
1
,
pb
=
/mobile|tablet|ip
(
ad|hone|od
)
|android/i
,
qb
=
"ontouchstart"
in
a
,
rb
=
v
(
a
,
"PointerEvent"
)
!==
d
,
sb
=
qb
&&
pb
.
test
(
navigator
.
userAgent
),
tb
=
"touch"
,
ub
=
"pen"
,
vb
=
"mouse"
,
wb
=
"kinect"
,
xb
=
25
,
yb
=
1
,
zb
=
2
,
Ab
=
4
,
Bb
=
8
,
Cb
=
1
,
Db
=
2
,
Eb
=
4
,
Fb
=
8
,
Gb
=
16
,
Hb
=
Db
|
Eb
,
Ib
=
Fb
|
Gb
,
Jb
=
Hb
|
Ib
,
Kb
=
[
"x"
,
"y"
],
Lb
=
[
"clientX"
,
"clientY"
];
y
.
prototype
=
{
handler
:
function
(){},
init
:
function
(){
this
.
evEl
&&
n
(
this
.
element
,
this
.
evEl
,
this
.
domHandler
),
this
.
evTarget
&&
n
(
this
.
target
,
this
.
evTarget
,
this
.
domHandler
),
this
.
evWin
&&
n
(
x
(
this
.
element
),
this
.
evWin
,
this
.
domHandler
)},
destroy
:
function
(){
this
.
evEl
&&
o
(
this
.
element
,
this
.
evEl
,
this
.
domHandler
),
this
.
evTarget
&&
o
(
this
.
target
,
this
.
evTarget
,
this
.
domHandler
),
this
.
evWin
&&
o
(
x
(
this
.
element
),
this
.
evWin
,
this
.
domHandler
)}};
var
Mb
=
{
mousedown
:
yb
,
mousemove
:
zb
,
mouseup
:
Ab
},
Nb
=
"mousedown"
,
Ob
=
"mousemove mouseup"
;
j
(
M
,
y
,{
handler
:
function
(
a
){
var
b
=
Mb
[
a
.
type
];
b
&
yb
&&
0
===
a
.
button
&&
(
this
.
pressed
=!
0
),
b
&
zb
&&
1
!==
a
.
which
&&
(
b
=
Ab
),
this
.
pressed
&&
this
.
allow
&&
(
b
&
Ab
&&
(
this
.
pressed
=!
1
),
this
.
callback
(
this
.
manager
,
b
,{
pointers
:[
a
],
changedPointers
:[
a
],
pointerType
:
vb
,
srcEvent
:
a
}))}});
var
Pb
=
{
pointerdown
:
yb
,
pointermove
:
zb
,
pointerup
:
Ab
,
pointercancel
:
Bb
,
pointerout
:
Bb
},
Qb
=
{
2
:
tb
,
3
:
ub
,
4
:
vb
,
5
:
wb
},
Rb
=
"pointerdown"
,
Sb
=
"pointermove pointerup pointercancel"
;
a
.
MSPointerEvent
&&
(
Rb
=
"MSPointerDown"
,
Sb
=
"MSPointerMove MSPointerUp MSPointerCancel"
),
j
(
N
,
y
,{
handler
:
function
(
a
){
var
b
=
this
.
store
,
c
=!
1
,
d
=
a
.
type
.
toLowerCase
().
replace
(
"ms"
,
""
),
e
=
Pb
[
d
],
f
=
Qb
[
a
.
pointerType
]
||
a
.
pointerType
,
g
=
f
==
tb
,
h
=
s
(
b
,
a
.
pointerId
,
"pointerId"
);
e
&
yb
&&
(
0
===
a
.
button
||
g
)?
0
>
h
&&
(
b
.
push
(
a
),
h
=
b
.
length
-
1
):
e
&
(
Ab
|
Bb
)
&&
(
c
=!
0
),
0
>
h
||
(
b
[
h
]
=
a
,
this
.
callback
(
this
.
manager
,
e
,{
pointers
:
b
,
changedPointers
:[
a
],
pointerType
:
f
,
srcEvent
:
a
}),
c
&&
b
.
splice
(
h
,
1
))}});
var
Tb
=
{
touchstart
:
yb
,
touchmove
:
zb
,
touchend
:
Ab
,
touchcancel
:
Bb
},
Ub
=
"touchstart"
,
Vb
=
"touchstart touchmove touchend touchcancel"
;
j
(
O
,
y
,{
handler
:
function
(
a
){
var
b
=
Tb
[
a
.
type
];
if
(
b
===
yb
&&
(
this
.
started
=!
0
),
this
.
started
){
var
c
=
P
.
call
(
this
,
a
,
b
);
b
&
(
Ab
|
Bb
)
&&
c
[
0
].
length
-
c
[
1
].
length
===
0
&&
(
this
.
started
=!
1
),
this
.
callback
(
this
.
manager
,
b
,{
pointers
:
c
[
0
],
changedPointers
:
c
[
1
],
pointerType
:
tb
,
srcEvent
:
a
})}}});
var
Wb
=
{
touchstart
:
yb
,
touchmove
:
zb
,
touchend
:
Ab
,
touchcancel
:
Bb
},
Xb
=
"touchstart touchmove touchend touchcancel"
;
j
(
Q
,
y
,{
handler
:
function
(
a
){
var
b
=
Wb
[
a
.
type
],
c
=
R
.
call
(
this
,
a
,
b
);
c
&&
this
.
callback
(
this
.
manager
,
b
,{
pointers
:
c
[
0
],
changedPointers
:
c
[
1
],
pointerType
:
tb
,
srcEvent
:
a
})}}),
j
(
S
,
y
,{
handler
:
function
(
a
,
b
,
c
){
var
d
=
c
.
pointerType
==
tb
,
e
=
c
.
pointerType
==
vb
;
if
(
d
)
this
.
mouse
.
allow
=!
1
;
else
if
(
e
&&!
this
.
mouse
.
allow
)
return
;
b
&
(
Ab
|
Bb
)
&&
(
this
.
mouse
.
allow
=!
0
),
this
.
callback
(
a
,
b
,
c
)},
destroy
:
function
(){
this
.
touch
.
destroy
(),
this
.
mouse
.
destroy
()}});
var
Yb
=
v
(
jb
.
style
,
"touchAction"
),
Zb
=
Yb
!==
d
,
$b
=
"compute"
,
_b
=
"auto"
,
ac
=
"manipulation"
,
bc
=
"none"
,
cc
=
"pan-x"
,
dc
=
"pan-y"
;
T
.
prototype
=
{
set
:
function
(
a
){
a
==
$b
&&
(
a
=
this
.
compute
()),
Zb
&&
(
this
.
manager
.
element
.
style
[
Yb
]
=
a
),
this
.
actions
=
a
.
toLowerCase
().
trim
()},
update
:
function
(){
this
.
set
(
this
.
manager
.
options
.
touchAction
)},
compute
:
function
(){
var
a
=
[];
return
g
(
this
.
manager
.
recognizers
,
function
(
b
){
l
(
b
.
options
.
enable
,[
b
])
&&
(
a
=
a
.
concat
(
b
.
getTouchAction
()))}),
U
(
a
.
join
(
" "
))},
preventDefaults
:
function
(
a
){
if
(
!
Zb
){
var
b
=
a
.
srcEvent
,
c
=
a
.
offsetDirection
;
if
(
this
.
manager
.
session
.
prevented
)
return
void
b
.
preventDefault
();
var
d
=
this
.
actions
,
e
=
q
(
d
,
bc
),
f
=
q
(
d
,
dc
),
g
=
q
(
d
,
cc
);
return
e
||
f
&&
c
&
Hb
||
g
&&
c
&
Ib
?
this
.
preventSrc
(
b
):
void
0
}},
preventSrc
:
function
(
a
){
this
.
manager
.
session
.
prevented
=!
0
,
a
.
preventDefault
()}};
var
ec
=
1
,
fc
=
2
,
gc
=
4
,
hc
=
8
,
ic
=
hc
,
jc
=
16
,
kc
=
32
;
V
.
prototype
=
{
defaults
:{},
set
:
function
(
a
){
return
h
(
this
.
options
,
a
),
this
.
manager
&&
this
.
manager
.
touchAction
.
update
(),
this
},
recognizeWith
:
function
(
a
){
if
(
f
(
a
,
"recognizeWith"
,
this
))
return
this
;
var
b
=
this
.
simultaneous
;
return
a
=
Y
(
a
,
this
),
b
[
a
.
id
]
||
(
b
[
a
.
id
]
=
a
,
a
.
recognizeWith
(
this
)),
this
},
dropRecognizeWith
:
function
(
a
){
return
f
(
a
,
"dropRecognizeWith"
,
this
)?
this
:(
a
=
Y
(
a
,
this
),
delete
this
.
simultaneous
[
a
.
id
],
this
)},
requireFailure
:
function
(
a
){
if
(
f
(
a
,
"requireFailure"
,
this
))
return
this
;
var
b
=
this
.
requireFail
;
return
a
=
Y
(
a
,
this
),
-
1
===
s
(
b
,
a
)
&&
(
b
.
push
(
a
),
a
.
requireFailure
(
this
)),
this
},
dropRequireFailure
:
function
(
a
){
if
(
f
(
a
,
"dropRequireFailure"
,
this
))
return
this
;
a
=
Y
(
a
,
this
);
var
b
=
s
(
this
.
requireFail
,
a
);
return
b
>-
1
&&
this
.
requireFail
.
splice
(
b
,
1
),
this
},
hasRequireFailures
:
function
(){
return
this
.
requireFail
.
length
>
0
},
canRecognizeWith
:
function
(
a
){
return
!!
this
.
simultaneous
[
a
.
id
]},
emit
:
function
(
a
){
function
b
(
b
){
c
.
manager
.
emit
(
c
.
options
.
event
+
(
b
?
W
(
d
):
""
),
a
)}
var
c
=
this
,
d
=
this
.
state
;
hc
>
d
&&
b
(
!
0
),
b
(),
d
>=
hc
&&
b
(
!
0
)},
tryEmit
:
function
(
a
){
return
this
.
canEmit
()?
this
.
emit
(
a
):
void
(
this
.
state
=
kc
)},
canEmit
:
function
(){
for
(
var
a
=
0
;
a
<
this
.
requireFail
.
length
;){
if
(
!
(
this
.
requireFail
[
a
].
state
&
(
kc
|
ec
)))
return
!
1
;
a
++
}
return
!
0
},
recognize
:
function
(
a
){
var
b
=
h
({},
a
);
return
l
(
this
.
options
.
enable
,[
this
,
b
])?(
this
.
state
&
(
ic
|
jc
|
kc
)
&&
(
this
.
state
=
ec
),
this
.
state
=
this
.
process
(
b
),
void
(
this
.
state
&
(
fc
|
gc
|
hc
|
jc
)
&&
this
.
tryEmit
(
b
))):(
this
.
reset
(),
void
(
this
.
state
=
kc
))},
process
:
function
(){},
getTouchAction
:
function
(){},
reset
:
function
(){}},
j
(
Z
,
V
,{
defaults
:{
pointers
:
1
},
attrTest
:
function
(
a
){
var
b
=
this
.
options
.
pointers
;
return
0
===
b
||
a
.
pointers
.
length
===
b
},
process
:
function
(
a
){
var
b
=
this
.
state
,
c
=
a
.
eventType
,
d
=
b
&
(
fc
|
gc
),
e
=
this
.
attrTest
(
a
);
return
d
&&
(
c
&
Bb
||!
e
)?
b
|
jc
:
d
||
e
?
c
&
Ab
?
b
|
hc
:
b
&
fc
?
b
|
gc
:
fc
:
kc
}}),
j
(
$
,
Z
,{
defaults
:{
event
:
"pan"
,
threshold
:
10
,
pointers
:
1
,
direction
:
Jb
},
getTouchAction
:
function
(){
var
a
=
this
.
options
.
direction
,
b
=
[];
return
a
&
Hb
&&
b
.
push
(
dc
),
a
&
Ib
&&
b
.
push
(
cc
),
b
},
directionTest
:
function
(
a
){
var
b
=
this
.
options
,
c
=!
0
,
d
=
a
.
distance
,
e
=
a
.
direction
,
f
=
a
.
deltaX
,
g
=
a
.
deltaY
;
return
e
&
b
.
direction
||
(
b
.
direction
&
Hb
?(
e
=
0
===
f
?
Cb
:
0
>
f
?
Db
:
Eb
,
c
=
f
!=
this
.
pX
,
d
=
Math
.
abs
(
a
.
deltaX
)):(
e
=
0
===
g
?
Cb
:
0
>
g
?
Fb
:
Gb
,
c
=
g
!=
this
.
pY
,
d
=
Math
.
abs
(
a
.
deltaY
))),
a
.
direction
=
e
,
c
&&
d
>
b
.
threshold
&&
e
&
b
.
direction
},
attrTest
:
function
(
a
){
return
Z
.
prototype
.
attrTest
.
call
(
this
,
a
)
&&
(
this
.
state
&
fc
||!
(
this
.
state
&
fc
)
&&
this
.
directionTest
(
a
))},
emit
:
function
(
a
){
this
.
pX
=
a
.
deltaX
,
this
.
pY
=
a
.
deltaY
;
var
b
=
X
(
a
.
direction
);
b
&&
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
),
this
.
_super
.
emit
.
call
(
this
,
a
)}}),
j
(
_
,
Z
,{
defaults
:{
event
:
"pinch"
,
threshold
:
0
,
pointers
:
2
},
getTouchAction
:
function
(){
return
[
bc
]},
attrTest
:
function
(
a
){
return
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
(
Math
.
abs
(
a
.
scale
-
1
)
>
this
.
options
.
threshold
||
this
.
state
&
fc
)},
emit
:
function
(
a
){
if
(
this
.
_super
.
emit
.
call
(
this
,
a
),
1
!==
a
.
scale
){
var
b
=
a
.
scale
<
1
?
"in"
:
"out"
;
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
)}}}),
j
(
ab
,
V
,{
defaults
:{
event
:
"press"
,
pointers
:
1
,
time
:
500
,
threshold
:
5
},
getTouchAction
:
function
(){
return
[
_b
]},
process
:
function
(
a
){
var
b
=
this
.
options
,
c
=
a
.
pointers
.
length
===
b
.
pointers
,
d
=
a
.
distance
<
b
.
threshold
,
f
=
a
.
deltaTime
>
b
.
time
;
if
(
this
.
_input
=
a
,
!
d
||!
c
||
a
.
eventType
&
(
Ab
|
Bb
)
&&!
f
)
this
.
reset
();
else
if
(
a
.
eventType
&
yb
)
this
.
reset
(),
this
.
_timer
=
e
(
function
(){
this
.
state
=
ic
,
this
.
tryEmit
()},
b
.
time
,
this
);
else
if
(
a
.
eventType
&
Ab
)
return
ic
;
return
kc
},
reset
:
function
(){
clearTimeout
(
this
.
_timer
)},
emit
:
function
(
a
){
this
.
state
===
ic
&&
(
a
&&
a
.
eventType
&
Ab
?
this
.
manager
.
emit
(
this
.
options
.
event
+
"up"
,
a
):(
this
.
_input
.
timeStamp
=
nb
(),
this
.
manager
.
emit
(
this
.
options
.
event
,
this
.
_input
)))}}),
j
(
bb
,
Z
,{
defaults
:{
event
:
"rotate"
,
threshold
:
0
,
pointers
:
2
},
getTouchAction
:
function
(){
return
[
bc
]},
attrTest
:
function
(
a
){
return
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
(
Math
.
abs
(
a
.
rotation
)
>
this
.
options
.
threshold
||
this
.
state
&
fc
)}}),
j
(
cb
,
Z
,{
defaults
:{
event
:
"swipe"
,
threshold
:
10
,
velocity
:.
65
,
direction
:
Hb
|
Ib
,
pointers
:
1
},
getTouchAction
:
function
(){
return
$
.
prototype
.
getTouchAction
.
call
(
this
)},
attrTest
:
function
(
a
){
var
b
,
c
=
this
.
options
.
direction
;
return
c
&
(
Hb
|
Ib
)?
b
=
a
.
velocity
:
c
&
Hb
?
b
=
a
.
velocityX
:
c
&
Ib
&&
(
b
=
a
.
velocityY
),
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
c
&
a
.
direction
&&
a
.
distance
>
this
.
options
.
threshold
&&
mb
(
b
)
>
this
.
options
.
velocity
&&
a
.
eventType
&
Ab
},
emit
:
function
(
a
){
var
b
=
X
(
a
.
direction
);
b
&&
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
),
this
.
manager
.
emit
(
this
.
options
.
event
,
a
)}}),
j
(
db
,
V
,{
defaults
:{
event
:
"tap"
,
pointers
:
1
,
taps
:
1
,
interval
:
300
,
time
:
250
,
threshold
:
2
,
posThreshold
:
10
},
getTouchAction
:
function
(){
return
[
ac
]},
process
:
function
(
a
){
var
b
=
this
.
options
,
c
=
a
.
pointers
.
length
===
b
.
pointers
,
d
=
a
.
distance
<
b
.
threshold
,
f
=
a
.
deltaTime
<
b
.
time
;
if
(
this
.
reset
(),
a
.
eventType
&
yb
&&
0
===
this
.
count
)
return
this
.
failTimeout
();
if
(
d
&&
f
&&
c
){
if
(
a
.
eventType
!=
Ab
)
return
this
.
failTimeout
();
var
g
=
this
.
pTime
?
a
.
timeStamp
-
this
.
pTime
<
b
.
interval
:
!
0
,
h
=!
this
.
pCenter
||
I
(
this
.
pCenter
,
a
.
center
)
<
b
.
posThreshold
;
this
.
pTime
=
a
.
timeStamp
,
this
.
pCenter
=
a
.
center
,
h
&&
g
?
this
.
count
+=
1
:
this
.
count
=
1
,
this
.
_input
=
a
;
var
i
=
this
.
count
%
b
.
taps
;
if
(
0
===
i
)
return
this
.
hasRequireFailures
()?(
this
.
_timer
=
e
(
function
(){
this
.
state
=
ic
,
this
.
tryEmit
()},
b
.
interval
,
this
),
fc
):
ic
}
return
kc
},
failTimeout
:
function
(){
return
this
.
_timer
=
e
(
function
(){
this
.
state
=
kc
},
this
.
options
.
interval
,
this
),
kc
},
reset
:
function
(){
clearTimeout
(
this
.
_timer
)},
emit
:
function
(){
this
.
state
==
ic
&&
(
this
.
_input
.
tapCount
=
this
.
count
,
this
.
manager
.
emit
(
this
.
options
.
event
,
this
.
_input
))}}),
eb
.
VERSION
=
"2.0.4"
,
eb
.
defaults
=
{
domEvents
:
!
1
,
touchAction
:
$b
,
enable
:
!
0
,
inputTarget
:
null
,
inputClass
:
null
,
preset
:[[
bb
,{
enable
:
!
1
}],[
_
,{
enable
:
!
1
},[
"rotate"
]],[
cb
,{
direction
:
Hb
}],[
$
,{
direction
:
Hb
},[
"swipe"
]],[
db
],[
db
,{
event
:
"doubletap"
,
taps
:
2
},[
"tap"
]],[
ab
]],
cssProps
:{
userSelect
:
"none"
,
touchSelect
:
"none"
,
touchCallout
:
"none"
,
contentZooming
:
"none"
,
userDrag
:
"none"
,
tapHighlightColor
:
"rgba(0,0,0,0)"
}};
var
lc
=
1
,
mc
=
2
;
fb
.
prototype
=
{
set
:
function
(
a
){
return
h
(
this
.
options
,
a
),
a
.
touchAction
&&
this
.
touchAction
.
update
(),
a
.
inputTarget
&&
(
this
.
input
.
destroy
(),
this
.
input
.
target
=
a
.
inputTarget
,
this
.
input
.
init
()),
this
},
stop
:
function
(
a
){
this
.
session
.
stopped
=
a
?
mc
:
lc
},
recognize
:
function
(
a
){
var
b
=
this
.
session
;
if
(
!
b
.
stopped
){
this
.
touchAction
.
preventDefaults
(
a
);
var
c
,
d
=
this
.
recognizers
,
e
=
b
.
curRecognizer
;(
!
e
||
e
&&
e
.
state
&
ic
)
&&
(
e
=
b
.
curRecognizer
=
null
);
for
(
var
f
=
0
;
f
<
d
.
length
;)
c
=
d
[
f
],
b
.
stopped
===
mc
||
e
&&
c
!=
e
&&!
c
.
canRecognizeWith
(
e
)?
c
.
reset
():
c
.
recognize
(
a
),
!
e
&&
c
.
state
&
(
fc
|
gc
|
hc
)
&&
(
e
=
b
.
curRecognizer
=
c
),
f
++
}},
get
:
function
(
a
){
if
(
a
instanceof
V
)
return
a
;
for
(
var
b
=
this
.
recognizers
,
c
=
0
;
c
<
b
.
length
;
c
++
)
if
(
b
[
c
].
options
.
event
==
a
)
return
b
[
c
];
return
null
},
add
:
function
(
a
){
if
(
f
(
a
,
"add"
,
this
))
return
this
;
var
b
=
this
.
get
(
a
.
options
.
event
);
return
b
&&
this
.
remove
(
b
),
this
.
recognizers
.
push
(
a
),
a
.
manager
=
this
,
this
.
touchAction
.
update
(),
a
},
remove
:
function
(
a
){
if
(
f
(
a
,
"remove"
,
this
))
return
this
;
var
b
=
this
.
recognizers
;
return
a
=
this
.
get
(
a
),
b
.
splice
(
s
(
b
,
a
),
1
),
this
.
touchAction
.
update
(),
this
},
on
:
function
(
a
,
b
){
var
c
=
this
.
handlers
;
return
g
(
r
(
a
),
function
(
a
){
c
[
a
]
=
c
[
a
]
||
[],
c
[
a
].
push
(
b
)}),
this
},
off
:
function
(
a
,
b
){
var
c
=
this
.
handlers
;
return
g
(
r
(
a
),
function
(
a
){
b
?
c
[
a
].
splice
(
s
(
c
[
a
],
b
),
1
):
delete
c
[
a
]}),
this
},
emit
:
function
(
a
,
b
){
this
.
options
.
domEvents
&&
hb
(
a
,
b
);
var
c
=
this
.
handlers
[
a
]
&&
this
.
handlers
[
a
].
slice
();
if
(
c
&&
c
.
length
){
b
.
type
=
a
,
b
.
preventDefault
=
function
(){
b
.
srcEvent
.
preventDefault
()};
for
(
var
d
=
0
;
d
<
c
.
length
;)
c
[
d
](
b
),
d
++
}},
destroy
:
function
(){
this
.
element
&&
gb
(
this
,
!
1
),
this
.
handlers
=
{},
this
.
session
=
{},
this
.
input
.
destroy
(),
this
.
element
=
null
}},
h
(
eb
,{
INPUT_START
:
yb
,
INPUT_MOVE
:
zb
,
INPUT_END
:
Ab
,
INPUT_CANCEL
:
Bb
,
STATE_POSSIBLE
:
ec
,
STATE_BEGAN
:
fc
,
STATE_CHANGED
:
gc
,
STATE_ENDED
:
hc
,
STATE_RECOGNIZED
:
ic
,
STATE_CANCELLED
:
jc
,
STATE_FAILED
:
kc
,
DIRECTION_NONE
:
Cb
,
DIRECTION_LEFT
:
Db
,
DIRECTION_RIGHT
:
Eb
,
DIRECTION_UP
:
Fb
,
DIRECTION_DOWN
:
Gb
,
DIRECTION_HORIZONTAL
:
Hb
,
DIRECTION_VERTICAL
:
Ib
,
DIRECTION_ALL
:
Jb
,
Manager
:
fb
,
Input
:
y
,
TouchAction
:
T
,
TouchInput
:
Q
,
MouseInput
:
M
,
PointerEventInput
:
N
,
TouchMouseInput
:
S
,
SingleTouchInput
:
O
,
Recognizer
:
V
,
AttrRecognizer
:
Z
,
Tap
:
db
,
Pan
:
$
,
Swipe
:
cb
,
Pinch
:
_
,
Rotate
:
bb
,
Press
:
ab
,
on
:
n
,
off
:
o
,
each
:
g
,
merge
:
i
,
extend
:
h
,
inherit
:
j
,
bindFn
:
k
,
prefixed
:
v
}),
typeof
define
==
kb
&&
define
.
amd
?
define
(
function
(){
return
eb
}):
"undefined"
!=
typeof
module
&&
module
.
exports
?
module
.
exports
=
eb
:
a
[
c
]
=
eb
}(
window
,
document
,
"Hammer"
);
!
function
(
a
,
b
,
c
,
d
){
"use strict"
;
function
e
(
a
,
b
,
c
){
return
setTimeout
(
k
(
a
,
c
),
b
)}
function
f
(
a
,
b
,
c
){
return
Array
.
isArray
(
a
)?(
g
(
a
,
c
[
b
],
c
),
!
0
):
!
1
}
function
g
(
a
,
b
,
c
){
var
e
;
if
(
a
)
if
(
a
.
forEach
)
a
.
forEach
(
b
,
c
);
else
if
(
a
.
length
!==
d
)
for
(
e
=
0
;
e
<
a
.
length
;)
b
.
call
(
c
,
a
[
e
],
e
,
a
),
e
++
;
else
for
(
e
in
a
)
a
.
hasOwnProperty
(
e
)
&&
b
.
call
(
c
,
a
[
e
],
e
,
a
)}
function
h
(
a
,
b
,
c
){
for
(
var
e
=
Object
.
keys
(
b
),
f
=
0
;
f
<
e
.
length
;)(
!
c
||
c
&&
a
[
e
[
f
]]
===
d
)
&&
(
a
[
e
[
f
]]
=
b
[
e
[
f
]]),
f
++
;
return
a
}
function
i
(
a
,
b
){
return
h
(
a
,
b
,
!
0
)}
function
j
(
a
,
b
,
c
){
var
d
,
e
=
b
.
prototype
;
d
=
a
.
prototype
=
Object
.
create
(
e
),
d
.
constructor
=
a
,
d
.
_super
=
e
,
c
&&
h
(
d
,
c
)}
function
k
(
a
,
b
){
return
function
(){
return
a
.
apply
(
b
,
arguments
)}}
function
l
(
a
,
b
){
return
typeof
a
==
kb
?
a
.
apply
(
b
?
b
[
0
]
||
d
:
d
,
b
):
a
}
function
m
(
a
,
b
){
return
a
===
d
?
b
:
a
}
function
n
(
a
,
b
,
c
){
g
(
r
(
b
),
function
(
b
){
a
.
addEventListener
(
b
,
c
,
!
1
)})}
function
o
(
a
,
b
,
c
){
g
(
r
(
b
),
function
(
b
){
a
.
removeEventListener
(
b
,
c
,
!
1
)})}
function
p
(
a
,
b
){
for
(;
a
;){
if
(
a
==
b
)
return
!
0
;
a
=
a
.
parentNode
}
return
!
1
}
function
q
(
a
,
b
){
return
a
.
indexOf
(
b
)
>-
1
}
function
r
(
a
){
return
a
.
trim
().
split
(
/
\s
+/g
)}
function
s
(
a
,
b
,
c
){
if
(
a
.
indexOf
&&!
c
)
return
a
.
indexOf
(
b
);
for
(
var
d
=
0
;
d
<
a
.
length
;){
if
(
c
&&
a
[
d
][
c
]
==
b
||!
c
&&
a
[
d
]
===
b
)
return
d
;
d
++
}
return
-
1
}
function
t
(
a
){
return
Array
.
prototype
.
slice
.
call
(
a
,
0
)}
function
u
(
a
,
b
,
c
){
for
(
var
d
=
[],
e
=
[],
f
=
0
;
f
<
a
.
length
;){
var
g
=
b
?
a
[
f
][
b
]:
a
[
f
];
s
(
e
,
g
)
<
0
&&
d
.
push
(
a
[
f
]),
e
[
f
]
=
g
,
f
++
}
return
c
&&
(
d
=
b
?
d
.
sort
(
function
(
a
,
c
){
return
a
[
b
]
>
c
[
b
]}):
d
.
sort
()),
d
}
function
v
(
a
,
b
){
for
(
var
c
,
e
,
f
=
b
[
0
].
toUpperCase
()
+
b
.
slice
(
1
),
g
=
0
;
g
<
ib
.
length
;){
if
(
c
=
ib
[
g
],
e
=
c
?
c
+
f
:
b
,
e
in
a
)
return
e
;
g
++
}
return
d
}
function
w
(){
return
ob
++
}
function
x
(
a
){
var
b
=
a
.
ownerDocument
;
return
b
.
defaultView
||
b
.
parentWindow
}
function
y
(
a
,
b
){
var
c
=
this
;
this
.
manager
=
a
,
this
.
callback
=
b
,
this
.
element
=
a
.
element
,
this
.
target
=
a
.
options
.
inputTarget
,
this
.
domHandler
=
function
(
b
){
l
(
a
.
options
.
enable
,[
a
])
&&
c
.
handler
(
b
)},
this
.
init
()}
function
z
(
a
){
var
b
,
c
=
a
.
options
.
inputClass
;
return
new
(
b
=
c
?
c
:
rb
?
N
:
sb
?
Q
:
qb
?
S
:
M
)(
a
,
A
)}
function
A
(
a
,
b
,
c
){
var
d
=
c
.
pointers
.
length
,
e
=
c
.
changedPointers
.
length
,
f
=
b
&
yb
&&
d
-
e
===
0
,
g
=
b
&
(
Ab
|
Bb
)
&&
d
-
e
===
0
;
c
.
isFirst
=!!
f
,
c
.
isFinal
=!!
g
,
f
&&
(
a
.
session
=
{}),
c
.
eventType
=
b
,
B
(
a
,
c
),
a
.
emit
(
"hammer.input"
,
c
),
a
.
recognize
(
c
),
a
.
session
.
prevInput
=
c
}
function
B
(
a
,
b
){
var
c
=
a
.
session
,
d
=
b
.
pointers
,
e
=
d
.
length
;
c
.
firstInput
||
(
c
.
firstInput
=
E
(
b
)),
e
>
1
&&!
c
.
firstMultiple
?
c
.
firstMultiple
=
E
(
b
):
1
===
e
&&
(
c
.
firstMultiple
=!
1
);
var
f
=
c
.
firstInput
,
g
=
c
.
firstMultiple
,
h
=
g
?
g
.
center
:
f
.
center
,
i
=
b
.
center
=
F
(
d
);
b
.
timeStamp
=
nb
(),
b
.
deltaTime
=
b
.
timeStamp
-
f
.
timeStamp
,
b
.
angle
=
J
(
h
,
i
),
b
.
distance
=
I
(
h
,
i
),
C
(
c
,
b
),
b
.
offsetDirection
=
H
(
b
.
deltaX
,
b
.
deltaY
),
b
.
scale
=
g
?
L
(
g
.
pointers
,
d
):
1
,
b
.
rotation
=
g
?
K
(
g
.
pointers
,
d
):
0
,
D
(
c
,
b
);
var
j
=
a
.
element
;
p
(
b
.
srcEvent
.
target
,
j
)
&&
(
j
=
b
.
srcEvent
.
target
),
b
.
target
=
j
}
function
C
(
a
,
b
){
var
c
=
b
.
center
,
d
=
a
.
offsetDelta
||
{},
e
=
a
.
prevDelta
||
{},
f
=
a
.
prevInput
||
{};(
b
.
eventType
===
yb
||
f
.
eventType
===
Ab
)
&&
(
e
=
a
.
prevDelta
=
{
x
:
f
.
deltaX
||
0
,
y
:
f
.
deltaY
||
0
},
d
=
a
.
offsetDelta
=
{
x
:
c
.
x
,
y
:
c
.
y
}),
b
.
deltaX
=
e
.
x
+
(
c
.
x
-
d
.
x
),
b
.
deltaY
=
e
.
y
+
(
c
.
y
-
d
.
y
)}
function
D
(
a
,
b
){
var
c
,
e
,
f
,
g
,
h
=
a
.
lastInterval
||
b
,
i
=
b
.
timeStamp
-
h
.
timeStamp
;
if
(
b
.
eventType
!=
Bb
&&
(
i
>
xb
||
h
.
velocity
===
d
)){
var
j
=
h
.
deltaX
-
b
.
deltaX
,
k
=
h
.
deltaY
-
b
.
deltaY
,
l
=
G
(
i
,
j
,
k
);
e
=
l
.
x
,
f
=
l
.
y
,
c
=
mb
(
l
.
x
)
>
mb
(
l
.
y
)?
l
.
x
:
l
.
y
,
g
=
H
(
j
,
k
),
a
.
lastInterval
=
b
}
else
c
=
h
.
velocity
,
e
=
h
.
velocityX
,
f
=
h
.
velocityY
,
g
=
h
.
direction
;
b
.
velocity
=
c
,
b
.
velocityX
=
e
,
b
.
velocityY
=
f
,
b
.
direction
=
g
}
function
E
(
a
){
for
(
var
b
=
[],
c
=
0
;
c
<
a
.
pointers
.
length
;)
b
[
c
]
=
{
clientX
:
lb
(
a
.
pointers
[
c
].
clientX
),
clientY
:
lb
(
a
.
pointers
[
c
].
clientY
)},
c
++
;
return
{
timeStamp
:
nb
(),
pointers
:
b
,
center
:
F
(
b
),
deltaX
:
a
.
deltaX
,
deltaY
:
a
.
deltaY
}}
function
F
(
a
){
var
b
=
a
.
length
;
if
(
1
===
b
)
return
{
x
:
lb
(
a
[
0
].
clientX
),
y
:
lb
(
a
[
0
].
clientY
)};
for
(
var
c
=
0
,
d
=
0
,
e
=
0
;
b
>
e
;)
c
+=
a
[
e
].
clientX
,
d
+=
a
[
e
].
clientY
,
e
++
;
return
{
x
:
lb
(
c
/
b
),
y
:
lb
(
d
/
b
)}}
function
G
(
a
,
b
,
c
){
return
{
x
:
b
/
a
||
0
,
y
:
c
/
a
||
0
}}
function
H
(
a
,
b
){
return
a
===
b
?
Cb
:
mb
(
a
)
>=
mb
(
b
)?
a
>
0
?
Db
:
Eb
:
b
>
0
?
Fb
:
Gb
}
function
I
(
a
,
b
,
c
){
c
||
(
c
=
Kb
);
var
d
=
b
[
c
[
0
]]
-
a
[
c
[
0
]],
e
=
b
[
c
[
1
]]
-
a
[
c
[
1
]];
return
Math
.
sqrt
(
d
*
d
+
e
*
e
)}
function
J
(
a
,
b
,
c
){
c
||
(
c
=
Kb
);
var
d
=
b
[
c
[
0
]]
-
a
[
c
[
0
]],
e
=
b
[
c
[
1
]]
-
a
[
c
[
1
]];
return
180
*
Math
.
atan2
(
e
,
d
)
/
Math
.
PI
}
function
K
(
a
,
b
){
return
J
(
b
[
1
],
b
[
0
],
Lb
)
-
J
(
a
[
1
],
a
[
0
],
Lb
)}
function
L
(
a
,
b
){
return
I
(
b
[
0
],
b
[
1
],
Lb
)
/
I
(
a
[
0
],
a
[
1
],
Lb
)}
function
M
(){
this
.
evEl
=
Nb
,
this
.
evWin
=
Ob
,
this
.
allow
=!
0
,
this
.
pressed
=!
1
,
y
.
apply
(
this
,
arguments
)}
function
N
(){
this
.
evEl
=
Rb
,
this
.
evWin
=
Sb
,
y
.
apply
(
this
,
arguments
),
this
.
store
=
this
.
manager
.
session
.
pointerEvents
=
[]}
function
O
(){
this
.
evTarget
=
Ub
,
this
.
evWin
=
Vb
,
this
.
started
=!
1
,
y
.
apply
(
this
,
arguments
)}
function
P
(
a
,
b
){
var
c
=
t
(
a
.
touches
),
d
=
t
(
a
.
changedTouches
);
return
b
&
(
Ab
|
Bb
)
&&
(
c
=
u
(
c
.
concat
(
d
),
"identifier"
,
!
0
)),[
c
,
d
]}
function
Q
(){
this
.
evTarget
=
Xb
,
this
.
targetIds
=
{},
y
.
apply
(
this
,
arguments
)}
function
R
(
a
,
b
){
var
c
=
t
(
a
.
touches
),
d
=
this
.
targetIds
;
if
(
b
&
(
yb
|
zb
)
&&
1
===
c
.
length
)
return
d
[
c
[
0
].
identifier
]
=!
0
,[
c
,
c
];
var
e
,
f
,
g
=
t
(
a
.
changedTouches
),
h
=
[],
i
=
this
.
target
;
if
(
f
=
c
.
filter
(
function
(
a
){
return
p
(
a
.
target
,
i
)}),
b
===
yb
)
for
(
e
=
0
;
e
<
f
.
length
;)
d
[
f
[
e
].
identifier
]
=!
0
,
e
++
;
for
(
e
=
0
;
e
<
g
.
length
;)
d
[
g
[
e
].
identifier
]
&&
h
.
push
(
g
[
e
]),
b
&
(
Ab
|
Bb
)
&&
delete
d
[
g
[
e
].
identifier
],
e
++
;
return
h
.
length
?[
u
(
f
.
concat
(
h
),
"identifier"
,
!
0
),
h
]:
void
0
}
function
S
(){
y
.
apply
(
this
,
arguments
);
var
a
=
k
(
this
.
handler
,
this
);
this
.
touch
=
new
Q
(
this
.
manager
,
a
),
this
.
mouse
=
new
M
(
this
.
manager
,
a
)}
function
T
(
a
,
b
){
this
.
manager
=
a
,
this
.
set
(
b
)}
function
U
(
a
){
if
(
q
(
a
,
bc
))
return
bc
;
var
b
=
q
(
a
,
cc
),
c
=
q
(
a
,
dc
);
return
b
&&
c
?
cc
+
" "
+
dc
:
b
||
c
?
b
?
cc
:
dc
:
q
(
a
,
ac
)?
ac
:
_b
}
function
V
(
a
){
this
.
id
=
w
(),
this
.
manager
=
null
,
this
.
options
=
i
(
a
||
{},
this
.
defaults
),
this
.
options
.
enable
=
m
(
this
.
options
.
enable
,
!
0
),
this
.
state
=
ec
,
this
.
simultaneous
=
{},
this
.
requireFail
=
[]}
function
W
(
a
){
return
a
&
jc
?
"cancel"
:
a
&
hc
?
"end"
:
a
&
gc
?
"move"
:
a
&
fc
?
"start"
:
""
}
function
X
(
a
){
return
a
==
Gb
?
"down"
:
a
==
Fb
?
"up"
:
a
==
Db
?
"left"
:
a
==
Eb
?
"right"
:
""
}
function
Y
(
a
,
b
){
var
c
=
b
.
manager
;
return
c
?
c
.
get
(
a
):
a
}
function
Z
(){
V
.
apply
(
this
,
arguments
)}
function
$
(){
Z
.
apply
(
this
,
arguments
),
this
.
pX
=
null
,
this
.
pY
=
null
}
function
_
(){
Z
.
apply
(
this
,
arguments
)}
function
ab
(){
V
.
apply
(
this
,
arguments
),
this
.
_timer
=
null
,
this
.
_input
=
null
}
function
bb
(){
Z
.
apply
(
this
,
arguments
)}
function
cb
(){
Z
.
apply
(
this
,
arguments
)}
function
db
(){
V
.
apply
(
this
,
arguments
),
this
.
pTime
=!
1
,
this
.
pCenter
=!
1
,
this
.
_timer
=
null
,
this
.
_input
=
null
,
this
.
count
=
0
}
function
eb
(
a
,
b
){
return
b
=
b
||
{},
b
.
recognizers
=
m
(
b
.
recognizers
,
eb
.
defaults
.
preset
),
new
fb
(
a
,
b
)}
function
fb
(
a
,
b
){
b
=
b
||
{},
this
.
options
=
i
(
b
,
eb
.
defaults
),
this
.
options
.
inputTarget
=
this
.
options
.
inputTarget
||
a
,
this
.
handlers
=
{},
this
.
session
=
{},
this
.
recognizers
=
[],
this
.
element
=
a
,
this
.
input
=
z
(
this
),
this
.
touchAction
=
new
T
(
this
,
this
.
options
.
touchAction
),
gb
(
this
,
!
0
),
g
(
b
.
recognizers
,
function
(
a
){
var
b
=
this
.
add
(
new
a
[
0
](
a
[
1
]));
a
[
2
]
&&
b
.
recognizeWith
(
a
[
2
]),
a
[
3
]
&&
b
.
requireFailure
(
a
[
3
])},
this
)}
function
gb
(
a
,
b
){
var
c
=
a
.
element
;
g
(
a
.
options
.
cssProps
,
function
(
a
,
d
){
c
.
style
[
v
(
c
.
style
,
d
)]
=
b
?
a
:
""
})}
function
hb
(
a
,
c
){
var
d
=
b
.
createEvent
(
"Event"
);
d
.
initEvent
(
a
,
!
0
,
!
0
),
d
.
gesture
=
c
,
c
.
target
.
dispatchEvent
(
d
)}
var
ib
=
[
""
,
"webkit"
,
"moz"
,
"MS"
,
"ms"
,
"o"
],
jb
=
b
.
createElement
(
"div"
),
kb
=
"function"
,
lb
=
Math
.
round
,
mb
=
Math
.
abs
,
nb
=
Date
.
now
,
ob
=
1
,
pb
=
/mobile|tablet|ip
(
ad|hone|od
)
|android/i
,
qb
=
"ontouchstart"
in
a
,
rb
=
v
(
a
,
"PointerEvent"
)
!==
d
,
sb
=
qb
&&
pb
.
test
(
navigator
.
userAgent
),
tb
=
"touch"
,
ub
=
"pen"
,
vb
=
"mouse"
,
wb
=
"kinect"
,
xb
=
25
,
yb
=
1
,
zb
=
2
,
Ab
=
4
,
Bb
=
8
,
Cb
=
1
,
Db
=
2
,
Eb
=
4
,
Fb
=
8
,
Gb
=
16
,
Hb
=
Db
|
Eb
,
Ib
=
Fb
|
Gb
,
Jb
=
Hb
|
Ib
,
Kb
=
[
"x"
,
"y"
],
Lb
=
[
"clientX"
,
"clientY"
];
y
.
prototype
=
{
handler
:
function
(){},
init
:
function
(){
this
.
evEl
&&
n
(
this
.
element
,
this
.
evEl
,
this
.
domHandler
),
this
.
evTarget
&&
n
(
this
.
target
,
this
.
evTarget
,
this
.
domHandler
),
this
.
evWin
&&
n
(
x
(
this
.
element
),
this
.
evWin
,
this
.
domHandler
)},
destroy
:
function
(){
this
.
evEl
&&
o
(
this
.
element
,
this
.
evEl
,
this
.
domHandler
),
this
.
evTarget
&&
o
(
this
.
target
,
this
.
evTarget
,
this
.
domHandler
),
this
.
evWin
&&
o
(
x
(
this
.
element
),
this
.
evWin
,
this
.
domHandler
)}};
var
Mb
=
{
mousedown
:
yb
,
mousemove
:
zb
,
mouseup
:
Ab
},
Nb
=
"mousedown"
,
Ob
=
"mousemove mouseup"
;
j
(
M
,
y
,{
handler
:
function
(
a
){
var
b
=
Mb
[
a
.
type
];
b
&
yb
&&
0
===
a
.
button
&&
(
this
.
pressed
=!
0
),
b
&
zb
&&
1
!==
a
.
which
&&
(
b
=
Ab
),
this
.
pressed
&&
this
.
allow
&&
(
b
&
Ab
&&
(
this
.
pressed
=!
1
),
this
.
callback
(
this
.
manager
,
b
,{
pointers
:[
a
],
changedPointers
:[
a
],
pointerType
:
vb
,
srcEvent
:
a
}))}});
var
Pb
=
{
pointerdown
:
yb
,
pointermove
:
zb
,
pointerup
:
Ab
,
pointercancel
:
Bb
,
pointerout
:
Bb
},
Qb
=
{
2
:
tb
,
3
:
ub
,
4
:
vb
,
5
:
wb
},
Rb
=
"pointerdown"
,
Sb
=
"pointermove pointerup pointercancel"
;
a
.
MSPointerEvent
&&
(
Rb
=
"MSPointerDown"
,
Sb
=
"MSPointerMove MSPointerUp MSPointerCancel"
),
j
(
N
,
y
,{
handler
:
function
(
a
){
var
b
=
this
.
store
,
c
=!
1
,
d
=
a
.
type
.
toLowerCase
().
replace
(
"ms"
,
""
),
e
=
Pb
[
d
],
f
=
Qb
[
a
.
pointerType
]
||
a
.
pointerType
,
g
=
f
==
tb
,
h
=
s
(
b
,
a
.
pointerId
,
"pointerId"
);
e
&
yb
&&
(
0
===
a
.
button
||
g
)?
0
>
h
&&
(
b
.
push
(
a
),
h
=
b
.
length
-
1
):
e
&
(
Ab
|
Bb
)
&&
(
c
=!
0
),
0
>
h
||
(
b
[
h
]
=
a
,
this
.
callback
(
this
.
manager
,
e
,{
pointers
:
b
,
changedPointers
:[
a
],
pointerType
:
f
,
srcEvent
:
a
}),
c
&&
b
.
splice
(
h
,
1
))}});
var
Tb
=
{
touchstart
:
yb
,
touchmove
:
zb
,
touchend
:
Ab
,
touchcancel
:
Bb
},
Ub
=
"touchstart"
,
Vb
=
"touchstart touchmove touchend touchcancel"
;
j
(
O
,
y
,{
handler
:
function
(
a
){
var
b
=
Tb
[
a
.
type
];
if
(
b
===
yb
&&
(
this
.
started
=!
0
),
this
.
started
){
var
c
=
P
.
call
(
this
,
a
,
b
);
b
&
(
Ab
|
Bb
)
&&
c
[
0
].
length
-
c
[
1
].
length
===
0
&&
(
this
.
started
=!
1
),
this
.
callback
(
this
.
manager
,
b
,{
pointers
:
c
[
0
],
changedPointers
:
c
[
1
],
pointerType
:
tb
,
srcEvent
:
a
})}}});
var
Wb
=
{
touchstart
:
yb
,
touchmove
:
zb
,
touchend
:
Ab
,
touchcancel
:
Bb
},
Xb
=
"touchstart touchmove touchend touchcancel"
;
j
(
Q
,
y
,{
handler
:
function
(
a
){
var
b
=
Wb
[
a
.
type
],
c
=
R
.
call
(
this
,
a
,
b
);
c
&&
this
.
callback
(
this
.
manager
,
b
,{
pointers
:
c
[
0
],
changedPointers
:
c
[
1
],
pointerType
:
tb
,
srcEvent
:
a
})}}),
j
(
S
,
y
,{
handler
:
function
(
a
,
b
,
c
){
var
d
=
c
.
pointerType
==
tb
,
e
=
c
.
pointerType
==
vb
;
if
(
d
)
this
.
mouse
.
allow
=!
1
;
else
if
(
e
&&!
this
.
mouse
.
allow
)
return
;
b
&
(
Ab
|
Bb
)
&&
(
this
.
mouse
.
allow
=!
0
),
this
.
callback
(
a
,
b
,
c
)},
destroy
:
function
(){
this
.
touch
.
destroy
(),
this
.
mouse
.
destroy
()}});
var
Yb
=
v
(
jb
.
style
,
"touchAction"
),
Zb
=
Yb
!==
d
,
$b
=
"compute"
,
_b
=
"auto"
,
ac
=
"manipulation"
,
bc
=
"none"
,
cc
=
"pan-x"
,
dc
=
"pan-y"
;
T
.
prototype
=
{
set
:
function
(
a
){
a
==
$b
&&
(
a
=
this
.
compute
()),
Zb
&&
(
this
.
manager
.
element
.
style
[
Yb
]
=
a
),
this
.
actions
=
a
.
toLowerCase
().
trim
()},
update
:
function
(){
this
.
set
(
this
.
manager
.
options
.
touchAction
)},
compute
:
function
(){
var
a
=
[];
return
g
(
this
.
manager
.
recognizers
,
function
(
b
){
l
(
b
.
options
.
enable
,[
b
])
&&
(
a
=
a
.
concat
(
b
.
getTouchAction
()))}),
U
(
a
.
join
(
" "
))},
preventDefaults
:
function
(
a
){
if
(
!
Zb
){
var
b
=
a
.
srcEvent
,
c
=
a
.
offsetDirection
;
if
(
this
.
manager
.
session
.
prevented
)
return
void
b
.
preventDefault
();
var
d
=
this
.
actions
,
e
=
q
(
d
,
bc
),
f
=
q
(
d
,
dc
),
g
=
q
(
d
,
cc
);
return
e
||
f
&&
c
&
Hb
||
g
&&
c
&
Ib
?
this
.
preventSrc
(
b
):
void
0
}},
preventSrc
:
function
(
a
){
this
.
manager
.
session
.
prevented
=!
0
,
a
.
preventDefault
()}};
var
ec
=
1
,
fc
=
2
,
gc
=
4
,
hc
=
8
,
ic
=
hc
,
jc
=
16
,
kc
=
32
;
V
.
prototype
=
{
defaults
:{},
set
:
function
(
a
){
return
h
(
this
.
options
,
a
),
this
.
manager
&&
this
.
manager
.
touchAction
.
update
(),
this
},
recognizeWith
:
function
(
a
){
if
(
f
(
a
,
"recognizeWith"
,
this
))
return
this
;
var
b
=
this
.
simultaneous
;
return
a
=
Y
(
a
,
this
),
b
[
a
.
id
]
||
(
b
[
a
.
id
]
=
a
,
a
.
recognizeWith
(
this
)),
this
},
dropRecognizeWith
:
function
(
a
){
return
f
(
a
,
"dropRecognizeWith"
,
this
)?
this
:(
a
=
Y
(
a
,
this
),
delete
this
.
simultaneous
[
a
.
id
],
this
)},
requireFailure
:
function
(
a
){
if
(
f
(
a
,
"requireFailure"
,
this
))
return
this
;
var
b
=
this
.
requireFail
;
return
a
=
Y
(
a
,
this
),
-
1
===
s
(
b
,
a
)
&&
(
b
.
push
(
a
),
a
.
requireFailure
(
this
)),
this
},
dropRequireFailure
:
function
(
a
){
if
(
f
(
a
,
"dropRequireFailure"
,
this
))
return
this
;
a
=
Y
(
a
,
this
);
var
b
=
s
(
this
.
requireFail
,
a
);
return
b
>-
1
&&
this
.
requireFail
.
splice
(
b
,
1
),
this
},
hasRequireFailures
:
function
(){
return
this
.
requireFail
.
length
>
0
},
canRecognizeWith
:
function
(
a
){
return
!!
this
.
simultaneous
[
a
.
id
]},
emit
:
function
(
a
){
function
b
(
b
){
c
.
manager
.
emit
(
c
.
options
.
event
+
(
b
?
W
(
d
):
""
),
a
)}
var
c
=
this
,
d
=
this
.
state
;
hc
>
d
&&
b
(
!
0
),
b
(),
d
>=
hc
&&
b
(
!
0
)},
tryEmit
:
function
(
a
){
return
this
.
canEmit
()?
this
.
emit
(
a
):
void
(
this
.
state
=
kc
)},
canEmit
:
function
(){
for
(
var
a
=
0
;
a
<
this
.
requireFail
.
length
;){
if
(
!
(
this
.
requireFail
[
a
].
state
&
(
kc
|
ec
)))
return
!
1
;
a
++
}
return
!
0
},
recognize
:
function
(
a
){
var
b
=
h
({},
a
);
return
l
(
this
.
options
.
enable
,[
this
,
b
])?(
this
.
state
&
(
ic
|
jc
|
kc
)
&&
(
this
.
state
=
ec
),
this
.
state
=
this
.
process
(
b
),
void
(
this
.
state
&
(
fc
|
gc
|
hc
|
jc
)
&&
this
.
tryEmit
(
b
))):(
this
.
reset
(),
void
(
this
.
state
=
kc
))},
process
:
function
(){},
getTouchAction
:
function
(){},
reset
:
function
(){}},
j
(
Z
,
V
,{
defaults
:{
pointers
:
1
},
attrTest
:
function
(
a
){
var
b
=
this
.
options
.
pointers
;
return
0
===
b
||
a
.
pointers
.
length
===
b
},
process
:
function
(
a
){
var
b
=
this
.
state
,
c
=
a
.
eventType
,
d
=
b
&
(
fc
|
gc
),
e
=
this
.
attrTest
(
a
);
return
d
&&
(
c
&
Bb
||!
e
)?
b
|
jc
:
d
||
e
?
c
&
Ab
?
b
|
hc
:
b
&
fc
?
b
|
gc
:
fc
:
kc
}}),
j
(
$
,
Z
,{
defaults
:{
event
:
"pan"
,
threshold
:
10
,
pointers
:
1
,
direction
:
Jb
},
getTouchAction
:
function
(){
var
a
=
this
.
options
.
direction
,
b
=
[];
return
a
&
Hb
&&
b
.
push
(
dc
),
a
&
Ib
&&
b
.
push
(
cc
),
b
},
directionTest
:
function
(
a
){
var
b
=
this
.
options
,
c
=!
0
,
d
=
a
.
distance
,
e
=
a
.
direction
,
f
=
a
.
deltaX
,
g
=
a
.
deltaY
;
return
e
&
b
.
direction
||
(
b
.
direction
&
Hb
?(
e
=
0
===
f
?
Cb
:
0
>
f
?
Db
:
Eb
,
c
=
f
!=
this
.
pX
,
d
=
Math
.
abs
(
a
.
deltaX
)):(
e
=
0
===
g
?
Cb
:
0
>
g
?
Fb
:
Gb
,
c
=
g
!=
this
.
pY
,
d
=
Math
.
abs
(
a
.
deltaY
))),
a
.
direction
=
e
,
c
&&
d
>
b
.
threshold
&&
e
&
b
.
direction
},
attrTest
:
function
(
a
){
return
Z
.
prototype
.
attrTest
.
call
(
this
,
a
)
&&
(
this
.
state
&
fc
||!
(
this
.
state
&
fc
)
&&
this
.
directionTest
(
a
))},
emit
:
function
(
a
){
this
.
pX
=
a
.
deltaX
,
this
.
pY
=
a
.
deltaY
;
var
b
=
X
(
a
.
direction
);
b
&&
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
),
this
.
_super
.
emit
.
call
(
this
,
a
)}}),
j
(
_
,
Z
,{
defaults
:{
event
:
"pinch"
,
threshold
:
0
,
pointers
:
2
},
getTouchAction
:
function
(){
return
[
bc
]},
attrTest
:
function
(
a
){
return
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
(
Math
.
abs
(
a
.
scale
-
1
)
>
this
.
options
.
threshold
||
this
.
state
&
fc
)},
emit
:
function
(
a
){
if
(
this
.
_super
.
emit
.
call
(
this
,
a
),
1
!==
a
.
scale
){
var
b
=
a
.
scale
<
1
?
"in"
:
"out"
;
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
)}}}),
j
(
ab
,
V
,{
defaults
:{
event
:
"press"
,
pointers
:
1
,
time
:
500
,
threshold
:
5
},
getTouchAction
:
function
(){
return
[
_b
]},
process
:
function
(
a
){
var
b
=
this
.
options
,
c
=
a
.
pointers
.
length
===
b
.
pointers
,
d
=
a
.
distance
<
b
.
threshold
,
f
=
a
.
deltaTime
>
b
.
time
;
if
(
this
.
_input
=
a
,
!
d
||!
c
||
a
.
eventType
&
(
Ab
|
Bb
)
&&!
f
)
this
.
reset
();
else
if
(
a
.
eventType
&
yb
)
this
.
reset
(),
this
.
_timer
=
e
(
function
(){
this
.
state
=
ic
,
this
.
tryEmit
()},
b
.
time
,
this
);
else
if
(
a
.
eventType
&
Ab
)
return
ic
;
return
kc
},
reset
:
function
(){
clearTimeout
(
this
.
_timer
)},
emit
:
function
(
a
){
this
.
state
===
ic
&&
(
a
&&
a
.
eventType
&
Ab
?
this
.
manager
.
emit
(
this
.
options
.
event
+
"up"
,
a
):(
this
.
_input
.
timeStamp
=
nb
(),
this
.
manager
.
emit
(
this
.
options
.
event
,
this
.
_input
)))}}),
j
(
bb
,
Z
,{
defaults
:{
event
:
"rotate"
,
threshold
:
0
,
pointers
:
2
},
getTouchAction
:
function
(){
return
[
bc
]},
attrTest
:
function
(
a
){
return
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
(
Math
.
abs
(
a
.
rotation
)
>
this
.
options
.
threshold
||
this
.
state
&
fc
)}}),
j
(
cb
,
Z
,{
defaults
:{
event
:
"swipe"
,
threshold
:
10
,
velocity
:.
65
,
direction
:
Hb
|
Ib
,
pointers
:
1
},
getTouchAction
:
function
(){
return
$
.
prototype
.
getTouchAction
.
call
(
this
)},
attrTest
:
function
(
a
){
var
b
,
c
=
this
.
options
.
direction
;
return
c
&
(
Hb
|
Ib
)?
b
=
a
.
velocity
:
c
&
Hb
?
b
=
a
.
velocityX
:
c
&
Ib
&&
(
b
=
a
.
velocityY
),
this
.
_super
.
attrTest
.
call
(
this
,
a
)
&&
c
&
a
.
direction
&&
a
.
distance
>
this
.
options
.
threshold
&&
mb
(
b
)
>
this
.
options
.
velocity
&&
a
.
eventType
&
Ab
},
emit
:
function
(
a
){
var
b
=
X
(
a
.
direction
);
b
&&
this
.
manager
.
emit
(
this
.
options
.
event
+
b
,
a
),
this
.
manager
.
emit
(
this
.
options
.
event
,
a
)}}),
j
(
db
,
V
,{
defaults
:{
event
:
"tap"
,
pointers
:
1
,
taps
:
1
,
interval
:
300
,
time
:
250
,
threshold
:
2
,
posThreshold
:
10
},
getTouchAction
:
function
(){
return
[
ac
]},
process
:
function
(
a
){
var
b
=
this
.
options
,
c
=
a
.
pointers
.
length
===
b
.
pointers
,
d
=
a
.
distance
<
b
.
threshold
,
f
=
a
.
deltaTime
<
b
.
time
;
if
(
this
.
reset
(),
a
.
eventType
&
yb
&&
0
===
this
.
count
)
return
this
.
failTimeout
();
if
(
d
&&
f
&&
c
){
if
(
a
.
eventType
!=
Ab
)
return
this
.
failTimeout
();
var
g
=
this
.
pTime
?
a
.
timeStamp
-
this
.
pTime
<
b
.
interval
:
!
0
,
h
=!
this
.
pCenter
||
I
(
this
.
pCenter
,
a
.
center
)
<
b
.
posThreshold
;
this
.
pTime
=
a
.
timeStamp
,
this
.
pCenter
=
a
.
center
,
h
&&
g
?
this
.
count
+=
1
:
this
.
count
=
1
,
this
.
_input
=
a
;
var
i
=
this
.
count
%
b
.
taps
;
if
(
0
===
i
)
return
this
.
hasRequireFailures
()?(
this
.
_timer
=
e
(
function
(){
this
.
state
=
ic
,
this
.
tryEmit
()},
b
.
interval
,
this
),
fc
):
ic
}
return
kc
},
failTimeout
:
function
(){
return
this
.
_timer
=
e
(
function
(){
this
.
state
=
kc
},
this
.
options
.
interval
,
this
),
kc
},
reset
:
function
(){
clearTimeout
(
this
.
_timer
)},
emit
:
function
(){
this
.
state
==
ic
&&
(
this
.
_input
.
tapCount
=
this
.
count
,
this
.
manager
.
emit
(
this
.
options
.
event
,
this
.
_input
))}}),
eb
.
VERSION
=
"2.0.4"
,
eb
.
defaults
=
{
domEvents
:
!
1
,
touchAction
:
$b
,
enable
:
!
0
,
inputTarget
:
null
,
inputClass
:
null
,
preset
:[[
bb
,{
enable
:
!
1
}],[
_
,{
enable
:
!
1
},[
"rotate"
]],[
cb
,{
direction
:
Hb
}],[
$
,{
direction
:
Hb
},[
"swipe"
]],[
db
],[
db
,{
event
:
"doubletap"
,
taps
:
2
},[
"tap"
]],[
ab
]],
cssProps
:{
userSelect
:
"none"
,
touchSelect
:
"none"
,
touchCallout
:
"none"
,
contentZooming
:
"none"
,
userDrag
:
"none"
,
tapHighlightColor
:
"rgba(0,0,0,0)"
}};
var
lc
=
1
,
mc
=
2
;
fb
.
prototype
=
{
set
:
function
(
a
){
return
h
(
this
.
options
,
a
),
a
.
touchAction
&&
this
.
touchAction
.
update
(),
a
.
inputTarget
&&
(
this
.
input
.
destroy
(),
this
.
input
.
target
=
a
.
inputTarget
,
this
.
input
.
init
()),
this
},
stop
:
function
(
a
){
this
.
session
.
stopped
=
a
?
mc
:
lc
},
recognize
:
function
(
a
){
var
b
=
this
.
session
;
if
(
!
b
.
stopped
){
this
.
touchAction
.
preventDefaults
(
a
);
var
c
,
d
=
this
.
recognizers
,
e
=
b
.
curRecognizer
;(
!
e
||
e
&&
e
.
state
&
ic
)
&&
(
e
=
b
.
curRecognizer
=
null
);
for
(
var
f
=
0
;
f
<
d
.
length
;)
c
=
d
[
f
],
b
.
stopped
===
mc
||
e
&&
c
!=
e
&&!
c
.
canRecognizeWith
(
e
)?
c
.
reset
():
c
.
recognize
(
a
),
!
e
&&
c
.
state
&
(
fc
|
gc
|
hc
)
&&
(
e
=
b
.
curRecognizer
=
c
),
f
++
}},
get
:
function
(
a
){
if
(
a
instanceof
V
)
return
a
;
for
(
var
b
=
this
.
recognizers
,
c
=
0
;
c
<
b
.
length
;
c
++
)
if
(
b
[
c
].
options
.
event
==
a
)
return
b
[
c
];
return
null
},
add
:
function
(
a
){
if
(
f
(
a
,
"add"
,
this
))
return
this
;
var
b
=
this
.
get
(
a
.
options
.
event
);
return
b
&&
this
.
remove
(
b
),
this
.
recognizers
.
push
(
a
),
a
.
manager
=
this
,
this
.
touchAction
.
update
(),
a
},
remove
:
function
(
a
){
if
(
f
(
a
,
"remove"
,
this
))
return
this
;
var
b
=
this
.
recognizers
;
return
a
=
this
.
get
(
a
),
b
.
splice
(
s
(
b
,
a
),
1
),
this
.
touchAction
.
update
(),
this
},
on
:
function
(
a
,
b
){
var
c
=
this
.
handlers
;
return
g
(
r
(
a
),
function
(
a
){
c
[
a
]
=
c
[
a
]
||
[],
c
[
a
].
push
(
b
)}),
this
},
off
:
function
(
a
,
b
){
var
c
=
this
.
handlers
;
return
g
(
r
(
a
),
function
(
a
){
b
?
c
[
a
].
splice
(
s
(
c
[
a
],
b
),
1
):
delete
c
[
a
]}),
this
},
emit
:
function
(
a
,
b
){
this
.
options
.
domEvents
&&
hb
(
a
,
b
);
var
c
=
this
.
handlers
[
a
]
&&
this
.
handlers
[
a
].
slice
();
if
(
c
&&
c
.
length
){
b
.
type
=
a
,
b
.
preventDefault
=
function
(){
b
.
srcEvent
.
preventDefault
()};
for
(
var
d
=
0
;
d
<
c
.
length
;)
c
[
d
](
b
),
d
++
}},
destroy
:
function
(){
this
.
element
&&
gb
(
this
,
!
1
),
this
.
handlers
=
{},
this
.
session
=
{},
this
.
input
.
destroy
(),
this
.
element
=
null
}},
h
(
eb
,{
INPUT_START
:
yb
,
INPUT_MOVE
:
zb
,
INPUT_END
:
Ab
,
INPUT_CANCEL
:
Bb
,
STATE_POSSIBLE
:
ec
,
STATE_BEGAN
:
fc
,
STATE_CHANGED
:
gc
,
STATE_ENDED
:
hc
,
STATE_RECOGNIZED
:
ic
,
STATE_CANCELLED
:
jc
,
STATE_FAILED
:
kc
,
DIRECTION_NONE
:
Cb
,
DIRECTION_LEFT
:
Db
,
DIRECTION_RIGHT
:
Eb
,
DIRECTION_UP
:
Fb
,
DIRECTION_DOWN
:
Gb
,
DIRECTION_HORIZONTAL
:
Hb
,
DIRECTION_VERTICAL
:
Ib
,
DIRECTION_ALL
:
Jb
,
Manager
:
fb
,
Input
:
y
,
TouchAction
:
T
,
TouchInput
:
Q
,
MouseInput
:
M
,
PointerEventInput
:
N
,
TouchMouseInput
:
S
,
SingleTouchInput
:
O
,
Recognizer
:
V
,
AttrRecognizer
:
Z
,
Tap
:
db
,
Pan
:
$
,
Swipe
:
cb
,
Pinch
:
_
,
Rotate
:
bb
,
Press
:
ab
,
on
:
n
,
off
:
o
,
each
:
g
,
merge
:
i
,
extend
:
h
,
inherit
:
j
,
bindFn
:
k
,
prefixed
:
v
}),
typeof
define
==
kb
&&
define
.
amd
?
define
(
function
(){
return
eb
}):
"undefined"
!=
typeof
module
&&
module
.
exports
?
module
.
exports
=
eb
:
a
[
c
]
=
eb
}(
window
,
document
,
"Hammer"
);
//# sourceMappingURL=hammer.min.map
//# sourceMappingURL=hammer.min.map
\ No newline at end of file
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