Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
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
solo-1
Commits
c37bf256
Unverified
Commit
c37bf256
authored
Feb 19, 2019
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
vditor -> 0.2.5
parent
ef9ffe76
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
43 additions
and
145 deletions
+43
-145
src/main/webapp/admin/admin-index.ftl
src/main/webapp/admin/admin-index.ftl
+2
-2
src/main/webapp/css/default-admin.css
src/main/webapp/css/default-admin.css
+2
-2
src/main/webapp/css/default-admin.min.css
src/main/webapp/css/default-admin.min.css
+1
-18
src/main/webapp/css/default-base.min.css
src/main/webapp/css/default-base.min.css
+0
-17
src/main/webapp/css/default-init.css
src/main/webapp/css/default-init.css
+2
-2
src/main/webapp/css/default-init.min.css
src/main/webapp/css/default-init.min.css
+1
-18
src/main/webapp/js/admin/admin.min.js
src/main/webapp/js/admin/admin.min.js
+0
-17
src/main/webapp/js/common.min.js
src/main/webapp/js/common.min.js
+0
-17
src/main/webapp/js/lib/emojify.js-1.1.0/images/basic/huaji.gif
...ain/webapp/js/lib/emojify.js-1.1.0/images/basic/huaji.gif
+0
-0
src/main/webapp/js/lib/vditor-0.2.0/index.min.js
src/main/webapp/js/lib/vditor-0.2.0/index.min.js
+0
-27
src/main/webapp/js/lib/vditor-0.2.5/index.classic.css
src/main/webapp/js/lib/vditor-0.2.5/index.classic.css
+2
-2
src/main/webapp/js/lib/vditor-0.2.5/index.dark.css
src/main/webapp/js/lib/vditor-0.2.5/index.dark.css
+2
-2
src/main/webapp/js/lib/vditor-0.2.5/index.min.js
src/main/webapp/js/lib/vditor-0.2.5/index.min.js
+27
-0
src/main/webapp/js/lib/vditor-0.2.5/vditor.bundle.js
src/main/webapp/js/lib/vditor-0.2.5/vditor.bundle.js
+0
-0
src/main/webapp/js/lib/vditor-0.2.5/vendors~vditor.bundle.js
src/main/webapp/js/lib/vditor-0.2.5/vendors~vditor.bundle.js
+0
-0
src/main/webapp/js/page.js
src/main/webapp/js/page.js
+3
-3
src/main/webapp/js/page.min.js
src/main/webapp/js/page.min.js
+1
-18
No files found.
src/main/webapp/admin/admin-index.ftl
View file @
c37bf256
...
...
@@ -31,7 +31,7 @@
<title>
${adminConsoleLabel} - ${blogTitle}
</title>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/css/default-base${miniPostfix}.css?${staticResourceVersion}"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/css/default-admin${miniPostfix}.css?${staticResourceVersion}"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/js/lib/vditor-0.2.
0
/index.classic.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/js/lib/vditor-0.2.
5
/index.classic.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"${staticServePath}/js/lib/highlight-9.13.1/styles/github.css?${staticResourceVersion}"
/>
<link
rel=
"icon"
type=
"image/png"
href=
"${staticServePath}/favicon.png"
/>
<link
rel=
"manifest"
href=
"${servePath}/manifest.json"
>
...
...
@@ -169,7 +169,7 @@
</div>
</div>
<script
src=
"${staticServePath}/js/lib/compress/admin-lib.min.js"
></script>
<script
src=
"${staticServePath}/js/lib/vditor-0.2.
0
/index.min.js"
></script>
<script
src=
"${staticServePath}/js/lib/vditor-0.2.
5
/index.min.js"
></script>
<script
src=
"${staticServePath}/js/common${miniPostfix}.js"
></script>
<
#if
""
==
miniPostfix
>
<script
src=
"${staticServePath}/js/admin/admin.js"
></script>
...
...
src/main/webapp/css/default-admin.css
View file @
c37bf256
...
...
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.6.0.
3, Feb 17
, 2019
* @version 2.6.0.
4, Feb 19
, 2019
*/
/* start resset */
...
...
@@ -76,7 +76,7 @@ a:hover {
.content-reset
img
.emoji
{
cursor
:
auto
;
max-width
:
18
px
;
max-width
:
20
px
;
}
.content-reset
h1
,
...
...
src/main/webapp/css/default-admin.min.css
View file @
c37bf256
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
.content-reset
h1
,
.content-reset
h2
{
padding-bottom
:
.3em
;
border-bottom
:
1px
solid
#eee
}
#tabs
ul
,
.sub-tabs
ul
{
list-style
:
none
}
body
,
input
,
textarea
{
font-family
:
"Helvetica Neue"
,
"Luxi Sans"
,
"DejaVu Sans"
,
Tahoma
,
"Hiragino Sans GB"
,
"Microsoft Yahei"
,
sans-serif
}
body
,
html
{
color
:
#767676
;
background
:
#f1f2f7
;
font-size
:
13px
}
a
{
color
:
#4183c4
;
text-decoration
:
none
}
a
:visited
{
color
:
#7ba9d6
}
a
:active
{
color
:
#2c5d8d
}
a
:hover
{
text-decoration
:
underline
}
.content-reset
{
word-wrap
:
break-word
;
overflow
:
auto
;
line-height
:
1.65
;
font-size
:
16px
;
word-break
:
break-word
}
.content-reset
ol
,
.content-reset
ul
{
padding-left
:
2em
;
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
li
{
margin-top
:
.25em
}
.content-reset
img
{
cursor
:
zoom-in
}
.content-reset
img
.emoji
{
cursor
:
auto
;
max-width
:
18px
}
.content-reset
h1
,
.content-reset
h2
,
.content-reset
h3
,
.content-reset
h4
,
.content-reset
h5
,
.content-reset
h6
{
margin-top
:
24px
;
margin-bottom
:
16px
;
font-weight
:
600
;
line-height
:
1.25
}
.content-reset
h1
{
font-size
:
1.7em
}
.content-reset
h2
{
font-size
:
1.5em
}
.content-reset
h3
{
font-size
:
1.25em
}
.content-reset
h4
{
font-size
:
1em
}
.content-reset
h5
{
font-size
:
.875em
}
.content-reset
h6
{
font-size
:
.85em
}
.content-reset
hr
{
height
:
.15em
;
padding
:
0
;
margin
:
24px
0
;
background-color
:
#e7e7e7
;
border
:
0
}
.content-reset
p
{
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
blockquote
{
padding
:
0
1em
;
color
:
#777
;
border-left
:
.25em
solid
#ddd
;
margin-bottom
:
16px
}
.content-reset
blockquote
p
{
margin
:
0
}
.content-reset
ins
>
iframe
{
border
:
0
}
.content-reset
iframe
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
)}
.content-reset
table
{
width
:
100%
;
border
:
1px
solid
#dedede
;
margin
:
15px
auto
;
border-collapse
:
collapse
;
empty-cells
:
show
}
.content-reset
thead
{
text-align
:
center
}
.content-reset
td
,
.content-reset
th
{
height
:
35px
;
border
:
1px
solid
#dedede
;
padding
:
0
10px
}
.content-reset
th
{
font-weight
:
700
;
text-align
:
center
!important
;
background
:
rgba
(
158
,
188
,
226
,
.2
)}
#top
>
a
,
.article__thumbnail
,
.footer
,
.skinItem
,
.tip
,
.tooltipped
::after
{
text-align
:
center
}
.content-reset
tbody
tr
:nth-child
(
2n
)
{
background
:
rgba
(
158
,
188
,
226
,
.12
)}
.content-reset
tr
:hover
{
background
:
#efefef
}
.content-reset
code
{
padding
:
.2em
.4em
;
margin
:
0
;
font-size
:
85%
;
background-color
:
rgba
(
252
,
41
,
41
,
.12
);
border-radius
:
3px
;
word-break
:
break-word
}
.content-reset
pre
{
position
:
relative
}
.content-reset
pre
textarea
{
position
:
absolute
;
top
:
-100000px
}
.content-reset
pre
>
code
{
padding
:
.5em
;
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
background-size
:
20px
20px
;
border-radius
:
5px
;
display
:
block
}
.content-reset
kbd
{
display
:
inline-block
;
padding
:
3px
5px
;
font
:
11px
Consolas
,
"Liberation Mono"
,
Menlo
,
Courier
,
monospace
;
line-height
:
10px
;
color
:
#555
;
vertical-align
:
middle
;
background-color
:
#fcfcfc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
);
border-bottom-color
:
#bbb
;
border-radius
:
3px
;
box-shadow
:
inset
0
-1px
0
#bbb
}
.content-reset
.task-list-item
,
.content-reset__task
{
list-style
:
none
;
margin-left
:
-1em
}
.tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.tooltipped
::after
,
.tooltipped
::before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
}
.tooltipped
::after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
;
opacity
:
0
}
.tooltipped
::before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
;
opacity
:
0
}
@-webkit-keyframes
tooltip-appear
{
from
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
from
{
opacity
:
0
}
to
{
opacity
:
1
}}
.tooltipped-hover
::after
,
.tooltipped-hover
::before
,
.tooltipped
:active::after
,
.tooltipped
:active::before
,
.tooltipped
:focus::after
,
.tooltipped
:focus::before
,
.tooltipped
:hover::after
,
.tooltipped
:hover::before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.tooltipped-s
::after
,
.tooltipped-se
::after
,
.tooltipped-sw
::after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.tooltipped-s
::before
,
.tooltipped-se
::before
,
.tooltipped-sw
::before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-se
::after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.tooltipped-sw
::after
{
margin-right
:
-15px
}
.tooltipped-n
::after
,
.tooltipped-ne
::after
,
.tooltipped-nw
::after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.tooltipped-n
::before
,
.tooltipped-ne
::before
,
.tooltipped-nw
::before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-ne
::after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.tooltipped-nw
::after
{
margin-right
:
-15px
}
.tooltipped-n
::after
,
.tooltipped-s
::after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.tooltipped-w
::after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.tooltipped-w
::before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-e
::after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.tooltipped-e
::before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.completed-ck
span
,
button
{
padding
:
6px
12px
;
margin-bottom
:
0
;
font-size
:
14px
;
font-weight
:
400
;
text-align
:
center
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
cursor
:
pointer
;
user-select
:
none
;
background-image
:
none
;
border
:
1px
solid
#1fb5ad
;
border-radius
:
4px
;
background-color
:
#1fb5ad
;
color
:
#fff
;
height
:
auto
;
outline
:
0
;
line-height
:
18px
}
button
:hover
{
background-color
:
#1ca59e
;
border-color
:
#1ca59e
}
@font-face
{
font-family
:
icomoon
;
src
:
url(fonts/icomoon.eot?pmeuih)
;
src
:
url(fonts/icomoon.eot?pmeuih#iefix)
format
(
'embedded-opentype'
),
url(fonts/icomoon.ttf?pmeuih)
format
(
'truetype'
),
url(fonts/icomoon.woff?pmeuih)
format
(
'woff'
),
url(fonts/icomoon.svg?pmeuih#icomoon)
format
(
'svg'
);
font-weight
:
400
;
font-style
:
normal
}
[
class
*=
" icon-"
],[
class
^=
icon-
]
{
font-family
:
icomoon
!important
;
speak
:
none
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
line-height
:
1
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
}
.icon-close
:before
{
content
:
"\e909"
}
.icon-move-down
:before
{
content
:
"\e90a"
}
.icon-move-up
:before
{
content
:
"\e90b"
}
.icon-unordered-list
:before
{
content
:
"\e004"
}
.icon-info
:before
{
content
:
"\e00d"
}
.icon-article
:before
{
content
:
"\e61d"
}
.icon-setting
:before
{
content
:
"\e604"
}
.icon-cmts
:before
{
content
:
"\e60a"
}
.icon-refresh
:before
{
content
:
"\e60b"
}
.icon-chevron-down
:before
{
content
:
"\e618"
}
.icon-chevron-up
:before
{
content
:
"\e619"
}
a
[
class
*=
" icon-"
],
a
[
class
^=
icon-
]
{
color
:
#333
}
a
[
class
*=
" icon-"
]
:hover
,
a
[
class
^=
icon-
]
:hover
{
text-decoration
:
none
;
color
:
#4183c4
}
.aboutIcon
{
background-position
:
-16px
-48px
}
.icon-move-down
,
.icon-move-up
{
cursor
:
pointer
}
#allPanel
{
height
:
auto
;
min-height
:
100%
;
position
:
relative
}
#top
,
#top
>
a
{
height
:
50px
}
#tabsPanel
{
margin
:
50px
0
0
240px
;
padding
:
15px
;
min-height
:
100px
}
#tabsPanel
>
div
{
padding-bottom
:
36px
}
#tabsPanel_article-list
,
#tabsPanel_category-list
>
div
:first-child
,
#tabsPanel_comment-list
,
#tabsPanel_draft-list
,
#tabsPanel_link-list
>
div
:first-child
,
#tabsPanel_page-list
>
div
:first-child
,
#tabsPanel_plugin-list
,
#tabsPanel_user-list
>
div
:first-child
{
background-color
:
#FFF
;
border-radius
:
4px
;
margin-bottom
:
40px
;
overflow
:
hidden
}
.tip
{
font-weight
:
700
;
margin
:
0
auto
;
overflow
:
hidden
;
padding
:
2px
0
;
position
:
fixed
;
top
:
3px
;
left
:
255px
;
z-index
:
1001
}
#loadMsg
,
#tipMsg
{
color
:
#31708f
;
background-color
:
#d9edf7
;
border-radius
:
4px
;
line-height
:
40px
;
display
:
inline-block
}
.footer
{
bottom
:
12px
;
position
:
absolute
;
width
:
100%
;
padding-left
:
240px
;
box-sizing
:
border-box
}
#top
{
position
:
fixed
;
box-shadow
:
1px
0
3px
rgba
(
0
,
0
,
0
,
.15
);
width
:
100%
;
top
:
0
;
background-color
:
#fff
;
z-index
:
80
}
#top
>
a
{
background
:
#1fb5ad
;
float
:
left
;
width
:
240px
;
position
:
relative
;
color
:
#F7F7F7
;
text-decoration
:
none
;
font-size
:
20px
;
line-height
:
50px
}
#top
>
.right
a
{
color
:
#555
;
line-height
:
32px
;
margin
:
8px
10px
;
border
:
1px
solid
#f6f6f6
;
background-color
:
#f6f6f6
;
border-radius
:
100px
;
padding
:
0
10px
;
text-decoration
:
none
;
display
:
inline-block
}
#top
>
.right
a
:hover
{
color
:
#333
}
#top
.avatar
{
height
:
25px
;
width
:
25px
;
border-radius
:
20px
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
float
:
left
;
margin
:
3px
6px
0
0
}
#tabs
{
height
:
100%
;
min-height
:
468px
;
width
:
240px
;
margin-top
:
50px
;
position
:
fixed
;
top
:
0
;
background-color
:
#32323a
;
overflow
:
auto
}
#tabs
li
{
margin-left
:
0
;
border-bottom
:
1px
solid
rgba
(
255
,
255
,
255
,
.05
)}
#tabs
#tabArticleTitle
,
#tabs
#tabToolsTitle
,
#tabs
li
>
div
>
a
{
color
:
#aeb2b7
;
display
:
block
;
text-decoration
:
none
;
letter-spacing
:
1px
;
padding
:
18px
0
18px
25px
;
line-height
:
18px
;
height
:
18px
;
transition
:
all
.3s
ease
;
cursor
:
pointer
}
#tabs
#tabArticleTitle
.tab-current
,
#tabs
#tabArticleTitle
:hover
,
#tabs
#tabToolsTitle
.tab-current
,
#tabs
#tabToolsTitle
:hover
,
#tabs
a
.tab-current
,
#tabs
a
:hover
{
background-color
:
#28282e
;
color
:
#1fb5ad
}
#tabs
li
li
{
border-bottom
:
0
}
#tabs
li
li
>
div
>
a
{
padding
:
13px
0
13px
46px
;
line-height
:
15px
;
height
:
15px
;
background-color
:
#28282e
}
#tabs
li
li
>
div
>
a
.tab-current
,
#tabs
li
li
>
div
>
a
:hover
{
background-color
:
#202025
}
#tabs
.aboutIcon
,
#tabs
.commentIcon
,
#tabs
.postIcon
,
#tabs
.preferenceIcon
,
#tabs
.usersIcon
{
display
:
none
}
#tabs
.icon-chevron-down
,
#tabs
.icon-chevron-up
{
margin-right
:
10px
}
.sub-tabs
{
background-color
:
#e0e1e7
;
border-radius
:
4px
4px
0
0
;
overflow
:
hidden
}
.sub-tabs
ul
{
float
:
left
;
margin-right
:
24px
}
.sub-tabs
li
{
float
:
left
;
margin
:
0
}
.sub-tabs
li
a
{
border-right
:
1px
solid
#e0e1e7
;
color
:
#898989
;
display
:
block
;
line-height
:
18px
;
padding
:
20px
15px
;
text-decoration
:
none
}
.sub-tabs
.tab-current
,
.sub-tabs
.tab-current
:hover
,
.sub-tabs
a
:hover
{
background-color
:
#FFF
;
color
:
#1fb5ad
}
.sub-tabs-main
{
background-color
:
#FFF
;
padding
:
15px
;
border-radius
:
0
0
4px
4px
}
.form
>
div
{
margin
:
15px
0
}
.form
label
{
margin-bottom
:
10px
;
display
:
inline-block
}
.form
label
.checkbox
{
display
:
inline-flex
;
align-items
:
center
;
margin
:
11px
0
}
.form
label
.checkbox
input
{
height
:
auto
}
.form
input
[
type
=
text
],
.form
input
[
type
=
password
],
.form
select
,
.form
textarea
{
font-size
:
14px
;
outline
:
0
;
width
:
100%
;
padding
:
6px
12px
;
height
:
34px
;
box-sizing
:
border-box
;
border
:
1px
solid
#e2e2e4
;
color
:
#333
;
border-radius
:
4px
;
transition
:
border-color
ease-in-out
.15s
,
box-shadow
ease-in-out
.15s
;
background-color
:
#fff
}
.form
textarea
{
height
:
auto
}
.form
input
[
type
=
text
]
:focus
,
.form
input
[
type
=
password
]
:focus
,
.form
input
[
type
=
radio
]
:focus
,
.form
textarea
:focus
{
box-shadow
:
none
;
border-color
:
#1fb5ad
}
table
.form
label
{
margin
:
10px
0
0
}
table
.form
th
{
vertical-align
:
initial
}
.module-panel
{
border-radius
:
4px
;
background-color
:
#fff
;
margin-bottom
:
20px
;
min-height
:
160px
}
.module-header
{
background
:
#fafafa
;
padding
:
15px
;
border-bottom
:
1px
solid
#eff2f7
;
border-top-left-radius
:
3px
;
border-top-right-radius
:
3px
}
.module-header
h2
{
font-size
:
13px
;
font-weight
:
400
}
.module-header
a
{
color
:
#767676
;
text-decoration
:
none
}
.module-header
a
:hover
{
color
:
#1fb5ad
}
.module-panel
.module-body
{
padding
:
15px
}
.module-panel
.module-body
li
{
padding
:
10px
;
line-height
:
18px
;
border-bottom
:
1px
solid
#ddd
}
.module-panel
.module-body
li
:hover
{
background-color
:
#fafafa
}
.module-panel
.module-body
li
a
:hover
{
text-decoration
:
none
}
.comment-title
{
background-color
:
#ECECEC
;
border-bottom
:
1px
solid
#DFDFDF
;
border-top
:
1px
solid
#F9F9F9
;
padding
:
3px
6px
3px
12px
}
#comments
{
height
:
462px
;
overflow
:
auto
}
.article__thumbnail
{
margin
:
10px
auto
20px
;
display
:
none
}
.article__thumbnail
.thumbnail__img
{
background-color
:
rgba
(
0
,
0
,
0
,
.02
);
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
50%
;
height
:
432px
;
width
:
768px
;
margin
:
0
auto
}
.article__thumbnail
button
{
margin-top
:
10px
}
button
#submitArticle
{
background-color
:
#fa8564
;
border-color
:
#fa8564
}
button
#submitArticle
:hover
{
background-color
:
#ec6459
;
border-color
:
#ec6459
}
#pagePagePanel
{
margin-top
:
0
}
#skinsPanel
{
min-width
:
328px
;
width
:
99%
}
.skinPreview
{
cursor
:
pointer
;
height
:
160px
;
margin
:
6px
;
width
:
280px
}
.skinItem
{
background-color
:
#FAFAFA
;
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
#333
;
line-height
:
16px
;
margin
:
10px
}
#skinMain
.skinItem.selected
{
background-color
:
#1fb5ad
}
.skinItem
:hover
{
background-color
:
#EEE
}
.error-msg
,
.f-blue
{
color
:
#36C
}
.small-head
{
float
:
left
;
height
:
35px
;
margin
:
3px
9px
0
3px
;
width
:
35px
}
#commentTable
.table-main
td
{
vertical-align
:
top
}
.about-logo
{
float
:
left
;
margin
:
20px
0
0
20px
}
.about-margin
{
font-size
:
20px
;
margin
:
20px
0
}
.content-reset
.about-list
li
{
border
:
0
}
.content-reset
.about-list
li
:hover
{
background-color
:
#fff
;
text-decoration
:
underline
}
.tag__select
{
position
:
relative
;
display
:
block
}
.tag__select
button
{
position
:
absolute
;
right
:
0
;
top
:
1px
;
border-radius
:
0
4px
4px
0
}
.completed-panel
{
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
color
:
#00C
;
display
:
none
;
overflow
:
auto
;
padding
:
2px
;
position
:
absolute
;
z-index
:
10
;
width
:
50%
;
border-top
:
0
}
.completed-panel
a
{
display
:
block
;
text-decoration
:
none
;
line-height
:
26px
;
padding
:
0
5px
}
.completed-panel
a
.selected
{
background-color
:
#fafafa
;
color
:
#fa8564
}
.completed-ck
{
margin-top
:
9px
}
.completed-ck
span
,
.signs
button
{
margin
:
5px
10px
5px
0
;
display
:
inline-block
;
background-color
:
#c7cbd6
;
border-color
:
#c7cbd6
}
.completed-ck
span
:hover
,
.signs
button
:hover
{
background-color
:
#b0b5b9
;
border-color
:
#b0b5b9
}
.completed-ck
span
.selected
,
.signs
button
.selected
{
background-color
:
#1ca59e
;
border-color
:
#1ca59e
;
color
:
#fff
}
.dialog-background
{
background-color
:
#000
;
display
:
none
;
filter
:
alpha
(
opacity
=
30
);
height
:
100%
;
left
:
0
;
opacity
:
.3
;
position
:
fixed
;
top
:
0
;
width
:
100%
;
z-index
:
90
}
.dialog-panel
{
display
:
none
;
position
:
absolute
;
z-index
:
100
}
.dialog-title
{
color
:
#FFF
;
float
:
left
;
font-size
:
12px
;
margin-left
:
12px
}
.dialog-header-bg
{
background
:
#32323a
;
border-radius
:
6px
6px
0
0
;
cursor
:
move
;
height
:
34px
;
line-height
:
34px
}
.dialog-header-bg
.icon-close
{
cursor
:
pointer
;
float
:
right
;
height
:
18px
;
margin-top
:
6px
;
padding
:
3px
;
width
:
22px
;
color
:
#1fb5ad
}
.dialog-header-bg
.icon-close
:hover
{
color
:
#1ca59e
}
.dialog-main
{
background-color
:
#FFF
;
border
:
1px
solid
#666
;
border-color
:
silver
#D9D9D9
#D9D9D9
;
border-top-width
:
0
;
padding
:
12px
}
.paginate-pageCount
,
.paginate-paginate
a
,
.paginate-paginate
div
.button.paginate-page
,
.pagination-pages
{
border
:
1px
solid
#EFF2F7
;
padding
:
6px
12px
;
cursor
:
pointer
;
float
:
left
;
line-height
:
18px
;
background
:
#eee
;
height
:
18px
;
margin-left
:
1px
;
border-radius
:
0
;
text-decoration
:
none
;
color
:
#333
}
.paginate-pageCount
,
.pagination-current-page
{
cursor
:
auto
}
.paginate-pageCount
{
margin-left
:
10px
}
.paginate-paginate
a
:hover
,
.paginate-paginate
div
.button.paginate-page
:hover
,
.pagination-current-page
,
.pagination-pages
:hover
{
border-color
:
#2eb4ad
;
background-color
:
#2eb4ad
;
color
:
#FFF
}
.paginate-paginate
div
.button
{
padding
:
0
;
float
:
left
;
border
:
0
;
background
:
0
0
}
.table-header
,
.table-main
td
{
border-bottom
:
1px
solid
#ddd
}
.paginate-inputPage
{
height
:
26px
;
width
:
24px
;
margin
:
0
5px
}
.table-main
{
margin
:
0
;
padding
:
0
;
position
:
relative
}
.table-main
table
{
word-break
:
break-all
;
word-wrap
:
break-word
}
.table-header
{
background-color
:
#fafafa
;
padding
:
15px
0
}
.table-header
th
{
line-height
:
18px
;
text-align
:
left
;
text-indent
:
6px
;
font-weight
:
400
}
.table-main
td
{
color
:
#767676
;
padding
:
10px
0
}
.table-lineHover
.table-hasExpend
td
{
border-bottom
:
0
}
.table-heiglight
td
,
.table-lineHover
td
{
background-color
:
#fafafa
;
border-right-color
:
#fafafa
}
.table-expendRow
td
{
padding
:
0
0
5px
36px
}
.table-expendRow
td
span
{
margin-left
:
60px
}
.table-expendRow
td
a
{
padding
:
1px
5px
;
font-size
:
12px
;
line-height
:
1.5
;
border-radius
:
3px
;
text-decoration
:
none
;
color
:
#FFF
;
background-color
:
#c7cbd6
;
border-color
:
#c7cbd6
}
.table-expendRow
td
a
:hover
{
background-color
:
#b0b5b9
;
border-color
:
#b0b5b9
}
.table-center
{
margin
:
0
auto
}
.table-tag
{
color
:
#D54121
;
font-size
:
12px
;
font-style
:
italic
;
margin-left
:
10px
}
.navigation-icon
{
height
:
18px
;
width
:
18px
;
float
:
left
;
margin
:
-1px
10px
0
0
}
#preferenceSignButton1
,
#preferenceSignButton2
,
#preferenceSignButton3
{
margin
:
10px
0
}
#tabPreferencePanel
label
,
#tabPreferencePanel_setting
label
,
.form__no-table
label
{
width
:
100%
;
margin-top
:
10px
;
font-weight
:
700
}
.page-list__label
{
width
:
100%
}
.search-btn
{
position
:
absolute
;
top
:
28px
;
right
:
27px
;
border-radius
:
0
4px
4px
0
}
.vditor-toolbar
label
{
margin-bottom
:
0
}
.vditor
.vditor-textarea
{
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fafbfc
;
outline
:
0
;
font-size
:
16px
;
line-height
:
22px
;
color
:
#24292e
;
border-radius
:
0
0
3px
3px
}
@media
(
max-width
:
768px
){
#top
>
a
{
display
:
none
}
.about-logo
,
.fn__flex
,
.top__menu
{
display
:
block
}
#tabsPanel
{
margin-left
:
0
}
.footer
{
padding-left
:
0
}
.skinPreview
{
width
:
100%
;
height
:
auto
;
margin
:
0
}
.tip
{
left
:
12px
}
#tabs
{
transition
:
all
.15s
ease-in-out
;
left
:
-240px
;
z-index
:
100
}
.top__menu
{
font-size
:
22px
;
margin
:
12px
;
float
:
left
}
#permalink
{
margin
:
0
!important
}
.permalink__label
{
margin-bottom
:
10px
!important
}
.article-commentable__panel
,
.viewpwd__panel
{
float
:
none
}
#viewPwd
{
width
:
100%
!important
}
.viewpwd__panel
label
{
margin-top
:
20px
}
.signs
label
{
width
:
100%
}
.table-expendRow
td
{
padding-left
:
10px
}
.about-margin
{
margin-bottom
:
10px
}
.about__iframe
{
margin
:
0
0
20px
!important
}
.about-logo
{
margin
:
0
auto
;
float
:
none
;
width
:
128px
}
.about__panel
{
margin-left
:
0
!important
}
.dialog-panel
{
left
:
0
!important
;
top
:
0
!important
;
padding
:
10px
!important
;
box-sizing
:
border-box
!important
;
width
:
100%
!important
}
.tabs__bg
{
display
:
none
;
width
:
100vw
;
height
:
100vh
;
background-color
:
rgba
(
0
,
0
,
0
,
.4
);
position
:
fixed
;
top
:
0
;
z-index
:
78
}}
\ No newline at end of file
.content-reset
h1
,
.content-reset
h2
{
padding-bottom
:
.3em
;
border-bottom
:
1px
solid
#eee
}
#tabs
ul
,
.sub-tabs
ul
{
list-style
:
none
}
body
,
input
,
textarea
{
font-family
:
"Helvetica Neue"
,
"Luxi Sans"
,
"DejaVu Sans"
,
Tahoma
,
"Hiragino Sans GB"
,
"Microsoft Yahei"
,
sans-serif
}
body
,
html
{
color
:
#767676
;
background
:
#f1f2f7
;
font-size
:
13px
}
a
{
color
:
#4183c4
;
text-decoration
:
none
}
a
:visited
{
color
:
#7ba9d6
}
a
:active
{
color
:
#2c5d8d
}
a
:hover
{
text-decoration
:
underline
}
.content-reset
{
word-wrap
:
break-word
;
overflow
:
auto
;
line-height
:
1.65
;
font-size
:
16px
;
word-break
:
break-word
}
.content-reset
ol
,
.content-reset
ul
{
padding-left
:
2em
;
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
li
{
margin-top
:
.25em
}
.content-reset
img
{
cursor
:
zoom-in
}
.content-reset
img
.emoji
{
cursor
:
auto
;
max-width
:
20px
}
.content-reset
h1
,
.content-reset
h2
,
.content-reset
h3
,
.content-reset
h4
,
.content-reset
h5
,
.content-reset
h6
{
margin-top
:
24px
;
margin-bottom
:
16px
;
font-weight
:
600
;
line-height
:
1.25
}
.content-reset
h1
{
font-size
:
1.7em
}
.content-reset
h2
{
font-size
:
1.5em
}
.content-reset
h3
{
font-size
:
1.25em
}
.content-reset
h4
{
font-size
:
1em
}
.content-reset
h5
{
font-size
:
.875em
}
.content-reset
h6
{
font-size
:
.85em
}
.content-reset
hr
{
height
:
.15em
;
padding
:
0
;
margin
:
24px
0
;
background-color
:
#e7e7e7
;
border
:
0
}
.content-reset
p
{
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
blockquote
{
padding
:
0
1em
;
color
:
#777
;
border-left
:
.25em
solid
#ddd
;
margin-bottom
:
16px
}
.content-reset
blockquote
p
{
margin
:
0
}
.content-reset
ins
>
iframe
{
border
:
0
}
.content-reset
iframe
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
)}
.content-reset
table
{
width
:
100%
;
border
:
1px
solid
#dedede
;
margin
:
15px
auto
;
border-collapse
:
collapse
;
empty-cells
:
show
}
.content-reset
thead
{
text-align
:
center
}
.content-reset
td
,
.content-reset
th
{
height
:
35px
;
border
:
1px
solid
#dedede
;
padding
:
0
10px
}
.content-reset
th
{
font-weight
:
700
;
text-align
:
center
!important
;
background
:
rgba
(
158
,
188
,
226
,
.2
)}
#top
>
a
,
.article__thumbnail
,
.footer
,
.skinItem
,
.tip
,
.tooltipped
::after
{
text-align
:
center
}
.content-reset
tbody
tr
:nth-child
(
2n
)
{
background
:
rgba
(
158
,
188
,
226
,
.12
)}
.content-reset
tr
:hover
{
background
:
#efefef
}
.content-reset
code
{
padding
:
.2em
.4em
;
margin
:
0
;
font-size
:
85%
;
background-color
:
rgba
(
252
,
41
,
41
,
.12
);
border-radius
:
3px
;
word-break
:
break-word
}
.content-reset
pre
{
position
:
relative
}
.content-reset
pre
textarea
{
position
:
absolute
;
top
:
-100000px
}
.content-reset
pre
>
code
{
padding
:
.5em
;
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
background-size
:
20px
20px
;
border-radius
:
5px
;
display
:
block
}
.content-reset
kbd
{
display
:
inline-block
;
padding
:
3px
5px
;
font
:
11px
Consolas
,
"Liberation Mono"
,
Menlo
,
Courier
,
monospace
;
line-height
:
10px
;
color
:
#555
;
vertical-align
:
middle
;
background-color
:
#fcfcfc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
);
border-bottom-color
:
#bbb
;
border-radius
:
3px
;
box-shadow
:
inset
0
-1px
0
#bbb
}
.content-reset
.task-list-item
,
.content-reset__task
{
list-style
:
none
;
margin-left
:
-1em
}
.tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.tooltipped
::after
,
.tooltipped
::before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
}
.tooltipped
::after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
;
opacity
:
0
}
.tooltipped
::before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
;
opacity
:
0
}
@-webkit-keyframes
tooltip-appear
{
from
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
from
{
opacity
:
0
}
to
{
opacity
:
1
}}
.tooltipped-hover
::after
,
.tooltipped-hover
::before
,
.tooltipped
:active::after
,
.tooltipped
:active::before
,
.tooltipped
:focus::after
,
.tooltipped
:focus::before
,
.tooltipped
:hover::after
,
.tooltipped
:hover::before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.tooltipped-s
::after
,
.tooltipped-se
::after
,
.tooltipped-sw
::after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.tooltipped-s
::before
,
.tooltipped-se
::before
,
.tooltipped-sw
::before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-se
::after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.tooltipped-sw
::after
{
margin-right
:
-15px
}
.tooltipped-n
::after
,
.tooltipped-ne
::after
,
.tooltipped-nw
::after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.tooltipped-n
::before
,
.tooltipped-ne
::before
,
.tooltipped-nw
::before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-ne
::after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.tooltipped-nw
::after
{
margin-right
:
-15px
}
.tooltipped-n
::after
,
.tooltipped-s
::after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.tooltipped-w
::after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.tooltipped-w
::before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.tooltipped-e
::after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.tooltipped-e
::before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.completed-ck
span
,
button
{
padding
:
6px
12px
;
margin-bottom
:
0
;
font-size
:
14px
;
font-weight
:
400
;
text-align
:
center
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
cursor
:
pointer
;
user-select
:
none
;
background-image
:
none
;
border
:
1px
solid
#1fb5ad
;
border-radius
:
4px
;
background-color
:
#1fb5ad
;
color
:
#fff
;
height
:
auto
;
outline
:
0
;
line-height
:
18px
}
button
:hover
{
background-color
:
#1ca59e
;
border-color
:
#1ca59e
}
@font-face
{
font-family
:
icomoon
;
src
:
url(fonts/icomoon.eot?pmeuih)
;
src
:
url(fonts/icomoon.eot?pmeuih#iefix)
format
(
'embedded-opentype'
),
url(fonts/icomoon.ttf?pmeuih)
format
(
'truetype'
),
url(fonts/icomoon.woff?pmeuih)
format
(
'woff'
),
url(fonts/icomoon.svg?pmeuih#icomoon)
format
(
'svg'
);
font-weight
:
400
;
font-style
:
normal
}
[
class
*=
" icon-"
],[
class
^=
icon-
]
{
font-family
:
icomoon
!important
;
speak
:
none
;
font-style
:
normal
;
font-weight
:
400
;
font-variant
:
normal
;
text-transform
:
none
;
line-height
:
1
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
}
.icon-close
:before
{
content
:
"\e909"
}
.icon-move-down
:before
{
content
:
"\e90a"
}
.icon-move-up
:before
{
content
:
"\e90b"
}
.icon-unordered-list
:before
{
content
:
"\e004"
}
.icon-info
:before
{
content
:
"\e00d"
}
.icon-article
:before
{
content
:
"\e61d"
}
.icon-setting
:before
{
content
:
"\e604"
}
.icon-cmts
:before
{
content
:
"\e60a"
}
.icon-refresh
:before
{
content
:
"\e60b"
}
.icon-chevron-down
:before
{
content
:
"\e618"
}
.icon-chevron-up
:before
{
content
:
"\e619"
}
a
[
class
*=
" icon-"
],
a
[
class
^=
icon-
]
{
color
:
#333
}
a
[
class
*=
" icon-"
]
:hover
,
a
[
class
^=
icon-
]
:hover
{
text-decoration
:
none
;
color
:
#4183c4
}
.aboutIcon
{
background-position
:
-16px
-48px
}
.icon-move-down
,
.icon-move-up
{
cursor
:
pointer
}
#allPanel
{
height
:
auto
;
min-height
:
100%
;
position
:
relative
}
#top
,
#top
>
a
{
height
:
50px
}
#tabsPanel
{
margin
:
50px
0
0
240px
;
padding
:
15px
;
min-height
:
100px
}
#tabsPanel
>
div
{
padding-bottom
:
36px
}
#tabsPanel_article-list
,
#tabsPanel_category-list
>
div
:first-child
,
#tabsPanel_comment-list
,
#tabsPanel_draft-list
,
#tabsPanel_link-list
>
div
:first-child
,
#tabsPanel_page-list
>
div
:first-child
,
#tabsPanel_plugin-list
,
#tabsPanel_user-list
>
div
:first-child
{
background-color
:
#FFF
;
border-radius
:
4px
;
margin-bottom
:
40px
;
overflow
:
hidden
}
.tip
{
font-weight
:
700
;
margin
:
0
auto
;
overflow
:
hidden
;
padding
:
2px
0
;
position
:
fixed
;
top
:
3px
;
left
:
255px
;
z-index
:
1001
}
#loadMsg
,
#tipMsg
{
color
:
#31708f
;
background-color
:
#d9edf7
;
border-radius
:
4px
;
line-height
:
40px
;
display
:
inline-block
}
.footer
{
bottom
:
12px
;
position
:
absolute
;
width
:
100%
;
padding-left
:
240px
;
box-sizing
:
border-box
}
#top
{
position
:
fixed
;
box-shadow
:
1px
0
3px
rgba
(
0
,
0
,
0
,
.15
);
width
:
100%
;
top
:
0
;
background-color
:
#fff
;
z-index
:
80
}
#top
>
a
{
background
:
#1fb5ad
;
float
:
left
;
width
:
240px
;
position
:
relative
;
color
:
#F7F7F7
;
text-decoration
:
none
;
font-size
:
20px
;
line-height
:
50px
}
#top
>
.right
a
{
color
:
#555
;
line-height
:
32px
;
margin
:
8px
10px
;
border
:
1px
solid
#f6f6f6
;
background-color
:
#f6f6f6
;
border-radius
:
100px
;
padding
:
0
10px
;
text-decoration
:
none
;
display
:
inline-block
}
#top
>
.right
a
:hover
{
color
:
#333
}
#top
.avatar
{
height
:
25px
;
width
:
25px
;
border-radius
:
20px
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
float
:
left
;
margin
:
3px
6px
0
0
}
#tabs
{
height
:
100%
;
min-height
:
468px
;
width
:
240px
;
margin-top
:
50px
;
position
:
fixed
;
top
:
0
;
background-color
:
#32323a
;
overflow
:
auto
}
#tabs
li
{
margin-left
:
0
;
border-bottom
:
1px
solid
rgba
(
255
,
255
,
255
,
.05
)}
#tabs
#tabArticleTitle
,
#tabs
#tabToolsTitle
,
#tabs
li
>
div
>
a
{
color
:
#aeb2b7
;
display
:
block
;
text-decoration
:
none
;
letter-spacing
:
1px
;
padding
:
18px
0
18px
25px
;
line-height
:
18px
;
height
:
18px
;
transition
:
all
.3s
ease
;
cursor
:
pointer
}
#tabs
#tabArticleTitle
.tab-current
,
#tabs
#tabArticleTitle
:hover
,
#tabs
#tabToolsTitle
.tab-current
,
#tabs
#tabToolsTitle
:hover
,
#tabs
a
.tab-current
,
#tabs
a
:hover
{
background-color
:
#28282e
;
color
:
#1fb5ad
}
#tabs
li
li
{
border-bottom
:
0
}
#tabs
li
li
>
div
>
a
{
padding
:
13px
0
13px
46px
;
line-height
:
15px
;
height
:
15px
;
background-color
:
#28282e
}
#tabs
li
li
>
div
>
a
.tab-current
,
#tabs
li
li
>
div
>
a
:hover
{
background-color
:
#202025
}
#tabs
.aboutIcon
,
#tabs
.commentIcon
,
#tabs
.postIcon
,
#tabs
.preferenceIcon
,
#tabs
.usersIcon
{
display
:
none
}
#tabs
.icon-chevron-down
,
#tabs
.icon-chevron-up
{
margin-right
:
10px
}
.sub-tabs
{
background-color
:
#e0e1e7
;
border-radius
:
4px
4px
0
0
;
overflow
:
hidden
}
.sub-tabs
ul
{
float
:
left
;
margin-right
:
24px
}
.sub-tabs
li
{
float
:
left
;
margin
:
0
}
.sub-tabs
li
a
{
border-right
:
1px
solid
#e0e1e7
;
color
:
#898989
;
display
:
block
;
line-height
:
18px
;
padding
:
20px
15px
;
text-decoration
:
none
}
.sub-tabs
.tab-current
,
.sub-tabs
.tab-current
:hover
,
.sub-tabs
a
:hover
{
background-color
:
#FFF
;
color
:
#1fb5ad
}
.sub-tabs-main
{
background-color
:
#FFF
;
padding
:
15px
;
border-radius
:
0
0
4px
4px
}
.form
>
div
{
margin
:
15px
0
}
.form
label
{
margin-bottom
:
10px
;
display
:
inline-block
}
.form
label
.checkbox
{
display
:
inline-flex
;
align-items
:
center
;
margin
:
11px
0
}
.form
label
.checkbox
input
{
height
:
auto
}
.form
input
[
type
=
text
],
.form
input
[
type
=
password
],
.form
select
,
.form
textarea
{
font-size
:
14px
;
outline
:
0
;
width
:
100%
;
padding
:
6px
12px
;
height
:
34px
;
box-sizing
:
border-box
;
border
:
1px
solid
#e2e2e4
;
color
:
#333
;
border-radius
:
4px
;
transition
:
border-color
ease-in-out
.15s
,
box-shadow
ease-in-out
.15s
;
background-color
:
#fff
}
.form
textarea
{
height
:
auto
}
.form
input
[
type
=
text
]
:focus
,
.form
input
[
type
=
password
]
:focus
,
.form
input
[
type
=
radio
]
:focus
,
.form
textarea
:focus
{
box-shadow
:
none
;
border-color
:
#1fb5ad
}
table
.form
label
{
margin
:
10px
0
0
}
table
.form
th
{
vertical-align
:
initial
}
.module-panel
{
border-radius
:
4px
;
background-color
:
#fff
;
margin-bottom
:
20px
;
min-height
:
160px
}
.module-header
{
background
:
#fafafa
;
padding
:
15px
;
border-bottom
:
1px
solid
#eff2f7
;
border-top-left-radius
:
3px
;
border-top-right-radius
:
3px
}
.module-header
h2
{
font-size
:
13px
;
font-weight
:
400
}
.module-header
a
{
color
:
#767676
;
text-decoration
:
none
}
.module-header
a
:hover
{
color
:
#1fb5ad
}
.module-panel
.module-body
{
padding
:
15px
}
.module-panel
.module-body
li
{
padding
:
10px
;
line-height
:
18px
;
border-bottom
:
1px
solid
#ddd
}
.module-panel
.module-body
li
:hover
{
background-color
:
#fafafa
}
.module-panel
.module-body
li
a
:hover
{
text-decoration
:
none
}
.comment-title
{
background-color
:
#ECECEC
;
border-bottom
:
1px
solid
#DFDFDF
;
border-top
:
1px
solid
#F9F9F9
;
padding
:
3px
6px
3px
12px
}
#comments
{
height
:
462px
;
overflow
:
auto
}
.article__thumbnail
{
margin
:
10px
auto
20px
;
display
:
none
}
.article__thumbnail
.thumbnail__img
{
background-color
:
rgba
(
0
,
0
,
0
,
.02
);
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
50%
;
height
:
432px
;
width
:
768px
;
margin
:
0
auto
}
.article__thumbnail
button
{
margin-top
:
10px
}
button
#submitArticle
{
background-color
:
#fa8564
;
border-color
:
#fa8564
}
button
#submitArticle
:hover
{
background-color
:
#ec6459
;
border-color
:
#ec6459
}
#pagePagePanel
{
margin-top
:
0
}
#skinsPanel
{
min-width
:
328px
;
width
:
99%
}
.skinPreview
{
cursor
:
pointer
;
height
:
160px
;
margin
:
6px
;
width
:
280px
}
.skinItem
{
background-color
:
#FAFAFA
;
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
#333
;
line-height
:
16px
;
margin
:
10px
}
#skinMain
.skinItem.selected
{
background-color
:
#1fb5ad
}
.skinItem
:hover
{
background-color
:
#EEE
}
.error-msg
,
.f-blue
{
color
:
#36C
}
.small-head
{
float
:
left
;
height
:
35px
;
margin
:
3px
9px
0
3px
;
width
:
35px
}
#commentTable
.table-main
td
{
vertical-align
:
top
}
.about-logo
{
float
:
left
;
margin
:
20px
0
0
20px
}
.about-margin
{
font-size
:
20px
;
margin
:
20px
0
}
.content-reset
.about-list
li
{
border
:
0
}
.content-reset
.about-list
li
:hover
{
background-color
:
#fff
;
text-decoration
:
underline
}
.tag__select
{
position
:
relative
;
display
:
block
}
.tag__select
button
{
position
:
absolute
;
right
:
0
;
top
:
1px
;
border-radius
:
0
4px
4px
0
}
.completed-panel
{
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
color
:
#00C
;
display
:
none
;
overflow
:
auto
;
padding
:
2px
;
position
:
absolute
;
z-index
:
10
;
width
:
50%
;
border-top
:
0
}
.completed-panel
a
{
display
:
block
;
text-decoration
:
none
;
line-height
:
26px
;
padding
:
0
5px
}
.completed-panel
a
.selected
{
background-color
:
#fafafa
;
color
:
#fa8564
}
.completed-ck
{
margin-top
:
9px
}
.completed-ck
span
,
.signs
button
{
margin
:
5px
10px
5px
0
;
display
:
inline-block
;
background-color
:
#c7cbd6
;
border-color
:
#c7cbd6
}
.completed-ck
span
:hover
,
.signs
button
:hover
{
background-color
:
#b0b5b9
;
border-color
:
#b0b5b9
}
.completed-ck
span
.selected
,
.signs
button
.selected
{
background-color
:
#1ca59e
;
border-color
:
#1ca59e
;
color
:
#fff
}
.dialog-background
{
background-color
:
#000
;
display
:
none
;
filter
:
alpha
(
opacity
=
30
);
height
:
100%
;
left
:
0
;
opacity
:
.3
;
position
:
fixed
;
top
:
0
;
width
:
100%
;
z-index
:
90
}
.dialog-panel
{
display
:
none
;
position
:
absolute
;
z-index
:
100
}
.dialog-title
{
color
:
#FFF
;
float
:
left
;
font-size
:
12px
;
margin-left
:
12px
}
.dialog-header-bg
{
background
:
#32323a
;
border-radius
:
6px
6px
0
0
;
cursor
:
move
;
height
:
34px
;
line-height
:
34px
}
.dialog-header-bg
.icon-close
{
cursor
:
pointer
;
float
:
right
;
height
:
18px
;
margin-top
:
6px
;
padding
:
3px
;
width
:
22px
;
color
:
#1fb5ad
}
.dialog-header-bg
.icon-close
:hover
{
color
:
#1ca59e
}
.dialog-main
{
background-color
:
#FFF
;
border
:
1px
solid
#666
;
border-color
:
silver
#D9D9D9
#D9D9D9
;
border-top-width
:
0
;
padding
:
12px
}
.paginate-pageCount
,
.paginate-paginate
a
,
.paginate-paginate
div
.button.paginate-page
,
.pagination-pages
{
border
:
1px
solid
#EFF2F7
;
padding
:
6px
12px
;
cursor
:
pointer
;
float
:
left
;
line-height
:
18px
;
background
:
#eee
;
height
:
18px
;
margin-left
:
1px
;
border-radius
:
0
;
text-decoration
:
none
;
color
:
#333
}
.paginate-pageCount
,
.pagination-current-page
{
cursor
:
auto
}
.paginate-pageCount
{
margin-left
:
10px
}
.paginate-paginate
a
:hover
,
.paginate-paginate
div
.button.paginate-page
:hover
,
.pagination-current-page
,
.pagination-pages
:hover
{
border-color
:
#2eb4ad
;
background-color
:
#2eb4ad
;
color
:
#FFF
}
.paginate-paginate
div
.button
{
padding
:
0
;
float
:
left
;
border
:
0
;
background
:
0
0
}
.table-header
,
.table-main
td
{
border-bottom
:
1px
solid
#ddd
}
.paginate-inputPage
{
height
:
26px
;
width
:
24px
;
margin
:
0
5px
}
.table-main
{
margin
:
0
;
padding
:
0
;
position
:
relative
}
.table-main
table
{
word-break
:
break-all
;
word-wrap
:
break-word
}
.table-header
{
background-color
:
#fafafa
;
padding
:
15px
0
}
.table-header
th
{
line-height
:
18px
;
text-align
:
left
;
text-indent
:
6px
;
font-weight
:
400
}
.table-main
td
{
color
:
#767676
;
padding
:
10px
0
}
.table-lineHover
.table-hasExpend
td
{
border-bottom
:
0
}
.table-heiglight
td
,
.table-lineHover
td
{
background-color
:
#fafafa
;
border-right-color
:
#fafafa
}
.table-expendRow
td
{
padding
:
0
0
5px
36px
}
.table-expendRow
td
span
{
margin-left
:
60px
}
.table-expendRow
td
a
{
padding
:
1px
5px
;
font-size
:
12px
;
line-height
:
1.5
;
border-radius
:
3px
;
text-decoration
:
none
;
color
:
#FFF
;
background-color
:
#c7cbd6
;
border-color
:
#c7cbd6
}
.table-expendRow
td
a
:hover
{
background-color
:
#b0b5b9
;
border-color
:
#b0b5b9
}
.table-center
{
margin
:
0
auto
}
.table-tag
{
color
:
#D54121
;
font-size
:
12px
;
font-style
:
italic
;
margin-left
:
10px
}
.navigation-icon
{
height
:
18px
;
width
:
18px
;
float
:
left
;
margin
:
-1px
10px
0
0
}
#preferenceSignButton1
,
#preferenceSignButton2
,
#preferenceSignButton3
{
margin
:
10px
0
}
#tabPreferencePanel
label
,
#tabPreferencePanel_setting
label
,
.form__no-table
label
{
width
:
100%
;
margin-top
:
10px
;
font-weight
:
700
}
.page-list__label
{
width
:
100%
}
.search-btn
{
position
:
absolute
;
top
:
28px
;
right
:
27px
;
border-radius
:
0
4px
4px
0
}
.vditor-toolbar
label
{
margin-bottom
:
0
}
.vditor
.vditor-textarea
{
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fafbfc
;
outline
:
0
;
font-size
:
16px
;
line-height
:
22px
;
color
:
#24292e
;
border-radius
:
0
0
3px
3px
}
@media
(
max-width
:
768px
){
#top
>
a
{
display
:
none
}
.about-logo
,
.fn__flex
,
.top__menu
{
display
:
block
}
#tabsPanel
{
margin-left
:
0
}
.footer
{
padding-left
:
0
}
.skinPreview
{
width
:
100%
;
height
:
auto
;
margin
:
0
}
.tip
{
left
:
12px
}
#tabs
{
transition
:
all
.15s
ease-in-out
;
left
:
-240px
;
z-index
:
100
}
.top__menu
{
font-size
:
22px
;
margin
:
12px
;
float
:
left
}
#permalink
{
margin
:
0
!important
}
.permalink__label
{
margin-bottom
:
10px
!important
}
.article-commentable__panel
,
.viewpwd__panel
{
float
:
none
}
#viewPwd
{
width
:
100%
!important
}
.viewpwd__panel
label
{
margin-top
:
20px
}
.signs
label
{
width
:
100%
}
.table-expendRow
td
{
padding-left
:
10px
}
.about-margin
{
margin-bottom
:
10px
}
.about__iframe
{
margin
:
0
0
20px
!important
}
.about-logo
{
margin
:
0
auto
;
float
:
none
;
width
:
128px
}
.about__panel
{
margin-left
:
0
!important
}
.dialog-panel
{
left
:
0
!important
;
top
:
0
!important
;
padding
:
10px
!important
;
box-sizing
:
border-box
!important
;
width
:
100%
!important
}
.tabs__bg
{
display
:
none
;
width
:
100vw
;
height
:
100vh
;
background-color
:
rgba
(
0
,
0
,
0
,
.4
);
position
:
fixed
;
top
:
0
;
z-index
:
78
}}
\ No newline at end of file
src/main/webapp/css/default-base.min.css
View file @
c37bf256
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
body
,
dd
,
div
,
dl
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
html
,
img
,
li
,
ol
,
p
,
ul
{
padding
:
0
;
margin
:
0
}
.clear
,
.fn-clear
:after
{
clear
:
both
}
.form
th
,
.nowrap
{
white-space
:
nowrap
}
.goBottomIcon
,
.goTopIcon
{
position
:
fixed
;
right
:
20px
}
#tags
,
#tags
li
{
list-style
:
none
}
body
{
background-color
:
#FFF
;
color
:
#000
;
font-family
:
elvetica
,
Arial
,
sans-serif
,
'\5fae\8f6f\96c5\9ed1'
;
font-size
:
small
}
img
{
border
:
none
;
vertical-align
:
middle
}
h1
{
font-size
:
160%
}
h2
{
font-size
:
140%
}
h3
{
font-size
:
120%
}
h4
{
font-size
:
110%
}
textarea
{
overflow
:
auto
}
.button
,
button
{
background
:
url(../images/icon.png)
center
bottom
;
border
:
1px
solid
;
border-color
:
#CCC
#BBB
#A0A0A0
;
border-radius
:
4px
;
height
:
28px
;
margin
:
0
;
padding
:
0
6px
;
vertical-align
:
top
}
.button
:hover
,
button
:hover
{
border-color
:
#BBB
}
.padding12
{
padding
:
12px
}
.paddingBottom12
{
padding-bottom
:
12px
!important
}
.paddingTop12
{
padding-top
:
12px
!important
}
.margin12
{
margin
:
12px
}
.marginTop12
{
margin-top
:
12px
!important
}
.marginBottom12
{
margin-bottom
:
12px
!important
}
.marginLeft12
{
margin-left
:
12px
!important
}
.marginLeft6
{
margin-left
:
6px
!important
}
.marginRight12
{
margin-right
:
12px
!important
}
.f-bold
{
font-weight
:
700
!important
}
.left
{
float
:
left
}
.right
{
float
:
right
}
.clear
{
background-color
:
transparent
;
border
:
0
;
display
:
block
;
font-size
:
0
;
height
:
0
;
line-height
:
0
;
overflow
:
hidden
}
.fn-clear
:after
,
.fn-clear
:before
{
display
:
table
;
content
:
""
}
.fn__flex
{
display
:
flex
}
.fn__flex1
{
flex
:
1
;
min-width
:
1px
}
.fn__flex-inline
{
display
:
inline-flex
!important
;
align-items
:
center
}
.none
{
display
:
none
}
.pointer
{
cursor
:
pointer
}
.no-underline
{
text-decoration
:
none
!important
}
#tags
a
,
.logo
{
text-decoration
:
none
}
.red
{
color
:
red
}
.contentBody
{
margin-bottom
:
12px
;
padding
:
3px
12px
}
.form
th
{
text-align
:
right
}
.form
input
[
type
=
text
],
.form
input
[
type
=
password
],
.form
textarea
{
border-color
:
silver
#D9D9D9
#D9D9D9
;
border-right
:
1px
solid
#D9D9D9
;
border-style
:
solid
;
border-width
:
1px
;
font-family
:
Helvetica
,
Arial
,
sans-serif
;
font-size
:
12px
;
outline
:
0
;
width
:
99%
;
padding
:
0
3px
}
.form
input
{
height
:
24px
}
.form
input
[
type
=
checkbox
]
{
border
:
0
;
vertical-align
:
sub
;
height
:
20px
}
.form
input
.normalInput
{
width
:
auto
}
.form
input
[
type
=
checkbox
]
:focus
{
border
:
0
;
box-shadow
:
0
0
0
}
.form
input
:focus
,
.form
textarea
:focus
{
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.3
)
inset
}
.form
textarea
{
padding
:
3px
;
overflow
:
auto
;
resize
:
vertical
}
.logo
{
padding
:
0
5px
;
text-shadow
:
0
0
1px
#EEE
}
.article-body
h1
,
.article-body
h2
{
padding-bottom
:
.3em
;
border-bottom
:
1px
solid
#eee
}
.aboutIcon
,
.adminIcon
,
.articlesIcon
,
.browserIcon
,
.cacheIcon
,
.calendarIcon
,
.commentIcon
,
.deleteIcon
,
.draftsIcon
,
.falseIcon
,
.fileIcon
,
.goBottomIcon
,
.goTopIcon
,
.homeIcon
,
.linkIcon
,
.loginIcon
,
.logoutIcon
,
.notPutTopIcon
,
.othersIcon
,
.pageIcon
,
.postIcon
,
.preferenceIcon
,
.putTopIcon
,
.trueIcon
,
.updateIcon
,
.usersIcon
{
background-image
:
url(../images/icon.png)
;
cursor
:
pointer
;
height
:
16px
;
width
:
16px
}
.adminIcon
,
.homeIcon
,
.loginIcon
,
.logoutIcon
{
margin-top
:
3px
}
.pageIcon
{
background-position
:
-144px
0
}
.postIcon
{
background-position
:
-16px
0
}
.linkIcon
{
background-position
:
-32px
0
}
.preferenceIcon
{
background-position
:
-48px
0
}
.articlesIcon
{
background-position
:
-64px
0
}
.trueIcon
{
background-position
:
-80px
0
;
cursor
:
auto
}
.falseIcon
{
background-position
:
-96px
0
;
cursor
:
auto
}
.fileIcon
{
background-position
:
-112px
0
}
.deleteIcon
{
background-position
:
0
-16px
}
.updateIcon
{
background-position
:
-16px
-16px
}
.commentIcon
{
background-position
:
-32px
-16px
}
.homeIcon
{
background-position
:
-64px
-16px
}
.adminIcon
{
background-position
:
-80px
-16px
}
.logoutIcon
{
background-position
:
-96px
-16px
}
.loginIcon
{
background-position
:
-112px
-16px
}
.browserIcon
{
background-position
:
-128px
-16px
}
.calendarIcon
{
background-position
:
-144px
-16px
}
.putTopIcon
{
background-position
:
-16px
-32px
;
float
:
left
}
.notPutTopIcon
{
background-position
:
-32px
-32px
;
float
:
left
}
.othersIcon
{
background-position
:
-48px
-32px
}
.cacheIcon
,
.draftsIcon
{
background-position
:
-96px
-32px
}
.usersIcon
{
background-position
:
-112px
-32px
}
.goTopIcon
{
background-position
:
-64px
-32px
;
top
:
45%
}
.goBottomIcon
{
background-position
:
-80px
-32px
;
bottom
:
40%
}
.article-body
{
word-wrap
:
break-word
;
overflow
:
auto
;
line-height
:
1.65
;
font-size
:
16px
;
word-break
:
break-word
}
.article-body
ol
,
.article-body
ul
{
padding-left
:
2em
;
margin-top
:
0
;
margin-bottom
:
16px
}
.article-body
li
{
margin-top
:
.25em
}
.article-body
img
{
cursor
:
zoom-in
}
.article-body
img
.emoji
{
cursor
:
auto
;
max-width
:
18px
}
#captcha
,
#captchaReply
,
#emotions
span
{
cursor
:
pointer
}
.article-body
h1
,
.article-body
h2
,
.article-body
h3
,
.article-body
h4
,
.article-body
h5
,
.article-body
h6
{
margin-top
:
24px
;
margin-bottom
:
16px
;
font-weight
:
600
;
line-height
:
1.25
}
.article-body
h1
{
font-size
:
1.7em
}
.article-body
h2
{
font-size
:
1.5em
}
.article-body
h3
{
font-size
:
1.25em
}
.article-body
h4
{
font-size
:
1em
}
.article-body
h5
{
font-size
:
.875em
}
.article-body
h6
{
font-size
:
.85em
}
.article-body
hr
{
height
:
.15em
;
padding
:
0
;
margin
:
24px
0
;
background-color
:
#e7e7e7
;
border
:
0
}
.article-body
p
{
margin-top
:
0
;
margin-bottom
:
16px
}
.article-body
blockquote
{
padding
:
0
1em
;
color
:
#777
;
border-left
:
.25em
solid
#ddd
;
margin-bottom
:
16px
}
.article-body
blockquote
p
{
margin
:
0
}
.article-body
ins
>
iframe
{
border
:
0
}
.article-body
iframe
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
)}
.article-body
table
{
width
:
100%
;
border
:
1px
solid
#dedede
;
margin
:
15px
auto
;
border-collapse
:
collapse
;
empty-cells
:
show
}
.article-body
thead
{
text-align
:
center
}
.article-body
td
,
.article-body
th
{
height
:
35px
;
border
:
1px
solid
#dedede
;
padding
:
0
10px
}
.article-body
th
{
font-weight
:
700
;
text-align
:
center
!important
;
background
:
rgba
(
158
,
188
,
226
,
.2
)}
.article-body
tbody
tr
:nth-child
(
2n
)
{
background
:
rgba
(
158
,
188
,
226
,
.12
)}
.article-body
tr
:hover
{
background
:
#efefef
}
.article-body
code
{
padding
:
.2em
.4em
;
margin
:
0
;
font-size
:
85%
;
background-color
:
rgba
(
252
,
41
,
41
,
.12
);
border-radius
:
3px
;
word-break
:
break-word
}
.article-body
pre
{
position
:
relative
}
.article-body
pre
textarea
{
position
:
absolute
;
top
:
-100000px
}
.article-body
pre
>
code
{
padding
:
.5em
;
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
background-size
:
20px
20px
;
border-radius
:
5px
;
display
:
block
}
.article-body
kbd
{
display
:
inline-block
;
padding
:
3px
5px
;
font
:
11px
Consolas
,
"Liberation Mono"
,
Menlo
,
Courier
,
monospace
;
line-height
:
10px
;
color
:
#555
;
vertical-align
:
middle
;
background-color
:
#fcfcfc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
);
border-bottom-color
:
#bbb
;
border-radius
:
3px
;
box-shadow
:
inset
0
-1px
0
#bbb
}
.article-body
.task-list-item
,
.article-body__task
{
list-style
:
none
;
margin-left
:
-1em
}
.em00
,
.em01
,
.em02
,
.em03
,
.em04
,
.em05
,
.em06
,
.em07
,
.em08
,
.em09
,
.em10
,
.em11
,
.em12
,
.em13
,
.em14
{
background-image
:
url(../images/emotions/emotions.png)
;
background-size
:
120px
;
float
:
left
;
height
:
24px
;
margin-right
:
5px
;
width
:
24px
}
.em01
{
background-position
:
-24px
0
}
.em02
{
background-position
:
-48px
0
}
.em03
{
background-position
:
-72px
0
}
.em04
{
background-position
:
-96px
0
}
.em05
{
background-position
:
0
-24px
}
.em06
{
background-position
:
-24px
-24px
}
.em07
{
background-position
:
-48px
-24px
}
.em08
{
background-position
:
-72px
-24px
}
.em09
{
background-position
:
-96px
-24px
}
.em10
{
background-position
:
0
-48px
}
.em11
{
background-position
:
-24px
-48px
}
.em12
{
background-position
:
-48px
-48px
}
.em13
{
background-position
:
-72px
-48px
}
.em14
{
background-position
:
-96px
-48px
}
#tags
li
{
float
:
left
;
height
:
38px
}
#tags
a
:hover
{
text-shadow
:
0
0
2px
#555
}
#tags
a
{
border-radius
:
3px
;
box-shadow
:
1px
1px
3px
#555
;
float
:
left
;
margin
:
3px
6px
;
padding
:
3px
12px
}
#tags
.tags1
{
font-size
:
12px
;
font-weight
:
400
}
#tags
.tags2
{
font-size
:
14px
;
font-weight
:
400
}
#tags
.tags3
{
font-size
:
16px
;
font-weight
:
400
}
#tags
.tags4
{
font-size
:
18px
;
font-weight
:
700
}
#tags
.tags5
{
font-size
:
20px
;
font-weight
:
700
}
\ No newline at end of file
src/main/webapp/css/default-init.css
View file @
c37bf256
...
...
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.0.
0, Feb 17
, 2019
* @version 1.3.0.
1, Feb 19
, 2019
*/
/* reset */
...
...
@@ -293,7 +293,7 @@ input[type=text]:focus {
}
.content-reset
img
.emoji
{
max-width
:
18
px
;
max-width
:
20
px
;
}
.content-reset
h1
,
...
...
src/main/webapp/css/default-init.min.css
View file @
c37bf256
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
.error
,
button
{
font-weight
:
700
}
.wrap
,
body
,
html
{
min-height
:
100vh
}
.content
,
.logo
{
align-self
:
center
}
.content-reset
img
,
.img-error
{
max-width
:
100%
}
body
,
html
{
margin
:
0
;
padding
:
0
}
body
{
background-color
:
#fff
;
color
:
#3b3e43
;
font-family
:
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
small
}
button
{
background-size
:
110%
110%
;
border
:
1px
solid
rgba
(
27
,
31
,
35
,
.2
);
font-size
:
13px
;
text-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.9
);
white-space
:
nowrap
;
background-color
:
#eff3f6
;
background-image
:
linear-gradient
(
-180deg
,
#fafbfc
,
#eff3f6
90%
);
color
:
#24292e
;
border-radius
:
3px
;
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
.075
);
outline
:
0
;
padding
:
7px
15px
;
margin-top
:
10px
;
cursor
:
pointer
}
button
:hover
{
background-color
:
#e6ebf1
;
background-image
:
linear-gradient
(
-180deg
,
#f0f3f6
,
#e6ebf1
90%
);
background-position
:
-.5em
;
border-color
:
rgba
(
27
,
31
,
35
,
.35
)}
a
{
color
:
#4285f4
;
text-decoration
:
none
}
h2
{
background-color
:
#F3F1E5
;
border-radius
:
4px
4px
0
0
;
font-size
:
16px
;
margin
:
0
;
padding
:
10px
20px
}
input
[
type
=
password
],
input
[
type
=
text
]
{
border
:
1px
solid
#d1d5da
;
background-color
:
#FAFAFA
;
border-radius
:
3px
;
box-shadow
:
inset
0
1px
2px
rgba
(
27
,
31
,
35
,
.075
);
padding
:
7px
8px
;
width
:
100%
;
line-height
:
17px
;
box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
outline
:
0
;
margin-top
:
10px
}
input
[
type
=
password
]
:focus
,
input
[
type
=
text
]
:focus
{
background-color
:
#FFF
;
box-shadow
:
inset
0
1px
2px
rgba
(
27
,
31
,
35
,
.075
),
0
0
0
.2em
#dbedff
;
border
:
1px
solid
#4285f4
}
.error
{
color
:
#d23f31
}
.wrap
{
border-top
:
5px
solid
#E6E5D9
;
background-color
:
#F3F1E5
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
}
.content-wrap
{
flex
:
1
;
display
:
flex
}
.content
{
background-color
:
#fff
;
margin
:
0
auto
;
width
:
760px
;
display
:
flex
}
.main
{
border-left
:
1px
solid
#E6E5D9
;
font-size
:
15px
;
padding
:
20px
;
flex
:
1
}
.logo
{
width
:
217px
;
text-align
:
center
}
.logo
img
{
height
:
128px
;
width
:
128px
}
.footerWrapper
{
background-color
:
#FFF
;
border-top
:
1px
solid
#E6E5D9
;
padding
:
12px
0
;
text-align
:
center
}
.a-error
{
text-align
:
right
}
.img-error
{
margin
:
20px
auto
;
padding
:
0
;
display
:
block
}
.content-reset
h1
,
.content-reset
h2
{
padding-bottom
:
.3em
;
border-bottom
:
1px
solid
#eee
}
.kill
img
{
position
:
absolute
;
right
:
40px
;
top
:
200px
}
.kill
ul
{
margin-bottom
:
50px
}
.kill
p
{
margin
:
12px
20px
}
.kill
span
{
margin-left
:
20px
}
#github
{
position
:
relative
;
text-align
:
center
}
#github
.github--loading
:after
{
content
:
"Loading..."
;
position
:
absolute
;
height
:
100%
;
width
:
100%
;
top
:
0
;
left
:
0
;
z-index
:
7
;
background-color
:
rgba
(
255
,
255
,
255
,
.6
);
font-size
:
22px
;
text-align
:
center
;
padding-top
:
135px
;
color
:
#000
;
text-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
box-sizing
:
border-box
}
#github
.github__icon
{
height
:
200px
;
width
:
266px
;
background-image
:
url(../images/github.png)
;
margin
:
0
auto
;
background-size
:
contain
;
cursor
:
pointer
}
#github
.github__icon
:hover
{
background-image
:
url(../images/github.gif)
}
#github
img
{
display
:
none
}
.github__text
{
cursor
:
pointer
;
font-size
:
12px
;
color
:
#666
}
.github__text
ul
{
display
:
none
;
text-align
:
left
;
margin
:
5px
auto
0
;
width
:
280px
;
padding-left
:
24px
;
box-sizing
:
border-box
}
.github__link
{
font-size
:
12px
;
text-decoration
:
underline
;
margin-top
:
10px
;
display
:
block
}
.github__check
{
font-size
:
12px
;
display
:
flex
;
width
:
80%
;
margin
:
10px
auto
0
;
align-items
:
center
;
line-height
:
20px
;
color
:
#999
}
.github__check
a
{
color
:
#999
;
text-decoration
:
underline
}
.github__check
input
{
width
:
auto
}
.content-reset
{
word-wrap
:
break-word
;
overflow
:
auto
;
line-height
:
1.65
;
font-size
:
16px
;
word-break
:
break-word
}
.content-reset
ol
,
.content-reset
ul
{
padding-left
:
2em
;
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
li
{
margin-top
:
.25em
}
.content-reset
img
.emoji
{
max-width
:
18px
}
.content-reset
h1
,
.content-reset
h2
,
.content-reset
h3
,
.content-reset
h4
,
.content-reset
h5
,
.content-reset
h6
{
margin-top
:
24px
;
margin-bottom
:
16px
;
font-weight
:
600
;
line-height
:
1.25
}
.content-reset
h1
{
font-size
:
1.7em
}
.content-reset
h2
{
font-size
:
1.5em
}
.content-reset
h3
{
font-size
:
1.25em
}
.content-reset
h4
{
font-size
:
1em
}
.content-reset
h5
{
font-size
:
.875em
}
.content-reset
h6
{
font-size
:
.85em
}
.content-reset
hr
{
height
:
.15em
;
padding
:
0
;
margin
:
24px
0
;
background-color
:
#e7e7e7
;
border
:
0
}
.content-reset
p
{
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
blockquote
{
padding
:
0
1em
;
color
:
#777
;
border-left
:
.25em
solid
#ddd
;
margin-bottom
:
16px
}
.content-reset
blockquote
p
{
margin
:
0
}
.content-reset
ins
>
iframe
{
border
:
0
}
.content-reset
iframe
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
)}
.content-reset
table
{
width
:
100%
;
border
:
1px
solid
#dedede
;
margin
:
15px
auto
;
border-collapse
:
collapse
;
empty-cells
:
show
}
.content-reset
thead
{
text-align
:
center
}
.content-reset
td
,
.content-reset
th
{
height
:
35px
;
border
:
1px
solid
#dedede
;
padding
:
0
10px
}
.content-reset
th
{
font-weight
:
700
;
text-align
:
center
!important
;
background
:
rgba
(
158
,
188
,
226
,
.2
)}
.content-reset
tbody
tr
:nth-child
(
2n
)
{
background
:
rgba
(
158
,
188
,
226
,
.12
)}
.content-reset
tr
:hover
{
background
:
#efefef
}
.content-reset
code
{
padding
:
.2em
.4em
;
margin
:
0
;
font-size
:
85%
;
background-color
:
rgba
(
252
,
41
,
41
,
.12
);
border-radius
:
3px
;
word-break
:
break-word
}
.content-reset
pre
{
position
:
relative
}
.content-reset
pre
textarea
{
position
:
absolute
;
top
:
-100000px
}
.content-reset
pre
>
code
{
padding
:
.5em
;
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
background-size
:
20px
20px
;
border-radius
:
5px
;
display
:
block
}
.content-reset
kbd
{
display
:
inline-block
;
padding
:
3px
5px
;
font
:
11px
Consolas
,
"Liberation Mono"
,
Menlo
,
Courier
,
monospace
;
line-height
:
10px
;
color
:
#555
;
vertical-align
:
middle
;
background-color
:
#fcfcfc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
);
border-bottom-color
:
#bbb
;
border-radius
:
3px
;
box-shadow
:
inset
0
-1px
0
#bbb
}
.content-reset
.task-list-item
,
.content-reset__task
{
list-style
:
none
;
margin-left
:
-1em
}
.search
{
border-top
:
5px
solid
#e6e5d9
;
background-color
:
#f3f1e5
;
padding
:
20px
0
20px
84px
;
min-height
:
480px
;
flex
:
1
}
.search__body
{
display
:
flex
;
flex-direction
:
column
}
.search__header
{
margin
:
20px
;
display
:
flex
}
.search__header
a
{
line-height
:
44px
}
.search__input
{
flex
:
1
}
.search__input
input
{
margin
:
0
10px
0
20px
;
width
:
523px
;
height
:
44px
;
line-height
:
44px
}
.search__input
button
{
height
:
44px
;
margin
:
0
}
.search__articles
{
width
:
600px
}
.search__articles
header
h1
{
margin
:
0
}
.search__articles
header
h1
>
a
{
font-size
:
18px
;
text-decoration
:
none
;
font-weight
:
400
}
.search__articles
.meta
{
font-size
:
14px
;
color
:
#999
}
.search__articles
footer
{
margin-bottom
:
30px
}
.search__articles
footer
a
{
text-decoration
:
none
;
font-size
:
13px
}
.search__articles
footer
a
:hover
,
.search__articles
header
h1
>
a
:hover
,
.search__pagination
a
:hover
{
text-decoration
:
underline
}
.search__pagination
a
{
color
:
#4285f4
;
text-decoration
:
none
}
.search__pagination
a
,
.search__pagination
span
{
margin-right
:
5px
}
@media
(
max-width
:
780px
){
.content
,
.main
{
width
:
auto
}
.main
,
.search__input
{
float
:
none
}
.wrap
{
padding
:
40px
0
0
}
.logo
,
.search__header
img
,
.search__header
>
.fn-right
{
display
:
none
}
.main
{
border
:
0
}
#init
,
.search
,
input
{
width
:
100%
;
box-sizing
:
border-box
}
input
{
display
:
block
}
.a-403
,
.a-404
,
.a-500
{
margin
:
0
20px
0
0
}
#init
{
padding
:
0
20px
;
left
:
0
}
.search__input
input
{
margin
:
0
}
.search__input
button
{
position
:
absolute
;
right
:
20px
;
height
:
32px
;
line-height
:
16px
}
.search
{
padding
:
20px
;
min-height
:
auto
}
.search__articles
{
width
:
auto
}}
\ No newline at end of file
.error
,
button
{
font-weight
:
700
}
.wrap
,
body
,
html
{
min-height
:
100vh
}
.content
,
.logo
{
align-self
:
center
}
.content-reset
img
,
.img-error
{
max-width
:
100%
}
body
,
html
{
margin
:
0
;
padding
:
0
}
body
{
background-color
:
#fff
;
color
:
#3b3e43
;
font-family
:
\
5
fae
\
8
f6f
\
96
c5
\
9
ed1
;
font-size
:
small
}
button
{
background-size
:
110%
110%
;
border
:
1px
solid
rgba
(
27
,
31
,
35
,
.2
);
font-size
:
13px
;
text-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.9
);
white-space
:
nowrap
;
background-color
:
#eff3f6
;
background-image
:
linear-gradient
(
-180deg
,
#fafbfc
,
#eff3f6
90%
);
color
:
#24292e
;
border-radius
:
3px
;
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
.075
);
outline
:
0
;
padding
:
7px
15px
;
margin-top
:
10px
;
cursor
:
pointer
}
button
:hover
{
background-color
:
#e6ebf1
;
background-image
:
linear-gradient
(
-180deg
,
#f0f3f6
,
#e6ebf1
90%
);
background-position
:
-.5em
;
border-color
:
rgba
(
27
,
31
,
35
,
.35
)}
a
{
color
:
#4285f4
;
text-decoration
:
none
}
h2
{
background-color
:
#F3F1E5
;
border-radius
:
4px
4px
0
0
;
font-size
:
16px
;
margin
:
0
;
padding
:
10px
20px
}
input
[
type
=
password
],
input
[
type
=
text
]
{
border
:
1px
solid
#d1d5da
;
background-color
:
#FAFAFA
;
border-radius
:
3px
;
box-shadow
:
inset
0
1px
2px
rgba
(
27
,
31
,
35
,
.075
);
padding
:
7px
8px
;
width
:
100%
;
line-height
:
17px
;
box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
outline
:
0
;
margin-top
:
10px
}
input
[
type
=
password
]
:focus
,
input
[
type
=
text
]
:focus
{
background-color
:
#FFF
;
box-shadow
:
inset
0
1px
2px
rgba
(
27
,
31
,
35
,
.075
),
0
0
0
.2em
#dbedff
;
border
:
1px
solid
#4285f4
}
.error
{
color
:
#d23f31
}
.wrap
{
border-top
:
5px
solid
#E6E5D9
;
background-color
:
#F3F1E5
;
display
:
flex
;
flex-direction
:
column
;
box-sizing
:
border-box
}
.content-wrap
{
flex
:
1
;
display
:
flex
}
.content
{
background-color
:
#fff
;
margin
:
0
auto
;
width
:
760px
;
display
:
flex
}
.main
{
border-left
:
1px
solid
#E6E5D9
;
font-size
:
15px
;
padding
:
20px
;
flex
:
1
}
.logo
{
width
:
217px
;
text-align
:
center
}
.logo
img
{
height
:
128px
;
width
:
128px
}
.footerWrapper
{
background-color
:
#FFF
;
border-top
:
1px
solid
#E6E5D9
;
padding
:
12px
0
;
text-align
:
center
}
.a-error
{
text-align
:
right
}
.img-error
{
margin
:
20px
auto
;
padding
:
0
;
display
:
block
}
.content-reset
h1
,
.content-reset
h2
{
padding-bottom
:
.3em
;
border-bottom
:
1px
solid
#eee
}
.kill
img
{
position
:
absolute
;
right
:
40px
;
top
:
200px
}
.kill
ul
{
margin-bottom
:
50px
}
.kill
p
{
margin
:
12px
20px
}
.kill
span
{
margin-left
:
20px
}
#github
{
position
:
relative
;
text-align
:
center
}
#github
.github--loading
:after
{
content
:
"Loading..."
;
position
:
absolute
;
height
:
100%
;
width
:
100%
;
top
:
0
;
left
:
0
;
z-index
:
7
;
background-color
:
rgba
(
255
,
255
,
255
,
.6
);
font-size
:
22px
;
text-align
:
center
;
padding-top
:
135px
;
color
:
#000
;
text-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
box-sizing
:
border-box
}
#github
.github__icon
{
height
:
200px
;
width
:
266px
;
background-image
:
url(../images/github.png)
;
margin
:
0
auto
;
background-size
:
contain
;
cursor
:
pointer
}
#github
.github__icon
:hover
{
background-image
:
url(../images/github.gif)
}
#github
img
{
display
:
none
}
.github__text
{
cursor
:
pointer
;
font-size
:
12px
;
color
:
#666
}
.github__text
ul
{
display
:
none
;
text-align
:
left
;
margin
:
5px
auto
0
;
width
:
280px
;
padding-left
:
24px
;
box-sizing
:
border-box
}
.github__link
{
font-size
:
12px
;
text-decoration
:
underline
;
margin-top
:
10px
;
display
:
block
}
.github__check
{
font-size
:
12px
;
display
:
flex
;
width
:
80%
;
margin
:
10px
auto
0
;
align-items
:
center
;
line-height
:
20px
;
color
:
#999
}
.github__check
a
{
color
:
#999
;
text-decoration
:
underline
}
.github__check
input
{
width
:
auto
}
.content-reset
{
word-wrap
:
break-word
;
overflow
:
auto
;
line-height
:
1.65
;
font-size
:
16px
;
word-break
:
break-word
}
.content-reset
ol
,
.content-reset
ul
{
padding-left
:
2em
;
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
li
{
margin-top
:
.25em
}
.content-reset
img
.emoji
{
max-width
:
20px
}
.content-reset
h1
,
.content-reset
h2
,
.content-reset
h3
,
.content-reset
h4
,
.content-reset
h5
,
.content-reset
h6
{
margin-top
:
24px
;
margin-bottom
:
16px
;
font-weight
:
600
;
line-height
:
1.25
}
.content-reset
h1
{
font-size
:
1.7em
}
.content-reset
h2
{
font-size
:
1.5em
}
.content-reset
h3
{
font-size
:
1.25em
}
.content-reset
h4
{
font-size
:
1em
}
.content-reset
h5
{
font-size
:
.875em
}
.content-reset
h6
{
font-size
:
.85em
}
.content-reset
hr
{
height
:
.15em
;
padding
:
0
;
margin
:
24px
0
;
background-color
:
#e7e7e7
;
border
:
0
}
.content-reset
p
{
margin-top
:
0
;
margin-bottom
:
16px
}
.content-reset
blockquote
{
padding
:
0
1em
;
color
:
#777
;
border-left
:
.25em
solid
#ddd
;
margin-bottom
:
16px
}
.content-reset
blockquote
p
{
margin
:
0
}
.content-reset
ins
>
iframe
{
border
:
0
}
.content-reset
iframe
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
)}
.content-reset
table
{
width
:
100%
;
border
:
1px
solid
#dedede
;
margin
:
15px
auto
;
border-collapse
:
collapse
;
empty-cells
:
show
}
.content-reset
thead
{
text-align
:
center
}
.content-reset
td
,
.content-reset
th
{
height
:
35px
;
border
:
1px
solid
#dedede
;
padding
:
0
10px
}
.content-reset
th
{
font-weight
:
700
;
text-align
:
center
!important
;
background
:
rgba
(
158
,
188
,
226
,
.2
)}
.content-reset
tbody
tr
:nth-child
(
2n
)
{
background
:
rgba
(
158
,
188
,
226
,
.12
)}
.content-reset
tr
:hover
{
background
:
#efefef
}
.content-reset
code
{
padding
:
.2em
.4em
;
margin
:
0
;
font-size
:
85%
;
background-color
:
rgba
(
252
,
41
,
41
,
.12
);
border-radius
:
3px
;
word-break
:
break-word
}
.content-reset
pre
{
position
:
relative
}
.content-reset
pre
textarea
{
position
:
absolute
;
top
:
-100000px
}
.content-reset
pre
>
code
{
padding
:
.5em
;
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
background-size
:
20px
20px
;
border-radius
:
5px
;
display
:
block
}
.content-reset
kbd
{
display
:
inline-block
;
padding
:
3px
5px
;
font
:
11px
Consolas
,
"Liberation Mono"
,
Menlo
,
Courier
,
monospace
;
line-height
:
10px
;
color
:
#555
;
vertical-align
:
middle
;
background-color
:
#fcfcfc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
.38
);
border-bottom-color
:
#bbb
;
border-radius
:
3px
;
box-shadow
:
inset
0
-1px
0
#bbb
}
.content-reset
.task-list-item
,
.content-reset__task
{
list-style
:
none
;
margin-left
:
-1em
}
.search
{
border-top
:
5px
solid
#e6e5d9
;
background-color
:
#f3f1e5
;
padding
:
20px
0
20px
84px
;
min-height
:
480px
;
flex
:
1
}
.search__body
{
display
:
flex
;
flex-direction
:
column
}
.search__header
{
margin
:
20px
;
display
:
flex
}
.search__header
a
{
line-height
:
44px
}
.search__input
{
flex
:
1
}
.search__input
input
{
margin
:
0
10px
0
20px
;
width
:
523px
;
height
:
44px
;
line-height
:
44px
}
.search__input
button
{
height
:
44px
;
margin
:
0
}
.search__articles
{
width
:
600px
}
.search__articles
header
h1
{
margin
:
0
}
.search__articles
header
h1
>
a
{
font-size
:
18px
;
text-decoration
:
none
;
font-weight
:
400
}
.search__articles
.meta
{
font-size
:
14px
;
color
:
#999
}
.search__articles
footer
{
margin-bottom
:
30px
}
.search__articles
footer
a
{
text-decoration
:
none
;
font-size
:
13px
}
.search__articles
footer
a
:hover
,
.search__articles
header
h1
>
a
:hover
,
.search__pagination
a
:hover
{
text-decoration
:
underline
}
.search__pagination
a
{
color
:
#4285f4
;
text-decoration
:
none
}
.search__pagination
a
,
.search__pagination
span
{
margin-right
:
5px
}
@media
(
max-width
:
780px
){
.content
,
.main
{
width
:
auto
}
.main
,
.search__input
{
float
:
none
}
.wrap
{
padding
:
40px
0
0
}
.logo
,
.search__header
img
,
.search__header
>
.fn-right
{
display
:
none
}
.main
{
border
:
0
}
#init
,
.search
,
input
{
width
:
100%
;
box-sizing
:
border-box
}
input
{
display
:
block
}
.a-403
,
.a-404
,
.a-500
{
margin
:
0
20px
0
0
}
#init
{
padding
:
0
20px
;
left
:
0
}
.search__input
input
{
margin
:
0
}
.search__input
button
{
position
:
absolute
;
right
:
20px
;
height
:
32px
;
line-height
:
16px
}
.search
{
padding
:
20px
;
min-height
:
auto
}
.search__articles
{
width
:
auto
}}
\ No newline at end of file
src/main/webapp/js/admin/admin.min.js
View file @
c37bf256
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
var
Admin
=
function
(){
this
.
register
=
{},
this
.
tools
=
[
"
#page-list
"
,
"
#file-list
"
,
"
#link-list
"
,
"
#preference
"
,
"
#user-list
"
,
"
#plugin-list
"
,
"
#others
"
,
"
#category-list
"
],
this
.
adTools
=
[
"
link-list
"
,
"
preference
"
,
"
file-list
"
,
"
page-list
"
,
"
user-list
"
,
"
plugin-list
"
,
"
others
"
,
"
category-list
"
]};
$
.
extend
(
Admin
.
prototype
,{
logout
:
function
(){
window
.
location
.
href
=
latkeConfig
.
servePath
+
"
/logout
"
},
toggleMenu
:
function
(){
"
-240px
"
===
$
(
"
#tabs
"
).
css
(
"
left
"
)?(
$
(
"
#tabs
"
).
css
(
"
left
"
,
0
),
$
(
"
.tabs__bg
"
).
show
()):(
$
(
"
#tabs
"
).
css
(
"
left
"
,
"
-240px
"
),
$
(
"
.tabs__bg
"
).
hide
())},
clearTip
:
function
(){
$
(
"
#tipMsg
"
).
text
(
""
),
$
(
"
#loadMsg
"
).
text
(
""
)},
setHashByPage
:
function
(
t
){
var
e
=
window
.
location
.
hash
.
split
(
"
/
"
);
/^
\d
*$/
.
test
(
e
[
e
.
length
-
1
])?
e
[
e
.
length
-
1
]
=
t
:
e
.
push
(
t
),
window
.
location
.
hash
=
e
.
join
(
"
/
"
)},
selectTab
:
function
(
t
){
window
.
location
.
hash
=
"
#
"
+
t
},
analyseHash
:
function
(){
for
(
var
t
=
window
.
location
.
hash
,
e
=
t
.
substr
(
1
,
t
.
length
-
1
).
split
(
"
/
"
),
i
=
{
page
:
1
,
hashList
:[]},
a
=
0
;
a
<
e
.
length
;
a
++
)
a
===
e
.
length
-
1
&&
/^
\d
+$/
.
test
(
e
[
a
])?
i
.
page
=
e
[
a
]:
i
.
hashList
.
push
(
e
[
a
]);
return
i
},
setCurByHash
:
function
(){
$
(
window
).
scrollTop
(
0
),
$
(
"
#tipMsg
"
).
text
(
""
);
var
t
=
admin
.
analyseHash
(),
e
=
t
.
hashList
[
1
],
i
=
t
.
hashList
[
2
];
if
(
1
===
t
.
hashList
.
length
&&
(
e
=
t
.
hashList
[
0
]),
""
!==
e
){
"
article
"
!==
e
?
admin
.
article
.
clearDraftTimer
():
"
article
"
===
e
&&
(
admin
.
article
.
autoSaveDraftTimer
=
setInterval
(
function
(){
admin
.
article
.
_autoSaveToDraft
()},
admin
.
article
.
AUTOSAVETIME
));
try
{
if
(
"
article
"
!==
e
&&
admin
.
article
.
isConfirm
&&
""
!==
admin
.
editors
.
articleEditor
.
getContent
().
replace
(
/
\s
/g
,
""
)
&&
admin
.
article
.
content
!==
admin
.
editors
.
articleEditor
.
getContent
()
&&!
confirm
(
Label
.
editorLeaveLabel
))
return
void
(
window
.
location
.
hash
=
"
#article/article
"
);
if
(
"
article
"
===
e
&&
admin
.
article
.
isConfirm
&&
""
!==
admin
.
editors
.
articleEditor
.
getContent
().
replace
(
/
\s
/g
,
""
)
&&
admin
.
article
.
content
!==
admin
.
editors
.
articleEditor
.
getContent
())
return
}
catch
(
t
){
var
a
=
$
(
"
#articleContent
"
);
if
(
0
<
a
.
length
){
if
(
"
article
"
!==
e
&&
admin
.
article
.
isConfirm
&&
""
!==
a
.
val
().
replace
(
/
\s
/g
,
""
)
&&
admin
.
article
.
content
!==
a
.
val
()
&&!
confirm
(
Label
.
editorLeaveLabel
))
return
void
(
window
.
location
.
hash
=
"
#article/article
"
);
if
(
"
article
"
===
e
&&
admin
.
article
.
isConfirm
&&
""
!==
a
.
val
().
replace
(
/
\s
/g
,
""
)
&&
admin
.
article
.
content
!==
a
.
val
())
return
}}
"
article
"
!==
e
&&
admin
.
editors
.
articleEditor
.
setContent
&&
admin
.
article
.
clear
(),
admin
.
article
.
isConfirm
=!
0
,
$
(
"
#tabs
"
).
tabs
(
"
setCurrent
"
,
e
),
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
),
1
===
$
(
"
#tabsPanel_
"
+
e
).
length
?
""
===
$
(
"
#tabsPanel_
"
+
e
).
html
().
replace
(
/
\s
/g
,
""
)?
$
(
"
#tabsPanel_
"
+
e
).
load
(
"
admin-
"
+
e
+
"
.do
"
,
function
(){
"
article
"
===
e
&&
admin
.
article
.
status
.
id
?
admin
.
register
[
e
].
init
.
call
(
admin
.
register
[
e
].
obj
,
admin
.
article
.
getAndSet
):
admin
.
register
[
e
].
init
.
call
(
admin
.
register
[
e
].
obj
,
t
.
page
),
i
&&
$
(
"
#tab
"
+
e
.
substring
(
0
,
1
).
toUpperCase
()
+
e
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
i
),
admin
.
plugin
.
setCurByHash
(
t
)}):(
"
article
"
===
e
&&
admin
.
article
.
status
.
id
&&
admin
.
article
.
getAndSet
(),
admin
.
register
[
e
]
&&
admin
.
register
[
e
].
refresh
&&
admin
.
register
[
e
].
refresh
.
call
(
admin
.
register
[
e
].
obj
,
t
.
page
),
i
&&
$
(
"
#tab
"
+
e
.
substring
(
0
,
1
).
toUpperCase
()
+
e
.
substring
(
1
)).
tabs
(
"
setCurrent
"
,
i
),
admin
.
plugin
.
setCurByHash
(
t
)):(
$
(
"
#tipMsg
"
).
text
(
"
Error: No tab!
"
+
Label
.
reportIssueLabel
),
$
(
"
#loadMsg
"
).
text
(
""
))}},
init
:
function
(){
Util
.
killIE
(),
$
(
"
#loadMsg
"
).
text
(
Label
.
loadingLabel
),
$
(
"
#tabs
"
).
tabs
(),
setInterval
(
function
(){
""
!==
$
(
"
#tipMsg
"
).
text
()
&&
setTimeout
(
function
(){
$
(
"
#tipMsg
"
).
text
(
""
)},
7
e3
)},
6
e3
),
$
(
"
#loadMsg
"
).
text
(
""
)},
collapseNav
:
function
(
t
){
$
(
t
).
next
().
slideToggle
(
"
normal
"
,
function
(){
"
none
"
!==
this
.
style
.
display
?(
$
(
t
).
find
(
"
.icon-chevron-down
"
)[
0
].
className
=
"
icon-chevron-up right
"
,
$
(
t
).
addClass
(
"
tab-current
"
)):(
$
(
t
).
find
(
"
.icon-chevron-up
"
)[
0
].
className
=
"
icon-chevron-down right
"
,
$
(
t
).
removeClass
(
"
tab-current
"
)),
$
(
"
#tabs > ul
"
).
height
(
"
auto
"
),
$
(
"
#tabs > ul
"
).
height
(
$
(
"
#tabs > ul
"
).
height
()
+
80
)})},
inited
:
function
(){
if
(
"
adminRole
"
!==
Label
.
userRole
)
for
(
var
t
=
0
;
t
<
this
.
adTools
.
length
;
t
++
)
$
(
"
#tabs
"
).
tabs
(
"
remove
"
,
this
.
adTools
[
t
]);
else
for
(
var
e
=
0
;
e
<
this
.
tools
.
length
;
e
++
)
if
(
"
#
"
+
window
.
location
.
hash
.
split
(
"
/
"
)[
1
]
===
this
.
tools
[
e
]){
$
(
"
#tabToolsTitle
"
).
click
();
break
}
this
.
setCurByHash
()}});
var
admin
=
new
Admin
;
admin
.
editors
=
{};
var
SoloEditor
=
function
(
e
){
this
.
conf
=
e
,
this
.
init
()};
$
.
extend
(
SoloEditor
.
prototype
,{
init
:
function
(){
this
.
editor
=
new
Vditor
(
this
.
conf
.
id
,{
cache
:
!
0
,
hint
:{
emojiPath
:
latkeConfig
.
staticServePath
+
"
/js/lib/emojify.js-1.1.0/images/basic
"
},
preview
:{
delay
:
500
,
show
:
this
.
conf
.
previewShow
,
url
:
latkeConfig
.
servePath
+
"
/console/markdown/2html
"
,
parse
:
function
(
e
){
"
none
"
!==
e
.
style
.
display
&&
(
Util
.
parseMarkdown
(
"
content-reset
"
),
Label
.
markedAvailable
||
(
hljs
.
initHighlighting
.
called
=!
1
,
hljs
.
initHighlighting
()))}},
upload
:{
max
:
10485760
,
url
:
Label
.
uploadURL
,
token
:
Label
.
uploadToken
,
filename
:
function
(
e
){
return
e
.
replace
(
/
\?
|
\\
|
\/
|:|
\|
|<|>|
\*
|
\[
|
\]
|
\s
+/g
,
"
-
"
)}},
height
:
this
.
conf
.
height
,
counter
:
102400
,
resize
:{
enable
:
this
.
conf
.
resize
},
lang
:
Label
.
localeString
,
classes
:{
preview
:
"
content-reset
"
}}),
"
function
"
==
typeof
this
.
conf
.
fun
&&
this
.
conf
.
fun
()},
getContent
:
function
(){
return
this
.
editor
.
getValue
()},
setContent
:
function
(
e
){
this
.
editor
.
setValue
(
e
)},
remove
:
function
(){
document
.
getElementById
(
this
.
editor
.
vditor
.
id
).
outerHTML
=
""
}}),
admin
.
editors
.
articleEditor
=
{},
admin
.
editors
.
abstractEditor
=
{},
admin
.
editors
.
pageEditor
=
{};
var
TablePaginate
=
function
(
a
){
this
.
id
=
a
,
this
.
currentPage
=
1
};
$
.
extend
(
TablePaginate
.
prototype
,{
buildTable
:
function
(
a
,
t
){
var
e
=
{
colModel
:
a
,
noDataTip
:
Label
.
noDataLabel
};
t
||
(
e
.
expendRow
=
{
index
:
"
expendRow
"
}),
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
e
)},
initPagination
:
function
(){
var
a
=
this
.
id
;
$
(
"
#
"
+
a
+
"
Pagination
"
).
paginate
({
bind
:
function
(
a
,
t
){
t
?
$
(
"
#tipMsg
"
).
text
(
t
):
admin
.
setHashByPage
(
a
)},
currentPage
:
1
,
errorMessage
:
Label
.
inputErrorLabel
,
nextPageText
:
"
>
"
,
previousPageText
:
"
<
"
,
goText
:
Label
.
gotoLabel
,
type
:
"
custom
"
,
custom
:[
1
],
pageCount
:
1
})},
initCommentsDialog
:
function
(){
var
a
=
this
;
$
(
"
#
"
+
this
.
id
+
"
Comments
"
).
dialog
({
modal
:
!
0
,
hideFooter
:
!
0
,
close
:
function
(){
return
admin
[
a
.
id
+
"
List
"
].
getList
(
a
.
currentPage
),
!
0
}})},
updateTablePagination
:
function
(
a
,
t
,
e
){
if
((
t
=
parseInt
(
t
))
>
e
.
paginationPageCount
&&
1
<
t
)
return
$
(
"
#tipMsg
"
).
text
(
Label
.
pageLabel
+
t
+
Label
.
notFoundLabel
),
void
$
(
"
#loadMsg
"
).
text
(
""
);
$
(
"
#
"
+
this
.
id
+
"
Table
"
).
table
(
"
update
"
,{
data
:[{
groupName
:
"
all
"
,
groupData
:
a
}]}),
0
===
e
.
paginationPageCount
&&
(
e
.
paginationPageCount
=
1
),
$
(
"
#
"
+
this
.
id
+
"
Pagination
"
).
paginate
(
"
update
"
,{
pageCount
:
e
.
paginationPageCount
,
currentPage
:
t
,
custom
:
e
.
paginationPageNums
}),
this
.
currentPage
=
t
}});
...
...
src/main/webapp/js/common.min.js
View file @
c37bf256
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
var
Util
=
{
htmlDecode
:
function
(
e
){
var
t
=
document
.
createElement
(
"
div
"
);
return
t
.
innerHTML
=
decodeURIComponent
(
e
),
t
.
innerText
},
isArticlePage
:
function
(
e
){
var
t
=!
0
;
return
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags/
"
)
&&
(
t
=!
1
),
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/tags.html
"
)
&&
(
t
=!
1
),
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/category/
"
)
&&
(
t
=!
1
),
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives.html
"
)
&&
(
t
=!
1
),
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/archives/
"
)
&&
(
t
=!
1
),
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/links.html
"
)
&&
(
t
=!
1
),
e
===
latkeConfig
.
servePath
&&
(
t
=!
1
),
/^
[
0-9
]
*$/
.
test
(
e
.
replace
(
latkeConfig
.
servePath
+
"
/
"
,
""
))
&&
(
t
=!
1
),
t
},
initPjax
:
function
(
e
){
1
===
$
(
"
#pjax
"
).
length
&&
(
$
.
pjax
({
selector
:
"
a
"
,
container
:
"
#pjax
"
,
show
:
""
,
cache
:
!
1
,
storage
:
!
0
,
titleSuffix
:
""
,
filter
:
function
(
e
){
return
e
===
latkeConfig
.
servePath
+
"
/rss.xml
"
||-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
+
"
/admin-index.do
"
)
||!
(
-
1
<
e
.
indexOf
(
latkeConfig
.
servePath
))},
callback
:
function
(){
e
&&
e
()}}),
NProgress
.
configure
({
showSpinner
:
!
1
}),
$
(
"
#pjax
"
).
bind
(
"
pjax.start
"
,
function
(){
NProgress
.
start
()}),
$
(
"
#pjax
"
).
bind
(
"
pjax.end
"
,
function
(){
window
.
scroll
(
window
.
scrollX
,
0
),
NProgress
.
done
()}))},
parseMarkdown
:
function
(
e
){
var
t
=!
1
,
i
=!
1
;
e
=
e
||
"
article-body
"
;
if
(
$
(
"
.
"
+
e
).
each
(
function
(){
if
(
$
(
this
).
find
(
"
p
"
).
each
(
function
(){
if
(
2
<
$
(
this
).
text
().
split
(
"
$
"
).
length
||
1
<
$
(
this
).
text
().
split
(
"
\\
(
"
).
length
&&
1
<
$
(
this
).
text
().
split
(
"
\\
)
"
).
length
)
return
!
(
t
=!
0
)}),
0
<
$
(
this
).
find
(
"
code.lang-flow, code.language-flow
"
).
length
)
return
!
(
i
=!
0
)}),
t
){
var
n
=
function
(){
MathJax
.
Hub
.
Config
({
tex2jax
:{
inlineMath
:[[
"
$
"
,
"
$
"
],[
"
\\
(
"
,
"
\\
)
"
]],
displayMath
:[[
"
$$
"
,
"
$$
"
]],
processEscapes
:
!
0
,
processEnvironments
:
!
0
,
skipTags
:[
"
pre
"
,
"
code
"
,
"
script
"
]}}),
MathJax
.
Hub
.
Typeset
()};
"
undefined
"
!=
typeof
MathJax
?
n
():
$
.
ajax
({
method
:
"
GET
"
,
url
:
"
https://cdn.staticfile.org/MathJax/MathJax-2.6-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&_=1473258780393
"
,
dataType
:
"
script
"
,
cache
:
!
0
}).
done
(
function
(){
n
()})}
if
(
i
){
var
o
=
function
(){
$
(
"
.
"
+
e
+
"
code.lang-flow, .
"
+
e
+
"
code.language-flow
"
).
each
(
function
(
e
){
var
t
=
$
(
this
),
i
=
"
symFlow
"
+
(
new
Date
).
getTime
()
+
e
;
t
.
hide
();
var
n
=
flowchart
.
parse
(
$
.
trim
(
t
.
text
()));
t
.
parent
().
after
(
'
<div style="text-align: center" id="
'
+
i
+
'
"></div>
'
),
n
.
drawSVG
(
i
),
t
.
parent
().
remove
(),
$
(
"
#
"
+
i
).
find
(
"
svg
"
).
height
(
"
auto
"
).
width
(
"
auto
"
)})};
"
undefined
"
!=
typeof
flowchart
?
o
():
$
.
ajax
({
method
:
"
GET
"
,
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/flowchart/flowchart.min.js
"
,
dataType
:
"
script
"
,
cache
:
!
0
}).
done
(
function
(){
o
()})}},
isLoggedIn
:
function
(){
return
!!
(
1
===
$
(
"
#admin
"
).
length
&&
$
(
"
#admin
"
).
data
(
"
login
"
)
||
"
true
"
===
latkeConfig
.
isLoggedIn
)},
getUserName
:
function
(){
return
1
===
$
(
"
#adminName
"
).
length
?
$
(
"
#adminName
"
).
text
():
latkeConfig
.
userName
},
error
:
function
(){
$
(
"
#tipMsg
"
).
text
(
"
Error:
"
+
arguments
[
0
]
+
"
File:
"
+
arguments
[
1
]
+
"
\n
Line:
"
+
arguments
[
2
]
+
"
please report this issue on https://github.com/b3log/solo/issues/new
"
),
$
(
"
#loadMsg
"
).
text
(
""
)},
killIE
:
function
(
e
){
var
t
=
navigator
.
userAgent
.
split
(
"
MSIE
"
)[
1
];
t
&&
(
e
||
(
e
=
7
),
parseFloat
(
t
.
split
(
"
;
"
))
<=
e
&&
function
(){
if
(
""
===
Cookie
.
readCookie
(
"
showKill
"
))
try
{
var
t
=
"
<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6;filter: alpha(opacity=60); top: 0px;z-index:110'></div><iframe style='left:
"
+
(
$
(
window
).
width
()
-
781
)
/
2
+
"
px;z-index:120;top:
"
+
(
$
(
window
).
height
()
-
680
)
/
2
+
"
px; position: fixed; border: 0px none; width: 781px; height: 680px;' src='
"
+
latkeConfig
.
servePath
+
"
/kill-browser'></iframe>
"
;
$
(
"
body
"
).
append
(
t
)}
catch
(
e
){
t
=
"
<div style='display: block; height: 100%; width: 100%; position: fixed; background-color: rgb(0, 0, 0); opacity: 0.6;filter: alpha(opacity=60); top: 0px;z-index:110'></div><iframe style='left:10px;z-index:120;top: 0px; position: fixed; border: 0px none; width: 781px; height: 680px;' src='
"
+
latkeConfig
.
servePath
+
"
/kill-browser'></iframe>
"
,
document
.
body
.
innerHTML
=
document
.
body
.
innerHTML
+
t
}}())},
replaceEmString
:
function
(
e
){
var
t
=
e
.
split
(
"
[em
"
);
if
(
1
===
t
.
length
)
return
e
;
e
=
t
[
0
];
for
(
var
i
=
1
;
i
<
t
.
length
;
i
++
){
var
n
=
t
[
i
].
substr
(
0
,
2
);
e
+=
"
<img width='20' src='
"
+
latkeConfig
.
staticServePath
+
"
/images/emotions/em
"
+
n
+
"
.png' alt='
"
+
Label
[
"
em
"
+
n
+
"
Label
"
]
+
"
' title='
"
+
Label
[
"
em
"
+
n
+
"
Label
"
]
+
"
'/>
"
+
t
[
i
].
substr
(
3
)}
return
e
},
proessURL
:
function
(
e
){
return
/^
\w
+:
\/\/
/
.
test
(
e
)
||
(
e
=
"
http://
"
+
e
),
e
},
switchMobile
:
function
(
e
){
Cookie
.
createCookie
(
"
btouch_switch_toggle
"
,
e
,
365
),
setTimeout
(
function
(){
location
.
reload
()},
1250
)},
setTopBar
:
function
(){
var
e
=
$
(
"
#top
"
);
if
(
1
===
e
.
length
){
var
t
=
$
(
"
#showTop
"
);
t
.
click
(
function
(){
e
.
slideDown
(),
t
.
hide
()}),
$
(
"
#hideTop
"
).
click
(
function
(){
e
.
slideUp
(),
t
.
show
()})}},
goTop
:
function
(){
$
(
"
html, body
"
).
animate
({
scrollTop
:
0
},
800
)},
goBottom
:
function
(
e
){
e
||
(
e
=
0
);
var
t
=
$
(
"
body
"
).
height
()
>
$
(
document
).
height
()?
$
(
"
body
"
).
height
():
$
(
document
).
height
();
window
.
scrollTo
(
0
,
t
-
$
(
window
).
height
()
-
e
)},
init
:
function
(){
Util
.
killIE
(),
Util
.
setTopBar
(),
Util
.
parseMarkdown
(),
Util
.
initSW
()},
initSW
:
function
(){
navigator
.
serviceWorker
&&
navigator
.
serviceWorker
.
register
(
"
/sw.js
"
,{
scope
:
"
/
"
})},
replaceSideEm
:
function
(
e
){
for
(
var
t
=
0
;
t
<
e
.
length
;
t
++
){
var
i
=
$
(
e
[
t
]);
i
.
html
(
Util
.
replaceEmString
(
i
.
html
()))}},
buildTags
:
function
(
e
){
e
=
e
||
"
tags
"
;
for
(
var
t
=
[
"
tags1
"
,
"
tags2
"
,
"
tags3
"
,
"
tags4
"
,
"
tags5
"
],
i
=
$
(
"
#
"
+
e
+
"
b
"
).
get
(),
n
=
parseInt
(
$
(
"
#
"
+
e
+
"
b
"
).
last
().
text
()),
o
=
Math
.
ceil
(
n
/
t
.
length
),
a
=
0
;
a
<
i
.
length
;
a
++
)
for
(
var
r
=
parseInt
(
i
[
a
].
innerHTML
),
s
=
0
;
s
<
t
.
length
;
s
++
)
if
(
s
*
o
<
r
&&
r
<=
(
s
+
1
)
*
o
){
i
[
a
].
parentNode
.
className
=
t
[
s
];
break
}
$
(
"
#
"
+
e
).
html
(
$
(
"
#
"
+
e
+
"
li
"
).
get
().
sort
(
function
(
e
,
t
){
var
i
=
$
(
e
).
find
(
"
span
"
).
text
().
toLowerCase
(),
n
=
$
(
t
).
find
(
"
span
"
).
text
().
toLowerCase
();
return
i
.
localeCompare
(
n
)}))},
toDate
:
function
(
e
,
t
){
var
i
=
new
Date
(
e
),
n
=
{
"
M+
"
:
i
.
getMonth
()
+
1
,
"
d+
"
:
i
.
getDate
(),
"
H+
"
:
i
.
getHours
(),
"
m+
"
:
i
.
getMinutes
(),
"
s+
"
:
i
.
getSeconds
(),
"
q+
"
:
Math
.
floor
((
i
.
getMonth
()
+
3
)
/
3
),
S
:
i
.
getMilliseconds
()};
for
(
var
o
in
/
(
y+
)
/
.
test
(
t
)
&&
(
t
=
t
.
replace
(
RegExp
.
$1
,(
i
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
))),
n
)
new
RegExp
(
"
(
"
+
o
+
"
)
"
).
test
(
t
)
&&
(
t
=
t
.
replace
(
RegExp
.
$1
,
1
==
RegExp
.
$1
.
length
?
n
[
o
]:(
"
00
"
+
n
[
o
]).
substr
((
""
+
n
[
o
]).
length
)));
return
t
},
getWinHeight
:
function
(){
return
window
.
innerHeight
?
window
.
innerHeight
:
"
CSS1Compat
"
===
document
.
compatMode
?
window
.
document
.
documentElement
.
clientHeight
:
window
.
document
.
body
.
clientHeight
}};
if
(
!
Cookie
)
var
Cookie
=
{
readCookie
:
function
(
e
){
for
(
var
t
=
e
+
"
=
"
,
i
=
document
.
cookie
.
split
(
"
;
"
),
n
=
0
;
n
<
i
.
length
;
n
++
){
for
(
var
o
=
i
[
n
];
"
"
==
o
.
charAt
(
0
);)
o
=
o
.
substring
(
1
,
o
.
length
);
if
(
0
==
o
.
indexOf
(
t
))
return
decodeURIComponent
(
o
.
substring
(
t
.
length
,
o
.
length
))}
return
""
},
eraseCookie
:
function
(
e
){
this
.
createCookie
(
e
,
""
,
-
1
)},
createCookie
:
function
(
e
,
t
,
i
){
var
n
=
""
;
if
(
i
){
var
o
=
new
Date
;
o
.
setTime
(
o
.
getTime
()
+
24
*
i
*
60
*
60
*
1
e3
),
n
=
"
; expires=
"
+
o
.
toGMTString
()}
document
.
cookie
=
e
+
"
=
"
+
encodeURIComponent
(
t
)
+
n
+
"
; path=/
"
}};
\ No newline at end of file
src/main/webapp/js/lib/emojify.js-1.1.0/images/basic/huaji.gif
View replaced file @
ef9ffe76
View file @
c37bf256
37.3 KB
|
W:
|
H:
13.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/webapp/js/lib/vditor-0.2.0/index.min.js
deleted
100644 → 0
View file @
ef9ffe76
/*!
* Vditor v0.2.0 - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2019 B3log 开源, b3log.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
!
function
(
t
,
e
){
"
object
"
==
typeof
exports
&&
"
object
"
==
typeof
module
?
module
.
exports
=
e
():
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([],
e
):
"
object
"
==
typeof
exports
?
exports
.
Vditor
=
e
():
t
.
Vditor
=
e
()}(
window
,
function
(){
return
function
(
t
){
function
e
(
e
){
for
(
var
n
,
i
,
r
=
e
[
0
],
s
=
e
[
1
],
l
=
0
,
c
=
[];
l
<
r
.
length
;
l
++
)
i
=
r
[
l
],
o
[
i
]
&&
c
.
push
(
o
[
i
][
0
]),
o
[
i
]
=
0
;
for
(
n
in
s
)
Object
.
prototype
.
hasOwnProperty
.
call
(
s
,
n
)
&&
(
t
[
n
]
=
s
[
n
]);
for
(
a
&&
a
(
e
);
c
.
length
;)
c
.
shift
()()}
var
n
=
{},
o
=
{
0
:
0
};
function
i
(
e
){
if
(
n
[
e
])
return
n
[
e
].
exports
;
var
o
=
n
[
e
]
=
{
i
:
e
,
l
:
!
1
,
exports
:{}};
return
t
[
e
].
call
(
o
.
exports
,
o
,
o
.
exports
,
i
),
o
.
l
=!
0
,
o
.
exports
}
i
.
e
=
function
(
t
){
var
e
=
[],
n
=
o
[
t
];
if
(
0
!==
n
)
if
(
n
)
e
.
push
(
n
[
2
]);
else
{
var
r
=
new
Promise
(
function
(
e
,
i
){
n
=
o
[
t
]
=
[
e
,
i
]});
e
.
push
(
n
[
2
]
=
r
);
var
s
,
l
=
document
.
createElement
(
"
script
"
);
l
.
charset
=
"
utf-8
"
,
l
.
timeout
=
120
,
i
.
nc
&&
l
.
setAttribute
(
"
nonce
"
,
i
.
nc
),
l
.
src
=
function
(
t
){
return
i
.
p
+
""
+
({
1
:
"
vditor
"
,
2
:
"
vendors~vditor
"
}[
t
]
||
t
)
+
"
.bundle.js
"
}(
t
),
s
=
function
(
e
){
l
.
onerror
=
l
.
onload
=
null
,
clearTimeout
(
a
);
var
n
=
o
[
t
];
if
(
0
!==
n
){
if
(
n
){
var
i
=
e
&&
(
"
load
"
===
e
.
type
?
"
missing
"
:
e
.
type
),
r
=
e
&&
e
.
target
&&
e
.
target
.
src
,
s
=
new
Error
(
"
Loading chunk
"
+
t
+
"
failed.
\n
(
"
+
i
+
"
:
"
+
r
+
"
)
"
);
s
.
type
=
i
,
s
.
request
=
r
,
n
[
1
](
s
)}
o
[
t
]
=
void
0
}};
var
a
=
setTimeout
(
function
(){
s
({
type
:
"
timeout
"
,
target
:
l
})},
12
e4
);
l
.
onerror
=
l
.
onload
=
s
,
document
.
head
.
appendChild
(
l
)}
return
Promise
.
all
(
e
)},
i
.
m
=
t
,
i
.
c
=
n
,
i
.
d
=
function
(
t
,
e
,
n
){
i
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
n
})},
i
.
r
=
function
(
t
){
"
undefined
"
!=
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"
Module
"
}),
Object
.
defineProperty
(
t
,
"
__esModule
"
,{
value
:
!
0
})},
i
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
i
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"
object
"
==
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
n
=
Object
.
create
(
null
);
if
(
i
.
r
(
n
),
Object
.
defineProperty
(
n
,
"
default
"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"
string
"
!=
typeof
t
)
for
(
var
o
in
t
)
i
.
d
(
n
,
o
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
o
));
return
n
},
i
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
.
default
}:
function
(){
return
t
};
return
i
.
d
(
e
,
"
a
"
,
e
),
e
},
i
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
i
.
p
=
"
https://vditor.b3log.org/0.2.0/
"
,
i
.
oe
=
function
(
t
){
throw
console
.
error
(
t
),
t
};
var
r
=
window
.
webpackJsonpVditor
=
window
.
webpackJsonpVditor
||
[],
s
=
r
.
push
.
bind
(
r
);
r
.
push
=
e
,
r
=
r
.
slice
();
for
(
var
l
=
0
;
l
<
r
.
length
;
l
++
)
e
(
r
[
l
]);
var
a
=
s
;
return
i
(
i
.
s
=
24
)}([
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M32 0v13l-5-5-6 6-3-3 6-6-5-5zM14 21l-6 6 5 5h-13v-13l5 5 6-6z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=128 height=32 viewBox="0 0 128 32"> <path d="M0 0h128v6.4h-128zM0 12.8h128v6.4h-128zM0 25.6h128v6.4h-128z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M22.996 15.023c1.339-1.591 2.147-3.643 2.147-5.88 0-5.041-4.102-9.143-9.143-9.143h-11.429v32h13.714c5.041 0 9.143-4.102 9.143-9.143 0-3.32-1.779-6.232-4.433-7.834zM11.429 4.571h3.625c1.999 0 3.625 2.051 3.625 4.571s-1.626 4.571-3.625 4.571h-3.625v-9.143zM17.107 27.429h-5.679v-9.143h5.679c2.087 0 3.786 2.051 3.786 4.571s-1.698 4.571-3.786 4.571z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M27.094 19.485v6.12c0 3.059-2.483 5.542-5.542 5.542h-16.010c-3.059 0-5.542-2.483-5.542-5.542v-16.010c0-3.059 2.483-5.542 5.542-5.542h16.010c0.769 0 1.54 0.154 2.251 0.481 0.174 0.077 0.308 0.25 0.346 0.443 0.039 0.211-0.019 0.404-0.174 0.558l-0.943 0.943c-0.115 0.115-0.289 0.193-0.443 0.193-0.058 0-0.115-0.019-0.174-0.039-0.289-0.077-0.578-0.115-0.866-0.115h-16.010c-1.693 0-3.079 1.386-3.079 3.079v16.010c0 1.693 1.386 3.079 3.079 3.079h16.010c1.693 0 3.079-1.386 3.079-3.079v-4.888c0-0.154 0.058-0.308 0.174-0.424l1.232-1.232c0.135-0.135 0.289-0.193 0.443-0.193 0.077 0 0.154 0.019 0.231 0.058 0.231 0.096 0.385 0.308 0.385 0.558zM31.54 10.076l-15.664 15.664c-0.615 0.615-1.578 0.615-2.194 0l-8.275-8.275c-0.615-0.615-0.615-1.578 0-2.194l2.116-2.116c0.615-0.615 1.578-0.615 2.194 0l5.060 5.060 12.451-12.451c0.615-0.615 1.578-0.615 2.194 0l2.116 2.116c0.615 0.615 0.615 1.578 0 2.194z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M21.053 21.895l2.526 2.526 8.421-8.421-8.421-8.421-2.526 2.526 5.895 5.895z"></path> <path d="M10.947 10.105l-2.526-2.526-8.421 8.421 8.421 8.421 2.526-2.526-5.895-5.895z"></path> <path d="M17.613 6.487l1.828 0.499-5.052 18.527-1.828-0.499 5.052-18.527z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M16 24.789c-3.756 0-6.911-2.254-8.188-5.559h16.376c-1.277 3.305-4.432 5.559-8.188 5.559zM10.366 14.423c-1.352 0-2.404-1.052-2.404-2.404s1.052-2.404 2.404-2.404 2.404 1.052 2.404 2.404-1.052 2.404-2.404 2.404zM21.634 14.423c-1.352 0-2.404-1.052-2.404-2.404s1.052-2.404 2.404-2.404 2.404 1.052 2.404 2.404-1.052 2.404-2.404 2.404zM16 28.845c7.061 0 12.845-5.784 12.845-12.845s-5.784-12.845-12.845-12.845-12.845 5.784-12.845 12.845 5.784 12.845 12.845 12.845zM16 0c8.864 0 16 7.136 16 16s-7.136 16-16 16-16-7.136-16-16 7.136-16 16-16z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M14 18v13l-5-5-6 6-3-3 6-6-5-5zM32 3l-6 6 5 5h-13v-13l5 5 6-6z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M4.45 0h3.594c0.595 0 1.078 0.384 1.078 0.858v30.284c0 0.474-0.482 0.858-1.078 0.858h-3.594c-0.595 0-1.078-0.384-1.078-0.858v-30.284c-0-0.474 0.482-0.858 1.078-0.858zM23.888 0h3.673c0.59 0 1.068 0.384 1.068 0.858v30.284c0 0.474-0.478 0.858-1.068 0.858h-3.673c-0.59 0-1.068-0.384-1.068-0.858v-30.284c0-0.474 0.478-0.858 1.068-0.858z"></path> <path d="M25.069 14.167v3.667c0 0.589-0.384 1.065-0.858 1.065h-15.655c-0.474 0-0.858-0.477-0.858-1.065v-3.667c0-0.589 0.384-1.065 0.858-1.065h15.655c0.474 0 0.858 0.477 0.858 1.065z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M19.652 25v6c0 0.55-0.45 1-1 1h-6c-0.55 0-1-0.45-1-1v-6c0-0.55 0.45-1 1-1h6c0.55 0 1 0.45 1 1zM27.552 10c0 4.75-3.225 6.575-5.6 7.9-1.475 0.85-2.4 2.575-2.4 3.3v0c0 0.55-0.425 1.2-1 1.2h-6c-0.55 0-0.9-0.85-0.9-1.4v-1.125c0-3.025 3-5.625 5.2-6.625 1.925-0.875 2.725-1.7 2.725-3.3 0-1.4-1.825-2.65-3.85-2.65-1.125 0-2.15 0.35-2.7 0.725-0.6 0.425-1.2 1.025-2.675 2.875-0.2 0.25-0.5 0.4-0.775 0.4-0.225 0-0.425-0.075-0.625-0.2l-4.1-3.125c-0.425-0.325-0.525-0.875-0.25-1.325 2.7-4.475 6.5-6.65 11.6-6.65 5.35 0 11.35 4.275 11.35 10z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M23.273 27.636v2.909c0 0.795-0.659 1.455-1.455 1.455h-11.636c-0.795 0-1.455-0.659-1.455-1.455v-2.909c0-0.795 0.659-1.455 1.455-1.455h1.455v-8.727h-1.455c-0.795 0-1.455-0.659-1.455-1.455v-2.909c0-0.795 0.659-1.455 1.455-1.455h8.727c0.795 0 1.455 0.659 1.455 1.455v13.091h1.455c0.795 0 1.455 0.659 1.455 1.455zM20.364 1.455v4.364c0 0.795-0.659 1.455-1.455 1.455h-5.818c-0.795 0-1.455-0.659-1.455-1.455v-4.364c0-0.795 0.659-1.455 1.455-1.455h5.818c0.795 0 1.455 0.659 1.455 1.455z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M18.133 23.467l3.2 3.2 10.667-10.667-10.667-10.667-3.2 3.2 7.467 7.467z"></path> <path d="M13.867 8.533l-3.2-3.2-10.667 10.667 10.667 10.667 3.2-3.2-7.467-7.467z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M29.714 0v2.286h-4.571l-11.429 27.429h4.571v2.286h-16v-2.286h4.571l11.429-27.429h-4.571v-2.286z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M31.68 14.56h-31.36c-0.176 0-0.32 0.144-0.32 0.32v2.24c0 0.176 0.144 0.32 0.32 0.32h31.36c0.176 0 0.32-0.144 0.32-0.32v-2.24c0-0.176-0.144-0.32-0.32-0.32z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M29.187 2.933l-0.12-0.121c-2.813-2.812-7.415-2.812-10.228 0l-6.516 6.517c-2.812 2.812-2.812 7.415 0 10.227l0.12 0.12c0.234 0.234 0.482 0.446 0.739 0.641l2.386-2.386c-0.278-0.164-0.542-0.361-0.78-0.599l-0.121-0.121c-1.527-1.527-1.527-4.012 0-5.539l6.517-6.516c1.527-1.527 4.012-1.527 5.539 0l0.121 0.12c1.527 1.527 1.527 4.012 0 5.539l-2.948 2.948c0.512 1.264 0.754 2.611 0.733 3.955l4.559-4.559c2.812-2.812 2.812-7.415-0-10.227zM19.557 12.323c-0.234-0.234-0.482-0.446-0.739-0.641l-2.386 2.385c0.278 0.164 0.542 0.361 0.78 0.599l0.121 0.121c1.527 1.527 1.527 4.012 0 5.539l-6.517 6.517c-1.527 1.527-4.012 1.527-5.539 0l-0.121-0.121c-1.527-1.527-1.527-4.012 0-5.539l2.948-2.948c-0.512-1.264-0.754-2.611-0.733-3.955l-4.559 4.559c-2.812 2.812-2.812 7.415 0 10.228l0.12 0.12c2.813 2.812 7.415 2.812 10.228 0l6.516-6.517c2.812-2.812 2.812-7.415 0-10.228l-0.12-0.12z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M12 2h20v4h-20v-4zM12 14h20v4h-20v-4zM12 26h20v4h-20v-4zM0 4c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4zM0 16c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4zM0 28c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M11 26h20v4h-20zM11 14h20v4h-20zM11 2h20v4h-20zM5 0v8h-2v-6h-2v-2zM3 16.438v1.563h4v2h-6v-4.563l4-1.875v-1.563h-4v-2h6v4.563zM7 22v10h-6v-2h4v-2h-4v-2h4v-2h-4v-2z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M0 16c3.037-5.864 9.058-9.802 16-9.802s12.963 3.938 15.953 9.703l0.047 0.1c-3.037 5.864-9.058 9.802-16 9.802s-12.963-3.938-15.953-9.703l-0.047-0.1zM16 22.531c3.607 0 6.531-2.924 6.531-6.531s-2.924-6.531-6.531-6.531v0c-3.607 0-6.531 2.924-6.531 6.531s2.924 6.531 6.531 6.531v0zM16 19.265c-1.804 0-3.265-1.461-3.265-3.265s1.461-3.265 3.265-3.265v0c1.804 0 3.265 1.461 3.265 3.265s-1.461 3.265-3.265 3.265v0z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M7.024 13.003c3.862 0 6.993 3.131 6.993 6.993s-3.131 6.993-6.993 6.993-6.993-3.131-6.993-6.993l-0.031-0.999c0-7.724 6.262-13.986 13.986-13.986v3.996c-2.668 0-5.177 1.039-7.064 2.926-0.363 0.363-0.695 0.75-0.994 1.156 0.357-0.056 0.723-0.086 1.096-0.086zM25.007 13.003c3.862 0 6.993 3.131 6.993 6.993s-3.131 6.993-6.993 6.993-6.993-3.131-6.993-6.993l-0.031-0.999c0-7.724 6.262-13.986 13.986-13.986v3.996c-2.668 0-5.177 1.039-7.064 2.926-0.363 0.363-0.695 0.75-0.994 1.156 0.357-0.056 0.723-0.086 1.096-0.086z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M4.571 16c0 6.312 5.117 11.429 11.429 11.429s11.429-5.117 11.429-11.429v0c0-6.312-5.117-11.429-11.429-11.429s-11.429 5.117-11.429 11.429v0z"></path> <path d="M16 30.857c-8.229 0-14.933-6.705-14.933-14.933s6.705-14.933 14.933-14.933 15.010 6.705 15.010 15.010c0 8.152-6.705 14.857-15.010 14.857zM16 0c-8.838 0-16 7.162-16 16s7.162 16 16 16 16-7.162 16-16-7.162-16-16-16z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M19.583 9.75q-8.667 1.25-13.375 6.625t-6.208 12.958q6.417-9.083 19.583-9.083v7.25l12.417-12.417-12.417-12.417v7.083z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M32 16v2h-7.328c0.86 1.203 1.328 2.584 1.328 4 0 2.215-1.146 4.345-3.143 5.843-1.855 1.391-4.29 2.157-6.857 2.157s-5.002-0.766-6.857-2.157c-1.998-1.498-3.143-3.628-3.143-5.843h4c0 2.168 2.748 4 6 4s6-1.832 6-4c0-2.168-2.748-4-6-4h-16v-2h9.36c-0.073-0.052-0.146-0.104-0.217-0.157-1.998-1.498-3.143-3.628-3.143-5.843s1.146-4.345 3.143-5.843c1.855-1.391 4.29-2.157 6.857-2.157s5.002 0.766 6.857 2.157c1.997 1.498 3.143 3.628 3.143 5.843h-4c0-2.168-2.748-4-6-4s-6 1.832-6 4c0 2.168 2.748 4 6 4 2.468 0 4.814 0.709 6.64 2h9.36z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M9.846 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM9.846 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM9.846 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM32 5.538v20.923c0 1.692-1.385 3.077-3.077 3.077h-25.846c-1.692 0-3.077-1.385-3.077-3.077v-20.923c0-1.692 1.385-3.077 3.077-3.077h25.846c1.692 0 3.077 1.385 3.077 3.077z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M12.417 9.75q8.667 1.25 13.375 6.625t6.208 12.958q-6.417-9.083-19.583-9.083v7.25l-12.417-12.417 12.417-12.417v7.083z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M21.334 16.532q0-0.233-0.15-0.384l-5.867-5.867q-0.15-0.15-0.384-0.15t-0.384 0.15l-5.85 5.85q-0.167 0.2-0.167 0.399 0 0.233 0.15 0.384t0.384 0.15h3.733v5.867q0 0.217 0.159 0.375t0.375 0.159h3.2q0.217 0 0.375-0.159t0.159-0.375v-5.867h3.734q0.217 0 0.375-0.159t0.159-0.375zM32 21.332q0 2.65-1.875 4.525t-4.525 1.875h-18.133q-3.083 0-5.275-2.192t-2.192-5.275q0-2.166 1.167-4t3.134-2.75q-0.034-0.5-0.034-0.717 0-3.533 2.5-6.033t6.033-2.5q2.6 0 4.759 1.45t3.142 3.849q1.184-1.033 2.767-1.033 1.767 0 3.017 1.25t1.25 3.017q0 1.267-0.683 2.3 2.166 0.516 3.558 2.258t1.392 3.975z"></path> </svg>
'
},
function
(
t
,
e
,
n
){
"
use strict
"
;
n
.
r
(
e
);
var
o
=
"
0.2.0
"
,
i
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-counter
"
,
this
.
render
(
0
,
t
.
options
.
counter
)}
return
t
.
prototype
.
render
=
function
(
t
,
e
){
this
.
element
.
className
=
t
>
e
?
"
vditor-counter vditor-counter--error
"
:
"
vditor-counter
"
,
this
.
element
.
innerHTML
=
t
+
"
/
"
+
e
},
t
}(),
r
=
/highlight-
(?:
text|source
)
-
([
a-z0-9
]
+
)
/
;
function
s
(
t
){
t
.
addRule
(
"
highlightedCodeBlock
"
,{
filter
:
function
(
t
){
var
e
=
t
.
firstChild
;
return
"
DIV
"
===
t
.
nodeName
&&
r
.
test
(
t
.
className
)
&&
e
&&
"
PRE
"
===
e
.
nodeName
},
replacement
:
function
(
t
,
e
,
n
){
var
o
=
((
e
.
className
||
""
).
match
(
r
)
||
[
null
,
""
])[
1
];
return
"
\n\n
"
+
n
.
fence
+
o
+
"
\n
"
+
e
.
firstChild
.
textContent
+
"
\n
"
+
n
.
fence
+
"
\n\n
"
}})}
function
l
(
t
){
t
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
del
"
,
"
s
"
,
"
strike
"
],
replacement
:
function
(
t
){
return
"
~
"
+
t
+
"
~
"
}})}
var
a
=
Array
.
prototype
.
indexOf
,
c
=
Array
.
prototype
.
every
,
p
=
{};
function
u
(
t
){
var
e
,
n
,
o
=
t
.
parentNode
;
return
"
THEAD
"
===
o
.
nodeName
||
o
.
firstChild
===
t
&&
(
"
TABLE
"
===
o
.
nodeName
||
(
n
=
(
e
=
o
).
previousSibling
,
"
TBODY
"
===
e
.
nodeName
&&
(
!
n
||
"
THEAD
"
===
n
.
nodeName
&&
/^
\s
*$/i
.
test
(
n
.
textContent
))))
&&
c
.
call
(
t
.
childNodes
,
function
(
t
){
return
"
TH
"
===
t
.
nodeName
})}
function
d
(
t
,
e
){
var
n
=
"
"
;
return
0
===
a
.
call
(
e
.
parentNode
.
childNodes
,
e
)
&&
(
n
=
"
|
"
),
n
+
t
+
"
|
"
}
function
h
(
t
){
for
(
var
e
in
t
.
keep
(
function
(
t
){
return
"
TABLE
"
===
t
.
nodeName
&&!
u
(
t
.
rows
[
0
])}),
p
)
t
.
addRule
(
e
,
p
[
e
])}
function
f
(
t
){
t
.
addRule
(
"
taskListItems
"
,{
filter
:
function
(
t
){
return
"
checkbox
"
===
t
.
type
&&
"
LI
"
===
t
.
parentNode
.
nodeName
},
replacement
:
function
(
t
,
e
){
return
(
e
.
checked
?
"
[x]
"
:
"
[ ]
"
)
+
"
"
}})}
function
v
(
t
){
t
.
use
([
s
,
l
,
h
,
f
])}
p
.
tableCell
=
{
filter
:[
"
th
"
,
"
td
"
],
replacement
:
function
(
t
,
e
){
return
d
(
t
,
e
)}},
p
.
tableRow
=
{
filter
:
"
tr
"
,
replacement
:
function
(
t
,
e
){
var
n
=
""
,
o
=
{
left
:
"
:--
"
,
right
:
"
--:
"
,
center
:
"
:-:
"
};
if
(
u
(
e
))
for
(
var
i
=
0
;
i
<
e
.
childNodes
.
length
;
i
++
){
var
r
=
"
---
"
,
s
=
(
e
.
childNodes
[
i
].
getAttribute
(
"
align
"
)
||
""
).
toLowerCase
();
s
&&
(
r
=
o
[
s
]
||
r
),
n
+=
d
(
r
,
e
.
childNodes
[
i
])}
return
"
\n
"
+
t
+
(
n
?
"
\n
"
+
n
:
""
)}},
p
.
table
=
{
filter
:
function
(
t
){
return
"
TABLE
"
===
t
.
nodeName
&&
u
(
t
.
rows
[
0
])},
replacement
:
function
(
t
){
return
"
\n\n
"
+
(
t
=
t
.
replace
(
"
\n\n
"
,
"
\n
"
))
+
"
\n\n
"
}},
p
.
tableSection
=
{
filter
:[
"
thead
"
,
"
tbody
"
,
"
tfoot
"
],
replacement
:
function
(
t
){
return
t
}};
var
m
,
g
=
{
en_US
:{
bold
:
"
Blod
"
,
check
:
"
Task List
"
,
code
:
"
Code Block
"
,
emoji
:
"
Emoji
"
,
fullscreen
:
"
Fullscreen
"
,
headings
:
"
Headings
"
,
help
:
"
Help
"
,
info
:
"
Info
"
,
"
inline-code
"
:
"
Inline Code
"
,
italic
:
"
Italic
"
,
line
:
"
Line
"
,
link
:
"
Link
"
,
list
:
"
List
"
,
"
ordered-list
"
:
"
Order List
"
,
over
:
"
over
"
,
preview
:
"
Preview
"
,
quote
:
"
Quote
"
,
record
:
"
Start Record/End Record
"
,
recording
:
"
recording...
"
,
redo
:
"
Redo
"
,
strike
:
"
Strike
"
,
table
:
"
Table
"
,
undo
:
"
Undo
"
,
upload
:
"
Upload image or file
"
,
uploading
:
"
uploading...
"
},
zh_CN
:{
bold
:
"
粗体
"
,
check
:
"
任务列表
"
,
code
:
"
代码块
"
,
emoji
:
"
表情
"
,
fullscreen
:
"
全屏
"
,
headings
:
"
标题
"
,
help
:
"
帮助
"
,
info
:
"
关于
"
,
"
inline-code
"
:
"
行内代码
"
,
italic
:
"
斜体
"
,
line
:
"
分隔线
"
,
link
:
"
链接
"
,
list
:
"
无序列表
"
,
"
ordered-list
"
:
"
有序列表
"
,
over
:
"
超过
"
,
preview
:
"
预览
"
,
quote
:
"
引用
"
,
record
:
"
开始录音/结束录音
"
,
recording
:
"
录音中...
"
,
redo
:
"
重做
"
,
strike
:
"
删除线
"
,
table
:
"
表格
"
,
undo
:
"
撤销
"
,
upload
:
"
上传图片或文件
"
,
uploading
:
"
上传中...
"
}},
y
=
function
(){
return
function
(){
this
.
isUploading
=!
1
,
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-upload
"
,
this
.
element
.
innerHTML
=
'
<div class="vditor-upload__progress"></div><div class="vditor-upload__close">x</div>
'
,
this
.
element
.
children
[
1
].
addEventListener
(
"
click
"
,
function
(){
this
.
parentElement
.
style
.
opacity
=
0
,
this
.
parentElement
.
className
=
"
vditor-upload
"
})}}(),
w
=
function
(
t
,
e
,
n
){
for
(
var
o
=
new
FormData
,
i
=
[],
r
=
0
,
s
=
e
.
length
;
r
<
s
;
r
++
){
var
l
=
e
[
r
];
l
instanceof
DataTransferItem
&&
(
l
=
l
.
getAsFile
()),
l
.
size
<=
t
.
options
.
upload
.
max
&&
(
o
.
append
(
"
file[]
"
,
l
),
i
.
push
(
l
))}
if
(
t
.
upload
.
element
.
className
=
"
vditor-upload
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
""
,
_
(
t
.
editor
.
element
,
function
(
t
,
e
){
for
(
var
n
=
""
,
o
=
e
.
length
,
i
=
0
;
i
<
o
;
i
++
){
var
r
=
e
[
i
];
r
instanceof
DataTransferItem
&&
(
r
=
r
.
getAsFile
());
var
s
=-
1
===
r
.
type
.
indexOf
(
"
image
"
)?
""
:
"
!
"
;
if
(
!
r
.
name
)
return
""
;
var
l
=
r
.
name
.
lastIndexOf
(
"
.
"
),
a
=
t
.
options
.
upload
.
filename
(
r
.
name
.
substr
(
0
,
l
))
+
r
.
name
.
substr
(
l
),
c
=
t
.
options
.
lang
;
r
.
size
>
t
.
options
.
upload
.
max
?(
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
r
.
name
+
"
"
+
g
[
c
].
over
+
"
"
+
t
.
options
.
upload
.
max
/
1024
/
1024
+
"
M
"
):
n
+=
s
+
"
[
"
+
a
+
"
](
"
+
g
[
c
].
uploading
+
"
)
\n
"
}
return
n
}(
t
,
e
),
""
),
0
!==
i
.
length
){
if
(
!
t
.
options
.
upload
.
url
||!
t
.
upload
)
return
n
&&
(
n
.
value
=
""
),
void
alert
(
"
please config: options.upload.url
"
);
var
a
=
new
XMLHttpRequest
;
a
.
open
(
"
POST
"
,
t
.
options
.
upload
.
url
),
t
.
options
.
upload
.
token
&&
a
.
setRequestHeader
(
"
X-Upload-Token
"
,
t
.
options
.
upload
.
token
),
t
.
upload
.
isUploading
=!
0
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
),
a
.
onreadystatechange
=
function
(){
a
.
readyState
===
XMLHttpRequest
.
DONE
&&
(
t
.
upload
.
isUploading
=!
1
,
n
&&
(
n
.
value
=
""
),
t
.
editor
.
element
.
removeAttribute
(
"
disabled
"
),
200
===
a
.
status
?(
t
.
options
.
upload
.
success
?
t
.
options
.
upload
.
success
(
t
.
editor
.
element
,
a
.
responseText
):
function
(
t
,
e
,
n
,
o
){
t
.
focus
();
var
i
=
JSON
.
parse
(
e
);
1
===
i
.
code
&&
(
o
.
className
=
"
vditor-upload vditor-upload--tip
"
,
o
.
children
[
0
].
innerHTML
=
i
.
msg
),
i
.
data
.
errFiles
.
forEach
(
function
(
e
){
var
o
=
e
.
lastIndexOf
(
"
.
"
),
i
=
"
[
"
+
(
n
.
upload
.
filename
(
e
.
substr
(
0
,
o
))
+
e
.
substr
(
o
))
+
"
](
"
+
g
[
n
.
lang
].
uploading
+
"
)
"
;
t
.
selectionStart
=
t
.
value
.
split
(
i
)[
0
].
length
,
t
.
selectionEnd
=
t
.
selectionStart
+
i
.
length
,
_
(
t
,
""
,
""
,
!
0
)}),
Object
.
keys
(
i
.
data
.
succMap
).
forEach
(
function
(
e
){
var
o
=
i
.
data
.
succMap
[
e
];
if
(
o
.
indexOf
(
"
.wav
"
)
!==
o
.
length
-
4
){
var
r
=
e
.
lastIndexOf
(
"
.
"
),
s
=
n
.
upload
.
filename
(
e
.
substr
(
0
,
r
))
+
e
.
substr
(
r
),
l
=
"
[
"
+
s
+
"
](
"
+
g
[
n
.
lang
].
uploading
+
"
)
"
;
t
.
selectionStart
=
t
.
value
.
split
(
l
)[
0
].
length
,
t
.
selectionEnd
=
t
.
selectionStart
+
l
.
length
,
_
(
t
,
"
[
"
+
s
+
"
](
"
+
o
+
"
)
"
,
""
,
!
0
)}
else
_
(
t
,
'
<audio controls="controls" src="
'
+
o
+
'
"></audio>
\n
'
,
""
)})}(
t
.
editor
.
element
,
a
.
responseText
,
t
.
options
,
t
.
upload
.
element
),
t
.
upload
.
element
.
style
.
opacity
=
"
0
"
):
t
.
options
.
upload
.
error
?
t
.
options
.
upload
.
error
(
a
.
responseText
):(
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
a
.
responseText
||
"
401
"
))},
a
.
upload
.
onprogress
=
function
(
e
){
if
(
e
.
lengthComputable
){
var
n
=
e
.
loaded
/
e
.
total
*
100
;
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
children
[
0
].
style
.
width
=
n
+
"
%
"
}},
a
.
send
(
o
)}
else
n
&&
(
n
.
value
=
""
)},
b
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
textarea
"
),
this
.
element
.
className
=
"
vditor-textarea
"
,
this
.
element
.
setAttribute
(
"
placeholder
"
,
t
.
options
.
placeholder
),
t
.
options
.
cache
&&
(
this
.
element
.
value
=
localStorage
.
getItem
(
"
vditor
"
+
t
.
id
),
t
.
options
.
counter
>
0
&&
t
.
counter
.
render
(
this
.
element
.
value
.
length
,
t
.
options
.
counter
)),
this
.
bindEvent
(
t
)}
return
t
.
prototype
.
html2md
=
function
(
t
,
e
,
n
,
o
){
var
i
=!
1
;
t
.
prototype
.
escape
=
function
(
t
){
return
t
};
var
r
=
new
t
;
r
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
pre
"
,
"
code
"
],
replacement
:
function
(
t
,
e
){
return
"
PRE
"
===
e
.
parentElement
.
tagName
?
t
:
t
.
split
(
"
\n
"
).
length
>
1
?(
i
=!
0
,
"
```
\n
"
+
t
+
"
\n
```
"
):
"
`
"
+
t
+
"
`
"
}}),
r
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
img
"
],
replacement
:
function
(
t
,
n
){
if
(
!
n
.
getAttribute
(
"
src
"
))
return
""
;
if
(
e
.
options
.
upload
.
linkToImgUrl
){
var
o
=
new
XMLHttpRequest
;
o
.
open
(
"
POST
"
,
e
.
options
.
upload
.
linkToImgUrl
),
o
.
onreadystatechange
=
function
(){
if
(
o
.
readyState
===
XMLHttpRequest
.
DONE
&&
200
===
o
.
status
){
var
t
=
JSON
.
parse
(
o
.
responseText
);
if
(
0
!==
t
.
code
)
return
void
alert
(
t
.
msg
);
var
i
=
n
.
getAttribute
(
"
src
"
);
e
.
editor
.
element
.
selectionStart
=
e
.
editor
.
element
.
value
.
split
(
i
)[
0
].
length
,
e
.
editor
.
element
.
selectionEnd
=
e
.
editor
.
element
.
selectionStart
+
i
.
length
,
_
(
e
.
editor
.
element
,
t
.
data
.
url
,
""
,
!
0
)}},
o
.
send
(
JSON
.
stringify
({
url
:
n
.
getAttribute
(
"
src
"
)}))}
return
"

+
"
)
"
}}),
r
.
use
(
v
);
var
s
=
r
.
turndown
(
n
);
if
(
i
){
var
l
=
document
.
createElement
(
"
div
"
);
l
.
innerHTML
=
n
,
l
.
querySelectorAll
(
"
pre
"
).
length
>
1
?
i
=!
1
:
"
```
"
===
s
.
substr
(
0
,
3
)
&&
"
```
"
===
s
.
substr
(
s
.
length
-
3
,
3
)
||
(
i
=!
1
)}
_
(
e
.
editor
.
element
,
i
?
"
```
\n
"
+
o
+
"
\n
```
"
:
s
,
""
,
!
0
)},
t
.
prototype
.
bindEvent
=
function
(
t
){
var
e
,
o
=
this
;
this
.
element
.
addEventListener
(
"
input
"
,
function
(){
t
.
options
.
counter
>
0
&&
t
.
counter
.
render
(
o
.
element
.
value
.
length
,
t
.
options
.
counter
),
"
function
"
==
typeof
t
.
options
.
input
&&
t
.
options
.
input
(
o
.
element
.
value
,
t
.
preview
&&
t
.
preview
.
element
),
t
.
hint
&&
t
.
hint
.
render
(),
t
.
options
.
cache
&&
localStorage
.
setItem
(
"
vditor
"
+
t
.
id
,
t
.
editor
.
element
.
value
),
t
.
preview
&&
t
.
preview
.
render
(
t
)}),
this
.
element
.
addEventListener
(
"
focus
"
,
function
(){(
t
.
options
.
focus
&&
t
.
options
.
focus
(
o
.
element
.
value
),
t
.
toolbar
.
elements
.
emoji
&&
t
.
toolbar
.
elements
.
emoji
.
children
[
1
])
&&
(
t
.
toolbar
.
elements
.
emoji
.
children
[
1
].
style
.
display
=
"
none
"
);
t
.
toolbar
.
elements
.
headings
&&
t
.
toolbar
.
elements
.
headings
.
children
[
1
]
&&
(
t
.
toolbar
.
elements
.
headings
.
children
[
1
].
style
.
display
=
"
none
"
)}),
this
.
element
.
addEventListener
(
"
blur
"
,
function
(){
t
.
options
.
blur
&&
t
.
options
.
blur
(
o
.
element
.
value
)}),
t
.
options
.
select
&&
(
this
.
element
.
onselect
=
function
(){
t
.
options
.
select
(
o
.
element
.
value
.
substring
(
o
.
element
.
selectionStart
,
o
.
element
.
selectionEnd
))}),
this
.
element
.
addEventListener
(
"
scroll
"
,
function
(){
if
(
"
none
"
!==
t
.
preview
.
element
.
style
.
display
||
t
.
preview
){
var
e
=
o
.
element
.
scrollTop
,
n
=
o
.
element
.
clientHeight
,
i
=
o
.
element
.
scrollHeight
,
r
=
t
.
preview
.
element
;
r
.
scrollTop
=
e
/
n
>
.
5
?(
e
+
n
)
*
r
.
scrollHeight
/
i
-
n
:
e
*
r
.
scrollHeight
/
i
}}),
t
.
options
.
upload
.
url
&&
this
.
element
.
addEventListener
(
"
drop
"
,
function
(
e
){
e
.
stopPropagation
(),
e
.
preventDefault
();
var
n
=
e
.
dataTransfer
.
items
;
0
!==
n
.
length
&&
w
(
t
,
n
)});
var
i
=
this
.
html2md
;
this
.
element
.
addEventListener
(
"
paste
"
,
function
(
o
){
o
.
stopPropagation
(),
o
.
preventDefault
();
var
r
=
o
;
if
(
""
!==
r
.
clipboardData
.
getData
(
"
text/html
"
).
replace
(
/
(
^
\s
*
)
|
(\s
*
)
$/g
,
""
)){
var
s
=
r
.
clipboardData
.
getData
(
"
text/html
"
),
l
=
r
.
clipboardData
.
getData
(
"
text/plain
"
);
if
(
!
e
)
return
void
n
.
e
(
1
).
then
(
n
.
bind
(
null
,
26
)).
then
(
function
(
n
){
e
=
n
.
default
,
i
(
e
,
t
,
s
,
l
)}).
catch
(
function
(
t
){
console
.
error
(
"
Failed to load turndown
"
,
t
)});
i
(
e
,
t
,
s
,
l
)}
else
if
(
""
!==
r
.
clipboardData
.
getData
(
"
text/plain
"
).
replace
(
/
(
^
\s
*
)
|
(\s
*
)
$/g
,
""
)
&&
0
===
r
.
clipboardData
.
files
.
length
)
_
(
o
.
target
,
r
.
clipboardData
.
getData
(
"
text/plain
"
),
""
,
!
0
);
else
if
(
r
.
clipboardData
.
files
.
length
>
0
){
if
(
!
t
.
options
.
upload
.
url
)
return
;
w
(
t
,
r
.
clipboardData
.
files
)}})},
t
}(),
_
=
function
(
t
,
e
,
n
,
o
){
if
(
"
number
"
==
typeof
t
.
selectionStart
&&
"
number
"
==
typeof
t
.
selectionEnd
){
var
i
=
t
.
selectionStart
,
r
=
t
.
selectionEnd
,
s
=
t
.
value
;
if
(
t
.
focus
(),
/firefox/i
.
test
(
navigator
.
userAgent
)
||
/edge/i
.
test
(
navigator
.
userAgent
)
||
/msie/i
.
test
(
navigator
.
userAgent
)
||
/trident/i
.
test
(
navigator
.
userAgent
)){
i
===
r
?(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionEnd
=
t
.
selectionStart
=
r
+
e
.
length
):
o
?(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionEnd
=
i
+
e
.
length
+
n
.
length
):
s
.
substring
(
i
-
e
.
length
,
i
)
===
e
&&
s
.
substring
(
r
,
r
+
n
.
length
)
===
n
?(
t
.
value
=
s
.
substring
(
0
,
i
-
e
.
length
)
+
s
.
substring
(
i
,
r
)
+
s
.
substring
(
r
+
n
.
length
,
s
.
length
),
t
.
selectionStart
=
i
-
e
.
length
,
t
.
selectionEnd
=
r
-
e
.
length
):(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
s
.
substring
(
i
,
r
)
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionStart
=
i
+
e
.
length
,
t
.
selectionEnd
=
r
+
e
.
length
);
var
l
=
document
.
createEvent
(
"
HTMLEvents
"
);
l
.
initEvent
(
"
input
"
,
!
0
,
!
1
),
t
.
dispatchEvent
(
l
)}
else
if
(
i
===
r
)
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
n
),
t
.
selectionStart
=
t
.
selectionEnd
=
t
.
selectionStart
-
n
.
length
;
else
if
(
o
)
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
n
);
else
if
(
s
.
substring
(
i
-
e
.
length
,
i
)
===
e
&&
s
.
substring
(
r
,
r
+
n
.
length
)
===
n
){
document
.
execCommand
(
"
delete
"
,
!
1
);
for
(
var
a
=
0
,
c
=
e
.
length
;
a
<
c
;
a
++
)
document
.
execCommand
(
"
delete
"
,
!
1
);
for
(
var
p
=
0
,
u
=
n
.
length
;
p
<
u
;
p
++
)
document
.
execCommand
(
"
forwardDelete
"
,
!
1
);
document
.
execCommand
(
"
insertText
"
,
!
1
,
s
.
substring
(
i
,
r
)),
t
.
selectionStart
=
i
-
e
.
length
,
t
.
selectionEnd
=
r
-
e
.
length
}
else
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
s
.
substring
(
i
,
r
)
+
n
),
t
.
selectionStart
=
i
+
e
.
length
,
t
.
selectionEnd
=
r
+
e
.
length
}},
E
=
function
(
t
){
var
e
=
window
.
getComputedStyle
(
t
),
n
=
document
.
querySelector
(
"
.vditor-position
"
);
n
||
((
n
=
document
.
createElement
(
"
div
"
)).
className
=
"
vditor-position
"
,
document
.
body
.
appendChild
(
n
));
var
o
=
n
.
style
;
o
.
whiteSpace
=
"
pre-wrap
"
,
o
.
wordWrap
=
"
break-word
"
,
o
.
position
=
"
absolute
"
,
o
.
overflow
=
"
hidden
"
,
o
.
left
=
"
-100%
"
,[
"
direction
"
,
"
box-sizing
"
,
"
width
"
,
"
height
"
,
"
overflow-x
"
,
"
overflow-y
"
,
"
border-top-width
"
,
"
border-right-width
"
,
"
border-bottom-width
"
,
"
border-left-width
"
,
"
border-style
"
,
"
padding-top
"
,
"
padding-right
"
,
"
padding-bottom
"
,
"
padding-left
"
,
"
font-style
"
,
"
font-variant
"
,
"
font-weight
"
,
"
font-stretch
"
,
"
font-size
"
,
"
text-size-adjust
"
,
"
line-height
"
,
"
font-family
"
,
"
text-align
"
,
"
text-transform
"
,
"
text-indent
"
,
"
text-decoration
"
,
"
letter-spacing
"
,
"
word-spacing
"
,
"
tab-size
"
,
"
tab-size
"
].
forEach
(
function
(
t
){
o
.
setProperty
(
t
,
e
.
getPropertyValue
(
t
))}),
n
.
textContent
=
t
.
value
.
substring
(
0
,
t
.
selectionEnd
);
var
i
=
document
.
createElement
(
"
span
"
);
return
i
.
textContent
=
t
.
value
.
substring
(
t
.
selectionEnd
)
||
"
.
"
,
n
.
appendChild
(
i
),{
left
:
i
.
offsetLeft
-
t
.
scrollLeft
,
top
:
i
.
offsetTop
-
t
.
scrollTop
+
parseInt
(
e
.
lineHeight
,
10
)}},
x
=
function
(){
function
t
(
t
){
this
.
timeId
=-
1
,
this
.
hint
=
t
.
options
.
hint
,
this
.
editorElement
=
t
.
editor
.
element
,
this
.
element
=
document
.
createElement
(
"
ul
"
),
this
.
element
.
className
=
"
vditor-hint
"
,
this
.
editorElement
.
parentElement
.
appendChild
(
this
.
element
)}
return
t
.
prototype
.
render
=
function
(){
var
t
=
this
,
e
=
this
.
editorElement
.
value
.
substr
(
0
,
this
.
editorElement
.
selectionStart
).
split
(
"
\n
"
).
slice
(
-
1
).
pop
(),
o
=
this
.
getKey
(
e
,
"
@
"
),
i
=
this
.
getKey
(
e
,
"
:
"
);
void
0
===
o
&&
void
0
===
i
?(
this
.
element
.
style
.
display
=
"
none
"
,
clearTimeout
(
this
.
timeId
)):(
void
0
!==
o
&&
this
.
hint
.
at
&&
(
clearTimeout
(
this
.
timeId
),
this
.
timeId
=
setTimeout
(
function
(){
t
.
genHTML
(
t
.
hint
.
at
(
o
),
o
)},
this
.
hint
.
delay
)),
void
0
!==
i
&&
n
.
e
(
2
).
then
(
n
.
bind
(
null
,
27
)).
then
(
function
(
e
){
var
n
=
""
===
i
?
t
.
hint
.
emoji
:
e
.
getAllEmoji
(
t
.
hint
.
emojiPath
),
o
=
[];
Object
.
keys
(
n
).
forEach
(
function
(
t
){
0
===
t
.
indexOf
(
i
.
toLowerCase
())
&&
(
n
[
t
].
indexOf
(
"
.
"
)
>-
1
?
o
.
push
({
html
:
'
<img src="
'
+
n
[
t
]
+
'
" title=":
'
+
t
+
'
:"/> :
'
+
t
+
"
:
"
,
value
:
"
:
"
+
t
+
"
:
"
}):
o
.
push
({
html
:
n
[
t
]
+
"
"
+
t
,
value
:
n
[
t
]}))}),
t
.
genHTML
(
o
,
i
)}).
catch
(
function
(
t
){
console
.
error
(
"
Failed to load emoji
"
,
t
)}))},
t
.
prototype
.
getKey
=
function
(
t
,
e
){
String
.
prototype
.
trim
||
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
[\s\u
FEFF
\x
A0
]
+|
[\s\u
FEFF
\x
A0
]
+$/g
,
""
)});
var
n
,
o
=
t
.
split
(
e
);
if
(
o
.
length
>
1
)
if
(
2
===
o
.
length
&&
""
===
o
[
0
])(
""
===
o
[
1
]
||
""
!==
o
[
1
].
trim
())
&&-
1
===
o
[
1
].
indexOf
(
"
"
)
&&
o
[
1
].
length
<
33
&&
(
n
=
o
[
1
]);
else
{
var
i
=
o
[
o
.
length
-
2
],
r
=
o
.
slice
(
-
1
).
pop
();
"
"
===
i
.
slice
(
-
1
)
&&-
1
===
r
.
indexOf
(
"
"
)
&&
(
""
===
r
||
""
!==
r
.
trim
())
&&
r
.
length
<
33
&&
(
n
=
r
)}
return
n
},
t
.
prototype
.
genHTML
=
function
(
t
,
e
){
var
n
=
this
;
if
(
0
!==
t
.
length
){
var
o
=
E
(
this
.
editorElement
),
i
=
o
.
left
,
r
=
o
.
top
-
4
,
s
=
""
;
t
.
forEach
(
function
(
t
,
n
){
if
(
!
(
n
>
7
)){
var
o
=
t
.
html
;
if
(
""
!==
e
){
var
i
=
o
.
lastIndexOf
(
"
>
"
)
+
1
,
r
=
o
.
substr
(
i
),
l
=
r
.
toLowerCase
().
indexOf
(
e
.
toLowerCase
());
l
>-
1
&&
(
r
=
r
.
substring
(
0
,
l
)
+
"
<b>
"
+
r
.
substring
(
l
,
l
+
e
.
length
)
+
"
</b>
"
+
r
.
substring
(
l
+
e
.
length
),
o
=
o
.
substr
(
0
,
i
)
+
r
)}
s
+=
'
<li data-value="
'
+
t
.
value
+
'
" class="
'
+
(
n
||
"
vditor-hint--current
"
)
+
'
">
'
+
o
+
"
</li>
"
}}),
this
.
element
.
innerHTML
=
s
,
this
.
element
.
style
.
top
=
r
+
"
px
"
,
this
.
element
.
style
.
left
=
i
+
"
px
"
,
this
.
element
.
style
.
display
=
"
block
"
,
this
.
element
.
querySelectorAll
(
"
li
"
).
forEach
(
function
(
t
){
t
.
addEventListener
(
"
click
"
,
function
(){
n
.
element
.
style
.
display
=
"
none
"
;
var
e
=
t
.
getAttribute
(
"
data-value
"
),
o
=
0
===
e
.
indexOf
(
"
@
"
)?
"
@
"
:
"
:
"
;
n
.
editorElement
.
selectionStart
=
n
.
editorElement
.
value
.
substr
(
0
,
n
.
editorElement
.
selectionEnd
).
lastIndexOf
(
o
),
_
(
n
.
editorElement
,
e
,
""
,
!
0
)})}),
r
+
this
.
element
.
offsetHeight
-
this
.
editorElement
.
offsetHeight
>
window
.
innerHeight
-
(
this
.
editorElement
.
parentElement
.
offsetHeight
+
this
.
editorElement
.
parentElement
.
offsetTop
-
document
.
documentElement
.
scrollTop
)
&&
(
this
.
element
.
style
.
top
=
r
-
this
.
element
.
offsetHeight
+
"
px
"
)}
else
this
.
element
.
style
.
display
=
"
none
"
},
t
}(),
O
=
function
(){
function
t
(
t
){
this
.
editorElement
=
t
.
editor
.
element
,
this
.
toolbarElements
=
t
.
toolbar
.
elements
,
this
.
options
=
t
.
options
,
this
.
hintElement
=
t
.
hint
.
element
,
this
.
bindHotkey
()}
return
t
.
prototype
.
bindHotkey
=
function
(){
var
t
=
this
;
this
.
editorElement
.
addEventListener
(
"
keydown
"
,
function
(
e
){
t
.
options
.
esc
&&
e
.
key
.
toLowerCase
()
===
"
Escape
"
.
toLowerCase
()
&&
t
.
options
.
esc
(
t
.
editorElement
.
value
),
t
.
options
.
ctrlEnter
&&
(
e
.
metaKey
||
e
.
ctrlKey
)
&&
"
enter
"
===
e
.
key
.
toLowerCase
()
&&
t
.
options
.
ctrlEnter
(
t
.
editorElement
.
value
),
t
.
options
.
toolbar
.
forEach
(
function
(
n
){
if
(
n
.
hotkey
){
var
o
=
n
.
hotkey
.
split
(
"
-
"
);
"
ctrl
"
!==
o
[
0
]
&&
"
⌘
"
!==
o
[
0
]
||!
e
.
metaKey
&&!
e
.
ctrlKey
||
e
.
key
===
o
[
1
]
&&
(
t
.
toolbarElements
[
n
.
name
].
children
[
0
].
click
(),
e
.
preventDefault
(),
e
.
stopPropagation
())}}),(
t
.
options
.
hint
.
at
||
t
.
toolbarElements
.
emoji
)
&&
t
.
hint
(
e
)})},
t
.
prototype
.
hint
=
function
(
t
){
if
(
0
!==
this
.
hintElement
.
querySelectorAll
(
"
li
"
).
length
&&
"
none
"
!==
this
.
hintElement
.
style
.
display
){
var
e
=
this
.
hintElement
.
querySelector
(
"
.vditor-hint--current
"
);
if
(
"
arrowdown
"
===
t
.
key
.
toLowerCase
())
t
.
preventDefault
(),
t
.
stopPropagation
(),
e
.
nextElementSibling
?
e
.
nextElementSibling
.
className
=
"
vditor-hint--current
"
:
this
.
hintElement
.
children
[
0
].
className
=
"
vditor-hint--current
"
,
e
.
removeAttribute
(
"
class
"
);
else
if
(
"
arrowup
"
===
t
.
key
.
toLowerCase
()){
if
(
t
.
preventDefault
(),
t
.
stopPropagation
(),
e
.
previousElementSibling
)
e
.
previousElementSibling
.
className
=
"
vditor-hint--current
"
;
else
{
var
n
=
this
.
hintElement
.
children
.
length
;
this
.
hintElement
.
children
[
n
-
1
].
className
=
"
vditor-hint--current
"
}
e
.
removeAttribute
(
"
class
"
)}
else
if
(
"
enter
"
===
t
.
key
.
toLowerCase
()){
t
.
preventDefault
(),
t
.
stopPropagation
(),
this
.
hintElement
.
style
.
display
=
"
none
"
;
var
o
=
e
.
getAttribute
(
"
data-value
"
),
i
=
0
===
o
.
indexOf
(
"
@
"
)?
"
@
"
:
"
:
"
;
this
.
editorElement
.
selectionStart
=
this
.
editorElement
.
value
.
substr
(
0
,
this
.
editorElement
.
selectionEnd
).
lastIndexOf
(
i
),
_
(
this
.
editorElement
,
o
,
""
,
!
0
)}}},
t
}(),
M
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-preview
"
+
(
t
.
options
.
classes
.
preview
?
"
"
+
t
.
options
.
classes
.
preview
:
""
),
t
.
options
.
preview
.
show
||
(
this
.
element
.
style
.
display
=
"
none
"
),
"
none
"
!==
this
.
element
.
style
.
display
&&
this
.
render
(
t
)}
return
t
.
prototype
.
render
=
function
(
t
,
e
){
var
n
=
this
;
"
none
"
!==
this
.
element
.
style
.
display
&&
(
e
?
this
.
element
.
innerHTML
=
e
:
""
!==
t
.
editor
.
element
.
value
.
replace
(
/^
[\s\u
FEFF
\x
A0
]
+|
[\s\u
FEFF
\x
A0
]
+$/g
,
""
)?
t
.
options
.
preview
.
url
?(
clearTimeout
(
t
.
mdTimeoutId
),
t
.
mdTimeoutId
=
setTimeout
(
function
(){
var
e
=
new
XMLHttpRequest
;
e
.
open
(
"
POST
"
,
t
.
options
.
preview
.
url
),
e
.
onreadystatechange
=
function
(){
if
(
e
.
readyState
===
XMLHttpRequest
.
DONE
&&
200
===
e
.
status
){
var
o
=
JSON
.
parse
(
e
.
responseText
);
if
(
0
!==
o
.
code
)
return
void
alert
(
o
.
msg
);
n
.
element
.
innerHTML
=
o
.
data
,
t
.
options
.
preview
.
parse
&&
t
.
options
.
preview
.
parse
(
n
.
element
)}},
e
.
send
(
JSON
.
stringify
({
markdownText
:
t
.
editor
.
element
.
value
}))},
t
.
options
.
preview
.
delay
)):
this
.
element
.
innerHTML
=
t
.
editor
.
element
.
value
:
this
.
element
.
innerHTML
=
""
)},
t
}(),
k
=
n
(
1
),
L
=
n
.
n
(
k
),
T
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-resize
"
,
this
.
element
.
innerHTML
=
L
.
a
,
this
.
bindEvent
(
t
)}
return
t
.
prototype
.
bindEvent
=
function
(
t
){
this
.
element
.
addEventListener
(
"
mousedown
"
,
function
(
e
){
var
n
=
document
,
o
=
document
.
getElementById
(
t
.
id
),
i
=
e
.
clientY
,
r
=
o
.
offsetHeight
;
n
.
ondragstart
=
function
(){
return
!
1
},
n
.
onselectstart
=
"
return false;
"
,
n
.
onselect
=
function
(){
document
.
selection
.
empty
()},
window
.
captureEvents
&&
window
.
captureEvents
(),
n
.
onmousemove
=
function
(
e
){
"
top
"
===
t
.
options
.
resize
.
position
?
o
.
style
.
height
=
Math
.
max
(
100
,
r
+
(
i
-
e
.
clientY
))
+
"
px
"
:
o
.
style
.
height
=
Math
.
max
(
100
,
r
+
(
e
.
clientY
-
i
))
+
"
px
"
},
n
.
onmouseup
=
function
(){
t
.
options
.
resize
.
after
&&
t
.
options
.
resize
.
after
(
o
.
offsetHeight
-
r
),
window
.
captureEvents
&&
window
.
captureEvents
(),
n
.
onmousemove
=
null
,
n
.
onmouseup
=
null
,
n
.
ondragstart
=
null
,
n
.
onselectstart
=
null
,
n
.
onselect
=
null
}})},
t
}(),
P
=
n
(
2
),
A
=
n
.
n
(
P
),
j
=
function
(){
function
t
(
t
,
e
){
this
.
menuItem
=
e
,
this
.
editorElement
=
t
.
editor
.
element
,
this
.
element
=
document
.
createElement
(
"
div
"
);
var
n
=
document
.
createElement
(
"
div
"
);
n
.
className
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
;
var
o
=
this
.
menuItem
.
hotkey
?
"
<
"
+
this
.
menuItem
.
hotkey
+
"
>
"
:
""
;
o
=
/Mac/
.
test
(
navigator
.
platform
)?
o
.
replace
(
"
ctrl
"
,
"
⌘
"
):
o
.
replace
(
"
⌘
"
,
"
ctrl
"
),
n
.
setAttribute
(
"
aria-label
"
,
this
.
menuItem
.
tip
||
g
[
t
.
options
.
lang
][
this
.
menuItem
.
name
]
+
o
),
this
.
element
.
appendChild
(
n
)}
return
t
.
prototype
.
bindEvent
=
function
(){
var
t
=
this
;
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
_
(
t
.
editorElement
,
t
.
menuItem
.
prefix
||
""
,
t
.
menuItem
.
suffix
||
""
)})},
t
}(),
z
=
(
m
=
function
(
t
,
e
){
return
(
m
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
t
,
e
)},
function
(
t
,
e
){
function
n
(){
this
.
constructor
=
t
}
m
(
t
,
e
),
t
.
prototype
=
null
===
e
?
Object
.
create
(
e
):(
n
.
prototype
=
e
.
prototype
,
new
n
)}),
S
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
A
.
a
,
o
.
bindEvent
(),
o
}
return
z
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
H
=
function
(){
return
function
(){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-menu__br
"
}}(),
N
=
n
(
3
),
C
=
n
.
n
(
N
),
B
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
F
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
C
.
a
,
o
.
bindEvent
(),
o
}
return
B
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
D
=
n
(
4
),
I
=
n
.
n
(
D
),
R
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
q
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
I
.
a
,
o
.
bindEvent
(),
o
}
return
R
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
U
=
function
(){
return
function
(){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-menu__divider
"
}}(),
V
=
n
(
5
),
W
=
n
.
n
(
V
),
J
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
K
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
W
.
a
;
var
i
=
document
.
createElement
(
"
div
"
);
i
.
className
=
"
vditor-panel
"
;
var
r
=
""
;
Object
.
keys
(
e
.
options
.
hint
.
emoji
).
forEach
(
function
(
t
){
var
n
=
e
.
options
.
hint
.
emoji
[
t
];
n
.
indexOf
(
"
.
"
)
>-
1
?
r
+=
'
<span data-value=":
'
+
t
+
'
: " title=":
'
+
t
+
'
:"><img data-value=":
'
+
t
+
'
: "
\n
src="
'
+
n
+
'
"/></span>
'
:
r
+=
'
<span data-value="
'
+
n
+
'
" title="
'
+
t
+
'
">
'
+
n
+
"
</span>
"
});
var
s
=
e
.
options
.
hint
.
emojiTail
?
'
<div class="vditor-emojis__tail">
'
+
e
.
options
.
hint
.
emojiTail
+
"
</div>
"
:
""
;
return
i
.
innerHTML
=
'
<div class="vditor-emojis">
'
+
r
+
"
</div>
"
+
s
,
o
.
element
.
appendChild
(
i
),
o
.
_bindEvent
(
i
,
e
),
o
}
return
J
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
"
block
"
===
t
.
style
.
display
?
t
.
style
.
display
=
"
none
"
:(
t
.
style
.
display
=
"
block
"
,
e
.
toolbar
.
elements
.
headings
&&
(
e
.
toolbar
.
elements
.
headings
.
children
[
1
].
style
.
display
=
"
none
"
))}),
t
.
querySelectorAll
(
"
.vditor-emojis span
"
).
forEach
(
function
(
n
){
n
.
addEventListener
(
"
click
"
,
function
(
n
){
_
(
e
.
editor
.
element
,
n
.
target
.
getAttribute
(
"
data-value
"
),
""
,
!
0
),
t
.
style
.
display
=
"
none
"
})})},
e
}(
j
),
X
=
n
(
6
),
$
=
n
.
n
(
X
),
Y
=
n
(
0
),
G
=
n
.
n
(
Y
),
Q
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Z
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
G
.
a
,
o
.
_bindEvent
(
e
,
n
),
o
}
return
Q
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
var
n
=
document
.
getElementById
(
t
.
id
);
n
.
className
.
indexOf
(
"
vditor--fullscreen
"
)
>-
1
?(
this
.
innerHTML
=
e
.
icon
||
G
.
a
,
n
.
className
=
n
.
className
.
replace
(
"
vditor--fullscreen
"
,
""
),
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
var
n
=
t
.
toolbar
.
elements
[
e
].
firstChild
;
n
&&
(
n
.
className
=
n
.
className
.
replace
(
"
__s
"
,
"
__n
"
))})):(
this
.
innerHTML
=
e
.
icon
||
$
.
a
,
n
.
className
=
n
.
className
+
"
vditor--fullscreen
"
,
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
var
n
=
t
.
toolbar
.
elements
[
e
].
firstChild
;
n
&&
(
n
.
className
=
n
.
className
.
replace
(
"
__n
"
,
"
__s
"
))}))})},
e
}(
j
),
tt
=
n
(
7
),
et
=
n
.
n
(
tt
),
nt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ot
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
et
.
a
;
var
i
=
document
.
createElement
(
"
div
"
);
return
i
.
className
=
"
vditor-panel
"
,
i
.
innerHTML
=
'
<h1 data-value="# ">Heading 1</h1>
\n
<h2 data-value="## ">Heading 2</h2>
\n
<h3 data-value="### ">Heading 3</h3>
\n
<h4 data-value="#### ">Heading 4</h4>
\n
<h5 data-value="##### ">Heading 5</h5>
\n
<h6 data-value="###### ">Heading 6</h6>
'
,
o
.
element
.
appendChild
(
i
),
o
.
_bindEvent
(
i
,
e
),
o
}
return
nt
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
"
block
"
===
t
.
style
.
display
?
t
.
style
.
display
=
"
none
"
:(
t
.
style
.
display
=
"
block
"
,
e
.
toolbar
.
elements
.
emoji
&&
(
e
.
toolbar
.
elements
.
emoji
.
children
[
1
].
style
.
display
=
"
none
"
))});
for
(
var
n
=
0
;
n
<
6
;
n
++
)
t
.
children
.
item
(
n
).
addEventListener
(
"
click
"
,
function
(
n
){
_
(
e
.
editor
.
element
,
n
.
target
.
getAttribute
(
"
data-value
"
),
""
),
t
.
style
.
display
=
"
none
"
})},
e
}(
j
),
it
=
n
(
8
),
rt
=
n
.
n
(
it
),
st
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
lt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
rt
.
a
,
o
.
bindEvent
(),
o
}
return
st
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
window
.
open
(
"
https://hacpai.com/guide/markdown
"
)})},
e
}(
j
),
at
=
n
(
9
),
ct
=
n
.
n
(
at
),
pt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ut
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ct
.
a
,
o
.
bindEvent
(),
o
}
return
pt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
window
.
open
(
"
https://github.com/b3log/vditor
"
)})},
e
}(
j
),
dt
=
n
(
10
),
ht
=
n
.
n
(
dt
),
ft
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
vt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ht
.
a
,
o
.
bindEvent
(),
o
}
return
ft
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
mt
=
n
(
11
),
gt
=
n
.
n
(
mt
),
yt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
wt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
gt
.
a
,
o
.
bindEvent
(),
o
}
return
yt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
bt
=
n
(
12
),
_t
=
n
.
n
(
bt
),
Et
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
xt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
_t
.
a
,
o
.
bindEvent
(),
o
}
return
Et
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Ot
=
n
(
13
),
Mt
=
n
.
n
(
Ot
),
kt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Lt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Mt
.
a
,
o
.
bindEvent
(),
o
}
return
kt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Tt
=
n
(
14
),
Pt
=
n
.
n
(
Tt
),
At
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
jt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Pt
.
a
,
o
.
bindEvent
(),
o
}
return
At
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
zt
=
n
(
15
),
St
=
n
.
n
(
zt
),
Ht
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Nt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
St
.
a
,
o
.
bindEvent
(),
o
}
return
Ht
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Ct
=
n
(
16
),
Bt
=
n
.
n
(
Ct
),
Ft
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Dt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Bt
.
a
,
e
.
options
.
preview
.
show
&&
(
o
.
element
.
children
[
0
].
className
=
"
vditor-tooltipped vditor-tooltipped__
"
+
n
.
tipPosition
+
"
vditor-menu--current
"
),
o
.
_bindEvent
(
e
,
n
),
o
}
return
Ft
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
var
n
,
o
=
document
.
getElementById
(
t
.
id
);
"
block
"
===
t
.
preview
.
element
.
style
.
display
?(
t
.
preview
.
element
.
style
.
display
=
"
none
"
,
n
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
):(
t
.
preview
.
element
.
style
.
display
=
"
block
"
,
n
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
+
"
vditor-menu--current
"
,
t
.
preview
.
render
(
t
)),
o
.
className
.
indexOf
(
"
vditor--fullscreen
"
)
>-
1
&&
(
n
=
n
.
replace
(
"
__n
"
,
"
__s
"
)),
this
.
className
=
n
})},
e
}(
j
),
It
=
n
(
17
),
Rt
=
n
.
n
(
It
),
qt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Ut
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Rt
.
a
,
o
.
bindEvent
(),
o
}
return
qt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Vt
=
n
(
18
),
Wt
=
n
.
n
(
Vt
),
Jt
=
function
(){
function
t
(
t
){
var
e
;
if
(
this
.
SAMPLE_RATE
=
5
e3
,
this
.
isRecording
=!
1
,
this
.
readyFlag
=!
1
,
this
.
leftChannel
=
[],
this
.
rightChannel
=
[],
this
.
recordingLength
=
0
,
"
undefined
"
!=
typeof
AudioContext
)
e
=
new
AudioContext
;
else
{
if
(
!
webkitAudioContext
)
return
;
e
=
new
webkitAudioContext
}
this
.
DEFAULT_SAMPLE_RATE
=
e
.
sampleRate
;
var
n
=
e
.
createGain
();
e
.
createMediaStreamSource
(
t
).
connect
(
n
),
this
.
recorder
=
e
.
createScriptProcessor
(
2048
,
2
,
1
),
this
.
recorder
.
onaudioprocess
=
null
,
n
.
connect
(
this
.
recorder
),
this
.
recorder
.
connect
(
e
.
destination
),
this
.
readyFlag
=!
0
}
return
t
.
prototype
.
cloneChannelData
=
function
(
t
,
e
){
this
.
leftChannel
.
push
(
new
Float32Array
(
t
)),
this
.
rightChannel
.
push
(
new
Float32Array
(
e
)),
this
.
recordingLength
+=
2048
},
t
.
prototype
.
startRecordingNewWavFile
=
function
(){
this
.
readyFlag
&&
(
this
.
isRecording
=!
0
,
this
.
leftChannel
.
length
=
this
.
rightChannel
.
length
=
0
,
this
.
recordingLength
=
0
)},
t
.
prototype
.
stopRecording
=
function
(){
this
.
isRecording
=!
1
},
t
.
prototype
.
buildWavFileBlob
=
function
(){
for
(
var
t
=
this
.
mergeBuffers
(
this
.
leftChannel
),
e
=
this
.
mergeBuffers
(
this
.
rightChannel
),
n
=
new
Float32Array
(
t
.
length
),
o
=
0
;
o
<
t
.
length
;
++
o
)
n
[
o
]
=
.
5
*
(
t
[
o
]
+
e
[
o
]);
this
.
DEFAULT_SAMPLE_RATE
>
this
.
SAMPLE_RATE
&&
(
n
=
this
.
downSampleBuffer
(
n
,
this
.
SAMPLE_RATE
));
var
i
=
44
+
2
*
n
.
length
,
r
=
new
ArrayBuffer
(
i
),
s
=
new
DataView
(
r
);
this
.
writeUTFBytes
(
s
,
0
,
"
RIFF
"
),
s
.
setUint32
(
4
,
i
,
!
0
),
this
.
writeUTFBytes
(
s
,
8
,
"
WAVE
"
),
this
.
writeUTFBytes
(
s
,
12
,
"
fmt
"
),
s
.
setUint32
(
16
,
16
,
!
0
),
s
.
setUint16
(
20
,
1
,
!
0
),
s
.
setUint16
(
22
,
1
,
!
0
),
s
.
setUint32
(
24
,
this
.
SAMPLE_RATE
,
!
0
),
s
.
setUint32
(
28
,
2
*
this
.
SAMPLE_RATE
,
!
0
),
s
.
setUint16
(
32
,
2
,
!
0
),
s
.
setUint16
(
34
,
16
,
!
0
);
var
l
=
2
*
n
.
length
;
this
.
writeUTFBytes
(
s
,
36
,
"
data
"
),
s
.
setUint32
(
40
,
l
,
!
0
);
for
(
var
a
=
n
.
length
,
c
=
44
,
p
=
0
;
p
<
a
;
p
++
)
s
.
setInt16
(
c
,
32767
*
n
[
p
],
!
0
),
c
+=
2
;
return
new
Blob
([
s
],{
type
:
"
audio/wav
"
})},
t
.
prototype
.
downSampleBuffer
=
function
(
t
,
e
){
if
(
e
===
this
.
DEFAULT_SAMPLE_RATE
)
return
t
;
if
(
e
>
this
.
DEFAULT_SAMPLE_RATE
)
return
t
;
for
(
var
n
=
this
.
DEFAULT_SAMPLE_RATE
/
e
,
o
=
Math
.
round
(
t
.
length
/
n
),
i
=
new
Float32Array
(
o
),
r
=
0
,
s
=
0
;
r
<
i
.
length
;){
for
(
var
l
=
Math
.
round
((
r
+
1
)
*
n
),
a
=
0
,
c
=
0
,
p
=
s
;
p
<
l
&&
p
<
t
.
length
;
p
++
)
a
+=
t
[
p
],
c
++
;
i
[
r
]
=
a
/
c
,
r
++
,
s
=
l
}
return
i
},
t
.
prototype
.
mergeBuffers
=
function
(
t
){
for
(
var
e
=
new
Float32Array
(
this
.
recordingLength
),
n
=
0
,
o
=
t
.
length
,
i
=
0
;
i
<
o
;
++
i
){
var
r
=
t
[
i
];
e
.
set
(
r
,
n
),
n
+=
r
.
length
}
return
e
},
t
.
prototype
.
writeUTFBytes
=
function
(
t
,
e
,
n
){
for
(
var
o
=
n
.
length
,
i
=
0
;
i
<
o
;
i
++
)
t
.
setUint8
(
e
+
i
,
n
.
charCodeAt
(
i
))},
t
}(),
Kt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Xt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Wt
.
a
,
o
.
_bindEvent
(
e
),
o
}
return
Kt
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
){
var
e
;
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
if
(
e
)
if
(
e
.
isRecording
){
e
.
stopRecording
(),
t
.
upload
.
element
.
className
=
"
vditor-upload
"
;
var
n
=
new
File
([
e
.
buildWavFileBlob
()],
"
record
"
+
(
new
Date
).
getTime
()
+
"
.wav
"
,{
type
:
"
video/webm
"
});
w
(
t
,[
n
])}
else
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
g
[
t
.
options
.
lang
].
recording
,
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
),
e
.
startRecordingNewWavFile
();
else
navigator
.
mediaDevices
.
getUserMedia
({
audio
:
!
0
}).
then
(
function
(
n
){(
e
=
new
Jt
(
n
)).
recorder
.
onaudioprocess
=
function
(
t
){
if
(
e
.
isRecording
){
var
n
=
t
.
inputBuffer
.
getChannelData
(
0
),
o
=
t
.
inputBuffer
.
getChannelData
(
1
);
e
.
cloneChannelData
(
n
,
o
)}},
e
.
startRecordingNewWavFile
(),
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
g
[
t
.
options
.
lang
].
recording
,
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
)}).
catch
(
function
(
t
){
console
.
error
(
"
init media error:
"
,
t
)})})},
e
}(
j
),
$t
=
n
(
19
),
Yt
=
n
.
n
(
$t
),
Gt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Qt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Yt
.
a
,
o
.
bindEvent
(),
o
}
return
Gt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
document
.
execCommand
(
"
redo
"
)})},
e
}(
j
),
Zt
=
n
(
20
),
te
=
n
.
n
(
Zt
),
ee
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ne
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
te
.
a
,
o
.
bindEvent
(),
o
}
return
ee
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
oe
=
n
(
21
),
ie
=
n
.
n
(
oe
),
re
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
se
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ie
.
a
,
o
.
bindEvent
(),
o
}
return
re
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
le
=
n
(
22
),
ae
=
n
.
n
(
le
),
ce
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
pe
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ae
.
a
,
o
.
bindEvent
(),
o
}
return
ce
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
document
.
execCommand
(
"
undo
"
)})},
e
}(
j
),
ue
=
n
(
23
),
de
=
n
.
n
(
ue
),
he
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
fe
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
"
<label>
"
+
(
n
.
icon
||
de
.
a
)
+
'
<input multiple="multiple" type="file"></label>
'
,
o
.
_bindEvent
(
e
),
o
}
return
he
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
){
this
.
element
.
querySelector
(
"
input
"
).
addEventListener
(
"
change
"
,
function
(
e
){
0
!==
e
.
target
.
files
.
length
&&
w
(
t
,
e
.
target
.
files
,
e
.
target
)})},
e
}(
j
),
ve
=
function
(){
return
function
(
t
){
var
e
=
this
,
n
=
t
.
options
;
this
.
elements
=
{},
n
.
toolbar
.
forEach
(
function
(
n
,
o
){
var
i
;
switch
(
n
.
name
){
case
"
emoji
"
:
i
=
new
K
(
t
,
n
);
break
;
case
"
bold
"
:
i
=
new
S
(
t
,
n
);
break
;
case
"
headings
"
:
i
=
new
ot
(
t
,
n
);
break
;
case
"
|
"
:
i
=
new
U
;
break
;
case
"
br
"
:
i
=
new
H
;
break
;
case
"
italic
"
:
i
=
new
wt
(
t
,
n
);
break
;
case
"
strike
"
:
i
=
new
ne
(
t
,
n
);
break
;
case
"
line
"
:
i
=
new
xt
(
t
,
n
);
break
;
case
"
quote
"
:
i
=
new
Ut
(
t
,
n
);
break
;
case
"
list
"
:
i
=
new
jt
(
t
,
n
);
break
;
case
"
ordered-list
"
:
i
=
new
Nt
(
t
,
n
);
break
;
case
"
check
"
:
i
=
new
F
(
t
,
n
);
break
;
case
"
undo
"
:
i
=
new
pe
(
t
,
n
);
break
;
case
"
redo
"
:
i
=
new
Qt
(
t
,
n
);
break
;
case
"
code
"
:
i
=
new
q
(
t
,
n
);
break
;
case
"
inline-code
"
:
i
=
new
vt
(
t
,
n
);
break
;
case
"
link
"
:
i
=
new
Lt
(
t
,
n
);
break
;
case
"
help
"
:
i
=
new
lt
(
t
,
n
);
break
;
case
"
table
"
:
i
=
new
se
(
t
,
n
);
break
;
case
"
preview
"
:
i
=
new
Dt
(
t
,
n
);
break
;
case
"
fullscreen
"
:
i
=
new
Z
(
t
,
n
);
break
;
case
"
upload
"
:
i
=
new
fe
(
t
,
n
);
break
;
case
"
record
"
:
i
=
new
Xt
(
t
,
n
);
break
;
case
"
info
"
:
i
=
new
ut
(
t
,
n
);
break
;
default
:
console
.
error
(
"
menu item no matched
"
)}
var
r
=
n
.
name
;
"
br
"
!==
r
&&
"
|
"
!==
r
||
(
r
+=
o
),
e
.
elements
[
r
]
=
i
.
element
})}}(),
me
=
function
(){
return
function
(
t
){
var
e
=
document
.
getElementById
(
t
.
id
);
e
.
className
=
"
vditor
"
+
(
e
.
className
?
"
"
+
e
.
className
:
""
),
"
number
"
==
typeof
t
.
options
.
height
&&
(
e
.
style
.
height
=
t
.
options
.
height
+
"
px
"
),
"
number
"
==
typeof
t
.
options
.
width
?
e
.
style
.
width
=
t
.
options
.
width
+
"
px
"
:
e
.
style
.
width
=
t
.
options
.
width
;
var
n
=
document
.
createElement
(
"
div
"
);
n
.
className
=
"
vditor-toolbar
"
,
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
n
.
appendChild
(
t
.
toolbar
.
elements
[
e
])}),
e
.
appendChild
(
n
),
t
.
options
.
resize
.
enable
&&
"
top
"
===
t
.
options
.
resize
.
position
&&
e
.
appendChild
(
t
.
resize
.
element
);
var
o
=
document
.
createElement
(
"
div
"
);
o
.
className
=
"
vditor-content
"
,
o
.
appendChild
(
t
.
editor
.
element
),
t
.
preview
&&
o
.
appendChild
(
t
.
preview
.
element
),
t
.
options
.
counter
>
0
&&
o
.
appendChild
(
t
.
counter
.
element
),
t
.
upload
&&
o
.
appendChild
(
t
.
upload
.
element
),
e
.
appendChild
(
o
),
t
.
options
.
resize
.
enable
&&
"
bottom
"
===
t
.
options
.
resize
.
position
&&
e
.
appendChild
(
t
.
resize
.
element
),
document
.
onclick
=
function
(
t
){
var
e
=
t
.
target
.
closest
(
"
.vditor-tooltipped
"
);
e
&&
e
.
nextSibling
&&
"
vditor-panel
"
===
e
.
nextSibling
.
className
||
(
document
.
querySelectorAll
(
"
.vditor-hint
"
).
forEach
(
function
(
t
){
t
.
style
.
display
=
"
none
"
}),
document
.
querySelectorAll
(
"
.vditor-panel
"
).
forEach
(
function
(
t
){
t
.
style
.
display
=
"
none
"
}))}}}(),
ge
=
function
(){
function
t
(
t
){
this
.
defaultOptions
=
{
cache
:
!
0
,
classes
:{
preview
:
""
},
counter
:
0
,
height
:
"
auto
"
,
hint
:{
delay
:
200
,
emoji
:{
"
+1
"
:
"
👍
"
,
"
-1
"
:
"
👎
"
,
cold_sweat
:
"
😰
"
,
heart
:
"
❤️
"
},
emojiPath
:
"
https://vditor.b3log.org/images
"
},
lang
:
"
zh_CN
"
,
placeholder
:
""
,
preview
:{
delay
:
1
e3
,
show
:
!
1
},
resize
:{
enable
:
!
1
,
position
:
"
bottom
"
},
toolbar
:[{
hotkey
:
"
⌘-e
"
,
name
:
"
emoji
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-h
"
,
name
:
"
headings
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-b
"
,
name
:
"
bold
"
,
prefix
:
"
**
"
,
suffix
:
"
**
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-i
"
,
name
:
"
italic
"
,
prefix
:
"
*
"
,
suffix
:
"
*
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-s
"
,
name
:
"
strike
"
,
prefix
:
"
~~
"
,
suffix
:
"
~~
"
,
tipPosition
:
"
ne
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-d
"
,
name
:
"
line
"
,
prefix
:
"
---
\n
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-.
"
,
name
:
"
quote
"
,
prefix
:
"
>
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-l
"
,
name
:
"
list
"
,
prefix
:
"
*
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-o
"
,
name
:
"
ordered-list
"
,
prefix
:
"
1.
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-j
"
,
name
:
"
check
"
,
prefix
:
"
* [ ]
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-u
"
,
name
:
"
code
"
,
prefix
:
"
```
\n
"
,
suffix
:
"
\n
```
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-g
"
,
name
:
"
inline-code
"
,
prefix
:
"
`
"
,
suffix
:
"
`
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-z
"
,
name
:
"
undo
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-y
"
,
name
:
"
redo
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
name
:
"
upload
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-k
"
,
name
:
"
link
"
,
prefix
:
"
[
"
,
suffix
:
"
](https://)
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-m
"
,
name
:
"
table
"
,
prefix
:
"
| col1
"
,
suffix
:
"
| col2 | col3 |
\n
| --- | --- | --- |
\n
| | | |
\n
| | | |
"
,
tipPosition
:
"
n
"
},{
name
:
"
record
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-p
"
,
name
:
"
preview
"
,
tipPosition
:
"
nw
"
},{
hotkey
:
"
⌘-f
"
,
name
:
"
fullscreen
"
,
tipPosition
:
"
nw
"
},{
name
:
"
info
"
,
tipPosition
:
"
nw
"
},{
name
:
"
help
"
,
tipPosition
:
"
nw
"
},{
name
:
"
br
"
}],
upload
:{
filename
:
function
(
t
){
return
t
.
replace
(
/
\W
/g
,
""
)},
linkToImgUrl
:
""
,
max
:
10485760
,
url
:
""
},
width
:
"
auto
"
},
this
.
options
=
t
}
return
t
.
prototype
.
merge
=
function
(){
var
t
=
this
,
e
=
[];
this
.
options
&&
(
this
.
options
.
toolbar
&&
this
.
options
.
toolbar
.
forEach
(
function
(
n
){
var
o
;
t
.
defaultOptions
.
toolbar
.
forEach
(
function
(
t
){
"
string
"
==
typeof
n
&&
t
.
name
===
n
&&
(
o
=
t
),
"
object
"
==
typeof
n
&&
t
.
name
===
n
.
name
&&
(
o
=
Object
.
assign
({},
t
,
n
))}),
e
.
push
(
o
)}),
this
.
options
.
upload
&&
(
this
.
options
.
upload
=
Object
.
assign
({},
this
.
defaultOptions
.
upload
,
this
.
options
.
upload
)),
this
.
options
.
classes
&&
(
this
.
options
.
classes
=
Object
.
assign
({},
this
.
defaultOptions
.
classes
,
this
.
options
.
classes
)),
this
.
options
.
preview
&&
(
this
.
options
.
preview
=
Object
.
assign
({},
this
.
defaultOptions
.
preview
,
this
.
options
.
preview
)),
this
.
options
.
hint
&&
(
this
.
options
.
hint
=
Object
.
assign
({},
this
.
defaultOptions
.
hint
,
this
.
options
.
hint
)),
this
.
options
.
resize
&&
(
this
.
options
.
resize
=
Object
.
assign
({},
this
.
defaultOptions
.
resize
,
this
.
options
.
resize
)));
var
n
=
Object
.
assign
({},
this
.
defaultOptions
,
this
.
options
);
return
e
.
length
>
0
&&
(
n
.
toolbar
=
e
),
n
},
t
}(),
ye
=
function
(){
function
t
(
t
,
e
){
this
.
version
=
o
;
var
n
=
new
ge
(
e
).
merge
();
if
(
this
.
vditor
=
{
id
:
t
,
mdTimeoutId
:
-
1
,
options
:
n
},
n
.
counter
>
0
){
var
r
=
new
i
(
this
.
vditor
);
this
.
vditor
.
counter
=
r
}
var
s
=
new
b
(
this
.
vditor
);
if
(
this
.
vditor
.
editor
=
s
,
n
.
resize
.
enable
){
var
l
=
new
T
(
this
.
vditor
);
this
.
vditor
.
resize
=
l
}
if
(
n
.
toolbar
){
var
a
=
new
ve
(
this
.
vditor
);
this
.
vditor
.
toolbar
=
a
}
if
(
this
.
vditor
.
toolbar
.
elements
.
preview
){
var
c
=
new
M
(
this
.
vditor
);
this
.
vditor
.
preview
=
c
}
if
(
n
.
upload
.
url
){
var
p
=
new
y
;
this
.
vditor
.
upload
=
p
}
new
me
(
this
.
vditor
);
if
(
this
.
vditor
.
options
.
hint
.
at
||
this
.
vditor
.
toolbar
.
elements
.
emoji
){
var
u
=
new
x
(
this
.
vditor
);
this
.
vditor
.
hint
=
u
}
new
O
(
this
.
vditor
)}
return
t
.
prototype
.
getValue
=
function
(){
return
this
.
vditor
.
editor
.
element
.
value
},
t
.
prototype
.
insertValue
=
function
(
t
){
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
)},
t
.
prototype
.
focus
=
function
(){
this
.
vditor
.
editor
.
element
.
focus
()},
t
.
prototype
.
blur
=
function
(){
this
.
vditor
.
editor
.
element
.
blur
()},
t
.
prototype
.
disabled
=
function
(){
this
.
vditor
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
)},
t
.
prototype
.
enable
=
function
(){
this
.
vditor
.
editor
.
element
.
removeAttribute
(
"
disabled
"
)},
t
.
prototype
.
setSelection
=
function
(
t
,
e
){
this
.
vditor
.
editor
.
element
.
selectionStart
=
t
,
this
.
vditor
.
editor
.
element
.
selectionEnd
=
e
,
this
.
vditor
.
editor
.
element
.
focus
()},
t
.
prototype
.
getSelection
=
function
(){
return
this
.
vditor
.
editor
.
element
.
value
.
substring
(
this
.
vditor
.
editor
.
element
.
selectionStart
,
this
.
vditor
.
editor
.
element
.
selectionEnd
)},
t
.
prototype
.
setValue
=
function
(
t
){
this
.
vditor
.
editor
.
element
.
selectionStart
=
0
,
this
.
vditor
.
editor
.
element
.
selectionEnd
=
this
.
vditor
.
editor
.
element
.
value
.
length
,
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
,
!
0
),
t
||
localStorage
.
removeItem
(
"
vditor
"
+
this
.
vditor
.
id
)},
t
.
prototype
.
renderPreview
=
function
(
t
){
this
.
vditor
.
preview
.
render
(
this
.
vditor
,
t
)},
t
.
prototype
.
getCursorPosition
=
function
(){
return
E
(
this
.
vditor
.
editor
.
element
)},
t
.
prototype
.
deleteValue
=
function
(){
_
(
this
.
vditor
.
editor
.
element
,
""
,
""
,
!
0
)},
t
.
prototype
.
updateValue
=
function
(
t
){
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
,
!
0
)},
t
.
prototype
.
isUploading
=
function
(){
return
this
.
vditor
.
upload
.
isUploading
},
t
.
prototype
.
clearCache
=
function
(){
localStorage
.
removeItem
(
"
vditor
"
+
this
.
vditor
.
id
)},
t
.
prototype
.
disabledCache
=
function
(){
this
.
vditor
.
options
.
cache
=!
1
},
t
.
prototype
.
enableCache
=
function
(){
this
.
vditor
.
options
.
cache
=!
0
},
t
}();
e
.
default
=
ye
}]).
default
});
\ No newline at end of file
src/main/webapp/js/lib/vditor-0.2.
0
/index.classic.css
→
src/main/webapp/js/lib/vditor-0.2.
5
/index.classic.css
View file @
c37bf256
/*!
* Vditor v0.2.
0
- A markdown editor written in TypeScript.
* Vditor v0.2.
5
- A markdown editor written in TypeScript.
*
* MIT License
*
...
...
@@ -23,4 +23,4 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
@-webkit-keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
.vditor-tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.vditor-tooltipped
:after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-align
:
center
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
}
.vditor-tooltipped
:after
,
.vditor-tooltipped
:before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
;
opacity
:
0
}
.vditor-tooltipped
:before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
}
.vditor-tooltipped--hover
:after
,
.vditor-tooltipped--hover
:before
,
.vditor-tooltipped
:active:after
,
.vditor-tooltipped
:active:before
,
.vditor-tooltipped
:focus:after
,
.vditor-tooltipped
:focus:before
,
.vditor-tooltipped
:hover:after
,
.vditor-tooltipped
:hover:before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.vditor-tooltipped__s
:after
,
.vditor-tooltipped__se
:after
,
.vditor-tooltipped__sw
:after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.vditor-tooltipped__s
:before
,
.vditor-tooltipped__se
:before
,
.vditor-tooltipped__sw
:before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__se
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__sw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__ne
:after
,
.vditor-tooltipped__nw
:after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.vditor-tooltipped__n
:before
,
.vditor-tooltipped__ne
:before
,
.vditor-tooltipped__nw
:before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__ne
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__nw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__s
:after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.vditor-tooltipped__w
:after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__w
:before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__e
:after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__e
:before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-panel
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
;
z-index
:
1
;
font-size
:
14px
;
display
:
none
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
max-width
:
200px
;
min-width
:
80px
}
.vditor-panel
h1
,
.vditor-panel
h2
,
.vditor-panel
h3
,
.vditor-panel
h4
,
.vditor-panel
h5
,
.vditor-panel
h6
{
margin
:
0
;
cursor
:
pointer
;
padding
:
3px
10px
;
border-radius
:
3px
;
line-height
:
normal
}
.vditor-panel
h1
:hover
,
.vditor-panel
h2
:hover
,
.vditor-panel
h3
:hover
,
.vditor-panel
h4
:hover
,
.vditor-panel
h5
:hover
,
.vditor-panel
h6
:hover
{
background-color
:
#4285f4
;
color
:
#fff
}
.vditor-toolbar
{
background-color
:
#f6f8fa
;
border-bottom
:
1px
solid
#d1d5da
;
padding
:
0
5px
;
border-radius
:
3px
3px
0
0
}
.vditor-toolbar
>
div
{
padding
:
10px
5px
;
float
:
left
;
line-height
:
14px
;
height
:
36px
;
box-sizing
:
border-box
}
.vditor-toolbar
svg
{
fill
:
currentColor
;
display
:
inline-block
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
14px
;
height
:
14px
}
.vditor-toolbar
.vditor-tooltipped
{
color
:
#586069
}
.vditor-toolbar
.vditor-tooltipped
:hover
{
color
:
#4285f4
}
.vditor-toolbar
label
{
overflow
:
hidden
;
position
:
relative
;
height
:
14px
;
width
:
15px
;
display
:
block
;
cursor
:
pointer
}
.vditor-toolbar
input
{
position
:
absolute
;
width
:
1px
;
opacity
:
.001
;
height
:
14px
;
overflow
:
hidden
}
.vditor-menu--current
svg
{
color
:
#4285f4
}
.vditor-menu__divider
{
width
:
10px
}
.vditor-menu__br
{
width
:
100%
;
padding
:
0
!important
;
height
:
0
!important
}
.vditor-emojis
{
display
:
inline-block
}
.vditor-emojis__tail
{
font-size
:
12px
;
text-align
:
right
;
color
:
#586069
}
.vditor-emojis__tail
a
{
text-decoration
:
none
;
color
:
#586069
}
.vditor-emojis__tail
a
:hover
{
color
:
#4285f4
}
.vditor-emojis
span
{
cursor
:
pointer
;
border-radius
:
3px
;
float
:
left
;
height
:
20px
;
width
:
20px
;
text-align
:
center
;
line-height
:
20px
;
padding
:
3px
}
.vditor-emojis
span
:hover
{
background-color
:
#4285f4
}
.vditor-emojis
img
{
height
:
20px
;
width
:
20px
;
display
:
inline-block
}
.vditor
{
display
:
flex
;
flex-direction
:
column
;
border
:
1px
solid
#d1d5da
;
border-radius
:
3px
;
box-sizing
:
border-box
}
.vditor--fullscreen
{
position
:
fixed
;
top
:
0
;
width
:
100%
!important
;
left
:
0
;
height
:
100vh
!important
;
z-index
:
90
;
background-color
:
#fff
}
.vditor-content
{
display
:
flex
;
min-height
:
60px
;
flex
:
1
;
position
:
relative
}
.vditor-textarea
{
flex
:
1
;
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fafbfc
;
outline
:
0
none
;
font-size
:
16px
;
line-height
:
22px
;
color
:
#24292e
;
border-radius
:
0
0
3px
3px
}
.vditor-textarea
[
disabled
]
{
opacity
:
.3
;
cursor
:
not-allowed
}
.vditor-preview
,
.vditor-textarea
:focus
{
background-color
:
#fff
}
.vditor-preview
{
flex
:
1
;
overflow
:
auto
;
padding
:
10px
;
box-shadow
:
inset
1px
0
#d1d5da
;
box-sizing
:
border-box
;
border-radius
:
0
0
3px
0
}
.vditor-preview
::-webkit-scrollbar
{
display
:
none
}
.vditor-counter
{
padding
:
0
3px
;
position
:
absolute
;
bottom
:
10px
;
right
:
20px
;
color
:
#24292e
;
background-color
:
hsla
(
0
,
0%
,
100%
,
.6
);
border-radius
:
3px
;
font-size
:
12px
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
.vditor-counter--error
{
color
:
#d23f31
;
background-color
:
rgba
(
210
,
63
,
49
,
.1
)}
.vditor-resize
{
padding
:
1px
0
;
border-radius
:
5px
;
cursor
:
row-resize
;
transition
:
all
.15s
ease-in-out
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
background-color
:
#f6f8fa
}
.vditor-resize
:hover
{
background-color
:
#4285f4
}
.vditor-resize
:hover
svg
{
color
:
#fff
}
.vditor-resize
svg
{
fill
:
currentColor
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
13px
;
height
:
3px
;
display
:
block
;
margin
:
0
auto
;
color
:
#586069
}
.vditor-upload
{
opacity
:
0
;
position
:
absolute
;
width
:
100%
;
height
:
5px
;
left
:
0
;
top
:
-3px
;
border-radius
:
3px
;
overflow
:
hidden
;
transition
:
all
.15s
ease-in-out
}
.vditor-upload--tip
{
height
:
20px
;
font-size
:
12px
;
line-height
:
20px
;
color
:
#fff
;
opacity
:
1
!important
}
.vditor-upload--tip
.vditor-upload__close
{
position
:
absolute
;
right
:
5px
;
top
:
0
;
cursor
:
pointer
;
display
:
block
}
.vditor-upload--tip
.vditor-upload__progress
{
padding
:
0
5px
}
.vditor-upload__close
{
display
:
none
}
.vditor-upload__progress
{
height
:
100%
;
background-color
:
rgba
(
66
,
133
,
244
,
.8
);
transition
:
all
.15s
ease-in-out
}
.vditor-hint
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
0
;
z-index
:
1
;
line-height
:
20px
;
list-style
:
none
;
color
:
#24292e
;
font-size
:
12px
;
margin
:
0
;
max-width
:
200px
;
min-width
:
80px
;
display
:
none
}
.vditor-hint
li
{
cursor
:
pointer
;
padding
:
3px
10px
;
border-bottom
:
1px
solid
#d1d5da
}
.vditor-hint
li
:last-child
{
border-bottom
:
0
}
.vditor-hint--current
,
.vditor-hint
li
:hover
{
background-color
:
#4285f4
;
color
:
#fff
}
.vditor-hint
img
{
height
:
18px
;
width
:
18px
;
float
:
left
;
margin-right
:
3px
}
\ No newline at end of file
*/
@-webkit-keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
.vditor-tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.vditor-tooltipped
:after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-align
:
center
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
}
.vditor-tooltipped
:after
,
.vditor-tooltipped
:before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
;
opacity
:
0
}
.vditor-tooltipped
:before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
}
.vditor-tooltipped--hover
:after
,
.vditor-tooltipped--hover
:before
,
.vditor-tooltipped
:active:after
,
.vditor-tooltipped
:active:before
,
.vditor-tooltipped
:focus:after
,
.vditor-tooltipped
:focus:before
,
.vditor-tooltipped
:hover:after
,
.vditor-tooltipped
:hover:before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.vditor-tooltipped__s
:after
,
.vditor-tooltipped__se
:after
,
.vditor-tooltipped__sw
:after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.vditor-tooltipped__s
:before
,
.vditor-tooltipped__se
:before
,
.vditor-tooltipped__sw
:before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__se
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__sw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__ne
:after
,
.vditor-tooltipped__nw
:after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.vditor-tooltipped__n
:before
,
.vditor-tooltipped__ne
:before
,
.vditor-tooltipped__nw
:before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__ne
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__nw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__s
:after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.vditor-tooltipped__w
:after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__w
:before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__e
:after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__e
:before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-panel
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
;
z-index
:
1
;
font-size
:
14px
;
display
:
none
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
max-width
:
200px
;
min-width
:
80px
}
.vditor-panel
h1
,
.vditor-panel
h2
,
.vditor-panel
h3
,
.vditor-panel
h4
,
.vditor-panel
h5
,
.vditor-panel
h6
{
margin
:
0
;
cursor
:
pointer
;
padding
:
3px
10px
;
border-radius
:
3px
;
line-height
:
normal
}
.vditor-panel
h1
:hover
,
.vditor-panel
h2
:hover
,
.vditor-panel
h3
:hover
,
.vditor-panel
h4
:hover
,
.vditor-panel
h5
:hover
,
.vditor-panel
h6
:hover
{
background-color
:
#4285f4
;
color
:
#fff
}
.vditor-toolbar
{
background-color
:
#f6f8fa
;
border-bottom
:
1px
solid
#d1d5da
;
padding
:
0
5px
;
border-radius
:
3px
3px
0
0
}
.vditor-toolbar
>
div
{
padding
:
10px
5px
;
float
:
left
;
line-height
:
14px
;
height
:
36px
;
box-sizing
:
border-box
}
.vditor-toolbar
svg
{
fill
:
currentColor
;
display
:
inline-block
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
14px
;
height
:
14px
}
.vditor-toolbar
.vditor-tooltipped
{
color
:
#586069
}
.vditor-toolbar
.vditor-tooltipped
:hover
{
color
:
#4285f4
}
.vditor-toolbar
label
{
overflow
:
hidden
;
position
:
relative
;
height
:
14px
;
width
:
15px
;
display
:
block
;
cursor
:
pointer
}
.vditor-toolbar
input
{
position
:
absolute
;
width
:
1px
;
opacity
:
.001
;
height
:
14px
;
overflow
:
hidden
}
.vditor-menu--current
svg
{
color
:
#4285f4
}
.vditor-menu__divider
{
width
:
10px
}
.vditor-menu__br
{
width
:
100%
;
padding
:
0
!important
;
height
:
0
!important
}
.vditor-emojis
{
display
:
inline-block
}
.vditor-emojis__tail
{
font-size
:
12px
;
text-align
:
right
;
color
:
#586069
}
.vditor-emojis__tail
a
{
text-decoration
:
none
;
color
:
#586069
}
.vditor-emojis__tail
a
:hover
{
color
:
#4285f4
}
.vditor-emojis
span
{
cursor
:
pointer
;
border-radius
:
3px
;
float
:
left
;
height
:
26px
;
width
:
26px
;
text-align
:
center
;
line-height
:
20px
;
padding
:
3px
;
box-sizing
:
border-box
;
font-size
:
16px
}
.vditor-emojis
span
:hover
{
background-color
:
#4285f4
}
.vditor-emojis
img
{
height
:
20px
;
width
:
20px
;
float
:
left
}
.vditor
{
display
:
flex
;
flex-direction
:
column
;
border
:
1px
solid
#d1d5da
;
border-radius
:
3px
;
box-sizing
:
border-box
}
.vditor--fullscreen
{
position
:
fixed
;
top
:
0
;
width
:
100%
!important
;
left
:
0
;
height
:
100vh
!important
;
z-index
:
90
;
background-color
:
#fff
}
.vditor-content
{
display
:
flex
;
min-height
:
60px
;
flex
:
1
;
position
:
relative
}
.vditor-textarea
{
flex
:
1
;
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fafbfc
;
outline
:
0
none
;
font-size
:
16px
;
line-height
:
22px
;
color
:
#24292e
;
border-radius
:
0
0
3px
3px
}
.vditor-textarea
[
disabled
]
{
opacity
:
.3
;
cursor
:
not-allowed
}
.vditor-preview
,
.vditor-textarea
:focus
{
background-color
:
#fff
}
.vditor-preview
{
flex
:
1
;
overflow
:
auto
;
padding
:
10px
;
box-shadow
:
inset
1px
0
#d1d5da
;
box-sizing
:
border-box
;
border-radius
:
0
0
3px
0
}
.vditor-preview
::-webkit-scrollbar
{
display
:
none
}
.vditor-counter
{
padding
:
0
3px
;
position
:
absolute
;
bottom
:
10px
;
right
:
20px
;
color
:
#24292e
;
background-color
:
hsla
(
0
,
0%
,
100%
,
.6
);
border-radius
:
3px
;
font-size
:
12px
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
.vditor-counter--error
{
color
:
#d23f31
;
background-color
:
rgba
(
210
,
63
,
49
,
.1
)}
.vditor-resize
{
padding
:
1px
0
;
border-radius
:
5px
;
cursor
:
row-resize
;
transition
:
all
.15s
ease-in-out
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
background-color
:
#f6f8fa
}
.vditor-resize
:hover
{
background-color
:
#4285f4
}
.vditor-resize
:hover
svg
{
color
:
#fff
}
.vditor-resize
svg
{
fill
:
currentColor
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
13px
;
height
:
3px
;
display
:
block
;
margin
:
0
auto
;
color
:
#586069
}
.vditor-upload
{
opacity
:
0
;
position
:
absolute
;
width
:
100%
;
height
:
5px
;
left
:
0
;
top
:
-3px
;
border-radius
:
3px
;
overflow
:
hidden
;
transition
:
all
.15s
ease-in-out
}
.vditor-upload--tip
{
height
:
20px
;
font-size
:
12px
;
line-height
:
20px
;
color
:
#fff
;
opacity
:
1
!important
}
.vditor-upload--tip
.vditor-upload__close
{
position
:
absolute
;
right
:
5px
;
top
:
0
;
cursor
:
pointer
;
display
:
block
}
.vditor-upload--tip
.vditor-upload__progress
{
padding
:
0
5px
}
.vditor-upload__close
{
display
:
none
}
.vditor-upload__progress
{
height
:
100%
;
background-color
:
rgba
(
66
,
133
,
244
,
.8
);
transition
:
all
.15s
ease-in-out
}
.vditor-hint
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
0
;
z-index
:
1
;
line-height
:
20px
;
list-style
:
none
;
color
:
#24292e
;
font-size
:
12px
;
margin
:
0
;
max-width
:
200px
;
min-width
:
80px
;
display
:
none
}
.vditor-hint
li
{
cursor
:
pointer
;
padding
:
3px
10px
;
border-bottom
:
1px
solid
#d1d5da
;
line-height
:
20px
}
.vditor-hint
li
:last-child
{
border-bottom
:
0
}
.vditor-hint--current
,
.vditor-hint
li
:hover
{
background-color
:
#4285f4
;
color
:
#fff
}
.vditor-hint__emoji
{
font-size
:
16px
;
float
:
left
;
margin-right
:
3px
}
.vditor-hint
img
{
height
:
20px
;
width
:
20px
;
float
:
left
;
margin-right
:
3px
}
\ No newline at end of file
src/main/webapp/js/lib/vditor-0.2.
0
/index.dark.css
→
src/main/webapp/js/lib/vditor-0.2.
5
/index.dark.css
View file @
c37bf256
/*!
* Vditor v0.2.
0
- A markdown editor written in TypeScript.
* Vditor v0.2.
5
- A markdown editor written in TypeScript.
*
* MIT License
*
...
...
@@ -23,4 +23,4 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
@-webkit-keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
.vditor-tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.vditor-tooltipped
:after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-align
:
center
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
}
.vditor-tooltipped
:after
,
.vditor-tooltipped
:before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
;
opacity
:
0
}
.vditor-tooltipped
:before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
}
.vditor-tooltipped--hover
:after
,
.vditor-tooltipped--hover
:before
,
.vditor-tooltipped
:active:after
,
.vditor-tooltipped
:active:before
,
.vditor-tooltipped
:focus:after
,
.vditor-tooltipped
:focus:before
,
.vditor-tooltipped
:hover:after
,
.vditor-tooltipped
:hover:before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.vditor-tooltipped__s
:after
,
.vditor-tooltipped__se
:after
,
.vditor-tooltipped__sw
:after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.vditor-tooltipped__s
:before
,
.vditor-tooltipped__se
:before
,
.vditor-tooltipped__sw
:before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__se
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__sw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__ne
:after
,
.vditor-tooltipped__nw
:after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.vditor-tooltipped__n
:before
,
.vditor-tooltipped__ne
:before
,
.vditor-tooltipped__nw
:before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__ne
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__nw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__s
:after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.vditor-tooltipped__w
:after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__w
:before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__e
:after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__e
:before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-panel
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
;
z-index
:
1
;
font-size
:
14px
;
display
:
none
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
max-width
:
200px
;
min-width
:
80px
}
.vditor-panel
h1
,
.vditor-panel
h2
,
.vditor-panel
h3
,
.vditor-panel
h4
,
.vditor-panel
h5
,
.vditor-panel
h6
{
margin
:
0
;
cursor
:
pointer
;
padding
:
3px
10px
;
border-radius
:
3px
;
line-height
:
normal
}
.vditor-panel
h1
:hover
,
.vditor-panel
h2
:hover
,
.vditor-panel
h3
:hover
,
.vditor-panel
h4
:hover
,
.vditor-panel
h5
:hover
,
.vditor-panel
h6
:hover
{
background-color
:
#2c2c2c
;
color
:
#fff
}
.vditor-toolbar
{
background-color
:
#2c2c2c
;
border-bottom
:
1px
solid
#fff
;
padding
:
0
5px
;
border-radius
:
3px
3px
0
0
}
.vditor-toolbar
>
div
{
padding
:
10px
5px
;
float
:
left
;
line-height
:
14px
;
height
:
36px
;
box-sizing
:
border-box
}
.vditor-toolbar
svg
{
fill
:
currentColor
;
display
:
inline-block
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
14px
;
height
:
14px
}
.vditor-toolbar
.vditor-tooltipped
{
color
:
#b9b9b9
}
.vditor-toolbar
.vditor-tooltipped
:hover
{
color
:
#fff
}
.vditor-toolbar
label
{
overflow
:
hidden
;
position
:
relative
;
height
:
14px
;
width
:
15px
;
display
:
block
;
cursor
:
pointer
}
.vditor-toolbar
input
{
position
:
absolute
;
width
:
1px
;
opacity
:
.001
;
height
:
14px
;
overflow
:
hidden
}
.vditor-menu--current
svg
{
color
:
#fff
}
.vditor-menu__divider
{
width
:
10px
}
.vditor-menu__br
{
width
:
100%
;
padding
:
0
!important
;
height
:
0
!important
}
.vditor-emojis
{
display
:
inline-block
}
.vditor-emojis__tail
{
font-size
:
12px
;
text-align
:
right
;
color
:
#b9b9b9
}
.vditor-emojis__tail
a
{
text-decoration
:
none
;
color
:
#b9b9b9
}
.vditor-emojis__tail
a
:hover
{
color
:
#2c2c2c
}
.vditor-emojis
span
{
cursor
:
pointer
;
border-radius
:
3px
;
float
:
left
;
height
:
20px
;
width
:
20px
;
text-align
:
center
;
line-height
:
20px
;
padding
:
3px
}
.vditor-emojis
span
:hover
{
background-color
:
#2c2c2c
}
.vditor-emojis
img
{
height
:
20px
;
width
:
20px
;
display
:
inline-block
}
.vditor
{
display
:
flex
;
flex-direction
:
column
;
border
:
1px
solid
#fff
;
border-radius
:
3px
;
box-sizing
:
border-box
}
.vditor--fullscreen
{
position
:
fixed
;
top
:
0
;
width
:
100%
!important
;
left
:
0
;
height
:
100vh
!important
;
z-index
:
90
;
background-color
:
#fff
}
.vditor-content
{
display
:
flex
;
min-height
:
60px
;
flex
:
1
;
position
:
relative
}
.vditor-textarea
{
flex
:
1
;
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fff
;
outline
:
0
none
;
font-size
:
16px
;
line-height
:
22px
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
0
0
3px
3px
}
.vditor-textarea
[
disabled
]
{
opacity
:
.3
;
cursor
:
not-allowed
}
.vditor-textarea
:focus
{
background-color
:
#fff
}
.vditor-preview
{
flex
:
1
;
background-color
:
#f3f3f3
;
overflow
:
auto
;
padding
:
10px
;
box-shadow
:
inset
1px
0
#fff
;
box-sizing
:
border-box
;
border-radius
:
0
0
3px
0
}
.vditor-preview
::-webkit-scrollbar
{
display
:
none
}
.vditor-counter
{
padding
:
0
3px
;
position
:
absolute
;
bottom
:
10px
;
right
:
20px
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
background-color
:
hsla
(
0
,
0%
,
100%
,
.6
);
border-radius
:
3px
;
font-size
:
12px
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
.vditor-counter--error
{
color
:
#d23f31
;
background-color
:
rgba
(
210
,
63
,
49
,
.1
)}
.vditor-resize
{
padding
:
1px
0
;
border-radius
:
5px
;
cursor
:
row-resize
;
transition
:
all
.15s
ease-in-out
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
background-color
:
#f3f3f3
}
.vditor-resize
:hover
{
background-color
:
#2c2c2c
}
.vditor-resize
:hover
svg
{
color
:
#fff
}
.vditor-resize
svg
{
fill
:
currentColor
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
13px
;
height
:
3px
;
display
:
block
;
margin
:
0
auto
;
color
:
#b9b9b9
}
.vditor-upload
{
opacity
:
0
;
position
:
absolute
;
width
:
100%
;
height
:
5px
;
left
:
0
;
top
:
-3px
;
border-radius
:
3px
;
overflow
:
hidden
;
transition
:
all
.15s
ease-in-out
}
.vditor-upload--tip
{
height
:
20px
;
font-size
:
12px
;
line-height
:
20px
;
color
:
#fff
;
opacity
:
1
!important
}
.vditor-upload--tip
.vditor-upload__close
{
position
:
absolute
;
right
:
5px
;
top
:
0
;
cursor
:
pointer
;
display
:
block
}
.vditor-upload--tip
.vditor-upload__progress
{
padding
:
0
5px
}
.vditor-upload__close
{
display
:
none
}
.vditor-upload__progress
{
height
:
100%
;
background-color
:
rgba
(
44
,
44
,
44
,
.8
);
transition
:
all
.15s
ease-in-out
}
.vditor-hint
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
0
;
z-index
:
1
;
line-height
:
20px
;
list-style
:
none
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
font-size
:
12px
;
margin
:
0
;
max-width
:
200px
;
min-width
:
80px
;
display
:
none
}
.vditor-hint
li
{
cursor
:
pointer
;
padding
:
3px
10px
;
border-bottom
:
1px
solid
#fff
}
.vditor-hint
li
:last-child
{
border-bottom
:
0
}
.vditor-hint--current
,
.vditor-hint
li
:hover
{
background-color
:
#2c2c2c
;
color
:
#fff
}
.vditor-hint
img
{
height
:
18px
;
width
:
18px
;
float
:
left
;
margin-right
:
3px
}
\ No newline at end of file
*/
@-webkit-keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
@keyframes
tooltip-appear
{
0
%
{
opacity
:
0
}
to
{
opacity
:
1
}}
.vditor-tooltipped
{
position
:
relative
;
cursor
:
pointer
}
.vditor-tooltipped
:after
{
z-index
:
1000000
;
padding
:
5px
8px
;
font-size
:
11px
;
font-weight
:
400
;
-webkit-font-smoothing
:
subpixel-antialiased
;
color
:
#fff
;
text-align
:
center
;
text-decoration
:
none
;
text-shadow
:
none
;
text-transform
:
none
;
letter-spacing
:
normal
;
word-wrap
:
break-word
;
white-space
:
pre
;
content
:
attr
(
aria-label
);
background
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
3px
;
line-height
:
16px
}
.vditor-tooltipped
:after
,
.vditor-tooltipped
:before
{
position
:
absolute
;
display
:
none
;
pointer-events
:
none
;
opacity
:
0
}
.vditor-tooltipped
:before
{
z-index
:
1000001
;
width
:
0
;
height
:
0
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
content
:
""
;
border
:
5px
solid
transparent
}
.vditor-tooltipped--hover
:after
,
.vditor-tooltipped--hover
:before
,
.vditor-tooltipped
:active:after
,
.vditor-tooltipped
:active:before
,
.vditor-tooltipped
:focus:after
,
.vditor-tooltipped
:focus:before
,
.vditor-tooltipped
:hover:after
,
.vditor-tooltipped
:hover:before
{
display
:
inline-block
;
text-decoration
:
none
;
-webkit-animation-name
:
tooltip-appear
;
animation-name
:
tooltip-appear
;
-webkit-animation-duration
:
.1s
;
animation-duration
:
.1s
;
-webkit-animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
-webkit-animation-timing-function
:
ease-in
;
animation-timing-function
:
ease-in
;
-webkit-animation-delay
:
.4s
;
animation-delay
:
.4s
}
.vditor-tooltipped__s
:after
,
.vditor-tooltipped__se
:after
,
.vditor-tooltipped__sw
:after
{
top
:
100%
;
right
:
50%
;
margin-top
:
5px
}
.vditor-tooltipped__s
:before
,
.vditor-tooltipped__se
:before
,
.vditor-tooltipped__sw
:before
{
top
:
auto
;
right
:
50%
;
bottom
:
-5px
;
margin-right
:
-5px
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__se
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__sw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__ne
:after
,
.vditor-tooltipped__nw
:after
{
right
:
50%
;
bottom
:
100%
;
margin-bottom
:
5px
}
.vditor-tooltipped__n
:before
,
.vditor-tooltipped__ne
:before
,
.vditor-tooltipped__nw
:before
{
top
:
-5px
;
right
:
50%
;
bottom
:
auto
;
margin-right
:
-5px
;
border-top-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__ne
:after
{
right
:
auto
;
left
:
50%
;
margin-left
:
-15px
}
.vditor-tooltipped__nw
:after
{
margin-right
:
-15px
}
.vditor-tooltipped__n
:after
,
.vditor-tooltipped__s
:after
{
-webkit-transform
:
translateX
(
50%
);
transform
:
translateX
(
50%
)}
.vditor-tooltipped__w
:after
{
right
:
100%
;
bottom
:
50%
;
margin-right
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__w
:before
{
top
:
50%
;
bottom
:
50%
;
left
:
-5px
;
margin-top
:
-5px
;
border-left-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-tooltipped__e
:after
{
bottom
:
50%
;
left
:
100%
;
margin-left
:
5px
;
-webkit-transform
:
translateY
(
50%
);
transform
:
translateY
(
50%
)}
.vditor-tooltipped__e
:before
{
top
:
50%
;
right
:
-5px
;
bottom
:
50%
;
margin-top
:
-5px
;
border-right-color
:
rgba
(
0
,
0
,
0
,
.8
)}
.vditor-panel
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
;
z-index
:
1
;
font-size
:
14px
;
display
:
none
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
max-width
:
200px
;
min-width
:
80px
}
.vditor-panel
h1
,
.vditor-panel
h2
,
.vditor-panel
h3
,
.vditor-panel
h4
,
.vditor-panel
h5
,
.vditor-panel
h6
{
margin
:
0
;
cursor
:
pointer
;
padding
:
3px
10px
;
border-radius
:
3px
;
line-height
:
normal
}
.vditor-panel
h1
:hover
,
.vditor-panel
h2
:hover
,
.vditor-panel
h3
:hover
,
.vditor-panel
h4
:hover
,
.vditor-panel
h5
:hover
,
.vditor-panel
h6
:hover
{
background-color
:
#2c2c2c
;
color
:
#fff
}
.vditor-toolbar
{
background-color
:
#2c2c2c
;
border-bottom
:
1px
solid
#fff
;
padding
:
0
5px
;
border-radius
:
3px
3px
0
0
}
.vditor-toolbar
>
div
{
padding
:
10px
5px
;
float
:
left
;
line-height
:
14px
;
height
:
36px
;
box-sizing
:
border-box
}
.vditor-toolbar
svg
{
fill
:
currentColor
;
display
:
inline-block
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
14px
;
height
:
14px
}
.vditor-toolbar
.vditor-tooltipped
{
color
:
#b9b9b9
}
.vditor-toolbar
.vditor-tooltipped
:hover
{
color
:
#fff
}
.vditor-toolbar
label
{
overflow
:
hidden
;
position
:
relative
;
height
:
14px
;
width
:
15px
;
display
:
block
;
cursor
:
pointer
}
.vditor-toolbar
input
{
position
:
absolute
;
width
:
1px
;
opacity
:
.001
;
height
:
14px
;
overflow
:
hidden
}
.vditor-menu--current
svg
{
color
:
#fff
}
.vditor-menu__divider
{
width
:
10px
}
.vditor-menu__br
{
width
:
100%
;
padding
:
0
!important
;
height
:
0
!important
}
.vditor-emojis
{
display
:
inline-block
}
.vditor-emojis__tail
{
font-size
:
12px
;
text-align
:
right
;
color
:
#b9b9b9
}
.vditor-emojis__tail
a
{
text-decoration
:
none
;
color
:
#b9b9b9
}
.vditor-emojis__tail
a
:hover
{
color
:
#2c2c2c
}
.vditor-emojis
span
{
cursor
:
pointer
;
border-radius
:
3px
;
float
:
left
;
height
:
26px
;
width
:
26px
;
text-align
:
center
;
line-height
:
20px
;
padding
:
3px
;
box-sizing
:
border-box
;
font-size
:
16px
}
.vditor-emojis
span
:hover
{
background-color
:
#2c2c2c
}
.vditor-emojis
img
{
height
:
20px
;
width
:
20px
;
float
:
left
}
.vditor
{
display
:
flex
;
flex-direction
:
column
;
border
:
1px
solid
#fff
;
border-radius
:
3px
;
box-sizing
:
border-box
}
.vditor--fullscreen
{
position
:
fixed
;
top
:
0
;
width
:
100%
!important
;
left
:
0
;
height
:
100vh
!important
;
z-index
:
90
;
background-color
:
#fff
}
.vditor-content
{
display
:
flex
;
min-height
:
60px
;
flex
:
1
;
position
:
relative
}
.vditor-textarea
{
flex
:
1
;
border
:
0
;
resize
:
none
;
padding
:
10px
;
box-sizing
:
border-box
;
background-color
:
#fff
;
outline
:
0
none
;
font-size
:
16px
;
line-height
:
22px
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
border-radius
:
0
0
3px
3px
}
.vditor-textarea
[
disabled
]
{
opacity
:
.3
;
cursor
:
not-allowed
}
.vditor-textarea
:focus
{
background-color
:
#fff
}
.vditor-preview
{
flex
:
1
;
background-color
:
#f3f3f3
;
overflow
:
auto
;
padding
:
10px
;
box-shadow
:
inset
1px
0
#fff
;
box-sizing
:
border-box
;
border-radius
:
0
0
3px
0
}
.vditor-preview
::-webkit-scrollbar
{
display
:
none
}
.vditor-counter
{
padding
:
0
3px
;
position
:
absolute
;
bottom
:
10px
;
right
:
20px
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
background-color
:
hsla
(
0
,
0%
,
100%
,
.6
);
border-radius
:
3px
;
font-size
:
12px
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
.vditor-counter--error
{
color
:
#d23f31
;
background-color
:
rgba
(
210
,
63
,
49
,
.1
)}
.vditor-resize
{
padding
:
1px
0
;
border-radius
:
5px
;
cursor
:
row-resize
;
transition
:
all
.15s
ease-in-out
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
background-color
:
#f3f3f3
}
.vditor-resize
:hover
{
background-color
:
#2c2c2c
}
.vditor-resize
:hover
svg
{
color
:
#fff
}
.vditor-resize
svg
{
fill
:
currentColor
;
stroke-width
:
0
;
stroke
:
currentColor
;
width
:
13px
;
height
:
3px
;
display
:
block
;
margin
:
0
auto
;
color
:
#b9b9b9
}
.vditor-upload
{
opacity
:
0
;
position
:
absolute
;
width
:
100%
;
height
:
5px
;
left
:
0
;
top
:
-3px
;
border-radius
:
3px
;
overflow
:
hidden
;
transition
:
all
.15s
ease-in-out
}
.vditor-upload--tip
{
height
:
20px
;
font-size
:
12px
;
line-height
:
20px
;
color
:
#fff
;
opacity
:
1
!important
}
.vditor-upload--tip
.vditor-upload__close
{
position
:
absolute
;
right
:
5px
;
top
:
0
;
cursor
:
pointer
;
display
:
block
}
.vditor-upload--tip
.vditor-upload__progress
{
padding
:
0
5px
}
.vditor-upload__close
{
display
:
none
}
.vditor-upload__progress
{
height
:
100%
;
background-color
:
rgba
(
44
,
44
,
44
,
.8
);
transition
:
all
.15s
ease-in-out
}
.vditor-hint
{
background-color
:
#fff
;
position
:
absolute
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.2
);
border-radius
:
3px
;
padding
:
5px
0
;
z-index
:
1
;
line-height
:
20px
;
list-style
:
none
;
color
:
rgba
(
0
,
0
,
0
,
.8
);
font-size
:
12px
;
margin
:
0
;
max-width
:
200px
;
min-width
:
80px
;
display
:
none
}
.vditor-hint
li
{
cursor
:
pointer
;
padding
:
3px
10px
;
border-bottom
:
1px
solid
#fff
;
line-height
:
20px
}
.vditor-hint
li
:last-child
{
border-bottom
:
0
}
.vditor-hint--current
,
.vditor-hint
li
:hover
{
background-color
:
#2c2c2c
;
color
:
#fff
}
.vditor-hint__emoji
{
font-size
:
16px
;
float
:
left
;
margin-right
:
3px
}
.vditor-hint
img
{
height
:
20px
;
width
:
20px
;
float
:
left
;
margin-right
:
3px
}
\ No newline at end of file
src/main/webapp/js/lib/vditor-0.2.5/index.min.js
0 → 100644
View file @
c37bf256
/*!
* Vditor v0.2.5 - A markdown editor written in TypeScript.
*
* MIT License
*
* Copyright (c) 2019 B3log 开源, b3log.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
!
function
(
t
,
e
){
"
object
"
==
typeof
exports
&&
"
object
"
==
typeof
module
?
module
.
exports
=
e
():
"
function
"
==
typeof
define
&&
define
.
amd
?
define
([],
e
):
"
object
"
==
typeof
exports
?
exports
.
Vditor
=
e
():
t
.
Vditor
=
e
()}(
window
,
function
(){
return
function
(
t
){
function
e
(
e
){
for
(
var
n
,
i
,
r
=
e
[
0
],
s
=
e
[
1
],
l
=
0
,
c
=
[];
l
<
r
.
length
;
l
++
)
i
=
r
[
l
],
o
[
i
]
&&
c
.
push
(
o
[
i
][
0
]),
o
[
i
]
=
0
;
for
(
n
in
s
)
Object
.
prototype
.
hasOwnProperty
.
call
(
s
,
n
)
&&
(
t
[
n
]
=
s
[
n
]);
for
(
a
&&
a
(
e
);
c
.
length
;)
c
.
shift
()()}
var
n
=
{},
o
=
{
0
:
0
};
function
i
(
e
){
if
(
n
[
e
])
return
n
[
e
].
exports
;
var
o
=
n
[
e
]
=
{
i
:
e
,
l
:
!
1
,
exports
:{}};
return
t
[
e
].
call
(
o
.
exports
,
o
,
o
.
exports
,
i
),
o
.
l
=!
0
,
o
.
exports
}
i
.
e
=
function
(
t
){
var
e
=
[],
n
=
o
[
t
];
if
(
0
!==
n
)
if
(
n
)
e
.
push
(
n
[
2
]);
else
{
var
r
=
new
Promise
(
function
(
e
,
i
){
n
=
o
[
t
]
=
[
e
,
i
]});
e
.
push
(
n
[
2
]
=
r
);
var
s
,
l
=
document
.
createElement
(
"
script
"
);
l
.
charset
=
"
utf-8
"
,
l
.
timeout
=
120
,
i
.
nc
&&
l
.
setAttribute
(
"
nonce
"
,
i
.
nc
),
l
.
src
=
function
(
t
){
return
i
.
p
+
""
+
({
1
:
"
vditor
"
,
2
:
"
vendors~vditor
"
}[
t
]
||
t
)
+
"
.bundle.js
"
}(
t
),
s
=
function
(
e
){
l
.
onerror
=
l
.
onload
=
null
,
clearTimeout
(
a
);
var
n
=
o
[
t
];
if
(
0
!==
n
){
if
(
n
){
var
i
=
e
&&
(
"
load
"
===
e
.
type
?
"
missing
"
:
e
.
type
),
r
=
e
&&
e
.
target
&&
e
.
target
.
src
,
s
=
new
Error
(
"
Loading chunk
"
+
t
+
"
failed.
\n
(
"
+
i
+
"
:
"
+
r
+
"
)
"
);
s
.
type
=
i
,
s
.
request
=
r
,
n
[
1
](
s
)}
o
[
t
]
=
void
0
}};
var
a
=
setTimeout
(
function
(){
s
({
type
:
"
timeout
"
,
target
:
l
})},
12
e4
);
l
.
onerror
=
l
.
onload
=
s
,
document
.
head
.
appendChild
(
l
)}
return
Promise
.
all
(
e
)},
i
.
m
=
t
,
i
.
c
=
n
,
i
.
d
=
function
(
t
,
e
,
n
){
i
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
n
})},
i
.
r
=
function
(
t
){
"
undefined
"
!=
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"
Module
"
}),
Object
.
defineProperty
(
t
,
"
__esModule
"
,{
value
:
!
0
})},
i
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
i
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"
object
"
==
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
n
=
Object
.
create
(
null
);
if
(
i
.
r
(
n
),
Object
.
defineProperty
(
n
,
"
default
"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"
string
"
!=
typeof
t
)
for
(
var
o
in
t
)
i
.
d
(
n
,
o
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
o
));
return
n
},
i
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
.
default
}:
function
(){
return
t
};
return
i
.
d
(
e
,
"
a
"
,
e
),
e
},
i
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
i
.
p
=
"
https://cdn.jsdelivr.net/npm/vditor@0.2.5/dist/
"
,
i
.
oe
=
function
(
t
){
throw
console
.
error
(
t
),
t
};
var
r
=
window
.
webpackJsonpVditor
=
window
.
webpackJsonpVditor
||
[],
s
=
r
.
push
.
bind
(
r
);
r
.
push
=
e
,
r
=
r
.
slice
();
for
(
var
l
=
0
;
l
<
r
.
length
;
l
++
)
e
(
r
[
l
]);
var
a
=
s
;
return
i
(
i
.
s
=
24
)}([
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M32 0v13l-5-5-6 6-3-3 6-6-5-5zM14 21l-6 6 5 5h-13v-13l5 5 6-6z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=128 height=32 viewBox="0 0 128 32"> <path d="M0 0h128v6.4h-128zM0 12.8h128v6.4h-128zM0 25.6h128v6.4h-128z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M22.996 15.023c1.339-1.591 2.147-3.643 2.147-5.88 0-5.041-4.102-9.143-9.143-9.143h-11.429v32h13.714c5.041 0 9.143-4.102 9.143-9.143 0-3.32-1.779-6.232-4.433-7.834zM11.429 4.571h3.625c1.999 0 3.625 2.051 3.625 4.571s-1.626 4.571-3.625 4.571h-3.625v-9.143zM17.107 27.429h-5.679v-9.143h5.679c2.087 0 3.786 2.051 3.786 4.571s-1.698 4.571-3.786 4.571z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M27.094 19.485v6.12c0 3.059-2.483 5.542-5.542 5.542h-16.010c-3.059 0-5.542-2.483-5.542-5.542v-16.010c0-3.059 2.483-5.542 5.542-5.542h16.010c0.769 0 1.54 0.154 2.251 0.481 0.174 0.077 0.308 0.25 0.346 0.443 0.039 0.211-0.019 0.404-0.174 0.558l-0.943 0.943c-0.115 0.115-0.289 0.193-0.443 0.193-0.058 0-0.115-0.019-0.174-0.039-0.289-0.077-0.578-0.115-0.866-0.115h-16.010c-1.693 0-3.079 1.386-3.079 3.079v16.010c0 1.693 1.386 3.079 3.079 3.079h16.010c1.693 0 3.079-1.386 3.079-3.079v-4.888c0-0.154 0.058-0.308 0.174-0.424l1.232-1.232c0.135-0.135 0.289-0.193 0.443-0.193 0.077 0 0.154 0.019 0.231 0.058 0.231 0.096 0.385 0.308 0.385 0.558zM31.54 10.076l-15.664 15.664c-0.615 0.615-1.578 0.615-2.194 0l-8.275-8.275c-0.615-0.615-0.615-1.578 0-2.194l2.116-2.116c0.615-0.615 1.578-0.615 2.194 0l5.060 5.060 12.451-12.451c0.615-0.615 1.578-0.615 2.194 0l2.116 2.116c0.615 0.615 0.615 1.578 0 2.194z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M21.053 21.895l2.526 2.526 8.421-8.421-8.421-8.421-2.526 2.526 5.895 5.895z"></path> <path d="M10.947 10.105l-2.526-2.526-8.421 8.421 8.421 8.421 2.526-2.526-5.895-5.895z"></path> <path d="M17.613 6.487l1.828 0.499-5.052 18.527-1.828-0.499 5.052-18.527z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M16 24.789c-3.756 0-6.911-2.254-8.188-5.559h16.376c-1.277 3.305-4.432 5.559-8.188 5.559zM10.366 14.423c-1.352 0-2.404-1.052-2.404-2.404s1.052-2.404 2.404-2.404 2.404 1.052 2.404 2.404-1.052 2.404-2.404 2.404zM21.634 14.423c-1.352 0-2.404-1.052-2.404-2.404s1.052-2.404 2.404-2.404 2.404 1.052 2.404 2.404-1.052 2.404-2.404 2.404zM16 28.845c7.061 0 12.845-5.784 12.845-12.845s-5.784-12.845-12.845-12.845-12.845 5.784-12.845 12.845 5.784 12.845 12.845 12.845zM16 0c8.864 0 16 7.136 16 16s-7.136 16-16 16-16-7.136-16-16 7.136-16 16-16z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 32 32" width=32px height=32px> <path d="M14 18v13l-5-5-6 6-3-3 6-6-5-5zM32 3l-6 6 5 5h-13v-13l5 5 6-6z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M4.45 0h3.594c0.595 0 1.078 0.384 1.078 0.858v30.284c0 0.474-0.482 0.858-1.078 0.858h-3.594c-0.595 0-1.078-0.384-1.078-0.858v-30.284c-0-0.474 0.482-0.858 1.078-0.858zM23.888 0h3.673c0.59 0 1.068 0.384 1.068 0.858v30.284c0 0.474-0.478 0.858-1.068 0.858h-3.673c-0.59 0-1.068-0.384-1.068-0.858v-30.284c0-0.474 0.478-0.858 1.068-0.858z"></path> <path d="M25.069 14.167v3.667c0 0.589-0.384 1.065-0.858 1.065h-15.655c-0.474 0-0.858-0.477-0.858-1.065v-3.667c0-0.589 0.384-1.065 0.858-1.065h15.655c0.474 0 0.858 0.477 0.858 1.065z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M19.652 25v6c0 0.55-0.45 1-1 1h-6c-0.55 0-1-0.45-1-1v-6c0-0.55 0.45-1 1-1h6c0.55 0 1 0.45 1 1zM27.552 10c0 4.75-3.225 6.575-5.6 7.9-1.475 0.85-2.4 2.575-2.4 3.3v0c0 0.55-0.425 1.2-1 1.2h-6c-0.55 0-0.9-0.85-0.9-1.4v-1.125c0-3.025 3-5.625 5.2-6.625 1.925-0.875 2.725-1.7 2.725-3.3 0-1.4-1.825-2.65-3.85-2.65-1.125 0-2.15 0.35-2.7 0.725-0.6 0.425-1.2 1.025-2.675 2.875-0.2 0.25-0.5 0.4-0.775 0.4-0.225 0-0.425-0.075-0.625-0.2l-4.1-3.125c-0.425-0.325-0.525-0.875-0.25-1.325 2.7-4.475 6.5-6.65 11.6-6.65 5.35 0 11.35 4.275 11.35 10z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M23.273 27.636v2.909c0 0.795-0.659 1.455-1.455 1.455h-11.636c-0.795 0-1.455-0.659-1.455-1.455v-2.909c0-0.795 0.659-1.455 1.455-1.455h1.455v-8.727h-1.455c-0.795 0-1.455-0.659-1.455-1.455v-2.909c0-0.795 0.659-1.455 1.455-1.455h8.727c0.795 0 1.455 0.659 1.455 1.455v13.091h1.455c0.795 0 1.455 0.659 1.455 1.455zM20.364 1.455v4.364c0 0.795-0.659 1.455-1.455 1.455h-5.818c-0.795 0-1.455-0.659-1.455-1.455v-4.364c0-0.795 0.659-1.455 1.455-1.455h5.818c0.795 0 1.455 0.659 1.455 1.455z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M18.133 23.467l3.2 3.2 10.667-10.667-10.667-10.667-3.2 3.2 7.467 7.467z"></path> <path d="M13.867 8.533l-3.2-3.2-10.667 10.667 10.667 10.667 3.2-3.2-7.467-7.467z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M29.714 0v2.286h-4.571l-11.429 27.429h4.571v2.286h-16v-2.286h4.571l11.429-27.429h-4.571v-2.286z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M31.68 14.56h-31.36c-0.176 0-0.32 0.144-0.32 0.32v2.24c0 0.176 0.144 0.32 0.32 0.32h31.36c0.176 0 0.32-0.144 0.32-0.32v-2.24c0-0.176-0.144-0.32-0.32-0.32z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M29.187 2.933l-0.12-0.121c-2.813-2.812-7.415-2.812-10.228 0l-6.516 6.517c-2.812 2.812-2.812 7.415 0 10.227l0.12 0.12c0.234 0.234 0.482 0.446 0.739 0.641l2.386-2.386c-0.278-0.164-0.542-0.361-0.78-0.599l-0.121-0.121c-1.527-1.527-1.527-4.012 0-5.539l6.517-6.516c1.527-1.527 4.012-1.527 5.539 0l0.121 0.12c1.527 1.527 1.527 4.012 0 5.539l-2.948 2.948c0.512 1.264 0.754 2.611 0.733 3.955l4.559-4.559c2.812-2.812 2.812-7.415-0-10.227zM19.557 12.323c-0.234-0.234-0.482-0.446-0.739-0.641l-2.386 2.385c0.278 0.164 0.542 0.361 0.78 0.599l0.121 0.121c1.527 1.527 1.527 4.012 0 5.539l-6.517 6.517c-1.527 1.527-4.012 1.527-5.539 0l-0.121-0.121c-1.527-1.527-1.527-4.012 0-5.539l2.948-2.948c-0.512-1.264-0.754-2.611-0.733-3.955l-4.559 4.559c-2.812 2.812-2.812 7.415 0 10.228l0.12 0.12c2.813 2.812 7.415 2.812 10.228 0l6.516-6.517c2.812-2.812 2.812-7.415 0-10.228l-0.12-0.12z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M12 2h20v4h-20v-4zM12 14h20v4h-20v-4zM12 26h20v4h-20v-4zM0 4c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4zM0 16c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4zM0 28c0 2.209 1.791 4 4 4s4-1.791 4-4c0-2.209-1.791-4-4-4s-4 1.791-4 4z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M11 26h20v4h-20zM11 14h20v4h-20zM11 2h20v4h-20zM5 0v8h-2v-6h-2v-2zM3 16.438v1.563h4v2h-6v-4.563l4-1.875v-1.563h-4v-2h6v4.563zM7 22v10h-6v-2h4v-2h-4v-2h4v-2h-4v-2z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M0 16c3.037-5.864 9.058-9.802 16-9.802s12.963 3.938 15.953 9.703l0.047 0.1c-3.037 5.864-9.058 9.802-16 9.802s-12.963-3.938-15.953-9.703l-0.047-0.1zM16 22.531c3.607 0 6.531-2.924 6.531-6.531s-2.924-6.531-6.531-6.531v0c-3.607 0-6.531 2.924-6.531 6.531s2.924 6.531 6.531 6.531v0zM16 19.265c-1.804 0-3.265-1.461-3.265-3.265s1.461-3.265 3.265-3.265v0c1.804 0 3.265 1.461 3.265 3.265s-1.461 3.265-3.265 3.265v0z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M7.024 13.003c3.862 0 6.993 3.131 6.993 6.993s-3.131 6.993-6.993 6.993-6.993-3.131-6.993-6.993l-0.031-0.999c0-7.724 6.262-13.986 13.986-13.986v3.996c-2.668 0-5.177 1.039-7.064 2.926-0.363 0.363-0.695 0.75-0.994 1.156 0.357-0.056 0.723-0.086 1.096-0.086zM25.007 13.003c3.862 0 6.993 3.131 6.993 6.993s-3.131 6.993-6.993 6.993-6.993-3.131-6.993-6.993l-0.031-0.999c0-7.724 6.262-13.986 13.986-13.986v3.996c-2.668 0-5.177 1.039-7.064 2.926-0.363 0.363-0.695 0.75-0.994 1.156 0.357-0.056 0.723-0.086 1.096-0.086z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M4.571 16c0 6.312 5.117 11.429 11.429 11.429s11.429-5.117 11.429-11.429v0c0-6.312-5.117-11.429-11.429-11.429s-11.429 5.117-11.429 11.429v0z"></path> <path d="M16 30.857c-8.229 0-14.933-6.705-14.933-14.933s6.705-14.933 14.933-14.933 15.010 6.705 15.010 15.010c0 8.152-6.705 14.857-15.010 14.857zM16 0c-8.838 0-16 7.162-16 16s7.162 16 16 16 16-7.162 16-16-7.162-16-16-16z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M19.583 9.75q-8.667 1.25-13.375 6.625t-6.208 12.958q6.417-9.083 19.583-9.083v7.25l12.417-12.417-12.417-12.417v7.083z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M32 16v2h-7.328c0.86 1.203 1.328 2.584 1.328 4 0 2.215-1.146 4.345-3.143 5.843-1.855 1.391-4.29 2.157-6.857 2.157s-5.002-0.766-6.857-2.157c-1.998-1.498-3.143-3.628-3.143-5.843h4c0 2.168 2.748 4 6 4s6-1.832 6-4c0-2.168-2.748-4-6-4h-16v-2h9.36c-0.073-0.052-0.146-0.104-0.217-0.157-1.998-1.498-3.143-3.628-3.143-5.843s1.146-4.345 3.143-5.843c1.855-1.391 4.29-2.157 6.857-2.157s5.002 0.766 6.857 2.157c1.997 1.498 3.143 3.628 3.143 5.843h-4c0-2.168-2.748-4-6-4s-6 1.832-6 4c0 2.168 2.748 4 6 4 2.468 0 4.814 0.709 6.64 2h9.36z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M9.846 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM9.846 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM9.846 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 26.462v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM19.692 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 19.077v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM29.538 11.692v-3.692c0-0.346-0.269-0.615-0.615-0.615h-6.154c-0.346 0-0.615 0.269-0.615 0.615v3.692c0 0.346 0.269 0.615 0.615 0.615h6.154c0.346 0 0.615-0.269 0.615-0.615zM32 5.538v20.923c0 1.692-1.385 3.077-3.077 3.077h-25.846c-1.692 0-3.077-1.385-3.077-3.077v-20.923c0-1.692 1.385-3.077 3.077-3.077h25.846c1.692 0 3.077 1.385 3.077 3.077z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M12.417 9.75q8.667 1.25 13.375 6.625t6.208 12.958q-6.417-9.083-19.583-9.083v7.25l-12.417-12.417 12.417-12.417v7.083z"></path> </svg>
'
},
function
(
t
,
e
){
t
.
exports
=
'
<svg xmlns=http://www.w3.org/2000/svg width=32 height=32 viewBox="0 0 32 32"> <path d="M21.334 16.532q0-0.233-0.15-0.384l-5.867-5.867q-0.15-0.15-0.384-0.15t-0.384 0.15l-5.85 5.85q-0.167 0.2-0.167 0.399 0 0.233 0.15 0.384t0.384 0.15h3.733v5.867q0 0.217 0.159 0.375t0.375 0.159h3.2q0.217 0 0.375-0.159t0.159-0.375v-5.867h3.734q0.217 0 0.375-0.159t0.159-0.375zM32 21.332q0 2.65-1.875 4.525t-4.525 1.875h-18.133q-3.083 0-5.275-2.192t-2.192-5.275q0-2.166 1.167-4t3.134-2.75q-0.034-0.5-0.034-0.717 0-3.533 2.5-6.033t6.033-2.5q2.6 0 4.759 1.45t3.142 3.849q1.184-1.033 2.767-1.033 1.767 0 3.017 1.25t1.25 3.017q0 1.267-0.683 2.3 2.166 0.516 3.558 2.258t1.392 3.975z"></path> </svg>
'
},
function
(
t
,
e
,
n
){
"
use strict
"
;
n
.
r
(
e
);
var
o
=
"
0.2.5
"
,
i
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-counter
"
,
this
.
render
(
0
,
t
.
options
.
counter
)}
return
t
.
prototype
.
render
=
function
(
t
,
e
){
this
.
element
.
className
=
t
>
e
?
"
vditor-counter vditor-counter--error
"
:
"
vditor-counter
"
,
this
.
element
.
innerHTML
=
t
+
"
/
"
+
e
},
t
}(),
r
=
/highlight-
(?:
text|source
)
-
([
a-z0-9
]
+
)
/
;
function
s
(
t
){
t
.
addRule
(
"
highlightedCodeBlock
"
,{
filter
:
function
(
t
){
var
e
=
t
.
firstChild
;
return
"
DIV
"
===
t
.
nodeName
&&
r
.
test
(
t
.
className
)
&&
e
&&
"
PRE
"
===
e
.
nodeName
},
replacement
:
function
(
t
,
e
,
n
){
var
o
=
((
e
.
className
||
""
).
match
(
r
)
||
[
null
,
""
])[
1
];
return
"
\n\n
"
+
n
.
fence
+
o
+
"
\n
"
+
e
.
firstChild
.
textContent
+
"
\n
"
+
n
.
fence
+
"
\n\n
"
}})}
function
l
(
t
){
t
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
del
"
,
"
s
"
,
"
strike
"
],
replacement
:
function
(
t
){
return
"
~
"
+
t
+
"
~
"
}})}
var
a
=
Array
.
prototype
.
indexOf
,
c
=
Array
.
prototype
.
every
,
p
=
{};
function
u
(
t
){
var
e
,
n
,
o
=
t
.
parentNode
;
return
"
THEAD
"
===
o
.
nodeName
||
o
.
firstChild
===
t
&&
(
"
TABLE
"
===
o
.
nodeName
||
(
n
=
(
e
=
o
).
previousSibling
,
"
TBODY
"
===
e
.
nodeName
&&
(
!
n
||
"
THEAD
"
===
n
.
nodeName
&&
/^
\s
*$/i
.
test
(
n
.
textContent
))))
&&
c
.
call
(
t
.
childNodes
,
function
(
t
){
return
"
TH
"
===
t
.
nodeName
})}
function
d
(
t
,
e
){
var
n
=
"
"
;
return
0
===
a
.
call
(
e
.
parentNode
.
childNodes
,
e
)
&&
(
n
=
"
|
"
),
n
+
t
+
"
|
"
}
function
h
(
t
){
for
(
var
e
in
t
.
keep
(
function
(
t
){
return
"
TABLE
"
===
t
.
nodeName
&&!
u
(
t
.
rows
[
0
])}),
p
)
t
.
addRule
(
e
,
p
[
e
])}
function
f
(
t
){
t
.
addRule
(
"
taskListItems
"
,{
filter
:
function
(
t
){
return
"
checkbox
"
===
t
.
type
&&
"
LI
"
===
t
.
parentNode
.
nodeName
},
replacement
:
function
(
t
,
e
){
return
(
e
.
checked
?
"
[x]
"
:
"
[ ]
"
)
+
"
"
}})}
function
v
(
t
){
t
.
use
([
s
,
l
,
h
,
f
])}
p
.
tableCell
=
{
filter
:[
"
th
"
,
"
td
"
],
replacement
:
function
(
t
,
e
){
return
d
(
t
,
e
)}},
p
.
tableRow
=
{
filter
:
"
tr
"
,
replacement
:
function
(
t
,
e
){
var
n
=
""
,
o
=
{
left
:
"
:--
"
,
right
:
"
--:
"
,
center
:
"
:-:
"
};
if
(
u
(
e
))
for
(
var
i
=
0
;
i
<
e
.
childNodes
.
length
;
i
++
){
var
r
=
"
---
"
,
s
=
(
e
.
childNodes
[
i
].
getAttribute
(
"
align
"
)
||
""
).
toLowerCase
();
s
&&
(
r
=
o
[
s
]
||
r
),
n
+=
d
(
r
,
e
.
childNodes
[
i
])}
return
"
\n
"
+
t
+
(
n
?
"
\n
"
+
n
:
""
)}},
p
.
table
=
{
filter
:
function
(
t
){
return
"
TABLE
"
===
t
.
nodeName
&&
u
(
t
.
rows
[
0
])},
replacement
:
function
(
t
){
return
"
\n\n
"
+
(
t
=
t
.
replace
(
"
\n\n
"
,
"
\n
"
))
+
"
\n\n
"
}},
p
.
tableSection
=
{
filter
:[
"
thead
"
,
"
tbody
"
,
"
tfoot
"
],
replacement
:
function
(
t
){
return
t
}};
var
m
,
g
=
{
en_US
:{
bold
:
"
Blod
"
,
check
:
"
Task List
"
,
code
:
"
Code Block
"
,
emoji
:
"
Emoji
"
,
fullscreen
:
"
Fullscreen
"
,
headings
:
"
Headings
"
,
help
:
"
Help
"
,
info
:
"
Info
"
,
"
inline-code
"
:
"
Inline Code
"
,
italic
:
"
Italic
"
,
line
:
"
Line
"
,
link
:
"
Link
"
,
list
:
"
List
"
,
"
ordered-list
"
:
"
Order List
"
,
over
:
"
over
"
,
preview
:
"
Preview
"
,
quote
:
"
Quote
"
,
record
:
"
Start Record/End Record
"
,
recording
:
"
recording...
"
,
redo
:
"
Redo
"
,
strike
:
"
Strike
"
,
table
:
"
Table
"
,
undo
:
"
Undo
"
,
upload
:
"
Upload image or file
"
,
uploading
:
"
uploading...
"
},
zh_CN
:{
bold
:
"
粗体
"
,
check
:
"
任务列表
"
,
code
:
"
代码块
"
,
emoji
:
"
表情
"
,
fullscreen
:
"
全屏
"
,
headings
:
"
标题
"
,
help
:
"
帮助
"
,
info
:
"
关于
"
,
"
inline-code
"
:
"
行内代码
"
,
italic
:
"
斜体
"
,
line
:
"
分隔线
"
,
link
:
"
链接
"
,
list
:
"
无序列表
"
,
"
ordered-list
"
:
"
有序列表
"
,
over
:
"
超过
"
,
preview
:
"
预览
"
,
quote
:
"
引用
"
,
record
:
"
开始录音/结束录音
"
,
recording
:
"
录音中...
"
,
redo
:
"
重做
"
,
strike
:
"
删除线
"
,
table
:
"
表格
"
,
undo
:
"
撤销
"
,
upload
:
"
上传图片或文件
"
,
uploading
:
"
上传中...
"
}},
y
=
function
(){
return
function
(){
this
.
isUploading
=!
1
,
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-upload
"
,
this
.
element
.
innerHTML
=
'
<div class="vditor-upload__progress"></div><div class="vditor-upload__close">x</div>
'
,
this
.
element
.
children
[
1
].
addEventListener
(
"
click
"
,
function
(){
this
.
parentElement
.
style
.
opacity
=
0
,
this
.
parentElement
.
className
=
"
vditor-upload
"
})}}(),
w
=
function
(
t
,
e
,
n
){
for
(
var
o
=
new
FormData
,
i
=
[],
r
=
0
,
s
=
e
.
length
;
r
<
s
;
r
++
){
var
l
=
e
[
r
];
l
instanceof
DataTransferItem
&&
(
l
=
l
.
getAsFile
()),
l
.
size
<=
t
.
options
.
upload
.
max
&&
(
o
.
append
(
"
file[]
"
,
l
),
i
.
push
(
l
))}
if
(
t
.
upload
.
element
.
className
=
"
vditor-upload
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
""
,
_
(
t
.
editor
.
element
,
function
(
t
,
e
){
for
(
var
n
=
""
,
o
=
e
.
length
,
i
=
0
;
i
<
o
;
i
++
){
var
r
=
e
[
i
];
r
instanceof
DataTransferItem
&&
(
r
=
r
.
getAsFile
());
var
s
=-
1
===
r
.
type
.
indexOf
(
"
image
"
)?
""
:
"
!
"
;
if
(
!
r
.
name
)
return
""
;
var
l
=
r
.
name
.
lastIndexOf
(
"
.
"
),
a
=
t
.
options
.
upload
.
filename
(
r
.
name
.
substr
(
0
,
l
))
+
r
.
name
.
substr
(
l
),
c
=
t
.
options
.
lang
;
r
.
size
>
t
.
options
.
upload
.
max
?(
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
r
.
name
+
"
"
+
g
[
c
].
over
+
"
"
+
t
.
options
.
upload
.
max
/
1024
/
1024
+
"
M
"
):
n
+=
s
+
"
[
"
+
a
+
"
](
"
+
g
[
c
].
uploading
+
"
)
\n
"
}
return
n
}(
t
,
e
),
""
),
0
!==
i
.
length
){
if
(
!
t
.
options
.
upload
.
url
||!
t
.
upload
)
return
n
&&
(
n
.
value
=
""
),
void
alert
(
"
please config: options.upload.url
"
);
var
a
=
new
XMLHttpRequest
;
a
.
open
(
"
POST
"
,
t
.
options
.
upload
.
url
),
t
.
options
.
upload
.
token
&&
a
.
setRequestHeader
(
"
X-Upload-Token
"
,
t
.
options
.
upload
.
token
),
t
.
upload
.
isUploading
=!
0
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
),
a
.
onreadystatechange
=
function
(){
a
.
readyState
===
XMLHttpRequest
.
DONE
&&
(
t
.
upload
.
isUploading
=!
1
,
n
&&
(
n
.
value
=
""
),
t
.
editor
.
element
.
removeAttribute
(
"
disabled
"
),
200
===
a
.
status
?(
t
.
options
.
upload
.
success
?
t
.
options
.
upload
.
success
(
t
.
editor
.
element
,
a
.
responseText
):
function
(
t
,
e
,
n
,
o
){
t
.
focus
();
var
i
=
JSON
.
parse
(
e
);
1
===
i
.
code
&&
(
o
.
className
=
"
vditor-upload vditor-upload--tip
"
,
o
.
children
[
0
].
innerHTML
=
i
.
msg
),
i
.
data
.
errFiles
.
forEach
(
function
(
e
){
var
o
=
e
.
lastIndexOf
(
"
.
"
),
i
=
"
[
"
+
(
n
.
upload
.
filename
(
e
.
substr
(
0
,
o
))
+
e
.
substr
(
o
))
+
"
](
"
+
g
[
n
.
lang
].
uploading
+
"
)
"
;
t
.
selectionStart
=
t
.
value
.
split
(
i
)[
0
].
length
,
t
.
selectionEnd
=
t
.
selectionStart
+
i
.
length
,
_
(
t
,
""
,
""
,
!
0
)}),
Object
.
keys
(
i
.
data
.
succMap
).
forEach
(
function
(
e
){
var
o
=
i
.
data
.
succMap
[
e
];
if
(
o
.
indexOf
(
"
.wav
"
)
!==
o
.
length
-
4
){
var
r
=
e
.
lastIndexOf
(
"
.
"
),
s
=
n
.
upload
.
filename
(
e
.
substr
(
0
,
r
))
+
e
.
substr
(
r
),
l
=
"
[
"
+
s
+
"
](
"
+
g
[
n
.
lang
].
uploading
+
"
)
"
;
t
.
selectionStart
=
t
.
value
.
split
(
l
)[
0
].
length
,
t
.
selectionEnd
=
t
.
selectionStart
+
l
.
length
,
_
(
t
,
"
[
"
+
s
+
"
](
"
+
o
+
"
)
"
,
""
,
!
0
)}
else
_
(
t
,
'
<audio controls="controls" src="
'
+
o
+
'
"></audio>
\n
'
,
""
)})}(
t
.
editor
.
element
,
a
.
responseText
,
t
.
options
,
t
.
upload
.
element
),
t
.
upload
.
element
.
style
.
opacity
=
"
0
"
):
t
.
options
.
upload
.
error
?
t
.
options
.
upload
.
error
(
a
.
responseText
):(
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
a
.
responseText
||
"
401
"
))},
a
.
upload
.
onprogress
=
function
(
e
){
if
(
e
.
lengthComputable
){
var
n
=
e
.
loaded
/
e
.
total
*
100
;
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
children
[
0
].
style
.
width
=
n
+
"
%
"
}},
a
.
send
(
o
)}
else
n
&&
(
n
.
value
=
""
)},
b
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
textarea
"
),
this
.
element
.
className
=
"
vditor-textarea
"
,
this
.
element
.
setAttribute
(
"
placeholder
"
,
t
.
options
.
placeholder
),
t
.
options
.
cache
&&
(
this
.
element
.
value
=
localStorage
.
getItem
(
"
vditor
"
+
t
.
id
),
t
.
options
.
counter
>
0
&&
t
.
counter
.
render
(
this
.
element
.
value
.
length
,
t
.
options
.
counter
)),
this
.
bindEvent
(
t
)}
return
t
.
prototype
.
html2md
=
function
(
t
,
e
,
n
,
o
){
var
i
=!
1
;
t
.
prototype
.
escape
=
function
(
t
){
return
t
};
var
r
=
new
t
;
r
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
pre
"
,
"
code
"
],
replacement
:
function
(
t
,
e
){
return
"
PRE
"
===
e
.
parentElement
.
tagName
?
t
:
t
.
split
(
"
\n
"
).
length
>
1
?(
i
=!
0
,
"
```
\n
"
+
t
+
"
\n
```
"
):
"
`
"
+
t
+
"
`
"
}}),
r
.
addRule
(
"
strikethrough
"
,{
filter
:[
"
img
"
],
replacement
:
function
(
t
,
n
){
if
(
!
n
.
getAttribute
(
"
src
"
))
return
""
;
if
(
e
.
options
.
upload
.
linkToImgUrl
){
var
o
=
new
XMLHttpRequest
;
o
.
open
(
"
POST
"
,
e
.
options
.
upload
.
linkToImgUrl
),
o
.
onreadystatechange
=
function
(){
if
(
o
.
readyState
===
XMLHttpRequest
.
DONE
&&
200
===
o
.
status
){
var
t
=
JSON
.
parse
(
o
.
responseText
);
if
(
0
!==
t
.
code
)
return
void
alert
(
t
.
msg
);
var
i
=
n
.
getAttribute
(
"
src
"
);
e
.
editor
.
element
.
selectionStart
=
e
.
editor
.
element
.
value
.
split
(
i
)[
0
].
length
,
e
.
editor
.
element
.
selectionEnd
=
e
.
editor
.
element
.
selectionStart
+
i
.
length
,
_
(
e
.
editor
.
element
,
t
.
data
.
url
,
""
,
!
0
)}},
o
.
send
(
JSON
.
stringify
({
url
:
n
.
getAttribute
(
"
src
"
)}))}
return
"

+
"
)
"
}}),
r
.
use
(
v
);
var
s
=
r
.
turndown
(
n
);
if
(
i
){
var
l
=
document
.
createElement
(
"
div
"
);
l
.
innerHTML
=
n
,
l
.
querySelectorAll
(
"
pre
"
).
length
>
1
?
i
=!
1
:
"
```
"
===
s
.
substr
(
0
,
3
)
&&
"
```
"
===
s
.
substr
(
s
.
length
-
3
,
3
)
||
(
i
=!
1
)}
_
(
e
.
editor
.
element
,
i
?
"
```
\n
"
+
o
+
"
\n
```
"
:
s
,
""
,
!
0
)},
t
.
prototype
.
bindEvent
=
function
(
t
){
var
e
,
o
=
this
;
this
.
element
.
addEventListener
(
"
input
"
,
function
(){
t
.
options
.
counter
>
0
&&
t
.
counter
.
render
(
o
.
element
.
value
.
length
,
t
.
options
.
counter
),
"
function
"
==
typeof
t
.
options
.
input
&&
t
.
options
.
input
(
o
.
element
.
value
,
t
.
preview
&&
t
.
preview
.
element
),
t
.
hint
&&
t
.
hint
.
render
(),
t
.
options
.
cache
&&
localStorage
.
setItem
(
"
vditor
"
+
t
.
id
,
t
.
editor
.
element
.
value
),
t
.
preview
&&
t
.
preview
.
render
(
t
)}),
this
.
element
.
addEventListener
(
"
focus
"
,
function
(){(
t
.
options
.
focus
&&
t
.
options
.
focus
(
o
.
element
.
value
),
t
.
toolbar
.
elements
.
emoji
&&
t
.
toolbar
.
elements
.
emoji
.
children
[
1
])
&&
(
t
.
toolbar
.
elements
.
emoji
.
children
[
1
].
style
.
display
=
"
none
"
);
t
.
toolbar
.
elements
.
headings
&&
t
.
toolbar
.
elements
.
headings
.
children
[
1
]
&&
(
t
.
toolbar
.
elements
.
headings
.
children
[
1
].
style
.
display
=
"
none
"
)}),
this
.
element
.
addEventListener
(
"
blur
"
,
function
(){
t
.
options
.
blur
&&
t
.
options
.
blur
(
o
.
element
.
value
)}),
t
.
options
.
select
&&
(
this
.
element
.
onselect
=
function
(){
t
.
options
.
select
(
o
.
element
.
value
.
substring
(
o
.
element
.
selectionStart
,
o
.
element
.
selectionEnd
))}),
this
.
element
.
addEventListener
(
"
scroll
"
,
function
(){
if
(
"
none
"
!==
t
.
preview
.
element
.
style
.
display
||
t
.
preview
){
var
e
=
o
.
element
.
scrollTop
,
n
=
o
.
element
.
clientHeight
,
i
=
o
.
element
.
scrollHeight
,
r
=
t
.
preview
.
element
;
r
.
scrollTop
=
e
/
n
>
.
5
?(
e
+
n
)
*
r
.
scrollHeight
/
i
-
n
:
e
*
r
.
scrollHeight
/
i
}}),
t
.
options
.
upload
.
url
&&
this
.
element
.
addEventListener
(
"
drop
"
,
function
(
e
){
e
.
stopPropagation
(),
e
.
preventDefault
();
var
n
=
e
.
dataTransfer
.
items
;
0
!==
n
.
length
&&
w
(
t
,
n
)});
var
i
=
this
.
html2md
;
this
.
element
.
addEventListener
(
"
paste
"
,
function
(
o
){
o
.
stopPropagation
(),
o
.
preventDefault
();
var
r
=
o
;
if
(
""
!==
r
.
clipboardData
.
getData
(
"
text/html
"
).
replace
(
/
(
^
\s
*
)
|
(\s
*
)
$/g
,
""
)){
var
s
=
r
.
clipboardData
.
getData
(
"
text/html
"
),
l
=
r
.
clipboardData
.
getData
(
"
text/plain
"
);
if
(
!
e
)
return
void
n
.
e
(
1
).
then
(
n
.
bind
(
null
,
26
)).
then
(
function
(
n
){
e
=
n
.
default
,
i
(
e
,
t
,
s
,
l
)}).
catch
(
function
(
t
){
console
.
error
(
"
Failed to load turndown
"
,
t
)});
i
(
e
,
t
,
s
,
l
)}
else
if
(
""
!==
r
.
clipboardData
.
getData
(
"
text/plain
"
).
replace
(
/
(
^
\s
*
)
|
(\s
*
)
$/g
,
""
)
&&
0
===
r
.
clipboardData
.
files
.
length
)
_
(
o
.
target
,
r
.
clipboardData
.
getData
(
"
text/plain
"
),
""
,
!
0
);
else
if
(
r
.
clipboardData
.
files
.
length
>
0
){
if
(
!
t
.
options
.
upload
.
url
)
return
;
w
(
t
,
r
.
clipboardData
.
files
)}})},
t
}(),
_
=
function
(
t
,
e
,
n
,
o
){
if
(
"
number
"
==
typeof
t
.
selectionStart
&&
"
number
"
==
typeof
t
.
selectionEnd
){
var
i
=
t
.
selectionStart
,
r
=
t
.
selectionEnd
,
s
=
t
.
value
;
if
(
t
.
focus
(),
/firefox/i
.
test
(
navigator
.
userAgent
)
||
/edge/i
.
test
(
navigator
.
userAgent
)
||
/msie/i
.
test
(
navigator
.
userAgent
)
||
/trident/i
.
test
(
navigator
.
userAgent
)){
i
===
r
?(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionEnd
=
t
.
selectionStart
=
r
+
e
.
length
):
o
?(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionEnd
=
i
+
e
.
length
+
n
.
length
):
s
.
substring
(
i
-
e
.
length
,
i
)
===
e
&&
s
.
substring
(
r
,
r
+
n
.
length
)
===
n
?(
t
.
value
=
s
.
substring
(
0
,
i
-
e
.
length
)
+
s
.
substring
(
i
,
r
)
+
s
.
substring
(
r
+
n
.
length
,
s
.
length
),
t
.
selectionStart
=
i
-
e
.
length
,
t
.
selectionEnd
=
r
-
e
.
length
):(
t
.
value
=
s
.
substring
(
0
,
i
)
+
e
+
s
.
substring
(
i
,
r
)
+
n
+
s
.
substring
(
r
,
s
.
length
),
t
.
selectionStart
=
i
+
e
.
length
,
t
.
selectionEnd
=
r
+
e
.
length
);
var
l
=
document
.
createEvent
(
"
HTMLEvents
"
);
l
.
initEvent
(
"
input
"
,
!
0
,
!
1
),
t
.
dispatchEvent
(
l
)}
else
if
(
i
===
r
)
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
n
),
t
.
selectionStart
=
t
.
selectionEnd
=
t
.
selectionStart
-
n
.
length
;
else
if
(
o
)
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
n
);
else
if
(
s
.
substring
(
i
-
e
.
length
,
i
)
===
e
&&
s
.
substring
(
r
,
r
+
n
.
length
)
===
n
){
document
.
execCommand
(
"
delete
"
,
!
1
);
for
(
var
a
=
0
,
c
=
e
.
length
;
a
<
c
;
a
++
)
document
.
execCommand
(
"
delete
"
,
!
1
);
for
(
var
p
=
0
,
u
=
n
.
length
;
p
<
u
;
p
++
)
document
.
execCommand
(
"
forwardDelete
"
,
!
1
);
document
.
execCommand
(
"
insertText
"
,
!
1
,
s
.
substring
(
i
,
r
)),
t
.
selectionStart
=
i
-
e
.
length
,
t
.
selectionEnd
=
r
-
e
.
length
}
else
document
.
execCommand
(
"
insertText
"
,
!
1
,
e
+
s
.
substring
(
i
,
r
)
+
n
),
t
.
selectionStart
=
i
+
e
.
length
,
t
.
selectionEnd
=
r
+
e
.
length
}},
E
=
function
(
t
){
var
e
=
window
.
getComputedStyle
(
t
),
n
=
document
.
querySelector
(
"
.vditor-position
"
);
n
||
((
n
=
document
.
createElement
(
"
div
"
)).
className
=
"
vditor-position
"
,
document
.
body
.
appendChild
(
n
));
var
o
=
n
.
style
;
o
.
whiteSpace
=
"
pre-wrap
"
,
o
.
wordWrap
=
"
break-word
"
,
o
.
position
=
"
absolute
"
,
o
.
overflow
=
"
hidden
"
,
o
.
left
=
"
-100%
"
,[
"
direction
"
,
"
box-sizing
"
,
"
width
"
,
"
height
"
,
"
overflow-x
"
,
"
overflow-y
"
,
"
border-top-width
"
,
"
border-right-width
"
,
"
border-bottom-width
"
,
"
border-left-width
"
,
"
border-style
"
,
"
padding-top
"
,
"
padding-right
"
,
"
padding-bottom
"
,
"
padding-left
"
,
"
font-style
"
,
"
font-variant
"
,
"
font-weight
"
,
"
font-stretch
"
,
"
font-size
"
,
"
text-size-adjust
"
,
"
line-height
"
,
"
font-family
"
,
"
text-align
"
,
"
text-transform
"
,
"
text-indent
"
,
"
text-decoration
"
,
"
letter-spacing
"
,
"
word-spacing
"
,
"
tab-size
"
,
"
tab-size
"
].
forEach
(
function
(
t
){
o
.
setProperty
(
t
,
e
.
getPropertyValue
(
t
))}),
n
.
textContent
=
t
.
value
.
substring
(
0
,
t
.
selectionEnd
);
var
i
=
document
.
createElement
(
"
span
"
);
return
i
.
textContent
=
t
.
value
.
substring
(
t
.
selectionEnd
)
||
"
.
"
,
n
.
appendChild
(
i
),{
left
:
i
.
offsetLeft
-
t
.
scrollLeft
,
top
:
i
.
offsetTop
-
t
.
scrollTop
+
parseInt
(
e
.
lineHeight
,
10
)}},
x
=
function
(){
function
t
(
t
){
this
.
timeId
=-
1
,
this
.
hint
=
t
.
options
.
hint
,
this
.
editorElement
=
t
.
editor
.
element
,
this
.
element
=
document
.
createElement
(
"
ul
"
),
this
.
element
.
className
=
"
vditor-hint
"
,
this
.
editorElement
.
parentElement
.
appendChild
(
this
.
element
)}
return
t
.
prototype
.
render
=
function
(){
var
t
=
this
,
e
=
this
.
editorElement
.
value
.
substr
(
0
,
this
.
editorElement
.
selectionStart
).
split
(
"
\n
"
).
slice
(
-
1
).
pop
(),
o
=
this
.
getKey
(
e
,
"
@
"
),
i
=
this
.
getKey
(
e
,
"
:
"
);
void
0
===
o
&&
void
0
===
i
?(
this
.
element
.
style
.
display
=
"
none
"
,
clearTimeout
(
this
.
timeId
)):(
void
0
!==
o
&&
this
.
hint
.
at
&&
(
clearTimeout
(
this
.
timeId
),
this
.
timeId
=
setTimeout
(
function
(){
t
.
genHTML
(
t
.
hint
.
at
(
o
),
o
)},
this
.
hint
.
delay
)),
void
0
!==
i
&&
n
.
e
(
2
).
then
(
n
.
bind
(
null
,
27
)).
then
(
function
(
e
){
var
n
=
""
===
i
?
t
.
hint
.
emoji
:
e
.
getAllEmoji
(
t
.
hint
.
emojiPath
),
o
=
[];
Object
.
keys
(
n
).
forEach
(
function
(
t
){
0
===
t
.
indexOf
(
i
.
toLowerCase
())
&&
(
n
[
t
].
indexOf
(
"
.
"
)
>-
1
?
o
.
push
({
html
:
'
<img src="
'
+
n
[
t
]
+
'
" title=":
'
+
t
+
'
:"/> :
'
+
t
+
"
:
"
,
value
:
"
:
"
+
t
+
"
:
"
}):
o
.
push
({
html
:
'
<span class="vditor-hint__emoji">
'
+
n
[
t
]
+
"
</span>
"
+
t
,
value
:
n
[
t
]}))}),
t
.
genHTML
(
o
,
i
)}).
catch
(
function
(
t
){
console
.
error
(
"
Failed to load emoji
"
,
t
)}))},
t
.
prototype
.
getKey
=
function
(
t
,
e
){
String
.
prototype
.
trim
||
(
String
.
prototype
.
trim
=
function
(){
return
this
.
replace
(
/^
[\s\u
FEFF
\x
A0
]
+|
[\s\u
FEFF
\x
A0
]
+$/g
,
""
)});
var
n
,
o
=
t
.
split
(
e
);
if
(
o
.
length
>
1
)
if
(
2
===
o
.
length
&&
""
===
o
[
0
])(
""
===
o
[
1
]
||
""
!==
o
[
1
].
trim
())
&&-
1
===
o
[
1
].
indexOf
(
"
"
)
&&
o
[
1
].
length
<
33
&&
(
n
=
o
[
1
]);
else
{
var
i
=
o
[
o
.
length
-
2
],
r
=
o
.
slice
(
-
1
).
pop
();
"
"
===
i
.
slice
(
-
1
)
&&-
1
===
r
.
indexOf
(
"
"
)
&&
(
""
===
r
||
""
!==
r
.
trim
())
&&
r
.
length
<
33
&&
(
n
=
r
)}
return
n
},
t
.
prototype
.
genHTML
=
function
(
t
,
e
){
var
n
=
this
;
if
(
0
!==
t
.
length
){
var
o
=
E
(
this
.
editorElement
),
i
=
o
.
left
,
r
=
o
.
top
-
4
,
s
=
""
;
t
.
forEach
(
function
(
t
,
n
){
if
(
!
(
n
>
7
)){
var
o
=
t
.
html
;
if
(
""
!==
e
){
var
i
=
o
.
lastIndexOf
(
"
>
"
)
+
1
,
r
=
o
.
substr
(
i
),
l
=
r
.
toLowerCase
().
indexOf
(
e
.
toLowerCase
());
l
>-
1
&&
(
r
=
r
.
substring
(
0
,
l
)
+
"
<b>
"
+
r
.
substring
(
l
,
l
+
e
.
length
)
+
"
</b>
"
+
r
.
substring
(
l
+
e
.
length
),
o
=
o
.
substr
(
0
,
i
)
+
r
)}
s
+=
'
<li data-value="
'
+
t
.
value
+
'
" class="
'
+
(
n
||
"
vditor-hint--current
"
)
+
'
">
'
+
o
+
"
</li>
"
}}),
this
.
element
.
innerHTML
=
s
,
this
.
element
.
style
.
top
=
r
+
"
px
"
,
this
.
element
.
style
.
left
=
i
+
"
px
"
,
this
.
element
.
style
.
display
=
"
block
"
,
this
.
element
.
querySelectorAll
(
"
li
"
).
forEach
(
function
(
t
){
t
.
addEventListener
(
"
click
"
,
function
(){
n
.
element
.
style
.
display
=
"
none
"
;
var
e
=
t
.
getAttribute
(
"
data-value
"
),
o
=
0
===
e
.
indexOf
(
"
@
"
)?
"
@
"
:
"
:
"
;
n
.
editorElement
.
selectionStart
=
n
.
editorElement
.
value
.
substr
(
0
,
n
.
editorElement
.
selectionEnd
).
lastIndexOf
(
o
),
_
(
n
.
editorElement
,
e
,
""
,
!
0
)})}),
r
+
this
.
element
.
offsetHeight
-
this
.
editorElement
.
offsetHeight
>
window
.
innerHeight
-
(
this
.
editorElement
.
parentElement
.
offsetHeight
+
this
.
editorElement
.
parentElement
.
offsetTop
-
document
.
documentElement
.
scrollTop
)
&&
(
this
.
element
.
style
.
top
=
r
-
this
.
element
.
offsetHeight
+
"
px
"
)}
else
this
.
element
.
style
.
display
=
"
none
"
},
t
}(),
O
=
function
(){
function
t
(
t
){
this
.
editorElement
=
t
.
editor
.
element
,
this
.
toolbarElements
=
t
.
toolbar
.
elements
,
this
.
options
=
t
.
options
,
this
.
hintElement
=
t
.
hint
.
element
,
this
.
bindHotkey
()}
return
t
.
prototype
.
bindHotkey
=
function
(){
var
t
=
this
;
this
.
editorElement
.
addEventListener
(
"
keydown
"
,
function
(
e
){
t
.
options
.
esc
&&
e
.
key
.
toLowerCase
()
===
"
Escape
"
.
toLowerCase
()
&&
t
.
options
.
esc
(
t
.
editorElement
.
value
),
t
.
options
.
ctrlEnter
&&
(
e
.
metaKey
||
e
.
ctrlKey
)
&&
"
enter
"
===
e
.
key
.
toLowerCase
()
&&
t
.
options
.
ctrlEnter
(
t
.
editorElement
.
value
),
t
.
options
.
toolbar
.
forEach
(
function
(
n
){
if
(
n
.
hotkey
){
var
o
=
n
.
hotkey
.
split
(
"
-
"
);
"
ctrl
"
!==
o
[
0
]
&&
"
⌘
"
!==
o
[
0
]
||!
e
.
metaKey
&&!
e
.
ctrlKey
||
e
.
key
===
o
[
1
]
&&
(
t
.
toolbarElements
[
n
.
name
].
children
[
0
].
click
(),
e
.
preventDefault
(),
e
.
stopPropagation
())}}),(
t
.
options
.
hint
.
at
||
t
.
toolbarElements
.
emoji
)
&&
t
.
hint
(
e
)})},
t
.
prototype
.
hint
=
function
(
t
){
if
(
0
!==
this
.
hintElement
.
querySelectorAll
(
"
li
"
).
length
&&
"
none
"
!==
this
.
hintElement
.
style
.
display
){
var
e
=
this
.
hintElement
.
querySelector
(
"
.vditor-hint--current
"
);
if
(
"
arrowdown
"
===
t
.
key
.
toLowerCase
())
t
.
preventDefault
(),
t
.
stopPropagation
(),
e
.
nextElementSibling
?
e
.
nextElementSibling
.
className
=
"
vditor-hint--current
"
:
this
.
hintElement
.
children
[
0
].
className
=
"
vditor-hint--current
"
,
e
.
removeAttribute
(
"
class
"
);
else
if
(
"
arrowup
"
===
t
.
key
.
toLowerCase
()){
if
(
t
.
preventDefault
(),
t
.
stopPropagation
(),
e
.
previousElementSibling
)
e
.
previousElementSibling
.
className
=
"
vditor-hint--current
"
;
else
{
var
n
=
this
.
hintElement
.
children
.
length
;
this
.
hintElement
.
children
[
n
-
1
].
className
=
"
vditor-hint--current
"
}
e
.
removeAttribute
(
"
class
"
)}
else
if
(
"
enter
"
===
t
.
key
.
toLowerCase
()){
t
.
preventDefault
(),
t
.
stopPropagation
(),
this
.
hintElement
.
style
.
display
=
"
none
"
;
var
o
=
e
.
getAttribute
(
"
data-value
"
),
i
=
0
===
o
.
indexOf
(
"
@
"
)?
"
@
"
:
"
:
"
;
this
.
editorElement
.
selectionStart
=
this
.
editorElement
.
value
.
substr
(
0
,
this
.
editorElement
.
selectionEnd
).
lastIndexOf
(
i
),
_
(
this
.
editorElement
,
o
,
""
,
!
0
)}}},
t
}(),
M
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-preview
"
+
(
t
.
options
.
classes
.
preview
?
"
"
+
t
.
options
.
classes
.
preview
:
""
),
t
.
options
.
preview
.
show
||
(
this
.
element
.
style
.
display
=
"
none
"
),
"
none
"
!==
this
.
element
.
style
.
display
&&
this
.
render
(
t
)}
return
t
.
prototype
.
render
=
function
(
t
,
e
){
var
n
=
this
;
"
none
"
!==
this
.
element
.
style
.
display
&&
(
e
?
this
.
element
.
innerHTML
=
e
:
""
!==
t
.
editor
.
element
.
value
.
replace
(
/^
[\s\u
FEFF
\x
A0
]
+|
[\s\u
FEFF
\x
A0
]
+$/g
,
""
)?
t
.
options
.
preview
.
url
?(
clearTimeout
(
t
.
mdTimeoutId
),
t
.
mdTimeoutId
=
setTimeout
(
function
(){
var
e
=
new
XMLHttpRequest
;
e
.
open
(
"
POST
"
,
t
.
options
.
preview
.
url
),
e
.
onreadystatechange
=
function
(){
if
(
e
.
readyState
===
XMLHttpRequest
.
DONE
&&
200
===
e
.
status
){
var
o
=
JSON
.
parse
(
e
.
responseText
);
if
(
0
!==
o
.
code
)
return
void
alert
(
o
.
msg
);
n
.
element
.
innerHTML
=
o
.
data
,
t
.
options
.
preview
.
parse
&&
t
.
options
.
preview
.
parse
(
n
.
element
)}},
e
.
send
(
JSON
.
stringify
({
markdownText
:
t
.
editor
.
element
.
value
}))},
t
.
options
.
preview
.
delay
)):
this
.
element
.
innerHTML
=
t
.
editor
.
element
.
value
:
this
.
element
.
innerHTML
=
""
)},
t
}(),
k
=
n
(
1
),
L
=
n
.
n
(
k
),
T
=
function
(){
function
t
(
t
){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-resize
"
,
this
.
element
.
innerHTML
=
L
.
a
,
this
.
bindEvent
(
t
)}
return
t
.
prototype
.
bindEvent
=
function
(
t
){
this
.
element
.
addEventListener
(
"
mousedown
"
,
function
(
e
){
var
n
=
document
,
o
=
document
.
getElementById
(
t
.
id
),
i
=
e
.
clientY
,
r
=
o
.
offsetHeight
;
n
.
ondragstart
=
function
(){
return
!
1
},
n
.
onselectstart
=
"
return false;
"
,
n
.
onselect
=
function
(){
document
.
selection
.
empty
()},
window
.
captureEvents
&&
window
.
captureEvents
(),
n
.
onmousemove
=
function
(
e
){
"
top
"
===
t
.
options
.
resize
.
position
?
o
.
style
.
height
=
Math
.
max
(
100
,
r
+
(
i
-
e
.
clientY
))
+
"
px
"
:
o
.
style
.
height
=
Math
.
max
(
100
,
r
+
(
e
.
clientY
-
i
))
+
"
px
"
},
n
.
onmouseup
=
function
(){
t
.
options
.
resize
.
after
&&
t
.
options
.
resize
.
after
(
o
.
offsetHeight
-
r
),
window
.
captureEvents
&&
window
.
captureEvents
(),
n
.
onmousemove
=
null
,
n
.
onmouseup
=
null
,
n
.
ondragstart
=
null
,
n
.
onselectstart
=
null
,
n
.
onselect
=
null
}})},
t
}(),
P
=
n
(
2
),
A
=
n
.
n
(
P
),
j
=
function
(){
function
t
(
t
,
e
){
this
.
menuItem
=
e
,
this
.
editorElement
=
t
.
editor
.
element
,
this
.
element
=
document
.
createElement
(
"
div
"
);
var
n
=
document
.
createElement
(
"
div
"
);
n
.
className
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
;
var
o
=
this
.
menuItem
.
hotkey
?
"
<
"
+
this
.
menuItem
.
hotkey
+
"
>
"
:
""
;
o
=
/Mac/
.
test
(
navigator
.
platform
)?
o
.
replace
(
"
ctrl
"
,
"
⌘
"
):
o
.
replace
(
"
⌘
"
,
"
ctrl
"
),
n
.
setAttribute
(
"
aria-label
"
,
this
.
menuItem
.
tip
||
g
[
t
.
options
.
lang
][
this
.
menuItem
.
name
]
+
o
),
this
.
element
.
appendChild
(
n
)}
return
t
.
prototype
.
bindEvent
=
function
(){
var
t
=
this
;
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
_
(
t
.
editorElement
,
t
.
menuItem
.
prefix
||
""
,
t
.
menuItem
.
suffix
||
""
)})},
t
}(),
z
=
(
m
=
function
(
t
,
e
){
return
(
m
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
t
,
e
)},
function
(
t
,
e
){
function
n
(){
this
.
constructor
=
t
}
m
(
t
,
e
),
t
.
prototype
=
null
===
e
?
Object
.
create
(
e
):(
n
.
prototype
=
e
.
prototype
,
new
n
)}),
S
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
A
.
a
,
o
.
bindEvent
(),
o
}
return
z
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
H
=
function
(){
return
function
(){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-menu__br
"
}}(),
N
=
n
(
3
),
C
=
n
.
n
(
N
),
B
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
F
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
C
.
a
,
o
.
bindEvent
(),
o
}
return
B
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
D
=
n
(
4
),
I
=
n
.
n
(
D
),
R
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
q
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
I
.
a
,
o
.
bindEvent
(),
o
}
return
R
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
U
=
function
(){
return
function
(){
this
.
element
=
document
.
createElement
(
"
div
"
),
this
.
element
.
className
=
"
vditor-menu__divider
"
}}(),
V
=
n
(
5
),
W
=
n
.
n
(
V
),
J
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
K
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
W
.
a
;
var
i
=
document
.
createElement
(
"
div
"
);
i
.
className
=
"
vditor-panel
"
;
var
r
=
""
;
Object
.
keys
(
e
.
options
.
hint
.
emoji
).
forEach
(
function
(
t
){
var
n
=
e
.
options
.
hint
.
emoji
[
t
];
n
.
indexOf
(
"
.
"
)
>-
1
?
r
+=
'
<span data-value=":
'
+
t
+
'
: " title=":
'
+
t
+
'
:"><img data-value=":
'
+
t
+
'
: "
\n
src="
'
+
n
+
'
"/></span>
'
:
r
+=
'
<span data-value="
'
+
n
+
'
" title="
'
+
t
+
'
">
'
+
n
+
"
</span>
"
});
var
s
=
e
.
options
.
hint
.
emojiTail
?
'
<div class="vditor-emojis__tail">
'
+
e
.
options
.
hint
.
emojiTail
+
"
</div>
"
:
""
;
return
i
.
innerHTML
=
'
<div class="vditor-emojis">
'
+
r
+
"
</div>
"
+
s
,
o
.
element
.
appendChild
(
i
),
o
.
_bindEvent
(
i
,
e
),
o
}
return
J
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
"
block
"
===
t
.
style
.
display
?
t
.
style
.
display
=
"
none
"
:(
t
.
style
.
display
=
"
block
"
,
e
.
toolbar
.
elements
.
headings
&&
(
e
.
toolbar
.
elements
.
headings
.
children
[
1
].
style
.
display
=
"
none
"
))}),
t
.
querySelectorAll
(
"
.vditor-emojis span
"
).
forEach
(
function
(
n
){
n
.
addEventListener
(
"
click
"
,
function
(
n
){
_
(
e
.
editor
.
element
,
n
.
target
.
getAttribute
(
"
data-value
"
),
""
,
!
0
),
t
.
style
.
display
=
"
none
"
})})},
e
}(
j
),
X
=
n
(
6
),
$
=
n
.
n
(
X
),
Y
=
n
(
0
),
G
=
n
.
n
(
Y
),
Q
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Z
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
G
.
a
,
o
.
_bindEvent
(
e
,
n
),
o
}
return
Q
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
var
n
=
document
.
getElementById
(
t
.
id
);
n
.
className
.
indexOf
(
"
vditor--fullscreen
"
)
>-
1
?(
this
.
innerHTML
=
e
.
icon
||
G
.
a
,
n
.
className
=
n
.
className
.
replace
(
"
vditor--fullscreen
"
,
""
),
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
var
n
=
t
.
toolbar
.
elements
[
e
].
firstChild
;
n
&&
(
n
.
className
=
n
.
className
.
replace
(
"
__s
"
,
"
__n
"
))})):(
this
.
innerHTML
=
e
.
icon
||
$
.
a
,
n
.
className
=
n
.
className
+
"
vditor--fullscreen
"
,
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
var
n
=
t
.
toolbar
.
elements
[
e
].
firstChild
;
n
&&
(
n
.
className
=
n
.
className
.
replace
(
"
__n
"
,
"
__s
"
))}))})},
e
}(
j
),
tt
=
n
(
7
),
et
=
n
.
n
(
tt
),
nt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ot
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
et
.
a
;
var
i
=
document
.
createElement
(
"
div
"
);
return
i
.
className
=
"
vditor-panel
"
,
i
.
innerHTML
=
'
<h1 data-value="# ">Heading 1</h1>
\n
<h2 data-value="## ">Heading 2</h2>
\n
<h3 data-value="### ">Heading 3</h3>
\n
<h4 data-value="#### ">Heading 4</h4>
\n
<h5 data-value="##### ">Heading 5</h5>
\n
<h6 data-value="###### ">Heading 6</h6>
'
,
o
.
element
.
appendChild
(
i
),
o
.
_bindEvent
(
i
,
e
),
o
}
return
nt
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
"
block
"
===
t
.
style
.
display
?
t
.
style
.
display
=
"
none
"
:(
t
.
style
.
display
=
"
block
"
,
e
.
toolbar
.
elements
.
emoji
&&
(
e
.
toolbar
.
elements
.
emoji
.
children
[
1
].
style
.
display
=
"
none
"
))});
for
(
var
n
=
0
;
n
<
6
;
n
++
)
t
.
children
.
item
(
n
).
addEventListener
(
"
click
"
,
function
(
n
){
_
(
e
.
editor
.
element
,
n
.
target
.
getAttribute
(
"
data-value
"
),
""
),
t
.
style
.
display
=
"
none
"
})},
e
}(
j
),
it
=
n
(
8
),
rt
=
n
.
n
(
it
),
st
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
lt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
rt
.
a
,
o
.
bindEvent
(),
o
}
return
st
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
window
.
open
(
"
https://hacpai.com/guide/markdown
"
)})},
e
}(
j
),
at
=
n
(
9
),
ct
=
n
.
n
(
at
),
pt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ut
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ct
.
a
,
o
.
bindEvent
(),
o
}
return
pt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
window
.
open
(
"
https://github.com/b3log/vditor
"
)})},
e
}(
j
),
dt
=
n
(
10
),
ht
=
n
.
n
(
dt
),
ft
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
vt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ht
.
a
,
o
.
bindEvent
(),
o
}
return
ft
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
mt
=
n
(
11
),
gt
=
n
.
n
(
mt
),
yt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
wt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
gt
.
a
,
o
.
bindEvent
(),
o
}
return
yt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
bt
=
n
(
12
),
_t
=
n
.
n
(
bt
),
Et
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
xt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
_t
.
a
,
o
.
bindEvent
(),
o
}
return
Et
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Ot
=
n
(
13
),
Mt
=
n
.
n
(
Ot
),
kt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Lt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Mt
.
a
,
o
.
bindEvent
(),
o
}
return
kt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Tt
=
n
(
14
),
Pt
=
n
.
n
(
Tt
),
At
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
jt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Pt
.
a
,
o
.
bindEvent
(),
o
}
return
At
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
zt
=
n
(
15
),
St
=
n
.
n
(
zt
),
Ht
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Nt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
St
.
a
,
o
.
bindEvent
(),
o
}
return
Ht
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Ct
=
n
(
16
),
Bt
=
n
.
n
(
Ct
),
Ft
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Dt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Bt
.
a
,
e
.
options
.
preview
.
show
&&
(
o
.
element
.
children
[
0
].
className
=
"
vditor-tooltipped vditor-tooltipped__
"
+
n
.
tipPosition
+
"
vditor-menu--current
"
),
o
.
_bindEvent
(
e
,
n
),
o
}
return
Ft
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
,
e
){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
var
n
,
o
=
document
.
getElementById
(
t
.
id
);
"
block
"
===
t
.
preview
.
element
.
style
.
display
?(
t
.
preview
.
element
.
style
.
display
=
"
none
"
,
n
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
):(
t
.
preview
.
element
.
style
.
display
=
"
block
"
,
n
=
"
vditor-tooltipped vditor-tooltipped__
"
+
e
.
tipPosition
+
"
vditor-menu--current
"
,
t
.
preview
.
render
(
t
)),
o
.
className
.
indexOf
(
"
vditor--fullscreen
"
)
>-
1
&&
(
n
=
n
.
replace
(
"
__n
"
,
"
__s
"
)),
this
.
className
=
n
})},
e
}(
j
),
It
=
n
(
17
),
Rt
=
n
.
n
(
It
),
qt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Ut
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Rt
.
a
,
o
.
bindEvent
(),
o
}
return
qt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
Vt
=
n
(
18
),
Wt
=
n
.
n
(
Vt
),
Jt
=
function
(){
function
t
(
t
){
var
e
;
if
(
this
.
SAMPLE_RATE
=
5
e3
,
this
.
isRecording
=!
1
,
this
.
readyFlag
=!
1
,
this
.
leftChannel
=
[],
this
.
rightChannel
=
[],
this
.
recordingLength
=
0
,
"
undefined
"
!=
typeof
AudioContext
)
e
=
new
AudioContext
;
else
{
if
(
!
webkitAudioContext
)
return
;
e
=
new
webkitAudioContext
}
this
.
DEFAULT_SAMPLE_RATE
=
e
.
sampleRate
;
var
n
=
e
.
createGain
();
e
.
createMediaStreamSource
(
t
).
connect
(
n
),
this
.
recorder
=
e
.
createScriptProcessor
(
2048
,
2
,
1
),
this
.
recorder
.
onaudioprocess
=
null
,
n
.
connect
(
this
.
recorder
),
this
.
recorder
.
connect
(
e
.
destination
),
this
.
readyFlag
=!
0
}
return
t
.
prototype
.
cloneChannelData
=
function
(
t
,
e
){
this
.
leftChannel
.
push
(
new
Float32Array
(
t
)),
this
.
rightChannel
.
push
(
new
Float32Array
(
e
)),
this
.
recordingLength
+=
2048
},
t
.
prototype
.
startRecordingNewWavFile
=
function
(){
this
.
readyFlag
&&
(
this
.
isRecording
=!
0
,
this
.
leftChannel
.
length
=
this
.
rightChannel
.
length
=
0
,
this
.
recordingLength
=
0
)},
t
.
prototype
.
stopRecording
=
function
(){
this
.
isRecording
=!
1
},
t
.
prototype
.
buildWavFileBlob
=
function
(){
for
(
var
t
=
this
.
mergeBuffers
(
this
.
leftChannel
),
e
=
this
.
mergeBuffers
(
this
.
rightChannel
),
n
=
new
Float32Array
(
t
.
length
),
o
=
0
;
o
<
t
.
length
;
++
o
)
n
[
o
]
=
.
5
*
(
t
[
o
]
+
e
[
o
]);
this
.
DEFAULT_SAMPLE_RATE
>
this
.
SAMPLE_RATE
&&
(
n
=
this
.
downSampleBuffer
(
n
,
this
.
SAMPLE_RATE
));
var
i
=
44
+
2
*
n
.
length
,
r
=
new
ArrayBuffer
(
i
),
s
=
new
DataView
(
r
);
this
.
writeUTFBytes
(
s
,
0
,
"
RIFF
"
),
s
.
setUint32
(
4
,
i
,
!
0
),
this
.
writeUTFBytes
(
s
,
8
,
"
WAVE
"
),
this
.
writeUTFBytes
(
s
,
12
,
"
fmt
"
),
s
.
setUint32
(
16
,
16
,
!
0
),
s
.
setUint16
(
20
,
1
,
!
0
),
s
.
setUint16
(
22
,
1
,
!
0
),
s
.
setUint32
(
24
,
this
.
SAMPLE_RATE
,
!
0
),
s
.
setUint32
(
28
,
2
*
this
.
SAMPLE_RATE
,
!
0
),
s
.
setUint16
(
32
,
2
,
!
0
),
s
.
setUint16
(
34
,
16
,
!
0
);
var
l
=
2
*
n
.
length
;
this
.
writeUTFBytes
(
s
,
36
,
"
data
"
),
s
.
setUint32
(
40
,
l
,
!
0
);
for
(
var
a
=
n
.
length
,
c
=
44
,
p
=
0
;
p
<
a
;
p
++
)
s
.
setInt16
(
c
,
32767
*
n
[
p
],
!
0
),
c
+=
2
;
return
new
Blob
([
s
],{
type
:
"
audio/wav
"
})},
t
.
prototype
.
downSampleBuffer
=
function
(
t
,
e
){
if
(
e
===
this
.
DEFAULT_SAMPLE_RATE
)
return
t
;
if
(
e
>
this
.
DEFAULT_SAMPLE_RATE
)
return
t
;
for
(
var
n
=
this
.
DEFAULT_SAMPLE_RATE
/
e
,
o
=
Math
.
round
(
t
.
length
/
n
),
i
=
new
Float32Array
(
o
),
r
=
0
,
s
=
0
;
r
<
i
.
length
;){
for
(
var
l
=
Math
.
round
((
r
+
1
)
*
n
),
a
=
0
,
c
=
0
,
p
=
s
;
p
<
l
&&
p
<
t
.
length
;
p
++
)
a
+=
t
[
p
],
c
++
;
i
[
r
]
=
a
/
c
,
r
++
,
s
=
l
}
return
i
},
t
.
prototype
.
mergeBuffers
=
function
(
t
){
for
(
var
e
=
new
Float32Array
(
this
.
recordingLength
),
n
=
0
,
o
=
t
.
length
,
i
=
0
;
i
<
o
;
++
i
){
var
r
=
t
[
i
];
e
.
set
(
r
,
n
),
n
+=
r
.
length
}
return
e
},
t
.
prototype
.
writeUTFBytes
=
function
(
t
,
e
,
n
){
for
(
var
o
=
n
.
length
,
i
=
0
;
i
<
o
;
i
++
)
t
.
setUint8
(
e
+
i
,
n
.
charCodeAt
(
i
))},
t
}(),
Kt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Xt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Wt
.
a
,
o
.
_bindEvent
(
e
),
o
}
return
Kt
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
){
var
e
;
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
if
(
e
)
if
(
e
.
isRecording
){
e
.
stopRecording
(),
t
.
upload
.
element
.
className
=
"
vditor-upload
"
;
var
n
=
new
File
([
e
.
buildWavFileBlob
()],
"
record
"
+
(
new
Date
).
getTime
()
+
"
.wav
"
,{
type
:
"
video/webm
"
});
w
(
t
,[
n
])}
else
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
g
[
t
.
options
.
lang
].
recording
,
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
),
e
.
startRecordingNewWavFile
();
else
navigator
.
mediaDevices
.
getUserMedia
({
audio
:
!
0
}).
then
(
function
(
n
){(
e
=
new
Jt
(
n
)).
recorder
.
onaudioprocess
=
function
(
t
){
if
(
e
.
isRecording
){
var
n
=
t
.
inputBuffer
.
getChannelData
(
0
),
o
=
t
.
inputBuffer
.
getChannelData
(
1
);
e
.
cloneChannelData
(
n
,
o
)}},
e
.
startRecordingNewWavFile
(),
t
.
upload
.
element
.
children
[
0
].
innerHTML
=
g
[
t
.
options
.
lang
].
recording
,
t
.
upload
.
element
.
style
.
opacity
=
"
1
"
,
t
.
upload
.
element
.
className
=
"
vditor-upload vditor-upload--tip
"
,
t
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
)}).
catch
(
function
(
t
){
console
.
error
(
"
init media error:
"
,
t
)})})},
e
}(
j
),
$t
=
n
(
19
),
Yt
=
n
.
n
(
$t
),
Gt
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
Qt
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
Yt
.
a
,
o
.
bindEvent
(),
o
}
return
Gt
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
document
.
execCommand
(
"
redo
"
)})},
e
}(
j
),
Zt
=
n
(
20
),
te
=
n
.
n
(
Zt
),
ee
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
ne
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
te
.
a
,
o
.
bindEvent
(),
o
}
return
ee
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
oe
=
n
(
21
),
ie
=
n
.
n
(
oe
),
re
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
se
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ie
.
a
,
o
.
bindEvent
(),
o
}
return
re
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
t
.
prototype
.
bindEvent
.
call
(
this
)},
e
}(
j
),
le
=
n
(
22
),
ae
=
n
.
n
(
le
),
ce
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
pe
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
n
.
icon
||
ae
.
a
,
o
.
bindEvent
(),
o
}
return
ce
(
e
,
t
),
e
.
prototype
.
bindEvent
=
function
(){
this
.
element
.
children
[
0
].
addEventListener
(
"
click
"
,
function
(){
document
.
execCommand
(
"
undo
"
)})},
e
}(
j
),
ue
=
n
(
23
),
de
=
n
.
n
(
ue
),
he
=
function
(){
var
t
=
function
(
e
,
n
){
return
(
t
=
Object
.
setPrototypeOf
||
{
__proto__
:[]}
instanceof
Array
&&
function
(
t
,
e
){
t
.
__proto__
=
e
}
||
function
(
t
,
e
){
for
(
var
n
in
e
)
e
.
hasOwnProperty
(
n
)
&&
(
t
[
n
]
=
e
[
n
])})(
e
,
n
)};
return
function
(
e
,
n
){
function
o
(){
this
.
constructor
=
e
}
t
(
e
,
n
),
e
.
prototype
=
null
===
n
?
Object
.
create
(
n
):(
o
.
prototype
=
n
.
prototype
,
new
o
)}}(),
fe
=
function
(
t
){
function
e
(
e
,
n
){
var
o
=
t
.
call
(
this
,
e
,
n
)
||
this
;
return
o
.
element
.
children
[
0
].
innerHTML
=
"
<label>
"
+
(
n
.
icon
||
de
.
a
)
+
'
<input multiple="multiple" type="file"></label>
'
,
o
.
_bindEvent
(
e
),
o
}
return
he
(
e
,
t
),
e
.
prototype
.
_bindEvent
=
function
(
t
){
this
.
element
.
querySelector
(
"
input
"
).
addEventListener
(
"
change
"
,
function
(
e
){
0
!==
e
.
target
.
files
.
length
&&
w
(
t
,
e
.
target
.
files
,
e
.
target
)})},
e
}(
j
),
ve
=
function
(){
return
function
(
t
){
var
e
=
this
,
n
=
t
.
options
;
this
.
elements
=
{},
n
.
toolbar
.
forEach
(
function
(
n
,
o
){
var
i
;
switch
(
n
.
name
){
case
"
emoji
"
:
i
=
new
K
(
t
,
n
);
break
;
case
"
bold
"
:
i
=
new
S
(
t
,
n
);
break
;
case
"
headings
"
:
i
=
new
ot
(
t
,
n
);
break
;
case
"
|
"
:
i
=
new
U
;
break
;
case
"
br
"
:
i
=
new
H
;
break
;
case
"
italic
"
:
i
=
new
wt
(
t
,
n
);
break
;
case
"
strike
"
:
i
=
new
ne
(
t
,
n
);
break
;
case
"
line
"
:
i
=
new
xt
(
t
,
n
);
break
;
case
"
quote
"
:
i
=
new
Ut
(
t
,
n
);
break
;
case
"
list
"
:
i
=
new
jt
(
t
,
n
);
break
;
case
"
ordered-list
"
:
i
=
new
Nt
(
t
,
n
);
break
;
case
"
check
"
:
i
=
new
F
(
t
,
n
);
break
;
case
"
undo
"
:
i
=
new
pe
(
t
,
n
);
break
;
case
"
redo
"
:
i
=
new
Qt
(
t
,
n
);
break
;
case
"
code
"
:
i
=
new
q
(
t
,
n
);
break
;
case
"
inline-code
"
:
i
=
new
vt
(
t
,
n
);
break
;
case
"
link
"
:
i
=
new
Lt
(
t
,
n
);
break
;
case
"
help
"
:
i
=
new
lt
(
t
,
n
);
break
;
case
"
table
"
:
i
=
new
se
(
t
,
n
);
break
;
case
"
preview
"
:
i
=
new
Dt
(
t
,
n
);
break
;
case
"
fullscreen
"
:
i
=
new
Z
(
t
,
n
);
break
;
case
"
upload
"
:
i
=
new
fe
(
t
,
n
);
break
;
case
"
record
"
:
i
=
new
Xt
(
t
,
n
);
break
;
case
"
info
"
:
i
=
new
ut
(
t
,
n
);
break
;
default
:
console
.
error
(
"
menu item no matched
"
)}
var
r
=
n
.
name
;
"
br
"
!==
r
&&
"
|
"
!==
r
||
(
r
+=
o
),
e
.
elements
[
r
]
=
i
.
element
})}}(),
me
=
function
(){
return
function
(
t
){
var
e
=
document
.
getElementById
(
t
.
id
);
e
.
className
=
"
vditor
"
+
(
e
.
className
?
"
"
+
e
.
className
:
""
),
"
number
"
==
typeof
t
.
options
.
height
&&
(
e
.
style
.
height
=
t
.
options
.
height
+
"
px
"
),
"
number
"
==
typeof
t
.
options
.
width
?
e
.
style
.
width
=
t
.
options
.
width
+
"
px
"
:
e
.
style
.
width
=
t
.
options
.
width
;
var
n
=
document
.
createElement
(
"
div
"
);
n
.
className
=
"
vditor-toolbar
"
,
Object
.
keys
(
t
.
toolbar
.
elements
).
forEach
(
function
(
e
){
n
.
appendChild
(
t
.
toolbar
.
elements
[
e
])}),
e
.
appendChild
(
n
),
t
.
options
.
resize
.
enable
&&
"
top
"
===
t
.
options
.
resize
.
position
&&
e
.
appendChild
(
t
.
resize
.
element
);
var
o
=
document
.
createElement
(
"
div
"
);
o
.
className
=
"
vditor-content
"
,
o
.
appendChild
(
t
.
editor
.
element
),
t
.
preview
&&
o
.
appendChild
(
t
.
preview
.
element
),
t
.
options
.
counter
>
0
&&
o
.
appendChild
(
t
.
counter
.
element
),
t
.
upload
&&
o
.
appendChild
(
t
.
upload
.
element
),
e
.
appendChild
(
o
),
t
.
options
.
resize
.
enable
&&
"
bottom
"
===
t
.
options
.
resize
.
position
&&
e
.
appendChild
(
t
.
resize
.
element
),
document
.
onclick
=
function
(
t
){
var
e
=
t
.
target
.
closest
(
"
.vditor-tooltipped
"
);
e
&&
e
.
nextSibling
&&
"
vditor-panel
"
===
e
.
nextSibling
.
className
||
(
document
.
querySelectorAll
(
"
.vditor-hint
"
).
forEach
(
function
(
t
){
t
.
style
.
display
=
"
none
"
}),
document
.
querySelectorAll
(
"
.vditor-panel
"
).
forEach
(
function
(
t
){
t
.
style
.
display
=
"
none
"
}))}}}(),
ge
=
function
(){
function
t
(
t
){
this
.
defaultOptions
=
{
cache
:
!
0
,
classes
:{
preview
:
""
},
counter
:
0
,
height
:
"
auto
"
,
hint
:{
delay
:
200
,
emoji
:{
"
+1
"
:
"
👍
"
,
"
-1
"
:
"
👎
"
,
cold_sweat
:
"
😰
"
,
heart
:
"
❤️
"
},
emojiPath
:
"
https://cdn.jsdelivr.net/npm/vditor/src/assets/emoji
"
},
lang
:
"
zh_CN
"
,
placeholder
:
""
,
preview
:{
delay
:
1
e3
,
show
:
!
1
},
resize
:{
enable
:
!
1
,
position
:
"
bottom
"
},
toolbar
:[{
hotkey
:
"
⌘-e
"
,
name
:
"
emoji
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-h
"
,
name
:
"
headings
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-b
"
,
name
:
"
bold
"
,
prefix
:
"
**
"
,
suffix
:
"
**
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-i
"
,
name
:
"
italic
"
,
prefix
:
"
*
"
,
suffix
:
"
*
"
,
tipPosition
:
"
ne
"
},{
hotkey
:
"
⌘-s
"
,
name
:
"
strike
"
,
prefix
:
"
~~
"
,
suffix
:
"
~~
"
,
tipPosition
:
"
ne
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-d
"
,
name
:
"
line
"
,
prefix
:
"
---
\n
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-.
"
,
name
:
"
quote
"
,
prefix
:
"
>
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-l
"
,
name
:
"
list
"
,
prefix
:
"
*
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-o
"
,
name
:
"
ordered-list
"
,
prefix
:
"
1.
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-j
"
,
name
:
"
check
"
,
prefix
:
"
* [ ]
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-u
"
,
name
:
"
code
"
,
prefix
:
"
```
\n
"
,
suffix
:
"
\n
```
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-g
"
,
name
:
"
inline-code
"
,
prefix
:
"
`
"
,
suffix
:
"
`
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-z
"
,
name
:
"
undo
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-y
"
,
name
:
"
redo
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
name
:
"
upload
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-k
"
,
name
:
"
link
"
,
prefix
:
"
[
"
,
suffix
:
"
](https://)
"
,
tipPosition
:
"
n
"
},{
hotkey
:
"
⌘-m
"
,
name
:
"
table
"
,
prefix
:
"
| col1
"
,
suffix
:
"
| col2 | col3 |
\n
| --- | --- | --- |
\n
| | | |
\n
| | | |
"
,
tipPosition
:
"
n
"
},{
name
:
"
record
"
,
tipPosition
:
"
n
"
},{
name
:
"
|
"
},{
hotkey
:
"
⌘-p
"
,
name
:
"
preview
"
,
tipPosition
:
"
nw
"
},{
hotkey
:
"
⌘-f
"
,
name
:
"
fullscreen
"
,
tipPosition
:
"
nw
"
},{
name
:
"
info
"
,
tipPosition
:
"
nw
"
},{
name
:
"
help
"
,
tipPosition
:
"
nw
"
},{
name
:
"
br
"
}],
upload
:{
filename
:
function
(
t
){
return
t
.
replace
(
/
\W
/g
,
""
)},
linkToImgUrl
:
""
,
max
:
10485760
,
url
:
""
},
width
:
"
auto
"
},
this
.
options
=
t
}
return
t
.
prototype
.
merge
=
function
(){
var
t
=
this
,
e
=
[];
this
.
options
&&
(
this
.
options
.
toolbar
&&
this
.
options
.
toolbar
.
forEach
(
function
(
n
){
var
o
;
t
.
defaultOptions
.
toolbar
.
forEach
(
function
(
t
){
"
string
"
==
typeof
n
&&
t
.
name
===
n
&&
(
o
=
t
),
"
object
"
==
typeof
n
&&
t
.
name
===
n
.
name
&&
(
o
=
Object
.
assign
({},
t
,
n
))}),
e
.
push
(
o
)}),
this
.
options
.
upload
&&
(
this
.
options
.
upload
=
Object
.
assign
({},
this
.
defaultOptions
.
upload
,
this
.
options
.
upload
)),
this
.
options
.
classes
&&
(
this
.
options
.
classes
=
Object
.
assign
({},
this
.
defaultOptions
.
classes
,
this
.
options
.
classes
)),
this
.
options
.
preview
&&
(
this
.
options
.
preview
=
Object
.
assign
({},
this
.
defaultOptions
.
preview
,
this
.
options
.
preview
)),
this
.
options
.
hint
&&
(
this
.
options
.
hint
=
Object
.
assign
({},
this
.
defaultOptions
.
hint
,
this
.
options
.
hint
)),
this
.
options
.
resize
&&
(
this
.
options
.
resize
=
Object
.
assign
({},
this
.
defaultOptions
.
resize
,
this
.
options
.
resize
)));
var
n
=
Object
.
assign
({},
this
.
defaultOptions
,
this
.
options
);
return
e
.
length
>
0
&&
(
n
.
toolbar
=
e
),
n
},
t
}(),
ye
=
function
(){
function
t
(
t
,
e
){
this
.
version
=
o
;
var
n
=
new
ge
(
e
).
merge
();
if
(
this
.
vditor
=
{
id
:
t
,
mdTimeoutId
:
-
1
,
options
:
n
},
n
.
counter
>
0
){
var
r
=
new
i
(
this
.
vditor
);
this
.
vditor
.
counter
=
r
}
var
s
=
new
b
(
this
.
vditor
);
if
(
this
.
vditor
.
editor
=
s
,
n
.
resize
.
enable
){
var
l
=
new
T
(
this
.
vditor
);
this
.
vditor
.
resize
=
l
}
if
(
n
.
toolbar
){
var
a
=
new
ve
(
this
.
vditor
);
this
.
vditor
.
toolbar
=
a
}
if
(
this
.
vditor
.
toolbar
.
elements
.
preview
){
var
c
=
new
M
(
this
.
vditor
);
this
.
vditor
.
preview
=
c
}
if
(
n
.
upload
.
url
){
var
p
=
new
y
;
this
.
vditor
.
upload
=
p
}
new
me
(
this
.
vditor
);
if
(
this
.
vditor
.
options
.
hint
.
at
||
this
.
vditor
.
toolbar
.
elements
.
emoji
){
var
u
=
new
x
(
this
.
vditor
);
this
.
vditor
.
hint
=
u
}
new
O
(
this
.
vditor
)}
return
t
.
prototype
.
getValue
=
function
(){
return
this
.
vditor
.
editor
.
element
.
value
},
t
.
prototype
.
insertValue
=
function
(
t
){
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
)},
t
.
prototype
.
focus
=
function
(){
this
.
vditor
.
editor
.
element
.
focus
()},
t
.
prototype
.
blur
=
function
(){
this
.
vditor
.
editor
.
element
.
blur
()},
t
.
prototype
.
disabled
=
function
(){
this
.
vditor
.
editor
.
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
)},
t
.
prototype
.
enable
=
function
(){
this
.
vditor
.
editor
.
element
.
removeAttribute
(
"
disabled
"
)},
t
.
prototype
.
setSelection
=
function
(
t
,
e
){
this
.
vditor
.
editor
.
element
.
selectionStart
=
t
,
this
.
vditor
.
editor
.
element
.
selectionEnd
=
e
,
this
.
vditor
.
editor
.
element
.
focus
()},
t
.
prototype
.
getSelection
=
function
(){
return
this
.
vditor
.
editor
.
element
.
value
.
substring
(
this
.
vditor
.
editor
.
element
.
selectionStart
,
this
.
vditor
.
editor
.
element
.
selectionEnd
)},
t
.
prototype
.
setValue
=
function
(
t
){
this
.
vditor
.
editor
.
element
.
selectionStart
=
0
,
this
.
vditor
.
editor
.
element
.
selectionEnd
=
this
.
vditor
.
editor
.
element
.
value
.
length
,
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
,
!
0
),
t
||
localStorage
.
removeItem
(
"
vditor
"
+
this
.
vditor
.
id
)},
t
.
prototype
.
renderPreview
=
function
(
t
){
this
.
vditor
.
preview
.
render
(
this
.
vditor
,
t
)},
t
.
prototype
.
getCursorPosition
=
function
(){
return
E
(
this
.
vditor
.
editor
.
element
)},
t
.
prototype
.
deleteValue
=
function
(){
_
(
this
.
vditor
.
editor
.
element
,
""
,
""
,
!
0
)},
t
.
prototype
.
updateValue
=
function
(
t
){
_
(
this
.
vditor
.
editor
.
element
,
t
,
""
,
!
0
)},
t
.
prototype
.
isUploading
=
function
(){
return
this
.
vditor
.
upload
.
isUploading
},
t
.
prototype
.
clearCache
=
function
(){
localStorage
.
removeItem
(
"
vditor
"
+
this
.
vditor
.
id
)},
t
.
prototype
.
disabledCache
=
function
(){
this
.
vditor
.
options
.
cache
=!
1
},
t
.
prototype
.
enableCache
=
function
(){
this
.
vditor
.
options
.
cache
=!
0
},
t
}();
e
.
default
=
ye
}]).
default
});
\ No newline at end of file
src/main/webapp/js/lib/vditor-0.2.
0
/vditor.bundle.js
→
src/main/webapp/js/lib/vditor-0.2.
5
/vditor.bundle.js
View file @
c37bf256
File moved
src/main/webapp/js/lib/vditor-0.2.
0
/vendors~vditor.bundle.js
→
src/main/webapp/js/lib/vditor-0.2.
5
/vendors~vditor.bundle.js
View file @
c37bf256
File moved
src/main/webapp/js/page.js
View file @
c37bf256
...
...
@@ -20,7 +20,7 @@
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.0.0.
2, Feb 18
, 2019
* @version 2.0.0.
3, Feb 19
, 2019
*/
var
Page
=
function
(
tips
)
{
this
.
currentCommentId
=
''
...
...
@@ -105,11 +105,11 @@ $.extend(Page.prototype, {
if
(
typeof
Vditor
===
'
undefined
'
)
{
$
(
'
head
'
).
append
(
$
(
'
<link rel=
\'
stylesheet
\'
href=
\'
'
+
latkeConfig
.
staticServePath
+
'
/js/lib/vditor-0.2.
0
/index.classic.css
\'
>
'
))
$
(
'
<link rel=
\'
stylesheet
\'
href=
\'
'
+
latkeConfig
.
staticServePath
+
'
/js/lib/vditor-0.2.
5
/index.classic.css
\'
>
'
))
$
.
ajax
({
method
:
'
GET
'
,
url
:
latkeConfig
.
staticServePath
+
'
/js/lib/vditor-0.2.
0
/index.min.js
'
,
url
:
latkeConfig
.
staticServePath
+
'
/js/lib/vditor-0.2.
5
/index.min.js
'
,
dataType
:
'
script
'
,
cache
:
true
,
async
:
false
,
...
...
src/main/webapp/js/page.min.js
View file @
c37bf256
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
var
Page
=
function
(
e
){
this
.
currentCommentId
=
""
,
this
.
tips
=
e
};
$
.
extend
(
Page
.
prototype
,{
replaceCommentsEm
:
function
(
e
){
for
(
var
t
=
$
(
e
),
i
=
0
;
i
<
t
.
length
;
i
++
){
var
o
=
t
[
i
].
innerHTML
;
t
[
i
].
innerHTML
=
Util
.
replaceEmString
(
o
)}},
parseLanguage
:
function
(
e
){
var
t
=!
1
;
$
(
"
.article-body pre, .content-reset pre, .code-highlight pre
"
).
each
(
function
(){
t
=!
0
}),
t
&&
(
document
.
createStyleSheet
?
document
.
createStyleSheet
(
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/styles/
"
+
(
e
&&
e
.
theme
||
"
github
"
)
+
"
.css
"
):
$
(
"
head
"
).
append
(
$
(
"
<link rel='stylesheet' href='
"
+
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/styles/
"
+
(
e
&&
e
.
theme
||
"
github
"
)
+
"
.css'>
"
)),
Label
.
markedAvailable
||
$
.
ajax
({
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/highlight.pack.js
"
,
dataType
:
"
script
"
,
cache
:
!
0
,
success
:
function
(){
hljs
.
initHighlighting
.
called
=!
1
,
hljs
.
initHighlighting
()}}))},
load
:
function
(
e
){
var
t
=
this
;
t
.
parseLanguage
(
e
),
$
(
"
#comment
"
).
click
(
function
(){
t
.
toggleEditor
()}).
attr
(
"
readonly
"
,
"
readonly
"
),
$
(
"
#soloEditorCancel
"
).
click
(
function
(){
t
.
toggleEditor
()}),
$
(
"
#soloEditorAdd
"
).
click
(
function
(){
t
.
submitComment
()})},
toggleEditor
:
function
(
e
,
t
){
var
i
=
this
;
"
undefined
"
==
typeof
Vditor
&&
(
$
(
"
head
"
).
append
(
$
(
"
<link rel='stylesheet' href='
"
+
latkeConfig
.
staticServePath
+
"
/js/lib/vditor-0.2.0/index.classic.css'>
"
)),
$
.
ajax
({
method
:
"
GET
"
,
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/vditor-0.2.0/index.min.js
"
,
dataType
:
"
script
"
,
cache
:
!
0
,
async
:
!
1
,
success
:
function
(){
window
.
vditor
=
new
Vditor
(
"
soloEditorComment
"
,{
placeholder
:
i
.
tips
.
commentContentCannotEmptyLabel
,
height
:
180
,
hint
:{
emojiPath
:
latkeConfig
.
staticServePath
+
"
/js/lib/emojify.js-1.1.0/images/basic
"
},
esc
:
function
(){
$
(
"
#soloEditorCancel
"
).
click
()},
ctrlEnter
:
function
(){
$
(
"
#soloEditorAdd
"
).
click
()},
preview
:{
delay
:
500
,
show
:
!
1
,
url
:
latkeConfig
.
servePath
+
"
/console/markdown/2html
"
,
parse
:
function
(
e
){
"
none
"
!==
e
.
style
.
display
&&
(
Util
.
parseMarkdown
(
"
content-reset
"
),
Label
.
markedAvailable
||
(
hljs
.
initHighlighting
.
called
=!
1
,
hljs
.
initHighlighting
()))}},
counter
:
500
,
resize
:{
enable
:
!
0
,
position
:
"
top
"
,
after
:
function
(){
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
$
(
"
#soloEditor
"
).
outerHeight
())}},
lang
:
i
.
tips
.
langLabel
,
toolbar
:[
"
emoji
"
,
"
headings
"
,
"
bold
"
,
"
italic
"
,
"
strike
"
,
"
|
"
,
"
line
"
,
"
quote
"
,
"
|
"
,
"
list
"
,
"
ordered-list
"
,
"
check
"
,
"
|
"
,
"
code
"
,
"
inline-code
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
link
"
,
"
table
"
,
"
|
"
,
"
preview
"
,
"
fullscreen
"
,
"
info
"
,
"
help
"
],
classes
:{
preview
:
"
content__reset
"
}}),
vditor
.
focus
()}}));
var
o
=
$
(
"
#soloEditor
"
);
0
!==
o
.
length
?
"
0px
"
===
$
(
"
body
"
).
css
(
"
padding-bottom
"
)
||
e
?(
$
(
"
#soloEditorError
"
).
text
(
""
),
o
.
css
({
bottom
:
"
0
"
,
opacity
:
1
}),
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
"
238px
"
),
this
.
currentCommentId
=
e
,
$
(
"
#soloEditorReplyTarget
"
).
text
(
t
?
"
@
"
+
t
:
""
),
"
undefined
"
!=
typeof
vditor
&&
vditor
.
focus
()):(
o
.
css
({
bottom
:
"
-300px
"
,
opacity
:
0
}),
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
0
)):
location
.
href
=
latkeConfig
.
servePath
+
"
/start
"
},
loadRandomArticles
:
function
(
s
){
var
c
=
this
.
tips
.
randomArticles1Label
;
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/articles/random
"
,
type
:
"
POST
"
,
success
:
function
(
e
,
t
){
var
i
=
e
.
randomArticles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' href='
"
+
latkeConfig
.
servePath
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
(
s
||
"
<h4>
"
+
c
+
"
</h4>
"
)
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#randomArticles
"
).
append
(
r
)}
else
$
(
"
#randomArticles
"
).
remove
()}})},
loadRelevantArticles
:
function
(
e
,
s
){
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/article/id/
"
+
e
+
"
/relevant/articles
"
,
type
:
"
GET
"
,
success
:
function
(
e
,
t
){
var
i
=
e
.
relevantArticles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' href='
"
+
latkeConfig
.
servePath
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
s
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#relevantArticles
"
).
append
(
r
)}
else
$
(
"
#relevantArticles
"
).
remove
()},
error
:
function
(){
$
(
"
#relevantArticles
"
).
remove
()}})},
loadExternalRelevantArticles
:
function
(
e
,
s
){
var
c
=
this
.
tips
;
try
{
$
.
ajax
({
url
:
"
https://rhythm.b3log.org/get-articles-by-tags.do?tags=
"
+
e
+
"
&blogHost=
"
+
c
.
blogHost
+
"
&paginationPageSize=
"
+
c
.
externalRelevantArticlesDisplayCount
,
type
:
"
GET
"
,
cache
:
!
0
,
dataType
:
"
jsonp
"
,
error
:
function
(){
$
(
"
#externalRelevantArticles
"
).
remove
()},
success
:
function
(
e
,
t
){
var
i
=
e
.
articles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' target='_blank' href='
"
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
(
s
||
"
<h4>
"
+
c
.
externalRelevantArticles1Label
+
"
</h4>
"
)
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#externalRelevantArticles
"
).
append
(
r
)}
else
$
(
"
#externalRelevantArticles
"
).
remove
()}})}
catch
(
e
){}},
submitComment
:
function
(){
var
t
=
this
,
e
=
this
.
tips
,
i
=
"
article
"
;
if
(
void
0
===
e
.
externalRelevantArticlesDisplayCount
&&
(
i
=
"
page
"
),
1
<
vditor
.
getValue
().
length
&&
vditor
.
getValue
().
length
<
500
){
$
(
"
#soloEditorAdd
"
).
attr
(
"
disabled
"
,
"
disabled
"
);
var
o
=
{
oId
:
e
.
oId
,
commentContent
:
vditor
.
getValue
()};
this
.
currentCommentId
&&
(
o
.
commentOriginalCommentId
=
this
.
currentCommentId
),
$
.
ajax
({
type
:
"
POST
"
,
url
:
latkeConfig
.
servePath
+
"
/
"
+
i
+
"
/comments
"
,
cache
:
!
1
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
o
),
success
:
function
(
e
){
$
(
"
#soloEditorAdd
"
).
removeAttr
(
"
disabled
"
),
e
.
sc
?(
t
.
toggleEditor
(),
vditor
.
setValue
(
""
),
t
.
addCommentAjax
(
Util
.
replaceEmString
(
e
.
cmtTpl
))):
$
(
"
#soloEditorError
"
).
html
(
e
.
msg
)}})}
else
$
(
"
#soloEditorError
"
).
text
(
t
.
tips
.
commentContentCannotEmptyLabel
)},
addReplyForm
:
function
(
e
,
t
){
this
.
currentCommentId
=
e
,
this
.
toggleEditor
(
e
,
t
)},
hideComment
:
function
(
e
){
$
(
"
#commentRef
"
+
e
).
hide
()},
showComment
:
function
(
e
,
t
,
i
,
o
){
var
n
=
parseInt
(
$
(
e
).
position
().
top
);
if
(
o
&&
(
n
=
parseInt
(
$
(
e
).
parents
(
o
).
position
().
top
)),
0
<
$
(
"
#commentRef
"
+
t
).
length
)
$
(
"
#commentRef
"
+
t
).
show
().
css
(
"
top
"
,
n
+
i
+
"
px
"
);
else
{
var
l
=
$
(
"
#
"
+
t
).
clone
();
l
.
addClass
(
"
comment-body-ref
"
).
attr
(
"
id
"
,
"
commentRef
"
+
t
),
l
.
find
(
"
#replyForm
"
).
remove
(),
$
(
"
#comments
"
).
append
(
l
),
$
(
"
#commentRef
"
+
t
).
css
(
"
top
"
,
n
+
i
+
"
px
"
)}},
addCommentAjax
:
function
(
e
){
0
<
$
(
"
#comments
"
).
children
().
length
?
$
(
$
(
"
#comments
"
).
children
()[
0
]).
before
(
e
):
$
(
"
#comments
"
).
html
(
e
),
window
.
location
.
hash
=
"
#comments
"
}});
\ No newline at end of file
var
Page
=
function
(
e
){
this
.
currentCommentId
=
""
,
this
.
tips
=
e
};
$
.
extend
(
Page
.
prototype
,{
replaceCommentsEm
:
function
(
e
){
for
(
var
t
=
$
(
e
),
i
=
0
;
i
<
t
.
length
;
i
++
){
var
o
=
t
[
i
].
innerHTML
;
t
[
i
].
innerHTML
=
Util
.
replaceEmString
(
o
)}},
parseLanguage
:
function
(
e
){
var
t
=!
1
;
$
(
"
.article-body pre, .content-reset pre, .code-highlight pre
"
).
each
(
function
(){
t
=!
0
}),
t
&&
(
document
.
createStyleSheet
?
document
.
createStyleSheet
(
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/styles/
"
+
(
e
&&
e
.
theme
||
"
github
"
)
+
"
.css
"
):
$
(
"
head
"
).
append
(
$
(
"
<link rel='stylesheet' href='
"
+
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/styles/
"
+
(
e
&&
e
.
theme
||
"
github
"
)
+
"
.css'>
"
)),
Label
.
markedAvailable
||
$
.
ajax
({
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/highlight-9.13.1/highlight.pack.js
"
,
dataType
:
"
script
"
,
cache
:
!
0
,
success
:
function
(){
hljs
.
initHighlighting
.
called
=!
1
,
hljs
.
initHighlighting
()}}))},
load
:
function
(
e
){
var
t
=
this
;
t
.
parseLanguage
(
e
),
$
(
"
#comment
"
).
click
(
function
(){
t
.
toggleEditor
()}).
attr
(
"
readonly
"
,
"
readonly
"
),
$
(
"
#soloEditorCancel
"
).
click
(
function
(){
t
.
toggleEditor
()}),
$
(
"
#soloEditorAdd
"
).
click
(
function
(){
t
.
submitComment
()})},
toggleEditor
:
function
(
e
,
t
){
var
i
=
this
;
"
undefined
"
==
typeof
Vditor
&&
(
$
(
"
head
"
).
append
(
$
(
"
<link rel='stylesheet' href='
"
+
latkeConfig
.
staticServePath
+
"
/js/lib/vditor-0.2.5/index.classic.css'>
"
)),
$
.
ajax
({
method
:
"
GET
"
,
url
:
latkeConfig
.
staticServePath
+
"
/js/lib/vditor-0.2.5/index.min.js
"
,
dataType
:
"
script
"
,
cache
:
!
0
,
async
:
!
1
,
success
:
function
(){
window
.
vditor
=
new
Vditor
(
"
soloEditorComment
"
,{
placeholder
:
i
.
tips
.
commentContentCannotEmptyLabel
,
height
:
180
,
hint
:{
emojiPath
:
latkeConfig
.
staticServePath
+
"
/js/lib/emojify.js-1.1.0/images/basic
"
},
esc
:
function
(){
$
(
"
#soloEditorCancel
"
).
click
()},
ctrlEnter
:
function
(){
$
(
"
#soloEditorAdd
"
).
click
()},
preview
:{
delay
:
500
,
show
:
!
1
,
url
:
latkeConfig
.
servePath
+
"
/console/markdown/2html
"
,
parse
:
function
(
e
){
"
none
"
!==
e
.
style
.
display
&&
(
Util
.
parseMarkdown
(
"
content-reset
"
),
Label
.
markedAvailable
||
(
hljs
.
initHighlighting
.
called
=!
1
,
hljs
.
initHighlighting
()))}},
counter
:
500
,
resize
:{
enable
:
!
0
,
position
:
"
top
"
,
after
:
function
(){
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
$
(
"
#soloEditor
"
).
outerHeight
())}},
lang
:
i
.
tips
.
langLabel
,
toolbar
:[
"
emoji
"
,
"
headings
"
,
"
bold
"
,
"
italic
"
,
"
strike
"
,
"
|
"
,
"
line
"
,
"
quote
"
,
"
|
"
,
"
list
"
,
"
ordered-list
"
,
"
check
"
,
"
|
"
,
"
code
"
,
"
inline-code
"
,
"
|
"
,
"
undo
"
,
"
redo
"
,
"
|
"
,
"
link
"
,
"
table
"
,
"
|
"
,
"
preview
"
,
"
fullscreen
"
,
"
info
"
,
"
help
"
],
classes
:{
preview
:
"
content__reset
"
}}),
vditor
.
focus
()}}));
var
o
=
$
(
"
#soloEditor
"
);
0
!==
o
.
length
?
"
0px
"
===
$
(
"
body
"
).
css
(
"
padding-bottom
"
)
||
e
?(
$
(
"
#soloEditorError
"
).
text
(
""
),
o
.
css
({
bottom
:
"
0
"
,
opacity
:
1
}),
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
"
238px
"
),
this
.
currentCommentId
=
e
,
$
(
"
#soloEditorReplyTarget
"
).
text
(
t
?
"
@
"
+
t
:
""
),
"
undefined
"
!=
typeof
vditor
&&
vditor
.
focus
()):(
o
.
css
({
bottom
:
"
-300px
"
,
opacity
:
0
}),
$
(
"
body
"
).
css
(
"
padding-bottom
"
,
0
)):
location
.
href
=
latkeConfig
.
servePath
+
"
/start
"
},
loadRandomArticles
:
function
(
s
){
var
c
=
this
.
tips
.
randomArticles1Label
;
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/articles/random
"
,
type
:
"
POST
"
,
success
:
function
(
e
,
t
){
var
i
=
e
.
randomArticles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' href='
"
+
latkeConfig
.
servePath
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
(
s
||
"
<h4>
"
+
c
+
"
</h4>
"
)
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#randomArticles
"
).
append
(
r
)}
else
$
(
"
#randomArticles
"
).
remove
()}})},
loadRelevantArticles
:
function
(
e
,
s
){
$
.
ajax
({
url
:
latkeConfig
.
servePath
+
"
/article/id/
"
+
e
+
"
/relevant/articles
"
,
type
:
"
GET
"
,
success
:
function
(
e
,
t
){
var
i
=
e
.
relevantArticles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' href='
"
+
latkeConfig
.
servePath
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
s
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#relevantArticles
"
).
append
(
r
)}
else
$
(
"
#relevantArticles
"
).
remove
()},
error
:
function
(){
$
(
"
#relevantArticles
"
).
remove
()}})},
loadExternalRelevantArticles
:
function
(
e
,
s
){
var
c
=
this
.
tips
;
try
{
$
.
ajax
({
url
:
"
https://rhythm.b3log.org/get-articles-by-tags.do?tags=
"
+
e
+
"
&blogHost=
"
+
c
.
blogHost
+
"
&paginationPageSize=
"
+
c
.
externalRelevantArticlesDisplayCount
,
type
:
"
GET
"
,
cache
:
!
0
,
dataType
:
"
jsonp
"
,
error
:
function
(){
$
(
"
#externalRelevantArticles
"
).
remove
()},
success
:
function
(
e
,
t
){
var
i
=
e
.
articles
;
if
(
i
&&
0
!==
i
.
length
){
for
(
var
o
=
""
,
n
=
0
;
n
<
i
.
length
;
n
++
){
var
l
=
i
[
n
],
a
=
l
.
articleTitle
;
o
+=
"
<li><a rel='nofollow' title='
"
+
a
+
"
' target='_blank' href='
"
+
l
.
articlePermalink
+
"
'>
"
+
a
+
"
</a></li>
"
}
var
r
=
(
s
||
"
<h4>
"
+
c
.
externalRelevantArticles1Label
+
"
</h4>
"
)
+
"
<ul class='marginLeft12'>
"
+
o
+
"
</ul>
"
;
$
(
"
#externalRelevantArticles
"
).
append
(
r
)}
else
$
(
"
#externalRelevantArticles
"
).
remove
()}})}
catch
(
e
){}},
submitComment
:
function
(){
var
t
=
this
,
e
=
this
.
tips
,
i
=
"
article
"
;
if
(
void
0
===
e
.
externalRelevantArticlesDisplayCount
&&
(
i
=
"
page
"
),
1
<
vditor
.
getValue
().
length
&&
vditor
.
getValue
().
length
<
500
){
$
(
"
#soloEditorAdd
"
).
attr
(
"
disabled
"
,
"
disabled
"
);
var
o
=
{
oId
:
e
.
oId
,
commentContent
:
vditor
.
getValue
()};
this
.
currentCommentId
&&
(
o
.
commentOriginalCommentId
=
this
.
currentCommentId
),
$
.
ajax
({
type
:
"
POST
"
,
url
:
latkeConfig
.
servePath
+
"
/
"
+
i
+
"
/comments
"
,
cache
:
!
1
,
contentType
:
"
application/json
"
,
data
:
JSON
.
stringify
(
o
),
success
:
function
(
e
){
$
(
"
#soloEditorAdd
"
).
removeAttr
(
"
disabled
"
),
e
.
sc
?(
t
.
toggleEditor
(),
vditor
.
setValue
(
""
),
t
.
addCommentAjax
(
Util
.
replaceEmString
(
e
.
cmtTpl
))):
$
(
"
#soloEditorError
"
).
html
(
e
.
msg
)}})}
else
$
(
"
#soloEditorError
"
).
text
(
t
.
tips
.
commentContentCannotEmptyLabel
)},
addReplyForm
:
function
(
e
,
t
){
this
.
currentCommentId
=
e
,
this
.
toggleEditor
(
e
,
t
)},
hideComment
:
function
(
e
){
$
(
"
#commentRef
"
+
e
).
hide
()},
showComment
:
function
(
e
,
t
,
i
,
o
){
var
n
=
parseInt
(
$
(
e
).
position
().
top
);
if
(
o
&&
(
n
=
parseInt
(
$
(
e
).
parents
(
o
).
position
().
top
)),
0
<
$
(
"
#commentRef
"
+
t
).
length
)
$
(
"
#commentRef
"
+
t
).
show
().
css
(
"
top
"
,
n
+
i
+
"
px
"
);
else
{
var
l
=
$
(
"
#
"
+
t
).
clone
();
l
.
addClass
(
"
comment-body-ref
"
).
attr
(
"
id
"
,
"
commentRef
"
+
t
),
l
.
find
(
"
#replyForm
"
).
remove
(),
$
(
"
#comments
"
).
append
(
l
),
$
(
"
#commentRef
"
+
t
).
css
(
"
top
"
,
n
+
i
+
"
px
"
)}},
addCommentAjax
:
function
(
e
){
0
<
$
(
"
#comments
"
).
children
().
length
?
$
(
$
(
"
#comments
"
).
children
()[
0
]).
before
(
e
):
$
(
"
#comments
"
).
html
(
e
),
window
.
location
.
hash
=
"
#comments
"
}});
\ 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