dev_local_2
杨树林 5 years ago
commit 3bf6e3c88b

File diff suppressed because one or more lines are too long

@ -1,481 +0,0 @@
/* 头部 */
.header{ width:100%; height:51px;min-width:1200px;background:rgb(23, 22, 22); }
.header_con{ width:1200px; min-width:1200px; height:50px; margin:0 auto;}
.new-logo img{ width:36px; height:36px;margin-top:7px; border-radius:3px; }
.new-logo p{ font-size: 18px; color:#fff; line-height: 50px; }
a.new-nav-a{ display: block; font-size: 14px; line-height: 50px; color:#fff;}
a:hover.new-nav-a{ color:#ff7500; text-decoration: none;}
.header-search{border-radius:3px; background:#fff;}
.header-search a{text-decoration: none; color:#666!important;}
.header-search a:hover{color:#ff7500!important;}
input.header-search-input{ width:150px; height:30px; padding:0 5px; border-style: none; border: none;outline:none;}
.innner-nav{ margin-left:40px;}
.innner-nav li{float:left; margin-right:40px;}
.innner-nav li a{ display: block; color:#fff; padding:0 10px; }
.inner-btnbox02{ width:270px; margin: 30px auto 0;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
.inner-nav-mes{ font-size:16px; color:#fff; margin-right:35px; margin-top:18px; }
.inner-nav-cir{ background:#ff6530; color:#fff; border-radius:15px;padding:0 5px; display: inline-block; font-size:10px; height:17px; line-height:17px;}
.inner-nav-user{ width: 75px; height: 45px; margin-top:5px; position: relative; padding-left: 0px;}
.inner-nav-user-img{ width: 40px; height: 40px; border-radius:50px;}
select.header-search-select{ border:none; font-size:14px; padding:5px; background: none;}
.edu-unlogin-nav a{ color:#fff!important; font-size:14px; line-height:50px;}
.edu-unlogin-nav a:hover{ color:#3b94d6;}
.edu-unlogin-nav{ font-size:12px; color:#fff; line-height:50px;}
.task-user-dropdown{font-size:12px; line-height: 1.9; width:120px; background-color:#fff; border-radius:3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:relative; top:5px; right:44px; display: none; z-index:999;}
.task-user-dropdown font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -13px;left:100px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.task-user-dropdown-nav { padding-top:5px; }
.task-user-dropdown-nav li { display: inline-block; text-align: center; width:100%; height: 30px; line-height: 30px;}
.task-user-dropdown-nav li:hover{ background:#eee;}
.task-user-dropdown-nav li:hover a{color: #FF7500!important;}
.task-line{ display: block; height: 1px!important; line-height: 1px!important; border-bottom:1px solid #eee; margin:0;}
.inner-nav-user:hover .task-user-dropdown{ display:block;}
dropdown { display: inline-block; height:30px; line-height:1.9; font-size:12px; }
dropdown label, dropdown ul li{ display: block; width:42px; padding:4px 10px; text-align: center;border-radius:3px; color:#666;}
dropdown ul li:hover{background: #eee; color:#666;cursor: pointer;}
dropdown label{color: #666;border-radius: 3px 0 0 3px; position: relative; z-index: 2; width:50px; text-align: center; height:22px;}
dropdown input{display: none;}
dropdown input:checked + label{ background: #fff;color:#666;}
dropdown ul{ position: absolute; visibility: visible; opacity: 1; top: 38px; background: #fff; z-index: 99; border-radius:3px;}
$colors: #fff, #0072B5, #2C3E50;
@for $i from 1 through length($colors) {
dropdown ul li:nth-child(#{$i}) {
border-left: 4px solid nth($colors, $i);
.fa{
color: nth($colors, $i);
}
&:hover {
background: nth($colors, $i);
color: white;
.fa{
color: white;
}
}
}
}
.edu-dropdown{ position: relative; padding:0 15px; }
.edu-dropdown-menu{ background-color:#fff; text-align: center; border-radius:3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; top:25px; left:0px; z-index: 999; display:none;}
.edu-dropdown-menu li{ height:30px; line-height:30px; display: block; padding:0 15px; text-align: left;}
.edu-dropdown-menu li label{ cursor: pointer;}
.edu-dropdown-menu li:hover{ color: #FF7500!important;}
/*.edu-dropdown:hover .edu-dropdown-menu{ display: block;}*/
.animate{ -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -ms-transition: all .3s;
transition: all .3s; backface-visibility:hidden; -webkit-backface-visibility:hidden; /* Chrome and Safari */ -moz-backface-visibility:hidden; /* Firefox */ -ms-backface-visibility:hidden; /* Internet Explorer */}
/* 底部 */
.footer{width:100%; height:100px; background-color:#fff; }
.footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; }
.footer_con-inner{ width: 300px; margin:0px auto;}
.footer_con-inner li a{ font-size: 16px; color: #888;display: block;padding:0 15px; border-right: solid 1px #888;}
.footer_con-inner li a:hover{text-decoration: underline;}
.footer_con-p{ color: #888; margin-top:10px;}
.inner-footer{ width: 100%; min-width:1200px; background:#323232; padding-bottom:30px;}
.inner-footer_con{ width: 1200px; margin: 0 auto;}
.inner-footer-nav{ height: 50px; border-bottom:1px solid #47494d;}
.inner-footer-nav li a{ float: left; margin-right:15px; font-size: 14px; color: #888; line-height: 50px;}
.saoma-box{ position: relative;}
.saoma-img-box{ position: absolute; top:-300px; left: -86px; border-radius:3px; background:#fff; padding:15px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display: none;}
.saoma-box li:hover ul{display:block; }
.img-show{ width:50px; height:50px; border-radius:50px; }
.saoma-img-box font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top:289px;left: 103px; border-style:solid; border-color:#fff transparent transparent transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.inner-footer-p-big{ display: block; height: 50px; line-height: 50px; color:#888; font-size: 16px; border-left:2px solid #888; padding-left:15px;}
.inner-btnbox02{ width:270px; margin: 30px auto 0;}
.new-container-inner02{width:1200px; margin:0px auto; padding:50px 0;}
img.edu-footer-logo{ height: 50px;}
/************布局 byLB****************/
.panel-content{ width: 1200px; margin:20px auto; background:#eaebec;}
.panel-contentss{ width: 1200px; margin:10px auto; margin-bottom:20px; background:#fff;}
/************讨论区20170321 byLB****************/
.panel-inner-fourm{ padding:20px; border-bottom:1px solid #eee;}
.panel-inner-fourm:hover{ background:#EFF9FD;}
.nobg:hover{ background:#fff;}
a.panel-list-title,.panel-list-title { display:inline-block; font-size: 16px; color: #333; font-weight:normal; max-width:82%;}
a:hover.panel-list-title{color:#FF7500;}
.panel-list-img{ width: 60px; height: 60px; border-radius:100px;}
a.panel-name-small{ display: inline-block; max-width:100px; color:#29bd8b; font-size:12px; }
.panel-list-infobox{ width: 92%; margin-left:8%; margin-top:-70px;}
.panel-lightgrey,.panel-lightgrey span{ font-size:12px; color:#888;}
.panel-inner-info{ width: 93%; margin-left:7%;}
.panel-bg-grey{ padding:5px 0;background:#f6f6f6; width: 100%; color:#666;}
.panel-list-nodata{ width: 420px; margin:100px auto; text-align: center;}
/*班级讨论区panel 2017/07/20 cs*/
.panel-content-box{background: #FFFFFF;}
.panel-content-line{width: 90%;margin: 30px 5%;}
.panel-content-line .panel-line-left{width: 8%;text-align: right;}
.panel-content-line .panel-content-label{height: 40px;line-height: 40px}
.panel-content-line .panel-content-input{width: 90%;height: 28px;padding: 5px;}
.panel-content-line .panel-content-ta{width: 90%;min-height: 148px;padding: 5px;}
/* 回复评论 */
.panel-comment_item{ width: 100%; }
.panel-comment_item .t_area{ color:#888;}
.comment_item_cont{ padding:15px; border-bottom:1px solid #e3e3e3;}
.comment_item_cont .J_Comment_Face{height: 50px}
.comment_item_cont .J_Comment_Face img{ width:50px; height:50px; border-radius:100px; }
.panel-comment_item .t_content{ width:93%; margin-left:15px;}
.panel-comment_item a.content-username {font-size:14px; margin-right:15px; display:inline-block; max-width:100px;color: #888888}
.J_Comment_Info{height: 20px;line-height: 22px;}
/*.panel-comment_item a:hover.content-username{color:#FF7500;}*/
.panel-comment_item .orig_user img{width:40px; height:40px;border-radius:100px; }
.panel-comment_item .reply-right{ float:right; position:relative;}
.panel-comment_item .reply_iconup02{ position:absolute; top:22px; left:14px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
.panel-comment_item .comment_orig_content{margin:10px 0; color:#999;}
.panel-comment_item .comment_orig_content .comment_orig_content{margin-top:0; color:#666;}
.panel-comment_item .orig_cont{ border:solid 1px #F3DDB3; background:#FFFEF4; padding:4px;color:#999;margin-top:-1px; }
.panel-comment_item .orig_cont_sub{ border-top:0}
.panel-comment_item .comment_orig_content .orig_index{ float:right; color:#666; font-family:Arial; padding-right:5px;line-height:30px;}
.panel-comment_item .comment_orig_content .orig_user{ margin:10px 15px 10px 5px;}
.panel-comment_item .comment_orig_content .orig_user span{ color:#999; padding-right:5px;}
.panel-comment_item .comment_orig_content .orig_content{padding:5px 0px 5px 0px;line-height:24px; color:#333; }
.panel-comment_item .orig_right{ width:80%; margin-top:5px;}
.panel-comment_item .orig_right img{max-width:100%;}
.panel-comment_item a.comment_ding_link{ height:24px;line-height:24px;display:inline-block;padding-left:2px;vertical-align:middle; color:#333; }
.panel-comment_item a:hover.comment_ding_link{ color:#269ac9;}
.panel-comment_item .comment_ding_link span{display: inline-block;padding: 0 0px 0 8px;}
.panel-comment_item .comment_ding_link em{font-style: normal;font-family:arial;}
.panel-comment_item .comment_reply_link{ display:inline-block; width:50px; height:24px;line-height: 24px; vertical-align:middle;text-align: center;}
.panel-comment_item .comment_reply_link:link,.comment_reply_link:visited{color:#333;text-decoration: none;}
.panel-comment_item .comment_content{ color:#666;}
.comment_content img,.orig_content img{max-width: 100%}
.panel-comment_item .t_txt{ margin-top:10px;}
.panel-comment_item .orig_reply_box{border-top:1px solid #e3e3e3; width:100%;padding: 15px 0px 0px 0;margin-top: 5px;}
.panel-comment_item .orig_textarea{width:90%; margin-bottom:10px;}
.panel-comment_item .orig_textarea02{ border:1px solid #ccc; background-color:#fff; width:92%; margin-bottom:10px;}
.panel-comment_item .orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
.panel-comment_item .orig_sub:hover{ background:#297fb8;}
.panel-comment_item .orig_cont_hide{ text-align:center; width:100%; display:block; font-size:14px; color:#666; border-bottom:1px solid #F3DDB3; padding:8px 0;}
.panel-comment_item .orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}
.orig_reply{ font-size: 12px; }
.panel-mes-head{ padding:10px; border-bottom:1px solid #eee;}
.homepagePostReplyPortrait a img{border-radius: 100px;}
/* 表格 */
.panel-new-table { width:100%; text-align: center; }
.panel-new-table tr th{ color:#333; height: 50px;line-height:50px; }
.panel-new-table tr th,.panel-new-table tr td{ border-bottom:1px solid #eee; }
.panel-new-table tr td{color:#666; height: 40px; line-height:40px;}
.panel-table-pd15 tr td{ padding:15px 0;}
.panel-new-table tbody tr:hover{ background:#f9f9f9;}
a.panel-table-name{display:block; max-width:100px;text-align:center;}
a.panel-table-title{display:block; max-width:240px;text-align:center;}
.table-num{ width:5%; text-align: center;}
/* 滑动条 */
.panel-slider-bg{ width:240px; height: 15px; border-radius:15px; background:#f1f2f7; }
.panel-slider-inner00{ display:block; width:0%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner01{ display:block; width:10%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner02{ display:block; width:20%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner03{ display:block; width:30%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner04{ display:block; width:40%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner05{ display:block; width:50%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner06{ display:block; width:60%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner07{ display:block; width:70%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner08{ display:block; width:80%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner09{ display:block; width:90%; height: 15px; border-radius:15px; background:#29bd8b;}
.panel-slider-inner10{ display:block; width:100%; height: 15px; border-radius:15px; background:#29bd8b;}
/* 翻页 */
.panel-pages a{ display: inline-block; border:1px solid #d1d1d1; color:#888; float:left;text-align:center; padding:0 10px; margin-right:5px; height: 30px; line-height: 30px; }
.panel-pages a:hover,.panel-pages .active{ background-color:#29bd8b; border:1px solid #29bd8b;color:#fff; }
.panel-pages{ width: 350px; margin:20px auto;}
/* 翻页*/
.pages_right_min a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 10px; line-height:1.9; margin: 0 5px;}
.pages_right_min a.pages-border-right{border-right:1px solid #d1d1d1; }
.pages_right_min a:hover,.pages_right_min a.active{ background-color:#FC7033; color:#fff!important;border:1px solid #FC7033}
.pages_right_min li{float: left;}
/* 个人主页翻页 */
.pages_user_show a:hover,.pages_user_show a.active{ background-color:#FC7033;; color:#fff;border: 1px solid #FC7033;}
.pages_user_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888; float:left;text-align:center; padding:3px 10px; line-height:1.9; margin: 0 5px;}
.pages_user_show li{float: left; list-style-type: none;}
.pages_user_show ul li{list-style-type: none !important;}
.pages_user_show ul li a{color:#888}
/* 小翻页 */
.pages_little_show a:hover,.pages_little_show a.active{ background-color:#FC7033;; color:#fff!important;border:1px solid #FC7033}
.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;}
.pages_little_show li{float: left;}
/* 搜索*/
.panel-search{ position: relative;}
input.panel-search-input{ height: 30px; width:300px; color: #666;}
.panel-search-btn{ position: absolute; top:2px; right:10px;}
/* 表单*/
.label-w20{ width:20%!important;}
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; }
.panel-form input,.panel-form textarea,.panel-form select{ border:1px solid #e2e2e2;color:#666;line-height: 1.9; background:#fff;}
.panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; border-radius:3px;}
input.panel-form-width-690{ padding:5px;width:90%; height:40px; }
input.panel-form-width-100{ padding:5px;width:100%; height:40px;}
input.panel-form-width-45{ padding:5px;width:44.5%; height:40px; }
input.panel-form-width-50{ padding:5px;width:44.5%; height:25px; }
input.panel-form-width-60{ padding:5px;width:60%; height:40px; }
textarea.panel-form-width-100{ padding:5px;width:100%; height:150px; }
textarea.panel-form-width-690{ padding:5px;width:90%; height:150px; }
.panel-form-width-670{ width: 670px; padding:5px;}
.panel-form-height-150{ height: 150px;}
.panel-form-height-30{height: 30px;}
.task-bg-grey{ background:#f3f3f3; width:90%; min-width:700px; padding:10px; border:1px solid #f3f3f3; color:#888;}
.task-bg-grey02{ background:#f3f3f3; width:80%; min-width:700px; padding:7px 10px; border:1px solid #f3f3f3; color:#888;}
input.task-form-10,textarea.task-form-10,select.task-form-10,.task-form-10{padding:5px;width:10%;box-sizing: border-box}
input.task-form-15,textarea.task-form-15,select.task-form-15,.task-form-15{padding:5px;width:15%;box-sizing: border-box}
input.task-form-20,textarea.task-form-20,select.task-form-20,.task-form-20{padding:5px;width:20%;box-sizing: border-box}
input.task-form-30,textarea.task-form-30,select.task-form-30,.task-form-30{padding:5px;width:30%;box-sizing: border-box}
input.task-form-35,textarea.task-form-35,select.task-form-35,.task-form-35{padding:5px;width:35%;box-sizing: border-box}
input.task-form-40,textarea.task-form-40,select.task-form-40,.task-form-40{padding:5px;width:40%;box-sizing: border-box}
input.task-form-45,textarea.task-form-45,select.task-form-45,.task-form-45{padding:5px;width:45%;box-sizing: border-box}
input.task-form-50,textarea.task-form-50,select.task-form-50,.task-form-50{padding:5px;width:50%;box-sizing: border-box}
input.task-form-60,textarea.task-form-60,select.task-form-60,.task-form-60{padding:5px;width:60%;box-sizing: border-box}
input.task-form-70,textarea.task-form-70,select.task-form-70,.task-form-70{padding:5px;width:70%;box-sizing: border-box}
input.task-form-80,textarea.task-form-80,select.task-form-80,.task-form-80{padding:5px;width:80%;box-sizing: border-box}
input.task-form-90,textarea.task-form-90,select.task-form-90,.task-form-90{padding:5px;width:90%;box-sizing: border-box}
input.task-form-100,textarea.task-form-100,select.task-form-100,.task-form-100{padding:5px;width:100%;}
input.task-height-40,textarea.task-height-40,.task-height-40,select.task-height-40{height:40px;}
input.task-height-30,textarea.task-height-30,.task-height-30,select.task-height-30{height:32px;}
input.task-height-220,textarea.task-height-220,.task-height-220{height:220px;}
input.task-height-150,textarea.task-height-150,.task-height-150{height:150px;}
input.task-height-100,textarea.task-height-100,.task-height-100{height:100px;}
input.task-height-80,textarea.task-height-80,.task-height-80{height:80px;}
/*头像下拉弹框*/
.my_account_info{ width:160px; background-color:#fff; border-radius: 3px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position:absolute; font-size: 14px; top:46px; left:-97px;display: none; z-index:999;}
.my_account_info li a{ color: #888;}
.my_account_info font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); }
.my_account_info li{ padding-left: 5px; line-height: 1.5;}
.li_bottom_border{ border-bottom:1px solid #eee;}
a.task-index-name{ display: inline-block; max-width:80px;}
.task-index-name{ display: inline-block; max-width:80px;}
/*滑块验证*/
.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px; line-height: 45px; text-align: center;border-radius: 4px;}
.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;}
.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;}
.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;}
.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;}
.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;}
/*新建新增*/
/*.edu-con-top{ padding:10px 0; background:#fff; border-bottom:1px solid #eee;font-size:16px; }*/
/*.edu-con-top h2{ font-size:16px;}*/
/*.edu-con-bg01{ width: 100%; background:#fff;}*/
/*.edu-con-top .color-grey{ color:#666!important;}*/
/*附件上传的样式*/
.atta_input{ width: 980px; white-space: nowrap; text-overflow:ellipsis;}
/*作业描述、帖子内容*/
.upload_img img{max-width: 100%;}
.table_maxWidth table {max-width: 642px;}
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;}
/*数据为空公共页面*/
img.edu-nodata-img{ width:200px; margin:50px auto 20px; display: block;}
.edu-nodata-p{ font-size: 16px; text-align: center; color:#888;border-bottom:none!important;}
/* new tab */
.edu-tab{ width: 100%; background:#fff;}
#edu-tab-nav{height:47px;background: #fff;}
#edu-tab-nav li.new-tab-nav {float:left; width: 150px; text-align:center;height:48px;line-height:48px;border-top-right-radius:5px;border-top-left-radius:5px; }
#edu-tab-nav li a{font-size:14px; }
#edu-user-tab-nav{height:40px;background: #fff; border-bottom:2px solid #FC7033;}
#edu-user-tab-nav li.new-tab-nav {float:left; width: 120px; text-align:center;height:42px;line-height:42px;border-top-left-radius: 5px;border-top-right-radius:5px}
#edu-user-tab-nav li a{font-size:14px; }
.edu-new-tab-hover { background:#5faee3; }
.edu-user-tab-hover{background:#FC7033;}
.edu-user-tab-hover a{color:#fff!important;}
.edu-new-tab-hover a{color:#fff!important;}
.edu-class-con-list:hover{ background:#EFF9FD;}
.edu-bg-shadow{box-shadow: 0px 0px 5px rgba(146, 153, 169, 0.2);}
a.task-btn-line{display: inline-block;font-weight: bold;padding: 0 12px;color: #666;background: #fff;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; border:1px solid #ccc;}
a:hover.task-btn-line{ border:1px solid #3498db;background:#3498db;color: #fff;}
/*阴影*/
.user_bg_shadow{-webkit-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);box-shadow: 0 0 8px 0 rgba(142,142,142,.1);}/*四边阴影*/
.user_bg_shadow_notop{-webkit-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);}/*没有上边阴影*/
/*阴影+边框*/
.shadow_border{border:1px solid #eee;-webkit-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 0 8px 0 rgba(142,142,142,.1);box-shadow: 0 0 8px 0 rgba(142,142,142,.1);}
.shadow_border_notop{border:1px solid #eee;-webkit-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);-moz-box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);box-shadow: 0 3px 8px 0 rgba(142,142,142,.1);}
.user_bg_shadow01{-webkit-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);-moz-box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);box-shadow: 0 1px 2px 2px rgba(123, 123, 123, 0.15);}
.user_bg_shadow02{-webkit-box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);-moz-box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);box-shadow: 0 2px 8px 0 rgba(123, 123, 123, 0.15);}
.box_bg_shandow {box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);}
/*新增的公用样式*/
.box-boxshadow{box-shadow: 3px 3px 10px rgba(146, 153, 169, 0.2);}
.prop-notice-info{padding: 10px;border:1px solid #F3DDB3;background-color: #FFFEF4;}
.prop-notice-info ol{list-style-type: disc;list-style-position:inside}
.prop-notice-info ol li{list-style-type: disc;color: #ff6532;margin-bottom:0!important;}
/*input框移出后没有内容将边框阴影变为红色*/
.notinput_bg_shadow{border: none;box-shadow: 0px 0px 4px rgba(227,53,37,1);}
/*设置input框的placehoder的字体颜色*/
input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc}
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
/*班级讨论区置顶的样式*/
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;}
.btn-cir:hover{background:#fff;color:#333333}.all_work_border{border: 1px solid #4c515d;}/*TPI全部任务的数量需要加一个边框*/
.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1}
.btn-cir-red{background:red;color: #fff; font-weight: normal;}
.btn-cir-red:hover{background:red;}
.btn-cir-orange {background: #ff7500; color: #fff; font-weight: normal;border: 1px solid #ff7500}
.btn-top{display: inline-block;padding: 0px 5px;line-height: 20px;font-size: 12px;border-radius: 3px;}
.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;}
/*圆形绿色背景---------22*/
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
/*圆形绿色背景------------------18*/
.panel-inner-icon18{width: 18px;height: 18px;line-height: 18px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
/*---------------块右上角的三角形,颜色为浅橙色*/
.triangle-topright {position: absolute;right: -1px;top:0px;width: 0;height: 0;border-top: 35px solid #FF9E6A;border-left: 60px solid transparent;z-index: 1}
.triangle-font{position: absolute;right: 1px;top: 2px;z-index: 2;font-size: 12px;color: white;transform: rotate(31deg);}
.triangle-font2{position: absolute;right: 1px;top: -5px;z-index: 2;font-size: 12px;color: white;transform: rotate(31deg);}
/* colorbox
*******************************************************************************/
/*
Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:99999; overflow:hidden;}
#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
#cboxOverlay{background:#fff;}
#colorbox{outline:0;}
#cboxTopLeft{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat 0 0;}
#cboxTopCenter{height:25px; background:url(/images/colorbox/border1.png) repeat-x 0 -50px;}
#cboxTopRight{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat -25px 0;}
#cboxBottomLeft{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat 0 -25px;}
#cboxBottomCenter{height:25px; background:url(/images/colorbox/border1.png) repeat-x 0 -75px;}
#cboxBottomRight{width:25px; height:25px; background:url(/images/colorbox/border1.png) no-repeat -25px -25px;}
#cboxMiddleLeft{width:25px; background:url(/images/colorbox/border2.png) repeat-y 0 0;}
#cboxMiddleRight{width:25px; background:url(/images/colorbox/border2.png) repeat-y -25px 0;}
#cboxContent{background:#fff; overflow:hidden;}
.cboxIframe{background:#fff;}
#cboxError{padding:50px; border:1px solid #ccc;}
#cboxLoadedContent{margin-bottom:20px;}
#cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
#cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
#cboxLoadingOverlay{background:#fff url(/images/colorbox/loading.gif) no-repeat 5px 5px;}
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
#cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
#cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
#cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
/*-----下拉框--------*/
.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;}
.down-select p{height: 35px;line-height: 35px;padding-left: 5px;}
.down-select p:hover{background: #f3f4f6}
/*课程、实训的条状样式*/
.homepage-list-show p{height:70px;line-height:70px;}
.homepage-list-show p:nth-child(odd){background:#fafbfb;}
.homepage-list-show p .first{width:58%;display:inline-block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.homepage-list-show p .hasmargin{width:23%;display:inline-block;text-align: center;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.homepage-list-show p .haspadding{width:16.7%;display:inline-block;margin-right:12%;color:#888;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.homepage-list-show p .last{width:8.33%;display:inline-block;color:#888;cursor: pointer; display: none;}
.homepage-list-show p .last:hover{color:#5faee3;}
.homepage-list-show p .last:hover .blue{color:#5faee3;}
/*-----课程名称下拉框--------*/
.course_list_ul,.down-list{ overflow-y: scroll;display: none;position: absolute;top:40px;left: -1px;width: 100% !important;border:1px solid #eeeeee;background: #FFFFFF;max-height: 150px;z-index: 10}
.course_list_ul li{height:20px;padding:5px 10px;clear:both;line-height:28px;margin-bottom: 0 !important;cursor: pointer;}
.down-list li{text-align: left;outline: none;padding: 5px 10px;clear: both;line-height: 22px!important;margin-bottom: 0 !important;cursor: pointer;width: 100%;box-sizing: border-box;height: 30px;border: none!important;}
.down-list li:hover{background: #eee}
.down-list{top:32px}
.unit-part{border:1px solid #ccc;padding: 0px 8px;border-radius: 5px;margin-right: 10px}
.unit-part input{border: none!important;text-align: left;width:auto;outline: none}
/*-----试卷提交状态--------*/
.post_status_btn{display: block;float: left;padding: 0px 5px;font-size: 12px;color: #FFFFFF;border-radius: 4px;height: 20px;line-height: 20px;;}
.post_btn_green{background: #29bd8b;border: 1px solid #29bd8b!important;color: #fff;}
.post_btn_green_q{background: #5ECFBA;border: 1px solid #5ECFBA!important;color: #fff;}
.post_btn_orange{background: #FF7500;border: 1px solid #FF7500!important;color: #fff;}
.post_btn_red{background: #ee4a1f;border: 1px solid #ee4a1f!important;color: #fff;}
.post_btn_grey{background: #e4e4e3;border: 1px solid #e4e4e3!important;}
.post_btn_white{background: #ffffff;}
/*评阅状态*/
.checkstatus_box_small{width: 10px;height: 10px;display: block;float: left;margin-right: 3px;}
.checkstatus_box_big{cursor: default;width: 30px;height: 30px;line-height: 30px;text-align: center;margin-right: 10px;border:1px solid #CCCCCC;display: block;float: left;margin-bottom: 10px}
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
/*个人主页头部认证圆形背景*/
.user-info-span{border-radius: 50%;float:left;background: #F3F5F7;text-align: center;width: 23px;height: 23px;line-height: 23px;margin-top: 3px;margin-right: 5px}
/*试卷答题倒计时*/
.time_panel span.factorial{float: left;display: block;line-height: 35px;padding: 0px 3px;}
.time_panel span.time{float: left;display: block;color: #ffffff;background-color: #333333;font-size: 16px;border-radius: 5px;letter-spacing: 1px;width: 33px;text-align: center;line-height: 35px;height: 35px;}
.hidemsg{overflow: hidden;cursor: pointer}
.hidemsg div{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
opacity:0.4;
background-color: #ffffff;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
-o-border-radius: 100%;
-ms-border-radius: 100%;
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
-o-animation-fill-mode: both;
width: 80px;
height: 80px;
-webkit-animation: ball-scale 1s 0s ease-in-out infinite;
-moz-animation: ball-scale 1s 0s ease-in-out infinite;
-ms-animation: ball-scale 1s 0s ease-in-out infinite;
-o-animation: ball-scale 1s 0s ease-in-out infinite;
animation: ball-scale 1s 0s ease-in-out infinite;
}
@keyframes ball-scale{
0%{width: 0px;height: 0px}
100%{width: 80px;height: 80px}
}
/*-------------------个人主页关注和粉丝列表改版 以及TPM合作者部分改版 2018/01/15-------------------------*/
.-task-con-int .favour .fens-table-list{display: flex;width:21.29%;margin:0px 1.5% 1.5% 0px;min-height: 125px;border: 1px solid #EEEEEE;padding: 10px;background: #f9fbfd}
.-task-con-int .favour .fens-table-list:nth-child(4n+1){margin:0px 1.5% 1.5% 1.5%;}
.-task-con-int .favour .fens-table-list .touxiang{border-radius: 50%;overflow: hidden;}
.white-icon-ring{width: 25px;height: 25px;background: #ffffff;border-radius: 50%;text-align: center;line-height: 25px;}
a.btn-focus{display: block;width:80px;height: 35px;line-height: 35px;border-radius: 4px;border:1px solid #EEEEEE;text-align: center;cursor: pointer;background: #ffffff}
a.btn-focus:hover{color: #FFFFFF!important;background:#FC7033;border: 1px solid #FC7033 }
.fans-name{max-width: 100px;word-break: break-all;overflow: hidden;height: 26px;text-overflow: ellipsis;white-space: nowrap;}
.school-name{max-width: 196px;word-break: break-all;overflow: hidden;height: 26px;text-overflow: ellipsis;white-space: nowrap;}
.fans_del{position: absolute;right: 12px;top: 12px;cursor: pointer;
text-align: center;}
.fans_del i{color: #b5b5b5}
.fans_del:hover i{color: #ff7500!important;}
.-task-con-int .favour .p2{line-height:90px;text-align:center;}
.-task-con-int .favour .p2:hover .changecolor{color:#5faee3;}
.-task-con-int .favour .fens{position:relative;}
.-task-con-int .favour .fens .many{position:absolute;right:22px;top:-35px;}
.-task-con-int .favour .fens .list{width:100px;text-align:center;padding-top:5px;}
.-task-con-int .favour .fens .list dt{margin:20px;margin-bottom:5px;}
.-task-con-int .favour .fens .touxiang{border-radius:28px;overflow:hidden;}
/*选择实训的弹框*/
.shixun_work_div{overflow-y: auto;max-height: 90px;}

@ -0,0 +1,32 @@
@font-face {
font-family: Roboto;
src: url("../fonts/roboto-light.eot");
src: url("../fonts/roboto-light.eot?#iefix") format("embedded-opentype"),url("../fonts/roboto-light.woff2") format("woff2"),url("../fonts/roboto-light.woff") format("woff"),url("../fonts/roboto-light.ttf") format("truetype");
font-weight: 300
}
@font-face {
font-family: Roboto;
src: url("../fonts/roboto-light.eot");
src: url("../fonts/roboto-light.eot?#iefix") format("embedded-opentype"),url("../fonts/roboto-light.woff2") format("woff2"),url("../fonts/roboto-light.woff") format("woff"),url("../fonts/roboto-light.ttf") format("truetype");
font-weight: 400
}
@font-face {
font-family: Roboto;
src: url("../fonts/roboto-light.eot");
src: url("../fonts/roboto-light.eot?#iefix") format("embedded-opentype"),url("../fonts/roboto-light.woff2") format("woff2"),url("../fonts/roboto-light.woff") format("woff"),url("../fonts/roboto-light.ttf") format("truetype");
font-weight: 500
}
@font-face {
font-family: Roboto;
src: url("../fonts/roboto-light.eot");
src: url("../fonts/roboto-light.eot?#iefix") format("embedded-opentype"),url("../fonts/roboto-light.woff2") format("woff2"),url("../fonts/roboto-light.woff") format("woff"),url("../fonts/roboto-light.ttf") format("truetype");
font-weight: 700
}
@font-face {
font-family: NextIcon;
src: url("../fonts/font_455447_4gwixc8l0tb21emi.eot");
src: url("../fonts/font_455447_4gwixc8l0tb21emi.eot?#iefix") format("embedded-opentype"),url("../fonts/font_455447_4gwixc8l0tb21emi.woff") format("woff"),url("../fonts/font_455447_4gwixc8l0tb21emi.ttf") format("truetype"),url("../fonts/font_455447_4gwixc8l0tb21emi.svg#articonsvg") format("svg")
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,539 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path stroke viewBox IE
normalize.css */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 159 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 177 KiB

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 188 KiB

@ -0,0 +1,170 @@
{
"name": "educoder",
"version": "0.1.0",
"private": true,
"dependencies": {
"@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0",
"antd": "^3.20.1",
"array-flatten": "^2.1.2",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",
"babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-react-app": "^3.1.1",
"babel-runtime": "6.26.0",
"bundle-loader": "^0.5.6",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"classnames": "^2.2.5",
"clipboard": "^2.0.4",
"codemirror": "^5.46.0",
"connected-react-router": "4.4.1",
"css-loader": "0.28.7",
"dotenv": "4.0.0",
"dotenv-expand": "4.2.0",
"echarts": "^4.2.0-rc.2",
"eslint": "4.10.0",
"eslint-config-react-app": "^2.1.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"immutability-helper": "^2.6.6",
"install": "^0.12.2",
"jest": "20.0.4",
"lodash": "^4.17.5",
"loglevel": "^1.6.1",
"material-ui": "^1.0.0-beta.40",
"moment": "^2.23.0",
"monaco-editor": "^0.15.6",
"monaco-editor-webpack-plugin": "^1.7.0",
"npm": "^6.10.1",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.6.1",
"qs": "^6.6.0",
"raf": "3.4.0",
"rc-form": "^2.1.7",
"rc-pagination": "^1.16.2",
"rc-rate": "^2.4.0",
"rc-select": "^8.0.12",
"rc-tree": "^1.7.11",
"rc-upload": "^2.5.1",
"react": "^16.9.0",
"react-beautiful-dnd": "^10.0.4",
"react-codemirror": "^1.0.0",
"react-codemirror2": "^6.0.0",
"react-content-loader": "^3.1.1",
"react-dev-utils": "^5.0.0",
"react-dom": "^16.9.0",
"react-hot-loader": "^4.0.0",
"react-infinite-scroller": "^1.2.4",
"react-loadable": "^5.3.1",
"react-monaco-editor": "^0.25.1",
"react-player": "^1.11.1",
"react-redux": "5.0.7",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-url-query": "^1.4.0",
"redux": "^4.0.0",
"redux-thunk": "2.3.0",
"showdown": "^1.8.6",
"store": "^2.0.12",
"style-loader": "0.19.0",
"styled-components": "^4.1.3",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
"webpack-manifest-plugin": "1.3.2",
"webpack-parallel-uglify-plugin": "^1.1.0",
"whatwg-fetch": "2.0.3",
"wrap-md-editor": "^0.2.20"
},
"scripts": {
"start": "node --max_old_space_size=15360 scripts/start.js",
"build": "node --max_old_space_size=15360 scripts/build.js",
"concat": "node scripts/concat.js",
"gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json",
"ana": "webpack-bundle-analyzer ./stats.json",
"analyze": "npm run build -- --stats && webpack-bundle-analyzer build/bundle-stats.json",
"analyz": "NODE_ENV=production npm_config_report=true npm run build"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"mjs",
"js",
"json",
"web.jsx",
"jsx",
"node"
]
},
"babel": {
"presets": [
"react",
"react-app"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "lib",
"style": "css"
},
"ant"
],
"syntax-dynamic-import"
]
},
"eslintConfig": {
"extends": "react-app"
},
"proxy": "http://localhost:3000",
"port": "3007",
"devDependencies": {
"@babel/runtime": "7.0.0-beta.51",
"babel-plugin-import": "^1.11.0",
"concat": "^1.0.3",
"happypack": "^5.0.1",
"ice-plugin-css-assets-local": "^0.1.2",
"webpack-bundle-analyzer": "^3.0.3",
"webpack-parallel-uglify-plugin": "^1.1.0"
}
}

@ -1,111 +0,0 @@
.CodeMirror-merge {
position: relative;
white-space: pre;
}
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
min-height:50px;
}
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
.CodeMirror-merge-pane {
display: inline-block;
white-space: normal;
vertical-align: top;
}
.CodeMirror-merge-pane-rightmost {
position: absolute;
right: 0px;
z-index: 1;
}
.CodeMirror-merge-gap {
z-index: 2;
display: inline-block;
height: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
position: relative;
background: #515151;
}
.CodeMirror-merge-scrolllock-wrap {
position: absolute;
bottom: 0; left: 50%;
}
.CodeMirror-merge-scrolllock {
position: relative;
left: -50%;
cursor: pointer;
color: #d8d8d8;
line-height: 1;
}
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
position: absolute;
left: 0; top: 0;
right: 0; bottom: 0;
line-height: 1;
}
.CodeMirror-merge-copy {
position: absolute;
cursor: pointer;
color: #ce374b;
z-index: 3;
}
.CodeMirror-merge-copy-reverse {
position: absolute;
cursor: pointer;
color: #44c;
}
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-chunk { background: #9a6868; }
.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
.CodeMirror-merge-r-connect { fill:#9a6868;}
.CodeMirror-merge-l-chunk { background: #eef; }
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
.CodeMirror-merge-collapsed-widget:before {
content: "(...)";
}
.CodeMirror-merge-collapsed-widget {
cursor: pointer;
color: #88b;
background: #eef;
border: 1px solid #ddf;
font-size: 90%;
padding: 0 3px;
border-radius: 4px;
}
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }

@ -1,524 +0,0 @@
/************新版公共****************/
/************新版公共****************/
html{height:100%;}
/*.newContainer{ min-height:100%; height: auto !important; height: 100%; position: relative;}
.newMain{ margin: 0 auto; padding-bottom: 155px; }
.newFooter{ position: absolute; bottom: 0; width: 100%; height: 155px;background: #323232; clear:both; min-width: 1200px}
.newHeader{background: #46484c;width:100%; height: 50px; min-width: 1200px}*/
.w20_center{ width: 20px;text-align: center; }
.task-container{ min-width:1300px; margin:0 auto; background: #f5f9fc; position: relative;}
/*左侧导航*/
.leftbar{ height: 100%; background: #1f212d; width:80px;}
.user-info{ width:80px; height:100px; padding-top:15px;}
a.user-info-img{ display: block; width: 50px; height: 50px; margin:0 auto; }
a.user-info-img img{border-radius:100px;border:2px solid #666;}
a.user-info-img img:hover{border:2px solid #888;}
a.user-info-name{ display: block; font-size: 16px; color: #fff; max-width:100px; margin: 10px auto; text-align: center; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.leftnav-box{ width: 80px; height: 60px; background:#292b3a; padding:10px 0; margin-bottom:2px;}
a.leftnav-box-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; padding:10px 0; color:#575f6c;}
a:hover.leftnav-box-inner,a.leftnav-active{border-left:3px solid #3498db;color: #fff!important;}
a:hover.leftnav-box-inner .btn-cir{background:#fff;color:#333333}
a.leftnav-box-reset-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; color:#575f6c;}
a:hover.leftnav-box-reset-inner{border-left:3px solid #3498db;color: #fff!important;}
/*右侧头部*/
.rightbar-header{width: 100%; background:#282c37; height:60px; min-width:1000px;}
.rightbar-score{ margin-top: 17px; font-size: 14px; margin-right:20px;}
.rightbar-score li{ float: left; color:#fff; margin-right: 20px;}
.rightbar-score li a{ color:#fff;}
a.rightbar-pause{ color:#29bd8b; font-size: 18px; margin-right:15px; margin-top: 12px;}
.rightbar-h2{ color:#fff; margin:12px 0 0 20px; font-weight: normal;}
.rightbar{background:#f5f9fc; color:#333; position: relative;}
/*右侧内容*/
.content{ min-width:1000px; }
.content-row{ padding:15px; }
.content-info{ width:49.5%; min-width:250px;}
.content-editor{ width:49.3%; min-width:250px; margin-left:15px; }
.panel-header{ border-bottom:1px solid #eee; padding:10px 15px; color:#898989;}
.panel-header-border{ border:1px solid #eee; padding:10px 15px; border-bottom:none; }
/* tab */
.tab_content{ width: 100%; margin: 0 auto; background:#fff; }
#tab_nav {height:42px;background: #fff; border-bottom: 1px solid #EEEEEE}
#tab_nav li {float:left; padding:0 30px;text-align:center;height: 40px;line-height: 40px; }
#tab_nav li a{font-size:14px; }
.tab_hover {border-bottom:2px solid #3498db; background: #fff;color: #3498db}
/*.tab_hover_setting{background:#FC7033;}*/
.tab_hover a{ color:#3498db!important;}
/*.tab_hover_setting a{color:#fff;}*/
.undis {display:none;}
.dis {display:block;}
.tab-info{ }
.content-editor-inner{ overflow:auto;}
.tab-info-inner{ overflow:auto; height:600px; margin:0 0 0px 15px;padding-top: 15px}
.content-history-inner{height:120px; overflow:auto; padding:15px;}
.content-history{width:48.7%; min-width:500px; }
.history-success{ width: 100%; height:40px; line-height: 40px; background:#eef1f2; color:#666; }
.history-fail{ width: 100%; height:40px; line-height: 40px; background:#fdebeb; color:#e53238; }
.icon-fail{ display:inline-block; padding:0 8px; background:#e53238; color:#fff;}
.icon-success{ display:inline-block; padding:0 8px; background:#252e38; color:#fff;}
.info-partly{display: block;box-flex:1;flex:1;-webkit-flex:1;position: relative;}
.content-output{width:37.5%; min-width:200px; }
.content-submit{width:10%; min-width:135px; }
.content-submitbox{ width:120px; margin: 15px auto; height:135px;}
.panel-inner{ background:#EFF2F7; margin:15px; padding:15px;}
.panel-inner-title{ font-size: 14px; color: #666; max-width:85%; line-height:30px;word-wrap: break-word; margin-bottom: 10px}
.panel-footer{ min-width:1000px; height: 210px!important;}
/* 弹框 */
.task-popup-text-center{ text-align: center; color: #333;}
.task-popup-title{ border-bottom: 1px solid #eee; padding:10px 15px; }
.task-popup-submit{ margin: 0 auto 15px; width: 120px;}
/* TPM */
.task-header{ width: 100%;min-width:1200px; background:url("/images/task/task-bg-header.png");height: 180px;background-size: cover;display: flex;align-items: center;}
.task-header-info{ width: 1200px; margin: 0 auto; color:#fff}
.task-header-info h2 a,.task-header-info h2{ font-weight: normal;color:#fff;}
a.task-header-name{ max-width:200px;}
.task-header-title{ display: block; max-width:750px;word-wrap: break-word;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.task-header-nav{ width: 100%;min-width:1200px; height:50px;}
.task-header-navs{ width: 1200px; margin: 0 auto;}
.task-header-navs li{ float: left;}
.task-header-navs li{ display: block; height: 50px; padding:0 50px; color:#666; text-align: center; font-size: 16px; line-height: 50px;}
.task-header-navs li:hover,.task-header-navs li:hover a{ color:#FC7033!important;}
.task-header-navs li.active{border-bottom: 2px solid #FC7033;color:#FC7033;}
.task-header-navs li.active a{color:#FC7033!important;}
.task-header-navs li.active .edu-cir-grey,.task-header-navs li:hover .edu-cir-grey,.edu-cir-grey.active{background: #FF7500;color: #FFFFff}
.task-pm-content{ width: 1200px; margin: 0 auto; min-height:566px}
.task-pm-box{ width: 100%; background: #fff; border: 1px solid #e8e8e8;}
.task-paner-con{ padding:15px; color:#666; line-height:2.0;}
.task-paner-con img{ max-width: 100%}
.panel-form{margin:0 30px 0px 20px; padding:30px 0; }.panel-form li{ margin-bottom:20px; font-size: 14px; color:#666;}
.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; color: #666;}
.panel-form-label1{ display:inline-block; width:20%; min-width:90px; text-align:right; line-height:40px; }
.panel-form input,.panel-form textarea{ border:1px solid #e2e2e2;color:#666;line-height: 1.9;}
.panel-box-sizing{-moz-box-sizing: border-box; /*Firefox3.5+*/-webkit-box-sizing: border-box; /*Safari3.2+*/-o-box-sizing: border-box; /*Opera9.6*/-ms-box-sizing: border-box; /*IE8*/box-sizing: border-box; }
input.panel-form-width-690{ padding:5px;width:90%; height:40px; min-width:700px;}
input.panel-form-width-200{ padding:5px; height:40px; width:200px;}
input.panel-form-width-100{ padding:5px;width:100%; height:40px; min-width:700px;}
textarea.panel-form-width-100{ padding:5px;width:100%; height:150px; min-width:700px;}
textarea.panel-form-width-40{ padding:5px;width:100%; height: 40px; min-width:700px;}
textarea.panel-form-width-690{ padding:5px;width:90%; height:150px; min-width:700px;}
textarea.panel-form-width2-100{ padding:5px;width:100%; height:40px; min-width:700px;}
textarea.panel-form-width2-690{ padding:5px;width:90%; height:40px; min-width:700px;}
textarea.panel-form-width2-695{ padding:5px;width:95%; height:40px; min-width:700px;}
.panel-form-width-670{ width: 670px; padding:5px;}
.panel-form-height-150{ height: 150px;}
.panel-form-height-30{height: 30px;}
.task-bg-grey{ background:#f3f3f3!important; width:90%; min-width:700px; padding:10px; border:1px solid #f3f3f3;}
.task-bg-grey-ligh{line-height: 1.9;padding:5px 10px;}
.task-bg-grey li{ margin-bottom: 0}
.task-bd-grey{width:680px; padding:10 0px;}
.panel-form-width-690{ padding:5px;width:90%; min-height:40px; min-width:700px;}
input.task-tag-input{ border:none; background: none; height:30px; padding:0 5px; color:#888; line-height: 30px;}
textarea.task-textarea-pd{ padding-bottom: 0; padding-top:0;}
.task-setting-tab{ min-height:600px;}
.task-pd15-box{ padding:15px;}
.mb20{margin-bottom: 20px;}
input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f7;}
/* TPi全屏展示css */
.content-all-fix{ position: absolute; top:75px; left:15px; right:15px; z-index:99; height: 91%; width: 98.5%;}
.content-all-fix .big-tab-info-inner{ display: block; height:50%; overflow:auto; margin:15px 0 0px 15px; }
.content-half-fix{ min-width:450px; margin:0; position: absolute; top:75px; left:15px; z-index:99;}
.content-half-fix .content-history-inner{height:100%; overflow:auto; }
.content-half-fix02{margin:0; position: absolute; top:65px; z-index:99; right:45px;}
.content-history-extend{ height: 98%;overflow:auto;}
.task-bg-grey .prettyprint{font-size: 9pt;font-family: Courier New,Arial;border: 1px solid #ddd;border-left: 5px solid #6CE26C;background: #f6f6f6;padding: 5px;}
/* 左右版TPI 20170410byLB */
#game_task_pass img{cursor: pointer}
.-fit { position: absolute; top: 0; right: 0; bottom: 0; left: 0;}
.-layout-v { display: flex; flex-direction: column;box-flex-direction: column;-webkit-flex-direction: column;}
.page--header { position: fixed;top: 0; left:80px; right: 0; z-index: 7000;background:#33485F; height:44px; padding:10px 0; color:#fff;}
.page--leftnav{position: fixed;top:0; left:0; right: 0; z-index: 9001;width:80px; height:100%;background:#282c37;}
.page--body { position: relative;}
.-margin-t-64 { margin-top: 64px;}
.-flex { box-flex:1;flex:1;-webkit-flex:1;}
/*.-flex-auto{flex-basis:100%;}*/
.split-panel.-fit {position: absolute;}
.split-panel { position: relative; overflow: hidden; min-height: 200px; height: 100%;}
.-stretch { align-items: stretch;}
.-layout { display: flex;}
.split-panel--first { overflow: hidden;}
.-relative { position: relative;}
.-bg-white { background-color: #eee;}
.split-panel.-handle .split-panel--second { padding-left: 2px;}
.split-panel--second { overflow: hidden;}
.task-answer-view { position: absolute; top: 0; right: 0; bottom: 0;left: 0; display: flex;
flex-direction: column; border-top: 1px solid #515151;}
.-vertical { flex-direction: column;box-flex-direction: column;-webkit-flex-direction: column;}
.-layout-h { display: flex;flex-direction: row;box-flex-direction: row;-webkit-flex-direction: row;}
.-horizontal {flex-direction: row-reverse;box-flex-direction: row-reverse;-webkit-flex-direction: row-reverse;}
.-scroll{ overflow:auto;}
.-flex-basic0{flex-basis: 0%!important;box-flex-basis: 0%!important;-webkit-flex-basis: 0%!important; display: none}
/*王昌------------拖拽增加样式---------------修改*/
.-flex-basic40{width:40%;box-flex:auto;flex:auto;-webkit-flex:auto;}
.-flex-basic50{width:60%;box-flex:auto;flex:auto;-webkit-flex:auto;}
.b-label{width:4px;cursor:ew-resize;background:#2b2b2b;}
.h-center{height:4px;cursor:ns-resize;background:#333;}
.-changebg{height:3px;}
.-brother{width:100%;height:100%;position:absolute;left:0;top:0;z-index:999;}
.-bg-weightblack{background:#000;}
.-flex-basic70{box-flex:4 9 auto;flex:4 9 auto;-webkit-flex:4 9 auto;height:70%;}
/*---------------------------------------------*/
.-flex-basic60{box-flex:2 1 auto;flex:2 1 auto;-webkit-flex:2 1 auto;height:30%;}
.-flex-basic100{flex-basis: 100%!important;box-flex-basis: 100%!important;-webkit-flex-basis: 100%!important;}
.-header-title{ max-width:500px; font-weight: normal;}
.-header-right{ background:#333;border-radius:25px; padding:5px 15px; height: 30px; position: absolute; right:10px;line-height: 30px;}
.-header-right-info{ padding:10px; background:#fff; border-radius:3px; top:50px; right:10px; position: relative;display:none;color:#666;}
.-header-right-info font { border: 1px solid #dddddd; display: block;border-width: 8px; position: absolute; top: -15px;right:20px;border-style: solid; border-color: transparent transparent #fff transparent; font-size: 0; line-height: 0;}
.-header-right-box:hover .-header-right-info{ display: block;}
.-task-bar-bg{ width: 160px; height:15px; border-radius:15px; background:#ff9932; color:#fff; font-size: 12px; line-height: 15px; text-align: right; position: relative; padding-right:10px;}
.-task-bar-inner{background:#ffc100; display: block; height: 15px;border-radius:15px; position: absolute; top:0; left:0;}
.-task-widht-10{ width: 10%;}
.-task-widht-20{ width: 20%;}
.-task-widht-30{ width: 30%;}
.-task-widht-40{ width: 40%;}
.-task-widht-50{ width: 50%;}
.-task-widht-60{ width: 60%;}
.-task-widht-70{ width: 70%;}
.-task-widht-80{ width: 80%;}
.-task-widht-90{ width: 90%;}
.-task-widht-100{ width: 100%;}
.-footer-left{min-height:48px;background:#f5f5f5;}
.-footer-left ul {width: 100%}
.-footer-left ul li{ cursor: pointer; color:#666;}
.-footer-left ul li:hover{ color:#888;}
.-bg-black{ background:#2b2b2b; color:#f4f1ed;}
.-bg-darkblack{background:#1D1D1D; color: #fff;}
.task-answer-view{ border-top:1px solid #515151; background:#333;}
#blacktab_nav {height:40px;background:#292929; }
#blacktab_nav li {float:left; padding:0px 50px;text-align:center;height: 40px;line-height: 40px; }
#blacktab_nav .add-webssh{position:relative;}
#blacktab_nav .add-webssh span{position:absolute;top:0;right:5px;color:#fff;cursor:pointer;}
#blacktab_nav li a{font-size:14px; }
#blacktab_nav li.code-file-tab{padding: 0px;width: 120px;box-sizing: border-box;padding: 0px 15px;}
.code-flie-list{display:none;position: absolute;z-index: 5;top:40px;background: #515151;width: 300px;left: 0px;color: #fff;}
.blue-line{border-left: 3px solid #199ED8!important;padding-left: 5px;}
.codefile-all{max-height: 122px;overflow-y: auto;overflow-x: hidden;}
.codefile-all p{text-align: left;cursor: pointer;height: 22px;line-height: 22px;margin-bottom: 3px;padding-left: 5px;border-left: 3px solid #515151;width: 273px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.codefile-all p:hover{background: #CCCCCC;color: #333;}
.blacktab_hover { background: #333;}
.blacktab_hover a{ color:#fff; }
.-task-ces-top{ padding:5px 15px; background:#515151; color:#bfbfbf;}
.-task-ces-info-left{ display: inline-block; width:100px; text-align: right; }
.-position-a-r15{ position: absolute; top:5px; right:15px;}
.-task-ml80{ margin-left: 80px;}
.page--over { position: fixed;top: 0; left:80px; right: 0; z-index:8000; height:100%; color:#fff;}
.-task-list-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989; font-size: 14px; font-weight: normal;}
.-task-list-header h3{ font-weight: normal; font-size:16px; color:#333;}
.-task-list-inner{ background:#EFF2F7; margin:10px; padding:5px;}
.-task-list-title{ font-size: 14px; color: #666;word-wrap: break-word; font-weight: normal; max-width: 80%;}
.greytab-inner{ background:#fff; }
.blacktab-inner{ background:#333;}
.task-padding16{ padding:16px;}
.task-padding10{ padding:10px;}
.task-padding-new{ padding-top: 16px}
/* TPM统计 20170321byLB */
.panel-warp-3{ width: 30%; background:#23b181; color:#fff; margin:2.5%; margin-right:0; position: relative; }
.panel-warp-3-over{ background:#fff;opacity:0.8; color:#29bd8b; width: 100%; height:135px; position: absolute; top:0; left:0; text-align: center; padding-top:130px;}
.panel-warp-3-over a{color:#29bd8b; font-size: 18px; text-align:center; font-weight: bold;}
.panel-warp-img{width: 30px; height: 30px; border-radius:100px;}
.panel-warp-name{ display:block; max-width:100px;}
.panel-warp-inner{ padding:15px;}
.panel-warp-dbg{ background:#29bd8b; padding:15px; height:120px;}
.panel-warp-dbg li{ margin-bottom:15px; }
.panel-warp-dbg li:last-child{ margin-bottom:0;}
.fa-icons-trophy{ position:relative; padding-top:10px;}
.fa-icons-trophy span{ position:absolute; top:12px; right:10px; color:#f04b27; font-size:14px; font-weight: bold;}
.fa-icons-flower{ display: inline-block; width: 14px; height: 14px; background:url("../images/task/icons-flower.png") 0 0 no-repeat;}
.fa-icons-flower:hover{display:inline-block; width: 14px; height: 14px;background:url("../images/task/icons-flower.png") -18px 0 no-repeat;}
/* 实训首页 20170330byLB */
.task-index{ width: 1200px; margin:0 auto;}
.task-index-head{ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); }
/*.task-index-head-top{background-image: linear-gradient(to right, rgb(106, 177, 216) 0%, rgb(1, 74, 78) 100%);background-color: rgb(1, 70, 74); padding:30px;}*/
/*background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);*/
/*background: linear-gradient(to right,#5DDAE4,#23ADC9);*/
.task-index-head-top{ padding:30px;background:#FCA24B;background: linear-gradient(to right, rgb(104, 177, 215) 0%, rgb(1,75,79) 100%);}
/*.task-index-head-top{ padding:30px;background:#FFA65E;}*/
.top-xz{position: absolute;border:14px solid #FFFFFF;border-radius: 50%;box-shadow: 0px 2px 10px rgba(142,142,142,0.6);
opacity: 0.4;}
.task-index-head-top-course{padding:30px;background:linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);}
/*linear-gradient(to right, rgb(69, 191, 165) 0%, rgb(164, 175, 247) 100%);*/
.task-inde-head-title{ color:#fff; }
.task-index-head-info{ background:#fff; padding:10px 30px;}
.task-index-head-info li{ width:100px; float: left; text-align: center; color:#666;}
.task-index-list{ width: 1200px;}
.task-index-list-box{box-sizing:border-box; width:23.87%;margin: 0 1.5% 30px 0px; border-radius:2px;border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
.task-index-list-box:hover{-webkit-animation: bounce-down 1s linear 1;animation: bounce-down 1s linear 1; }
.task-index-list-box:hover .black-half{display: block;}
.task-index-list-box:nth-child(4n+0) {margin: 0 0 30px 0;}
.task-mg8{ margin:0 15px 15px 0px; border-radius:2px; border:1px solid #eee; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15); color:#666; position:relative; }
.task-index-list-box-top{padding:16px; padding-top:30px; background:#fff; text-align: center; position:relative; height: 160px;}
.task-index-list-title{ max-width:80%; display: block; margin:10px auto 0px; font-size:14px; font-weight: bold;}
.task-index-list-user{padding:5px 10px; border-radius:25px;background: #F5F6F7; margin:0px auto 20px; display: inline-block;}
.task-index-list-box-bottom{ background: #F5F6F7; color:#666; padding:10px 10%; text-align: center;}
.task-index-list-box-bottom li{ display: inline; margin: 0 5px;}
.task-index-list-box-bottom2{ background: #fff; color:#666; padding:10px 10%; text-align: center;}
.task-index-list-box-bottom2 li{ display: inline; margin: 0 5px;}
.task-vip{ position: absolute; right:15px; top:15px;}
@-webkit-keyframes bounce-down {
25% {-webkit-transform: translateY(-10px);}
50%, 100% {-webkit-transform: translateY(0);}
}
@keyframes bounce-down {
25% {transform: translateY(-10px);}
50%, 100% {transform: translateY(0);}
}
.task-index-list-hover{ position:absolute; top:0; left:0; color:#fff; width: 100%; height: 100%; border-radius:2px 2px 0 0; }
.task-index-list-hover p{ margin:15px;overflow:hidden; text-align: left; height: 85%;}
.task-index-list-hover{ display: none; }
.task-mg8:hover .task-index-list-hover{display: block;}
.task-mg8:hover{ box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.15);cursor: pointer;}
.task-dropdown{}
.task-dropdown-menu{ min-width: 100px; border: 1px solid rgba(0,0,0,.05);box-shadow: 0 6px 12px rgba(0,0,0,.15);}
.task-dropdown-menu li a{ color:#666; }
/* 伸展型搜索 20170330byLB */
.search-wrapper {position: absolute; font-size:14px; }
.search-wrapper .input-holder { overflow: hidden; height: 30px; position: relative; width:32px;background: none;}
.search-wrapper.active .input-holder { width:320px; border:none; border-bottom:2px solid #ccc; }
.search-wrapper .input-holder .search-input { width:100%; height: 30px; font-size:14px; position: absolute; top:0px; left:0; border:none; opacity: 0; }
.search-wrapper.active .input-holder .search-input { opacity: 1; outline:none; background: none;}
.search-wrapper .search-icon { width:20px; height:20px; border:none; padding:0px; outline:none; position: relative; z-index: 2; float:right; cursor: pointer; background: none; color: #666; top:2px;}
.search-wrapper .close { position: absolute; z-index: 1; top:2px; right:20px; width:25px; height:25px; cursor: pointer; opacity: 0;color: #666;}
.search-wrapper.active .close {right:-35px; opacity: 1;}
a.sortArrowActiveD {background:url(../images/post_image_list.png) -0px -20px no-repeat; width:7px; height:9px; float:left; margin-top: 10px;margin-left: 5px;}
a.sortArrowActiveU {background:url(../images/post_image_list.png) -17px -20px no-repeat; width:7px; height:9px; float:left; margin-left:5px; margin-top:10px;}
.postSort {width:75px; float:right}
.shixunPostSort {width:60px; float:right}
.remove_li li{ list-style-type: none!important;}
a.shixun-task-btn { display: inline-block;font-weight: bold;border: none;padding: 0 12px;color: #666;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; }
a.shixun-task-ban-btn{background-color: #c2c4c6;display: inline-block;font-weight: bold;border: none;padding: 0 12px;color: #666;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px; cursor: default;}
.shixun-panel-list > div:nth-child(odd){ background:#f9f9f9; }
.shixun-panel-list > div:nth-child(even){ background:#fff; }
.shixun-panel-list {background: #fff; margin: 0 1px;}
.shixun-panel-inner { background: #EFF2F7; padding: 15px; height: 70px;}
.challange_operate{display: none}
.shixun-panel-inner:hover .challange_operate{display: block}
.shixun_title {color: #333;font-size: 16px;}
.g_frame{border: 1px solid #29bd8b;color: #29bd8b;padding:0 5px;border-radius: 3px;text-align:center;}
.loading-center{text-align: center; align-items: center;justify-content: center;}
.center{vertical-align: middle;text-align: center; }
.itoblock_w150{ display: block; float:left; width:150px }
.itoblock_w75{ display: block; float:left; width:75px }
/*实训--技能勋章*/
.modal-list li{float: left;padding: 0px 15px;background:#ff7500;color: #ffffff;border-radius: 4px;margin-right: 10px}
.modal-list li:before{content: '●';color: #FFFFFF;margin-right: 5px;font-size: 14px}
.modal-list span{width: 8px;height: 8px;border-radius: 50%;background: #ffffff;display: block;float: left;margin-right: 5px;margin-top:10px;}
/* 合作者 20170516byLB */
.task-partner-list{ padding:15px; border-bottom:1px solid #eee;}
.task-width33{ width:33.3%;}
.read_only{ -moz-user-select: none; -webkit-user-select: none; }
.task-form-28{width: 28%;padding:0px 10px}
/* 实训首页的搜索 */
.xy_box{padding:16px;height:180px}
.task_yx_bo{margin: 0px auto 13px;}
.course-nav-box{padding:0px 10px;margin:30px 0px}
.xy_level{width: 80%;margin: 0px auto;border-top: 1px solid #eee;margin-top: 5px;line-height: 35px;}
.course-nav-row{padding:7px 0px}
.course-nav-row_item li{width:auto;height: 30px;line-height: 30px;margin: 5px;padding:0px 15px;}
.course-nav-row_item label{cursor: pointer;}
.check_item{height:40px;line-height: 40px;padding: 0px 15px;}
.more_check{position: absolute;bottom: 5px;right: 10px;cursor: pointer;}
.bottomdashed1{border-bottom: 1px dashed #eeeeee;}
/*更多和收起*/
.two_line_lesson{height: 80px;overflow: hidden;}
.more_line_lesson{max-height: 200px;display: block;}
.scroll_lesson{overflow-x: hidden;overflow-y: scroll;}
.searchFor{width:auto;}
.searchFor .searchCon{width:250px;border-bottom:1px solid #cccccc;float: left;height: 30px;}
.searchFor .searchCon input{border: none;outline: none;height: 29px;width:91%;}
.searchFor .searchImg{margin:5px 10px 0px 0px;cursor: pointer;}
.searchFor .search_close{font-size: 18px;float: right;color: #666;height: 29px;line-height: 29px;cursor: pointer;}
.tab_color{color: #bfbfbf!important;}
/*_game_show.html.erb页面新增的一个tab*/
.comments_item_content img{border-radius: 50%;margin-right: 5px}
.comment_item_one{flex: 1;}
.comment_item_bottom{border-bottom: 1px solid #efefef;display: flex}
.comment_item_top{border-top: 1px solid #efefef}
.comment_item_left_green{border-left: 3px solid #29bd8b}
.return_item{height: 20px;line-height: 20px;margin-top: 5px;}
.comment-input{width: 100%;margin: 10px;margin-right: 17px;}
.comment-input textarea{border: none !important;width:100%; outline: none;height: 30px;border-radius: 4px;padding-left: 5px;float:left}
.comment_position{ position: absolute;bottom: 8px;right: 20px}
/*-------新建阶段添加选项部分----------*/
.option-item{border:1px solid #e2e2e2;}
.option-item,.add-option-item{display: block;width: 38px;height: 38px;text-align: center;line-height: 38px;border-radius: 4px}
.check-option-bg{background: #FF7500;color: #ffffff!important;border: 1px solid #FF7500}
.add-option-input{padding: 5px;width: 90%;height: 40px;min-width: 700px;}
.add-option-input a{display: block;width: 100%;height: 100%;cursor: pointer}
.position-delete{position: absolute;right: -22px;top: 12px;cursor: pointer}
/*--------TPI的答案选项卡------*/
.quiz-task-options:not(.-compact) {padding:10px;}
.card {position: relative;border-radius: 2px;overflow: hidden;}
/*.card:hover{background: #3f3f3f;}*/
.card-check{background: #3498db!important;}
.-justify {justify-content: space-between;}
.-center { align-items: center;min-height: 66px;}
.markdown {letter-spacing: 0;line-height: 1.6;word-wrap: break-word;word-break: break-word;}
.markdown code {padding:0;line-height: 23px;margin: 0;font-family: "微软雅黑","宋体";}
/*模拟实战---加载等待*/
.loading_all{background:#ffffff;z-index: 100000;width: 100%;height: 100%;position: fixed;left: 0px;top:0px;text-align: center;}
.loading_main img{border-radius: 4px;}
.loading_main span{font-size: 44px;font-weight: bold;color: #ff7500;letter-spacing: 5px;margin-left: 5px;}
.load{width: auto;top:50%;margin-top:-100px;position: relative;}
.loading_seconde{color: #ff7500;letter-spacing: 3px;font-size: 16px;}
#ajax-indicator-base {
position: absolute; /* fixed not supported by IE*//*
top: 50%;
left: 50%;
margin-left: -20px;
margin-top: -40px;
width: 20%;
height: 5%; */
width: 100%;
height: 100%;
font-weight:bold;
text-align:center;
/*padding:0.6em;*/
z-index:9999;
background: rgba(225,225,225,0);
}
html>body #ajax-indicator-base { position: fixed; }
#ajax-indicator-base embed{
position: relative;
top: 40%;
width: 40px;
height: 40px;
margin-left: -40px;
left: 50%;
}
/*#ajax-indicator-base span{
color:#fff;
background-position: 0% 40%;
background-repeat: no-repeat;
*//*background-image: url(/images/loading.gif);*//*
padding-left: 26px;
vertical-align: bottom;
z-index:999;
}*/
.save-tip{display:none;position: fixed;top:0px;left: 0px;width: 100%;height: 100%;}
.save-tip-content{position: absolute;top:50%;left: 50%;margin-left: -36px;margin-top:-19px;background: rgba(0,0,0,0.7);color:#fff;padding:5px 15px;border-radius: 4px}
.empty{background: #494A4C;display: inline; margin: 0 2px; padding: 0 3px;}
.tab-key{background: #494A4C;display: inline; margin: 0 2px; padding: 0 6px;}
/*二次回复的提示语的样式*/
.points-data-tip-top{position:absolute;left:100px;top:-30px;opacity:.7;width:150px;height:30px;z-index:9999;display:none;}
.data-tip-top1{position:relative;box-shadow:0px 0px 8px #000;background:#000;color:#fff;word-wrap: break-word;
text-align:center;border-radius:4px;padding:0 10px;border:1px solid #000;}
.data-tip-top1:after,.data-tip-top1:before{position: absolute;content:'';width:0;height:0;left: 45%;bottom:-10px;border-left: 5px solid transparent;
border-right: 5px solid transparent;border-top: 10px solid #000;}
.data-tip-top1:before{bottom:-11px;}
/*选择题tab切换*/
.nav_option li{overflow: hidden;width: 110px; text-align: center;cursor: pointer;height: 38px;line-height: 38px;border-top-right-radius: 5px;border-top-left-radius: 5px;border:1px solid #e2e2e2;border-bottom: 0px;color: #FF7500;border-right: none;}
.nav_option li:last-child{border-right: 1px solid #e2e2e2;}
.nav_option li a{width: 100%;height: 100%;display: block;}
/*---------------------试卷----------------------*/
.question_item_con{font-weight: normal!important;border:1px solid #EEEEEE!important;color: #333!important;background: #FFFFff!important;position: relative}
.exam_operator{cursor: pointer;position: absolute;right: 15px;top: 11px;}
.question_item_con .write_answer{border-top:1px solid #EEEEEE;background:#EFF9FD;padding: 10px 15px;text-align:justify;}
.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #ff7500;border-radius: 3px;margin-left: 15px;cursor: pointer;color: #ff7500!important;}
.add_item_part:hover{color:#fff!important;background-color: #ff7500}
/*作业问答*/
.work_search_ul{border: 1px solid #EEEEEE;border-radius: 4px;}
.work_search_ul li span{display:block;float: left;height: 38px;line-height: 38px}
.work_search_ul li{border-bottom: 1px dashed #EEEEEE;}
.work_search_ul li:last-child{border-bottom: none}
.work_search_ul .magic-radio + label,.work_search_ul .magic-checkbox + label{top:5px}
/*更新提示*/
.update_back_main{display: none;position: fixed;left: 0px;top:0px;background: rgba(0,0,0,0.3);width: 100%;z-index: 7001;height: 100%;}
.tip-panel-animate-left{position: absolute;z-index: 9000;left: 80px;top:290px;background: #FFFFff;width: 430px;height: 140px;border-radius: 3px;}
.tip-panel-animate{position: absolute;z-index: 10001;right: 4px;top:40px;background: #FFFFff;width: 430px;height: 140px;border-radius: 3px;display: none}
.tip-panel-animate .tip-img,.tip-panel-animate-left .tip-img{width: 130px;text-align: center;background-color: #E8E9ED;height: 100%;}
.tip-panel-animate .tip-img img,.tip-panel-animate-left .tip-img img{width: 70px;height: 70px;margin: 35px 30px;}
.tip-right-con{width: 69.7%;height: 100%;}
.tip-operator-btn{width:100%;border-top: 1px solid #eee;height: 40px;position: absolute;right: 0px;bottom: 0px;text-align: center;}
.tip-operator-btn a,.tip-operator-btn span{height: 100%;text-align: center;line-height: 40px;width: 50%}
.tip-operator-btn a:hover,.tip-operator-btn span:hover{background-color:#f9f9f9}
.tip-operator-btn a:first-child,.tip-operator-btn span:first-child{border-right: 1px solid #eee;width: 49.5%}
.animate-tip{animation:rightToleft 1s;}
.animate-tip-hide{animation:leftToright 1s;}
@keyframes rightToleft
{
from {right: -400px;}
to {right: 4px;}
}
@keyframes leftToright
{
from {right: 4px;}
to {right: -420px;}
}
.animate-tip-l{animation:rightToleft-l 1s;}
.animate-tip-hide-l{animation:leftToright-l 1s;}
@keyframes rightToleft-l
{
from {left: -400px;}
to {left: 80px;}
}
@keyframes leftToright-l
{
from {left: 80px;}
to {left: -420px;}
}
/*----------实训TPI图片查看效果--------------*/
.photo_display{box-sizing: border-box;width: 100%;position: fixed;top: 0px;left: 0px;padding-top: 64px;padding-left: 80px;background: rgba(0,0,0,0);height: 100%;z-index: 100}
.photo_display .task-popup{width: 100%!important;height: 100%!important;}
#picture-content img{max-width: 100%;height: 400px;display: block; margin:0px auto;margin-bottom: 20px;}
#box-img{width:100%;height:100%;display:table;text-align:center;background:#fff;}
#box-img span{display:table-cell;vertical-align:middle;}
/*-------------学员统计 通关排行榜------------*/
.rankings_num{position: absolute;width: 100%;top: 3px;height: 15px;line-height: 15px;left: 0px;font-size: 12px;color: #F24B27;text-align: center}
.census_main{width: 1086px;overflow: hidden;position: relative;min-height: 350px;margin:0px 45px;}
.census_main ul{position: absolute;min-width: 1086px;}
.census_main ul>li{float:left;width: 260px;margin:6px 6px;min-height: 335px}
.census_main ul>li:nth-child(4n){margin-right: 0px;}
.part_main{border-radius: 5px;background: #FFFFff;border:1px solid #EEEEEE}
.part_main .part_top{background: #FF9E6A;color: #FFFFff;padding: 10px 15px;border-radius: 5px 5px 0px 0px;}
.wipe{display: none;cursor: pointer;line-height: 332px;color:#FFFFff!important;font-size:16px ;width: 100%;position: absolute;left: 0px;top:0px;background:rgba(0,0,0,0.3);height: 100%;z-index: 3;text-align: center;border-radius: 5px; }
.part_main:hover .wipe{display: block;}
#census_left,#census_right{display: none;position: absolute;cursor: pointer;background: #FCF2EC;padding: 10px 5px;width: 35px;box-sizing: border-box;top:122.5px;text-align: center}
#census_left i,#census_right i{color:#FBBD81;}
/*-----------实训配置、评测脚本-------------*/
.edit_script_text .test_script_text{word-break: break-all;background-color: #f7f7f7;}
.edit_script_text .CodeMirror-lines{padding: 0px!important;padding-bottom: 4px}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 159 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 177 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

@ -1,112 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Educoder</title>
<script type="text/javascript">
window.__isR = true;
</script>
<!-- <link rel="stylesheet" type="text/css" href="/css/edu-common.css">
<link rel="stylesheet" type="text/css" href="/css/edu-public.css">
<link rel="stylesheet" type="text/css" href="/css/taskstyle.css">
<link rel="stylesheet" type="text/css" href="/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="/css/editormd.min.css">
<link rel="stylesheet" type="text/css" href="/css/merge.css"> -->
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">
<link href="/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_653600_qa9lwwv74z.css">
<!-- <link rel="stylesheet" type="text/css" href="https://www.educoder.net/stylesheets/css/font-awesome.css?1510652321"> -->
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<!--用于markdown转html -->
<div id="md_div" style="display: none;"></div>
<div id="root" class="page -layout-v -fit">
</div>
<div id="picture_display" style="display: none;"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<!-- js css合并 文件优先级的问题 -->
<!---->
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/js/editormd/lib/underscore.min.js"></script>
<script type="text/javascript" src="/js/editormd/lib/marked.min.js"></script>
<script type="text/javascript" src="/js/editormd/lib/prettify.min.js"></script>
<script type="text/javascript" src="/js/editormd/lib/raphael.min.js"></script>
<script type="text/javascript" src="/js/editormd/sequence-diagram.min.js"></script>
<script type="text/javascript" src="/js/editormd/flowchart.min.js"></script>
<script type="text/javascript" src="/js/editormd/jquery.flowchart.min.js"></script>
<script type="text/javascript" src="/js/editormd/editormd.min.js"></script>
<!-- codemirror addon -->
<script type="text/javascript" src="/js/codemirror/codemirror.js"></script>
<!--hint-->
<script type="text/javascript" src="/js/codemirror/lib/fuzzysort.js"></script>
<script type="text/javascript" src="/js/codemirror/addon/hint/show-hint.js"></script>
<!-- <script type="text/javascript" src="/js/codemirror/addon/hint/javascript-hint.js"></script> -->
<script type="text/javascript" src="/js/codemirror/addon/hint/anyword-hint.js"></script>
<script type="text/javascript" src="/js/codemirror/mode/javascript.js"></script>
<script type="text/javascript" src="/js/diff_match_patch.js"></script>
<script type="text/javascript" src="/js/merge.js"></script>
<script type="text/javascript" src="/js/edu_tpi.js"></script>
<script type="text/javascript" src="http://localhost:3000/javascripts/application.js"></script>
<script type="text/javascript" src="http://localhost:3000/assets/kindeditor/kindeditor.js"></script>
<!-- // <script type="text/javascript" src="http://localhost:3000/javascripts/create_kindeditor.js"></script> -->
<script type="text/javascript" src="/js/create_kindeditor.js"></script>
<script type="text/javascript" src="http://localhost:3000/javascripts/educoder/edu_application.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,70 +0,0 @@
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var WRAP_CLASS = "CodeMirror-activeline";
var BACK_CLASS = "CodeMirror-activeline-background";
var GUTT_CLASS = "CodeMirror-activeline-gutter";
CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
var prev = old == CodeMirror.Init ? false : old;
if (val == prev) return
if (prev) {
cm.off("beforeSelectionChange", selectionChange);
clearActiveLines(cm);
delete cm.state.activeLines;
}
if (val) {
cm.state.activeLines = [];
updateActiveLines(cm, cm.listSelections());
cm.on("beforeSelectionChange", selectionChange);
}
});
function clearActiveLines(cm) {
for (var i = 0; i < cm.state.activeLines.length; i++) {
cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
cm.removeLineClass(cm.state.activeLines[i], "gutter", GUTT_CLASS);
}
}
function sameArray(a, b) {
if (a.length != b.length) return false;
for (var i = 0; i < a.length; i++)
if (a[i] != b[i]) return false;
return true;
}
function updateActiveLines(cm, ranges) {
var active = [];
for (var i = 0; i < ranges.length; i++) {
var range = ranges[i];
var option = cm.getOption("styleActiveLine");
if (typeof option == "object" && option.nonEmpty ? range.anchor.line != range.head.line : !range.empty())
continue
var line = cm.getLineHandleVisualStart(range.head.line);
if (active[active.length - 1] != line) active.push(line);
}
if (sameArray(cm.state.activeLines, active)) return;
cm.operation(function() {
clearActiveLines(cm);
for (var i = 0; i < active.length; i++) {
cm.addLineClass(active[i], "wrap", WRAP_CLASS);
cm.addLineClass(active[i], "background", BACK_CLASS);
cm.addLineClass(active[i], "gutter", GUTT_CLASS);
}
cm.state.activeLines = active;
});
}
function selectionChange(cm, sel) {
updateActiveLines(cm, sel.ranges);
}
});

@ -1,43 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
// var WORD = /[\w$]+/
var WORD = /[A-z]+/
, RANGE = 500;
CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
var word = options && options.word || WORD;
var range = options && options.range || RANGE;
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
var end = cur.ch, start = end;
while (start && word.test(curLine.charAt(start - 1))) --start;
var curWord = start != end && curLine.slice(start, end);
var list = options && options.list || [], seen = {};
var re = new RegExp(word.source, "g");
for (var dir = -1; dir <= 1; dir += 2) {
var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
for (; line != endLine; line += dir) {
var text = editor.getLine(line), m;
while (m = re.exec(text)) {
if (line == cur.line && m[0] === curWord) continue;
if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {
seen[m[0]] = true;
list.push(m[0]);
}
}
}
}
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
});
});

@ -1,188 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var Pos = CodeMirror.Pos;
function forEach(arr, f) {
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
}
function arrayContains(arr, item) {
if (!Array.prototype.indexOf) {
var i = arr.length;
while (i--) {
if (arr[i] === item) {
return true;
}
}
return false;
}
return arr.indexOf(item) != -1;
}
function scriptHint(editor, keywords, getToken, options) {
// Find the token at the cursor
var cur = editor.getCursor(), token = getToken(editor, cur);
if (/\b(?:string|comment)\b/.test(token.type)) return;
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
// If it's not a 'word-style' token, ignore the token.
if (!/^[\w$_]*$/.test(token.string)) {
token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
type: token.string == "." ? "property" : null};
} else if (token.end > cur.ch) {
token.end = cur.ch;
token.string = token.string.slice(0, cur.ch - token.start);
}
var tprop = token;
// If it is a property, find out what it is a property of.
while (tprop.type == "property") {
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (tprop.string != ".") return;
tprop = getToken(editor, Pos(cur.line, tprop.start));
if (!context) var context = [];
context.push(tprop);
}
// 发消息让其他组件注入 其他hint
CodeMirror.signal(editor, "hinting");
var myhints = editor.state.myhints
var needToClearJSHint = editor.state.needToClearJSHint
if (needToClearJSHint) { // 不使用js的hint可能注入了其他语言的hint
keywords = []
editor.state.needToClearJSHint = false;
}
myhints && myhints.forEach(function(item) {
if (!arrayContains(keywords, item)) keywords.push(item)
})
return {list: getCompletions(token, context, keywords, options),
from: Pos(cur.line, token.start),
to: Pos(cur.line, token.end)};
}
function javascriptHint(editor, options) {
return scriptHint(editor, javascriptKeywords,
function (e, cur) {return e.getTokenAt(cur);},
options);
};
CodeMirror.registerHelper("hint", "javascript", javascriptHint);
function getCoffeeScriptToken(editor, cur) {
// This getToken, it is for coffeescript, imitates the behavior of
// getTokenAt method in javascript.js, that is, returning "property"
// type and treat "." as indepenent token.
var token = editor.getTokenAt(cur);
if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
token.end = token.start;
token.string = '.';
token.type = "property";
}
else if (/^\.[\w$_]*$/.test(token.string)) {
token.type = "property";
token.start++;
token.string = token.string.replace(/\./, '');
}
return token;
}
function coffeescriptHint(editor, options) {
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
}
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
/* var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
"toUpperCase toLowerCase split concat match replace search").split(" ");
var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
"lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
var funcProps = "prototype apply call bind".split(" ");*/
var javascriptKeywords = ("double float int long short null true false enum super this void auto for register static const friend mutable explicit virtual template typename printf " +
"break continue return do while if else for instanceof switch case default try catch finally throw throws assert import package boolean byte char delete private " +
"inline struct union signed unsigned export extern namespace using operator sizeof typedef typeid and del from not as elif or with pass except " +
"print exec raise is def lambda private protected public abstract class extends final implements interface native new static strictfp synchronized transient main " +
"String string System println vector bool boolean FALSE TRUE function").split(" ");
/*
var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
*/
function forAllProps(obj, callback) {
if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {
for (var name in obj) callback(name)
} else {
for (var o = obj; o; o = Object.getPrototypeOf(o))
Object.getOwnPropertyNames(o).forEach(callback)
}
}
function getCompletions(token, context, keywords, options) {
var found = [], start = token.string, global = options && options.globalScope || window;
function maybeAdd(str) {
// var results = fuzzysort.go(start, [str])
// if ( results.total && !arrayContains(found, str) ) found.push(str);
if (fuzzysort && fuzzysort.single) {
// 使用模糊搜索
var results = fuzzysort.single(start, str)
if ( results && results.score <= 0 && !arrayContains(found, str)) found.push(str);
} else {
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
}
}
function gatherCompletions(obj) {
if (typeof obj == "string") forEach(stringProps, maybeAdd);
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
forAllProps(obj, maybeAdd)
}
// 不启用context context强制要求了lib的调用才提示比如Math.a 就会提示 Math.abs
if (false && context && context.length) {
// If this is a property, see if it belongs to some object we can
// find in the current environment.
var obj = context.pop(), base;
if (obj.type && obj.type.indexOf("variable") === 0) {
if (options && options.additionalContext)
base = options.additionalContext[obj.string];
if (!options || options.useGlobalScope !== false)
base = base || global[obj.string];
} else if (obj.type == "string") {
base = "";
} else if (obj.type == "atom") {
base = 1;
} else if (obj.type == "function") {
if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
(typeof global.jQuery == 'function'))
base = global.jQuery();
else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
base = global._();
}
while (base != null && context.length)
base = base[context.pop().string];
if (base != null) gatherCompletions(base);
} else {
// If not, just look in the global object and any local scope
// (reading into JS mode internals to get at the local and global variables)
/* for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);*/
/* for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
if (!options || options.useGlobalScope !== false)
gatherCompletions(global);*/
// forEach(keywords, maybeAdd);
var result = fuzzysort.go(start, keywords)
result && result.forEach(function(item) {
found.push(item.target)
})
}
return found;
}
});

@ -1,36 +0,0 @@
.CodeMirror-hints {
position: absolute;
z-index: 10;
overflow: hidden;
list-style: none;
margin: 0;
padding: 2px;
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid silver;
background: white;
font-size: 90%;
font-family: monospace;
max-height: 20em;
overflow-y: auto;
}
.CodeMirror-hint {
margin: 0;
padding: 0 4px;
border-radius: 2px;
white-space: pre;
color: black;
cursor: pointer;
}
li.CodeMirror-hint-active {
background: #08f;
color: white;
}

@ -1,458 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var HINT_ELEMENT_CLASS = "CodeMirror-hint";
var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";
// This is the old interface, kept around for now to stay
// backwards-compatible.
CodeMirror.showHint = function(cm, getHints, options) {
if (!getHints) return cm.showHint(options);
if (options && options.async) getHints.async = true;
var newOpts = {hint: getHints};
if (options) for (var prop in options) newOpts[prop] = options[prop];
return cm.showHint(newOpts);
};
CodeMirror.defineExtension("showHint", function(options) {
options = parseOptions(this, this.getCursor("start"), options);
var selections = this.listSelections()
if (selections.length > 1) return;
// By default, don't allow completion when something is selected.
// A hint function can have a `supportsSelection` property to
// indicate that it can handle selections.
if (this.somethingSelected()) {
if (!options.hint.supportsSelection) return;
// Don't try with cross-line selections
for (var i = 0; i < selections.length; i++)
if (selections[i].head.line != selections[i].anchor.line) return;
}
if (this.state.completionActive) this.state.completionActive.close();
var completion = this.state.completionActive = new Completion(this, options);
if (!completion.options.hint) return;
CodeMirror.signal(this, "startCompletion", this);
completion.update(true);
});
function Completion(cm, options) {
this.cm = cm;
this.options = options;
this.widget = null;
this.debounce = 0;
this.tick = 0;
this.startPos = this.cm.getCursor("start");
this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;
var self = this;
cm.on("cursorActivity", this.activityFunc = function() { self.cursorActivity(); });
}
var requestAnimationFrame = window.requestAnimationFrame || function(fn) {
return setTimeout(fn, 1000/60);
};
var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
Completion.prototype = {
close: function() {
if (!this.active()) return;
this.cm.state.completionActive = null;
this.tick = null;
this.cm.off("cursorActivity", this.activityFunc);
if (this.widget && this.data) CodeMirror.signal(this.data, "close");
if (this.widget) this.widget.close();
CodeMirror.signal(this.cm, "endCompletion", this.cm);
},
active: function() {
return this.cm.state.completionActive == this;
},
pick: function(data, i) {
var completion = data.list[i];
if (completion.hint) completion.hint(this.cm, data, completion);
else this.cm.replaceRange(getText(completion), completion.from || data.from,
completion.to || data.to, "complete");
CodeMirror.signal(data, "pick", completion);
this.close();
},
cursorActivity: function() {
if (this.debounce) {
cancelAnimationFrame(this.debounce);
this.debounce = 0;
}
var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
pos.ch < this.startPos.ch || this.cm.somethingSelected() ||
(pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
this.close();
} else {
var self = this;
this.debounce = requestAnimationFrame(function() {self.update();});
if (this.widget) this.widget.disable();
}
},
update: function(first) {
if (this.tick == null) return
var self = this, myTick = ++this.tick
fetchHints(this.options.hint, this.cm, this.options, function(data) {
if (self.tick == myTick) self.finishUpdate(data, first)
})
},
finishUpdate: function(data, first) {
if (this.data) CodeMirror.signal(this.data, "update");
var picked = (this.widget && this.widget.picked) // || (first && this.options.completeSingle);
if (this.widget) this.widget.close();
if (data && this.data && isNewCompletion(this.data, data)) return;
this.data = data;
if (data && data.list.length) {
if (picked && data.list.length == 1) {
this.pick(data, 0);
} else {
// 使得输入完后刚好输入和hint一样则不再显示hint
if (data.list.length == 1 && data.to.ch - data.from.ch === data.list[0].length) {
return;
}
this.widget = new Widget(this, data);
CodeMirror.signal(data, "shown");
}
}
}
};
function isNewCompletion(old, nw) {
var moved = CodeMirror.cmpPos(nw.from, old.from)
return moved > 0 && old.to.ch - old.from.ch != nw.to.ch - nw.from.ch
}
function parseOptions(cm, pos, options) {
var editor = cm.options.hintOptions;
var out = {};
for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
if (editor) for (var prop in editor)
if (editor[prop] !== undefined) out[prop] = editor[prop];
if (options) for (var prop in options)
if (options[prop] !== undefined) out[prop] = options[prop];
if (out.hint.resolve) out.hint = out.hint.resolve(cm, pos)
return out;
}
function getText(completion) {
if (typeof completion == "string") return completion;
else return completion.text;
}
function buildKeyMap(completion, handle) {
var baseMap = {
Up: function() {handle.moveFocus(-1);},
Down: function() {handle.moveFocus(1);},
PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},
PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},
Home: function() {handle.setFocus(0);},
End: function() {handle.setFocus(handle.length - 1);},
Enter: handle.pick,
Tab: handle.pick,
Esc: handle.close
};
var custom = completion.options.customKeys;
var ourMap = custom ? {} : baseMap;
function addBinding(key, val) {
var bound;
if (typeof val != "string")
bound = function(cm) { return val(cm, handle); };
// This mechanism is deprecated
else if (baseMap.hasOwnProperty(val))
bound = baseMap[val];
else
bound = val;
ourMap[key] = bound;
}
if (custom)
for (var key in custom) if (custom.hasOwnProperty(key))
addBinding(key, custom[key]);
var extra = completion.options.extraKeys;
if (extra)
for (var key in extra) if (extra.hasOwnProperty(key))
addBinding(key, extra[key]);
return ourMap;
}
function getHintElement(hintsElement, el) {
while (el && el != hintsElement) {
if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
el = el.parentNode;
}
}
function Widget(completion, data) {
this.completion = completion;
this.data = data;
this.picked = false;
var widget = this, cm = completion.cm;
var hints = this.hints = document.createElement("ul");
hints.className = "CodeMirror-hints";
this.selectedHint = data.selectedHint || 0;
var completions = data.list;
for (var i = 0; i < completions.length; ++i) {
var elt = hints.appendChild(document.createElement("li")), cur = completions[i];
var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
if (cur.className != null) className = cur.className + " " + className;
elt.className = className;
if (cur.render) cur.render(elt, data, cur);
else elt.appendChild(document.createTextNode(cur.displayText || getText(cur)));
elt.hintId = i;
}
var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
var left = pos.left, top = pos.bottom, below = true;
hints.style.left = left + "px";
hints.style.top = top + "px";
// If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
(completion.options.container || document.body).appendChild(hints);
var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
var scrolls = hints.scrollHeight > hints.clientHeight + 1
var startScroll = cm.getScrollInfo();
if (overlapY > 0) {
var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
if (curTop - height > 0) { // Fits above cursor
hints.style.top = (top = pos.top - height) + "px";
below = false;
} else if (height > winH) {
hints.style.height = (winH - 5) + "px";
hints.style.top = (top = pos.bottom - box.top) + "px";
var cursor = cm.getCursor();
if (data.from.ch != cursor.ch) {
pos = cm.cursorCoords(cursor);
hints.style.left = (left = pos.left) + "px";
box = hints.getBoundingClientRect();
}
}
}
var overlapX = box.right - winW;
if (overlapX > 0) {
if (box.right - box.left > winW) {
hints.style.width = (winW - 5) + "px";
overlapX -= (box.right - box.left) - winW;
}
hints.style.left = (left = pos.left - overlapX) + "px";
}
if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
node.style.paddingRight = cm.display.nativeBarWidth + "px"
cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
setFocus: function(n) { widget.changeActive(n); },
menuSize: function() { return widget.screenAmount(); },
length: completions.length,
close: function() { completion.close(); },
pick: function() { widget.pick(); },
data: data
}));
if (completion.options.closeOnUnfocus) {
var closingOnBlur;
cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });
cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });
}
cm.on("scroll", this.onScroll = function() {
var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
var newTop = top + startScroll.top - curScroll.top;
var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop);
if (!below) point += hints.offsetHeight;
if (point <= editor.top || point >= editor.bottom) return completion.close();
hints.style.top = newTop + "px";
hints.style.left = (left + startScroll.left - curScroll.left) + "px";
});
CodeMirror.on(hints, "dblclick", function(e) {
var t = getHintElement(hints, e.target || e.srcElement);
if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}
});
CodeMirror.on(hints, "click", function(e) {
var t = getHintElement(hints, e.target || e.srcElement);
if (t && t.hintId != null) {
widget.changeActive(t.hintId);
if (completion.options.completeOnSingleClick) widget.pick();
}
});
CodeMirror.on(hints, "mousedown", function() {
setTimeout(function(){cm.focus();}, 20);
});
CodeMirror.signal(data, "select", completions[0], hints.firstChild);
return true;
}
Widget.prototype = {
close: function() {
if (this.completion.widget != this) return;
this.completion.widget = null;
this.hints.parentNode.removeChild(this.hints);
this.completion.cm.removeKeyMap(this.keyMap);
var cm = this.completion.cm;
if (this.completion.options.closeOnUnfocus) {
cm.off("blur", this.onBlur);
cm.off("focus", this.onFocus);
}
cm.off("scroll", this.onScroll);
},
disable: function() {
this.completion.cm.removeKeyMap(this.keyMap);
var widget = this;
this.keyMap = {Enter: function() { widget.picked = true; }};
this.completion.cm.addKeyMap(this.keyMap);
},
pick: function() {
this.completion.pick(this.data, this.selectedHint);
},
changeActive: function(i, avoidWrap) {
if (i >= this.data.list.length)
i = avoidWrap ? this.data.list.length - 1 : 0;
else if (i < 0)
i = avoidWrap ? 0 : this.data.list.length - 1;
if (this.selectedHint == i) return;
var node = this.hints.childNodes[this.selectedHint];
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
node = this.hints.childNodes[this.selectedHint = i];
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
if (node.offsetTop < this.hints.scrollTop)
this.hints.scrollTop = node.offsetTop - 3;
else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
},
screenAmount: function() {
return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
}
};
function applicableHelpers(cm, helpers) {
if (!cm.somethingSelected()) return helpers
var result = []
for (var i = 0; i < helpers.length; i++)
if (helpers[i].supportsSelection) result.push(helpers[i])
return result
}
function fetchHints(hint, cm, options, callback) {
if (hint.async) {
hint(cm, callback, options)
} else {
var result = hint(cm, options)
if (result && result.then) result.then(callback)
else callback(result)
}
}
function resolveAutoHints(cm, pos) {
var helpers = cm.getHelpers(pos, "hint"), words
if (helpers.length) {
var resolved = function(cm, callback, options) {
var app = applicableHelpers(cm, helpers);
function run(i) {
if (i == app.length) return callback(null)
fetchHints(app[i], cm, options, function(result) {
if (result && result.list.length > 0) callback(result)
else run(i + 1)
})
}
run(0)
}
resolved.async = true
resolved.supportsSelection = true
return resolved
} else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
// 发消息让其他组件注入 其他hint
CodeMirror.signal(cm, "hinting", words);
var myhints = cm.state.myhints
var wordsTemp = words.slice(0)
myhints && myhints.forEach(function(item) {
if (words.indexOf(item) === -1) wordsTemp.push(item)
})
return function(cm) {
return CodeMirror.hint.fromList(cm, {words: wordsTemp})
}
} else if (CodeMirror.hint.anyword) {
return function(cm, options) { return CodeMirror.hint.anyword(cm, options) }
} else {
return function() {}
}
}
CodeMirror.registerHelper("hint", "auto", {
resolve: resolveAutoHints
});
CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
var to = CodeMirror.Pos(cur.line, token.end);
if (token.string && /\w/.test(token.string[token.string.length - 1])) {
var term = token.string, from = CodeMirror.Pos(cur.line, token.start);
} else {
var term = "", from = to;
}
var found = [];
if (fuzzysort && fuzzysort.go) {
var result = fuzzysort.go(term, options.words)
result && result.forEach(function(item) {
found.push(item.target)
})
} else {
for (var i = 0; i < options.words.length; i++) {
var word = options.words[i];
if (word.slice(0, term.length) == term)
found.push(word);
}
}
if (found.length) return {list: found, from: from, to: to};
});
CodeMirror.commands.autocomplete = CodeMirror.showHint;
var defaultOptions = {
hint: CodeMirror.hint.auto,
completeSingle: true,
alignWithWord: true,
closeCharacters: /[\s()\[\]{};:>,]/,
closeOnUnfocus: true,
completeOnSingleClick: true,
container: null,
customKeys: null,
extraKeys: null
};
CodeMirror.defineOption("hintOptions", null);
});

File diff suppressed because it is too large Load Diff

@ -1,603 +0,0 @@
/*
WHAT: SublimeText-like Fuzzy Search
USAGE:
fuzzysort.single('fs', 'Fuzzy Search') // {score: -16}
fuzzysort.single('test', 'test') // {score: 0}
fuzzysort.single('doesnt exist', 'target') // null
fuzzysort.go('mr', ['Monitor.cpp', 'MeshRenderer.cpp'])
// [{score: -18, target: "MeshRenderer.cpp"}, {score: -6009, target: "Monitor.cpp"}]
fuzzysort.highlight(fuzzysort.single('fs', 'Fuzzy Search'), '<b>', '</b>')
// <b>F</b>uzzy <b>S</b>earch
https://github.com/farzher/fuzzysort
*/
// UMD (Universal Module Definition) for fuzzysort
;(function(root, UMD) {
if(typeof define === 'function' && define.amd) define([], UMD)
else if(typeof module === 'object' && module.exports) module.exports = UMD()
else root.fuzzysort = UMD()
})(this, function UMD() { function fuzzysortNew(instanceOptions) {
var fuzzysort = {
single: function(search, target, options) {
if(!search) return null
if(!isObj(search)) search = fuzzysort.getPreparedSearch(search)
if(!target) return null
if(!isObj(target)) target = fuzzysort.getPrepared(target)
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
: true
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
return algorithm(search, target, search[0])
// var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
// var result = algorithm(search, target, search[0])
// if(result === null) return null
// if(result.score < threshold) return null
// return result
},
go: function(search, targets, options) {
if(!search) return noResults
search = fuzzysort.prepareSearch(search)
var searchLowerCode = search[0]
var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
: true
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
var resultsLen = 0; var limitedCount = 0
var targetsLen = targets.length
// This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
// options.keys
if(options && options.keys) {
var scoreFn = options.scoreFn || defaultScoreFn
var keys = options.keys
var keysLen = keys.length
for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]
var objResults = new Array(keysLen)
for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
var key = keys[keyI]
var target = getValue(obj, key)
if(!target) { objResults[keyI] = null; continue }
if(!isObj(target)) target = fuzzysort.getPrepared(target)
objResults[keyI] = algorithm(search, target, searchLowerCode)
}
objResults.obj = obj // before scoreFn so scoreFn can use it
var score = scoreFn(objResults)
if(score === null) continue
if(score < threshold) continue
objResults.score = score
if(resultsLen < limit) { q.add(objResults); ++resultsLen }
else {
++limitedCount
if(score > q.peek().score) q.replaceTop(objResults)
}
}
// options.key
} else if(options && options.key) {
var key = options.key
for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]
var target = getValue(obj, key)
if(!target) continue
if(!isObj(target)) target = fuzzysort.getPrepared(target)
var result = algorithm(search, target, searchLowerCode)
if(result === null) continue
if(result.score < threshold) continue
// have to clone result so duplicate targets from different obj can each reference the correct obj
result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden
if(resultsLen < limit) { q.add(result); ++resultsLen }
else {
++limitedCount
if(result.score > q.peek().score) q.replaceTop(result)
}
}
// no keys
} else {
for(var i = targetsLen - 1; i >= 0; --i) { var target = targets[i]
if(!target) continue
if(!isObj(target)) target = fuzzysort.getPrepared(target)
var result = algorithm(search, target, searchLowerCode)
if(result === null) continue
if(result.score < threshold) continue
if(resultsLen < limit) { q.add(result); ++resultsLen }
else {
++limitedCount
if(result.score > q.peek().score) q.replaceTop(result)
}
}
}
if(resultsLen === 0) return noResults
var results = new Array(resultsLen)
for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()
results.total = resultsLen + limitedCount
return results
},
goAsync: function(search, targets, options) {
var canceled = false
var p = new Promise(function(resolve, reject) {
if(!search) return resolve(noResults)
search = fuzzysort.prepareSearch(search)
var searchLowerCode = search[0]
var q = fastpriorityqueue()
var iCurrent = targets.length - 1
var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991
var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991
var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo
: instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo
: true
var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo
var resultsLen = 0; var limitedCount = 0
function step() {
if(canceled) return reject('canceled')
var startMs = Date.now()
// This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
// options.keys
if(options && options.keys) {
var scoreFn = options.scoreFn || defaultScoreFn
var keys = options.keys
var keysLen = keys.length
for(; iCurrent >= 0; --iCurrent) { var obj = targets[iCurrent]
var objResults = new Array(keysLen)
for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
var key = keys[keyI]
var target = getValue(obj, key)
if(!target) { objResults[keyI] = null; continue }
if(!isObj(target)) target = fuzzysort.getPrepared(target)
objResults[keyI] = algorithm(search, target, searchLowerCode)
}
objResults.obj = obj // before scoreFn so scoreFn can use it
var score = scoreFn(objResults)
if(score === null) continue
if(score < threshold) continue
objResults.score = score
if(resultsLen < limit) { q.add(objResults); ++resultsLen }
else {
++limitedCount
if(score > q.peek().score) q.replaceTop(objResults)
}
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
if(Date.now() - startMs >= 10/*asyncInterval*/) {
isNode?setImmediate(step):setTimeout(step)
return
}
}
}
// options.key
} else if(options && options.key) {
var key = options.key
for(; iCurrent >= 0; --iCurrent) { var obj = targets[iCurrent]
var target = getValue(obj, key)
if(!target) continue
if(!isObj(target)) target = fuzzysort.getPrepared(target)
var result = algorithm(search, target, searchLowerCode)
if(result === null) continue
if(result.score < threshold) continue
// have to clone result so duplicate targets from different obj can each reference the correct obj
result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden
if(resultsLen < limit) { q.add(result); ++resultsLen }
else {
++limitedCount
if(result.score > q.peek().score) q.replaceTop(result)
}
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
if(Date.now() - startMs >= 10/*asyncInterval*/) {
isNode?setImmediate(step):setTimeout(step)
return
}
}
}
// no keys
} else {
for(; iCurrent >= 0; --iCurrent) { var target = targets[iCurrent]
if(!target) continue
if(!isObj(target)) target = fuzzysort.getPrepared(target)
var result = algorithm(search, target, searchLowerCode)
if(result === null) continue
if(result.score < threshold) continue
if(resultsLen < limit) { q.add(result); ++resultsLen }
else {
++limitedCount
if(result.score > q.peek().score) q.replaceTop(result)
}
if(iCurrent%1000/*itemsPerCheck*/ === 0) {
if(Date.now() - startMs >= 10/*asyncInterval*/) {
isNode?setImmediate(step):setTimeout(step)
return
}
}
}
}
if(resultsLen === 0) return resolve(noResults)
var results = new Array(resultsLen)
for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()
results.total = resultsLen + limitedCount
resolve(results)
}
isNode?setImmediate(step):step()
})
p.cancel = function() { canceled = true }
return p
},
highlight: function(result, hOpen, hClose) {
if(result === null) return null
if(hOpen === undefined) hOpen = '<b>'
if(hClose === undefined) hClose = '</b>'
var highlighted = ''
var matchesIndex = 0
var opened = false
var target = result.target
var targetLen = target.length
var matchesBest = result.indexes
for(var i = 0; i < targetLen; ++i) { var char = target[i]
if(matchesBest[matchesIndex] === i) {
++matchesIndex
if(!opened) { opened = true
highlighted += hOpen
}
if(matchesIndex === matchesBest.length) {
highlighted += char + hClose + target.substr(i+1)
break
}
} else {
if(opened) { opened = false
highlighted += hClose
}
}
highlighted += char
}
return highlighted
},
prepare: function(target) {
if(!target) return
return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:null, score:null, indexes:null, obj:null} // hidden
},
prepareSlow: function(target) {
if(!target) return
return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:fuzzysort.prepareNextBeginningIndexes(target), score:null, indexes:null, obj:null} // hidden
},
prepareSearch: function(search) {
if(!search) return
return fuzzysort.prepareLowerCodes(search)
},
// Below this point is only internal code
// Below this point is only internal code
// Below this point is only internal code
// Below this point is only internal code
getPrepared: function(target) {
if(target.length > 999) return fuzzysort.prepare(target) // don't cache huge targets
var targetPrepared = preparedCache.get(target)
if(targetPrepared !== undefined) return targetPrepared
targetPrepared = fuzzysort.prepare(target)
preparedCache.set(target, targetPrepared)
return targetPrepared
},
getPreparedSearch: function(search) {
if(search.length > 999) return fuzzysort.prepareSearch(search) // don't cache huge searches
var searchPrepared = preparedSearchCache.get(search)
if(searchPrepared !== undefined) return searchPrepared
searchPrepared = fuzzysort.prepareSearch(search)
preparedSearchCache.set(search, searchPrepared)
return searchPrepared
},
algorithm: function(searchLowerCodes, prepared, searchLowerCode) {
var targetLowerCodes = prepared._targetLowerCodes
var searchLen = searchLowerCodes.length
var targetLen = targetLowerCodes.length
var searchI = 0 // where we at
var targetI = 0 // where you at
var typoSimpleI = 0
var matchesSimpleLen = 0
// very basic fuzzy match; to remove non-matching targets ASAP!
// walk through target. find sequential matches.
// if all chars aren't found then exit
for(;;) {
var isMatch = searchLowerCode === targetLowerCodes[targetI]
if(isMatch) {
matchesSimple[matchesSimpleLen++] = targetI
++searchI; if(searchI === searchLen) break
searchLowerCode = searchLowerCodes[typoSimpleI===0?searchI : (typoSimpleI===searchI?searchI+1 : (typoSimpleI===searchI-1?searchI-1 : searchI))]
}
++targetI; if(targetI >= targetLen) { // Failed to find searchI
// Check for typo or exit
// we go as far as possible before trying to transpose
// then we transpose backwards until we reach the beginning
for(;;) {
if(searchI <= 1) return null // not allowed to transpose first char
if(typoSimpleI === 0) { // we haven't tried to transpose yet
--searchI
var searchLowerCodeNew = searchLowerCodes[searchI]
if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char
typoSimpleI = searchI
} else {
if(typoSimpleI === 1) return null // reached the end of the line for transposing
--typoSimpleI
searchI = typoSimpleI
searchLowerCode = searchLowerCodes[searchI + 1]
var searchLowerCodeNew = searchLowerCodes[searchI]
if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char
}
matchesSimpleLen = searchI
targetI = matchesSimple[matchesSimpleLen - 1] + 1
break
}
}
}
var searchI = 0
var typoStrictI = 0
var successStrict = false
var matchesStrictLen = 0
var nextBeginningIndexes = prepared._nextBeginningIndexes
if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)
var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]
// Our target string successfully matched all characters in sequence!
// Let's try a more advanced and strict test to improve the score
// only count it as a match if it's consecutive or a beginning character!
if(targetI !== targetLen) for(;;) {
if(targetI >= targetLen) {
// We failed to find a good spot for this search char, go back to the previous search char and force it forward
if(searchI <= 0) { // We failed to push chars forward for a better match
// transpose, starting from the beginning
++typoStrictI; if(typoStrictI > searchLen-2) break
if(searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI+1]) continue // doesn't make sense to transpose a repeat char
targetI = firstPossibleI
continue
}
--searchI
var lastMatch = matchesStrict[--matchesStrictLen]
targetI = nextBeginningIndexes[lastMatch]
} else {
var isMatch = searchLowerCodes[typoStrictI===0?searchI : (typoStrictI===searchI?searchI+1 : (typoStrictI===searchI-1?searchI-1 : searchI))] === targetLowerCodes[targetI]
if(isMatch) {
matchesStrict[matchesStrictLen++] = targetI
++searchI; if(searchI === searchLen) { successStrict = true; break }
++targetI
} else {
targetI = nextBeginningIndexes[targetI]
}
}
}
{ // tally up the score & keep track of matches for highlighting later
if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }
else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }
var score = 0
var lastTargetI = -1
for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]
// score only goes down if they're not consecutive
if(lastTargetI !== targetI - 1) score -= targetI
lastTargetI = targetI
}
if(!successStrict) {
score *= 1000
if(typoSimpleI !== 0) score += -20/*typoPenalty*/
} else {
if(typoStrictI !== 0) score += -20/*typoPenalty*/
}
score -= targetLen - searchLen
prepared.score = score
prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]
return prepared
}
},
algorithmNoTypo: function(searchLowerCodes, prepared, searchLowerCode) {
var targetLowerCodes = prepared._targetLowerCodes
var searchLen = searchLowerCodes.length
var targetLen = targetLowerCodes.length
var searchI = 0 // where we at
var targetI = 0 // where you at
var matchesSimpleLen = 0
// very basic fuzzy match; to remove non-matching targets ASAP!
// walk through target. find sequential matches.
// if all chars aren't found then exit
for(;;) {
var isMatch = searchLowerCode === targetLowerCodes[targetI]
if(isMatch) {
matchesSimple[matchesSimpleLen++] = targetI
++searchI; if(searchI === searchLen) break
searchLowerCode = searchLowerCodes[searchI]
}
++targetI; if(targetI >= targetLen) return null // Failed to find searchI
}
var searchI = 0
var successStrict = false
var matchesStrictLen = 0
var nextBeginningIndexes = prepared._nextBeginningIndexes
if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)
var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]
// Our target string successfully matched all characters in sequence!
// Let's try a more advanced and strict test to improve the score
// only count it as a match if it's consecutive or a beginning character!
if(targetI !== targetLen) for(;;) {
if(targetI >= targetLen) {
// We failed to find a good spot for this search char, go back to the previous search char and force it forward
if(searchI <= 0) break // We failed to push chars forward for a better match
--searchI
var lastMatch = matchesStrict[--matchesStrictLen]
targetI = nextBeginningIndexes[lastMatch]
} else {
var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI]
if(isMatch) {
matchesStrict[matchesStrictLen++] = targetI
++searchI; if(searchI === searchLen) { successStrict = true; break }
++targetI
} else {
targetI = nextBeginningIndexes[targetI]
}
}
}
{ // tally up the score & keep track of matches for highlighting later
if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }
else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }
var score = 0
var lastTargetI = -1
for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]
// score only goes down if they're not consecutive
if(lastTargetI !== targetI - 1) score -= targetI
lastTargetI = targetI
}
if(!successStrict) score *= 1000
score -= targetLen - searchLen
prepared.score = score
prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]
return prepared
}
},
prepareLowerCodes: function(str) {
var strLen = str.length
var lowerCodes = [] // new Array(strLen) sparse array is too slow
var lower = str.toLowerCase()
for(var i = 0; i < strLen; ++i) lowerCodes[i] = lower.charCodeAt(i)
return lowerCodes
},
prepareBeginningIndexes: function(target) {
var targetLen = target.length
var beginningIndexes = []; var beginningIndexesLen = 0
var wasUpper = false
var wasAlphanum = false
for(var i = 0; i < targetLen; ++i) {
var targetCode = target.charCodeAt(i)
var isUpper = targetCode>=65&&targetCode<=90
var isAlphanum = isUpper || targetCode>=97&&targetCode<=122 || targetCode>=48&&targetCode<=57
var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum
wasUpper = isUpper
wasAlphanum = isAlphanum
if(isBeginning) beginningIndexes[beginningIndexesLen++] = i
}
return beginningIndexes
},
prepareNextBeginningIndexes: function(target) {
var targetLen = target.length
var beginningIndexes = fuzzysort.prepareBeginningIndexes(target)
var nextBeginningIndexes = [] // new Array(targetLen) sparse array is too slow
var lastIsBeginning = beginningIndexes[0]
var lastIsBeginningI = 0
for(var i = 0; i < targetLen; ++i) {
if(lastIsBeginning > i) {
nextBeginningIndexes[i] = lastIsBeginning
} else {
lastIsBeginning = beginningIndexes[++lastIsBeginningI]
nextBeginningIndexes[i] = lastIsBeginning===undefined ? targetLen : lastIsBeginning
}
}
return nextBeginningIndexes
},
cleanup: cleanup,
new: fuzzysortNew,
}
return fuzzysort
} // fuzzysortNew
// This stuff is outside fuzzysortNew, because it's shared with instances of fuzzysort.new()
var isNode = typeof require !== 'undefined' && typeof window === 'undefined'
// var MAX_INT = Number.MAX_SAFE_INTEGER
// var MIN_INT = Number.MIN_VALUE
var preparedCache = new Map()
var preparedSearchCache = new Map()
var noResults = []; noResults.total = 0
var matchesSimple = []; var matchesStrict = []
function cleanup() { preparedCache.clear(); preparedSearchCache.clear(); matchesSimple = []; matchesStrict = [] }
function defaultScoreFn(a) {
var max = -9007199254740991
for (var i = a.length - 1; i >= 0; --i) {
var result = a[i]; if(result === null) continue
var score = result.score
if(score > max) max = score
}
if(max === -9007199254740991) return null
return max
}
// prop = 'key' 2.5ms optimized for this case, seems to be about as fast as direct obj[prop]
// prop = 'key1.key2' 10ms
// prop = ['key1', 'key2'] 27ms
function getValue(obj, prop) {
var tmp = obj[prop]; if(tmp !== undefined) return tmp
var segs = prop
if(!Array.isArray(prop)) segs = prop.split('.')
var len = segs.length
var i = -1
while (obj && (++i < len)) obj = obj[segs[i]]
return obj
}
function isObj(x) { return typeof x === 'object' } // faster as a function
// Hacked version of https://github.com/lemire/FastPriorityQueue.js
var fastpriorityqueue=function(){var r=[],o=0,e={};function n(){for(var e=0,n=r[e],c=1;c<o;){var f=c+1;e=c,f<o&&r[f].score<r[c].score&&(e=f),r[e-1>>1]=r[e],c=1+(e<<1)}for(var a=e-1>>1;e>0&&n.score<r[a].score;a=(e=a)-1>>1)r[e]=r[a];r[e]=n}return e.add=function(e){var n=o;r[o++]=e;for(var c=n-1>>1;n>0&&e.score<r[c].score;c=(n=c)-1>>1)r[n]=r[c];r[n]=e},e.poll=function(){if(0!==o){var e=r[0];return r[0]=r[--o],n(),e}},e.peek=function(e){if(0!==o)return r[0]},e.replaceTop=function(o){r[0]=o,n()},e};
var q = fastpriorityqueue() // reuse this, except for async, it needs to make its own
return fuzzysortNew()
}) // UMD
// TODO: (performance) wasm version!?
// TODO: (performance) layout memory in an optimal way to go fast by avoiding cache misses
// TODO: (performance) preparedCache is a memory leak
// TODO: (like sublime) backslash === forwardslash
// TODO: (performance) i have no idea how well optizmied the allowing typos algorithm is

@ -1,111 +0,0 @@
.CodeMirror-merge {
position: relative;
white-space: pre;
}
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
min-height:50px;
}
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 48%; }
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 4%; }
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
.CodeMirror-merge-pane {
display: inline-block;
white-space: normal;
vertical-align: top;
}
.CodeMirror-merge-pane-rightmost {
position: absolute;
right: 0px;
z-index: 1;
}
.CodeMirror-merge-gap {
z-index: 2;
display: inline-block;
height: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
position: relative;
background: #515151;
}
.CodeMirror-merge-scrolllock-wrap {
position: absolute;
bottom: 0; left: 50%;
}
.CodeMirror-merge-scrolllock {
position: relative;
left: -50%;
cursor: pointer;
color: #d8d8d8;
line-height: 1;
}
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
position: absolute;
left: 0; top: 0;
right: 0; bottom: 0;
line-height: 1;
}
.CodeMirror-merge-copy {
position: absolute;
cursor: pointer;
color: #ce374b;
z-index: 3;
}
.CodeMirror-merge-copy-reverse {
position: absolute;
cursor: pointer;
color: #44c;
}
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
background-position: bottom left;
background-repeat: repeat-x;
}
.CodeMirror-merge-r-chunk { background: #9a6868; }
.CodeMirror-merge-r-chunk-start { /*border-top: 1px solid #ee8; */}
.CodeMirror-merge-r-chunk-end {/* border-bottom: 1px solid #ee8; */}
.CodeMirror-merge-r-connect { fill:#9a6868;}
.CodeMirror-merge-l-chunk { background: #eef; }
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
.CodeMirror-merge-collapsed-widget:before {
content: "(...)";
}
.CodeMirror-merge-collapsed-widget {
cursor: pointer;
color: #88b;
background: #eef;
border: 1px solid #ddf;
font-size: 90%;
padding: 0 3px;
border-radius: 4px;
}
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }

File diff suppressed because it is too large Load Diff

@ -1,692 +0,0 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// mode javascript
// TODO actually recognize syntax of TypeScript constructs
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("javascript", function(config, parserConfig) {
var indentUnit = config.indentUnit;
var statementIndent = parserConfig.statementIndent;
var jsonldMode = parserConfig.jsonld;
var jsonMode = parserConfig.json || jsonldMode;
var isTS = parserConfig.typescript;
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
// Tokenizer
var keywords = function(){
function kw(type) {return {type: type, style: "keyword"};}
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
var jsKeywords = {
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
"return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
"var": kw("var"), "const": kw("var"), "let": kw("var"),
"function": kw("function"), "catch": kw("catch"),
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
"in": operator, "typeof": operator, "instanceof": operator,
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
"this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C
};
// Extend the 'normal' keywords with the TypeScript language extensions
if (isTS) {
var type = {type: "variable", style: "variable-3"};
var tsKeywords = {
// object-like things
"interface": kw("interface"),
"extends": kw("extends"),
"constructor": kw("constructor"),
// scope modifiers
"public": kw("public"),
"private": kw("private"),
"protected": kw("protected"),
"static": kw("static"),
// types
"string": type, "number": type, "bool": type, "any": type
};
for (var attr in tsKeywords) {
jsKeywords[attr] = tsKeywords[attr];
}
}
return jsKeywords;
}();
var isOperatorChar = /[+\-*&%=<>!?|~^]/;
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
function readRegexp(stream) {
var escaped = false, next, inSet = false;
while ((next = stream.next()) != null) {
if (!escaped) {
if (next == "/" && !inSet) return;
if (next == "[") inSet = true;
else if (inSet && next == "]") inSet = false;
}
escaped = !escaped && next == "\\";
}
}
// Used as scratch variables to communicate multiple values without
// consing up tons of objects.
var type, content;
function ret(tp, style, cont) {
type = tp; content = cont;
return style;
}
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == '"' || ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
return ret("number", "number");
} else if (ch == "." && stream.match("..")) {
return ret("spread", "meta");
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
return ret(ch);
} else if (ch == "=" && stream.eat(">")) {
return ret("=>", "operator");
} else if (ch == "0" && stream.eat(/x/i)) {
stream.eatWhile(/[\da-f]/i);
return ret("number", "number");
} else if (/\d/.test(ch)) {
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
return ret("number", "number");
} else if (ch == "/") {
if (stream.eat("*")) {
state.tokenize = tokenComment;
return tokenComment(stream, state);
} else if (stream.eat("/")) {
stream.skipToEnd();
return ret("comment", "comment");
} else if (state.lastType == "operator" || state.lastType == "keyword c" ||
state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
readRegexp(stream);
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
return ret("regexp", "string-2");
} else {
stream.eatWhile(isOperatorChar);
return ret("operator", "operator", stream.current());
}
} else if (ch == "`") {
state.tokenize = tokenQuasi;
return tokenQuasi(stream, state);
} else if (ch == "#") {
stream.skipToEnd();
return ret("error", "error");
} else if (isOperatorChar.test(ch)) {
stream.eatWhile(isOperatorChar);
return ret("operator", "operator", stream.current());
} else if (wordRE.test(ch)) {
stream.eatWhile(wordRE);
var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
ret("variable", "variable", word);
}
}
function tokenString(quote) {
return function(stream, state) {
var escaped = false, next;
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
state.tokenize = tokenBase;
return ret("jsonld-keyword", "meta");
}
while ((next = stream.next()) != null) {
if (next == quote && !escaped) break;
escaped = !escaped && next == "\\";
}
if (!escaped) state.tokenize = tokenBase;
return ret("string", "string");
};
}
function tokenComment(stream, state) {
var maybeEnd = false, ch;
while (ch = stream.next()) {
if (ch == "/" && maybeEnd) {
state.tokenize = tokenBase;
break;
}
maybeEnd = (ch == "*");
}
return ret("comment", "comment");
}
function tokenQuasi(stream, state) {
var escaped = false, next;
while ((next = stream.next()) != null) {
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
state.tokenize = tokenBase;
break;
}
escaped = !escaped && next == "\\";
}
return ret("quasi", "string-2", stream.current());
}
var brackets = "([{}])";
// This is a crude lookahead trick to try and notice that we're
// parsing the argument patterns for a fat-arrow function before we
// actually hit the arrow token. It only works if the arrow is on
// the same line as the arguments and there's no strange noise
// (comments) in between. Fallback is to only notice when we hit the
// arrow, and not declare the arguments as locals for the arrow
// body.
function findFatArrow(stream, state) {
if (state.fatArrowAt) state.fatArrowAt = null;
var arrow = stream.string.indexOf("=>", stream.start);
if (arrow < 0) return;
var depth = 0, sawSomething = false;
for (var pos = arrow - 1; pos >= 0; --pos) {
var ch = stream.string.charAt(pos);
var bracket = brackets.indexOf(ch);
if (bracket >= 0 && bracket < 3) {
if (!depth) { ++pos; break; }
if (--depth == 0) break;
} else if (bracket >= 3 && bracket < 6) {
++depth;
} else if (wordRE.test(ch)) {
sawSomething = true;
} else if (/["'\/]/.test(ch)) {
return;
} else if (sawSomething && !depth) {
++pos;
break;
}
}
if (sawSomething && !depth) state.fatArrowAt = pos;
}
// Parser
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
function JSLexical(indented, column, type, align, prev, info) {
this.indented = indented;
this.column = column;
this.type = type;
this.prev = prev;
this.info = info;
if (align != null) this.align = align;
}
function inScope(state, varname) {
for (var v = state.localVars; v; v = v.next)
if (v.name == varname) return true;
for (var cx = state.context; cx; cx = cx.prev) {
for (var v = cx.vars; v; v = v.next)
if (v.name == varname) return true;
}
}
function parseJS(state, style, type, content, stream) {
var cc = state.cc;
// Communicate our context to the combinators.
// (Less wasteful than consing up a hundred closures on every call.)
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
if (!state.lexical.hasOwnProperty("align"))
state.lexical.align = true;
while(true) {
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
if (combinator(type, content)) {
while(cc.length && cc[cc.length - 1].lex)
cc.pop()();
if (cx.marked) return cx.marked;
if (type == "variable" && inScope(state, content)) return "variable-2";
return style;
}
}
}
// Combinator utils
var cx = {state: null, column: null, marked: null, cc: null};
function pass() {
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
}
function cont() {
pass.apply(null, arguments);
return true;
}
function register(varname) {
function inList(list) {
for (var v = list; v; v = v.next)
if (v.name == varname) return true;
return false;
}
var state = cx.state;
if (state.context) {
cx.marked = "def";
if (inList(state.localVars)) return;
state.localVars = {name: varname, next: state.localVars};
} else {
if (inList(state.globalVars)) return;
if (parserConfig.globalVars)
state.globalVars = {name: varname, next: state.globalVars};
}
}
// Combinators
var defaultVars = {name: "this", next: {name: "arguments"}};
function pushcontext() {
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
cx.state.localVars = defaultVars;
}
function popcontext() {
cx.state.localVars = cx.state.context.vars;
cx.state.context = cx.state.context.prev;
}
function pushlex(type, info) {
var result = function() {
var state = cx.state, indent = state.indented;
if (state.lexical.type == "stat") indent = state.lexical.indented;
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
indent = outer.indented;
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
};
result.lex = true;
return result;
}
function poplex() {
var state = cx.state;
if (state.lexical.prev) {
if (state.lexical.type == ")")
state.indented = state.lexical.indented;
state.lexical = state.lexical.prev;
}
}
poplex.lex = true;
function expect(wanted) {
function exp(type) {
if (type == wanted) return cont();
else if (wanted == ";") return pass();
else return cont(exp);
};
return exp;
}
function statement(type, value) {
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
if (type == "{") return cont(pushlex("}"), block, poplex);
if (type == ";") return cont();
if (type == "if") {
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
cx.state.cc.pop()();
return cont(pushlex("form"), expression, statement, poplex, maybeelse);
}
if (type == "function") return cont(functiondef);
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
if (type == "variable") return cont(pushlex("stat"), maybelabel);
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
block, poplex, poplex);
if (type == "case") return cont(expression, expect(":"));
if (type == "default") return cont(expect(":"));
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
statement, poplex, popcontext);
if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
if (type == "class") return cont(pushlex("form"), className, poplex);
if (type == "export") return cont(pushlex("form"), afterExport, poplex);
if (type == "import") return cont(pushlex("form"), afterImport, poplex);
return pass(pushlex("stat"), expression, expect(";"), poplex);
}
function expression(type) {
return expressionInner(type, false);
}
function expressionNoComma(type) {
return expressionInner(type, true);
}
function expressionInner(type, noComma) {
if (cx.state.fatArrowAt == cx.stream.start) {
var body = noComma ? arrowBodyNoComma : arrowBody;
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
}
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
if (type == "function") return cont(functiondef, maybeop);
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
if (type == "quasi") { return pass(quasi, maybeop); }
return cont();
}
function maybeexpression(type) {
if (type.match(/[;\}\)\],]/)) return pass();
return pass(expression);
}
function maybeexpressionNoComma(type) {
if (type.match(/[;\}\)\],]/)) return pass();
return pass(expressionNoComma);
}
function maybeoperatorComma(type, value) {
if (type == ",") return cont(expression);
return maybeoperatorNoComma(type, value, false);
}
function maybeoperatorNoComma(type, value, noComma) {
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
var expr = noComma == false ? expression : expressionNoComma;
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
if (type == "operator") {
if (/\+\+|--/.test(value)) return cont(me);
if (value == "?") return cont(expression, expect(":"), expr);
return cont(expr);
}
if (type == "quasi") { return pass(quasi, me); }
if (type == ";") return;
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
if (type == ".") return cont(property, me);
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
}
function quasi(type, value) {
if (type != "quasi") return pass();
if (value.slice(value.length - 2) != "${") return cont(quasi);
return cont(expression, continueQuasi);
}
function continueQuasi(type) {
if (type == "}") {
cx.marked = "string-2";
cx.state.tokenize = tokenQuasi;
return cont(quasi);
}
}
function arrowBody(type) {
findFatArrow(cx.stream, cx.state);
return pass(type == "{" ? statement : expression);
}
function arrowBodyNoComma(type) {
findFatArrow(cx.stream, cx.state);
return pass(type == "{" ? statement : expressionNoComma);
}
function maybelabel(type) {
if (type == ":") return cont(poplex, statement);
return pass(maybeoperatorComma, expect(";"), poplex);
}
function property(type) {
if (type == "variable") {cx.marked = "property"; return cont();}
}
function objprop(type, value) {
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
if (value == "get" || value == "set") return cont(getterSetter);
return cont(afterprop);
} else if (type == "number" || type == "string") {
cx.marked = jsonldMode ? "property" : (cx.style + " property");
return cont(afterprop);
} else if (type == "jsonld-keyword") {
return cont(afterprop);
} else if (type == "[") {
return cont(expression, expect("]"), afterprop);
}
}
function getterSetter(type) {
if (type != "variable") return pass(afterprop);
cx.marked = "property";
return cont(functiondef);
}
function afterprop(type) {
if (type == ":") return cont(expressionNoComma);
if (type == "(") return pass(functiondef);
}
function commasep(what, end) {
function proceed(type) {
if (type == ",") {
var lex = cx.state.lexical;
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
return cont(what, proceed);
}
if (type == end) return cont();
return cont(expect(end));
}
return function(type) {
if (type == end) return cont();
return pass(what, proceed);
};
}
function contCommasep(what, end, info) {
for (var i = 3; i < arguments.length; i++)
cx.cc.push(arguments[i]);
return cont(pushlex(end, info), commasep(what, end), poplex);
}
function block(type) {
if (type == "}") return cont();
return pass(statement, block);
}
function maybetype(type) {
if (isTS && type == ":") return cont(typedef);
}
function typedef(type) {
if (type == "variable"){cx.marked = "variable-3"; return cont();}
}
function vardef() {
return pass(pattern, maybetype, maybeAssign, vardefCont);
}
function pattern(type, value) {
if (type == "variable") { register(value); return cont(); }
if (type == "[") return contCommasep(pattern, "]");
if (type == "{") return contCommasep(proppattern, "}");
}
function proppattern(type, value) {
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
register(value);
return cont(maybeAssign);
}
if (type == "variable") cx.marked = "property";
return cont(expect(":"), pattern, maybeAssign);
}
function maybeAssign(_type, value) {
if (value == "=") return cont(expressionNoComma);
}
function vardefCont(type) {
if (type == ",") return cont(vardef);
}
function maybeelse(type, value) {
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
}
function forspec(type) {
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
}
function forspec1(type) {
if (type == "var") return cont(vardef, expect(";"), forspec2);
if (type == ";") return cont(forspec2);
if (type == "variable") return cont(formaybeinof);
return pass(expression, expect(";"), forspec2);
}
function formaybeinof(_type, value) {
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
return cont(maybeoperatorComma, forspec2);
}
function forspec2(type, value) {
if (type == ";") return cont(forspec3);
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
return pass(expression, expect(";"), forspec3);
}
function forspec3(type) {
if (type != ")") cont(expression);
}
function functiondef(type, value) {
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
if (type == "variable") {register(value); return cont(functiondef);}
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
}
function funarg(type) {
if (type == "spread") return cont(funarg);
return pass(pattern, maybetype);
}
function className(type, value) {
if (type == "variable") {register(value); return cont(classNameAfter);}
}
function classNameAfter(type, value) {
if (value == "extends") return cont(expression, classNameAfter);
if (type == "{") return cont(pushlex("}"), classBody, poplex);
}
function classBody(type, value) {
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
return cont(functiondef, classBody);
}
if (value == "*") {
cx.marked = "keyword";
return cont(classBody);
}
if (type == ";") return cont(classBody);
if (type == "}") return cont();
}
function classGetterSetter(type) {
if (type != "variable") return pass();
cx.marked = "property";
return cont();
}
function afterModule(type, value) {
if (type == "string") return cont(statement);
if (type == "variable") { register(value); return cont(maybeFrom); }
}
function afterExport(_type, value) {
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
return pass(statement);
}
function afterImport(type) {
if (type == "string") return cont();
return pass(importSpec, maybeFrom);
}
function importSpec(type, value) {
if (type == "{") return contCommasep(importSpec, "}");
if (type == "variable") register(value);
return cont();
}
function maybeFrom(_type, value) {
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
}
function arrayLiteral(type) {
if (type == "]") return cont();
return pass(expressionNoComma, maybeArrayComprehension);
}
function maybeArrayComprehension(type) {
if (type == "for") return pass(comprehension, expect("]"));
if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
return pass(commasep(expressionNoComma, "]"));
}
function comprehension(type) {
if (type == "for") return cont(forspec, comprehension);
if (type == "if") return cont(expression, comprehension);
}
function isContinuedStatement(state, textAfter) {
return state.lastType == "operator" || state.lastType == "," ||
isOperatorChar.test(textAfter.charAt(0)) ||
/[,.]/.test(textAfter.charAt(0));
}
// Interface
return {
startState: function(basecolumn) {
var state = {
tokenize: tokenBase,
lastType: "sof",
cc: [],
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
localVars: parserConfig.localVars,
context: parserConfig.localVars && {vars: parserConfig.localVars},
indented: 0
};
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
state.globalVars = parserConfig.globalVars;
return state;
},
token: function(stream, state) {
if (stream.sol()) {
if (!state.lexical.hasOwnProperty("align"))
state.lexical.align = false;
state.indented = stream.indentation();
findFatArrow(stream, state);
}
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
var style = state.tokenize(stream, state);
if (type == "comment") return style;
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
return parseJS(state, style, type, content, stream);
},
indent: function(state, textAfter) {
if (state.tokenize == tokenComment) return CodeMirror.Pass;
if (state.tokenize != tokenBase) return 0;
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
// Kludge to prevent 'maybelse' from blocking lexical scope pops
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
var c = state.cc[i];
if (c == poplex) lexical = lexical.prev;
else if (c != maybeelse) break;
}
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
lexical = lexical.prev;
var type = lexical.type, closing = firstChar == type;
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
else if (type == "form" && firstChar == "{") return lexical.indented;
else if (type == "form") return lexical.indented + indentUnit;
else if (type == "stat")
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
else return lexical.indented + (closing ? 0 : indentUnit);
},
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
blockCommentStart: jsonMode ? null : "/*",
blockCommentEnd: jsonMode ? null : "*/",
lineComment: jsonMode ? null : "//",
fold: "brace",
helperType: jsonMode ? "json" : "javascript",
jsonldMode: jsonldMode,
jsonMode: jsonMode
};
});
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
CodeMirror.defineMIME("text/javascript", "javascript");
CodeMirror.defineMIME("text/ecmascript", "javascript");
CodeMirror.defineMIME("application/javascript", "javascript");
CodeMirror.defineMIME("application/x-javascript", "javascript");
CodeMirror.defineMIME("application/ecmascript", "javascript");
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
});

@ -1,429 +0,0 @@
//需求:表情栏可以隐藏显示,高度只要一点高
function sd_create_editor(params){
// var minHeight; //最小高度
var paramsHeight = params.height; //设定的高度
var id = arguments[1] ? arguments[1] : undefined;
var type = arguments[2] ? arguments[2] : '';
var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"94%",
height:"33px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
width:params.width,
/*
items:['emoticons','fontname',
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'formatblock', 'fontsize', '|','indent', 'outdent',
'|','imagedirectupload','more'],*/
items : ['code','emoticons','fontname',
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'formatblock', 'fontsize', '|','indent', 'outdent',
'|','imagedirectupload','table', 'media', 'preview',"more"
],
afterChange:function(){//按键事件
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+7)) , paramsHeight));
},
afterBlur:function(){
//params.toolbar_container.hide();
params.textarea.blur();
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
if(this.isEmpty()) {
this.edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
}
//params.toolbar_container.hide();
$('#reply_image_' + id).addClass('imageFuzzy');
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
params.submit_btn.hide();
params.toolbar_container.hide();
this.resize("100%", null);
}else if(this.edit.html().trim() != ""){
params.submit_btn.show();
params.toolbar_container.show();
}
//params.submit_btn.css("display","none");
},
afterFocus: function(){
var edit = this.edit;
var body = edit.doc.body;
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
edit.html('');
}
params.submit_btn.show();
params.contentmsg.hide();
params.toolbar_container.show();
// params.toolbar_container.show();
$('#reply_image_' + id).removeClass('imageFuzzy');
//edit.iframe.width(paramsWidth);
this.resize("100%", null);
this.resize(paramsWidth, null);
//params.submit_btn.show();
},
afterCreate:function(){
//params.submit_btn.hide();
var toolbar = $("div[class='ke-toolbar']",params.div_form);
toolbar.css('display','inline');
toolbar.css('padding',0);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
params.toolbar_container.hide();
params.submit_btn.hide();
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
// params.toolbar_container.hide();
if(typeof enableAt === 'function'){
enableAt(this, id, type);
}
}
}).loadPlugin('paste');
return editor;
}
function sd_create_shixun_editor(params){
// var minHeight; //最小高度
var paramsHeight = params.height; //设定的高度
var id = arguments[1] ? arguments[1] : undefined;
var type = arguments[2] ? arguments[2] : '';
var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"94%",
height:"33px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
width:params.width,
/*
items:['emoticons','fontname',
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'formatblock', 'fontsize', '|','indent', 'outdent',
'|','imagedirectupload','more'],*/
items : ['imagedirectupload'],
afterChange:function(){//按键事件
if(this.isEmpty() || this.edit.doc.body.innerText == '说点什么') {
$('#mini_comment_section').height('auto')
} else {
var edit = this.edit;
var body = edit.doc.body;
var newHeight = 0;
var FF = !(window.mozInnerScreenX == null);
if (FF) { // 火狐下处理方式不一样
newHeight = $(body).height()
} else {
$(body).children().each(function(){newHeight+=$(this).height()});
}
// var newHeight = $(body).height()
var maxHeight = 357 // $(window).height() - 150 - 57; // 150 上部距离 57 下部距离
newHeight = newHeight <= maxHeight ? newHeight : maxHeight
if (newHeight > 150) {
if (FF) { // 火狐下处理方式不一样
this.resize("100%", (newHeight + 20) + 'px');
} else {
this.resize("100%", newHeight + 'px');
}
$('#mini_comment_section').height(newHeight+57)
} else {
this.resize("100%", '150px');
$('#mini_comment_section').height('auto')
}
}
//edit.iframe.height(paramsHeight);
//this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+7)) , 15));
},
afterBlur:function(){
//params.toolbar_container.hide();
params.textarea.blur();
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
if(this.isEmpty()) {
$('#mini_comment_section').height('auto')
this.edit.html("<span id='hint' style='color:#999999;font-size:14px;'>说点什么</span>");
params.submit_btn.hide();
params.toolbar_container.hide();
this.resize("100%", "30px");
$("#dis_reply_id").val("");
if($("#editor_panel").length>0){
$("#editor_panel").attr("style","margin-top:9px;flex: 1;");
$("#editor_panel").parents("form").addClass("df")
}
}
//params.toolbar_container.hide();
/*$('#reply_image_' + id).addClass('imageFuzzy');
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
params.submit_btn.hide();
params.toolbar_container.hide();
this.resize("100%", "30px");
}else if(this.edit.html().trim() != ""){
params.submit_btn.show();
params.toolbar_container.show();
}*/
//params.submit_btn.css("display","none");
// $('#mini_comment_section').height('auto')
},
afterFocus: function(){
var edit = this.edit;
var body = edit.doc.body;
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
edit.html("");
}
params.submit_btn.show();
params.contentmsg.hide();
params.toolbar_container.show();
// params.toolbar_container.show();
$('#reply_image_' + id).removeClass('imageFuzzy');
//edit.iframe.width(paramsWidth);
var newHeight = $(body).height()
if (newHeight < 150) {
this.resize("100%", "150px");
this.resize(paramsWidth, "150px");
}
if($("#editor_panel").length>0){
$("#editor_panel").attr("style","width:100%;margin-top:9px;");
$("#editor_panel").parents("form").removeClass("df")
}
//params.submit_btn.show();
// $('#mini_comment_section').height('244px')
},
afterCreate:function(){
//params.submit_btn.hide();
var toolbar = $("div[class='ke-toolbar']",params.div_form);
toolbar.css('display','inline');
toolbar.css('padding',0);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
params.toolbar_container.hide();
params.submit_btn.hide();
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
// body.style.overflowY = 'hidden';
body.style['padding-top']= '2px';
body.style['padding-left']= '5px';
// <style type='text/css'>body{padding-top: 2px;padding-left: 5px;}</style>
//reset height
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
edit.html("<span id='hint' style='color:#999999;font-size:14px;'>说点什么</span>");
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
// params.toolbar_container.hide();
if(typeof enableAt === 'function'){
enableAt(this, id, type);
}
var iframe = edit.iframe[0]
$(iframe.contentDocument.head).append(
$("<style type='text/css'>::-webkit-scrollbar{height: 10px;width: 6px !important;background: rgba(0,0,0,.1) !important;} ::-webkit-scrollbar-thumb {border-radius: 6px;background: #ADADAD;};</style>"));
}
}).loadPlugin('paste');
return editor;
}
function sd_check_editor_form_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function sd_create_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = sd_check_editor_form_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function sd_reset_editor_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
//第二个参数是高度,可以传,可以不传
function sd_create_editor_from_data(id){
var height = arguments[1] ? arguments[1] : undefined;
var width = arguments[2] ? arguments[2] : undefined;
var type = arguments[3] ? arguments[3] : undefined;
// KindEditor.ready(function (K) {
// react 环境不需要ready方法页面已经加载完了才执行sd_create_editor_from_data
var K = KindEditor;
$("div[nhname='new_message_" + id + "']").each(function () {
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form", params.div_form);
if (params.form == undefined || params.form.length == 0) {
return;
}
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.submit_btn = $("#new_message_submit_btn_" + id);
params.height = height;
params.width = width;
if (params.textarea.data('init') == undefined) {
params.editor = sd_create_editor(params,id, type);
sd_create_form(params);
params.cancel_btn.click(function () {
sd_reset_editor_form(params);
});
params.submit_btn.click(function () {
var tContents = $("#comment_news_" + id).val();
if(tContents != undefined){
var beforeImage = tContents.split("<img");
var afterImage = tContents.split("/>");
if(beforeImage[0] == "" && afterImage[1] == ""){
notice_box('不支持纯图片评论<br/>请在评论中增加文字信息');
return;
}
if (tContents.startsWith('<') && tContents.endsWith('>')
&& (tContents.indexOf('<link') != -1 || tContents.indexOf('<script') != -1 )) {
notice_box('不支持包含link或script标签的html内容');
return;
}
}
// react环境下发消息给react组件
if (window['__isR'] === true) {
$(document).trigger("onReply", { commentContent:tContents, id:id, editor:params.editor } );
} else {
params.form.submit();
}
});
params.textarea.focus(function (){
params.editor.focus();
});
params.textarea.data('init', 1);
$(this).show();
__editor = params.editor
}
});
// });
div_form = $("div[nhname='new_message_" + id + "']");
$(".ke-edit", div_form).css("height","33px");
$(".ke-edit-iframe",div_form).css("height","33px");
return __editor;
}
//第二个参数是高度,可以传,可以不传
function sd_create_editor_from_shixun_data(id){
var height = arguments[1] ? arguments[1] : undefined;
var width = arguments[2] ? arguments[2] : undefined;
var type = arguments[3] ? arguments[3] : undefined;
// KindEditor.ready(function (K) {
// react 环境不需要ready方法页面已经加载完了才执行sd_create_editor_from_data
var K = KindEditor;
$("div[nhname='new_message_" + id + "']").each(function () {
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form", params.div_form);
if (params.form == undefined || params.form.length == 0) {
return;
}
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.submit_btn = $("#new_message_submit_btn_" + id);
params.height = height;
params.width = width;
if (params.textarea.data('init') == undefined) {
params.editor = sd_create_shixun_editor(params,id, type);
window._commentInput = params.editor;
sd_create_form(params);
params.cancel_btn.click(function () {
sd_reset_editor_form(params);
});
// 在react组件中hide
// params.submit_btn.click(function () {
// $(this).hide()
// });
// 非react环境才监听这个click
!window['__isR'] && params.submit_btn.click(function () {
var tContents = $("#comment_news_" + id).val();
if(tContents != undefined){
var beforeImage = tContents.split("<img");
var afterImage = tContents.split("/>");
if(beforeImage[0] == "" && afterImage[1] == ""){
notice_box('不支持纯图片评论<br/>请在评论中增加文字信息');
return;
}
}
params.form.submit();
});
params.textarea.focus(function (){
params.editor.focus();
});
params.textarea.data('init', 1);
$(this).show();
}
});
// });
div_form = $("div[nhname='new_message_" + id + "']");
$(".ke-edit", div_form).css("height","33px");
$(".ke-edit-iframe",div_form).css("height","33px");
}

File diff suppressed because it is too large Load Diff

@ -1,9 +0,0 @@
/*!
* Cropper.js v1.5.2
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-06-30T06:01:02.389Z
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}

File diff suppressed because one or more lines are too long

@ -1,49 +0,0 @@
(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}
diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,
b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};
diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100<a.length&&100<b.length?this.diff_lineMode_(a,b,
d):this.diff_bisect_(a,b,d)};
diff_match_patch.prototype.diff_lineMode_=function(a,b,c){var d=this.diff_linesToChars_(a,b);a=d.chars1;b=d.chars2;d=d.lineArray;a=this.diff_main(a,b,!1,c);this.diff_charsToLines_(a,d);this.diff_cleanupSemantic(a);a.push([0,""]);for(var e=d=b=0,f="",g="";b<a.length;){switch(a[b][0]){case 1:e++;g+=a[b][1];break;case -1:d++;f+=a[b][1];break;case 0:if(1<=d&&1<=e){a.splice(b-d-e,d+e);b=b-d-e;d=this.diff_main(f,g,!1,c);for(e=d.length-1;0<=e;e--)a.splice(b,0,d[e]);b+=d.length}d=e=0;g=f=""}b++}a.pop();return a};
diff_match_patch.prototype.diff_bisect_=function(a,b,c){for(var d=a.length,e=b.length,f=Math.ceil((d+e)/2),g=f,h=2*f,j=Array(h),i=Array(h),k=0;k<h;k++)j[k]=-1,i[k]=-1;j[g+1]=0;i[g+1]=0;for(var k=d-e,q=0!=k%2,r=0,t=0,p=0,w=0,v=0;v<f&&!((new Date).getTime()>c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]<j[l+1]?j[l+1]:j[l-1]+1;for(var s=m-n;m<d&&s<e&&a.charAt(m)==b.charAt(s);)m++,s++;j[l]=m;if(m>d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l<h&&-1!=i[l])){var u=d-i[l];if(m>=
u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]<i[l+1]?i[l+1]:i[l-1]+1;for(m=u-n;u<d&&m<e&&a.charAt(d-u-1)==b.charAt(e-m-1);)u++,m++;i[l]=u;if(u>d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l<h&&-1!=j[l])&&(m=j[l],s=g+m-l,u=d-u,m>=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};
diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};
diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;f<a.length-1;){f=a.indexOf("\n",c);-1==f&&(f=a.length-1);var r=a.substring(c,f+1),c=f+1;(e.hasOwnProperty?e.hasOwnProperty(r):void 0!==e[r])?b+=String.fromCharCode(e[r]):(b+=String.fromCharCode(g),e[r]=g,d[g++]=r)}return b}var d=[],e={};d[0]="";var f=c(a),g=c(b);return{chars1:f,chars2:g,lineArray:d}};
diff_match_patch.prototype.diff_charsToLines_=function(a,b){for(var c=0;c<a.length;c++){for(var d=a[c][1],e=[],f=0;f<d.length;f++)e[f]=b[d.charCodeAt(f)];a[c][1]=e.join("")}};diff_match_patch.prototype.diff_commonPrefix=function(a,b){if(!a||!b||a.charAt(0)!=b.charAt(0))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(f,e)==b.substring(f,e)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
diff_match_patch.prototype.diff_commonSuffix=function(a,b){if(!a||!b||a.charAt(a.length-1)!=b.charAt(b.length-1))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(a.length-e,a.length-f)==b.substring(b.length-e,b.length-f)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
diff_match_patch.prototype.diff_commonOverlap_=function(a,b){var c=a.length,d=b.length;if(0==c||0==d)return 0;c>d?a=a.substring(c-d):c<d&&(b=b.substring(0,c));c=Math.min(c,d);if(a==b)return c;for(var d=0,e=1;;){var f=a.substring(c-e),f=b.indexOf(f);if(-1==f)return d;e+=f;if(0==f||a.substring(c-e)==b.substring(0,e))d=e,e++}};
diff_match_patch.prototype.diff_halfMatch_=function(a,b){function c(a,b,c){for(var d=a.substring(c,c+Math.floor(a.length/4)),e=-1,g="",h,j,n,l;-1!=(e=b.indexOf(d,e+1));){var m=f.diff_commonPrefix(a.substring(c),b.substring(e)),s=f.diff_commonSuffix(a.substring(0,c),b.substring(0,e));g.length<s+m&&(g=b.substring(e-s,e)+b.substring(e,e+m),h=a.substring(0,c-s),j=a.substring(c+m),n=b.substring(0,e-s),l=b.substring(e+m))}return 2*g.length>=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;
var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.length<d.length)return null;var f=this,g=c(d,e,Math.ceil(d.length/4)),d=c(d,e,Math.ceil(d.length/2)),h;if(!g&&!d)return null;h=d?g?g[4].length>d[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};
diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f<a.length;)0==a[f][0]?(c[d++]=f,g=j,h=i,i=j=0,e=a[f][1]):(1==a[f][0]?j+=a[f][1].length:i+=a[f][1].length,e&&(e.length<=Math.max(g,h)&&e.length<=Math.max(j,i))&&(a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,d--,f=0<d?c[d-1]:-1,i=j=h=g=0,e=null,b=!0)),f++;b&&this.diff_cleanupMerge(a);this.diff_cleanupSemanticLossless(a);for(f=1;f<a.length;){if(-1==a[f-1][0]&&1==a[f][0]){b=a[f-1][1];c=a[f][1];
d=this.diff_commonOverlap_(b,c);e=this.diff_commonOverlap_(c,b);if(d>=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};
diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);
return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c<a.length-1;){if(0==a[c-1][0]&&0==a[c+1][0]){var d=a[c-1][1],e=a[c][1],f=a[c+1][1],g=this.diff_commonSuffix(d,e);if(g)var h=e.substring(e.length-g),d=d.substring(0,d.length-g),e=h+e.substring(0,e.length-g),f=h+f;for(var g=d,h=e,j=f,i=b(d,e)+b(e,f);e.charAt(0)===f.charAt(0);){var d=d+e.charAt(0),e=e.substring(1)+f.charAt(0),f=f.substring(1),k=b(d,e)+b(e,f);k>=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=
h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;
diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;f<a.length;){if(0==a[f][0])a[f][1].length<this.Diff_EditCost&&(j||i)?(c[d++]=f,g=j,h=i,e=a[f][1]):(d=0,e=null),j=i=!1;else if(-1==a[f][0]?i=!0:j=!0,e&&(g&&h&&j&&i||e.length<this.Diff_EditCost/2&&3==g+h+j+i))a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,e=null,g&&h?(j=i=!0,d=0):(d--,f=0<d?c[d-1]:-1,j=i=!1),b=!0;f++}b&&this.diff_cleanupMerge(a)};
diff_match_patch.prototype.diff_cleanupMerge=function(a){a.push([0,""]);for(var b=0,c=0,d=0,e="",f="",g;b<a.length;)switch(a[b][0]){case 1:d++;f+=a[b][1];b++;break;case -1:c++;e+=a[b][1];b++;break;case 0:1<c+d?(0!==c&&0!==d&&(g=this.diff_commonPrefix(f,e),0!==g&&(0<b-c-d&&0==a[b-c-d-1][0]?a[b-c-d-1][1]+=f.substring(0,g):(a.splice(0,0,[0,f.substring(0,g)]),b++),f=f.substring(g),e=e.substring(g)),g=this.diff_commonSuffix(f,e),0!==g&&(a[b][1]=f.substring(f.length-g)+a[b][1],f=f.substring(0,f.length-
g),e=e.substring(0,e.length-g))),0===c?a.splice(b-d,c+d,[1,f]):0===d?a.splice(b-c,c+d,[-1,e]):a.splice(b-c-d,c+d,[-1,e],[1,f]),b=b-c-d+(c?1:0)+(d?1:0)+1):0!==b&&0==a[b-1][0]?(a[b-1][1]+=a[b][1],a.splice(b,1)):b++,c=d=0,f=e=""}""===a[a.length-1][1]&&a.pop();c=!1;for(b=1;b<a.length-1;)0==a[b-1][0]&&0==a[b+1][0]&&(a[b][1].substring(a[b][1].length-a[b-1][1].length)==a[b-1][1]?(a[b][1]=a[b-1][1]+a[b][1].substring(0,a[b][1].length-a[b-1][1].length),a[b+1][1]=a[b-1][1]+a[b+1][1],a.splice(b-1,1),c=!0):a[b][1].substring(0,
a[b+1][1].length)==a[b+1][1]&&(a[b-1][1]+=a[b+1][1],a[b][1]=a[b][1].substring(a[b+1][1].length)+a[b+1][1],a.splice(b+1,1),c=!0)),b++;c&&this.diff_cleanupMerge(a)};diff_match_patch.prototype.diff_xIndex=function(a,b){var c=0,d=0,e=0,f=0,g;for(g=0;g<a.length;g++){1!==a[g][0]&&(c+=a[g][1].length);-1!==a[g][0]&&(d+=a[g][1].length);if(c>b)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};
diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=/</g,e=/>/g,f=/\n/g,g=0;g<a.length;g++){var h=a[g][0],j=a[g][1],j=j.replace(c,"&amp;").replace(d,"&lt;").replace(e,"&gt;").replace(f,"&para;<br>");switch(h){case 1:b[g]='<ins style="background:#e6ffe6;">'+j+"</ins>";break;case -1:b[g]='<del style="background:#ffe6e6;">'+j+"</del>";break;case 0:b[g]="<span>"+j+"</span>"}}return b.join("")};
diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;c<a.length;c++)1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_text2=function(a){for(var b=[],c=0;c<a.length;c++)-1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_levenshtein=function(a){for(var b=0,c=0,d=0,e=0;e<a.length;e++){var f=a[e][0],g=a[e][1];switch(f){case 1:c+=g.length;break;case -1:d+=g.length;break;case 0:b+=Math.max(c,d),d=c=0}}return b+=Math.max(c,d)};
diff_match_patch.prototype.diff_toDelta=function(a){for(var b=[],c=0;c<a.length;c++)switch(a[c][0]){case 1:b[c]="+"+encodeURI(a[c][1]);break;case -1:b[c]="-"+a[c][1].length;break;case 0:b[c]="="+a[c][1].length}return b.join("\t").replace(/%20/g," ")};
diff_match_patch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/g),g=0;g<f.length;g++){var h=f[g].substring(1);switch(f[g].charAt(0)){case "+":try{c[d++]=[1,decodeURI(h)]}catch(j){throw Error("Illegal escape in diff_fromDelta: "+h);}break;case "-":case "=":var i=parseInt(h,10);if(isNaN(i)||0>i)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<<b.length-1,h=-1,i,k,q=b.length+a.length,r,t=0;t<b.length;t++){i=0;for(k=q;i<k;)d(t,c+
k)<=g?i=k:q=k,k=Math.floor((q-i)/2+i);q=k;i=Math.max(1,c-k+1);var p=Math.min(c+k,a.length)+b.length;k=Array(p+2);for(k[p+1]=(1<<t)-1;p>=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};
diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=0;for(c=0;c<a.length;c++)b[a.charAt(c)]|=1<<a.length-c-1;return b};
diff_match_patch.prototype.patch_addContext_=function(a,b){if(0!=b.length){for(var c=b.substring(a.start2,a.start2+a.length1),d=0;b.indexOf(c)!=b.lastIndexOf(c)&&c.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)d+=this.Patch_Margin,c=b.substring(a.start2-d,a.start2+a.length1+d);d+=this.Patch_Margin;(c=b.substring(a.start2-d,a.start2))&&a.diffs.unshift([0,c]);(d=b.substring(a.start2+a.length1,a.start2+a.length1+d))&&a.diffs.push([0,d]);a.start1-=c.length;a.start2-=c.length;a.length1+=
c.length+d.length;a.length2+=c.length+d.length}};
diff_match_patch.prototype.patch_make=function(a,b,c){var d;if("string"==typeof a&&"string"==typeof b&&"undefined"==typeof c)d=a,b=this.diff_main(d,b,!0),2<b.length&&(this.diff_cleanupSemantic(b),this.diff_cleanupEfficiency(b));else if(a&&"object"==typeof a&&"undefined"==typeof b&&"undefined"==typeof c)b=a,d=this.diff_text1(b);else if("string"==typeof a&&b&&"object"==typeof b&&"undefined"==typeof c)d=a;else if("string"==typeof a&&"string"==typeof b&&c&&"object"==typeof c)d=a,b=c;else throw Error("Unknown call format to patch_make.");
if(0===b.length)return[];c=[];a=new diff_match_patch.patch_obj;for(var e=0,f=0,g=0,h=d,j=0;j<b.length;j++){var i=b[j][0],k=b[j][1];!e&&0!==i&&(a.start1=f,a.start2=g);switch(i){case 1:a.diffs[e++]=b[j];a.length2+=k.length;d=d.substring(0,g)+k+d.substring(g);break;case -1:a.length1+=k.length;a.diffs[e++]=b[j];d=d.substring(0,g)+d.substring(g+k.length);break;case 0:k.length<=2*this.Patch_Margin&&e&&b.length!=j+1?(a.diffs[e++]=b[j],a.length1+=k.length,a.length2+=k.length):k.length>=2*this.Patch_Margin&&
e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=new diff_match_patch.patch_obj;e.diffs=[];for(var f=0;f<d.diffs.length;f++)e.diffs[f]=d.diffs[f].slice();e.start1=d.start1;e.start2=d.start2;e.length1=d.length1;e.length2=d.length2;b[c]=e}return b};
diff_match_patch.prototype.patch_apply=function(a,b){if(0==a.length)return[b,[]];a=this.patch_deepCopy(a);var c=this.patch_addPadding(a);b=c+b+c;this.patch_splitMax(a);for(var d=0,e=[],f=0;f<a.length;f++){var g=a[f].start2+d,h=this.diff_text1(a[f].diffs),j,i=-1;if(h.length>this.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);
if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;i<a[f].diffs.length;i++){var q=a[f].diffs[i];0!==q[0]&&(k=this.diff_xIndex(g,h));1===q[0]?b=b.substring(0,
j+k)+q[1]+b.substring(j+k):-1===q[0]&&(b=b.substring(0,j+k)+b.substring(j+this.diff_xIndex(g,h+q[1].length)));-1!==q[0]&&(h+=q[1].length)}}}b=b.substring(c.length,b.length-c.length);return[b,e]};
diff_match_patch.prototype.patch_addPadding=function(a){for(var b=this.Patch_Margin,c="",d=1;d<=b;d++)c+=String.fromCharCode(d);for(d=0;d<a.length;d++)a[d].start1+=b,a[d].start2+=b;var d=a[0],e=d.diffs;if(0==e.length||0!=e[0][0])e.unshift([0,c]),d.start1-=b,d.start2-=b,d.length1+=b,d.length2+=b;else if(b>e[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,
c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};
diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c<a.length;c++)if(!(a[c].length1<=b)){var d=a[c];a.splice(c--,1);for(var e=d.start1,f=d.start2,g="";0!==d.diffs.length;){var h=new diff_match_patch.patch_obj,j=!0;h.start1=e-g.length;h.start2=f-g.length;""!==g&&(h.length1=h.length2=g.length,h.diffs.push([0,g]));for(;0!==d.diffs.length&&h.length1<b-this.Patch_Margin;){var g=d.diffs[0][0],i=d.diffs[0][1];1===g?(h.length2+=i.length,f+=i.length,h.diffs.push(d.diffs.shift()),
j=!1):-1===g&&1==h.diffs.length&&0==h.diffs[0][0]&&i.length>2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&&
(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b.join("")};
diff_match_patch.prototype.patch_fromText=function(a){var b=[];if(!a)return b;a=a.split("\n");for(var c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<a.length;){var e=a[c].match(d);if(!e)throw Error("Invalid patch string: "+a[c]);var f=new diff_match_patch.patch_obj;b.push(f);f.start1=parseInt(e[1],10);""===e[2]?(f.start1--,f.length1=1):"0"==e[2]?f.length1=0:(f.start1--,f.length1=parseInt(e[2],10));f.start2=parseInt(e[3],10);""===e[4]?(f.start2--,f.length2=1):"0"==e[4]?f.length2=0:(f.start2--,f.length2=
parseInt(e[4],10));for(c++;c<a.length;){e=a[c].charAt(0);try{var g=decodeURI(a[c].substring(1))}catch(h){throw Error("Illegal escape in patch_fromText: "+g);}if("-"==e)f.diffs.push([-1,g]);else if("+"==e)f.diffs.push([1,g]);else if(" "==e)f.diffs.push([0,g]);else if("@"==e)break;else if(""!==e)throw Error('Invalid patch mode "'+e+'" in: '+g);c++}}return b};diff_match_patch.patch_obj=function(){this.diffs=[];this.start2=this.start1=null;this.length2=this.length1=0};
diff_match_patch.patch_obj.prototype.toString=function(){var a,b;a=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;b=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;a=["@@ -"+a+" +"+b+" @@\n"];var c;for(b=0;b<this.diffs.length;b++){switch(this.diffs[b][0]){case 1:c="+";break;case -1:c="-";break;case 0:c=" "}a[b+1]=c+encodeURI(this.diffs[b][1])+"\n"}return a.join("").replace(/%20/g," ")};
this.diff_match_patch=diff_match_patch;this.DIFF_DELETE=-1;this.DIFF_INSERT=1;this.DIFF_EQUAL=0;})();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save