国际化, #21, #26,

This commit is contained in:
life committed 2014-12-09 23:17:36 +08:00
1 parent e2e90f8618
commit 17718732cc
524 files changed
+3556 -306

No files matched your search

+62 -6
View File
@@ -22,9 +22,8 @@ type Note struct {
// 笔记首页, 判断是否已登录 // 笔记首页, 判断是否已登录
// 已登录, 得到用户基本信息(notebook, shareNotebook), 跳转到index.html中 // 已登录, 得到用户基本信息(notebook, shareNotebook), 跳转到index.html中
// 否则, 转向登录页面 // 否则, 转向登录页面
func (c Note) Index() revel.Result { func (c Note) Index(noteId string) revel.Result {
c.SetLocale() c.SetLocale()
userInfo := c.GetUserInfo() userInfo := c.GetUserInfo()
userId := userInfo.UserId.Hex() userId := userInfo.UserId.Hex()
@@ -43,22 +42,78 @@ func (c Note) Index() revel.Result {
// 还需要按时间排序(DESC)得到notes // 还需要按时间排序(DESC)得到notes
notes := []info.Note{} notes := []info.Note{}
noteContent := info.NoteContent{} noteContent := info.NoteContent{}
if len(notebooks) > 0 { if len(notebooks) > 0 {
// _, notes = noteService.ListNotes(c.GetUserId(), "", false, c.GetPage(), pageSize, defaultSortField, false, false); // noteId是否存在
// 变成最新 // 是否传入了正确的noteId
hasRightNoteId := false
if IsObjectId(noteId) {
note := noteService.GetNoteById(noteId)
var noteOwner = note.UserId.Hex()
noteContent = noteService.GetNoteContent(noteId, noteOwner)
if note.NoteId != "" {
hasRightNoteId = true
c.RenderArgs["curNoteId"] = noteId
c.RenderArgs["curNotebookId"] = note.NotebookId.Hex()
// 打开的是共享的笔记, 那么判断是否是共享给我的默认笔记
if noteOwner != c.GetUserId() {
if shareService.HasReadPerm(noteOwner, c.GetUserId(), noteId) {
// 不要获取notebook下的笔记
// 在前端下发请求
c.RenderArgs["curSharedNoteNotebookId"] = note.NotebookId.Hex()
c.RenderArgs["curSharedUserId"] = noteOwner;
// 没有读写权限
} else {
hasRightNoteId = false
}
} else {
_, notes = noteService.ListNotes(c.GetUserId(), note.NotebookId.Hex(), false, c.GetPage(), 50, defaultSortField, false, false);
// 如果指定了某笔记, 则该笔记放在首位
lenNotes := len(notes)
if lenNotes > 1 {
notes2 := make([]info.Note, len(notes))
notes2[0] = note
i := 1
for _, note := range notes {
if note.NoteId.Hex() != noteId {
if i == lenNotes { // 防止越界
break;
}
notes2[i] = note
i++
}
}
notes = notes2
}
}
}
// 得到最近的笔记
_, latestNotes := noteService.ListNotes(c.GetUserId(), "", false, c.GetPage(), 50, defaultSortField, false, false);
c.RenderArgs["latestNotes"] = latestNotes
}
// 没有传入笔记
// 那么得到最新笔记
if !hasRightNoteId {
_, notes = noteService.ListNotes(c.GetUserId(), "", false, c.GetPage(), 50, defaultSortField, false, false); _, notes = noteService.ListNotes(c.GetUserId(), "", false, c.GetPage(), 50, defaultSortField, false, false);
if len(notes) > 0 { if len(notes) > 0 {
noteContent = noteService.GetNoteContent(notes[0].NoteId.Hex(), userId) noteContent = noteService.GetNoteContent(notes[0].NoteId.Hex(), userId)
c.RenderArgs["curNoteId"] = notes[0].NoteId.Hex()
} }
} }
}
// 当然, 还需要得到第一个notes的content // 当然, 还需要得到第一个notes的content
//... //...
Log(configService.GetAdminUsername())
c.RenderArgs["isAdmin"] = configService.GetAdminUsername() == userInfo.Username c.RenderArgs["isAdmin"] = configService.GetAdminUsername() == userInfo.Username
c.RenderArgs["userInfo"] = userInfo c.RenderArgs["userInfo"] = userInfo
c.RenderArgs["notebooks"] = notebooks c.RenderArgs["notebooks"] = notebooks
c.RenderArgs["shareNotebooks"] = shareNotebooks c.RenderArgs["shareNotebooks"] = shareNotebooks // note信息在notes列表中
c.RenderArgs["sharedUserInfos"] = sharedUserInfos c.RenderArgs["sharedUserInfos"] = sharedUserInfos
c.RenderArgs["notes"] = notes c.RenderArgs["notes"] = notes
@@ -69,6 +124,7 @@ func (c Note) Index() revel.Result {
c.RenderArgs["globalConfigs"] = configService.GetGlobalConfigForUser() c.RenderArgs["globalConfigs"] = configService.GetGlobalConfigForUser()
if isDev, _ := revel.Config.Bool("mode.dev"); isDev { if isDev, _ := revel.Config.Bool("mode.dev"); isDev {
return c.RenderTemplate("note/note-dev.html") return c.RenderTemplate("note/note-dev.html")
} else { } else {
@@ -35,7 +35,7 @@ func (c MemberGroup) UpdateGroupTitle(groupId, title string) revel.Result {
func (c MemberGroup) DeleteGroup(groupId string) revel.Result { func (c MemberGroup) DeleteGroup(groupId string) revel.Result {
re := info.NewRe() re := info.NewRe()
re.Ok, re.Msg = groupService.DeleteGroup(c.GetUserId(), groupId) re.Ok, re.Msg = groupService.DeleteGroup(c.GetUserId(), groupId)
return c.RenderJson(re) return c.RenderRe(re)
} }
// 添加用户 // 添加用户
+4 -1
View File
@@ -27,9 +27,12 @@ func (this *GroupService) AddGroup(userId, title string) (bool, info.Group) {
// 删除分组 // 删除分组
// 判断是否有好友 // 判断是否有好友
func (this *GroupService) DeleteGroup(userId, groupId string) (ok bool, msg string) { func (this *GroupService) DeleteGroup(userId, groupId string) (ok bool, msg string) {
/*
if db.Has(db.GroupUsers, bson.M{"GroupId": bson.ObjectIdHex(groupId)}) { if db.Has(db.GroupUsers, bson.M{"GroupId": bson.ObjectIdHex(groupId)}) {
return false, "hasUsers" return false, "groupHasUsers"
} }
*/
db.DeleteAll(db.GroupUsers, bson.M{"GroupId": bson.ObjectIdHex(groupId)})
return db.DeleteByIdAndUserId(db.Groups, groupId, userId), "" return db.DeleteByIdAndUserId(db.Groups, groupId, userId), ""
// TODO 删除分组后, 在shareNote, shareNotebook中也要删除 // TODO 删除分组后, 在shareNote, shareNotebook中也要删除
+5 -5
View File
@@ -1,9 +1,9 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none"> <div class="m-b-md"> <h3 class="m-b-none">
{{if .page}} {{if .page}}
修改页面 {{msg . "updateSingle"}}
{{else}} {{else}}
添加页面 {{msg . "addSingle"}}
{{end}} {{end}}
</h3></div> </h3></div>
@@ -16,18 +16,18 @@
<div class="alert alert-danger" id="baseMsg" style="display: none"></div> <div class="alert alert-danger" id="baseMsg" style="display: none"></div>
<input type="hidden" id="singleId" value="{{.single.SingleId.Hex}}" /> <input type="hidden" id="singleId" value="{{.single.SingleId.Hex}}" />
<div class="form-group"> <div class="form-group">
<label>标题</label> <label>{{msg . "title"}}</label>
<input type="text" class="form-control" id="title" name="title" <input type="text" class="form-control" id="title" name="title"
value="{{.single.Title}}" value="{{.single.Title}}"
data-rules='[ data-rules='[
{rule: "required", msg: "请输入页面标题"}, {rule: "required", msg: "{{msg . "inputSingleTitle"}}"},
]' ]'
data-msg_target="#baseMsg" data-msg_target="#baseMsg"
/> />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="content1">内容</label> <label for="content1">{{msg . "content"}}</label>
<div id="popularToolbar"></div> <div id="popularToolbar"></div>
<textarea id="content1" name="content">{{.single.Content}}</textarea> <textarea id="content1" name="content">{{.single.Content}}</textarea>
</div> </div>
+6 -12
View File
@@ -1,26 +1,23 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">{{msg . "baseInfoSet"}}</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg $ "basicInfoSet"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-10"> <div class="col-sm-8">
<div id="formData"> <div id="formData">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<div class="alert alert-danger" id="baseMsg" style="display: none"></div> <div class="alert alert-danger" id="baseMsg" style="display: none"></div>
<div class="form-horizontal" role="form" id="userBlogForm"> <div role="form" id="userBlogForm">
<div class="form-group"> <div class="form-group">
<label for="title" class="col-sm-2 control-label">{{msg . "blogName"}}</label> <label for="title" >{{msg . "blogName"}}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="Title" name="Title" <input type="text" class="form-control" id="Title" name="Title"
placeholder="eg: leanote's blog" placeholder="eg: leanote's blog"
value="{{if .userBlog.Title}}{{.userBlog.Title}}{{else}}{{.userInfo.Email}} 's blog{{end}}"> value="{{if .userBlog.Title}}{{.userBlog.Title}}{{else}}{{.userInfo.Email}} 's blog{{end}}">
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label for="logo" class="col-sm-2 control-label">{{msg . "blogLogo"}}</label> <label for="logo">{{msg . "blogLogo"}}</label>
<div class="col-sm-10">
<input type="hidden" name="Logo" id="Logo" <input type="hidden" name="Logo" id="Logo"
value="{{.userBlog.Logo}}" /> value="{{.userBlog.Logo}}" />
<form id="formLogo" action="{{$.siteUrl}}/file/uploadBlogLogo" method="post" <form id="formLogo" action="{{$.siteUrl}}/file/uploadBlogLogo" method="post"
@@ -38,16 +35,13 @@
</form> </form>
<iframe id="logoTarget" name="logoTarget" src="#" style="display: none"></iframe> <iframe id="logoTarget" name="logoTarget" src="#" style="display: none"></iframe>
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label for="subTitle" class="col-sm-2 control-label">{{msg . "blogDesc"}}</label> <label for="subTitle">{{msg . "blogDesc"}}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="SubTitle" <input type="text" class="form-control" id="SubTitle"
name="SubTitle" value="{{.userBlog.SubTitle}}" name="SubTitle" value="{{.userBlog.SubTitle}}"
placeholder="eg: leanote, Not Just A Notebook"> placeholder="eg: leanote, Not Just A Notebook">
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label for="aboutMe" class="col-sm-2 control-label"></label> <label for="aboutMe" class="col-sm-2 control-label"></label>
+13 -5
View File
@@ -1,29 +1,37 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">(笔记本)分类</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "cate"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-sm-8">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
分类是公开为博客的笔记本 {{msg . "cateIsPublicNotebook"}}
<br /> <br />
拖动可排序 {{if .notebooks}}
{{msg . "dragAndSort"}}
<ul class="list-group gutter list-group-lg list-group-sp sortable"> <ul class="list-group gutter list-group-lg list-group-sp sortable">
{{range .notebooks}} {{range .notebooks}}
<li class="list-group-item" draggable="true" data-id="{{.NotebookId.Hex}}"> <li class="list-group-item" draggable="true" data-id="{{.NotebookId.Hex}}">
<span class="pull-left media-xs"><i class="fa fa-sort text-muted fa m-r-sm"></i></span> <span class="pull-left media-xs"><i class="fa fa-sort text-muted fa m-r-sm"></i></span>
<div class="pull-right" style="margin-right: 10px"> <div class="pull-right" style="margin-right: 10px">
固定链接: /cate/<input data-id="{{.NotebookId.Hex}}" class="url-title" type="text" value="{{if .UrlTitle}}{{.UrlTitle|decodeUrlValue}}{{else}}{{.NotebookId.Hex}}{{end}}"/> {{msg $ "permanentLink"}}: /cate/<input data-id="{{.NotebookId.Hex}}" class="url-title" type="text" value="{{if .UrlTitle}}{{.UrlTitle|decodeUrlValue}}{{else}}{{.NotebookId.Hex}}{{end}}"/>
</div> </div>
{{.Title}} {{.Title}}
</li> </li>
{{end}} {{end}}
</ul> </ul>
{{else}}
{{msg . "noCates"}}
{{end}}
</div> </div>
{{if .notebooks}}
<footer class="panel-footer text-right bg-light lter"> <footer class="panel-footer text-right bg-light lter">
<button type="submit" id="baseBtn" class="btn btn-success">{{msg . "submit"}}</button> <button type="submit" id="baseBtn" class="btn btn-success">{{msg . "saveSort"}}</button>
</footer> </footer>
{{end}}
</section> </section>
</div> </div>
</div> </div>
+1 -1
View File
@@ -22,7 +22,7 @@
<input type="radio" <input type="radio"
name="commentType" name="commentType"
value="default" value="default"
{{if or (not .userBlog.CommentType) (eq .userBlog.CommentType "default")}}checked="checked"{{end}} > Default {{if or (not .userBlog.CommentType) (eq .userBlog.CommentType "default")}}checked="checked"{{end}} > {{msg $ "defaultComment"}}
</label> </label>
<label> <label>
+9 -9
View File
@@ -1,5 +1,5 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"><h3 class="m-b-none">文章列表</h3></div> <div class="m-b-md"><h3 class="m-b-none">{{msg . "postList"}}</h3></div>
<style> <style>
.url-title { .url-title {
width: 260px; width: 260px;
@@ -13,7 +13,7 @@
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<div class="input-group search-group"> <div class="input-group search-group">
<input type="text" class="input-sm form-control" placeholder="Title" id="keywords" value="{{.keywords}}" /> <input type="text" class="input-sm form-control" placeholder="{{msg . "title"}}" id="keywords" value="{{.keywords}}" />
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-sm btn-default" type="button" data-url="/member/blog/index">Search</button> <button class="btn btn-sm btn-default" type="button" data-url="/member/blog/index">Search</button>
</span> </span>
@@ -40,7 +40,7 @@
style="width: 300px" style="width: 300px"
{{sorterTh $url "urlTitle" .sorter}} {{sorterTh $url "urlTitle" .sorter}}
> >
固定链接 {{msg $ "permanentLink"}}
<span class="th-sort"> <span class="th-sort">
<i class="fa fa-sort-down"></i> <i class="fa fa-sort-down"></i>
<i class="fa fa-sort-up"></i> <i class="fa fa-sort-up"></i>
@@ -50,7 +50,7 @@
<th <th
{{sorterTh $url "publicTime" .sorter}} {{sorterTh $url "publicTime" .sorter}}
> >
发布日期 {{msg . "publicTime"}}
<span class="th-sort"> <span class="th-sort">
<i class="fa fa-sort-down"></i> <i class="fa fa-sort-down"></i>
<i class="fa fa-sort-up"></i> <i class="fa fa-sort-up"></i>
@@ -61,7 +61,7 @@
<th <th
{{sorterTh $url "updatedTime" .sorter}} {{sorterTh $url "updatedTime" .sorter}}
> >
更新日期 {{msg . "updatedTime"}}
<span class="th-sort"> <span class="th-sort">
<i class="fa fa-sort-down"></i> <i class="fa fa-sort-down"></i>
<i class="fa fa-sort-up"></i> <i class="fa fa-sort-up"></i>
@@ -71,7 +71,7 @@
<th <th
{{sorterTh $url "createdTime" .sorter}} {{sorterTh $url "createdTime" .sorter}}
> >
创建日期 {{msg . "createdTime"}}
<span class="th-sort"> <span class="th-sort">
<i class="fa fa-sort-down"></i> <i class="fa fa-sort-down"></i>
<i class="fa fa-sort-up"></i> <i class="fa fa-sort-up"></i>
@@ -114,13 +114,13 @@
<a <a
{{if .HasSelfDefined}} {{if .HasSelfDefined}}
title="已设置" title="{{msg $ "hasSelfDefined"}}"
class="btn btn-sm btn-success" class="btn btn-sm btn-success"
{{else}} {{else}}
title="未设置" title="{{msg $ "noSelfDefined"}}"
class="btn btn-sm btn-default" class="btn btn-sm btn-default"
{{end}} {{end}}
href="/member/blog/updateBlogAbstract?noteId={{.NoteId.Hex}}">摘要设置</a> href="/member/blog/updateBlogAbstract?noteId={{.NoteId.Hex}}">{{msg $ "setAbstract"}}</a>
</td> </td>
</tr> </tr>
{{end}} {{end}}
+12 -20
View File
@@ -1,5 +1,5 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">分页与排序设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg $ "pagingAndSort"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-sm-8">
@@ -8,43 +8,35 @@
<div class="panel-body"> <div class="panel-body">
<div class="alert alert-danger" id="domainMsg" style="display: none"></div> <div class="alert alert-danger" id="domainMsg" style="display: none"></div>
<form class="form-horizontal" role="form" id="dataFrom"> <form role="form" id="dataFrom">
<div class="form-group"> <div class="form-group">
<label for="perPageSize" class="col-sm-2 control-label">每页记录数</label> <label for="perPageSize">{{msg . "perPageSize"}}</label>
<div class="col-sm-10">
<input type="text" class="form-control" <input type="text" class="form-control"
placeholder="10" placeholder="10"
id="perPageSize" id="perPageSize"
name="perPageSize" name="perPageSize"
value="{{.userBlog.PerPageSize}}" /> value="{{.userBlog.PerPageSize}}" />
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label for="perPageSize" class="col-sm-2 control-label">排序字段</label> <label for="perPageSize" >{{msg . "sortField"}}</label>
<div class="col-sm-10">
<select class="form-control" <select class="form-control"
id="sortField" id="sortField"
name="sortField" name="sortField"
value=""> value="">
<option value="PublicTime" {{if eq $.userBlog.SortField "PublicTime"}}selected{{end}}>公开为博客时间</option> <option value="PublicTime" {{if eq $.userBlog.SortField "PublicTime"}}selected{{end}}>{{msg $ "publicTime"}}</option>
<option value="CreatedTime" {{if eq $.userBlog.SortField "CreatedTimeTime"}}selected{{end}}>创建时间</option> <option value="CreatedTime" {{if eq $.userBlog.SortField "CreatedTimeTime"}}selected{{end}}>{{msg $ "createdTime"}}</option>
<option value="UpdatedTime" {{if eq $.userBlog.SortField "UpdatedTime"}}selected{{end}}>更新时间</option> <option value="UpdatedTime" {{if eq $.userBlog.SortField "UpdatedTime"}}selected{{end}}>{{msg $ "updatedTime"}}</option>
<option value="Title" {{if eq $.userBlog.SortField "Title"}}selected{{end}}>标题</option> <option value="Title" {{if eq $.userBlog.SortField "Title"}}selected{{end}}>{{msg . "title"}}</option>
</select> </select>
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">排序类型</label> <label>{{msg $ "sortType"}}</label>
<div class="col-sm-10" style="margin-top: 5px;"> <div>
<label><input type="radio" name="isAsc" value="0" {{if not .userBlog.IsAsc}}checked{{end}}> 降序</label> <label><input type="radio" name="isAsc" value="0" {{if not .userBlog.IsAsc}}checked{{end}}> {{msg . "desc"}}</label>
<label><input type="radio" name="isAsc" value="1" {{if .userBlog.IsAsc}}checked{{end}}> 升序</label> <label><input type="radio" name="isAsc" value="1" {{if .userBlog.IsAsc}}checked{{end}}> {{msg . "asc"}}</label>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<footer class="panel-footer text-right bg-light lter"> <footer class="panel-footer text-right bg-light lter">
<button type="submit" id="baseBtn" class="btn btn-success">{{msg . "submit"}}</button> <button type="submit" id="baseBtn" class="btn btn-success">{{msg . "submit"}}</button>
+5 -5
View File
@@ -1,13 +1,13 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">单页面</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "single"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-8"> <div class="col-sm-8">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<p> <p>
您可以添加多个单页面 {{msg $ "singleTips"}}
<a href="/member/blog/addOrUpdateSingle" id="addBtn" class="btn btn-success">添加页面</a> <a href="/member/blog/addOrUpdateSingle" id="addBtn" class="btn btn-success">{{msg $ "addSingle"}}</a>
</p> </p>
<ul class="list-group gutter list-group-lg list-group-sp sortable"> <ul class="list-group gutter list-group-lg list-group-sp sortable">
{{range .singles}} {{range .singles}}
@@ -18,7 +18,7 @@
<a href="#"><i class="fa fa-times icon-muted fa-fw page-delete" data-id="{{.SingleId}}"></i></a> <a href="#"><i class="fa fa-times icon-muted fa-fw page-delete" data-id="{{.SingleId}}"></i></a>
</span> </span>
<div class="pull-right" style="margin-right: 10px"> <div class="pull-right" style="margin-right: 10px">
固定链接: /single/<input data-id="{{.SingleId}}" class="url-title" type="text" value="{{if .UrlTitle}}{{.UrlTitle|decodeUrlValue}}{{else}}{{.SingleId}}{{end}}"/> {{msg $ "permanentLink"}}: /single/<input data-id="{{.SingleId}}" class="url-title" type="text" value="{{if .UrlTitle}}{{.UrlTitle|decodeUrlValue}}{{else}}{{.SingleId}}{{end}}"/>
</div> </div>
<div class="clear"> <div class="clear">
{{.Title}} {{.Title}}
@@ -29,7 +29,7 @@
</div> </div>
{{if .singles}} {{if .singles}}
<footer class="panel-footer text-right bg-light lter"> <footer class="panel-footer text-right bg-light lter">
<button type="submit" id="baseBtn" class="btn btn-success">保存排序</button> <button type="submit" id="baseBtn" class="btn btn-success">{{msg . "saveSort"}}</button>
</footer> </footer>
{{end}} {{end}}
</section> </section>
+19 -16
View File
@@ -2,7 +2,10 @@
<div class="m-b-md clearfix"> <div class="m-b-md clearfix">
<h3 class="m-b-none"> <h3 class="m-b-none">
{{msg . "themeSet"}} {{msg . "themeSet"}}
<small>(<a href="http://blog.leanote.com/post/545f1a5c380782565e000000" target="_blank">{{msg . "needHelp"}}</a>)</small> <small>
(<a href="http://blog.leanote.com/post/545f1a5c380782565e000000" target="_blank">{{msg . "needHelp"}}</a>
<a target="_blank" href="https://github.com/leanote/leanote/wiki/leanote-blog-theme-api">Leanote Blog Theme Api</a>)
</small>
</h3> </h3>
</div> </div>
<div class="row"> <div class="row">
@@ -12,9 +15,9 @@
<div> <div>
<form id="uploadAvatar" method="post" action="/member/blog/importTheme" enctype="multipart/form-data"> <form id="uploadAvatar" method="post" action="/member/blog/importTheme" enctype="multipart/form-data">
<div id="dropAvatar" class="dropzone"> <div id="dropAvatar" class="dropzone">
<a class="btn btn-default btn-new" href="/member/blog/newTheme"><span class="fa fa-plus"></span> 新建主题</a> <a class="btn btn-default btn-new" href="/member/blog/newTheme"><span class="fa fa-plus"></span> {{msg . "addTheme"}}</a>
<a class="btn btn-success btn-choose-file"> <a class="btn btn-success btn-choose-file">
<span class="fa fa-upload"></span> 导入主题(.zip) <span class="fa fa-upload"></span> {{msg . "importTheme"}}(.zip)
</a> </a>
<input type="file" name="file" multiple/> <input type="file" name="file" multiple/>
<div id="avatarUploadMsg"></div> <div id="avatarUploadMsg"></div>
@@ -22,7 +25,7 @@
</form> </form>
</div> </div>
<p> <p>
当前主题: {{msg . "currentTheme"}}:
</p> </p>
<ul class="themes"> <ul class="themes">
<li class="theme"> <li class="theme">
@@ -37,9 +40,9 @@
</span> </span>
<div class="theme-btns"> <div class="theme-btns">
<div class="btn-group" data-id="{{.activeTheme.ThemeId.Hex}}"> <div class="btn-group" data-id="{{.activeTheme.ThemeId.Hex}}">
<a class="btn btn-default btn-sm btn-export"><span class="fa fa-download"></span> 导出</a> <a class="btn btn-default btn-sm btn-export"><span class="fa fa-download"></span> {{msg $ "export"}}</a>
<a class="btn btn-default btn-sm" href="{{$.siteUrl}}/preview?themeId={{.activeTheme.ThemeId.Hex}}" target="_blank"><span class="fa fa-eye"></span> 预览</a> <a class="btn btn-default btn-sm" href="{{$.siteUrl}}/preview?themeId={{.activeTheme.ThemeId.Hex}}" target="_blank"><span class="fa fa-eye"></span> {{msg $ "preview"}}</a>
<a class="btn btn-primary btn-sm" target="_blank" href="/member/blog/updateTheme?themeId={{if .activeTheme.ThemeId}}{{.activeTheme.ThemeId.Hex}}{{end}}"><span class="fa fa-pencil"></span> 编辑</a> <a class="btn btn-primary btn-sm" target="_blank" href="/member/blog/updateTheme?themeId={{if .activeTheme.ThemeId}}{{.activeTheme.ThemeId.Hex}}{{end}}"><span class="fa fa-pencil"></span> {{msg $ "edit"}}</a>
</div> </div>
</div> </div>
</li> </li>
@@ -47,7 +50,7 @@
<hr /> <hr />
<p> <p>
我的其它主题: {{msg . "myOtherThemes"}}:
</p> </p>
<ul class="themes"> <ul class="themes">
{{range $.otherThemes}} {{range $.otherThemes}}
@@ -64,11 +67,11 @@
</span> </span>
<div class="theme-btns"> <div class="theme-btns">
<div class="btn-group" data-id="{{.ThemeId.Hex}}"> <div class="btn-group" data-id="{{.ThemeId.Hex}}">
<a class="btn btn-default btn-sm btn-delete" data-loading-text="..."><span class="fa fa-remove"></span> 删除</a> <a class="btn btn-default btn-sm btn-delete" data-loading-text="..."><span class="fa fa-remove"></span> {{msg $ "delete"}}</a>
<a class="btn btn-default btn-sm btn-export"><span class="fa fa-download"></span> 导出</a> <a class="btn btn-default btn-sm btn-export"><span class="fa fa-download"></span> {{msg $ "export"}}</a>
<a class="btn btn-default btn-sm" href="{{$.siteUrl}}/preview?themeId={{.ThemeId.Hex}}" target="_blank"><span class="fa fa-eye"></span> 预览</a> <a class="btn btn-default btn-sm" href="{{$.siteUrl}}/preview?themeId={{.ThemeId.Hex}}" target="_blank"><span class="fa fa-eye"></span> {{msg $ "preview"}}</a>
<a class="btn btn-default btn-sm" target="_blank" href="/member/blog/updateTheme?themeId={{.ThemeId.Hex}}"><span class="fa fa-pencil"></span> 编辑</a> <a class="btn btn-default btn-sm" target="_blank" href="/member/blog/updateTheme?themeId={{.ThemeId.Hex}}"><span class="fa fa-pencil"></span> {{msg $ "edit"}}</a>
<a class="btn btn-primary btn-sm btn-active" data-loading-text="..."><span class="fa fa-check"></span> 使用</a> <a class="btn btn-primary btn-sm btn-active" data-loading-text="..."><span class="fa fa-check"></span> {{msg $ "use"}}</a>
{{if $.isAdmin}} {{if $.isAdmin}}
<a class="btn btn-default btn-sm btn-public" data-loading-text="..."> <a class="btn btn-default btn-sm btn-public" data-loading-text="...">
{{if .IsDefault}} {{if .IsDefault}}
@@ -83,13 +86,13 @@
</li> </li>
{{end}} {{end}}
{{else}} {{else}}
无 {{msg $ "none"}}
{{end}} {{end}}
</ul> </ul>
<hr /> <hr />
<p> <p>
leanote主题市场: {{msg . "leanoteThemeMarket"}}:
</p> </p>
<ul class="themes"> <ul class="themes">
{{range $.optionThemes}} {{range $.optionThemes}}
@@ -104,7 +107,7 @@
By: <a href="{{.AuthorUrl}}" target="_blank">{{.Author}}</a> By: <a href="{{.AuthorUrl}}" target="_blank">{{.Author}}</a>
</span> </span>
<p class="theme-btns" data-id="{{.ThemeId.Hex}}"> <p class="theme-btns" data-id="{{.ThemeId.Hex}}">
<a class="btn btn-primary btn-sm btn-install"><span class="fa fa-gear"></span> 安装</a> <a class="btn btn-primary btn-sm btn-install"><span class="fa fa-gear"></span> {{msg $ "install"}}</a>
</p> </p>
</li> </li>
{{end}} {{end}}
+18 -13
View File
@@ -2,13 +2,18 @@
<div class="m-b-md"> <div class="m-b-md">
<h3 class="m-b-none"> <h3 class="m-b-none">
{{if .isNew}} {{if .isNew}}
新建主题 {{msg $ "addTheme"}}
{{else}} {{else}}
编辑主题 {{msg $ "updateTheme"}}
- -
{{.theme.Name}} {{.theme.Name}}
{{end}} {{end}}
<a class="btn btn-default" href="{{$.siteUrl}}/preview?themeId={{.themeId}}" target="_blank"><span class="fa fa-eye"></span> 预览</a> <a class="btn btn-default" href="{{$.siteUrl}}/preview?themeId={{.themeId}}" target="_blank"><span class="fa fa-eye"></span> {{msg . "preview"}}</a>
<small>
(<a href="http://blog.leanote.com/post/545f1a5c380782565e000000" target="_blank">{{msg . "needHelp"}}</a>
<a target="_blank" href="https://github.com/leanote/leanote/wiki/leanote-blog-theme-api">Leanote Blog Theme Api</a>)
</small>
</h3> </h3>
</div> </div>
@@ -42,7 +47,7 @@
<div class="col-sm-4"> <div class="col-sm-4">
<section class="panel panel-default"> <section class="panel panel-default">
<header class="panel-heading"> <header class="panel-heading">
模板, 样式, 脚本: {{msg . "tplStyleScript"}}:
</header> </header>
<div class="panel-body" style="height:430px;overflow: auto;"> <div class="panel-body" style="height:430px;overflow: auto;">
@@ -58,14 +63,14 @@
</div> </div>
</div> </div>
<footer class="panel-footer text-right bg-light lter"> <footer class="panel-footer text-right bg-light lter">
<a class="btn btn-default" id="newFile">新建文件</a> <a class="btn btn-default" id="newFile">{{msg . "newFile"}}</a>
</footer> </footer>
</section> </section>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">
<section class="panel panel-default"> <section class="panel panel-default">
<header class="panel-heading"> <header class="panel-heading">
当前文件: <span id="curTpl">header.html</span> {{msg . "currentFile"}}: <span id="curTpl">header.html</span>
<span id="msg"></span> <span id="msg"></span>
</header> </header>
<div class="panel-body"> <div class="panel-body">
@@ -82,7 +87,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<section class="panel panel-default"> <section class="panel panel-default">
<header class="panel-heading"> <header class="panel-heading">
图片: images/ {{msg . "image"}}: images/
</header> </header>
<div class="panel-body"> <div class="panel-body">
<ul class="image-list" id="imageList"> <ul class="image-list" id="imageList">
@@ -118,7 +123,7 @@ var theme = {
saveBtnO: $("#saveBtn"), saveBtnO: $("#saveBtn"),
newFileO: $("#newFile"), newFileO: $("#newFile"),
curTpl: "", curTpl: "",
tplInfos: {"header.html": "头部", "footer.html": "底部", "index.html": "首页", "cate.html": "分类页", "search.html": "搜索页", "single.html": "单页", "archive.html": "归档页", "post.html": "文章页", "tags.html": "标签页", "tag_posts.html": "标签文章页", "share_comment.html": "分享评论", "404.html":"404", "theme.json": "主题配置", "paging.html": "分页", "highlight.html": "高亮"}, tplInfos: {"header.html": "{{msg . "header"}}", "footer.html": "{{msg . "footer"}}", "index.html": "{{msg . "header"}}", "cate.html": "{{msg . "cate"}}", "search.html": "{{msg . "search"}}", "single.html": "{{msg . "single"}}", "archive.html": "{{msg . "archive"}}", "post.html": "{{msg . "post"}}", "tags.html": "{{msg . "tags"}}", "tag_posts.html": "{{msg . "tag_posts"}}", "share_comment.html": "{{msg . "share_comment"}}", "404.html":"404", "theme.json": "{{msg . "themeJson"}}", "paging.html": "{{msg . "paging"}}", "highlight.html": "{{msg . "highlight"}}"},
init: function() { init: function() {
var self = this; var self = this;
self.showTplInfo(); self.showTplInfo();
@@ -183,11 +188,11 @@ var theme = {
info = self.tplInfos[file]; info = self.tplInfos[file];
if(!info) { if(!info) {
if(file.indexOf(".css") > 0) { if(file.indexOf(".css") > 0) {
info = "样式"; info = "{{msg . "style"}}";
} else if(file.indexOf(".js") > 0) { } else if(file.indexOf(".js") > 0) {
info = "脚本"; info = "{{msg . "script"}}";
} else if(file.indexOf(".html") > 0) { } else if(file.indexOf(".html") > 0) {
info = "模板"; info = "{{msg . "tpl"}}";
} }
} else { } else {
$(this).find(".remove-file").remove(); $(this).find(".remove-file").remove();
@@ -209,7 +214,7 @@ var theme = {
if(t) { if(t) {
t.button("loading"); t.button("loading");
} }
self.msgO.html("正在保存..."); self.msgO.html("...");
ajaxPost("/member/blog/updateTplContent", {themeId: themeId, filename: self.curTpl, content: content}, function(re) { ajaxPost("/member/blog/updateTplContent", {themeId: themeId, filename: self.curTpl, content: content}, function(re) {
if(t) { if(t) {
t.button("reset"); t.button("reset");
@@ -217,7 +222,7 @@ var theme = {
if(reIsOk(re)) { if(reIsOk(re)) {
self.cache[filename] = content; self.cache[filename] = content;
// art.tips("Success"); // art.tips("Success");
self.msgO.html("保存成功") self.msgO.html("{{msg . "saveSuccess"}}")
setTimeout(function() { setTimeout(function() {
self.msgO.html(""); self.msgO.html("");
}, 3000); }, 3000);
+11 -9
View File
@@ -8,17 +8,19 @@
width: 200px; width: 200px;
} }
</style> </style>
<div class="m-b-md"> <h3 class="m-b-none">项目组/成员</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "group"}}</h3></div>
<p> <p>
<a class="btn btn-default btn-add-group"><span class="fa fa-plus"></span> 新建分组</a> <a class="btn btn-default btn-add-group"><span class="fa fa-plus"></span> {{msg . "newGroup"}}</a>
</p> </p>
<script type="text/x-jsrender" id="tUser"> <script type="text/x-jsrender" id="tUser">
<li class="list-group-item" data-id="[[:UserId]]"> <li class="list-group-item" data-id="[[:UserId]]">
[[:Username]] [[if Email != Username]]([[:Email]])[[/if]] [[:Username]] [[if Email != Username]]([[:Email]])[[/if]]
<a title="{{msg . "deleteMember"}}" class="delete-user">
<span class="fa fa-remove pull-right text-xs m-t-sm"></span> <span class="fa fa-remove pull-right text-xs m-t-sm"></span>
</a>
</li> </li>
</script> </script>
@@ -30,7 +32,7 @@
<div class="clear"> <div class="clear">
<div class="h3 m-t-xs m-b-xs text-white"> <div class="h3 m-t-xs m-b-xs text-white">
<input type="text" data-ever="[[:Title]]" value="[[:Title]]" class="group-title" /> <input type="text" data-ever="[[:Title]]" value="[[:Title]]" class="group-title" />
<a title="删除分组" class="delete-group"> <a title="{{msg . "deleteGroup"}}" class="delete-group">
<i class="fa fa-remove text-white pull-right text-xs m-t-sm"></i> <i class="fa fa-remove text-white pull-right text-xs m-t-sm"></i>
</a> </a>
</div> </div>
@@ -39,7 +41,7 @@
</header> </header>
<ul class="list-group no-radius"> <ul class="list-group no-radius">
<li class="list-group-item"> <li class="list-group-item">
<input type="text" class="add-user-input form-control" placeholder="输入用户名或邮箱添加成员" /> <input type="text" class="add-user-input form-control" placeholder="{{msg . "addMemberTips"}}" />
</li> </li>
</ul> </ul>
</section> </section>
@@ -57,7 +59,7 @@
<div class="clear"> <div class="clear">
<div class="h3 m-t-xs m-b-xs text-white"> <div class="h3 m-t-xs m-b-xs text-white">
<input type="text" data-ever="{{.Title}}" value="{{.Title}}" class="group-title" /> <input type="text" data-ever="{{.Title}}" value="{{.Title}}" class="group-title" />
<a title="删除分组" class="delete-group"> <a title="{{msg $ "deleteGroup"}}" class="delete-group">
<i class="fa fa-remove text-white pull-right text-xs m-t-sm"></i> <i class="fa fa-remove text-white pull-right text-xs m-t-sm"></i>
</a> </a>
</div> </div>
@@ -69,13 +71,13 @@
{{range .Users}} {{range .Users}}
<li class="list-group-item" data-id="{{.UserId.Hex}}"> <li class="list-group-item" data-id="{{.UserId.Hex}}">
{{.Username}} {{if not (eq .Email .Username)}}({{.Email}}){{end}} {{.Username}} {{if not (eq .Email .Username)}}({{.Email}}){{end}}
<a title="删除成员" class="delete-user"> <a title="{{msg $ "deleteMember"}}" class="delete-user">
<span class="fa fa-remove pull-right text-xs m-t-sm"></span> <span class="fa fa-remove pull-right text-xs m-t-sm"></span>
</a> </a>
</li> </li>
{{end}} {{end}}
<li class="list-group-item"> <li class="list-group-item">
<input type="text" class="add-user-input form-control" placeholder="输入用户名或邮箱添加成员" /> <input type="text" class="add-user-input form-control" placeholder="{{msg $ "addMemberTips"}}" />
</li> </li>
</ul> </ul>
</section> </section>
@@ -85,7 +87,7 @@
</div> </div>
{{template "member/footer.html" .}} {{template "member/footer.html" .}}
<script src="http://leanote.com/public/blog/js/jsrender.js"></script> <script src="/public/blog/js/jsrender.js"></script>
<script> <script>
var group = { var group = {
tGroupO: $("#tGroup"), tGroupO: $("#tGroup"),
@@ -111,7 +113,7 @@ var group = {
addGroupEvent: function() { addGroupEvent: function() {
var self = this; var self = this;
$('.btn-add-group').click(function() { $('.btn-add-group').click(function() {
ajaxPost("/member/group/addGroup", {title: "分组名"}, function(re) { ajaxPost("/member/group/addGroup", {title: "Group Title"}, function(re) {
if(reIsOk(re)) { if(reIsOk(re)) {
var group = re.Item; var group = re.Item;
self.groupsO.prepend(self.tGroupO.render(group)) self.groupsO.prepend(self.tGroupO.render(group))
+2 -3
View File
@@ -1,5 +1,5 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">{{.userInfo.Username}}, 欢迎来到leanote</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{.userInfo.Username}}, {{msg . "welcomeToLeanote"}}.</h3></div>
<section class="panel panel-default"> <section class="panel panel-default">
<div class="row m-l-none m-r-none bg-light lter"> <div class="row m-l-none m-r-none bg-light lter">
@@ -26,11 +26,10 @@
</div> </div>
</div> </div>
</section> </section>
<!-- 最新动态 --> <!-- 最新动态 -->
<section class="panel panel-default"> <section class="panel panel-default">
<h4 class="font-thin padder"> <h4 class="font-thin padder">
Leanote 动态 {{msg . "leanoteEvents"}}
</h4> </h4>
<ul class="list-group" id="eventsList"></ul> <ul class="list-group" id="eventsList"></ul>
</section> </section>
+25 -22
View File
@@ -26,45 +26,47 @@
</i> </i>
</span> </span>
<span> <span>
帐户信息 {{msg . "accountInfo"}}
</span> </span>
</a> </a>
<!-- 导航列表 --> <!-- 导航列表 -->
<ul class="nav lt"> <ul class="nav lt">
<li>
<a href="/member/user/avatar">
<span>
{{msg . "avatar"}}
</span>
</a>
</li>
{{if $.userInfo.Email}} {{if $.userInfo.Email}}
<li> <li>
<a href="/member/user/username"> <a href="/member/user/username">
<span> <span>
用户名 {{msg . "username"}}
</span>
</a>
</li>
<li>
<a href="/member/user/avatar">
<span>
头像
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/user/email"> <a href="/member/user/email">
<span> <span>
邮箱 {{msg . "email"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/user/password"> <a href="/member/user/password">
<span> <span>
密码 {{msg . "password"}}
</span> </span>
</a> </a>
</li> </li>
{{else}} {{else}}
<li> <li>
<a href="/member/user/add_account"> <a href="/member/user/addAccount">
<span> <span>
添加leanote帐户 {{msg . "addLeanoteAccount"}}
</span> </span>
</a> </a>
</li> </li>
@@ -85,14 +87,14 @@
</i> </i>
</span> </span>
<span> <span>
博客 {{msg . "blog"}}
</span> </span>
</a> </a>
<ul class="nav lt"> <ul class="nav lt">
<li> <li>
<a href="/member/blog/index"> <a href="/member/blog/index">
<span> <span>
文章列表 {{msg . "postList"}}
</span> </span>
</a> </a>
</li> </li>
@@ -100,42 +102,43 @@
<li> <li>
<a href="/member/blog/base"> <a href="/member/blog/base">
<span> <span>
基本信息 {{msg . "basicInfoSet"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/blog/comment"> <a href="/member/blog/comment">
<span> <span>
评论 {{msg . "comment"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/blog/cate"> <a href="/member/blog/cate">
<span> <span>
分类 {{msg . "cate"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/blog/single"> <a href="/member/blog/single">
<span> <span>
单页面 {{msg . "single"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/blog/paging"> <a href="/member/blog/paging">
<span> <span>
分页与排序设置 {{msg . "pagingAndSort"}}
</span> </span>
</a> </a>
</li> </li>
<li> <li>
<a href="/member/blog/theme"> <a href="/member/blog/theme">
<span> <span>
主题 {{msg . "theme"}}
</span> </span>
</a> </a>
</li> </li>
@@ -149,7 +152,7 @@
</b> </b>
</i> </i>
<span> <span>
项目组/成员 {{msg . "group"}}
</span> </span>
</a> </a>
</li> </li>
+1 -1
View File
@@ -38,7 +38,7 @@
</a> </a>
</li> </li>
<li class="hidden-xs"> <li class="hidden-xs">
<a href="/blog/{{$.session.Username}}" class="dk" target="_blank"> <a href="http://blog.leanote.com/{{$.session.Username}}" class="dk" target="_blank">
{{msg . "myBlog"}} {{msg . "myBlog"}}
</a> </a>
</li> </li>
+2 -2
View File
@@ -1,9 +1,9 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">用户名设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "addLeanoteAccount"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-8">
<form id="formData"> <form id="formData">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
+3 -3
View File
@@ -1,10 +1,10 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">头像设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "avatar"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-8">
<form id="uploadAvatar" method="post" action="/file/uploadAvatar" enctype="multipart/form-data"> <form id="uploadAvatar" method="post" action="/file/uploadAvatar" enctype="multipart/form-data">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
@@ -14,7 +14,7 @@
<img src="{{if .userInfo.Logo}}{{.userInfo.Logo}}{{else}}/images/blog/default_avatar.png{{end}}" id="avatar"/> <img src="{{if .userInfo.Logo}}{{.userInfo.Logo}}{{else}}/images/blog/default_avatar.png{{end}}" id="avatar"/>
</div> </div>
<a class="btn btn-success btn-choose-file"> <a class="btn btn-success btn-choose-file">
<span class="fa fa-upload"></span> Choose Image <span class="fa fa-upload"></span> {{msg . "chooseImage"}}
</a> </a>
<input type="file" name="file" multiple/> <input type="file" name="file" multiple/>
</div> </div>
+2 -2
View File
@@ -1,9 +1,9 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">邮箱设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "email"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-8">
<form id="formData"> <form id="formData">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
+2 -4
View File
@@ -1,9 +1,7 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">用户名设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "password"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-8">
<div class="col-sm-6">
<form id="formData"> <form id="formData">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
+2 -2
View File
@@ -1,9 +1,9 @@
{{template "member/top.html" .}} {{template "member/top.html" .}}
<div class="m-b-md"> <h3 class="m-b-none">用户名设置</h3></div> <div class="m-b-md"> <h3 class="m-b-none">{{msg . "username"}}</h3></div>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-8">
<form id="formData"> <form id="formData">
<section class="panel panel-default"> <section class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
+43 -40
View File
@@ -12,17 +12,17 @@
<link href="/css/bootstrap.css" rel="stylesheet" /> <link href="/css/bootstrap.css" rel="stylesheet" />
<!-- 先加载, 没有样式, 宽度不定 --> <!-- 先加载, 没有样式, 宽度不定 -->
<link rel="stylesheet" href="tinymce/skins/custom/skin.min.css" rel="stylesheet"/> <link rel="stylesheet" href="/tinymce/skins/custom/skin.min.css" rel="stylesheet"/>
<!-- leanote css --> <!-- leanote css -->
<link href="css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet" /> <link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet" />
<link href="css/zTreeStyle/zTreeStyle.css" rel="stylesheet" /> <link href="/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<script> <script>
var hash = location.hash; var hash = location.hash;
if(hash == "#writing") { if(hash.indexOf("writing") >= 0) {
var files = '<link rel="stylesheet" href="css/theme/writting-overwrite.css" type="text/css" id="themeLink" />'; var files = '<link rel="stylesheet" href="/css/theme/writting-overwrite.css" type="text/css" id="themeLink" />';
} else { } else {
var files ='<link rel="stylesheet" href="css/theme/{{if .userInfo.Theme}}{{.userInfo.Theme}}{{else}}default{{end}}.css" type="text/css" id="themeLink" />'; var files ='<link rel="stylesheet" href="/css/theme/{{if .userInfo.Theme}}{{.userInfo.Theme}}{{else}}default{{end}}.css" type="text/css" id="themeLink" />';
} }
document.write(files); document.write(files);
</script> </script>
@@ -184,6 +184,14 @@ function log(o) {
</div> </div>
</div> </div>
<!--
<div class="pull-right top-nav writting-hide lea-blog">
<a target="_blank" href="http://lea.leanote.com">
lea++
</a>
</div>
-->
<div class="pull-right top-nav writting-hide" id="myBlog"> <div class="pull-right top-nav writting-hide" id="myBlog">
<a target="_blank" href="{{$.blogUrl}}/{{.userInfo.Username}}"> <a target="_blank" href="{{$.blogUrl}}/{{.userInfo.Username}}">
{{msg . "myBlog"}} {{msg . "myBlog"}}
@@ -327,6 +335,11 @@ function log(o) {
<div class="noteSplit" id="notebookSplitter"></div> <div class="noteSplit" id="notebookSplitter"></div>
<div id="noteAndEditor"> <div id="noteAndEditor">
<div id="noteAndEditorMask">
<img src="/images/loading-24.gif"/>
<br />
loading...
</div>
<div id="noteList"> <div id="noteList">
<div class="clearfix" id="notesAndSort" style="position: relative"> <div class="clearfix" id="notesAndSort" style="position: relative">
<div class="pull-left"> <div class="pull-left">
@@ -411,11 +424,11 @@ function log(o) {
<span id="noteReadTags"></span> <span id="noteReadTags"></span>
<!-- 修改时间 --> <!-- 修改时间 -->
<i class="fa fa-calendar"></i>{{msg . "update"}} <i class="fa fa-clock-o"></i>{{msg . "update"}}
<span id="noteReadUpdatedTime"></span> <span id="noteReadUpdatedTime"></span>
<!-- 修改时间 --> <!-- 修改时间 -->
<i class="fa fa-calendar"></i>{{msg . "create"}} <i class="fa fa-clock-o"></i>{{msg . "create"}}
<span id="noteReadCreatedTime"></span> <span id="noteReadCreatedTime"></span>
</div> </div>
</div> </div>
@@ -737,17 +750,22 @@ function log(o) {
</div> </div>
</div> </div>
</div> </div>
<script src="js/jquery-1.9.0.min.js"></script> <script src="/js/jquery-1.9.0.min.js"></script>
<script src="js/jquery.ztree.all-3.5.js"></script> <script src="/js/jquery.ztree.all-3.5.js"></script>
<script src="js/i18n/msg.{{.locale}}.js"></script> <script src="/js/i18n/msg.{{.locale}}.js"></script>
<script src="js/common.js"></script> <script src="/js/common.js"></script>
<script> <script>
var UrlPrefix = "{{.siteUrl}}"; // 为了发weibo var UrlPrefix = '{{.siteUrl}}'; // 为了发weibo
var UserInfo = {{.userInfo|jsonJs}}; var UserInfo = {{.userInfo|jsonJs}};
var notebooks = {{.notebooks|jsonJs}}; var notebooks = {{.notebooks|jsonJs}};
var shareNotebooks = {{.shareNotebooks|jsonJs}}; var shareNotebooks = {{.shareNotebooks|jsonJs}};
var sharedUserInfos = {{.sharedUserInfos|jsonJs}}; var sharedUserInfos = {{.sharedUserInfos|jsonJs}};
var notes = {{.notes|jsonJs}} var curNoteId = '{{.curNoteId}}';
var curNotebookId = '{{.curNotebookId}}';
var curSharedNoteNotebookId = '{{.curSharedNoteNotebookId}}';
var curSharedUserId = '{{.curSharedUserId}}';
var notes = {{.notes|jsonJs}};
var latestNotes = {{if .latestNotes}}{{.latestNotes|jsonJs}}{{else}}[]{{end}};
var noteContentJson = {{.noteContentJson|jsonJs}}; var noteContentJson = {{.noteContentJson|jsonJs}};
var tagsJson = {{.tags|jsonJs}}; var tagsJson = {{.tags|jsonJs}};
LEA.locale = "{{.locale}}"; LEA.locale = "{{.locale}}";
@@ -755,35 +773,20 @@ var GlobalConfigs = {{.globalConfigs|jsonJs}}; // 2014/11/9 beta2
</script> </script>
<!-- 渲染view --> <!-- 渲染view -->
<script src="tinymce/tinymce.js"></script> <script src="/tinymce/tinymce.js"></script>
<script src="js/app/page.js"></script> <script src="/js/app/page.js"></script>
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script> <script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
<script src="/js/contextmenu/jquery.contextmenu.js"></script> <script src="/js/contextmenu/jquery.contextmenu.js"></script>
<script src="js/jquery-cookie.js"></script> <script src="/js/jquery-cookie.js"></script>
<script src="js/bootstrap-min.js"></script> <script src="/js/bootstrap-min.js"></script>
<script src="js/app/note.js"></script> <script src="/js/app/note.js"></script>
<script src="js/app/tag.js"></script> <script src="/js/app/tag.js"></script>
<script src="js/app/notebook.js"></script> <script src="/js/app/notebook.js"></script>
<script src="js/app/share.js"></script> <script src="/js/app/share.js"></script>
<script src="js/object_id-min.js"></script> <script src="/js/object_id-min.js"></script>
<script src="js/ZeroClipboard/ZeroClipboard-min.js"></script> <script src="/js/ZeroClipboard/ZeroClipboard-min.js"></script>
<script> <script>
Notebook.renderNotebooks(notebooks); initPage();
Share.renderShareNotebooks(sharedUserInfos, shareNotebooks);
Note.setNoteCache(noteContentJson);
Note.renderNotes(notes);
if(!isEmpty(notes)) {
Note.changeNote(notes[0].NoteId);
}
// Note.chanteNote设置content
// Note.renderNoteContent(noteContentJson)
Tag.renderTagNav(tagsJson);
// init notebook后才调用
initSlimScroll();
</script> </script>
<!-- context-menu --> <!-- context-menu -->
+43 -40
View File
@@ -12,17 +12,17 @@
<link href="/css/bootstrap.css" rel="stylesheet" /> <link href="/css/bootstrap.css" rel="stylesheet" />
<!-- 先加载, 没有样式, 宽度不定 --> <!-- 先加载, 没有样式, 宽度不定 -->
<link rel="stylesheet" href="tinymce/skins/custom/skin.min.css" rel="stylesheet"/> <link rel="stylesheet" href="/tinymce/skins/custom/skin.min.css" rel="stylesheet"/>
<!-- leanote css --> <!-- leanote css -->
<link href="css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet" /> <link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet" />
<link href="css/zTreeStyle/zTreeStyle.css" rel="stylesheet" /> <link href="/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<script> <script>
var hash = location.hash; var hash = location.hash;
if(hash == "#writing") { if(hash.indexOf("writing") >= 0) {
var files = '<link rel="stylesheet" href="css/theme/writting-overwrite.css" type="text/css" id="themeLink" />'; var files = '<link rel="stylesheet" href="/css/theme/writting-overwrite.css" type="text/css" id="themeLink" />';
} else { } else {
var files ='<link rel="stylesheet" href="css/theme/{{if .userInfo.Theme}}{{.userInfo.Theme}}{{else}}default{{end}}.css" type="text/css" id="themeLink" />'; var files ='<link rel="stylesheet" href="/css/theme/{{if .userInfo.Theme}}{{.userInfo.Theme}}{{else}}default{{end}}.css" type="text/css" id="themeLink" />';
} }
document.write(files); document.write(files);
</script> </script>
@@ -184,6 +184,14 @@ function log(o) {
</div> </div>
</div> </div>
<!--
<div class="pull-right top-nav writting-hide lea-blog">
<a target="_blank" href="http://lea.leanote.com">
lea++
</a>
</div>
-->
<div class="pull-right top-nav writting-hide" id="myBlog"> <div class="pull-right top-nav writting-hide" id="myBlog">
<a target="_blank" href="{{$.blogUrl}}/{{.userInfo.Username}}"> <a target="_blank" href="{{$.blogUrl}}/{{.userInfo.Username}}">
{{msg . "myBlog"}} {{msg . "myBlog"}}
@@ -327,6 +335,11 @@ function log(o) {
<div class="noteSplit" id="notebookSplitter"></div> <div class="noteSplit" id="notebookSplitter"></div>
<div id="noteAndEditor"> <div id="noteAndEditor">
<div id="noteAndEditorMask">
<img src="/images/loading-24.gif"/>
<br />
loading...
</div>
<div id="noteList"> <div id="noteList">
<div class="clearfix" id="notesAndSort" style="position: relative"> <div class="clearfix" id="notesAndSort" style="position: relative">
<div class="pull-left"> <div class="pull-left">
@@ -411,11 +424,11 @@ function log(o) {
<span id="noteReadTags"></span> <span id="noteReadTags"></span>
<!-- 修改时间 --> <!-- 修改时间 -->
<i class="fa fa-calendar"></i>{{msg . "update"}} <i class="fa fa-clock-o"></i>{{msg . "update"}}
<span id="noteReadUpdatedTime"></span> <span id="noteReadUpdatedTime"></span>
<!-- 修改时间 --> <!-- 修改时间 -->
<i class="fa fa-calendar"></i>{{msg . "create"}} <i class="fa fa-clock-o"></i>{{msg . "create"}}
<span id="noteReadCreatedTime"></span> <span id="noteReadCreatedTime"></span>
</div> </div>
</div> </div>
@@ -737,17 +750,22 @@ function log(o) {
</div> </div>
</div> </div>
</div> </div>
<script src="js/jquery-1.9.0.min.js"></script> <script src="/js/jquery-1.9.0.min.js"></script>
<script src="js/jquery.ztree.all-3.5.js"></script> <script src="/js/jquery.ztree.all-3.5.js"></script>
<script src="js/i18n/msg.{{.locale}}.js"></script> <script src="/js/i18n/msg.{{.locale}}.js"></script>
<script src="js/common-min.js"></script> <script src="/js/common-min.js"></script>
<script> <script>
var UrlPrefix = "{{.siteUrl}}"; // 为了发weibo var UrlPrefix = '{{.siteUrl}}'; // 为了发weibo
var UserInfo = {{.userInfo|jsonJs}}; var UserInfo = {{.userInfo|jsonJs}};
var notebooks = {{.notebooks|jsonJs}}; var notebooks = {{.notebooks|jsonJs}};
var shareNotebooks = {{.shareNotebooks|jsonJs}}; var shareNotebooks = {{.shareNotebooks|jsonJs}};
var sharedUserInfos = {{.sharedUserInfos|jsonJs}}; var sharedUserInfos = {{.sharedUserInfos|jsonJs}};
var notes = {{.notes|jsonJs}} var curNoteId = '{{.curNoteId}}';
var curNotebookId = '{{.curNotebookId}}';
var curSharedNoteNotebookId = '{{.curSharedNoteNotebookId}}';
var curSharedUserId = '{{.curSharedUserId}}';
var notes = {{.notes|jsonJs}};
var latestNotes = {{if .latestNotes}}{{.latestNotes|jsonJs}}{{else}}[]{{end}};
var noteContentJson = {{.noteContentJson|jsonJs}}; var noteContentJson = {{.noteContentJson|jsonJs}};
var tagsJson = {{.tags|jsonJs}}; var tagsJson = {{.tags|jsonJs}};
LEA.locale = "{{.locale}}"; LEA.locale = "{{.locale}}";
@@ -755,35 +773,20 @@ var GlobalConfigs = {{.globalConfigs|jsonJs}}; // 2014/11/9 beta2
</script> </script>
<!-- 渲染view --> <!-- 渲染view -->
<script src="tinymce/tinymce.js"></script> <script src="/tinymce/tinymce.js"></script>
<script src="js/app/page-min.js"></script> <script src="/js/app/page-min.js"></script>
<script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script> <script src="/js/jQuery-slimScroll-1.3.0/jquery.slimscroll.js"></script>
<script src="/js/contextmenu/jquery.contextmenu-min.js"></script> <script src="/js/contextmenu/jquery.contextmenu-min.js"></script>
<script src="js/jquery-cookie.js"></script> <script src="/js/jquery-cookie.js"></script>
<script src="js/bootstrap-min.js"></script> <script src="/js/bootstrap-min.js"></script>
<script src="js/app/note-min.js"></script> <script src="/js/app/note-min.js"></script>
<script src="js/app/tag-min.js"></script> <script src="/js/app/tag-min.js"></script>
<script src="js/app/notebook-min.js"></script> <script src="/js/app/notebook-min.js"></script>
<script src="js/app/share-min.js"></script> <script src="/js/app/share-min.js"></script>
<script src="js/object_id-min.js"></script> <script src="/js/object_id-min.js"></script>
<script src="js/ZeroClipboard/ZeroClipboard-min.js"></script> <script src="/js/ZeroClipboard/ZeroClipboard-min.js"></script>
<script> <script>
Notebook.renderNotebooks(notebooks); initPage();
Share.renderShareNotebooks(sharedUserInfos, shareNotebooks);
Note.setNoteCache(noteContentJson);
Note.renderNotes(notes);
if(!isEmpty(notes)) {
Note.changeNote(notes[0].NoteId);
}
// Note.chanteNote设置content
// Note.renderNoteContent(noteContentJson)
Tag.renderTagNav(tagsJson);
// init notebook后才调用
initSlimScroll();
</script> </script>
<!-- context-menu --> <!-- context-menu -->
+92 -3
View File
@@ -129,9 +129,12 @@ themeSetting=Theme
setAvatar=Avatar setAvatar=Avatar
logout=Logout logout=Logout
basicInfo=Basic basicInfo=Basic
basicInfoSet=Blog Basic Setting
updateEmail=Update email updateEmail=Update email
usernameSetting=Update username usernameSetting=Update username
username=Username username=Username
avatar=Avatar
chooseImage=Choose Image
oldPassword=Old password oldPassword=Old password
newPassword=New password newPassword=New password
admin=Admin admin=Admin
@@ -144,7 +147,7 @@ uploadImage=Upload image
# blog # blog
aboutMe=About me aboutMe=About me
blogSet=Set blog blogSet=Blog Settings
# index # index
discussion=Discussion discussion=Discussion
@@ -243,8 +246,94 @@ latest=Latest
# 用户中心 # 用户中心
memberCenter=Member Center memberCenter=Member Center
userNotExists=该成员沿未注册 userNotExists=The user is not exists
hasUsers=已存在该成员 hasUsers=The user already exists
# yu
service=Service
imageSizeOver=Sorry, you have no image opacity, please <a href="/service">upgrade your account</a>.
attachSizeOver=Sorry, you have no attachment opacity, please <a href="/service">upgrade your account</a>.
#memeber
welcomeToLeanote=Welcome
accountInfo=Account Info
accountType=Account Type
premiumAccountType=Premium
normalAccountType=Normal
imageSize=Image Opacity
attachSize=Attachment Opacity
upgrade=Upgrade My Account
leanoteEvents=Leanote News
addLeanoteAccount=New Leanote Account
defaultComment=Default leanote comment system
upgradeAccountTips=I want to using a custom domain for my blog, <a class="btn btn-default" href="/service">Upgrade My Account</a>
cateIsPublicNotebook=Category is the published notebooks
dragAndSort=Drag it to sort
permanentLink=Permanent Link
cate=Category
noCates=No Category
single=Single Page
singleTips=You can add many single pages
addSingle=New single page
updateSingle=Update single page
inputSingleTitle=Single page title is required
saveSort=Save sequencing
pagingAndSort=Paging And Sort Settings
perPageSize=Per page size
sortField=Sorter field
sortType=Sorter type
publicTime=Published time
createdTime=Created time
updatedTime=Updated time
desc=Desc
asc=Asc
postList=Post List
hasSelfDefined=Has defined
noSelfDefined=Not defined
setAbstract=Abstract settings
title=Title
content=Content
addTheme=New theme
importTheme=Import theme
exportTheme=Export theme
export=Export
preview=Preview
edit=Edit
use=Use
install=Install
currentTheme=Current theme
myOtherThemes=My other themes
leanoteThemeMarket=Leanote theme market
updateTheme=Update Theme
tplStyleScript=template, style, script
newFile=New file
image=Image
currentFile=Current file
tpl=Template
style=Style
script=Script
header=Header
footer=Footer
index=Home
cate=Category
search=Search
single=Single Page
archive=Archive
post=Post
tags=Tags
tag_posts=Tag's posts
share_comment=Comments
themeJson=Theme settings
paging=Paging
highlight=Code highlight
group=Group
newGroup=New group
deleteGroup=Delete group
addMemberTips=Input username or email to add member
deleteMember=Delete member
# error # error
notFound=This page cann't found. notFound=This page cann't found.
+89
View File
@@ -150,9 +150,12 @@ themeSetting=主题设置
setAvatar=头像设置 setAvatar=头像设置
logout=退出 logout=退出
basicInfo=基本信息 basicInfo=基本信息
basicInfoSet=博客基本设置
updateEmail=修改Email updateEmail=修改Email
usernameSetting=用户名设置 usernameSetting=用户名设置
username=用户名 username=用户名
avatar=头像
chooseImage=选择图片
oldPassword=旧密码 oldPassword=旧密码
newPassword=新密码 newPassword=新密码
admin=后台管理 admin=后台管理
@@ -272,5 +275,91 @@ memberCenter=用户中心
userNotExists=该成员沿未注册 userNotExists=该成员沿未注册
hasUsers=已存在该成员 hasUsers=已存在该成员
# yu
service=服务
imageSizeOver=对不起, 您的图片容量不足, 请<a href="/service">升级您的帐户</a>
attachSizeOver=对不起, 您的附件容量不足, 请<a href="/service">升级您的帐户</a>
#memeber
welcomeToLeanote=欢迎来到leanote
accountInfo=帐户信息
accountType=帐户类型
premiumAccountType=彩色套餐
normalAccountType=共享套餐
imageSize=图片空间
attachSize=附件空间
upgrade=升级套餐
leanoteEvents=Leanote动态
addLeanoteAccount=新建Leanote帐户
defaultComment=默认leanote评论系统
upgradeAccountTips=Leanote支持绑定自己的域名到博客上, 请 <a class="btn btn-default" href="/service">升级您的帐户</a>
cateIsPublicNotebook=分类是公开为博客的笔记本
dragAndSort=拖动可排序
permanentLink=固定链接
cate=分类
noCates=无分类
single=单页面
singleTips=您可以添加多个单页面
addSingle=添加单页面
updateSingle=修改单页面
inputSingleTitle=请输入单页面标题
saveSort=保存排序
pagingAndSort=分页与排序设置
perPageSize=每页记录数
sortField=排序字段
sortType=排序类型
publicTime=发表时间
createdTime=创建时间
updatedTime=更新时间
desc=降序
asc=升序
postList=文章列表
hasSelfDefined=已设置
noSelfDefined=未设置
setAbstract=摘要设置
title=标题
content=内容
addTheme=添加主题
importTheme=导入主题
exportTheme=导出主题
export=导出
preview=预览
edit=编辑
use=使用
install=安装
currentTheme=当前主题
myOtherThemes=我的其它主题
leanoteThemeMarket=Leanote主题市场
updateTheme=编辑主题
tplStyleScript=模板, 样式, 脚本
newFile=新建文件
image=图片
currentFile=当前文件
tpl=模板
style=样式
script=脚本
header=头部
footer=底部
index=首页
cate=分类页
search=搜索页
single=单页
archive=归档页
post=文章页
tags=标签页
tag_posts=标签文章页
share_comment=分享评论
themeJson=主题配置
paging=分页
highlight=高亮
group=用户组
newGroup=新建组
deleteGroup=删除组
addMemberTips=输入用户名或邮箱添加成员
deleteMember=删除成员
# 必须要加这个, 奇怪 # 必须要加这个, 奇怪
[CN] [CN]
+15
View File
@@ -0,0 +1,15 @@
html {
border: none;
}
body {
background-color: #fbfcf7;
}
* {
font-size: 16px;
}
pre {
font-size: 14px;
}
img {
max-width: 100% !important;
}
+27
View File
@@ -0,0 +1,27 @@
html {
margin-top: 3px;
padding: 3px;
border: 1px solid #ebeff2;
border-radius: 5px;
-webkit-border-radius: 5px;
border-width: 1px;
box-shadow: none;
}
* {
font-family: 'Open Sans', 'Helvetica Neue', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
}
.mce-item-table,
.mce-item-table td,
.mce-item-table th,
.mce-item-table caption {
border: 1px solid #9B9898;
border-collapse: collapse;
}
img {
max-width: 100% !important;
}
@media screen and (max-width: 500px) {
* {
font-size: 16px;
}
}
File diff suppressed because it is too large. Load diff
+27
View File
@@ -149,6 +149,20 @@
overflow-y: hidden; overflow-y: hidden;
*/ */
} }
// 笔记列表与editor的遮罩
#noteAndEditorMask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #fff;
text-align: center;
padding-top: 60px;
opacity: .3;
z-index: 20;
display: none;
}
//----------------- //-----------------
// 下拉菜单 // 下拉菜单
@@ -941,3 +955,16 @@ top: 4px;
.dropdown-menu .divider { .dropdown-menu .divider {
margin: 3px 0; margin: 3px 0;
} }
// ace 重置css, 必须
.ace_eidtor, .ace_editor * {
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
#editorContent {
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
outline: none;
margin-top: 5px;
}
+29 -5
View File
@@ -139,6 +139,19 @@
overflow-y: hidden; overflow-y: hidden;
*/ */
} }
#noteAndEditorMask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #fff;
text-align: center;
padding-top: 60px;
opacity: .3;
z-index: 20;
display: none;
}
.dropdown-submenu { .dropdown-submenu {
position: relative; position: relative;
} }
@@ -869,6 +882,17 @@
.dropdown-menu .divider { .dropdown-menu .divider {
margin: 3px 0; margin: 3px 0;
} }
.ace_eidtor,
.ace_editor * {
font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
#editorContent {
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
outline: none;
margin-top: 5px;
}
::selection { ::selection {
background: #000000; background: #000000;
color: #ffffff; color: #ffffff;
@@ -2012,8 +2036,8 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
overflow: auto !important;
} }
#attachMenu { #attachMenu {
width: 320px; width: 320px;
@@ -2053,7 +2077,7 @@ background-position:-1px -670px
opacity: 0.8; opacity: 0.8;
} }
} }
@media screen and (max-device-width: 1024px) and (orientation: landscape) { @media screen and (max-width: 1024px) {
#noteItemList, #noteItemList,
#notebook, #notebook,
#leftNotebook, #leftNotebook,
@@ -2067,12 +2091,12 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
} }
#tag { #tag {
position: absolute; position: absolute;
right: 140px; right: 310px;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
@@ -2121,7 +2145,7 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
} }
#lea, #lea,
+6 -5
View File
@@ -216,8 +216,8 @@ a:focus, a:hover, a:active {
#attachList, #attachList,
#tags #tags
{ {
overflow: scroll !important;
-webkit-overflow-scrolling: touch !important; // for iphone -webkit-overflow-scrolling: touch !important; // for iphone
overflow: auto !important;
} }
#attachMenu { #attachMenu {
@@ -265,7 +265,8 @@ a:focus, a:hover, a:active {
} }
// ipad // ipad
@media screen and (max-device-width: 1024px) and (orientation: landscape) { // @media screen and (max-device-width: 1024px) and (orientation: landscape) {
@media screen and (max-width: 1024px) {
#noteItemList, #notebook, #leftNotebook, #noteItemList, #notebook, #leftNotebook,
.slimScrollDiv, .slimScrollDiv,
#editorContent_ifr, #editorContent_ifr,
@@ -276,13 +277,13 @@ a:focus, a:hover, a:active {
#attachList, #attachList,
#tags #tags
{ {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; // for iphone -webkit-overflow-scrolling: touch !important; // for iphone
} }
#tag { #tag {
position: absolute; position: absolute;
right: 140px; right: 310px;
left:0; left:0;
top:0; top:0;
bottom:0; bottom:0;
@@ -332,7 +333,7 @@ a:focus, a:hover, a:active {
#attachList, #attachList,
#tags #tags
{ {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; // for iphone -webkit-overflow-scrolling: touch !important; // for iphone
} }
+29 -5
View File
@@ -139,6 +139,19 @@
overflow-y: hidden; overflow-y: hidden;
*/ */
} }
#noteAndEditorMask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #fff;
text-align: center;
padding-top: 60px;
opacity: .3;
z-index: 20;
display: none;
}
.dropdown-submenu { .dropdown-submenu {
position: relative; position: relative;
} }
@@ -869,6 +882,17 @@
.dropdown-menu .divider { .dropdown-menu .divider {
margin: 3px 0; margin: 3px 0;
} }
.ace_eidtor,
.ace_editor * {
font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
#editorContent {
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
outline: none;
margin-top: 5px;
}
::selection { ::selection {
background: #000000; background: #000000;
color: #ffffff; color: #ffffff;
@@ -1947,8 +1971,8 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
overflow: auto !important;
} }
#attachMenu { #attachMenu {
width: 320px; width: 320px;
@@ -1988,7 +2012,7 @@ background-position:-1px -670px
opacity: 0.8; opacity: 0.8;
} }
} }
@media screen and (max-device-width: 1024px) and (orientation: landscape) { @media screen and (max-width: 1024px) {
#noteItemList, #noteItemList,
#notebook, #notebook,
#leftNotebook, #leftNotebook,
@@ -2002,12 +2026,12 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
} }
#tag { #tag {
position: absolute; position: absolute;
right: 140px; right: 310px;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
@@ -2056,7 +2080,7 @@ background-position:-1px -670px
#noteReadContent, #noteReadContent,
#attachList, #attachList,
#tags { #tags {
overflow: scroll !important; overflow: auto !important;
-webkit-overflow-scrolling: touch !important; -webkit-overflow-scrolling: touch !important;
} }
#lea, #lea,
+24
View File
@@ -139,6 +139,19 @@
overflow-y: hidden; overflow-y: hidden;
*/ */
} }
#noteAndEditorMask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #fff;
text-align: center;
padding-top: 60px;
opacity: .3;
z-index: 20;
display: none;
}
.dropdown-submenu { .dropdown-submenu {
position: relative; position: relative;
} }
@@ -869,6 +882,17 @@
.dropdown-menu .divider { .dropdown-menu .divider {
margin: 3px 0; margin: 3px 0;
} }
.ace_eidtor,
.ace_editor * {
font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
#editorContent {
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
outline: none;
margin-top: 5px;
}
@font-face { @font-face {
font-family: 'Open Sans'; font-family: 'Open Sans';
font-style: normal; font-style: normal;
+24
View File
@@ -139,6 +139,19 @@
overflow-y: hidden; overflow-y: hidden;
*/ */
} }
#noteAndEditorMask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #fff;
text-align: center;
padding-top: 60px;
opacity: .3;
z-index: 20;
display: none;
}
.dropdown-submenu { .dropdown-submenu {
position: relative; position: relative;
} }
@@ -869,6 +882,17 @@
.dropdown-menu .divider { .dropdown-menu .divider {
margin: 3px 0; margin: 3px 0;
} }
.ace_eidtor,
.ace_editor * {
font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
#editorContent {
border: 1px solid #ccc;
border-radius: 5px;
padding: 5px;
outline: none;
margin-top: 5px;
}
@font-face { @font-face {
font-family: 'Open Sans'; font-family: 'Open Sans';
font-style: normal; font-style: normal;
+1 -1
View File
@@ -1,2 +1,2 @@
(function(factory){factory(jQuery)})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setTime(+t+days*864e5)}return document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("=");var name=decode(parts.shift());var cookie=parts.join("=");if(key&&key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false}$.cookie(key,"",$.extend({},options,{expires:-1}));return!$.cookie(key)}});if(typeof jQuery==="undefined"){throw new Error("Bootstrap requires jQuery")}+function($){"use strict";function transitionEnd(){var el=document.createElement("bootstrap");var transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}}$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this;$(this).one($.support.transition.end,function(){called=true});var callback=function(){if(!called)$($el).trigger($.support.transition.end)};setTimeout(callback,duration);return this};$(function(){$.support.transition=transitionEnd()})}(jQuery);+function($){"use strict";var dismiss='[data-dismiss="alert"]';var Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){var $this=$(this);var selector=$this.attr("data-target");if(!selector){selector=$this.attr("href");selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")}var $parent=$(selector);if(e)e.preventDefault();if(!$parent.length){$parent=$this.hasClass("alert")?$this:$this.parent()}$parent.trigger(e=$.Event("close.bs.alert"));if(e.isDefaultPrevented())return;$parent.removeClass("in");function removeElement(){$parent.trigger("closed.bs.alert").remove()}$.support.transition&&$parent.hasClass("fade")?$parent.one($.support.transition.end,removeElement).emulateTransitionEnd(150):removeElement()};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.alert");if(!data)$this.data("bs.alert",data=new Alert(this));if(typeof option=="string")data[option].call($this)})};$.fn.alert.Constructor=Alert;$.fn.alert.noConflict=function(){$.fn.alert=old;return this};$(document).on("click.bs.alert.data-api",dismiss,Alert.prototype.close)}(jQuery);+function($){"use strict";var Button=function(element,options){this.$element=$(element);this.options=$.extend({},Button.DEFAULTS,options)};Button.DEFAULTS={loadingText:"loading..."};Button.prototype.setState=function(state){var d="disabled";var $el=this.$element;var val=$el.is("input")?"val":"html";var data=$el.data();state=state+"Text";if(!data.resetText)$el.data("resetText",$el[val]());$el[val](data[state]||this.options[state]);setTimeout(function(){state=="loadingText"?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)};Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons"]');if($parent.length){var $input=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");if($input.prop("type")==="radio")$parent.find(".active").removeClass("active")}this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.button");var options=typeof option=="object"&&option;if(!data)$this.data("bs.button",data=new Button(this,options));if(option=="toggle")data.toggle();else if(option)data.setState(option)})};$.fn.button.Constructor=Button;$.fn.button.noConflict=function(){$.fn.button=old;return this};$(document).on("click.bs.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);if(!$btn.hasClass("btn"))$btn=$btn.closest(".btn");$btn.button("toLine truncated (function(factory){factory(jQuery)})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setTime(+t+days*864e5)}return document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("=");var name=decode(parts.shift());var cookie=parts.join("=");if(key&&key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false}$.cookie(key,"",$.extend({},options,{expires:-1}));return!$.cookie(key)}});if(typeof jQuery==="undefined"){throw new Error("Bootstrap requires jQuery")}+function($){"use strict";function transitionEnd(){var el=document.createElement("bootstrap");var transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}}$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this;$(this).one($.support.transition.end,function(){called=true});var callback=function(){if(!called)$($el).trigger($.support.transition.end)};setTimeout(callback,duration);return this};$(function(){$.support.transition=transitionEnd()})}(jQuery);+function($){"use strict";var dismiss='[data-dismiss="alert"]';var Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){var $this=$(this);var selector=$this.attr("data-target");if(!selector){selector=$this.attr("href");selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")}var $parent=$(selector);if(e)e.preventDefault();if(!$parent.length){$parent=$this.hasClass("alert")?$this:$this.parent()}$parent.trigger(e=$.Event("close.bs.alert"));if(e.isDefaultPrevented())return;$parent.removeClass("in");function removeElement(){$parent.trigger("closed.bs.alert").remove()}$.support.transition&&$parent.hasClass("fade")?$parent.one($.support.transition.end,removeElement).emulateTransitionEnd(150):removeElement()};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.alert");if(!data)$this.data("bs.alert",data=new Alert(this));if(typeof option=="string")data[option].call($this)})};$.fn.alert.Constructor=Alert;$.fn.alert.noConflict=function(){$.fn.alert=old;return this};$(document).on("click.bs.alert.data-api",dismiss,Alert.prototype.close)}(jQuery);+function($){"use strict";var Button=function(element,options){this.$element=$(element);this.options=$.extend({},Button.DEFAULTS,options)};Button.DEFAULTS={loadingText:"loading..."};Button.prototype.setState=function(state){var d="disabled";var $el=this.$element;var val=$el.is("input")?"val":"html";var data=$el.data();state=state+"Text";if(!data.resetText)$el.data("resetText",$el[val]());$el[val](data[state]||this.options[state]);setTimeout(function(){state=="loadingText"?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)};Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons"]');if($parent.length){var $input=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");if($input.prop("type")==="radio")$parent.find(".active").removeClass("active")}this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.button");var options=typeof option=="object"&&option;if(!data)$this.data("bs.button",data=new Button(this,options));if(option=="toggle")data.toggle();else if(option)data.setState(option)})};$.fn.button.Constructor=Button;$.fn.button.noConflict=function(){$.fn.button=old;return this};$(document).on("click.bs.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);if(!$btn.hasClass("btn"))$btn=$btn.closest(".btn");$btn.button("toLine truncated
})};$.fn.tab.Constructor=Tab;$.fn.tab.noConflict=function(){$.fn.tab=old;return this};$(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault();$(this).tab("show")})}(jQuery);+function($){"use strict";var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options);this.$window=$(window).on("scroll.bs.affix.data-api",$.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",$.proxy(this.checkPositionWithEventLoop,this));this.$element=$(element);this.affixed=this.unpin=null;this.checkPosition()};Affix.RESET="affix affix-top affix-bottom";Affix.DEFAULTS={offset:0};Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)};Affix.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var scrollHeight=$(document).height();var scrollTop=this.$window.scrollTop();var position=this.$element.offset();var offset=this.options.offset;var offsetTop=offset.top;var offsetBottom=offset.bottom;if(typeof offset!="object")offsetBottom=offsetTop=offset;if(typeof offsetTop=="function")offsetTop=offset.top();if(typeof offsetBottom=="function")offsetBottom=offset.bottom();var affix=this.unpin!=null&&scrollTop+this.unpin<=position.top?false:offsetBottom!=null&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":offsetTop!=null&&scrollTop<=offsetTop?"top":false;if(this.affixed===affix)return;if(this.unpin)this.$element.css("top","");this.affixed=affix;this.unpin=affix=="bottom"?position.top-scrollTop:null;this.$element.removeClass(Affix.RESET).addClass("affix"+(affix?"-"+affix:""));if(affix=="bottom"){this.$element.offset({top:document.body.offsetHeight-offsetBottom-this.$element.height()})}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.affix");var options=typeof option=="object"&&option;if(!data)$this.data("bs.affix",data=new Affix(this,options));if(typeof option=="string")data[option]()})};$.fn.affix.Constructor=Affix;$.fn.affix.noConflict=function(){$.fn.affix=old;return this};$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this);var data=$spy.data();data.offset=data.offset||{};if(data.offsetBottom)data.offset.bottom=data.offsetBottom;if(data.offsetTop)data.offset.top=data.offsetTop;$spy.affix(data)})})}(jQuery);var LEA={};var Notebook={cache:{}};var Note={cache:{}};var Tag={};var Notebook={};var Share={};var Mobile={};var Converter;var MarkdownEditor;var ScrollLink;function trimLeft(str,substr){if(!substr||substr==" "){return $.trim(str)}while(str.indexOf(substr)==0){str=str.substring(substr.length)}return str}function json(str){return eval("("+str+")")}function t(){var args=arguments;if(args.length<=1){return args[0]}var text=args[0];if(!text){return text}var pattern="LEAAEL";text=text.replace(/\?/g,pattern);for(var i=1;i<=args.length;++i){text=text.replace(pattern,args[i])}return text}var tt=t;function arrayEqual(a,b){a=a||[];b=b||[];return a.join(",")==b.join(",")}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function isEmpty(obj){if(!obj){return true}if(isArray(obj)){if(obj.length==0){return true}}return false}function getFormJsonData(formId){var data=formArrDataToJson($("#"+formId).serializeArray());return data}function formArrDataToJson(arrData){var datas={};var arrObj={};for(var i in arrData){var attr=arrData[i].name;var value=arrData[i].value;if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function formSerializeDataToJson(formSerializeData){var arr=formSerializeData.split("&");var datas={};var arrObj={};for(var i=0;i<arr.length;++i){var each=arr[i].split("=");var attr=decodeURI(each[0]);var value=decodeURI(each[1]);if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function _ajaxCallback(ret,successFunc,failureFunc){if(ret===true||ret=="true"||typeof ret=="object"){if(ret&&typeof ret=="object"){if(ret.Msg=="NOTLOGIN"){alert("你还没有登录, 请先登录!");return}}if(typeof successFunc=="function"){successFunc(ret)}}else{if(typeof failureFunc=="function"){failureFunc(ret)}else{alert("error!")}}}function _ajax(type,url,param,successFunc,failureFunc,async){log("-------------------ajax:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}return $.ajax({type:type,url:url,data:param,async:async,success:function(ret){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function ajaxGet(url,param,successFunc,failureFunc,async){return _ajax("GET",url,param,successFunc,failureFunc,async)}functioLine truncated })};$.fn.tab.Constructor=Tab;$.fn.tab.noConflict=function(){$.fn.tab=old;return this};$(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault();$(this).tab("show")})}(jQuery);+function($){"use strict";var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options);this.$window=$(window).on("scroll.bs.affix.data-api",$.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",$.proxy(this.checkPositionWithEventLoop,this));this.$element=$(element);this.affixed=this.unpin=null;this.checkPosition()};Affix.RESET="affix affix-top affix-bottom";Affix.DEFAULTS={offset:0};Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)};Affix.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var scrollHeight=$(document).height();var scrollTop=this.$window.scrollTop();var position=this.$element.offset();var offset=this.options.offset;var offsetTop=offset.top;var offsetBottom=offset.bottom;if(typeof offset!="object")offsetBottom=offsetTop=offset;if(typeof offsetTop=="function")offsetTop=offset.top();if(typeof offsetBottom=="function")offsetBottom=offset.bottom();var affix=this.unpin!=null&&scrollTop+this.unpin<=position.top?false:offsetBottom!=null&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":offsetTop!=null&&scrollTop<=offsetTop?"top":false;if(this.affixed===affix)return;if(this.unpin)this.$element.css("top","");this.affixed=affix;this.unpin=affix=="bottom"?position.top-scrollTop:null;this.$element.removeClass(Affix.RESET).addClass("affix"+(affix?"-"+affix:""));if(affix=="bottom"){this.$element.offset({top:document.body.offsetHeight-offsetBottom-this.$element.height()})}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.affix");var options=typeof option=="object"&&option;if(!data)$this.data("bs.affix",data=new Affix(this,options));if(typeof option=="string")data[option]()})};$.fn.affix.Constructor=Affix;$.fn.affix.noConflict=function(){$.fn.affix=old;return this};$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this);var data=$spy.data();data.offset=data.offset||{};if(data.offsetBottom)data.offset.bottom=data.offsetBottom;if(data.offsetTop)data.offset.top=data.offsetTop;$spy.affix(data)})})}(jQuery);var LEA={};var Notebook={cache:{}};var Note={cache:{}};var Tag={};var Notebook={};var Share={};var Mobile={};var Converter;var MarkdownEditor;var ScrollLink;function trimLeft(str,substr){if(!substr||substr==" "){return $.trim(str)}while(str.indexOf(substr)==0){str=str.substring(substr.length)}return str}function json(str){return eval("("+str+")")}function t(){var args=arguments;if(args.length<=1){return args[0]}var text=args[0];if(!text){return text}var pattern="LEAAEL";text=text.replace(/\?/g,pattern);for(var i=1;i<=args.length;++i){text=text.replace(pattern,args[i])}return text}var tt=t;function arrayEqual(a,b){a=a||[];b=b||[];return a.join(",")==b.join(",")}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function isEmpty(obj){if(!obj){return true}if(isArray(obj)){if(obj.length==0){return true}}return false}function getFormJsonData(formId){var data=formArrDataToJson($("#"+formId).serializeArray());return data}function formArrDataToJson(arrData){var datas={};var arrObj={};for(var i in arrData){var attr=arrData[i].name;var value=arrData[i].value;if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function formSerializeDataToJson(formSerializeData){var arr=formSerializeData.split("&");var datas={};var arrObj={};for(var i=0;i<arr.length;++i){var each=arr[i].split("=");var attr=decodeURI(each[0]);var value=decodeURI(each[1]);if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function _ajaxCallback(ret,successFunc,failureFunc){if(ret===true||ret=="true"||typeof ret=="object"){if(ret&&typeof ret=="object"){if(ret.Msg=="NOTLOGIN"){alert("你还没有登录, 请先登录!");return}}if(typeof successFunc=="function"){successFunc(ret)}}else{if(typeof failureFunc=="function"){failureFunc(ret)}else{alert("error!")}}}function _ajax(type,url,param,successFunc,failureFunc,async){log("-------------------ajax:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}return $.ajax({type:type,url:url,data:param,async:async,success:function(ret){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function ajaxGet(url,param,successFunc,failureFunc,async){return _ajax("GET",url,param,successFunc,failureFunc,async)}functioLine truncated
+1 -1
View File
@@ -1 +1 @@
Note.curNoteId="";Note.interval="";Note.itemIsBlog='<div class="item-blog"><i class="fa fa-bold" title="blog"></i></div><div class="item-setting"><i class="fa fa-cog" title="setting"></i></div>';Note.itemTplNoImg='<li href="#" class="item ?" noteId="?">';Note.itemTplNoImg+=Note.itemIsBlog+'<div class="item-desc"><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';Note.itemTpl='<li href="#" class="item ? item-image" noteId="?"><div class="item-thumb" style=""><img src="?"/></div>';Note.itemTpl+=Note.itemIsBlog+'<div class="item-desc" style=""><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';Note.newItemTpl='<li href="#" class="item item-active ?" fromUserId="?" noteId="?">';Note.newItemTpl+=Note.itemIsBlog+'<div class="item-desc" style="right: 0px;"><p class="item-title">?</p><p class="item-text"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span><br /><span class="desc">?</span></p></div></li>';Note.noteItemListO=$("#noteItemList");Note.cacheByNotebookId={all:{}};Note.notebookIds={};Note.isReadOnly=false;Note.intervalTime=6e5;Note.startInterval=function(){Note.interval=setInterval(function(){log("自动保存开始...");changedNote=Note.curChangedSaveIt(false)},Note.intervalTime)};Note.stopInterval=function(){clearInterval(Note.interval);setTimeout(function(){Note.startInterval()},Note.intervalTime)};Note.addNoteCache=function(note){Note.cache[note.NoteId]=note;Note.clearCacheByNotebookId(note.NotebookId)};Note.setNoteCache=function(content,clear){if(!Note.cache[content.NoteId]){Note.cache[content.NoteId]=content}else{$.extend(Note.cache[content.NoteId],content)}if(clear==undefined){clear=true}if(clear){Note.clearCacheByNotebookId(content.NotebookId)}};Note.getCurNote=function(){var self=this;if(self.curNoteId==""){return null}return self.cache[self.curNoteId]};Note.getNote=function(noteId){var self=this;return self.cache[noteId]};Note.clearCacheByNotebookId=function(notebookId){if(notebookId){Note.cacheByNotebookId[notebookId]={};Note.cacheByNotebookId["all"]={};Note.notebookIds[notebookId]=true}};Note.notebookHasNotes=function(notebookId){var notes=Note.getNotesByNotebookId(notebookId);return!isEmpty(notes)};Note.getNotesByNotebookId=function(notebookId,sortBy,isAsc){if(!sortBy){sortBy="UpdatedTime"}if(isAsc=="undefined"){isAsc=false}if(!notebookId){notebookId="all"}if(!Note.cacheByNotebookId[notebookId]){return[]}if(Note.cacheByNotebookId[notebookId][sortBy]){return Note.cacheByNotebookId[notebookId][sortBy]}else{}var notes=[];var sortBys=[];for(var i in Note.cache){if(!i){continue}var note=Note.cache[i];if(note.IsTrash||note.IsShared){continue}if(notebookId=="all"||note.NotebookId==notebookId){notes.push(note)}}notes.sort(function(a,b){var t1=a[sortBy];var t2=b[sortBy];if(isAsc){if(t1<t2){return-1}else if(t1>t2){return 1}}else{if(t1<t2){return 1}else if(t1>t2){return-1}}return 0});Note.cacheByNotebookId[notebookId][sortBy]=notes;return notes};Note.renderNotesAndFirstOneContent=function(ret){if(!isArray(ret)){return}Note.renderNotes(ret);if(!isEmpty(ret[0])){Note.changeNote(ret[0].NoteId)}else{}};Note.curHasChanged=function(force){if(force==undefined){force=true}var cacheNote=Note.cache[Note.curNoteId]||{};var title=$("#noteTitle").val();var tags=Tag.getTags();var contents=getEditorContent(cacheNote.IsMarkdown);var content,preview;var contentText;if(isArray(contents)){content=contents[0];preview=contents[1];contentText=content;if(content&&previewIsEmpty(preview)&&Converter){preview=Converter.makeHtml(content)}if(!content){preview=""}cacheNote.Preview=preview}else{content=contents;try{contentText=$(content).text()}catch(e){}}var hasChanged={hasChanged:false,IsNew:cacheNote.IsNew,IsMarkdown:cacheNote.IsMarkdown,FromUserId:cacheNote.FromUserId,NoteId:cacheNote.NoteId,NotebookId:cacheNote.NotebookId};if(hasChanged.IsNew){$.extend(hasChanged,cacheNote)}if(cacheNote.Title!=title){hasChanged.hasChanged=true;hasChanged.Title=title;if(!hasChanged.Title){}}if(!arrayEqual(cacheNote.Tags,tags)){hasChanged.hasChanged=true;hasChanged.Tags=tags}if(force&&cacheNote.Content!=content||!force&&$(cacheNote.Content).text()!=contentText){hasChanged.hasChanged=true;hasChanged.Content=content;var c=preview||content;hasChanged.Desc=Note.genDesc(c);hasChanged.ImgSrc=Note.getImgSrc(c);hasChanged.Abstract=Note.genAbstract(c)}else{log("text相同");log(cacheNote.Content==content)}hasChanged["UserId"]=cacheNote["UserId"]||"";return hasChanged};Note.genDesc=function(content){if(!content){return""}content=content.replace(/<br \/>/g," <br />");content=content.replace(/<\/p>/g," </p>");content=content.replace(/<\/div>/g," </div>");conLine truncated Note.curNoteId="";Note.interval="";Note.itemIsBlog='<div class="item-blog"><i class="fa fa-bold" title="blog"></i></div><div class="item-setting"><i class="fa fa-cog" title="setting"></i></div>';Note.itemTplNoImg='<li href="#" class="item ?" noteId="?">';Note.itemTplNoImg+=Note.itemIsBlog+'<div class="item-desc"><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';Note.itemTpl='<li href="#" class="item ? item-image" noteId="?"><div class="item-thumb" style=""><img src="?"/></div>';Note.itemTpl+=Note.itemIsBlog+'<div class="item-desc" style=""><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';Note.newItemTpl='<li href="#" class="item item-active ?" fromUserId="?" noteId="?">';Note.newItemTpl+=Note.itemIsBlog+'<div class="item-desc" style="right: 0px;"><p class="item-title">?</p><p class="item-text"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span><br /><span class="desc">?</span></p></div></li>';Note.noteItemListO=$("#noteItemList");Note.cacheByNotebookId={all:{}};Note.notebookIds={};Note.isReadOnly=false;Note.intervalTime=6e5;Note.startInterval=function(){Note.interval=setInterval(function(){log("自动保存开始...");changedNote=Note.curChangedSaveIt(false)},Note.intervalTime)};Note.stopInterval=function(){clearInterval(Note.interval);setTimeout(function(){Note.startInterval()},Note.intervalTime)};Note.addNoteCache=function(note){Note.cache[note.NoteId]=note;Note.clearCacheByNotebookId(note.NotebookId)};Note.setNoteCache=function(content,clear){if(!Note.cache[content.NoteId]){Note.cache[content.NoteId]=content}else{$.extend(Note.cache[content.NoteId],content)}if(clear==undefined){clear=true}if(clear){Note.clearCacheByNotebookId(content.NotebookId)}};Note.getCurNote=function(){var self=this;if(self.curNoteId==""){return null}return self.cache[self.curNoteId]};Note.getNote=function(noteId){var self=this;return self.cache[noteId]};Note.clearCacheByNotebookId=function(notebookId){if(notebookId){Note.cacheByNotebookId[notebookId]={};Note.cacheByNotebookId["all"]={};Note.notebookIds[notebookId]=true}};Note.notebookHasNotes=function(notebookId){var notes=Note.getNotesByNotebookId(notebookId);return!isEmpty(notes)};Note.getNotesByNotebookId=function(notebookId,sortBy,isAsc){if(!sortBy){sortBy="UpdatedTime"}if(isAsc=="undefined"){isAsc=false}if(!notebookId){notebookId="all"}if(!Note.cacheByNotebookId[notebookId]){return[]}if(Note.cacheByNotebookId[notebookId][sortBy]){return Note.cacheByNotebookId[notebookId][sortBy]}else{}var notes=[];var sortBys=[];for(var i in Note.cache){if(!i){continue}var note=Note.cache[i];if(note.IsTrash||note.IsShared){continue}if(notebookId=="all"||note.NotebookId==notebookId){notes.push(note)}}notes.sort(function(a,b){var t1=a[sortBy];var t2=b[sortBy];if(isAsc){if(t1<t2){return-1}else if(t1>t2){return 1}}else{if(t1<t2){return 1}else if(t1>t2){return-1}}return 0});Note.cacheByNotebookId[notebookId][sortBy]=notes;return notes};Note.renderNotesAndFirstOneContent=function(ret){if(!isArray(ret)){return}Note.renderNotes(ret);if(!isEmpty(ret[0])){Note.changeNoteForPjax(ret[0].NoteId,true,false)}else{}};Note.curHasChanged=function(force){if(force==undefined){force=true}var cacheNote=Note.cache[Note.curNoteId]||{};var title=$("#noteTitle").val();var tags=Tag.getTags();var contents=getEditorContent(cacheNote.IsMarkdown);var content,preview;var contentText;if(isArray(contents)){content=contents[0];preview=contents[1];contentText=content;if(content&&previewIsEmpty(preview)&&Converter){preview=Converter.makeHtml(content)}if(!content){preview=""}cacheNote.Preview=preview}else{content=contents;try{contentText=$(content).text()}catch(e){}}var hasChanged={hasChanged:false,IsNew:cacheNote.IsNew,IsMarkdown:cacheNote.IsMarkdown,FromUserId:cacheNote.FromUserId,NoteId:cacheNote.NoteId,NotebookId:cacheNote.NotebookId};if(hasChanged.IsNew){$.extend(hasChanged,cacheNote)}if(cacheNote.Title!=title){hasChanged.hasChanged=true;hasChanged.Title=title;if(!hasChanged.Title){}}if(!arrayEqual(cacheNote.Tags,tags)){hasChanged.hasChanged=true;hasChanged.Tags=tags}if(force&&cacheNote.Content!=content||!force&&$(cacheNote.Content).text()!=contentText){hasChanged.hasChanged=true;hasChanged.Content=content;var c=preview||content;if(!cacheNote.HasSelfDefined||!cacheNote.IsBlog){hasChanged.Desc=Note.genDesc(c);hasChanged.ImgSrc=Note.getImgSrc(c);hasChanged.Abstract=Note.genAbstract(c)}}else{log("text相同");log(cacheNote.Content==content)}hasChanged["UserId"]=cacheNote["UserId"]||"";return hasChanged};Note.genDesc=function(content){if(!content){return""}content=content.replace(/<br \/>/g," <br />");content=content.replace(/<Line truncated
+104 -15
View File
@@ -14,15 +14,15 @@ Note.interval = ""; // 定时器
Note.itemIsBlog = '<div class="item-blog"><i class="fa fa-bold" title="blog"></i></div><div class="item-setting"><i class="fa fa-cog" title="setting"></i></div>'; Note.itemIsBlog = '<div class="item-blog"><i class="fa fa-bold" title="blog"></i></div><div class="item-setting"><i class="fa fa-cog" title="setting"></i></div>';
// for render // for render
Note.itemTplNoImg = '<li href="#" class="item ?" noteId="?">' Note.itemTplNoImg = '<li href="#" class="item ?" noteId="?">'
Note.itemTplNoImg += Note.itemIsBlog +'<div class="item-desc"><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>'; Note.itemTplNoImg += Note.itemIsBlog +'<div class="item-desc"><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';
// 有image // 有image
Note.itemTpl = '<li href="#" class="item ? item-image" noteId="?"><div class="item-thumb" style=""><img src="?"/></div>' Note.itemTpl = '<li href="#" class="item ? item-image" noteId="?"><div class="item-thumb" style=""><img src="?"/></div>'
Note.itemTpl +=Note.itemIsBlog + '<div class="item-desc" style=""><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>'; Note.itemTpl +=Note.itemIsBlog + '<div class="item-desc" style=""><p class="item-title">?</p><p class="item-info"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span></p><p class="desc">?</p></div></li>';
// for new // for new
Note.newItemTpl = '<li href="#" class="item item-active ?" fromUserId="?" noteId="?">' Note.newItemTpl = '<li href="#" class="item item-active ?" fromUserId="?" noteId="?">'
Note.newItemTpl += Note.itemIsBlog + '<div class="item-desc" style="right: 0px;"><p class="item-title">?</p><p class="item-text"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-calendar"></i> <span class="updated-time">?</span><br /><span class="desc">?</span></p></div></li>'; Note.newItemTpl += Note.itemIsBlog + '<div class="item-desc" style="right: 0px;"><p class="item-title">?</p><p class="item-text"><i class="fa fa-book"></i> <span class="note-notebook">?</span> <i class="fa fa-clock-o"></i> <span class="updated-time">?</span><br /><span class="desc">?</span></p></div></li>';
Note.noteItemListO = $("#noteItemList"); Note.noteItemListO = $("#noteItemList");
@@ -178,10 +178,9 @@ Note.renderNotesAndFirstOneContent = function(ret) {
Note.renderNotes(ret); Note.renderNotes(ret);
// 渲染第一个 // 渲染第一个
if(!isEmpty(ret[0])) { if(!isEmpty(ret[0])) {
Note.changeNote(ret[0].NoteId); Note.changeNoteForPjax(ret[0].NoteId, true, false);
} else { } else {
} }
} }
// 当前的note是否改变过了? // 当前的note是否改变过了?
@@ -255,10 +254,12 @@ Note.curHasChanged = function(force) {
// 从html中得到... // 从html中得到...
var c = preview || content; var c = preview || content;
// 不是博客或没有自定义设置的
if(!cacheNote.HasSelfDefined || !cacheNote.IsBlog) {
hasChanged.Desc = Note.genDesc(c); hasChanged.Desc = Note.genDesc(c);
hasChanged.ImgSrc = Note.getImgSrc(c); hasChanged.ImgSrc = Note.getImgSrc(c);
hasChanged.Abstract = Note.genAbstract(c); hasChanged.Abstract = Note.genAbstract(c);
}
} else { } else {
log("text相同"); log("text相同");
log(cacheNote.Content == content); log(cacheNote.Content == content);
@@ -315,6 +316,9 @@ Note.genDesc = function(content) {
// 得到摘要 // 得到摘要
Note.genAbstract = function(content, len) { Note.genAbstract = function(content, len) {
if(!content) {
return "";
}
if(len == undefined) { if(len == undefined) {
len = 1000; len = 1000;
} }
@@ -392,11 +396,14 @@ Note.curChangedSaveIt = function(force) {
// 保存之 // 保存之
showMsg(getMsg("saving")); showMsg(getMsg("saving"));
ajaxPost("/note/UpdateNoteOrContent", hasChanged, function(ret) { ajaxPost("/note/updateNoteOrContent", hasChanged, function(ret) {
if(hasChanged.IsNew) { if(hasChanged.IsNew) {
// 缓存之, 后台得到其它信息 // 缓存之, 后台得到其它信息
ret.IsNew = false; ret.IsNew = false;
Note.setNoteCache(ret, false); Note.setNoteCache(ret, false);
// 新建笔记也要change history
Pjax.changeNote(ret);
} }
showMsg(getMsg("saveSuccess"), 1000); showMsg(getMsg("saveSuccess"), 1000);
}); });
@@ -418,14 +425,93 @@ Note.selectTarget = function(target) {
// 2. ajax得到现在的note // 2. ajax得到现在的note
Note.showContentLoading = function() { Note.showContentLoading = function() {
$("#noteMaskForLoading").css("z-index", 99999); $("#noteMaskForLoading").css("z-index", 99999);
} };
Note.hideContentLoading = function() { Note.hideContentLoading = function() {
$("#noteMaskForLoading").css("z-index", -1); $("#noteMaskForLoading").css("z-index", -1);
};
Note.directToNote = function(noteId) {
var $p = $("#noteItemList");
var pHeight = $p.height();
// 相对于父亲的位置
var pTop = $("[noteId='" + noteId + "']").position().top;
var scrollTop = $p.scrollTop();
pTop += scrollTop;
/*
log("..");
log(noteId);
log(pTop + ' ' + pHeight + ' ' + scrollTop);
*/
// 当前的可视范围的元素位置是[scrollTop, pHeight + scrollTop]
if(pTop >= scrollTop && pTop <= pHeight + scrollTop) {
} else {
var top = pTop;
log("定位到特定note, 在可视范围内");
// 手机不用slimScroll
if(!LEA.isMobile && !Mobile.isMobile()) {
$("#noteItemList").scrollTop(top);
$("#noteItemList").slimScroll({ scrollTo: top + 'px', height: "100%", onlyScrollBar: true});
} else {
} }
}
};
// mustPush表示是否将状态push到state中, 默认为true
// 什么时候为false, 在popstate时
// needTargetNobook默认为false, 在点击notebook, renderfirst时为false
Note.changeNoteForPjax = function(noteId, mustPush, needTargetNotebook) {
var me = this;
var note = me.getNote(noteId);
if(!note) {
return;
}
var isShare = note.Perm != undefined;
if(needTargetNotebook == undefined) {
needTargetNotebook = true;
}
me.changeNote(noteId, isShare, true, function(note) {
// push state
if(mustPush == undefined) {
mustPush = true;
}
if(mustPush) {
Pjax.changeNote(note);
}
// popstate时虽然选中了note, 但位置可能不可见
if(needTargetNotebook) {
Note.directToNote(noteId);
}
});
// 第一次render时定位到第一个笔记的notebook 12.06 life
// 或通过pop时
// 什么时候需要? 1. 第一次changeNote, 2. pop时, 只有当点击了notebook后才不要
// 这里, 万一是共享笔记呢?
// 切换到共享中
if(needTargetNotebook) {
if(isShare) {
if($("#myShareNotebooks").hasClass("closed")) {
$("#myShareNotebooks .folderHeader").trigger("click");
}
} else {
if($("#myNotebooks").hasClass("closed")) {
$("#myNotebooks .folderHeader").trigger("click");
}
}
// 如果是子笔记本, 那么要展开父笔记本
Notebook.expandNotebookTo(note.NotebookId);
}
};
// 点击notebook时调用, 渲染第一个笔记
Note.contentAjax = null; Note.contentAjax = null;
Note.contentAjaxSeq = 1; Note.contentAjaxSeq = 1;
Note.changeNote = function(selectNoteId, isShare, needSaveChanged) { Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
var self = this; var self = this;
// -1 停止定时器 // -1 停止定时器
Note.stopInterval(); Note.stopInterval();
@@ -486,6 +572,8 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged) {
Note.renderNoteContentReadOnly(ret); Note.renderNoteContentReadOnly(ret);
} }
self.hideContentLoading(); self.hideContentLoading();
callback && callback(ret);
} }
if(cacheNote.Content) { if(cacheNote.Content) {
@@ -493,10 +581,10 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged) {
return; return;
} }
var url = "/note/GetNoteContent"; var url = "/note/getNoteContent";
var param = {noteId: selectNoteId}; var param = {noteId: selectNoteId};
if(isShare) { if(isShare) {
url = "/share/GetShareNoteContent"; url = "/share/getShareNoteContent";
param.sharedUserId = cacheNote.UserId // 谁的笔记 param.sharedUserId = cacheNote.UserId // 谁的笔记
} }
@@ -891,7 +979,7 @@ Note.deleteNote = function(target, contextmenuItem, isShared) {
// 显示共享信息 // 显示共享信息
Note.listNoteShareUserInfo = function(target) { Note.listNoteShareUserInfo = function(target) {
var noteId = $(target).attr("noteId"); var noteId = $(target).attr("noteId");
showDialogRemote("share/listNoteShareUserInfo", {noteId: noteId}); showDialogRemote("/share/listNoteShareUserInfo", {noteId: noteId});
} }
// 共享笔记 // 共享笔记
@@ -918,7 +1006,7 @@ Note.listNoteContentHistories = function() {
options.show = true; options.show = true;
$("#leanoteDialog").modal(options); $("#leanoteDialog").modal(options);
ajaxGet("noteContentHistory/listHistories", {noteId: Note.curNoteId}, function(re) { ajaxGet("/noteContentHistory/listHistories", {noteId: Note.curNoteId}, function(re) {
if(!isArray(re)) {$content.html(getMsg("noHistories")); return} if(!isArray(re)) {$content.html(getMsg("noHistories")); return}
// 组装成一个tab // 组装成一个tab
var str = "<p>" + getMsg("historiesNum") + '</p><div id="historyList"><table class="table table-hover">'; var str = "<p>" + getMsg("historiesNum") + '</p><div id="historyList"><table class="table table-hover">';
@@ -1587,7 +1675,8 @@ $(function() {
} }
// 当前的和所选的是一个, 不改变 // 当前的和所选的是一个, 不改变
if(Note.curNoteId != noteId) { if(Note.curNoteId != noteId) {
Note.changeNote(noteId); // 不用重定向到notebook
Note.changeNoteForPjax(noteId, true, false);
} }
}); });
@@ -1658,7 +1747,7 @@ $(function() {
e.stopPropagation(); e.stopPropagation();
// 得到ID // 得到ID
var noteId = $(this).parent().attr('noteId'); var noteId = $(this).parent().attr('noteId');
window.open("/blog/post/" + noteId); window.open("/blog/view/" + noteId);
}); });
// note setting // note setting
+1 -1
View File
@@ -1 +1 @@
Notebook.curNotebookId="";Notebook.cache={};Notebook.notebooks=[];Notebook.notebookNavForListNote="";Notebook.notebookNavForNewNote="";Notebook.setCache=function(notebook){var notebookId=notebook.NotebookId;if(!notebookId){return}if(!Notebook.cache[notebookId]){Notebook.cache[notebookId]={}}$.extend(Notebook.cache[notebookId],notebook)};Notebook.getCurNotebookId=function(){return Notebook.curNotebookId};Notebook._updateNotebookNumberNotes=function(notebookId,n){var self=this;var notebook=self.getNotebook(notebookId);if(!notebook){return}notebook.NumberNotes+=n;if(notebook.NumberNotes<0){notebook.NumberNotes=0}$("#numberNotes_"+notebookId).html(notebook.NumberNotes)};Notebook.incrNotebookNumberNotes=function(notebookId){var self=this;self._updateNotebookNumberNotes(notebookId,1)};Notebook.minusNotebookNumberNotes=function(notebookId){var self=this;self._updateNotebookNumberNotes(notebookId,-1)};Notebook.getNotebook=function(notebookId){return Notebook.cache[notebookId]};Notebook.getNotebookTitle=function(notebookId){var notebook=Notebook.cache[notebookId];if(notebook){return notebook.Title}else{return"未知"}};Notebook.getTreeSetting=function(isSearch,isShare){var noSearch=!isSearch;var self=this;function addDiyDom(treeId,treeNode){var spaceWidth=5;var switchObj=$("#"+treeId+" #"+treeNode.tId+"_switch"),icoObj=$("#"+treeId+" #"+treeNode.tId+"_ico");switchObj.remove();icoObj.before(switchObj);if(!isShare){if(!Notebook.isAllNotebookId(treeNode.NotebookId)&&!Notebook.isTrashNotebookId(treeNode.NotebookId)){icoObj.after($('<span class="notebook-number-notes" id="numberNotes_'+treeNode.NotebookId+'">'+(treeNode.NumberNotes||0)+"</span>"));icoObj.after($('<span class="fa notebook-setting" title="setting"></span>'))}}else{if(!Share.isDefaultNotebookId(treeNode.NotebookId)){icoObj.after($('<span class="fa notebook-setting" title="setting"></span>'))}}if(treeNode.level>1){var spaceStr="<span style='display: inline-block;width:"+spaceWidth*treeNode.level+"px'></span>";switchObj.before(spaceStr)}}function beforeDrag(treeId,treeNodes){for(var i=0,l=treeNodes.length;i<l;i++){if(treeNodes[i].drag===false){return false}}return true}function beforeDrop(treeId,treeNodes,targetNode,moveType){return targetNode?targetNode.drop!==false:true}function onDrop(e,treeId,treeNodes,targetNode,moveType){var treeNode=treeNodes[0];if(!targetNode){return}var parentNode;var treeObj=self.tree;var ajaxData={curNotebookId:treeNode.NotebookId};if(moveType=="inner"){parentNode=targetNode}else{parentNode=targetNode.getParentNode()}if(!parentNode){var nodes=treeObj.getNodes()}else{ajaxData.parentNotebookId=parentNode.NotebookId;var nextLevel=parentNode.level+1;function filter(node){return node.level==nextLevel}var nodes=treeObj.getNodesByFilter(filter,false,parentNode)}ajaxData.siblings=[];for(var i in nodes){var notebookId=nodes[i].NotebookId;if(!Notebook.isAllNotebookId(notebookId)&&!Notebook.isTrashNotebookId(notebookId)){ajaxData.siblings.push(notebookId)}}ajaxPost("/notebook/dragNotebooks",{data:JSON.stringify(ajaxData)});setTimeout(function(){Notebook.changeNav()},100)}if(!isShare){var onClick=function(e,treeId,treeNode){var notebookId=treeNode.NotebookId;Notebook.changeNotebook(notebookId)};var onDblClick=function(e){var notebookId=$(e.target).attr("notebookId");if(!Notebook.isAllNotebookId(notebookId)&&!Notebook.isTrashNotebookId(notebookId)){self.updateNotebookTitle(e.target)}}}else{var onClick=function(e,treeId,treeNode){var notebookId=treeNode.NotebookId;var fromUserId=$(e.target).closest(".friend-notebooks").attr("fromUserId");Share.changeNotebook(fromUserId,notebookId)};var onDblClick=null}var setting={view:{showLine:false,showIcon:false,selectedMulti:false,dblClickExpand:false,addDiyDom:addDiyDom},data:{key:{name:"Title",children:"Subs"}},edit:{enable:true,showRemoveBtn:false,showRenameBtn:false,drag:{isMove:noSearch,prev:noSearch,inner:noSearch,next:noSearch}},callback:{beforeDrag:beforeDrag,beforeDrop:beforeDrop,onDrop:onDrop,onClick:onClick,onDblClick:onDblClick,beforeRename:function(treeId,treeNode,newName,isCancel){if(newName==""){if(treeNode.IsNew){self.tree.removeNode(treeNode);return true}return false}if(treeNode.Title==newName){return true}if(treeNode.IsNew){var parentNode=treeNode.getParentNode();var parentNotebookId=parentNode?parentNode.NotebookId:"";self.doAddNotebook(treeNode.NotebookId,newName,parentNotebookId)}else{self.doUpdateNotebookTitle(treeNode.NotebookId,newName)}return true}}};if(isSearch){}return setting};Notebook.allNotebookId="0";Notebook.trashNotebookId="-1";Notebook.curNotebookIsTrashOrAll=function(){return Notebook.curNotebookId==Notebook.trashNotebookId||Notebook.curNotebookId==Notebook.allNotebookId};Notebook.renderNotebooks=function(notebooks){var self=this;if(!notebooks||typeof notebooks!="object"||notebooks.length<0){notebooks=[]}notebooks=[{NotebookId:Notebook.allNotebookId,Title:getMsg("all"),drop:false,drag:false}].concat(notebooks);notebooks.push({NotebookId:Notebook.trashNotebookId,Title:getMLine truncated Notebook.curNotebookId="";Notebook.cache={};Notebook.notebooks=[];Notebook.notebookNavForListNote="";Notebook.notebookNavForNewNote="";Notebook.setCache=function(notebook){var notebookId=notebook.NotebookId;if(!notebookId){return}if(!Notebook.cache[notebookId]){Notebook.cache[notebookId]={}}$.extend(Notebook.cache[notebookId],notebook)};Notebook.getCurNotebookId=function(){return Notebook.curNotebookId};Notebook._updateNotebookNumberNotes=function(notebookId,n){var self=this;var notebook=self.getNotebook(notebookId);if(!notebook){return}notebook.NumberNotes+=n;if(notebook.NumberNotes<0){notebook.NumberNotes=0}$("#numberNotes_"+notebookId).html(notebook.NumberNotes)};Notebook.incrNotebookNumberNotes=function(notebookId){var self=this;self._updateNotebookNumberNotes(notebookId,1)};Notebook.minusNotebookNumberNotes=function(notebookId){var self=this;self._updateNotebookNumberNotes(notebookId,-1)};Notebook.getNotebook=function(notebookId){return Notebook.cache[notebookId]};Notebook.getNotebookTitle=function(notebookId){var notebook=Notebook.cache[notebookId];if(notebook){return notebook.Title}else{return"未知"}};Notebook.getTreeSetting=function(isSearch,isShare){var noSearch=!isSearch;var self=this;function addDiyDom(treeId,treeNode){var spaceWidth=5;var switchObj=$("#"+treeId+" #"+treeNode.tId+"_switch"),icoObj=$("#"+treeId+" #"+treeNode.tId+"_ico");switchObj.remove();icoObj.before(switchObj);if(!isShare){if(!Notebook.isAllNotebookId(treeNode.NotebookId)&&!Notebook.isTrashNotebookId(treeNode.NotebookId)){icoObj.after($('<span class="notebook-number-notes" id="numberNotes_'+treeNode.NotebookId+'">'+(treeNode.NumberNotes||0)+"</span>"));icoObj.after($('<span class="fa notebook-setting" title="setting"></span>'))}}else{if(!Share.isDefaultNotebookId(treeNode.NotebookId)){icoObj.after($('<span class="fa notebook-setting" title="setting"></span>'))}}if(treeNode.level>1){var spaceStr="<span style='display: inline-block;width:"+spaceWidth*treeNode.level+"px'></span>";switchObj.before(spaceStr)}}function beforeDrag(treeId,treeNodes){for(var i=0,l=treeNodes.length;i<l;i++){if(treeNodes[i].drag===false){return false}}return true}function beforeDrop(treeId,treeNodes,targetNode,moveType){return targetNode?targetNode.drop!==false:true}function onDrop(e,treeId,treeNodes,targetNode,moveType){var treeNode=treeNodes[0];if(!targetNode){return}var parentNode;var treeObj=self.tree;var ajaxData={curNotebookId:treeNode.NotebookId};if(moveType=="inner"){parentNode=targetNode}else{parentNode=targetNode.getParentNode()}if(!parentNode){var nodes=treeObj.getNodes()}else{ajaxData.parentNotebookId=parentNode.NotebookId;var nextLevel=parentNode.level+1;function filter(node){return node.level==nextLevel}var nodes=treeObj.getNodesByFilter(filter,false,parentNode)}ajaxData.siblings=[];for(var i in nodes){var notebookId=nodes[i].NotebookId;if(!Notebook.isAllNotebookId(notebookId)&&!Notebook.isTrashNotebookId(notebookId)){ajaxData.siblings.push(notebookId)}}ajaxPost("/notebook/dragNotebooks",{data:JSON.stringify(ajaxData)});setTimeout(function(){Notebook.changeNav()},100)}if(!isShare){var onClick=function(e,treeId,treeNode){var notebookId=treeNode.NotebookId;Notebook.changeNotebook(notebookId)};var onDblClick=function(e){var notebookId=$(e.target).attr("notebookId");if(!Notebook.isAllNotebookId(notebookId)&&!Notebook.isTrashNotebookId(notebookId)){self.updateNotebookTitle(e.target)}}}else{var onClick=function(e,treeId,treeNode){var notebookId=treeNode.NotebookId;var fromUserId=$(e.target).closest(".friend-notebooks").attr("fromUserId");Share.changeNotebook(fromUserId,notebookId)};var onDblClick=null}var setting={view:{showLine:false,showIcon:false,selectedMulti:false,dblClickExpand:false,addDiyDom:addDiyDom},data:{key:{name:"Title",children:"Subs"}},edit:{enable:true,showRemoveBtn:false,showRenameBtn:false,drag:{isMove:noSearch,prev:noSearch,inner:noSearch,next:noSearch}},callback:{beforeDrag:beforeDrag,beforeDrop:beforeDrop,onDrop:onDrop,onClick:onClick,onDblClick:onDblClick,beforeRename:function(treeId,treeNode,newName,isCancel){if(newName==""){if(treeNode.IsNew){self.tree.removeNode(treeNode);return true}return false}if(treeNode.Title==newName){return true}if(treeNode.IsNew){var parentNode=treeNode.getParentNode();var parentNotebookId=parentNode?parentNode.NotebookId:"";self.doAddNotebook(treeNode.NotebookId,newName,parentNotebookId)}else{self.doUpdateNotebookTitle(treeNode.NotebookId,newName)}return true}}};if(isSearch){}return setting};Notebook.allNotebookId="0";Notebook.trashNotebookId="-1";Notebook.curNotebookIsTrashOrAll=function(){return Notebook.curNotebookId==Notebook.trashNotebookId||Notebook.curNotebookId==Notebook.allNotebookId};Notebook.renderNotebooks=function(notebooks){var self=this;if(!notebooks||typeof notebooks!="object"||notebooks.length<0){notebooks=[]}notebooks=[{NotebookId:Notebook.allNotebookId,Title:getMsg("all"),drop:false,drag:false}].concat(notebooks);notebooks.push({NotebookId:Notebook.trashNotebookId,Title:getMLine truncated
+72 -16
View File
@@ -289,6 +289,41 @@ Notebook.cacheAllNotebooks = function(notebooks) {
} }
} }
// 展开到笔记本
Notebook.expandNotebookTo = function(notebookId, userId) {
var me = this;
var selected = false;
var tree = me.tree;
// 共享的
if(userId) {
tree = Share.trees[userId];
}
if(!tree) {
return;
}
var curNode = tree.getNodeByTId(notebookId);
if(!curNode) {
return;
}
while(true) {
var pNode = curNode.getParentNode();
if(pNode) {
tree.expandNode(pNode, true);
if(!selected) {
Notebook.changeNotebookNav(notebookId);
selected = true;
}
curNode = pNode;
} else {
if(!selected) {
Notebook.changeNotebookNav(notebookId);
}
break;
}
}
}
// RenderNotebooks调用, // RenderNotebooks调用,
// nav 为了新建, 快速选择, 移动笔记 // nav 为了新建, 快速选择, 移动笔记
@@ -507,10 +542,11 @@ Notebook.toggleToMyNav = function(userId, notebookId) {
$("#tagSearch").hide(); $("#tagSearch").hide();
} }
Notebook.changeNotebookNav = function(notebookId) { Notebook.changeNotebookNav = function(notebookId) {
Notebook.curNotebookId = notebookId;
Notebook.toggleToMyNav(); Notebook.toggleToMyNav();
// 1 // 1 改变当前的notebook
Notebook.selectNotebook($(tt('#notebookList [notebookId="?"]', notebookId))); Notebook.selectNotebook($(tt('#notebook [notebookId="?"]', notebookId)));
var notebook = Notebook.cache[notebookId]; var notebook = Notebook.cache[notebookId];
@@ -542,7 +578,9 @@ Notebook.curActiveNotebookIsAll = function() {
// 1. 改变note, 此时需要先保存 // 1. 改变note, 此时需要先保存
// 2. ajax得到该notebook下的所有note // 2. ajax得到该notebook下的所有note
// 3. 使用Note.RederNotes() // 3. 使用Note.RederNotes()
Notebook.changeNotebook = function(notebookId) { // callback Pjax, 当popstate时调用
Notebook.changeNotebook = function(notebookId, callback) {
var me = this;
Notebook.changeNotebookNav(notebookId); Notebook.changeNotebookNav(notebookId);
Notebook.curNotebookId = notebookId; Notebook.curNotebookId = notebookId;
@@ -553,7 +591,7 @@ Notebook.changeNotebook = function(notebookId) {
// 2 先清空所有 // 2 先清空所有
Note.clearAll(); Note.clearAll();
var url = "/note/ListNotes/"; var url = "/note/listNotes/";
var param = {notebookId: notebookId}; var param = {notebookId: notebookId};
// 废纸篓 // 废纸篓
@@ -565,21 +603,45 @@ Notebook.changeNotebook = function(notebookId) {
// 得到全部的... // 得到全部的...
cacheNotes = Note.getNotesByNotebookId(); cacheNotes = Note.getNotesByNotebookId();
if(!isEmpty(cacheNotes)) { // 万一真的是没有呢? if(!isEmpty(cacheNotes)) { // 万一真的是没有呢?
if(callback) {
callback(cacheNotes);
} else {
Note.renderNotesAndFirstOneContent(cacheNotes); Note.renderNotesAndFirstOneContent(cacheNotes);
}
return; return;
} }
} else { } else {
cacheNotes = Note.getNotesByNotebookId(notebookId); cacheNotes = Note.getNotesByNotebookId(notebookId);
if(!isEmpty(cacheNotes)) { // 万一真的是没有呢? if(!isEmpty(cacheNotes)) { // 万一真的是没有呢? 执行后面的ajax
if(callback) {
callback(cacheNotes);
} else {
Note.renderNotesAndFirstOneContent(cacheNotes); Note.renderNotesAndFirstOneContent(cacheNotes);
}
return; return;
} }
} }
// 2 得到笔记本 // 2 得到笔记本
// 这里可以缓存起来, note按notebookId缓存 // 这里可以缓存起来, note按notebookId缓存
ajaxGet(url, param, Note.renderNotesAndFirstOneContent); me.showNoteAndEditorLoading();
ajaxGet(url, param, function(cacheNotes) {
if(callback) {
callback(cacheNotes);
} else {
Note.renderNotesAndFirstOneContent(cacheNotes);
} }
me.hideNoteAndEditorLoading();
});
}
// 笔记列表与编辑器的mask loading
Notebook.showNoteAndEditorLoading = function() {
$("#noteAndEditorMask").show();
};
Notebook.hideNoteAndEditorLoading = function() {
$("#noteAndEditorMask").hide();
};
// 是否是当前选中的notebookId // 是否是当前选中的notebookId
// 还包括共享 // 还包括共享
@@ -596,10 +658,10 @@ Notebook.changeNotebookForNewNote = function(notebookId) {
return; return;
} }
Notebook.changeNotebookNav(notebookId); Notebook.changeNotebookNav(notebookId, true);
Notebook.curNotebookId = notebookId; Notebook.curNotebookId = notebookId;
var url = "/note/ListNotes/"; var url = "/note/listNotes/";
var param = {notebookId: notebookId}; var param = {notebookId: notebookId};
// 2 得到笔记本 // 2 得到笔记本
@@ -614,7 +676,7 @@ Notebook.changeNotebookForNewNote = function(notebookId) {
// 显示共享信息 // 显示共享信息
Notebook.listNotebookShareUserInfo = function(target) { Notebook.listNotebookShareUserInfo = function(target) {
var notebookId = $(target).attr("notebookId"); var notebookId = $(target).attr("notebookId");
showDialogRemote("share/listNotebookShareUserInfo", {notebookId: notebookId}); showDialogRemote("/share/listNotebookShareUserInfo", {notebookId: notebookId});
} }
// 共享笔记本 // 共享笔记本
Notebook.shareNotebooks= function(target) { Notebook.shareNotebooks= function(target) {
@@ -657,7 +719,7 @@ Notebook.setNotebook2Blog = function(target) {
} }
}); });
} }
ajaxPost("notebook/setNotebook2Blog", {notebookId: notebookId, isBlog: isBlog}, function(ret) { ajaxPost("/notebook/setNotebook2Blog", {notebookId: notebookId, isBlog: isBlog}, function(ret) {
if(ret) { if(ret) {
// 这里要设置notebook下的note的blog状态 // 这里要设置notebook下的note的blog状态
Note.setAllNoteBlogStatus(notebookId, isBlog); Note.setAllNoteBlogStatus(notebookId, isBlog);
@@ -846,12 +908,6 @@ $(function() {
} else { } else {
items.push("set2Blog"); items.push("set2Blog");
} }
//asktalk bebug#23
if(notebookId=="548125adf4e872105c000007"){
items.push("delete");
}
// 是否还有笔记 // 是否还有笔记
if(Note.notebookHasNotes(notebookId)) { if(Note.notebookHasNotes(notebookId)) {
items.push("delete"); items.push("delete");
+1 -1
View File
@@ -1 +1 @@
function editorMode(){this.writingHash="#writing";this.normalHash="#normal";this.isWritingMode=location.hash==this.writingHash;this.toggleA=null}editorMode.prototype.toggleAText=function(isWriting){var self=this;setTimeout(function(){var toggleA=$(".toggle-editor-mode a");var toggleSpan=$(".toggle-editor-mode span");if(isWriting){toggleA.attr("href",self.normalHash);toggleSpan.text(getMsg("normalMode"))}else{toggleA.attr("href",self.writingHash);toggleSpan.text(getMsg("writingMode"))}},0)};editorMode.prototype.isWriting=function(hash){return hash==this.writingHash};editorMode.prototype.init=function(){this.changeMode(this.isWritingMode);var self=this;$(".toggle-editor-mode").click(function(){saveBookmark();var $a=$(this).find("a");var isWriting=self.isWriting($a.attr("href"));self.changeMode(isWriting);restoreBookmark()})};editorMode.prototype.changeMode=function(isWritingMode){this.toggleAText(isWritingMode);if(isWritingMode){this.writtingMode()}else{this.normalMode()}$("#moreBtn i").removeClass("fa-angle-up").addClass("fa-angle-down")};editorMode.prototype.resizeEditor=function(){setTimeout(function(){resizeEditor()},10);setTimeout(function(){resizeEditor()},20);setTimeout(function(){resizeEditor()},500)};editorMode.prototype.normalMode=function(){var $c=$("#editorContent_ifr").contents();$c.contents().find("#writtingMode").remove();$c.contents().find('link[href$="editor-writting-mode.css"]').remove();$("#noteItemListWrap, #notesAndSort").show();$("#noteList").unbind("mouseenter").unbind("mouseleave");var theme=UserInfo.Theme||"default";theme+=".css";$("#themeLink").attr("href","/css/theme/"+theme);$("#mceToolbar").css("height","30px");this.resizeEditor();$("#noteList").width(UserInfo.NoteListWidth);$("#note").css("left",UserInfo.NoteListWidth)};editorMode.prototype.writtingMode=function(){$("#themeLink").attr("href","/css/theme/writting-overwrite.css");setTimeout(function(){var $c=$("#editorContent_ifr").contents();$c.contents().find("head").append('<link type="text/css" rel="stylesheet" href="/css/editor/editor-writting-mode.css" id="writtingMode">')},0);$("#noteItemListWrap, #notesAndSort").fadeOut();$("#noteList").hover(function(){$("#noteItemListWrap, #notesAndSort").fadeIn()},function(){$("#noteItemListWrap, #notesAndSort").fadeOut()});$("#mceToolbar").css("height","40px");this.resizeEditor();$("#noteList").width(250);$("#note").css("left",0)};editorMode.prototype.getWritingCss=function(){if(this.isWritingMode){return["css/editor/editor-writting-mode.css"]}return[]};var em=new editorMode;var Resize={lineMove:false,mdLineMove:false,target:null,leftNotebook:$("#leftNotebook"),notebookSplitter:$("#notebookSplitter"),noteList:$("#noteList"),noteAndEditor:$("#noteAndEditor"),noteSplitter:$("#noteSplitter"),note:$("#note"),body:$("body"),leftColumn:$("#left-column"),rightColumn:$("#right-column"),mdSplitter:$("#mdSplitter"),init:function(){var self=this;self.initEvent()},initEvent:function(){var self=this;$(".noteSplit").bind("mousedown",function(event){event.preventDefault();self.lineMove=true;$(this).css("background-color","#ccc");self.target=$(this).attr("id");$("#noteMask").css("z-index",99999)});self.mdSplitter.bind("mousedown",function(event){event.preventDefault();self.mdLineMove=true;$(this).css("background-color","#ccc")});self.body.bind("mousemove",function(event){if(self.lineMove){event.preventDefault();self.resize3Columns(event)}else if(self.mdLineMove){event.preventDefault();self.resizeMdColumns(event)}});self.body.bind("mouseup",function(event){self.stopResize();$("#noteMask").css("z-index",-1)})},stopResize:function(){var self=this;if(self.lineMove||self.mdLineMove){ajaxGet("/user/updateColumnWidth",{mdEditorWidth:UserInfo.MdEditorWidth,notebookWidth:UserInfo.NotebookWidth,noteListWidth:UserInfo.NoteListWidth},function(){})}self.lineMove=false;self.mdLineMove=false;$(".noteSplit").css("background","none");self.mdSplitter.css("background","none")},set3ColumnsWidth:function(notebookWidth,noteListWidth){var self=this;if(notebookWidth<150||noteListWidth<100){return}var noteWidth=self.body.width()-notebookWidth-noteListWidth;if(noteWidth<400){return}self.leftNotebook.width(notebookWidth);self.notebookSplitter.css("left",notebookWidth);self.noteAndEditor.css("left",notebookWidth);self.noteList.width(noteListWidth);self.noteSplitter.css("left",noteListWidth);self.note.css("left",noteListWidth);UserInfo.NotebookWidth=notebookWidth;UserInfo.NoteListWidth=noteListWidth},resize3Columns:function(event,isFromeIfr){var self=this;if(isFromeIfr){event.clientX+=self.body.width()-self.note.width()}var notebookWidth,noteListWidth;if(self.lineMove){if(self.target=="notebookSplitter"){notebookWidth=event.clientX;noteListWidth=self.noteList.width();self.set3ColumnsWidth(notebookWidth,noteListWidth)}else{notebookWidth=self.leftNotebook.width();noteListWidth=event.clientX-notebookWidth;self.set3ColumnsWidth(notebookWidth,noteListWidth)}resizeEditor()}},resizeMdColumns:function(event){var self=this;if(self.mdLineMLine truncated function editorMode(){this.writingHash="writing";this.normalHash="normal";this.isWritingMode=location.hash.indexOf(this.writingHash)>=0;this.toggleA=null}editorMode.prototype.toggleAText=function(isWriting){var self=this;setTimeout(function(){var toggleA=$(".toggle-editor-mode a");var toggleSpan=$(".toggle-editor-mode span");if(isWriting){toggleA.attr("href","#"+self.normalHash);toggleSpan.text(getMsg("normalMode"))}else{toggleA.attr("href","#"+self.writingHash);toggleSpan.text(getMsg("writingMode"))}},0)};editorMode.prototype.isWriting=function(hash){return hash.indexOf(this.writingHash)>=0};editorMode.prototype.init=function(){this.changeMode(this.isWritingMode);var self=this;$(".toggle-editor-mode").click(function(e){e.preventDefault();saveBookmark();var $a=$(this).find("a");var isWriting=self.isWriting($a.attr("href"));self.changeMode(isWriting);if(isWriting){setHash("m",self.writingHash)}else{setHash("m",self.normalHash)}restoreBookmark()})};editorMode.prototype.changeMode=function(isWritingMode){this.toggleAText(isWritingMode);if(isWritingMode){this.writtingMode()}else{this.normalMode()}$("#moreBtn i").removeClass("fa-angle-up").addClass("fa-angle-down")};editorMode.prototype.resizeEditor=function(){setTimeout(function(){resizeEditor()},10);setTimeout(function(){resizeEditor()},20);setTimeout(function(){resizeEditor()},500)};editorMode.prototype.normalMode=function(){var $c=$("#editorContent_ifr").contents();$c.contents().find("#writtingMode").remove();$c.contents().find('link[href$="editor-writting-mode.css"]').remove();$("#noteItemListWrap, #notesAndSort").show();$("#noteList").unbind("mouseenter").unbind("mouseleave");var theme=UserInfo.Theme||"default";theme+=".css";$("#themeLink").attr("href","/css/theme/"+theme);$("#mceToolbar").css("height","30px");this.resizeEditor();$("#noteList").width(UserInfo.NoteListWidth);$("#note").css("left",UserInfo.NoteListWidth)};editorMode.prototype.writtingMode=function(){$("#themeLink").attr("href","/css/theme/writting-overwrite.css");setTimeout(function(){var $c=$("#editorContent_ifr").contents();$c.contents().find("head").append('<link type="text/css" rel="stylesheet" href="/css/editor/editor-writting-mode.css" id="writtingMode">')},0);$("#noteItemListWrap, #notesAndSort").fadeOut();$("#noteList").hover(function(){$("#noteItemListWrap, #notesAndSort").fadeIn()},function(){$("#noteItemListWrap, #notesAndSort").fadeOut()});$("#mceToolbar").css("height","40px");this.resizeEditor();$("#noteList").width(250);$("#note").css("left",0)};editorMode.prototype.getWritingCss=function(){if(this.isWritingMode){return["/css/editor/editor-writting-mode.css"]}return[]};var em=new editorMode;var Resize={lineMove:false,mdLineMove:false,target:null,leftNotebook:$("#leftNotebook"),notebookSplitter:$("#notebookSplitter"),noteList:$("#noteList"),noteAndEditor:$("#noteAndEditor"),noteSplitter:$("#noteSplitter"),note:$("#note"),body:$("body"),leftColumn:$("#left-column"),rightColumn:$("#right-column"),mdSplitter:$("#mdSplitter"),init:function(){var self=this;self.initEvent()},initEvent:function(){var self=this;$(".noteSplit").bind("mousedown",function(event){event.preventDefault();self.lineMove=true;$(this).css("background-color","#ccc");self.target=$(this).attr("id");$("#noteMask").css("z-index",99999)});self.mdSplitter.bind("mousedown",function(event){event.preventDefault();self.mdLineMove=true;$(this).css("background-color","#ccc")});self.body.bind("mousemove",function(event){if(self.lineMove){event.preventDefault();self.resize3Columns(event)}else if(self.mdLineMove){event.preventDefault();self.resizeMdColumns(event)}});self.body.bind("mouseup",function(event){self.stopResize();$("#noteMask").css("z-index",-1)})},stopResize:function(){var self=this;if(self.lineMove||self.mdLineMove){ajaxGet("/user/updateColumnWidth",{mdEditorWidth:UserInfo.MdEditorWidth,notebookWidth:UserInfo.NotebookWidth,noteListWidth:UserInfo.NoteListWidth},function(){})}self.lineMove=false;self.mdLineMove=false;$(".noteSplit").css("background","none");self.mdSplitter.css("background","none")},set3ColumnsWidth:function(notebookWidth,noteListWidth){var self=this;if(notebookWidth<150||noteListWidth<100){return}var noteWidth=self.body.width()-notebookWidth-noteListWidth;if(noteWidth<400){return}self.leftNotebook.width(notebookWidth);self.notebookSplitter.css("left",notebookWidth);self.noteAndEditor.css("left",notebookWidth);self.noteList.width(noteListWidth);self.noteSplitter.css("left",noteListWidth);self.note.css("left",noteListWidth);UserInfo.NotebookWidth=notebookWidth;UserInfo.NoteListWidth=noteListWidth},resize3Columns:function(event,isFromeIfr){var self=this;if(isFromeIfr){event.clientX+=self.body.width()-self.note.width()}var notebookWidth,noteListWidth;if(self.lineMove){if(self.target=="notebookSplitter"){notebookWidth=event.clientX;noteListWidth=self.noteList.width();self.set3ColumnsWidth(notebookWidth,noteListWidth)}else{notebookWidth=self.leftNotebook.width();noteListWidth=event.clientX-notebookWidth;seLine truncated
+201 -14
View File
@@ -4,10 +4,9 @@
//---------------------- //----------------------
// 编辑器模式 // 编辑器模式
function editorMode() { function editorMode() {
this.writingHash = "#writing"; this.writingHash = "writing";
this.normalHash = "#normal"; this.normalHash = "normal";
this.isWritingMode = location.hash == this.writingHash; this.isWritingMode = location.hash.indexOf(this.writingHash) >= 0;
this.toggleA = null; this.toggleA = null;
} }
@@ -17,27 +16,33 @@ editorMode.prototype.toggleAText = function(isWriting) {
var toggleA = $(".toggle-editor-mode a"); var toggleA = $(".toggle-editor-mode a");
var toggleSpan = $(".toggle-editor-mode span"); var toggleSpan = $(".toggle-editor-mode span");
if(isWriting) { if(isWriting) {
toggleA.attr("href", self.normalHash); toggleA.attr("href", "#" + self.normalHash);
toggleSpan.text(getMsg("normalMode")); toggleSpan.text(getMsg("normalMode"));
} else { } else {
toggleA.attr("href", self.writingHash); toggleA.attr("href", "#" + self.writingHash);
toggleSpan.text(getMsg("writingMode")); toggleSpan.text(getMsg("writingMode"));
} }
}, 0); }, 0);
} }
editorMode.prototype.isWriting = function(hash) { editorMode.prototype.isWriting = function(hash) {
return hash == this.writingHash; return hash.indexOf(this.writingHash) >= 0
} }
editorMode.prototype.init = function() { editorMode.prototype.init = function() {
this.changeMode(this.isWritingMode); this.changeMode(this.isWritingMode);
var self = this; var self = this;
$(".toggle-editor-mode").click(function() { $(".toggle-editor-mode").click(function(e) {
// e.preventDefault();
saveBookmark(); saveBookmark();
var $a = $(this).find("a"); var $a = $(this).find("a");
var isWriting = self.isWriting($a.attr("href")); var isWriting = self.isWriting($a.attr("href"));
self.changeMode(isWriting); self.changeMode(isWriting);
// //
if(isWriting) {
setHash("m", self.writingHash);
} else {
setHash("m", self.normalHash);
}
restoreBookmark(); restoreBookmark();
}); });
} }
@@ -123,7 +128,7 @@ editorMode.prototype.writtingMode = function() {
editorMode.prototype.getWritingCss = function() { editorMode.prototype.getWritingCss = function() {
if(this.isWritingMode) { if(this.isWritingMode) {
return ["css/editor/editor-writting-mode.css"]; return ["/css/editor/editor-writting-mode.css"];
} }
return []; return [];
} }
@@ -276,6 +281,7 @@ Mobile = {
noteO: $("#note"), noteO: $("#note"),
bodyO: $("body"), bodyO: $("body"),
setMenuO: $("#setMenu"), setMenuO: $("#setMenu"),
// 弃用, 统一使用Pjax
hashChange: function() { hashChange: function() {
var self = Mobile; var self = Mobile;
var hash = location.hash; var hash = location.hash;
@@ -292,8 +298,8 @@ Mobile = {
init: function() { init: function() {
var self = this; var self = this;
self.isMobile(); self.isMobile();
$(window).on("hashchange", self.hashChange); // $(window).on("hashchange", self.hashChange);
self.hashChange(); // self.hashChange();
/* /*
$("#noteItemList").on("tap", ".item", function(event) { $("#noteItemList").on("tap", ".item", function(event) {
$(this).click(); $(this).click();
@@ -320,6 +326,8 @@ Mobile = {
} }
return LEA.isMobile; return LEA.isMobile;
}, },
// 改变笔记, 此时切换到编辑器模式下
// note.js click事件处理, 先切换到纯编辑器下, 再调用Note.changeNote()
changeNote: function(noteId) { changeNote: function(noteId) {
var self = this; var self = this;
if(!LEA.isMobile) {return true;} if(!LEA.isMobile) {return true;}
@@ -331,21 +339,25 @@ Mobile = {
var self = this; var self = this;
self.bodyO.addClass("full-editor"); self.bodyO.addClass("full-editor");
self.noteO.addClass("editor-show"); self.noteO.addClass("editor-show");
/*
if(changeHash) { if(changeHash) {
if(!noteId) { if(!noteId) {
noteId = Note.curNoteId; noteId = Note.curNoteId;
} }
location.hash = "noteId=" + noteId; location.hash = "noteId=" + noteId;
} }
*/
}, },
toNormal: function(changeHash) { toNormal: function(changeHash) {
var self = this; var self = this;
self.bodyO.removeClass("full-editor"); self.bodyO.removeClass("full-editor");
self.noteO.removeClass("editor-show"); self.noteO.removeClass("editor-show");
/*
if(changeHash) { if(changeHash) {
location.hash = "notebookAndNote"; location.hash = "notebookAndNote";
} }
*/
}, },
switchPage: function() { switchPage: function() {
var self = this; var self = this;
@@ -410,13 +422,13 @@ function initEditor() {
// 初始化编辑器 // 初始化编辑器
tinymce.init({ tinymce.init({
// inline: true,
setup: function(ed) { setup: function(ed) {
ed.on('keydown', Note.saveNote); ed.on('keydown', Note.saveNote);
// indent outdent // indent outdent
ed.on('keydown', function(e) { ed.on('keydown', function(e) {
var num = e.which ? e.which : e.keyCode; var num = e.which ? e.which : e.keyCode;
if (num == 9) { // tab pressed if (num == 9) { // tab pressed
if(!e.shiftKey) { if(!e.shiftKey) {
// ed.execCommand('Indent'); // ed.execCommand('Indent');
// TODO 如果当前在li, ul, ol下不执行!! // TODO 如果当前在li, ul, ol下不执行!!
@@ -458,7 +470,8 @@ function initEditor() {
selector : "#editorContent", selector : "#editorContent",
// height: 100,//这个应该是文档的高度, 而其上层的高度是$("#content").height(), // height: 100,//这个应该是文档的高度, 而其上层的高度是$("#content").height(),
// parentHeight: $("#content").height(), // parentHeight: $("#content").height(),
content_css : ["css/bootstrap.css", "css/editor/editor.css"].concat(em.getWritingCss()), content_css : ["/css/bootstrap.css", "/css/editor/editor.css"].concat(em.getWritingCss()),
// content_css : ["/css/editor/editor.css"].concat(em.getWritingCss()),
skin : "custom", skin : "custom",
language: LEA.locale, // 语言 language: LEA.locale, // 语言
plugins : [ plugins : [
@@ -797,3 +810,177 @@ $(function() {
Mobile.init(); Mobile.init();
}); });
//------------
// pjax
//------------
var Pjax = {
init: function() {
var me = this;
// 当history改变时
window.addEventListener('popstate', function(evt){
var state = evt.state;
if(!state) {
return;
}
document.title = state.title || "Untitled";
log("pop");
me.changeNotebookAndNote(state.noteId);
}, false);
// ie9
if(!history.pushState) {
$(window).on("hashchange", function() {
var noteId = getHash("noteId");;
if(noteId) {
me.changeNotebookAndNote(noteId);
}
});
}
},
// pjax调用
// popstate事件发生时, 转换到noteId下, 此时要转换notebookId
changeNotebookAndNote: function(noteId) {
var note = Note.getNote(noteId);
if(!note) {
return;
}
var isShare = note.Perm != undefined;
var notebookId = note.NotebookId;
// 如果是在当前notebook下, 就不要转换notebook了
if(Notebook.curNotebookId == notebookId) {
// 不push state
Note.changeNoteForPjax(noteId, false);
return;
}
// 自己的
if(!isShare) {
// 先切换到notebook下, 得到notes列表, 再changeNote
Notebook.changeNotebook(notebookId, function(notes) {
Note.renderNotes(notes);
// 不push state
Note.changeNoteForPjax(noteId, false, true);
});
// 共享笔记
} else {
Share.changeNotebook(note.UserId, notebookId, function(notes) {
Note.renderNotes(notes);
// 不push state
Note.changeNoteForPjax(noteId, false, true);
});
}
},
// ajax后调用
changeNote: function(noteInfo) {
var me = this;
log("push");
var noteId = noteInfo.NoteId;
var title = noteInfo.Title;
var url = '/note/' + noteId;
if(location.hash) {
url += location.hash;
}
// 如果支持pushState
if(history.pushState) {
var state=({
url: url,
noteId: noteId,
title: title,
});
history.pushState(state, title, url);
document.title = title || 'Untitled';
// 不支持, 则用hash
} else {
setHash("noteId", noteId);
}
}
};
$(function() {
Pjax.init();
});
// note.html调用
// 实始化页面
function initPage() {
$(function() {
Notebook.renderNotebooks(notebooks);
Share.renderShareNotebooks(sharedUserInfos, shareNotebooks);
// 如果初始打开的是共享的笔记
// 那么定位到我的笔记
if(curSharedNoteNotebookId) {
Share.firstRenderShareNote(curSharedUserId, curSharedNoteNotebookId, curNoteId);
// 初始打开的是我的笔记
} else {
Note.setNoteCache(noteContentJson);
Note.renderNotes(notes);
if(curNoteId) {
// 指定某个note时才target notebook, /note定位到最新
// ie10&+要setTimeout
setTimeout(function() {
Note.changeNoteForPjax(curNoteId, true, curNotebookId);
});
if(!curNotebookId) {
Notebook.selectNotebook($(tt('#notebook [notebookId="?"]', Notebook.allNotebookId)));
}
}
}
// 指定笔记, 也要保存最新笔记
if(latestNotes.length > 0) {
for(var i = 0; i < latestNotes.length; ++i) {
Note.addNoteCache(latestNotes[i]);
}
}
Tag.renderTagNav(tagsJson);
// init notebook后才调用
initSlimScroll();
});
}
//----------
// aceeditor
var aceEditors = {};
function initAce(id, val){
var aceEditor = ace.edit(id);
aceEditor.setTheme("ace/theme/tomorrow");
aceEditor.session.setMode("ace/mode/javascript");
aceEditor.setAutoScrollEditorIntoView(true);
aceEditor.setOption("maxLines", 100);
if(val) {
aceEditor.setValue(val);
}
aceEditors [id] = aceEditor;
return aceEditor;
}
function getAce(id) {
return aceEditors[id];
}
// 是否在node内
function isInAce(node, brush) {
var $node = $(node);
var node = $node.get(0);
if(node.nodeName == "PRE") {
$node.data('brush', brush);
var id = $node.attr('id');
var aceEditor = getAce(id);
if(aceEditor) {
return [aceEditor, $node];
}
return false;
} else {
// 找到父是pre
$pre = $node.closest("pre");
if($pre.length == 0) {
return false;
}
return isInAce($pre, brush);
}
return false;
}
+1 -1
View File
@@ -1 +1 @@
Share.defaultNotebookId="share0";Share.defaultNotebookTitle=getMsg("defaulthhare");Share.sharedUserInfos={};Share.userNavs={};Share.notebookCache={};Share.cache={};Share.dialogIsNote=true;Share.setCache=function(note){if(!note||!note.NoteId){return}Share.cache[note.NoteId]=note};Share.getNotebooksForNew=function(userId,notebooks){var self=this;var navForNewNote="";var len=notebooks.length;for(var i=0;i<len;++i){var notebook=notebooks[i];notebook.IsShared=true;notebook.UserId=userId;self.notebookCache[notebook.NotebookId]=notebook;Notebook.cache[notebook.NotebookId]=notebook;var classes="";var subs=false;if(!isEmpty(notebook.Subs)){log(11);log(notebook.Subs);var subs=self.getNotebooksForNew(userId,notebook.Subs);if(subs){classes="dropdown-submenu"}}var eachForNew="";if(notebook.Perm){var eachForNew=tt('<li role="presentation" class="clearfix ?" userId="?" notebookId="?"><div class="new-note-left pull-left" title="为该笔记本新建笔记" href="#">?</div><div title="为该笔记本新建markdown笔记" class="new-note-right pull-left">M</div>',classes,userId,notebook.NotebookId,notebook.Title);if(subs){eachForNew+="<ul class='dropdown-menu'>";eachForNew+=subs;eachForNew+="</ul>"}eachForNew+="</li>"}navForNewNote+=eachForNew}return navForNewNote};Share.trees={};Share.renderShareNotebooks=function(sharedUserInfos,shareNotebooks){var self=Share;if(isEmpty(sharedUserInfos)){return}if(!shareNotebooks||typeof shareNotebooks!="object"||shareNotebooks.length<0){shareNotebooks={}}var $shareNotebooks=$("#shareNotebooks");for(var i in sharedUserInfos){var userInfo=sharedUserInfos[i];var userNotebooksPre=shareNotebooks[userInfo.UserId]||[];userNotebooks=[{NotebookId:self.defaultNotebookId,Title:Share.defaultNotebookTitle}].concat(userNotebooksPre);self.notebookCache[self.defaultNotebookId]=userNotebooks[0];var username=userInfo.Username||userInfo.Email;userInfo.Username=username;Share.sharedUserInfos[userInfo.UserId]=userInfo;var userId=userInfo.UserId;var header=tt('<li class="each-user"><div class="friend-header" fromUserId="?"><i class="fa fa-angle-down"></i><span>?</span> <span class="fa notebook-setting" title="setting"></span> </div>',userInfo.UserId,username);var friendId="friendContainer_"+userId;var body='<ul class="friend-notebooks ztree" id="'+friendId+'" fromUserId="'+userId+'"></ul>';$shareNotebooks.append(header+body+"</li>");self.trees[userId]=$.fn.zTree.init($("#"+friendId),Notebook.getTreeSetting(true,true),userNotebooks);self.userNavs[userId]={forNew:self.getNotebooksForNew(userId,userNotebooksPre)};log(self.userNavs)}$(".friend-notebooks").hover(function(){if(!$(this).hasClass("showIcon")){$(this).addClass("showIcon")}},function(){$(this).removeClass("showIcon")});$(".friend-header i").click(function(){var $this=$(this);var $tree=$(this).parent().next();if($tree.is(":hidden")){$tree.slideDown("fast");$this.removeClass("fa-angle-right fa-angle-down").addClass("fa-angle-down")}else{$tree.slideUp("fast");$this.removeClass("fa-angle-right fa-angle-down").addClass("fa-angle-right")}});var shareNotebookMenu={width:180,items:[{text:getMsg("deleteSharedNotebook"),icon:"",faIcon:"fa-trash-o",action:Share.deleteShareNotebook}],onShow:applyrule,onContextMenu:beforeContextMenu,parent:"#shareNotebooks",children:".notebook-item"};function applyrule(menu){return}function beforeContextMenu(){var notebookId=$(this).attr("notebookId");return!Share.isDefaultNotebookId(notebookId)}var menuNotebooks=$("#shareNotebooks").contextmenu(shareNotebookMenu);var shareUserMenu={width:180,items:[{text:getMsg("deleteAllShared"),icon:"",faIcon:"fa-trash-o",action:Share.deleteUserShareNoteAndNotebook}],parent:"#shareNotebooks",children:".friend-header"};var menuUser=$("#shareNotebooks").contextmenu(shareUserMenu);$(".friend-header").on("click",".notebook-setting",function(e){e.preventDefault();e.stopPropagation();var $p=$(this).parent();menuUser.showMenu(e,$p)});$("#shareNotebooks .notebook-item").on("click",".notebook-setting",function(e){e.preventDefault();e.stopPropagation();var $p=$(this).parent();menuNotebooks.showMenu(e,$p)})};Share.isDefaultNotebookId=function(notebookId){return Share.defaultNotebookId==notebookId};Share.toggleToSharedNav=function(userId,notebookId){var self=this;$("#curNotebookForListNote").html(Share.notebookCache[notebookId].Title+"("+Share.sharedUserInfos[userId].Username+")");var forNew=Share.userNavs[userId].forNew;if(forNew){$("#notebookNavForNewSharedNote").html(forNew);var curNotebookId="";var curNotebookTitle="";if(Share.notebookCache[notebookId].Perm){curNotebookId=notebookId;curNotebookTitle=Share.notebookCache[notebookId].Title}else{var $f=$("#notebookNavForNewSharedNote li").eq(0);curNotebookId=$f.attr("notebookId");curNotebookTitle=$f.find(".new-note-left").text()}$("#curNotebookForNewSharedNote").html(curNotebookTitle+"("+Share.sharedUserInfos[userId].Username+")");$("#curNotebookForNewSharedNote").attr("notebookId",curNotebookId);$("#curNotebookForNewSharedNote").attr("userId",userId);$("#nLine truncated Share.defaultNotebookId="share0";Share.defaultNotebookTitle=getMsg("defaulthhare");Share.sharedUserInfos={};Share.userNavs={};Share.notebookCache={};Share.cache={};Share.dialogIsNote=true;Share.setCache=function(note){if(!note||!note.NoteId){return}Share.cache[note.NoteId]=note};Share.getNotebooksForNew=function(userId,notebooks){var self=this;var navForNewNote="";var len=notebooks.length;for(var i=0;i<len;++i){var notebook=notebooks[i];notebook.IsShared=true;notebook.UserId=userId;self.notebookCache[notebook.NotebookId]=notebook;Notebook.cache[notebook.NotebookId]=notebook;var classes="";var subs=false;if(!isEmpty(notebook.Subs)){log(11);log(notebook.Subs);var subs=self.getNotebooksForNew(userId,notebook.Subs);if(subs){classes="dropdown-submenu"}}var eachForNew="";if(notebook.Perm){var eachForNew=tt('<li role="presentation" class="clearfix ?" userId="?" notebookId="?"><div class="new-note-left pull-left" title="为该笔记本新建笔记" href="#">?</div><div title="为该笔记本新建markdown笔记" class="new-note-right pull-left">M</div>',classes,userId,notebook.NotebookId,notebook.Title);if(subs){eachForNew+="<ul class='dropdown-menu'>";eachForNew+=subs;eachForNew+="</ul>"}eachForNew+="</li>"}navForNewNote+=eachForNew}return navForNewNote};Share.trees={};Share.renderShareNotebooks=function(sharedUserInfos,shareNotebooks){var self=Share;if(isEmpty(sharedUserInfos)){return}if(!shareNotebooks||typeof shareNotebooks!="object"||shareNotebooks.length<0){shareNotebooks={}}var $shareNotebooks=$("#shareNotebooks");for(var i in sharedUserInfos){var userInfo=sharedUserInfos[i];var userNotebooksPre=shareNotebooks[userInfo.UserId]||[];userNotebooks=[{NotebookId:self.defaultNotebookId,Title:Share.defaultNotebookTitle}].concat(userNotebooksPre);self.notebookCache[self.defaultNotebookId]=userNotebooks[0];var username=userInfo.Username||userInfo.Email;userInfo.Username=username;Share.sharedUserInfos[userInfo.UserId]=userInfo;var userId=userInfo.UserId;var header=tt('<li class="each-user"><div class="friend-header" fromUserId="?"><i class="fa fa-angle-down"></i><span>?</span> <span class="fa notebook-setting" title="setting"></span> </div>',userInfo.UserId,username);var friendId="friendContainer_"+userId;var body='<ul class="friend-notebooks ztree" id="'+friendId+'" fromUserId="'+userId+'"></ul>';$shareNotebooks.append(header+body+"</li>");self.trees[userId]=$.fn.zTree.init($("#"+friendId),Notebook.getTreeSetting(true,true),userNotebooks);self.userNavs[userId]={forNew:self.getNotebooksForNew(userId,userNotebooksPre)};log(self.userNavs)}$(".friend-notebooks").hover(function(){if(!$(this).hasClass("showIcon")){$(this).addClass("showIcon")}},function(){$(this).removeClass("showIcon")});$(".friend-header i").click(function(){var $this=$(this);var $tree=$(this).parent().next();if($tree.is(":hidden")){$tree.slideDown("fast");$this.removeClass("fa-angle-right fa-angle-down").addClass("fa-angle-down")}else{$tree.slideUp("fast");$this.removeClass("fa-angle-right fa-angle-down").addClass("fa-angle-right")}});var shareNotebookMenu={width:180,items:[{text:getMsg("deleteSharedNotebook"),icon:"",faIcon:"fa-trash-o",action:Share.deleteShareNotebook}],onShow:applyrule,onContextMenu:beforeContextMenu,parent:"#shareNotebooks",children:".notebook-item"};function applyrule(menu){return}function beforeContextMenu(){var notebookId=$(this).attr("notebookId");return!Share.isDefaultNotebookId(notebookId)}var menuNotebooks=$("#shareNotebooks").contextmenu(shareNotebookMenu);var shareUserMenu={width:180,items:[{text:getMsg("deleteAllShared"),icon:"",faIcon:"fa-trash-o",action:Share.deleteUserShareNoteAndNotebook}],parent:"#shareNotebooks",children:".friend-header"};var menuUser=$("#shareNotebooks").contextmenu(shareUserMenu);$(".friend-header").on("click",".notebook-setting",function(e){e.preventDefault();e.stopPropagation();var $p=$(this).parent();menuUser.showMenu(e,$p)});$("#shareNotebooks .notebook-item").on("click",".notebook-setting",function(e){e.preventDefault();e.stopPropagation();var $p=$(this).parent();menuNotebooks.showMenu(e,$p)})};Share.isDefaultNotebookId=function(notebookId){return Share.defaultNotebookId==notebookId};Share.toggleToSharedNav=function(userId,notebookId){var self=this;$("#curNotebookForListNote").html(Share.notebookCache[notebookId].Title+"("+Share.sharedUserInfos[userId].Username+")");var forNew=Share.userNavs[userId].forNew;if(forNew){$("#notebookNavForNewSharedNote").html(forNew);var curNotebookId="";var curNotebookTitle="";if(Share.notebookCache[notebookId].Perm){curNotebookId=notebookId;curNotebookTitle=Share.notebookCache[notebookId].Title}else{var $f=$("#notebookNavForNewSharedNote li").eq(0);curNotebookId=$f.attr("notebookId");curNotebookTitle=$f.find(".new-note-left").text()}$("#curNotebookForNewSharedNote").html(curNotebookTitle+"("+Share.sharedUserInfos[userId].Username+")");$("#curNotebookForNewSharedNote").attr("notebookId",curNotebookId);$("#curNotebookForNewSharedNote").attr("userId",userId);$("#nLine truncated
+38 -14
View File
@@ -243,14 +243,36 @@ Share.toggleToSharedNav = function(userId, notebookId) {
$("#tagSearch").hide(); $("#tagSearch").hide();
} }
// 刷新加载共享的笔记本, page.js调用
Share.firstRenderShareNote = function(ownerUserId, notebookId, noteId) {
$("#myShareNotebooks .folderHeader").trigger("click");
// 这里, 可能这个笔记本是子笔记本, 所以先扩展
Notebook.expandNotebookTo(notebookId, ownerUserId);
Share.changeNotebook(ownerUserId, notebookId, function(notes) {
Note.renderNotes(notes);
// 不push state
Note.changeNoteForPjax(noteId, false, false);
});
};
//改变笔记本 //改变笔记本
//0. 改变样式 //0. 改变样式
//1. 改变note, 此时需要先保存 //1. 改变note, 此时需要先保存
//2. ajax得到该notebook下的所有note //2. ajax得到该notebook下的所有note
//3. 使用Note.RederNotes() //3. 使用Note.RederNotes()
Share.changeNotebook = function(userId, notebookId) { Share.changeNotebook = function(userId, notebookId, callback) {
var me = this;
Notebook.curNotebookId = notebookId;
// 选中 // 选中
Notebook.selectNotebook($(tt('#friendContainer_? a[notebookId="?"]', userId, notebookId))); var $t = $(tt('#friendContainer_? a[notebookId="?"]', userId, notebookId));
if($t.length == 0) {
// 切换到默认共享中
// 表示是popstate的默认共享笔记本下
Notebook.selectNotebook($(tt('#friendContainer_? a[notebookId="?"]', userId, me.defaultNotebookId)));
notebookId = me.defaultNotebookId;
} else {
Notebook.selectNotebook($t);
}
// 改变nav!!!! TODO // 改变nav!!!! TODO
Share.toggleToSharedNav(userId, notebookId); Share.toggleToSharedNav(userId, notebookId);
@@ -261,7 +283,7 @@ Share.changeNotebook = function(userId, notebookId) {
// 2 先清空所有 // 2 先清空所有
Note.clearAll(); Note.clearAll();
var url = "/share/ListShareNotes/"; var url = "/share/listShareNotes";
var param = {userId: userId}; var param = {userId: userId};
if(!Share.isDefaultNotebookId(notebookId)) { if(!Share.isDefaultNotebookId(notebookId)) {
param.notebookId = notebookId; param.notebookId = notebookId;
@@ -276,14 +298,18 @@ Share.changeNotebook = function(userId, notebookId) {
if(param.notebookId) { if(param.notebookId) {
} }
if(callback) {
callback(ret);
} else {
Note.renderNotes(ret, false, true); Note.renderNotes(ret, false, true);
// 渲染第一个 // 渲染第一个
// 这里, 有点小复杂, 还要判断权限... // 这里, 有点小复杂, 还要判断权限...
if(!isEmpty(ret)) { if(!isEmpty(ret)) {
// 定位 // 定位
Note.changeNote(ret[0].NoteId, true); Note.changeNoteForPjax(ret[0].NoteId, true, false);
} else { } else {
} }
}
}); });
} }
@@ -338,7 +364,7 @@ Share.changeNotebookForNewNote = function(notebookId) {
Share.toggleToSharedNav(userId, notebookId); Share.toggleToSharedNav(userId, notebookId);
// 得到笔记本 // 得到笔记本
var url = "/share/ListShareNotes/"; var url = "/share/listShareNotes";
var param = {userId: userId, notebookId: notebookId}; var param = {userId: userId, notebookId: notebookId};
// 2 得到笔记本 // 2 得到笔记本
@@ -401,7 +427,7 @@ Share.initContextmenu = function(notebooksCopy) {
} }
Share.contextmenu = $("#noteItemList .item-shared").contextmenu(noteListMenu); Share.contextmenu = $("#noteItemList .item-shared").contextmenu(noteListMenu);
} };
$(function() { $(function() {
// note setting // note setting
@@ -413,8 +439,6 @@ $(function() {
Share.contextmenu.showMenu(e, $p); Share.contextmenu.showMenu(e, $p);
}); });
//--------------------------- //---------------------------
// 新建笔记 // 新建笔记
// 1. 直接点击新建 OR // 1. 直接点击新建 OR
@@ -453,10 +477,10 @@ $(function() {
toHtml = getMsg("readOnly"); toHtml = getMsg("readOnly");
toPerm = "0"; toPerm = "0";
} }
var url = "/share/UpdateShareNotebookPerm"; var url = "/share/updateShareNotebookPerm";
var param = {perm: toPerm, toUserId: toUserId}; var param = {perm: toPerm, toUserId: toUserId};
if(Share.dialogIsNote) { if(Share.dialogIsNote) {
url = "/share/UpdateShareNotePerm"; url = "/share/updateShareNotePerm";
param.noteId = noteOrNotebookId; param.noteId = noteOrNotebookId;
} else { } else {
param.notebookId = noteOrNotebookId; param.notebookId = noteOrNotebookId;
@@ -474,10 +498,10 @@ $(function() {
var noteOrNotebookId = $(this).attr("noteOrNotebookId"); var noteOrNotebookId = $(this).attr("noteOrNotebookId");
var toUserId = $(this).attr("toUserId"); var toUserId = $(this).attr("toUserId");
var url = "/share/DeleteShareNotebook"; var url = "/share/deleteShareNotebook";
var param = {toUserId: toUserId}; var param = {toUserId: toUserId};
if(Share.dialogIsNote) { if(Share.dialogIsNote) {
url = "/share/DeleteShareNote"; url = "/share/deleteShareNote";
param.noteId = noteOrNotebookId; param.noteId = noteOrNotebookId;
} else { } else {
param.notebookId = noteOrNotebookId; param.notebookId = noteOrNotebookId;
@@ -533,10 +557,10 @@ function addShareNoteOrNotebook(trSeq) {
var shareNotePerm = $(trId + ' input[name="perm' + trSeq + '"]:checked').val() || 0; var shareNotePerm = $(trId + ' input[name="perm' + trSeq + '"]:checked').val() || 0;
var perm = shareNotePerm; var perm = shareNotePerm;
// emails = emails.split(";"); // emails = emails.split(";");
var url = "share/addShareNote"; var url = "/share/addShareNote";
var data = {noteId: id, emails: [emails], perm: shareNotePerm}; var data = {noteId: id, emails: [emails], perm: shareNotePerm};
if(!Share.dialogIsNote) { if(!Share.dialogIsNote) {
url = "share/addShareNotebook"; url = "/share/addShareNotebook";
data = {notebookId: id, emails: [emails], perm: shareNotePerm}; data = {notebookId: id, emails: [emails], perm: shareNotePerm};
} }
hideAlert("#shareMsg"); hideAlert("#shareMsg");
+1 -1
View File
@@ -1 +1 @@
var LEA={};var Notebook={cache:{}};var Note={cache:{}};var Tag={};var Notebook={};var Share={};var Mobile={};var Converter;var MarkdownEditor;var ScrollLink;function trimLeft(str,substr){if(!substr||substr==" "){return $.trim(str)}while(str.indexOf(substr)==0){str=str.substring(substr.length)}return str}function json(str){return eval("("+str+")")}function t(){var args=arguments;if(args.length<=1){return args[0]}var text=args[0];if(!text){return text}var pattern="LEAAEL";text=text.replace(/\?/g,pattern);for(var i=1;i<=args.length;++i){text=text.replace(pattern,args[i])}return text}var tt=t;function arrayEqual(a,b){a=a||[];b=b||[];return a.join(",")==b.join(",")}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function isEmpty(obj){if(!obj){return true}if(isArray(obj)){if(obj.length==0){return true}}return false}function getFormJsonData(formId){var data=formArrDataToJson($("#"+formId).serializeArray());return data}function formArrDataToJson(arrData){var datas={};var arrObj={};for(var i in arrData){var attr=arrData[i].name;var value=arrData[i].value;if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function formSerializeDataToJson(formSerializeData){var arr=formSerializeData.split("&");var datas={};var arrObj={};for(var i=0;i<arr.length;++i){var each=arr[i].split("=");var attr=decodeURI(each[0]);var value=decodeURI(each[1]);if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function _ajaxCallback(ret,successFunc,failureFunc){if(ret===true||ret=="true"||typeof ret=="object"){if(ret&&typeof ret=="object"){if(ret.Msg=="NOTLOGIN"){alert("你还没有登录, 请先登录!");return}}if(typeof successFunc=="function"){successFunc(ret)}}else{if(typeof failureFunc=="function"){failureFunc(ret)}else{alert("error!")}}}function _ajax(type,url,param,successFunc,failureFunc,async){log("-------------------ajax:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}return $.ajax({type:type,url:url,data:param,async:async,success:function(ret){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function ajaxGet(url,param,successFunc,failureFunc,async){return _ajax("GET",url,param,successFunc,failureFunc,async)}function ajaxPost(url,param,successFunc,failureFunc,async){_ajax("POST",url,param,successFunc,failureFunc,async)}function ajaxPostJson(url,param,successFunc,failureFunc,async){log("-------------------ajaxPostJson:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}$.ajax({url:url,type:"POST",contentType:"application/json; charset=utf-8",datatype:"json",async:async,data:JSON.stringify(param),success:function(ret,stats){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function findParents(target,selector){if($(target).is(selector)){return $(target)}var parents=$(target).parents();for(var i=0;i<parents.length;++i){log(parents.eq(i));if(parents.eq(i).is(selector)){return parents.seq(i)}}return null}function editorIframeTabindex(index){var $i=$("#editorContent_ifr");if($i.size()==0){setTimeout(function(){editorIframeTabindex(index)},100)}else{$i.attr("tabindex",index)}}LEA.isM=false;LEA.isMarkdownEditor=function(){return LEA.isM};function switchEditor(isMarkdown){LEA.isM=isMarkdown;if(!isMarkdown){$("#editor").show();$("#mdEditor").css("z-index",1);editorIframeTabindex(2);$("#wmd-input").attr("tabindex",3);$("#leanoteNav").show()}else{$("#mdEditor").css("z-index",3).show();editorIframeTabindex(3);$("#wmd-input").attr("tabindex",2);$("#leanoteNav").hide()}}var previewToken="<div style='display: none'>FORTOKEN</div>";function setEditorContent(content,isMarkdown,preview){if(!content){content=""}if(!isMarkdown){$("#editorContent").html(content);if(typeof tinymce!="undefined"&&tinymce.activeEditor){var editor=tinymce.activeEditor;editor.setContent(content);editor.undoManager.clear()}else{setTimeout(function(){setEditorContent(content,false)},100)}}else{$("#wmd-input").val(content);$("#wmd-preview").html("");if(!content||preview){$("#wmd-preview").html(preview).css("height","auto");if(ScrollLink){ScrollLink.onPreviewFinished()}}else{if(MarkdownEditor){$("#wmd-preview").html(previewToken+"<div style='text-align:center; padding: 10px 0;'><img src='http://leanote.com/images/loading-24.gif' /> 正在转换...</div>");MarkdownEditor.refreshPreview()}else{setTimeout(function(){setEditorContent(content,true,preview)},200)}}}}function previewIsEmpty(preview){if(!preview||preview.substr(0,previewToken.length)==previewToken){return true}return false}function getEditorContent(isMarkdown){if(!isMLine truncated var LEA={};var Notebook={cache:{}};var Note={cache:{}};var Tag={};var Notebook={};var Share={};var Mobile={};var Converter;var MarkdownEditor;var ScrollLink;function trimLeft(str,substr){if(!substr||substr==" "){return $.trim(str)}while(str.indexOf(substr)==0){str=str.substring(substr.length)}return str}function json(str){return eval("("+str+")")}function t(){var args=arguments;if(args.length<=1){return args[0]}var text=args[0];if(!text){return text}var pattern="LEAAEL";text=text.replace(/\?/g,pattern);for(var i=1;i<=args.length;++i){text=text.replace(pattern,args[i])}return text}var tt=t;function arrayEqual(a,b){a=a||[];b=b||[];return a.join(",")==b.join(",")}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function isEmpty(obj){if(!obj){return true}if(isArray(obj)){if(obj.length==0){return true}}return false}function getFormJsonData(formId){var data=formArrDataToJson($("#"+formId).serializeArray());return data}function formArrDataToJson(arrData){var datas={};var arrObj={};for(var i in arrData){var attr=arrData[i].name;var value=arrData[i].value;if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function formSerializeDataToJson(formSerializeData){var arr=formSerializeData.split("&");var datas={};var arrObj={};for(var i=0;i<arr.length;++i){var each=arr[i].split("=");var attr=decodeURI(each[0]);var value=decodeURI(each[1]);if(attr.substring(attr.length-2,attr.length)=="[]"){attr=attr.substring(0,attr.length-2);if(arrObj[attr]==undefined){arrObj[attr]=[value]}else{arrObj[attr].push(value)}continue}datas[attr]=value}return $.extend(datas,arrObj)}function _ajaxCallback(ret,successFunc,failureFunc){if(ret===true||ret=="true"||typeof ret=="object"){if(ret&&typeof ret=="object"){if(ret.Msg=="NOTLOGIN"){alert("你还没有登录, 请先登录!");return}}if(typeof successFunc=="function"){successFunc(ret)}}else{if(typeof failureFunc=="function"){failureFunc(ret)}else{alert("error!")}}}function _ajax(type,url,param,successFunc,failureFunc,async){log("-------------------ajax:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}return $.ajax({type:type,url:url,data:param,async:async,success:function(ret){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function ajaxGet(url,param,successFunc,failureFunc,async){return _ajax("GET",url,param,successFunc,failureFunc,async)}function ajaxPost(url,param,successFunc,failureFunc,async){_ajax("POST",url,param,successFunc,failureFunc,async)}function ajaxPostJson(url,param,successFunc,failureFunc,async){log("-------------------ajaxPostJson:");log(url);log(param);if(typeof async=="undefined"){async=true}else{async=false}$.ajax({url:url,type:"POST",contentType:"application/json; charset=utf-8",datatype:"json",async:async,data:JSON.stringify(param),success:function(ret,stats){_ajaxCallback(ret,successFunc,failureFunc)},error:function(ret){_ajaxCallback(ret,successFunc,failureFunc)}})}function findParents(target,selector){if($(target).is(selector)){return $(target)}var parents=$(target).parents();for(var i=0;i<parents.length;++i){log(parents.eq(i));if(parents.eq(i).is(selector)){return parents.seq(i)}}return null}function editorIframeTabindex(index){var $i=$("#editorContent_ifr");if($i.size()==0){setTimeout(function(){editorIframeTabindex(index)},100)}else{$i.attr("tabindex",index)}}LEA.isM=false;LEA.isMarkdownEditor=function(){return LEA.isM};function switchEditor(isMarkdown){LEA.isM=isMarkdown;if(!isMarkdown){$("#editor").show();$("#mdEditor").css("z-index",1);editorIframeTabindex(2);$("#wmd-input").attr("tabindex",3);$("#leanoteNav").show()}else{$("#mdEditor").css("z-index",3).show();editorIframeTabindex(3);$("#wmd-input").attr("tabindex",2);$("#leanoteNav").hide()}}var previewToken="<div style='display: none'>FORTOKEN</div>";function setEditorContent(content,isMarkdown,preview){if(!content){content=""}if(!isMarkdown){$("#editorContent").html(content);if(typeof tinymce!="undefined"&&tinymce.activeEditor){var editor=tinymce.activeEditor;editor.setContent(content);editor.undoManager.clear()}else{setTimeout(function(){setEditorContent(content,false)},100)}}else{$("#wmd-input").val(content);$("#wmd-preview").html("");if(!content||preview){$("#wmd-preview").html(preview).css("height","auto");if(ScrollLink){ScrollLink.onPreviewFinished()}}else{if(MarkdownEditor){$("#wmd-preview").html(previewToken+"<div style='text-align:center; padding: 10px 0;'><img src='http://leanote.com/images/loading-24.gif' /> 正在转换...</div>");MarkdownEditor.refreshPreview()}else{setTimeout(function(){setEditorContent(content,true,preview)},200)}}}}function previewIsEmpty(preview){if(!preview||preview.substr(0,previewToken.length)==previewToken){return true}return false}function getEditorContent(isMarkdown){if(!isMLine truncated
+41
View File
@@ -1147,3 +1147,44 @@ var vd = {
} }
} }
}; };
// 返回hash的#a=1&b=3 返回{a:1, b:3}
function getHashObject() {
var hash = location.hash; // #life
if(!hash) {
return {};
}
var hashKV = hash.substr(1);
var kvs = hashKV.split("&");
var kvsObj = {};
for(var i = 0; i < kvs.length; ++i) {
var kv = kvs[i].split('=');
if(kv.length == 2) {
kvsObj[kv[0]] = kv[1];
}
}
return kvsObj;
}
function getHash(key, value) {
var kvs = getHashObject();
return kvs[key];
}
function setHash(key, value) {
var hash = location.hash; // #life
if(!hash) {
location.href = "#" + key + "=" + value;
return;
}
var kvs = getHashObject();
kvs[key] = value;
var str = "";
for(var i in kvs) {
if(kvs[i]) {
if(str) {
str += "&";
}
str += i + '=' + kvs[i];
}
}
location.href = "#" + str;
}
+11
View File
@@ -0,0 +1,11 @@
!function(){function e(e){var t=function(e,t){return s("",e,t)},o=i;e&&(i[e]||(i[e]={}),o=i[e]),o.define&&o.define.packaged||(n.original=o.define,o.define=n,o.define.packaged=!0),o.require&&o.require.packaged||(s.original=o.require,o.require=t,o.require.packaged=!0)}var t="ace",i=function(){return this}();if(t||"undefined"==typeof requirejs){var n=function(e,t,i){return"string"!=typeof e?void(n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(i=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=i,n.modules[e]=null,void 0)},s=function(e,t,i){if("[object Array]"===Object.prototype.toString.call(t)){for(var n=[],o=0,a=t.length;a>o;++o){var l=r(e,t[o]);if(!l&&s.original)return s.original.apply(window,arguments);n.push(l)}i&&i.apply(null,n)}else{if("string"==typeof t){var h=r(e,t);return!h&&s.original?s.original.apply(window,arguments):(i&&i(),h)}if(s.original)return s.original.apply(window,arguments)}},o=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return o(e,i[0])+"!"+o(e,i[1])}if("."==t.charAt(0)){var n=e.split("/").slice(0,-1).join("/");for(t=n+"/"+t;-1!==t.indexOf(".")&&s!=t;){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},r=function(e,t){t=o(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],"function"==typeof i){var r={},a={id:t,uri:"",exports:r,packaged:!0},l=function(e,i){return s(t,e,i)},h=i(l,r,a);r=h||a.exports,n.modules[t]=r,delete n.payloads[t]}i=n.modules[t]=r||i}return i};e(t)}}(),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){e("./lib/fixoldbrowsers");var n=e("./lib/dom"),s=e("./lib/event"),o=e("./editor").Editor,r=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e.env&&e.env.editor instanceof o)return e.env.editor;var r=t.createEditSession(n.getInnerText(e));e.innerHTML="";var a=new o(new l(e));a.setSession(r);var h={document:r,editor:a,onResize:a.resize.bind(a,null)};return s.addListener(window,"resize",h.onResize),a.on("destroy",function(){s.removeListener(window,"resize",h.onResize)}),e.env=a.env=h,a},t.createEditSession=function(e,t){var i=new r(e,t);return i.setUndoManager(new a),i},t.EditSession=r,t.UndoManager=a}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){var n=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"==typeof e)var i=(new e).getBehaviours(t);else var i=e.getBehaviours(t);this.addBehaviours(i)},this.getBehaviours=function(e){if(!e)return this.$behaviours;for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}}).call(n.prototype),t.Behaviour=n}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){function n(e){var i=/\w{4}/g;for(var n in e)t.packages[n]=e[n].replace(i,"\\u$&")}t.packages={},n({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0ELine truncated
}else"pop"==h&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var u in l.rules)s[u]?s[u].push&&s[u].push.apply(s[u],l.rules[u]):s[u]=l.rules[u];if(l.include||"string"==typeof l)var d=l.include||l,g=s[d];else Array.isArray(l)&&(g=l);if(g){var f=[a,1].concat(g);l.noEscape&&(f=f.filter(function(e){return!e.next})),r.splice.apply(r,f),a--,g=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}var n=0,s=this.$rules;Object.keys(s).forEach(i,this)},this.createKeywordMapper=function(e,t,i,n){var s=Object.create(null);return Object.keys(e).forEach(function(t){var o=e[t];i&&(o=o.toLowerCase());for(var r=o.split(n||"|"),a=r.length;a--;)s[r[a]]=t}),Object.getPrototypeOf(s)&&(s.__proto__=null),this.$keywordList=Object.keys(s),e=null,i?function(e){return s[e.toLowerCase()]||t}:function(e){return s[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(s.prototype),t.TextHighlightRules=s}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){n.implement(this,s),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,i=t.range;if((i.start.row!=i.end.row||i.start.row==this.row)&&!(i.start.row>this.row||i.start.row==this.row&&i.start.column>this.column)){var n=this.row,s=this.column,o=i.start,r=i.end;"insertText"===t.action?o.row===n&&o.column<=s?o.column===s&&this.$insertRight||(o.row===r.row?s+=r.column-o.column:(s-=o.column,n+=r.row-o.row)):o.row!==r.row&&o.row<n&&(n+=r.row-o.row):"insertLines"===t.action?(o.row!==n||0!==s||!this.$insertRight)&&o.row<=n&&(n+=r.row-o.row):"removeText"===t.action?o.row===n&&o.column<s?s=r.column>=s?o.column:Math.max(0,s-(r.column-o.column)):o.row!==r.row&&o.row<n?(r.row===n&&(s=Math.max(0,s-r.column)+o.column),n-=r.row-o.row):r.row===n&&(n-=r.row-o.row,s=Math.max(0,s-r.column)+o.column):"removeLines"==t.action&&o.row<=n&&(r.row<=n?n-=r.row-o.row:(n=o.row,s=0)),this.setPosition(n,s,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):0>e?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),0>t&&(i.column=0),i}}).call(o.prototype)}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,s=i.doc;i.lines[t];)t++;var o=t,r=s.getLength(),a=0;for(i.running=!1;r>t;){i.$tokenizeRow(t),n=t;do t++;while(i.lines[t]);if(a++,a%5==0&&new Date-e>20)return i.running=setTimeout(i.$worker,20),void(i.currentLine=t)}i.currentLine=t,n>=o&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,i=t.start.row,n=t.end.row-i;if(0===n)this.lines[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.lines.splice(i,n+1,null),this.states.splice(i,n+1,null);else{var s=Array(n+1);s.unshift(i,1),this.lines.splice.apply(this.lines,s),this.states.splice.apply(this.states,s)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},tLine truncated
return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){var t=e.data.range;if("i"==e.data.action[0])var i=t.start,n=t.end;else var n=t.start,i=t.end;for(var s=i.row,o=n.row,r=o-s,a=-i.column+n.column,l=this.ranges,h=0,c=l.length;c>h;h++){var u=l[h];if(!(u.end.row<s)){if(u.start.row>s)break;if(u.start.row==s&&u.start.column>=i.column&&(u.start.column!=i.column||!this.$insertRight)&&(u.start.column+=a,u.start.row+=r),u.end.row==s&&u.end.column>=i.column){if(u.end.column==i.column&&this.$insertRight)continue;u.end.column==i.column&&a>0&&c-1>h&&u.end.column>u.start.column&&u.end.column==l[h+1].start.column&&(u.end.column-=a),u.end.column+=a,u.end.row+=r}}}if(0!=r&&c>h)for(;c>h;h++){var u=l[h];u.start.row+=r,u.end.row+=r}}}).call(o.prototype),t.RangeList=o}),ace.define("ace/range",["require","exports","module"],function(e,t,i){var n=function(e,t){return e.row-t.row||e.column-t.column},s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return 0==this.compare(e,t)?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.row<e)var i={row:e,column:0};if(this.start.row>t)var n={row:t+1,column:0};else if(this.start.row<e)var n={row:e,column:0};return s.fromPoints(n||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var n={row:e,column:t};else var o={row:e,column:t};return s.fromPoints(n||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return s.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new s(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new s(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new s(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(s.prototype),s.fromPoints=function(e,t){return new s(e.row,e.column,t.row,t.column)},s.comparePoints=n,s.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBrackLine truncated
},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;a>l;l++){if(l>r){if(l=o.end.row+1,l>=a)break;o=this.$foldData[s++],r=o?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;n<e.length;n++){var s=e[n];"doc"==s.group&&(this.doc.applyDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!1,i))}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,i){function n(e){var i="insertText"===e.action||"insertLines"===e.action;return t?!i:i}var s=e[0],o,r,a=!1;n(s)?(o=h.fromPoints(s.range.start,s.range.end),a=!0):(o=h.fromPoints(s.range.start,s.range.start),a=!1);for(var l=1;l<e.length;l++)s=e[l],n(s)?(r=s.range.start,-1==o.compare(r.row,r.column)&&o.setStart(s.range.start),r=s.range.end,1==o.compare(r.row,r.column)&&o.setEnd(s.range.end),a=!0):(r=s.range.start,-1==o.compare(r.row,r.column)&&(o=h.fromPoints(s.range.start,s.range.start)),a=!1);if(null!=i){0===h.comparePoints(i.start,o.start)&&(i.start.column+=o.end.column-o.start.column,i.end.column+=o.end.column-o.start.column);var c=i.compareRange(o);1==c?o.setStart(i.start):-1==c&&o.setEnd(i.end)}return o},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n=this.getTextRange(e),s=this.getFoldsInRange(e),o=h.fromPoints(t,t);if(!i){this.remove(e);var r=e.start.row-e.end.row,a=r?-e.end.column:e.start.column-e.end.column;a&&(o.start.row==e.end.row&&o.start.column>e.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var l=e.start,c=o.start,r=c.row-l.row,a=c.column-l.column;this.addFolds(s.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=r,e.end.row+=r,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;t>=n;n++)this.insert({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;n>r&&" "==o.charAt(r);++r);n>r&&" "==o.charAt(r)?(i.start.column=r,i.end.column=r+1):(i.start.column=0,i.end.column=r),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),0>i){var n=this.getRowFoldStart(e+i);if(0>n)return 0;var s=n-e}else if(i>0){var n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;var s=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var s=t-e+1}var o=new h(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=s,e.end.row+=s,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+s,a),r.length&&this.addFolds(r),s},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return 0>t?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t)Line truncated
},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){return e.selection.isEmpty()?void e.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(s.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,h=e.session.doc.getLine(i.row),c=i.row+1;c<=n.row+1;c++){var u=s.stringTrimLeft(s.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),h+=u}n.row+1<e.session.doc.getLength()-1&&(h+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new r(i.row,0,n.row+2,0),h),l>0?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(o=e.session.doc.getLine(i.row).length>o?o+1:o,e.selection.moveCursorTo(i.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var o=0;o<n.length;o++)o==n.length-1&&(n[o].end.row!==t||n[o].end.column!==i)&&s.push(new r(n[o].end.row,n[o].end.column,t,i)),0===o?(0!==n[o].start.row||0!==n[o].start.column)&&s.push(new r(0,0,n[o].start.row,n[o].start.column)):s.push(new r(n[o-1].end.row,n[o-1].end.column,n[o].start.row,n[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<s.length;o++)e.selection.addRange(s[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slLine truncated
},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),s=n*this.lineHeight,o=this.scrollTop%this.lineHeight,r=t.scrollerHeight+this.lineHeight,a=this.$getLongestLine(),l=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-a-2*this.$padding<0),h=this.$horizScroll!==l;h&&(this.$horizScroll=l,this.scrollBarH.setVisible(l)),!this.$maxLines&&this.$scrollPastEnd&&(s+=(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd);var c=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s<0),u=this.$vScroll!==c;u&&(this.$vScroll=c,this.scrollBarV.setVisible(c)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,s-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,a+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var d=Math.ceil(r/this.lineHeight)-1,g=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),f=g+d,m,p,A=this.lineHeight;g=e.screenToDocumentRow(g,0);var C=e.getFoldLine(g);C&&(g=C.start.row),m=e.documentToScreenRow(g,0),p=e.getRowLength(g)*A,f=Math.min(e.screenToDocumentRow(f,0),e.getLength()-1),r=t.scrollerHeight+e.getRowLength(f)*A+p,o=this.scrollTop-m*A;var F=0;return this.layerConfig.width!=a&&(F=this.CHANGE_H_SCROLL),(h||u)&&(F=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),u&&(a=this.$getLongestLine())),this.layerConfig={width:a,padding:this.$padding,firstRow:g,firstRowScreen:m,lastRow:f,lineHeight:A,characterWidth:this.characterWidth,minHeight:r,maxHeight:s,offset:o,gutterOffset:Math.max(0,Math.ceil((o+t.height-t.scrollerHeight)/A)),height:this.$size.scrollerHeight},F},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t<i.firstRow))return 1/0===t?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,e,t),!0)},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),s=n.left,o=n.top,r=i&&i.top||0,a=i&&i.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+r>o?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-a<o+this.lineHeight&&(t&&(o+=t*this.$size.scrollerHeight),this.session.setScrollTop(o+this.lineHeight-this.$size.scrollerHeight));var h=this.scrollLeft;h>s?(s<this.$padding+2*this.layerConfig.characterWidth&&(s=-this.scrollMargin.left),this.session.setScrollLeft(s)):h+this.$size.scrollerWidth<s+this.characterWidth?this.session.setScrollLeft(Math.round(s+this.characterWidth-this.$size.scrollerWidth)):h<=this.$padding&&s-h<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setLine truncated
return this.EOL_CHAR!=e?(this.EOL_CHAR=e,!0):void 0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;e+1>i;i++)t.push(this.showInvisibles?"<span class='ace_invisible ace_invisible_tab'>"+this.TAB_CHAR+o.stringRepeat(" ",i-1)+"</span>":o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=this.TAB_CHAR+o.stringRepeat(" ",this.tabSize-1)}else var a=o.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]="<span class='"+n+s+"'>"+a+"</span>",this.$tabStrings[" "]="<span class='"+n+r+"'>"+l+"</span>"}},this.updateLines=function(e,t,i){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),o=Math.min(i,e.lastRow),r=this.element.childNodes,a=0,l=e.firstRow;n>l;l++){var h=this.session.getFoldLine(l);if(h){if(h.containsRow(n)){n=h.start.row;break}l=h.end.row}a++}for(var l=n,h=this.session.getNextFoldLine(l),c=h?h.start.row:1/0;l>c&&(l=h.end.row+1,h=this.session.getNextFoldLine(l,h),c=h?h.start.row:1/0),!(l>o);){var u=r[a++];if(u){var d=[];this.$renderLine(d,l,!this.$useLineGroups(),l==c?h:!1),u.style.height=e.lineHeight*this.session.getRowLength(l)+"px",s.setInnerHtml(u,d.join(""))}l++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var i=this.element;if(t.firstRow<e.firstRow)for(var n=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);n>0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRow<t.firstRow){var s=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s)}if(e.lastRow>t.lastRow){var s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),!(o>i);){var l=s.createElement("div"),h=[];if(this.$renderLine(h,o,!1,o==a?r:!1),l.innerHTML=h.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,o=i,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),!(o>n);)this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(o),"px'>"),this.$renderLine(t,o,!1,o==a?r:!1),this.$useLineGroups()&&t.push("</div>"),o++;this.element=s.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(e,i,n,r,a){if(i)return s.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+o.stringRepeat(s.SPACE_CHAR,e.length)+"</span>":o.stringRepeat(" ",e.length);if("&"==e)return"&Line truncated
}))):n.preventDefault(e)},_=function(e){T(e,!0)},O=function(e){T(e,!1)},W=function(e){var o=M(e);"string"==typeof o?(o&&t.onPaste(o),s.isIE&&setTimeout(i),n.preventDefault(e)):(u.value="",f=!0)};n.addCommandKeyListener(u,t.onCommandKey.bind(t)),n.addListener(u,"select",S),n.addListener(u,"input",R),n.addListener(u,"cut",_),n.addListener(u,"copy",O),n.addListener(u,"paste",W),!("oncut"in u&&"oncopy"in u&&"onpaste"in u||!n.addListener(e,"keydown",function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:O(e);break;case 86:W(e);break;case 88:_(e)}}));var I=function(e){!m&&t.onCompositionStart&&(m={},t.onCompositionStart(),setTimeout(P,0),t.on("mousedown",H),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())},P=function(){if(m&&t.onCompositionUpdate){var e=u.value.replace(/\x01/g,"");if(m.lastValue!==e&&(t.onCompositionUpdate(e),m.lastValue&&t.undo(),m.lastValue=e,m.lastValue)){var i=t.selection.getRange();t.insert(m.lastValue),t.session.markUndoGroup(),m.range=t.selection.getRange(),t.selection.setRange(i),t.selection.clearSelection()}}},H=function(e){if(t.onCompositionEnd){var i=m;m=!1;var n=setTimeout(function(){n=null;var e=u.value.replace(/\x01/g,"");m||(e==i.lastValue?h():!i.lastValue&&e&&(h(),k(e)))});x=function(e){return n&&clearTimeout(n),e=e.replace(/\x01/g,""),e==i.lastValue?"":(i.lastValue&&n&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",H),"compositionend"==e.type&&i.range&&t.selection.setRange(i.range)}},N=r.delayedCall(P,50);if(n.addListener(u,"compositionstart",I),s.isGecko?n.addListener(u,"text",function(){N.schedule()}):(n.addListener(u,"keyup",function(){N.schedule()}),n.addListener(u,"keydown",function(){N.schedule()})),n.addListener(u,"compositionend",H),this.getElement=function(){return u},this.setReadOnly=function(e){u.readOnly=e},this.onContextMenu=function(e){L=!0,p||(p=u.style.cssText),u.style.cssText="z-index:100000;"+(s.isIE?"opacity:0.1;":""),i(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e});var r=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=r.top+(parseInt(a.borderTopWidth)||0),h=r.left+(parseInt(r.borderLeftWidth)||0),d=r.bottom-l-u.clientHeight,g=function(e){u.style.left=e.clientX-h-2+"px",u.style.top=Math.min(e.clientY-l-2,d)+"px"};g(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),s.isWin&&n.capture(t.container,g,c))},this.onContextMenuClose=c,!s.isGecko||s.isMac){var z=function(e){t.textInput.onContextMenu(e),c()};n.addListener(t.renderer.scroller,"contextmenu",z),n.addListener(u,"contextmenu",z)}};t.TextInput=h}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;n>i;i++)t[i]=e[i]&&"object"==typeof e[i]?this.copyObject(e[i]):e[i];return t},t.deepCopy=function(e){if("object"!=typeof e||!e)return e;var i=e.constructor;if(i===RegExp)return e;var n=i();for(var s in e)n[s]="object"==typeof e[s]?t.deepCopy(e[s]):e[s];return n},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},s=function(e){null==i&&(i=setTimeout(n,e||t))};return s.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},s.schedule=s,s.call=function(){this.cancel(),e()},s.cancel=function(){i&&clearTimeout(i),i=null},s.isPending=function(){return i},s}}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,i){var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config"),a=function(t,i,n,s){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.chLine truncated
})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.selection;if(!t.inMultiSelectMode||this.inVirtualSelectionMode){var i=t.toOrientedRange(),n=this.$getSelectedRows(i),s=e.call(this,n.first,n.last);i.moveBy(s,0),t.fromOrientedRange(i)}else{var o=t.rangeList.ranges;t.rangeList.detach(this.session);for(var r=o.length;r--;){for(var a=r,n=o[r].collapseRows(),l=n.end.row,h=n.start.row;r--&&(n=o[r].collapseRows(),h-n.end.row<=1);)h=n.end.row;r++;for(var s=e.call(this,h,l);a>=r;)o[a].moveBy(s,0),a--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):t===!1&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),i=this.session.getBracketRange(t);if(!i){if(i=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}}),!i)return;var n=i.start;n.row==t.row&&Math.abs(n.column-t.column)<2&&(i=this.session.getBracketRange(n))}n=i&&i.cursor||n,n&&(e?i&&i.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(n.row,n.column):this.selection.moveTo(n.row,n.column))},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=fLine truncated
var w=[];s?(F=C.documentToScreenPosition(h.lead),A()):h.moveToPosition(u);var E=function(e){clearInterval(b),l.removeSelectionMarkers(w);for(var t=0;t<w.length;t++)h.addRange(w[t])},B=A;o.capture(l.container,p,E);var b=setInterval(function(){B()},20);return e.preventDefault()}}else{if(!c&&g)return;if(!c){var y=h.toOrientedRange();l.addSelectionMarker(y)}var D=h.rangeList.rangeAtPoint(u);l.$blockScrolling++,l.once("mouseup",function(){var e=h.toOrientedRange();D&&e.isEmpty()&&n(D.cursor,e.cursor)?h.substractPoint(e.cursor):(y&&(l.removeSelectionMarker(y),h.addRange(y)),h.addRange(e)),l.$blockScrolling--})}}var o=e("../lib/event");t.onMouseDown=s}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,i){var n=e("./oop"),s=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}},t,i;for(i in e.FUNCTION_KEYS)t=e.FUNCTION_KEYS[i].toLowerCase(),e[t]=parseInt(i,10);for(i in e.PRINTABLE_KEYS)t=e.PRINTABLE_KEYS[i].toLowerCase(),e[t]=parseInt(i,10);return n.mixin(e,e.MODIFIER_KEYS),n.mixin(e,e.PRINTABLE_KEYS),n.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],i=Math.pow(2,t.length);i--;)e.KEY_MODS[i]=t.filter(function(t){return i&e.KEY_MODS[t]}).join("-")+"-"}(),e}();n.mixin(t,s),t.keyCodeToString=function(e){var t=s[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},readonly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){function n(e,t,i){var n=r(t);if(!o.isMac&&a){if((a[91]||a[92])&&(n|=8),a.altGr){if(3==(3&n))return;a.altGr=0}if(18===i||17===i){var h=t.location||t.keyLocation;if(17===i&&1===h)l=t.timeStamp;else if(18===i&&3===n&&2===h){var c=-l;l=t.timeStamp,c+=l,3>c&&(a.altGr=!0)}}}if(i in s.MODIFIER_KEYS){switch(s.MODIFIER_KEYS[i]){case"Alt":n=2;break;case"Shift":n=4;break;case"Ctrl":n=1;break;default:n=8}i=-1}if(8&n&&(91===i||93===i)&&(i=-1),n||13!==i||!t.location&&3!==t.keyLocation||(e(t,n,-i),!t.defaultPrevented)){if(o.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return n||i in s.FUNCTION_KEYS||i in s.PRINTABLE_KEYS?e(t,n,i):!1}}var s=e("./keys"),o=e("./Line truncated
},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=void 0),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var s=1/0,o=0;o<i.length;o++){var r=i[o];r._inDocument||(r._inDocument=!0,t.container.appendChild(r.el)),r.h=r.el.offsetHeight,r.fixedWidth||(r.w=r.el.offsetWidth,r.screenWidth=Math.ceil(r.w/n.characterWidth));var a=r.h/n.lineHeight;r.coverLine&&(a-=this.session.getRowLineCount(r.row),0>a&&(a=0)),r.rowCount!=a&&(r.rowCount=a,r.row<s&&(s=r.row))}1/0!=s&&(this.session._emit("changeFold",{data:{start:{row:s}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var s=Math.min(this.firstRow,i.firstRow),o=Math.max(this.lastRow,i.lastRow,n.length);s>0&&!n[s];)s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;o>=r;r++){var a=n[r];if(a&&a.el){a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var h=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(h-=t.scrollLeft),a.el.style.left=h+"px",a.el.style.right=a.fixedWidth?t.scrollBar.getWidth()+"px":""}}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,r=e("./anchor").Anchor,a=function(e){this.$lines=[],0===e.length?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){n.implement(this,s),this.setValue=function(e){var t=this.getLength();this.remove(new o(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new r(this,e,t)},this.$split=0==="aaa".split(/a/).length?function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;return e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||0===t.length)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var i=this.$split(t),n=i.splice(0,1)[0],s=0==i.length?null:i.splice(i.length-1,1)[0];return e=this.insertInLine(e,n),null!==s&&(e=this.insertNewLine(e),e=this._insertLines(e.row,i),e=this.insertInLine(e,s||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(0==t.length)return{row:e,column:0};for(;t.length>61440;){var i=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=i.row}var n=[e,0];n.push.apply(n,t),this.$lines.splice.apply(this.$lines,n);var s=new o(e,0,e+t.length,0),r={action:"insertLines",range:s,lines:t};return this._signal("change",{data:r}),s.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var i={row:e.row+1,column:0},n={action:"insertText",range:o.fromPoints(e,i),text:this.getNewLineCharacter()};return this._signal(Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,a){var p=e("ace/token_iterator").TokenIterator,n=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new p(e,0,0),a=t.getCurrentToken(),r=e.$modeId.split("/").pop(),o=n(t,r);e.doc.setValue(o)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,a){var p=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:"<?php"},{type:"support.php_tag",value:"<?"},{type:"support.php_tag",value:"?>"},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"</",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,a,p){for(var n=e.getCurrentToken(),r=t.newLines,o=t.spaces,u=t.singleTags,l="",i=0,y=!1,d,s,v={},c,f={},k=!1,m="";null!==n;)if(console.log(n),n)if("support.php_tag"==n.type&&"?>"!=n.value?p="php":"support.php_tag"==n.type&&"?>"==n.value?p="html":"meta.tag.name.style"==n.type&&"css"!=p?p="css":"meta.tag.name.style"==n.type&&"css"==p?p="html":"meta.tag.name.script"==n.type&&"js"!=p?p="js":"meta.tag.name.script"==n.type&&"js"==p&&(p="html"),f=e.stepForward(),f&&0==f.type.indexOf("meta.tag.name")&&(c=f.value),"support.php_tag"==v.type&&"<?="==v.value&&(y=!0),"meta.tag.name"==n.type&&(n.value=n.value.toLowerCase()),"text"==n.type&&(n.value=n.value.trim()),n.value){m=n.value;for(var g in o)n.type==o[g].type&&(!o[g].value||n.value==o[g].value)&&f&&(!o[g].next||o[g].next.test(f.value))&&(o[g].prepend&&(m=" "+n.value),o[g].append&&(m+=" "));0==n.type.indexOf("meta.tag.name")&&(d=n.value),k=!1;for(g in r)if(!(n.type!=r[g].type||r[g].value&&n.value!=r[g].value||r[g].blockTag&&-1!==u.indexOf(c)||r[g].context&&r[g].context!==p)){if(r[g].indent===!1&&i--,r[g].breakBefore&&(!r[g].prev||r[g].prev.test(v.value)))for(l+="\n",k=!0,g=0;i>g;g++)l+=" ";break}if(y===!1)for(g in r)if(!(v.type!=r[g].type||r[g].value&&v.value!=r[g].value||r[g].blockTag&&-1!==u.indexOf(d)||r[g].context&&r[g].context!==p)){if(r[g].indent===!0&&i++,!r[g].dontBreak&&!k)for(l+="\n",g=0;i>g;g++)l+=" ";break}if(l+=m,"support.php_tag"==v.type&&"?>"==v.value&&(y=!1),s=d,v=n,n=f,null===n)break}else n=f;else n=e.stepForward();return l}}),function(){ace.require(["ace/ext/beautify"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"],function(e,o,n){function t(){return"undefined"!=typeof cvox&&cvox&&cvox.Api}function r(e){if(t())So(e);else{if(Eo++,Eo>=ko)return;window.setTimeout(r,500,e)}}var c={};c.SpeechProperty,c.Cursor,c.Token,c.Annotation;var i={rate:.8,pitch:.4,volume:.9},a={rate:1,pitch:.5,volume:.9},u={rate:.8,pitch:.8,volume:.9},s={rate:.8,pitch:.3,volume:.9},p={rate:.8,pitch:.7,volume:.9},d={rate:.8,pitch:.8,volume:.9},l={punctuationEcho:"none",relativePitch:-.6},f="ALERT_NONMODAL",v="ALERT_MODAL",m="INVALID_KEYPRESS",g="insertMode",A="start",h=[{substr:";",newSubstr:" semicolon "},{substr:":",newSubstr:" colon "}],S={SPEAK_ANNOT:"annots",SPEAK_ALL_ANNOTS:"all_annots",TOGGLE_LOCATION:"toggle_location",SPEAK_MODE:"mode",SPEAK_ROW_COL:"row_col",TOGGLE_DISPLACEMENT:"toggle_displacement",FOCUS_TEXT:"focus_text"},E="CONTROL + SHIFT ";c.editor=null;var k=null,x={},y=!1,w=!1,T=!1,C=null,b={},O={},_=function(e){return E+String.fromCharCode(e)},L=function(){var e=c.editor.keyBinding.getKeyboardHandler();return"ace/keyboard/vim"===e.$id},N=function(e){return c.editor.getSession().getTokenAt(e.row,e.column+1)},K=function(e){return c.editor.getSession().getLine(e.row)},P=function(e){x[e.row]&&cvox.Api.playEarcon(f),y?(cvox.Api.stop(),V(e),X(N(e)),q(e.row,1)):q(e.row,0)},I=function(e){var o=K(e),n=o.substr(e.column-1);0===e.column&&(n=" "+o);var t=/^\W(\w+)/,r=t.exec(n);return null!==r},M={constant:{prop:i},entity:{prop:u},keyword:{prop:s},storage:{prop:p},variable:{prop:d},meta:{prop:a,replace:[{substr:"</",newSubstr:" closing tag "},{substr:"/>",newSubstr:" close tag "},{substr:"<",newSubstr:" tag start "},{substr:">",newSubstr:" tag end "}]}},D={prop:D},G=function(e,o){for(var n=e,t=0;t<o.length;t++){var r=o[t],c=new RegExp(r.substr,"g");n=n.replace(c,r.newSubstr)}return n},R=function(e,o,n){var t={};t.value="",t.type=e[o].type;for(var r=o;n>r;r++)t.value+=e[r].value;return t},B=function(e){if(e.length<=1)return e;for(var o=[],n=0,t=1;t<e.length;t++){var r=e[n],c=e[t];H(r)!==H(c)&&(o.push(R(e,n,t)),n=t)}return o.push(R(e,n,e.length)),o},F=function(e){var o=c.editor.getSession().getLine(e),n=/^\s*$/;return null!==n.exec(o)},q=function(e,o){var n=c.editor.getSession().getTokens(e);if(0===n.length||F(e))return void cvox.Api.playEarcon("EDITABLE_TEXT");n=B(n);var t=n[0];n=n.filter(function(e){return e!==t}),U(t,o),n.forEach(X)},W=function(e){U(e,0)},X=function(e){U(e,1)},H=function(e){if(e&&e.type){var o=e.type.split(".");if(0!==o.length){var n=o[0],t=M[n];return t?t:D}}},U=function(e,o){var n=H(e),t=G(e.value,h);n.replace&&(t=G(t,n.replace)),cvox.Api.speak(t,o,n.prop)},V=function(e){var o=K(e);cvox.Api.speak(o[e.column],1)},J=function(e,o){var n=K(o),t=n.substring(e.column,o.column);t=t.replace(/ /g," space "),cvox.Api.speak(t)},Y=function(e,o){if(1!==Math.abs(e.column-o.column)){var n=K(o).length;if(0===o.column||o.column===n)return void q(o.row,0);if(I(o))return cvox.Api.stop(),void X(N(o))}V(o)},$=function(e,o){c.editor.selection.isEmpty()?w?J(e,o):Y(e,o):(J(e,o),cvox.Api.speak("selected",1))},j=function(e){if(T)return void(T=!1);var o=c.editor.selection.getCursor();o.row!==k.row?P(o):$(k,o),k=o},z=function(e){c.editor.selection.isEmpty()&&cvox.Api.speak("unselected")},Q=function(e){var o=e.data;switch(o.action){case"removeText":cvox.Api.speak(o.text,0,l),T=!0;break;case"insertText":cvox.Api.speak(o.text,0),T=!0}},Z=function(e){var o=e.row,n=e.column;return!x[o]||!x[o][n]},eo=function(e){x={};for(var o=0;o<e.length;o++){var n=e[o],t=n.row,r=n.column;x[t]||(x[t]={}),x[t][r]=n}},oo=function(e){var o=c.editor.getSession().getAnnotations(),n=o.filter(Z);n.length>0&&cvox.Api.playEarcon(f),eo(o)},no=function(e){var o=e.type+" "+e.text+" on "+ro(e.row,e.column);o=o.replace(";","semicolon"),cvox.Api.speak(o,1)},to=function(e){var o=x[e];for(var n in o)no(o[n])},ro=function(e,o){return"row "+(e+1)+" column "+(o+1)},co=function(){cvox.Api.speak(ro(k.row,k.column))},io=function(){for(var e in x)to(e)},ao=function(){if(L())switch(c.editor.keyBinding.$data.state){case g:cvox.Api.speak("Insert mode");break;case A:cvox.Api.speak("Command mode")}},uo=function(){y=!y,cvox.Api.speak(y?"Speak location on row change enabled.":"Speak location on row change disabled.")},so=function(){w=!w,cvox.Api.speak(w?"Speak displacement on column changes.":"Speak current character or word on column changes.")},po=function(e){if(e.ctrlKey&&e.shiftKey){var o=b[e.keyCode];o&&o.func()}},lo=function(e,o){if(L()){var n=o.keyBinding.$data.state;if(n!==C){switch(n){case g:cvox.Api.playEarcon(v),cvox.Api.setKeyEcho(!0);break;case A:cvox.Api.playEarcon(v),cvox.Api.setKeyEcho(!1)}C=n}}},fo=function(e){var o=e.detail.customCommand,n=O[o];n&&(n.func(),c.editor.focus())},vo=function(){var e=Ao.map(function(e){return{desc:e.desc+_(e.keyCode),cmd:e.cmd}}),o=document.querySelector("body");o.setAttribute("contextMenuActions",JSON.stringify(e)),o.addEventListener("ATCustomEvent",fo,!0)},mo=function(e)Line truncated
@@ -0,0 +1 @@
ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(t,e,s){var i=function(t){this.$editor=t;var e=this,s=[],i=!1;this.onAfterExec=function(){i=!1,e.processRows(s),s=[]},this.onExec=function(){i=!0},this.onChange=function(t){var e=t.data.range;i&&(-1==s.indexOf(e.start.row)&&s.push(e.start.row),e.end.row!=e.start.row&&s.push(e.end.row))}};(function(){this.processRows=function(t){this.$inChange=!0;for(var e=[],s=0,i=t.length;i>s;s++){var o=t[s];if(!(e.indexOf(o)>-1))for(var n=this.$findCellWidthsForBlock(o),r=this.$setBlockCellWidthsToMax(n.cellWidths),h=n.firstRow,a=0,c=r.length;c>a;a++){var l=r[a];e.push(h),this.$adjustRow(h,l),h++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(t){for(var e=[],s,i=t;i>=0&&(s=this.$cellWidthsForRow(i),0!=s.length);)e.unshift(s),i--;var o=i+1;i=t;for(var n=this.$editor.session.getLength();n-1>i&&(i++,s=this.$cellWidthsForRow(i),0!=s.length);)e.push(s);return{cellWidths:e,firstRow:o}},this.$cellWidthsForRow=function(t){for(var e=this.$selectionColumnsForRow(t),s=[-1].concat(this.$tabsForRow(t)),i=s.map(function(t){return 0}).slice(1),o=this.$editor.session.getLine(t),n=0,r=s.length-1;r>n;n++){var h=s[n]+1,a=s[n+1],c=this.$rightmostSelectionInCell(e,a),l=o.substring(h,a);i[n]=Math.max(l.replace(/\s+$/g,"").length,c-h)}return i},this.$selectionColumnsForRow=function(t){var e=[],s=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&t==s.row&&e.push(s.column),e},this.$setBlockCellWidthsToMax=function(t){for(var e=!0,s,i,o,n=this.$izip_longest(t),r=0,h=n.length;h>r;r++){var a=n[r];if(a.push){a.push(0/0);for(var c=0,l=a.length;l>c;c++){var u=a[c];if(e&&(s=c,o=0,e=!1),isNaN(u)){i=c;for(var f=s;i>f;f++)t[f][r]=o;e=!0}o=Math.max(o,u)}}else console.error(a)}return t},this.$rightmostSelectionInCell=function(t,e){var s=0;if(t.length){for(var i=[],o=0,n=t.length;n>o;o++)i.push(t[o]<=e?o:0);s=Math.max.apply(Math,i)}return s},this.$tabsForRow=function(t){for(var e=[],s=this.$editor.session.getLine(t),i=/\t/g,o;null!=(o=i.exec(s));)e.push(o.index);return e},this.$adjustRow=function(t,e){var s=this.$tabsForRow(t);if(0!=s.length)for(var i=0,o=-1,n=this.$izip(e,s),r=0,h=n.length;h>r;r++){var a=n[r][0],c=n[r][1];o+=1+a,c+=i;var l=o-c;if(0!=l){var u=this.$editor.session.getLine(t).substr(0,c),f=u.replace(/\s*$/g,""),g=u.length-f.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:t,column:c+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(t,c,c+1),i+=l),0>l&&g>=-l&&(this.$editor.session.getDocument().removeInLine(t,c+l,c),i+=l)}}},this.$izip_longest=function(t){if(!t[0])return[];for(var e=t[0].length,s=t.length,i=1;s>i;i++){var o=t[i].length;o>e&&(e=o)}for(var n=[],r=0;e>r;r++){for(var h=[],i=0;s>i;i++)h.push(""===t[i][r]?0/0:t[i][r]);n.push(h)}return n},this.$izip=function(t,e){for(var s=t.length>=e.length?e.length:t.length,i=[],o=0;s>o;o++){var n=[t[o],e[o]];i.push(n)}return i}}).call(i.prototype),e.ElasticTabstopsLite=i;var o=t("../editor").Editor;t("../config").defineOptions(o.prototype,"editor",{useElasticTabstops:{set:function(t){t?(this.elasticTabstops||(this.elasticTabstops=new i(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}),function(){ace.require(["ace/ext/elastic_tabstops_lite"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config"],function(e,t,n){function i(){}var r=e("ace/keyboard/hash_handler").HashHandler,s=e("ace/editor").Editor,a=e("ace/snippets").snippetManager,o=e("ace/range").Range,c;s.prototype.indexToPosition=function(e){return this.session.doc.indexToPosition(e)},s.prototype.positionToIndex=function(e){return this.session.doc.positionToIndex(e)},i.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),c||(c=window.emmet),c.require("resources").setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange();return{start:this.ace.positionToIndex(e.start),end:this.ace.positionToIndex(e.end)}},createSelection:function(e,t){this.ace.selection.setRange({start:this.ace.indexToPosition(e),end:this.ace.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace.getCursorPosition().row,t=this.ace.session.getLine(e).length,n=this.ace.positionToIndex({row:e,column:0});return{start:n,end:n+t}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,i){null==n&&(n=null==t?this.getContent().length:t),null==t&&(t=0);var r=this.ace,s=o.fromPoints(r.indexToPosition(t),r.indexToPosition(n));r.session.remove(s),s.end=s.start,e=this.$updateTabstops(e),a.insertSnippet(r,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if("html"==e||"php"==e){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);"string"!=typeof n&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:"php"==e&&(e="html"))}return e},getProfileName:function(){switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var e=c.require("resources").getVariable("profile");return e||(e=-1!=this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i)?"xhtml":"html"),e}return"xhtml"},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,n=0,i=null,r=c.require("range"),s=c.require("tabStops"),a=c.require("resources").getVocabulary("user"),o={tabstop:function(e){var a=parseInt(e.group,10),c=0===a;c?a=++n:a+=t;var h=e.placeholder;h&&(h=s.processText(h,o));var p="${"+a+(h?":"+h:"")+"}";return c&&(i=r.create(e.start,p)),p},escape:function(e){return"$"==e?"\\$":"\\"==e?"\\\\":e}};return e=s.processText(e,o),a.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e)?e+="${0}":i&&(e=c.require("utils").replaceSubstring(e,"${0}",i)),e}};var h={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},p=new i;t.commands=new r,t.runEmmetCommand=function(e){if(p.setupContext(e),"php"==p.getSyntax())return!1;var t=c.require("actions");if("expand_abbreviation_with_tab"==this.action&&!e.selection.isEmpty())return!1;if("wrap_with_abbreviation"==this.action)return setTimeout(function(){t.run("wrap_with_abbreviation",p)},0);try{var n=t.run(this.action,p)}catch(i){e._signal("changeStatus","string"==typeof i?i:i.message),console.log(i),n=!1}return n};for(var l in h)t.commands.addCommand({name:"emmet:"+l,action:l,bindKey:h[l],exec:t.runEmmetCommand,multiSelectAction:"forEach"});var u=function(e,n){var i=n;if(i){var r=i.session.$modeId,s=r&&/css|less|scss|sass|stylus|html|php/.test(r);e.enableEmmet===!1&&(s=!1),s?i.keyBinding.addKeyboardHandler(t.commands):i.keyBinding.removeKeyboardHandler(t.commands)}};t.AceEmmetEditor=i,e("ace/config").defineOptions(s.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on"Line truncated
+1
View File
@@ -0,0 +1 @@
!function(){ace.require(["ace/ext/error_marker"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,o,t){function n(o){if(!document.getElementById("kbshortcutmenu")){var t=e("./menu_tools/overlay_page").overlayPage,n=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,r=n(o),a=document.createElement("div"),i=r.reduce(function(e,o){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+o.command+'</span> : <span class="ace_optionsMenuKey">'+o.key+"</span></div>"},"");a.id="kbshortcutmenu",a.innerHTML="<h1>Keyboard Shortcuts</h1>"+i+"</div>",t(o,a,"0","0","0",null)}}var r=e("ace/editor").Editor;t.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){n(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,o){e.showKeyboardShortcuts()}}])}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,o,t){var n=e("../../lib/dom"),r="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";n.importCssString(r),t.exports.overlayPage=function(e,o,t,r,a,i){function c(e){27===e.keyCode&&d.click()}t=t?"top: "+t+";":"",a=a?"bottom: "+a+";":"",r=r?"right: "+r+";":"",i=i?"left: "+i+";":"";var d=document.createElement("div"),s=document.createElement("div");d.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",d.addEventListener("click",function(){document.removeEventListener("keydown",c),d.parentNode.removeChild(d),e.focus(),d=null}),document.addEventListener("keydown",c),s.style.cssText=t+r+a+i,s.addEventListener("click",function(e){e.stopPropagation()});var u=n.createElement("div");u.style.position="relative";var l=n.createElement("div");l.className="ace_closeButton",l.addEventListener("click",function(){d.click()}),u.appendChild(l),s.appendChild(u),s.appendChild(o),d.appendChild(s),document.body.appendChild(d),e.blur()}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,o,t){var n=e("../../lib/keys");t.exports.getEditorKeybordShortcuts=function(e){var o=n.KEY_MODS,t=[],r={};return e.keyBinding.$handlers.forEach(function(e){var n=e.commandKeyBinding;for(var a in n){var i=parseInt(a);i=-1==i?"":isNaN(i)?a:""+(i&o.command?"Cmd-":"")+(i&o.ctrl?"Ctrl-":"")+(i&o.alt?"Alt-":"")+(i&o.shift?"Shift-":"");for(var c in n[a]){var d=n[a][c];"string"!=typeof d&&(d=d.name),r[d]?r[d].key+="|"+i+c:(r[d]={key:i+c,command:d},t.push(r[d]))}}}),t}}),function(){ace.require(["ace/ext/keybinding_menu"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor"],function(e,t,n){var i=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,r=e("../config"),s=e("../autocomplete/util"),a=e("../autocomplete/text_completer"),c={getCompletions:function(e,t,n,i,o){var r=e.session.getState(n.row),s=t.$mode.getCompletions(r,t,n,i);o(null,s)}},h={getCompletions:function(e,t,n,o,r){var s=i.snippetMap,a=[];i.getActiveScopes(e).forEach(function(e){for(var t=s[e]||[],n=t.length;n--;){var i=t[n],o=i.name||i.tabTrigger;o&&a.push({caption:o,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet"})}},this),r(null,a)}},l=[h,a,c];t.addCompleter=function(e){l.push(e)},t.textCompleter=a,t.keyWordCompleter=c,t.snippetCompleter=h;var p={name:"expandSnippet",exec:function(e){var t=i.expandWithTab(e);t||e.execCommand("indent")},bindKey:"Tab"},u=function(e,t){d(t.session.$mode)},d=function(e){var t=e.$id;i.files||(i.files={}),g(t),e.modes&&e.modes.forEach(d)},g=function(e){if(e&&!i.files[e]){var t=e.replace("mode","snippets");i.files[e]={},r.loadModule(t,function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,n=e.args||"",i=t.getCursorPosition(),r=t.session.getLine(i.row),a=t.completer&&t.completer.activated,c=s.retrievePrecedingIdentifier(r,i.column);l.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){c||(c=s.retrievePrecedingIdentifier(r,i.column,e))})}),"backspace"!==e.command.name||c?"insertstring"===e.command.name&&(c&&!a?(t.completer||(t.completer=new o,t.completer.autoSelect=!1,t.completer.autoInsert=!1),t.completer.showPopup(t)):!c&&a&&t.completer.detach()):a&&t.completer.detach()},m=e("../editor").Editor;e("../config").defineOptions(m.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers=Array.isArray(e)?e:l,this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers=Array.isArray(e)?e:l,this.commands.on("afterExec",f)):this.commands.removeListener("afterExec",f)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",u),u(null,this)):(this.commands.removeCommand(p),this.off("changeMode",u))},value:!1}})}),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,a=e("./anchor").Anchor,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,l=s.comparePoints,p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,o),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return p.$tokenizer=new h({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:n.inFormatString&&("n"==i?e="\n":"t"==i?e="\n":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var o=e(t.substr(1),n,i);return i.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var i=n[0];return i.fmtString=e,e=this.splitRegex.exec(e),i.guard=e[1],i.fmt=e[2],i.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),p.prototype.getTokenizer=function(){return p.$tokenizer},p.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,o,i){function t(e){var o=e.editor,i=e.getAccelKey();if(i){var o=e.editor,t=e.getDocumentPosition(),n=o.session,c=n.getTokenAt(t.row,t.column);o._emit("linkHover",{position:t,token:c})}}function n(e){var o=e.getAccelKey(),i=e.getButton();if(0==i&&o){var t=e.editor,n=e.getDocumentPosition(),c=t.session,r=c.getTokenAt(n.row,n.column);t._emit("linkClick",{position:n,token:r})}}var c=e("ace/editor").Editor;e("../config").defineOptions(c.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",n),this.on("mousemove",t)):(this.off("click",n),this.off("mousemove",t))},value:!1}})}),function(){ace.require(["ace/ext/linking"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/modelist",["require","exports","module"],function(e,s,t){function a(e){for(var s=c.text,t=e.split(/[\/\\]/).pop(),a=0;a<l.length;a++)if(l[a].supportsFile(t)){s=l[a];break}return s}var l=[],r=function(e,s,t){if(this.name=e,this.caption=s,this.mode="ace/mode/"+e,this.extensions=t,/\^/.test(t))var a=t.replace(/\|(\^)?/g,function(e,s){return"$|"+(s?"^":"^.*\\.")})+"$";else var a="^.*\\.("+t+")$";this.extRe=new RegExp(a,"gi")};r.prototype.supportsFile=function(e){return e.match(this.extRe)};var i={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Erlang:["erl|hrl"],EJS:["ejs"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gherkin:["feature"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],MATLAB:["matlab"],Markdown:["md|markdown"],MEL:["mel"],MySQL:["mysql"],MUSHCode:["mc|mush"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Smarty:["smarty|tpl"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Space:["space"],snippets:["snippets"],Soy_Template:["soy"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},o={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C/C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},c={};for(var p in i){var m=i[p],h=(o[p]||p).replace(/_/g," "),f=p.toLowerCase(),u=new r(f,h,m[0]);c[f]=u,l.push(u)}t.exports={getModeForPath:a,modes:l,modesByName:c}}),function(){ace.require(["ace/ext/modelist"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"],function(require,exports,module){function patch(obj,name,regexp,replacement){eval("obj['"+name+"']="+obj[name].toString().replace(regexp,replacement))}var MAX_TOKEN_COUNT=1e3,useragent=require("../lib/useragent"),TokenizerModule=require("../tokenizer");if(useragent.isIE&&useragent.isIE<10&&"BackCompat"===window.top.document.compatMode&&(useragent.isOldIE=!0),"undefined"!=typeof document&&!document.documentElement.querySelector){useragent.isOldIE=!0;var qs=function(e,t){if("."==t.charAt(0))var i=t.slice(1);else var n=t.match(/(\w+)=(\w+)/),o=n&&n[1],r=n&&n[2];for(var a=0;a<e.all.length;a++){var c=e.all[a];if(i){if(-1!=c.className.indexOf(i))return c}else if(o&&c.getAttribute(o)==r)return c}},sb=require("./searchbox").SearchBox.prototype;patch(sb,"$initElements",/([^\s=]*).querySelector\((".*?")\)/g,"qs($1, $2)")}var compliantExecNpcg=void 0===/()??/.exec("")[1];if(!compliantExecNpcg){var proto=TokenizerModule.Tokenizer.prototype;TokenizerModule.Tokenizer_orig=TokenizerModule.Tokenizer,proto.getLineTokens_orig=proto.getLineTokens,patch(TokenizerModule,"Tokenizer","ruleRegExps.push(adjustedregex);\n",function(e){return e+' if (state[i].next && RegExp(adjustedregex).test(""))\n rule._qre = RegExp(adjustedregex, "g");\n '}),TokenizerModule.Tokenizer.prototype=proto,patch(proto,"getLineTokens",/if \(match\[i \+ 1\] === undefined\)\s*continue;/,"if (!match[i + 1]) {\n if (value)continue;\n var qre = state[mapping[i]]._qre;\n if (!qre) continue;\n qre.lastIndex = lastIndex;\n if (!qre.exec(line) || qre.lastIndex != lastIndex)\n continue;\n }"),patch(require("../mode/text").Mode.prototype,"getTokenizer",/Tokenizer/,"TokenizerModule.Tokenizer"),useragent.isOldIE=!0}}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){var n=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/event"),a="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;ovLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/prompt",["require","exports","module","ace/lib/lang","ace/lib/dom","ace/lib/event","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/editor","ace/multi_select"],function(e,n,t){function i(e,n){var t=this.pixelToScreenCoordinates(e,n);return this.session.screenToDocumentPosition(Math.min(this.session.getScreenLength()-1,Math.max(t.row,0)),Math.max(t.column,0))}var a=e("../lib/lang"),r=e("ace/lib/dom"),o=e("ace/lib/event"),s=e("ace/edit_session").EditSession,c=e("ace/undomanager").UndoManager,l=e("ace/virtual_renderer").VirtualRenderer,u=e("ace/editor").Editor,d=e("ace/multi_select").MultiSelect;n.singleLineEditor=function(e){var n=new l;n.container.style.overflow="hidden",n.screenToTextCoordinates=i,n.setStyle("ace_one-line");var t=new u(n);return t.session.setUndoManager(new c),t.setOptions({showPrintMargin:!1,showGutter:!1,highlightGutterLine:!1,focusWaitTimout:0,maxLines:4}),t}}),function(){ace.require(["ace/ext/prompt"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){var n=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/event"),c="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing: border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",r=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys");n.importCssString(c,"ace_searchbox");var l='<div class="ace_search right"> <button type="button" action="hide" class="ace_searchbtn_close"></button> <div class="ace_search_form"> <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input> <button type="button" action="findNext" class="ace_searchbtn next"></button> <button type="button" action="findPrev" class="ace_searchbtn prev"></button> </div> <div class="ace_replace_form"> <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input> <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button> <button type="button" action="replaceAll" class="ace_replacebtn">All</button> </div> <div class="ace_search_options"> <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span> <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span> <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span> </div></div>'.replace(/>\s+/g,">"),h=function(e,t,i){var o=n.createElement("div");o.innerHTML=l,this.element=o.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editorLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"],function(e,t,r){function o(e){var t=document.getElementById("ace_settingsmenu");t||a(e,n(e),"0","0","0")}var n=e("./menu_tools/generate_settings_menu").generateSettingsMenu,a=e("./menu_tools/overlay_page").overlayPage;r.exports.init=function(t){var r=e("ace/editor").Editor;r.prototype.showSettingsMenu=function(){o(this)}}}),ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"],function(e,t,r){var o=e("./element_generator"),n=e("./add_editor_menu_options").addEditorMenuOptions,a=e("./get_set_functions").getSetFunctions;r.exports.generateSettingsMenu=function(e){function t(){l.sort(function(e,t){var r=e.getAttribute("contains"),o=t.getAttribute("contains");return r.localeCompare(o)})}function r(){var e=document.createElement("div");return e.setAttribute("id","ace_settingsmenu"),l.forEach(function(t){e.appendChild(t)}),e}function i(t,r,n,a){var i,s=document.createElement("div");return s.setAttribute("contains",n),s.setAttribute("class","ace_optionsMenuEntry"),s.setAttribute("style","clear: both;"),s.appendChild(o.createLabel(n.replace(/^set/,"").replace(/([A-Z])/g," $1").trim(),n)),Array.isArray(a)?(i=o.createSelection(n,a,r),i.addEventListener("change",function(r){try{e.menuOptions[r.target.id].forEach(function(e){e.textContent!==r.target.textContent&&delete e.selected}),t[r.target.id](r.target.value)}catch(o){throw new Error(o)}})):"boolean"==typeof a?(i=o.createCheckbox(n,a,r),i.addEventListener("change",function(e){try{t[e.target.id](!!e.target.checked)}catch(r){throw new Error(r)}})):(i=o.createInput(n,a,r),i.addEventListener("change",function(e){try{t[e.target.id]("true"===e.target.value?!0:"false"===e.target.value?!1:e.target.value)}catch(r){throw new Error(r)}})),i.style.cssText="float:right;",s.appendChild(i),s}function s(t,r,o,n){var a=e.menuOptions[t],s=r[n]();return"object"==typeof s&&(s=s.$id),a.forEach(function(e){e.value===s&&(e.selected="selected")}),i(r,o,t,a)}function c(t){var r=t.functionName,o=t.parentObj,n=t.parentName,a,c=r.replace(/^set/,"get");if(void 0!==e.menuOptions[r])l.push(s(r,o,n,c));else if("function"==typeof o[c])try{a=o[c](),"object"==typeof a&&(a=a.$id),l.push(i(o,n,r,a))}catch(u){}}var l=[];return n(e),a(e).forEach(function(e){c(e)}),t(),r()}}),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,r){r.exports.createOption=function(e){var t,r=document.createElement("option");for(t in e)e.hasOwnProperty(t)&&("selected"===t?r.setAttribute(t,e[t]):r[t]=e[t]);return r},r.exports.createCheckbox=function(e,t,r){var o=document.createElement("input");return o.setAttribute("type","checkbox"),o.setAttribute("id",e),o.setAttribute("name",e),o.setAttribute("value",t),o.setAttribute("class",r),t&&o.setAttribute("checked","checked"),o},r.exports.createInput=function(e,t,r){var o=document.createElement("input");return o.setAttribute("type","text"),o.setAttribute("id",e),o.setAttribute("name",e),o.setAttribute("value",t),o.setAttribute("class",r),o},r.exports.createLabel=function(e,t){var r=document.createElement("label");return r.setAttribute("for",t),r.textContent=e,r},r.exports.createSelection=function(e,t,o){var n=document.createElement("select");return n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("class",o),t.forEach(function(e){n.appendChild(r.exports.createOption(e))}),n}}),ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"],function(e,t,r){r.exports.addEditorMenuOptions=function(t){var r=e("../modelist"),o=e("../themelist");t.menuOptions={setNewLineMode:[{textContent:"unix",value:"unix"},{textContent:"windows",value:"windows"},{textContent:"auto",value:"auto"}],setTheme:[],setMode:[],setKeyboardHandler:[{textContent:"ace",value:""},{textContent:"vim",value:"ace/keyboard/vim"},{textContent:"emacs",value:"ace/keyboard/emacs"}]},t.menuOptions.setTheme=o.themes.map(function(e){return{textContent:e.caption,value:e.theme}}),t.menuOptions.setMode=r.modes.map(function(e){return{textContent:e.name,value:e.mode}})}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,r){function o(e){for(var t=c.text,r=e.split(/[\/\\]/).pop(),o=0;o<n.length;o++)if(n[o].supportsFile(r)){t=n[o];break}return t}var n=[],a=function(e,t,r){if(this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=r,/\^/.test(r))var o=r.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var o="^.*\\.("+r+")$";this.extRe=new RegExp(o,"gi")};a.prototype.supportsFile=function(e){return e.match(this.extRe)};var i={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){var i=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(t.selection.isEmpty()){var s=t.getCursorPosition(),o=t.session.getWordRange(s.row,s.column),c=t.session.getTextRange(o);if(t.session.tokenRe.lastIndex=0,t.session.tokenRe.test(c)){var r="",l=c+" "+r;n.value=l,n.setSelectionRange(c.length,c.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,c.length);var a=!1;i.addListener(n,"keydown",function u(){i.removeListener(n,"keydown",u),a=!0}),t.textInput.setInputHandler(function(e){if(console.log(e,l,n.selectionStart,n.selectionEnd),e==l)return"";if(0===e.lastIndexOf(l,0))return e.slice(l.length);if(e.substr(n.selectionEnd)==l)return e.slice(0,-l.length);if(e.slice(-2)==r){var i=e.slice(0,-2);if(" "==i.slice(-1))return a?i.substring(0,n.selectionEnd):(i=i.slice(0,-1),t.session.replace(o,i),"")}return e})}}};var s=e("../editor").Editor;e("../config").defineOptions(s.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/split",["require","exports","module","ace/split"],function(t,i,e){e.exports=t("../split")}),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(t,i,e){function s(t,i){this.$u=t,this.$doc=i}var n=t("./lib/oop"),o=t("./lib/lang"),r=t("./lib/event_emitter").EventEmitter,h=t("./editor").Editor,a=t("./virtual_renderer").VirtualRenderer,c=t("./edit_session").EditSession,l=function(t,i,e){this.BELOW=1,this.BESIDE=0,this.$container=t,this.$theme=i,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(e||1),this.$cEditor=this.$editors[0],this.on("focus",function(t){this.$cEditor=t}.bind(this))};(function(){n.implement(this,r),this.$createEditor=function(){var t=document.createElement("div");t.className=this.$editorCSS,t.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(t);var i=new h(new a(t,this.$theme));return i.on("focus",function(){this._emit("focus",i)}.bind(this)),this.$editors.push(i),i.setFontSize(this.$fontSize),i},this.setSplits=function(t){var i;if(1>t)throw"The number of splits have to be > 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<t;)i=this.$editors[this.$splits],this.$container.appendChild(i.container),i.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<t;)this.$createEditor(),this.$splits++}else for(;this.$splits>t;)i=this.$editors[this.$splits-1],this.$container.removeChild(i.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(i){i.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(i){i.setKeyboardHandler(t)})},this.forEach=function(t,i){this.$editors.forEach(t,i)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(i){i.setFontSize(t)})},this.$cloneSession=function(t){var i=new c(t.getDocument(),t.getMode()),e=t.getUndoManager();if(e){var n=new s(e,i);i.setUndoManager(n)}return i.$informUndoManager=o.delayedCall(function(){i.$deltas=[]}),i.setTabSize(t.getTabSize()),i.setUseSoftTabs(t.getUseSoftTabs()),i.setOverwrite(t.getOverwrite()),i.setBreakpoints(t.getBreakpoints()),i.setUseWrapMode(t.getUseWrapMode()),i.setUseWorker(t.getUseWorker()),i.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),i.$foldData=t.$cloneFoldData(),i},this.setSession=function(t,i){var e;e=null==i?this.$cEditor:this.$editors[i];var s=this.$editors.some(function(i){return i.session===t});return s&&(t=this.$cloneSession(t)),e.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t=this.$container.clientWidth,i=this.$container.clientHeight,e;if(this.$orientation==this.BESIDE)for(var s=t/this.$splits,n=0;n<this.$splits;n++)e=this.$editors[n],e.container.style.width=s+"px",e.container.style.top="0px",e.container.style.left=n*s+"px",e.container.style.height=i+"px",e.resize();else for(var o=i/this.$splits,n=0;n<this.$splits;n++)e=this.$editors[n],e.container.style.width=t+"px",e.container.style.top=n*o+"px",e.container.style.left="0px",e.container.style.height=o+"px",e.resize()}}).call(l.prototype),function(){this.execute=function(t){this.$u.execute(t)},this.undo=function(){var t=this.$u.undo(!0);t&&this.$doc.selection.setSelectionRange(t)},this.redo=function(){var t=this.$u.redo(!0);t&&this.$doc.selection.setSelectionRange(t)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(s.prototype),i.Split=l}),function(){ace.require(["ace/ext/split"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,i){var n=e("../edit_session").EditSession,s=e("../layer/text").Text,a=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;display: block;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",c=e("../config"),o=e("../lib/dom"),r=function(e,t,i){var n=e.className.match(/lang-(\w+)/),s=t.mode||n&&"ace/mode/"+n[1];if(!s)return!1;var a=t.theme||"ace/theme/textmate",c="",l=[];if(e.firstElementChild)for(var h=0,d=0;d<e.childNodes.length;d++){var g=e.childNodes[d];3==g.nodeType?(h+=g.data.length,c+=g.data):l.push(h,g)}else c=o.getInnerText(e),t.trim&&(c=c.trim());r.render(c,s,a,t.firstLineNumber,!t.showGutter,function(t){o.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;for(var n=e.firstChild.firstChild,s=0;s<l.length;s+=2){var a=t.session.doc.indexToPosition(l[s]),c=l[s+1],r=n.children[a.row];r&&r.appendChild(c)}i&&i()})};r.render=function(e,t,i,s,a,o){function l(){var n=r.renderSync(e,t,i,s,a);return o?o(n):n}var h=1,d=n.prototype.$modes;return"string"==typeof i&&(h++,c.loadModule(["theme",i],function(e){i=e,--h||l()})),"string"==typeof t&&(h++,c.loadModule(["mode",t],function(e){d[t]||(d[t]=new e.Mode),t=d[t],--h||l()})),--h||l()},r.renderSync=function(e,t,i,c,o){c=parseInt(c||1,10);var r=new n("");r.setUseWorker(!1),r.setMode(t);var l=new s(document.createElement("div"));l.setSession(r),l.config={characterWidth:10,lineHeight:20},r.setValue(e);for(var h=[],d=r.getLength(),g=0;d>g;g++)h.push("<div class='ace_line'>"),o||h.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),l.$renderLine(h,g,!0,!1),h.push("\n</div>");var u="<div class='"+i.cssClass+"'><div class='ace_static_highlight' style='counter-reset:ace_line "+(c-1)+"'>"+h.join("")+"</div></div>";return l.destroy(),{css:a+i.cssText,html:u,session:r}},i.exports=r,i.exports.highlight=r}),function(){ace.require(["ace/ext/static_highlight"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){var a=e("ace/lib/dom"),i=e("ace/lib/lang"),c=function(e,t){this.element=a.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function t(e,t){e&&n.push(e,t||"|")}var n=[];e.$vimModeHandler?t(e.$vimModeHandler.getStatusText()):e.commands.recording&&t("REC");var a=e.selection.lead;if(t(a.row+":"+a.column," "),!e.selection.isEmpty()){var i=e.getSelectionRange();t("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}n.pop(),this.element.textContent=n.join("")}}).call(c.prototype),t.StatusBar=c}),function(){ace.require(["ace/ext/statusbar"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate","ace/mode/text"],function(e,t,i){function n(e,t){for(var i in t)e.style[i]=t[i]}function o(e,t){if("textarea"!=e.type)throw new Error("Textarea required!");var i=e.parentNode,n=document.createElement("div"),o=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(i){t+=i+":"+p(e,n,i)+";"});var i=p(e,n,"width")||e.clientWidth+"px",o=p(e,n,"height")||e.clientHeight+"px";t+="height:"+o+";width:"+i+";",t+="display:inline-block;",n.setAttribute("style",t)};for(l.addListener(window,"resize",o),o(),i.insertBefore(n,e.nextSibling);i!==document;){if("FORM"===i.tagName.toUpperCase()){var r=i.onsubmit;i.onsubmit=function(i){e.value=t(),r&&r.call(this,i)};break}i=i.parentNode}return n}function r(t,i,n){u.loadScript(t,function(){e([i],n)})}function a(i,n,o,a,s,l){function c(e){return"true"===e||1==e}var u=i.getSession(),d=i.renderer;return l=l||r,i.setDisplaySettings=function(e){null==e&&(e="none"==o.style.display),e?(o.style.display="block",o.hideButton.focus(),i.on("focus",function t(){i.removeListener("focus",t),o.style.display="none"})):i.focus()},i.$setOption=i.setOption,i.setOption=function(t,o){if(s[t]!=o){switch(t){case"mode":"text"!=o?l("mode-"+o+".js","ace/mode/"+o,function(){var t=e("../mode/"+o).Mode;u.setMode(new t)}):u.setMode(new(e("../mode/text").Mode));break;case"theme":"textmate"!=o?l("theme-"+o+".js","ace/theme/"+o,function(){i.setTheme("ace/theme/"+o)}):i.setTheme("ace/theme/textmate");break;case"fontSize":n.style.fontSize=o;break;case"keybindings":switch(o){case"vim":i.setKeyboardHandler("ace/keyboard/vim");break;case"emacs":i.setKeyboardHandler("ace/keyboard/emacs");break;default:i.setKeyboardHandler(null)}break;case"softWrap":switch(o){case"off":u.setUseWrapMode(!1),d.setPrintMarginColumn(80);break;case"40":u.setUseWrapMode(!0),u.setWrapLimitRange(40,40),d.setPrintMarginColumn(40);break;case"80":u.setUseWrapMode(!0),u.setWrapLimitRange(80,80),d.setPrintMarginColumn(80);break;case"free":u.setUseWrapMode(!0),u.setWrapLimitRange(null,null),d.setPrintMarginColumn(80)}break;default:i.$setOption(t,c(o))}s[t]=o}},i.getOption=function(e){return s[e]},i.getOptions=function(){return s},i.setOptions(t.options),i}function s(e,t,i,n){function o(e,t,i,n){if(!i)return void e.push("<input type='checkbox' title='",t,"' ","true"==n?"checked='true'":"","'></input>");e.push("<select title='"+t+"'>");for(var o in i)e.push("<option value='"+o+"' "),n==o&&e.push(" selected "),e.push(">",i[o],"</option>");e.push("</select>")}var r=null,a={mode:"Mode:",gutter:"Display Gutter:",theme:"Theme:",fontSize:"Font Size:",softWrap:"Soft Wrap:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},s={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},gutter:r,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},softWrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:r,useSoftTabs:r,showInvisibles:r},c=[];c.push("<table><tr><th>Setting</th><th>Value</th></tr>");for(var u in n)c.push("<tr><td>",a[u],"</td>"),c.push("<td>"),o(c,u,s[u],n[u]),c.push("</td></tr>");c.push("</table>"),e.innerHTML=c.join("");for(var d=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},p=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},h=e.getElementsByTagName("select"),f=0;f<h.length;f++)h[f].onchange=d;for(var m=e.getElementsByTagName("input"),f=0;f<m.length;f++)m[f].onclick=p;var g=document.createElement("input");g.type="button",g.value="Hide",l.addListener(g,"click",function(){i.setDisplaySettings(!1)}),e.appendChild(g),e.hideButton=g}var l=e("../lib/event"),c=e("../lib/useragent"),u=e("../lib/net"),d=e("../ace");e("../theme/textmate"),i.exports=t=d;var p=function(e,t,i){var n=e.style[i];return n||(n=window.getComputedStyle?window.getComputedStyle(e,"").getPropertyValue(i):e.currentStyle[i]),n&&"auto"!=n&&"intrinsic"!=n||(n=t.style[i]),n};t.transformTextarea=function(e,t){var i,r=o(e,function(){return i.getValue()});e.style.display="none",r.style.background="Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(r,e,o){r("ace/lib/fixoldbrowsers");var a=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];e.themesByName={},e.themes=a.map(function(r){var o=r[1]||r[0].replace(/ /g,"_").toLowerCase(),a={caption:r[0],theme:"ace/theme/"+o,isDark:"dark"==r[2],name:o};return e.themesByName[o]=a,a})}),function(){ace.require(["ace/ext/themelist"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang");t.$detectIndentation=function(e,t){function n(e){for(var t=0,n=e;n<r.length;n+=e)t+=r[n]||0;return t}for(var r=[],a=[],i=0,s=0,c=Math.min(e.length,1e3),o=0;c>o;o++){var g=e[o];if(/^\s*[^*+\-\s]/.test(g)){var h=g.match(/^\t*/)[0].length;" "==g[0]&&i++;var l=g.match(/^ */)[0].length;if(l&&" "!=g[l]){var f=l-s;f>0&&!(s%f)&&!(l%f)&&(a[f]=(a[f]||0)+1),r[l]=(r[l]||0)+1}for(s=l;c>o&&"\\"==g[g.length-1];)g=e[o++]}}if(r.length){for(var v=a.reduce(function(e,t){return e+t},0),u={score:0,length:0},d=0,o=1;12>o;o++){if(1==o){d=n(o);var m=1}else var m=n(o)/d;a[o]&&(m+=a[o]/v),m>u.score&&(u={score:m,length:o})}if(u.score&&u.score>1.4)var p=u.length;return i>d+1?{ch:" ",length:p}:d+1>i?{ch:" ",length:p}:void 0}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(" "==r.ch),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){for(var n=e.getDocument(),r=n.getAllLines(),a=t?-1:0,i=0,s=r.length;s>i;i++){var c=r[i],o=c.search(/\s+$/);o>a&&n.removeInLine(i,o,c.length)}},t.convertIndentation=function(e,t,n){var a=e.getTabString()[0],i=e.getTabSize();n||(n=i),t||(t=a);for(var s=" "==t?t:r.stringRepeat(t,n),c=e.doc,o=c.getAllLines(),g={},h={},l=0,f=o.length;f>l;l++){var v=o[l],u=v.match(/^\s*/)[0];if(u){var d=e.$getStringScreenWidth(u)[0],m=Math.floor(d/i),p=d%i,S=g[m]||(g[m]=r.stringRepeat(s,m));S+=h[p]||(h[p]=r.stringRepeat(" ",p)),S!=u&&(c.removeInLine(l,0,u.length),c.insertInLine({row:l,column:0},S))}}e.setTabSize(n),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(" "==r.ch)}}]}),function(){ace.require(["ace/ext/whitespace"],function(){})}();
+1
View File
@@ -0,0 +1 @@
ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(e,n,t){var a=e("../lib/dom");e("../incremental_search");var o=e("../commands/incremental_search_commands"),r=function(e,n){var t=this.scroller.getBoundingClientRect(),a=Math.floor((e+this.scrollLeft-t.left-this.$padding)/this.characterWidth),o=Math.floor((n+this.scrollTop-t.top)/this.lineHeight);return this.session.screenToDocumentPosition(o,a)},i=e("./hash_handler").HashHandler;n.handler=new i,n.handler.isEmacs=!0,n.handler.$id="ace/keyboard/emacs";var s=!1,c,l;n.handler.attach=function(e){s||(s=!0,a.importCssString(" .emacs-mode .ace_cursor{ border: 2px rgba(50,250,50,0.8) solid!important; -moz-box-sizing: border-box!important; -webkit-box-sizing: border-box!important; box-sizing: border-box!important; background-color: rgba(0,250,0,0.9); opacity: 0.5; } .emacs-mode .ace_hidden-cursors .ace_cursor{ opacity: 1; background-color: transparent; } .emacs-mode .ace_overwrite-cursors .ace_cursor { opacity: 1; background-color: transparent; border-width: 0 0 2px 2px !important; } .emacs-mode .ace_text-layer { z-index: 4 } .emacs-mode .ace_cursor-layer { z-index: 2 }","emacsMode")),c=e.session.$selectLongWords,e.session.$selectLongWords=!0,l=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(e){this.session.$emacsMark=e},e.pushEmacsMark=function(e,n){var t=this.session.$emacsMark;t&&this.session.$emacsMarkRing.push(t),!e||n?this.setEmacsMark(e):this.session.$emacsMarkRing.push(e)},e.popEmacsMark=function(){var e=this.emacsMark();return e?(this.setEmacsMark(null),e):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(e){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.on("click",m),e.on("changeSession",d),e.renderer.screenToTextCoordinates=r,e.setStyle("emacs-mode"),e.commands.addCommands(f),n.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.addEventListener("copy",this.onCopy),e.addEventListener("paste",this.onPaste)},n.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.session.$selectLongWords=c,e.session.$useEmacsStyleLineStart=l,e.removeEventListener("click",m),e.removeEventListener("changeSession",d),e.unsetStyle("emacs-mode"),e.commands.removeCommands(f),e.removeEventListener("copy",this.onCopy),e.removeEventListener("paste",this.onPaste)};var d=function(e){e.oldSession&&(e.oldSession.$selectLongWords=c,e.oldSession.$useEmacsStyleLineStart=l),c=e.session.$selectLongWords,e.session.$selectLongWords=!0,l=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},m=function(e){e.editor.session.$emacsMark=null},h=e("../lib/keys").KEY_MODS,u={C:"ctrl",S:"shift",M:"alt",CMD:"command"},g=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];g.forEach(function(e){var n=0;e.split("-").forEach(function(e){n|=h[u[e]]}),u[n]=e.toLowerCase()+"-"}),n.handler.onCopy=function(e,t){t.$handlesEmacsOnCopy||(t.$handlesEmacsOnCopy=!0,n.handler.commands.killRingSave.exec(t),delete t.$handlesEmacsOnCopy)},n.handler.onPaste=function(e,n){n.pushEmacsMark(n.getCursorPosition())},n.handler.bindKey=function(e,n){if(e){var t=this.commandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),t[e]=n;var a=e.split(" ").slice(0,-1);a.reduce(function(e,n,t){var a=e[t-1]?e[t-1]+" ":"";return e.concat([a+n])},[]).forEach(function(e){t[e]||(t[e]="null")})},this)}},n.handler.handleKeyboard=function(e,n,t,a){if(-1===a)return void 0;var o=e.editor;if(-1==n&&(o.pushEmacsMark(),e.count)){var r=new Array(e.count+1).join(t);return e.count=null,{command:"insertstring",args:r}}if("\x00"==t)return void 0;var i=u[n];if("c-"==i||e.universalArgument){var s=String(e.count||0),c=parseInt(t[t.length-1]);if("number"==typeof c&&!isNaN(c))return e.count=parseInt(s+c),{command:"null"};e.universalArgument&&(e.count=4)}e.universalArgument=!1,i&&(t=i+t),e.keyChain&&(t=e.keyChain+=" "+t);var l=this.commandKeyBinding[t];if(e.keyChain="null"==l?t:"",!l)return void 0;if("null"===l)return{command:"null"};if("universalArgument"===l)return e.universalArgument=!0,{command:"null"};var d;if("string"!=typeof l&&(d=l.args,l.command&&(l=l.command),"goorselect"===l&&(l=o.emacsMark()?d[1]:d[0],d=null)),"string"==typeof l&&(("iLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/keyboard/vim",["require","exports","module","ace/keyboard/vim/commands","ace/keyboard/vim/maps/util","ace/lib/useragent"],function(e,t,n){var o=e("./vim/commands"),i=o.coreCommands,s=e("./vim/maps/util"),r=e("../lib/useragent"),a={i:{command:i.start},I:{command:i.startBeginning},a:{command:i.append},A:{command:i.appendEnd},"ctrl-f":{command:"gotopagedown"},"ctrl-b":{command:"gotopageup"}};t.handler={$id:"ace/keyboard/vim",handleMacRepeat:function(e,t,n){if(-1==t)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if("input"==e.lastEvent)e.lastEvent="input1";else if("input1"==e.lastEvent)return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){var n=function(e){if("insert"!==s.currentMode){var t=this.textInput.getElement();t.blur(),t.focus(),t.value=e}else this.onCompositionUpdateOrig(e)},o=function(e){"insert"===s.currentMode&&this.onCompositionStartOrig(e)};t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=n,e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=o):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)},handleKeyboard:function(e,t,n,s,c){if(0!==t&&(!n||-1==s))return null;var l=e.editor,u=e.vimState||"start";if(1==t&&(n="ctrl-"+n),"ctrl-c"==n)return!r.isMac&&l.getCopyText()?(l.once("copy",function(){"start"==u?i.stop.exec(l):l.selection.clearSelection()}),{command:"null",passEvent:!0}):{command:i.stop};if("esc"==n&&0===t||"ctrl-["==n)return{command:i.stop};if("start"==u){if(r.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar),-1==t||1==t||0===t&&n.length>1){if(o.inputBuffer.idle&&a[n])return a[n];var d=o.inputBuffer.push(l,n);if(!d&&-1!==t)return;return{command:"null",passEvent:!d}}if("esc"==n&&0===t)return{command:i.stop};if(0===t||4==t)return{command:"null",passEvent:!0}}else if("ctrl-w"==n)return{command:"removewordleft"}},attach:function(e){e.on("click",t.onCursorMove),"insert"!==s.currentMode&&o.coreCommands.stop.exec(e),e.$vimModeHandler=this,this.updateMacCompositionHandlers(e,!0)},detach:function(e){e.removeListener("click",t.onCursorMove),s.noMode(e),s.currentMode="normal",this.updateMacCompositionHandlers(e,!1)},actions:o.actions,getStatusText:function(){return"insert"==s.currentMode?"INSERT":s.onVisualMode?(s.onVisualLineMode?"VISUAL LINE ":"VISUAL ")+o.inputBuffer.status:o.inputBuffer.status}},t.onCursorMove=function(e){o.onCursorMove(e.editor,e),t.onCursorMove.scheduled=!1}}),ace.define("ace/keyboard/vim/commands",["require","exports","module","ace/lib/lang","ace/keyboard/vim/maps/util","ace/keyboard/vim/maps/motions","ace/keyboard/vim/maps/operators","ace/keyboard/vim/maps/aliases","ace/keyboard/vim/registers"],function(e,t,n){"never use strict";function o(e){w.previous={action:{action:{fn:e}}}}var i=e("../../lib/lang"),s=e("./maps/util"),r=e("./maps/motions"),a=e("./maps/operators"),c=e("./maps/aliases"),l=e("./registers"),u=1,d=2,m=3,f=4,g=8,h=function(e,t,n){for(;0<t--;)e.apply(this,n)},p=function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),o=n.top,i=g*t.layerConfig.lineHeight;2*i>t.$size.scrollerHeight&&(i=t.$size.scrollerHeight/2),t.scrollTop>o-i&&t.session.setScrollTop(o-i),t.scrollTop+t.$size.scrollerHeight<o+i+t.lineHeight&&t.session.setScrollTop(o+i+t.lineHeight-t.$size.scrollerHeight)},v=t.actions={z:{param:!0,fn:function(e,t,n,o){switch(o){case"z":e.renderer.alignCursor(null,.5);break;case"t":e.renderer.alignCursor(null,0);break;case"b":e.renderer.alignCursor(null,1);break;case"c":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"o":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"C":e.session.foldAll();break;case"O":e.session.unfold()}}},r:{param:!0,fn:function(e,t,n,o){o&&o.length&&(o.length>1&&(o="return"==o?"\n":"tab"==o?" ":o),h(function(){e.insert(o)},n||1),e.navigateLeft())}},R:{fn:function(e,t,n,o){s.insertMode(e),e.setOverwrite(!0)}},"~":{fn:function(e,t,n){h(function(){var t=e.selection.getRange();t.isEmpty()&&t.end.column++;var n=e.session.getTextRange(t),o=n.toUpperCase();o!=n?e.session.replace(t,o):n.toLowerCase()!=n?e.session.replace(t,n.toLowerCase()):e.navigateRight()},n||1)}},"*":{fn:function(e,t,n,o){e.selection.selectWord(),e.findNext(),p(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},"#":{fn:function(e,t,n,o){e.selection.selectWord(),e.findPrevious(),p(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},m:{param:!0,fn:function(e,t,n,o){var i=e.session,s=i.vimMarkers||(i.vimMarkers={}),r=e.getCursorPosition();s[o]||(s[o]=e.session.doc.createAnchor(r)),s[o].setPosition(r.row,r.column,!0)}},n:{fn:function(e,t,n,o){var i=e.getLastSearchOptions();i.backwards=!1,i.start=null,e.selection.moveCursorRight(),e.selection.clearSelection(),e.findNext(i),p(e);var sLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"],function(E,e,t){function N(){this.HighlightRules=T,this.foldingRules=new I}var T=E("./abap_highlight_rules").AbapHighlightRules,I=E("./folding/coffee").FoldMode,n=E("../range").Range,O=E("./text").Mode,R=E("../lib/oop");R.inherits(N,O),function(){this.getNextLineIndent=function(E,e,t){var N=this.$getIndent(e);return N},this.toggleCommentLines=function(E,e,t,N){for(var T=new n(0,0,0,0),I=t;N>=I;++I){var O=e.getLine(I);hereComment.test(O)||(O=commentLine.test(O)?O.replace(commentLine,"$1"):O.replace(indentation,"$&#"),T.end.row=T.start.row=I,T.end.column=O.length+1,e.replace(T,O))}},this.$id="ace/mode/abap"}.call(N.prototype),e.Mode=N}),ace.define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(E,e,t){var N=E("../lib/oop"),T=E("./text_highlight_rules").TextHighlightRules,I=function(){var E=this.createKeywordMapper({"variable.language":"this",keyword:"ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT FETCH FIELDS FORM FORMAT FREE FROM FUNCTION GENERATE GET HIDE IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION LEAVE LIKE LINE LOAD LOCAL LOOP MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY ON OVERLAY OPTIONAL OTHERS PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES UNASSIGN ULINE UNPACK UPDATE WHEN WHILE WINDOW WRITE OCCURS STRUCTURE OBJECT PROPERTY CASTING APPEND RAISING VALUE COLOR CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT ID NUMBER FOR TITLE OUTPUT WITH EXIT USING INTO WHERE GROUP BY HAVING ORDER BY SINGLE APPENDING CORRESPONDING FIELDS OF TABLE LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN","constant.language":"TRUE FALSE NULL SPACE","support.type":"c n i p f d t x string xstring decfloat16 decfloat34","keyword.operator":"abs sign ceil floor trunc frac acos asin atan cos sin tan abapOperator cosh sinh tanh exp log log10 sqrt strlen xstrlen charlen numofchar dbmaxlen lines"},"text",!0," "),e="WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";this.$rules={start:[{token:"string",regex:"`",next:"string"},{token:"string",regex:"'",next:"qstring"},{token:"doc.comment",regex:/^\*.+/},{token:"comment",regex:/".+$/},{token:"invalid",regex:"\\.{2,}"},{token:"keyword.operator",regex:/\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},{token:"paren.lparen",regex:"[\\[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"constant.numeric",regex:"[+-]?\\d+\\b"},{token:"variable.parameter",regex:/sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},{token:"keyword",regex:e},{token:"variable.parameter",regex:/\w+-\w+(?:-\w+)*/},{token:E,regex:"\\b\\w+\\b"},{caseInsensitive:!0}],qstring:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}],string:[{token:"constant.language.escape",regex:"``"},{token:"string",regex:"`",next:"start"},{defaultToken:"string"}]}};N.inherits(I,T),e.AbapHighlightRules=I}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(E,e,t){var N=E(Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){var n=e("../lib/oop"),i=e("./text").Mode,a=e("./actionscript_highlight_rules").ActionScriptHighlightRules,r=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=a,this.foldingRules=new r};n.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"support.class.actionscript.2",regex:"\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b"},{token:"support.function.actionscript.2",regex:"\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imatLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,a){var r=e("../lib/oop"),i=e("./text").Mode,n=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,s=function(){this.HighlightRules=n};r.inherits(s,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,a){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",a="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":a,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(n,i),t.AdaHighlightRules=n});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,a){var o=e("../lib/oop"),r=e("./text").Mode,i=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,n=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.foldingRules=new n};o.inherits(c,r),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,a){var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:["punctuation.definition.comment.apacheconf","comment.line.hash.ini","comment.line.hash.ini"],regex:"^((?:\\s)*)(#)(.*$)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","text","string.value.apacheconf","punctuation.definition.tag.apacheconf"],regex:"(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","punctuation.definition.tag.apacheconf"],regex:"(</)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(>)"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.replacement.apacheconf","text"],regex:"(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?"},{token:["keyword.alias.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:"keyword.core.apacheconf",regex:"\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b"},{token:"keyword.mpm.apacheconf",regex:"\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b"},{token:"keyword.access.apacheconf",regex:"\\b(?:Allow|Deny|Order)\\b"},{token:"keyword.actions.apacheconf",regex:"\\b(?:Action|Script)\\b"},{token:"keyword.alias.apacheconf",regex:"\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b"},{token:"keyword.auth.apacheconf",regex:"\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b"},{token:"keyword.auth_anon.apacheconf",regex:"\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b"},{token:"keyword.auth_dbm.apacheconf",regex:"\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b"},{token:"keyword.auth_digest.apacheconf",regex:"\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b"},{token:"keyword.auth_ldap.apacheconf",regex:"\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserILine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){var r=e("../lib/oop"),i=e("./text").Mode,n=e("../tokenizer").Tokenizer,a=e("./applescript_highlight_rules").AppleScriptHighlightRules,s=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=a,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"}}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="about|above|after|against|and|around|as|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|try|until|where|while|whose|with|without",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",o="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="alias|application|boolean|class|constant|date|file|integer|list|number|real|record|string|text|character|characters|contents|day|frontmost|id|item|length|month|name|paragraph|paragraphs|rest|reverse|running|time|version|weekday|word|words|year",i=this.createKeywordMapper({"support.function":o,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"string",regex:'".*?"'},{token:"support.type",regex:"\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{token:"support.function",regex:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{token:"constant.language",regex:"\\b(text item delimiters|current application|missing value)\\b"},{token:"keyword",regex:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{token:i,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(n,i),t.AppleScriptHighlightRules=n}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){var r=e("../../lib/oop"),i=e("../../range").Range,n=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,n),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,o,r){var i=e.getLine(o),n=i.match(this.foldingStartMarker);if(n){var a=n.index;if(n[1])return this.openingBracketBlock(e,n[1],o,a);var s=e.getCommentFoldRange(o,a+n[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,o):"all"!=t&&(s=null)),s}if("markbegin"!==t){var n=i.match(this.foldingStopMarker);if(n){var a=n.index+n[0].length;return n[1]?this.closingBracketBlock(e,n[1],o,a):e.getCommentFoldRange(o,a,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),r=o.search(/\S/),n=t,a=o.length;t+=1;for(var s=t,l=e.getLength();++t<l;){o=e.getLine(t);var c=o.search(/\S/);if(-1!==c){if(r>c)break;var g=this.getFoldWidgetRange(e,"all",t);if(g){if(g.start.row<=n)break;if(g.isMultiLine())t=g.end.row;else if(r==c)break}s=t}}return new i(n,a,s,e.getLine(s).length)}}.call(a.prototype)});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t,n){var o=e("../lib/oop"),r=e("./text").Mode,i=e("./asciidoc_highlight_rules").AsciidocHighlightRules,l=e("./folding/asciidoc").FoldMode,a=function(){this.HighlightRules=i,this.foldingRules=new l};o.inherits(a,r),function(){this.type="text",this.getNextLineIndent=function(e,t,n){if("listblock"==e){var o=/^((?:.+)?)([-+*][ ]+)/.exec(t);return o?new Array(o[1].length+1).join(" ")+o[2]:""}return this.$getIndent(t)},this.$id="ace/mode/asciidoc"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){function e(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var t="[a-zA-Z¡-￿]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:t},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/\!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","marLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"],function(s,e,d){var p=s("../lib/oop"),t=s("./text").Mode,n=s("./assembly_x86_highlight_rules").AssemblyX86HighlightRules,i=s("./folding/coffee").FoldMode,a=function(){this.HighlightRules=n,this.foldingRules=new i};p.inherits(a,t),function(){this.lineCommentStart=";",this.$id="ace/mode/assembly_x86"}.call(a.prototype),e.Mode=a}),ace.define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(s,e,d){var p=s("../lib/oop"),t=s("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"keyword.control.assembly",regex:"\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b",caseInsensitive:!0},{token:"variable.parameter.register.assembly",regex:"\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:YLine truncated
+2
View File
@@ -0,0 +1,2 @@
ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,r){var o=e("../lib/oop"),i=e("./text").Mode,l=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,a=e("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=l,this.foldingRules=new a};o.inherits(n,i),function(){this.lineCommentStart="/\\*",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(n.prototype),t.Mode=n}),ace.define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,l=function(){var e="And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloLine truncated
this.$rules={start:[{token:"comment.line.ahk",regex:"(?:^| );.*$"},{token:"comment.block.ahk",regex:"/\\*",push:[{token:"comment.block.ahk",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.ahk"}]},{token:"doc.comment.ahk",regex:"#cs",push:[{token:"doc.comment.ahk",regex:"#ce",next:"pop"},{defaultToken:"doc.comment.ahk"}]},{token:"keyword.command.ahk",regex:"(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b",caseInsensitive:!0},{token:"keyword.control.ahk",regex:"(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b",caseInsensitive:!0},{token:"support.function.ahk",regex:"(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b",caseInsensitive:!0},{token:"variable.predefined.ahk",regex:"(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheigLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){var i=e("../lib/oop"),r=e("./text").Mode,n=e("./batchfile_highlight_rules").BatchFileHighlightRules,a=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=n,this.foldingRules=new a};i.inherits(l,r),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};n.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},i.inherits(n,r),t.BatchFileHighlightRules=n}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){var i=e("../../lib/oop"),r=e("../../range").Range,n=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(a,n),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,o,i){var r=e.getLine(o),n=r.match(this.foldingStartMarker);if(n){var a=n.index;if(n[1])return this.openingBracketBlock(e,n[1],o,a);var l=e.getCommentFoldRange(o,a+n[0].length,1);return l&&!l.isMultiLine()&&(i?l=this.getSectionRange(e,o):"all"!=t&&(l=null)),l}if("markbegin"!==t){var n=r.match(this.foldingStopMarker);if(n){var a=n.index+n[0].length;return n[1]?this.closingBracketBlock(e,n[1],o,a):e.getCommentFoldRange(o,a,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),i=o.search(/\S/),n=t,a=o.length;t+=1;for(var l=t,s=e.getLength();++t<s;){o=e.getLine(t);var c=o.search(/\S/);if(-1!==c){if(i>c)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=n)break;if(d.isMultiLine())t=d.end.row;else if(i==c)break}l=t}}return new r(n,a,l,e.getLine(l).length)}}.call(a.prototype)});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,a=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,c=e("./folding/c9search").FoldMode,s=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new c};r.inherits(s,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){function r(e,t){try{return new RegExp(e,t)}catch(n){}}var i=e("../lib/oop"),a=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,c=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:"(^\\s+[0-9]+)(:\\s)(.+)",onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,a=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}],o=n[1],c=r[3],s,u=0;if(o&&o.exec)for(o.lastIndex=0;s=o.exec(c);){var h=c.substring(u,s.index);if(u=o.lastIndex,h&&a.push({type:i[2],value:h}),s[0])a.push({type:i[3],value:s[0]});else if(!h)break}return u<c.length&&a.push({type:i[2],value:c.substr(u)}),a}},{token:["string","text"],regex:"(\\S.*)(:$)"},{regex:"Searching for .*$",onMatch:function(e,t,n){var i=e.split("");if(i.length<3)return"text";var o,c,s,u=0,h=[{value:i[u++]+"'",type:"text"},{value:c=i[u++],type:"text"},{value:"'"+i[u++],type:"text"}];for(" in"!==i[2]&&(s=i[u],h.push({value:"'"+i[u++]+"'",type:"text"},{value:i[u++],type:"text"})),h.push({value:" "+i[u++]+" ",type:"text"}),i[u+1]?(o=i[u+1],h.push({value:"("+i[u+1]+")",type:"text"}),u+=1):u-=1;u++<i.length;)i[u]&&h.push({value:i[u],type:"text"});s&&(c=s,o=""),c&&(/regex/.test(o)||(c=a.escapeRegExp(c)),/whole/.test(o)&&(c="\\b"+c+"\\b"));var l=c&&r("("+c+")",/ sensitive/.test(o)?"g":"ig");return l&&(n[0]=t,n[1]=l),h}},{regex:"\\d+",token:"constant.numeric"}]}};i.inherits(c,o),t.C9SearchHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,o=e.findMatchingBracket({row:t,column:a});if(!o||o.row==t)return 0;var c=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,a-1),c)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,a=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,a),function(){this.foldingStartMarker=/^(\S.*\:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),a=r[n],o=/^(Found.*|Searching for.*)$/,c=/^(\S.*\:|\s*)$/,s=o.test(a)?o:c,u=n,h=n;if(this.foldingStartMarker.test(a)){for(var l=n+1,g=e.getLength();g>l&&!s.test(r[l]);l++);h=l}else if(this.foldingStopMarker.test(a)){for(var l=n-1;l>=0&&(a=r[l],!s.test(a));l--);u=l}if(u!=h){var d=a.length;return s===o&&(d=a.search(/\(Found[^)]+\)$|$/)),new i(u,d,h,0)}}}.call(o.prototype)});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",s=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private:|protected:|public:|friend|explicit|virtual|export|mutable|typename",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",s=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier"),l="[a-zA-Z\\$_¡-￿][a-zA-Zd\\$_¡-Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"],function(e,t,r){var o=e("../lib/oop"),i=e("./text").Mode,n=e("./cirru_highlight_rules").CirruHighlightRules,g=e("./folding/coffee").FoldMode,a=function(){this.HighlightRules=n,this.foldingRules=new g};o.inherits(a,i),function(){this.lineCommentStart="--",this.$id="ace/mode/cirru"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/\,/,next:"line"},{token:"support.function",regex:/[^\(\)\"\s]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/\ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)\"\s]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^\ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};o.inherits(n,i),t.CirruHighlightRules=n}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,r){var o=e("../../lib/oop"),i=e("./fold_mode").FoldMode,n=e("../../range").Range,g=t.FoldMode=function(){};o.inherits(g,i),function(){this.getFoldWidgetRange=function(e,t,r){var o=this.indentationBlock(e,r);if(o)return o;var i=/\S/,g=e.getLine(r),a=g.search(i);if(-1!=a&&"#"==g[a]){for(var s=g.length,d=e.getLength(),l=r,c=r;++r<d;){g=e.getLine(r);var u=g.search(i);if(-1!=u){if("#"!=g[u])break;c=r}}if(c>l){var f=e.getLine(c).length;return new n(l,s,c,f)}}},this.getFoldWidget=function(e,t,r){var o=e.getLine(r),i=o.search(/\S/),n=e.getLine(r+1),g=e.getLine(r-1),a=g.search(/\S/),s=n.search(/\S/);if(-1==i)return e.foldWidgets[r-1]=-1!=a&&s>a?"start":"","";if(-1==a){if(i==s&&"#"==o[i]&&"#"==n[i])return e.foldWidgets[r-1]="",e.foldWidgets[r+1]="","start"}else if(a==i&&"#"==o[i]&&"#"==g[i]&&-1==e.getLine(r-2).search(/\S/))return e.foldWidgets[r-1]="start",e.foldWidgets[r+1]="","";return e.foldWidgets[r-1]=-1!=a&&i>a?"start":"",s>i?"start":""}}.call(g.prototype)});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){var r=e("../lib/oop"),a=e("./text").Mode,s=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,i=function(){this.HighlightRules=s,this.$outdent=new o};r.inherits(i,a),function(){this.lineCommentStart=";",this.minorIndentFunctions=["defn","defn-","defmacro","def","deftest","testing"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){for(var n=this.$getIndent(e),r=0,a,s,o=e.length-1;o>=0&&(s=e[o],"("===s?(r--,a=!0):"("===s||"["===s||"{"===s?(r--,a=!1):(")"===s||"]"===s||"}"===s)&&r++,!(0>r));o--);if(!(0>r&&a))return 0>r&&!a?this.$toIndent(e.substring(0,o+1)):r>0?n=n.substring(0,n.length-t.length):n;o+=1;for(var i=o,c="";;){if(s=e[o]," "===s||" "===s)return this.$toIndent(-1!==this.minorIndentFunctions.indexOf(c)?e.substring(0,i-1)+t:e.substring(0,o+1));if(void 0===s)return this.$toIndent(e.substring(0,i-1)+t);c+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure"}.call(i.prototype),t.Mode=i}),ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set reLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"],function(E,e,T){var R=E("../lib/oop"),A=E("./text").Mode,o=E("./cobol_highlight_rules").CobolHighlightRules,t=E("../range").Range,O=function(){this.HighlightRules=o};R.inherits(O,A),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(O.prototype),e.Mode=O}),ace.define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(E,e,T){var R=E("../lib/oop"),A=E("./text_highlight_rules").TextHighlightRules,o=function(){var E="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",e="true|false|null",T="count|min|max|avg|sum|rank|now|coalesce|main",R=this.createKeywordMapper({"support.function":T,keyword:E,"constant.language":e},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:R,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};R.inherits(o,A),e.CobolHighlightRules=o});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(e,t,n){function r(){this.HighlightRules=o,this.$outdent=new a,this.foldingRules=new i}var o=e("./coffee_highlight_rules").CoffeeHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,i=e("./folding/coffee").FoldMode,s=e("../range").Range,g=e("./text").Mode,c=e("../worker/worker_client").WorkerClient,l=e("../lib/oop");l.inherits(r,g),function(){var e=/(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var o=this.$getIndent(n),a=this.getTokenizer().getLineTokens(n,t).tokens;return(!a.length||"comment"!==a[a.length-1].type)&&"start"===t&&e.test(n)&&(o+=r),o},this.toggleCommentLines=function(e,o,a,i){console.log("toggle");for(var g=new s(0,0,0,0),c=a;i>=c;++c){var l=o.getLine(c);n.test(l)||(l=t.test(l)?l.replace(t,"$1"):l.replace(r,"$&#"),g.end.row=g.start.row=c,g.end.column=l.length+1,o.replace(g,l))}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/coffee"}.call(r.prototype),t.Mode=r}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){function r(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",n="true|false|null|undefined|NaN|Infinity",r="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",o="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",a="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",i="window|arguments|prototype|document",s=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":o,"language.support.function":a,"variable.language":i},"identifier"),g={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},c=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){return this.next="","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string"))?"paren.string":"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"}Line truncated
+2
View File
@@ -0,0 +1,2 @@
ace.define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html","ace/mode/coldfusion_highlight_rules"],function(e,t,n){var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./html").Mode,i=e("./coldfusion_highlight_rules").ColdfusionHighlightRules,s="cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|"),l=function(){a.call(this),this.HighlightRules=i};o.inherits(l,a),function(){this.voidElements=o.mixin(r.arrayToMap(s),this.voidElements),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/coldfusion"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var o=e("../../lib/oop"),r=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],c,u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.id,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?c=u[t]:void(c=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,r){var a=n.getCursorPosition(),s=o.doc.getLine(a.row);if("{"==r){g(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){g(n);var m=s.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,s,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){g(n);var h="";d.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",c.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=s.substring(a.column,a.column+1);if("}"===m){var f=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(s)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.end.column,r.end.column+1);if("}"==s)return r.end.column++,r;c.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes",Line truncated
};o.inherits(i,a),t.JavaScriptHighlightRules=i}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../../lib/lang"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,l=e("../../token_iterator").TokenIterator,c=t.FoldMode=function(e,t){s.call(this),this.voidElements=r.mixin(e||{},t||{})};r.inherits(c,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a<n.length;a++){var i=n[a];if(o(i,"tag-open")){if(r.end.column=r.start.column+i.value.length,r.closing=o(i,"end-tag-open"),i=n[++a],!i)return null;for(r.tagName=i.value,r.end.column+=i.value.length,a++;a<n.length;a++)if(i=n[a],r.end.column+=i.value.length,o(i,"tag-close")){r.selfClosing="/>"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s<a.length;s++){var l=a[s];if(i+=l.value.length,!(r>i)&&o(l,"end-tag-open")&&(l=a[s+1],l&&l.value==n))return!0}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do if(o(t,"tag-open"))n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(o(t,"tag-name"))n.tagName=t.value;else if(o(t,"tag-close"))return n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do{if(o(t,"tag-open"))return n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;o(t,"tag-name")?n.tagName=t.value:o(t,"tag-close")&&(n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements.hasOwnProperty(t.tagName))return;{if(!this.voidElements.hasOwnProperty(n.tagName))return null;e.pop()}}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r=o.closing||o.selfClosing,a=[],s;if(r){for(var c=new l(e,n,o.end.column),u={row:n,column:o.start.column};s=this._readTagBackward(c);)if(s.selfClosing){if(!a.length)return s.start.column+=s.tagName.length+2,s.end.column-=2,i.fromPoints(s.start,s.end)}else if(s.closing)a.push(s);else if(this._pop(a,s),0==a.length)return s.start.column+=s.tagName.length+2,i.fromPoints(s.start,u)}else for(var c=new l(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};s=this._readTagForward(c);)if(s.selfClosing){if(!a.length)return s.start.column+=s.tagName.length+2,s.end.column-=2,i.fromPoints(s.start,s.end)}else if(s.closing){if(this._pop(a,s),0==a.length)return i.fromPoints(g,s.start)}else a.push(s)}}).call(c.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new u};o.inherits(g,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/javascript_worker","JavaScrLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./csharp_highlight_rules").CSharpHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/csharp").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null},this.$id="ace/mode/csharp"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic","constant.language":"null|true|false"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:/'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/},{token:"string",start:'"',end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"string",start:'@"',end:'"',next:[{token:"constant.language.escape",regex:'""'}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"keyword",regex:"^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")]),this.normalizeRules()};r.inherits(a,i),t.CSharpHighlightRules=a}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};r.inherits(i,o),i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var i=t.match(/^.*\{\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-dLine truncated
+2
View File
@@ -0,0 +1,2 @@
ace.define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/html_highlight_rules","ace/mode/folding/html","ace/mode/curly_highlight_rules"],function(e,t,n){var o=e("../lib/oop"),r=e("./html").Mode,a=e("./matching_brace_outdent").MatchingBraceOutdent,i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./folding/html").FoldMode,l=e("./curly_highlight_rules").CurlyHighlightRules,u=function(){r.call(this),this.HighlightRules=l,this.$outdent=new a,this.foldingRules=new s};o.inherits(u,r),function(){this.$id="ace/mode/curly"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var o=e("../../lib/oop"),r=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u,c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.id,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?u=c[t]:void(u=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,r){var a=n.getCursorPosition(),s=o.doc.getLine(a.row);if("{"==r){g(n);var l=n.getSelectionRange(),c=o.doc.getTextRange(l);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){g(n);var m=s.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,s,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){g(n);var h="";d.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",u.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=s.substring(a.column,a.column+1);if("}"===m){var f=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(s)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.end.column,r.end.column+1);if("}"==s)return r.end.column++,r;u.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var a=r,i=n.getSelectionRange(),s=o.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column);if("\\"==c)return null;for(var m=o.getTokens(i.start.row),p=0,h,f=-1,x=0;x<m.length&&(h=m[x],"string"==h.type?f=-1:0>f&&(f=h.value.indexOf(a)),!(h.value.length+p>i.start.column));x++)p+=m[x].value.length;if(!h||0>f&&"comment"!==h.type&&("string"!==hLine truncated
};o.inherits(i,a),t.JavaScriptHighlightRules=i}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../../lib/lang"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,l=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(e,t){s.call(this),this.voidElements=r.mixin(e||{},t||{})};r.inherits(u,s);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new c,a=0;a<n.length;a++){var i=n[a];if(o(i,"tag-open")){if(r.end.column=r.start.column+i.value.length,r.closing=o(i,"end-tag-open"),i=n[++a],!i)return null;for(r.tagName=i.value,r.end.column+=i.value.length,a++;a<n.length;a++)if(i=n[a],r.end.column+=i.value.length,o(i,"tag-close")){r.selfClosing="/>"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s<a.length;s++){var l=a[s];if(i+=l.value.length,!(r>i)&&o(l,"end-tag-open")&&(l=a[s+1],l&&l.value==n))return!0}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new c;do if(o(t,"tag-open"))n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(o(t,"tag-name"))n.tagName=t.value;else if(o(t,"tag-close"))return n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new c;do{if(o(t,"tag-open"))return n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;o(t,"tag-name")?n.tagName=t.value:o(t,"tag-close")&&(n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements.hasOwnProperty(t.tagName))return;{if(!this.voidElements.hasOwnProperty(n.tagName))return null;e.pop()}}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r=o.closing||o.selfClosing,a=[],s;if(r){for(var u=new l(e,n,o.end.column),c={row:n,column:o.start.column};s=this._readTagBackward(u);)if(s.selfClosing){if(!a.length)return s.start.column+=s.tagName.length+2,s.end.column-=2,i.fromPoints(s.start,s.end)}else if(s.closing)a.push(s);else if(this._pop(a,s),0==a.length)return s.start.column+=s.tagName.length+2,i.fromPoints(s.start,c)}else for(var u=new l(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};s=this._readTagForward(u);)if(s.selfClosing){if(!a.length)return s.start.column+=s.tagName.length+2,s.end.column-=2,i.fromPoints(s.start,s.end)}else if(s.closing){if(this._pop(a,s),0==a.length)return i.fromPoints(g,s.start)}else a.push(s)}}).call(u.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("../worker/worker_client").WorkerClient,u=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new u,this.foldingRules=new c};o.inherits(g,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/javascript_worker","JavaScrLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./d_highlight_rules").DHighlightRules,a=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=i,this.foldingRules=new a};r.inherits(s,o),function(){this.lineCommentStart="/\\+",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/d"}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters",t="break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|return|switch|while|catch|try|throw|finally|version|assert|unittest|with",n="auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|cfloat|creal|cdouble|cent|ifloat|ireal|idouble|int|long|short|void|uint|ulong|ushort|ucent|function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object",r="abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|ref|immutable|lazy|nothrow|override|package|pragma|private|protected|public|pure|scope|shared|__gshared|synchronized|static|volatile",i="class|struct|union|template|interface|enum|macro",a={token:"constant.language.escape",regex:"\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"},s="null|true|false|__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__",g="/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#",l=this.$keywords=this.createKeywordMapper({"keyword.modifier":r,"keyword.control":t,"keyword.type":n,keyword:e,"keyword.storage":i,punctation:"\\.|\\,|;|\\.\\.|\\.\\.\\.","keyword.operator":g,"constant.language":s},"identifier"),c="[a-zA-Z_¡-￿][a-zA-Z\\d_¡-￿]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"star-comment"},{token:"comment.shebang",regex:"^s*#!.*"},{token:"comment",regex:"\\/\\+",next:"plus-comment"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[\\[\\(\\{\\<]+)',next:"operator-heredoc-string"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[a-zA-Z_]+)$',next:"identifier-heredoc-string"},{token:"string",regex:'[xr]?"',next:"quote-string"},{token:"string",regex:"[xr]?`",next:"backtick-string"},{token:"string",regex:"[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"},{token:["keyword","text","paren.lparen"],regex:/(asm)(\s*)({)/,next:"d-asm"},{token:["keyword","text","paren.lparen","constant.language"],regex:"(__traits)(\\s*)(\\()("+c+")"},{token:["keyword","text","variable.module"],regex:"(import|module)(\\s+)((?:"+c+"\\.?)*)"},{token:["keyword.storage","text","entity.name.type"],regex:"("+i+")(\\s*)("+c+")"},{token:["keyword","text","variable.storage","text"],regex:"(alias|typedef)(\\s*)("+c+")(\\s*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"},{token:"entity.other.attribute-name",regex:"@"+c},{token:l,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:g},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.|\\:"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],"star-comment":[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],"plus-comment":[{token:"comment",regex:"\\+\\/",next:"start"},{defaultToken:"comment"}],"quote-string":[a,{token:"string",regex:'"[cdw]?',next:"start"},{defaultToken:"string"}],"backtick-string":[a,{token:"string",regex:"`[cdw]?",next:"start"},{defaultToken:"string"}],"operator-heredoc-string":[{onMatch:function(e,t,n){e=e.substring(e.length-2,e.length-1);var r={">":"<","]":"[",")":"(","}":"{"};return-1!=Object.keys(r).indexOf(e)&&(e=r[e]),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'(?:[\\]\\)}>]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"identifier-heredoc-string":[{onMatch:function(e,t,n){return e=e.substring(0,e.length-1),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'^(?:[A-Za-z_][a-zA-Z0-9]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"d-asm":[{token:"paren.rparen",reLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./dart_highlight_rules").DartHighlightRules,a=e("./folding/cstyle").FoldMode,s=function(){o.call(this),this.HighlightRules=i,this.foldingRules=new a};r.inherits(s,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/dart"}.call(s.prototype),t.Mode=s}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(d,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",s=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|regiLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,i,t){var n=e("../lib/oop"),o=e("./text").Mode,a=e("./diff_highlight_rules").DiffHighlightRules,r=e("./folding/diff").FoldMode,d=function(){this.HighlightRules=a,this.foldingRules=new r(["diff","index","\\+{3}","@@|\\*{5}"],"i")};n.inherits(d,o),function(){this.$id="ace/mode/diff"}.call(d.prototype),i.Mode=d}),ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,i,t){var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};n.inherits(a,o),i.DiffHighlightRules=a}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,i,t){var n=e("../../lib/oop"),o=e("./fold_mode").FoldMode,a=e("../../range").Range,r=i.FoldMode=function(e,i){this.regExpList=e,this.flag=i,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};n.inherits(r,o),function(){this.getFoldWidgetRange=function(e,i,t){for(var n=e.getLine(t),o={row:t,column:n.length},r=this.regExpList,d=1;d<=r.length;d++){var l=RegExp("^("+r.slice(0,d).join("|")+")",this.flag);if(l.test(n))break}for(var f=e.getLength();++t<f&&(n=e.getLine(t),!l.test(n)););return t!=o.row+1?a.fromPoints(o,{row:t-1,column:n.length}):void 0}}.call(r.prototype)});
+2
View File
@@ -0,0 +1,2 @@
ace.define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var o=e("../lib/oop"),r=e("./html").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant",regex:"[0-9]+"},{token:"variable",regex:"[-_a-zA-Z0-9:]+"}],comment:[{token:"comment.block",merge:!0,regex:".+?"}],tag:[{token:"entity.name.function",regex:"[a-zA-Z][_a-zA-Z0-9]*",next:"start"}]}};o.inherits(s,i);var l=function(){this.$rules=(new a).getRules();for(var e in this.$rules)this.$rules[e].unshift({token:"comment.line",regex:"\\{#.*?#\\}"},{token:"comment.block",regex:"\\{\\%\\s*comment\\s*\\%\\}",merge:!0,next:"django-comment"},{token:"constant.language",regex:"\\{\\{",next:"django-start"},{token:"constant.language",regex:"\\{\\%",next:"django-tag"}),this.embedRules(s,"django-",[{token:"comment.block",regex:"\\{\\%\\s*endcomment\\s*\\%\\}",merge:!0,next:"start"},{token:"constant.language",regex:"\\%\\}",next:"start"},{token:"constant.language",regex:"\\}\\}",next:"start"}])};o.inherits(l,a);var c=function(){r.call(this),this.HighlightRules=l};o.inherits(c,r),function(){this.$id="ace/mode/django"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var o=e("../../lib/oop"),r=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],c,u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.id,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?c=u[t]:void(c=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,r){var a=n.getCursorPosition(),s=o.doc.getLine(a.row);if("{"==r){g(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){g(n);var m=s.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,s,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){g(n);var h="";d.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",c.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=s.substring(a.column,a.column+1);if("}"===m){var f=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(s)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.end.column,r.end.column+1);if("}"==s)return r.end.column++,r;c.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,oLine truncated
};o.inherits(i,a),t.JavaScriptHighlightRules=i}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,a=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};o.inherits(a,r),function(){this.$getMode=function(e){"string"!=typeof e&&(e=e[0]);for(var t in this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,o){var r=this.$getMode(e);return r?r.getFoldWidget(t,n,o):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var o=this.$getMode(e.getState(n-1));return o&&o.getFoldWidget(e,t,n)||(o=this.$getMode(e.getState(n))),o&&o.getFoldWidget(e,t,n)||(o=this.defaultMode),o.getFoldWidgetRange(e,t,n)}}.call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new u};o.inherits(g,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../../lib/lang"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,l=e("../../token_iterator").TokenIterator,c=t.FoldMode=function(e,t){s.call(this),this.voidElements=r.mixin(e||{},t||{})};r.inherits(c,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a<n.length;a++){var i=n[a];if(o(i,"tag-open")){if(r.end.column=r.start.column+i.value.length,r.closing=o(i,"end-tag-open"),i=n[++a],!i)return null;for(r.tagName=i.value,r.end.column+=i.value.length,a++;a<n.length;a++)if(i=n[a],r.end.column+=i.value.length,o(i,"tag-close")){r.selfClosing="/>"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s<a.length;s++){var l=a[s];if(i+=l.value.length,!(r>i)&&o(l,"end-tag-open")&&(l=a[s+1],l&&l.value==n))return!0}return!1},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do if(o(t,"tag-open"))n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn();else if(o(t,"tag-name"))n.tagName=t.value;else if(o(t,"tag-close"))return n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length,e.stepForward(),n;while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n=new u;do{if(o(t,"tag-open"))return n.closing=o(t,"end-tag-open"),n.start.row=e.getCurrentTokenRow(),n.start.column=e.getCurrentTokenColumn(),e.stepBackward(),n;o(t,"tag-name")?n.tagName=t.value:o(t,"tag-close")&&(n.selfClosing="/>"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./sh").Mode,o=e("./dockerfile_highlight_rules").DockerfileHighlightRules,s=e("./folding/cstyle").FoldMode,a=function(){i.call(this),this.HighlightRules=o,this.foldingRules=new s};r.inherits(a,i),function(){this.$id="ace/mode/dockerfile"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,a=e("./folding/cstyle").FoldMode,l=e("./behaviour/cstyle").CstyleBehaviour,u=function(){this.HighlightRules=o,this.foldingRules=new a,this.$behaviour=new l};r.inherits(u,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[\:]\s*$/);s&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var o=i.pop();while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return o?"keyword"==o.type&&e[o.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new s(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",a="(?:(?:"+i+"|"+r+"))",l="(?:"+a+"|"+i+")",u="(?:&"+r+")",c="[a-zA-Z_][a-zA-Z0-9_]*",d="(?:(?:\\$"+c+")|(?:"+c+"=))",g="(?:\\$(?:SHLVL|\\$|\\!|\\?))",h="(?:"+c+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"variable.language",regex:g},{token:"variable",regex:d},{token:"support.function",regex:h},{token:"support.function",regex:u},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:l},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};r.inherits(a,i),t.ShHighlightRules=a}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n),o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++t<l;){n=e.getLine(t);var u=n.search(/\S/);if(-1!==u){if(r>u)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./dot_highlight_rules").DotHighlightRules,l=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.foldingRules=new l};r.inherits(g,o),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var l=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);l&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var l=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),l)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=e("./doc_comment_highlight_rules").DocCommentHighlightRules,l=function(){var e=o.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")),t=o.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/#.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\+|=|\->/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}};r.inherits(l,i),t.DotHighlightRules=l}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};r.inherits(i,o),i.getStartRule=function(e){Line truncated
+2
View File
@@ -0,0 +1,2 @@
ace.define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"],function(e,t,n){var o=e("../lib/oop"),r=e("./html_highlight_rules").HtmlHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=function(e,t){r.call(this),e||(e="(?:<%|<\\?|{{)"),t||(t="(?:%>|\\?>|}})");for(var n in this.$rules)this.$rules[n].unshift({token:"markup.list.meta.tag",regex:e+"(?![>}])[-=]?",push:"ejs-start"});this.embedRules(a,"ejs-"),this.$rules["ejs-start"].unshift({token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}),this.$rules["ejs-no_regex"].unshift({token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}),this.normalizeRules()};o.inherits(i,r),t.EjsHighlightRules=i;var o=e("../lib/oop"),s=e("./html").Mode,l=e("./javascript").Mode,c=e("./css").Mode,u=e("./ruby").Mode,d=function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":l,"css-":c,"ejs-":l})};o.inherits(d,s),function(){this.$id="ace/mode/ejs"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("../worker/worker_client").WorkerClient,c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new u};o.inherits(d,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(d.prototype),t.Mode=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var o=e("../../lib/oop"),r=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],c,u={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.id,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?c=u[t]:void(c=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,n,o,r){var a=n.getCursorPosition(),s=o.doc.getLine(a.row);if("{"==r){d(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(g.isSaneInsertion(n,o))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(g.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){d(n);var m=s.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&g.isAutoInsertedClosing(a,s,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){d(n);var h="";g.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",c.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var m=s.substring(a.column,a.Line truncated
this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+t+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:HeiLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"],function(e,n,t){var r=e("../lib/oop"),a=e("./text").Mode,i=e("./erlang_highlight_rules").ErlangHighlightRules,o=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=i,this.foldingRules=new o};r.inherits(g,a),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/erlang"}.call(g.prototype),n.Mode=g}),ace.define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,n,t){var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{include:"#module-directive"},{include:"#import-export-directive"},{include:"#behaviour-directive"},{include:"#record-directive"},{include:"#define-directive"},{include:"#macro-directive"},{include:"#directive"},{include:"#function"},{include:"#everything-else"}],"#atom":[{token:"punctuation.definition.symbol.begin.erlang",regex:"'",push:[{token:"punctuation.definition.symbol.end.erlang",regex:"'",next:"pop"},{token:["punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","constant.other.symbol.escape.erlang"],regex:"(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.atom.erlang",regex:"\\\\\\^?.?"},{defaultToken:"constant.other.symbol.quoted.single.erlang"}]},{token:"constant.other.symbol.unquoted.erlang",regex:"[a-z][a-zA-Z\\d@_]*"}],"#behaviour-directive":[{token:["meta.directive.behaviour.erlang","punctuation.section.directive.begin.erlang","meta.directive.behaviour.erlang","keyword.control.directive.behaviour.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.behaviour.erlang","entity.name.type.class.behaviour.definition.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.end.erlang","meta.directive.behaviour.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)"}],"#binary":[{token:"punctuation.definition.binary.begin.erlang",regex:"<<",push:[{token:"punctuation.definition.binary.end.erlang",regex:">>",next:"pop"},{token:["punctuation.separator.binary.erlang","punctuation.separator.value-size.erlang"],regex:"(,)|(:)"},{include:"#internal-type-specifiers"},{include:"#everything-else"},{defaultToken:"meta.structure.binary.erlang"}]}],"#character":[{token:["punctuation.definition.character.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","constant.character.escape.erlang"],regex:"(\\$)(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.character.erlang",regex:"\\$\\\\\\^?.?"},{token:["punctuation.definition.character.erlang","constant.character.erlang"],regex:"(\\$)(\\S)"},{token:"invalid.illegal.character.erlang",regex:"\\$.?"}],"#comment":[{token:"punctuation.definition.comment.erlang",regex:"%.*$",push_:[{token:"comment.line.percentage.erlang",regex:"$",next:"pop"},{defaultToken:"comment.line.percentage.erlang"}]}],"#define-directive":[{token:["meta.directive.define.erlang","punctuation.section.directive.begin.erlang","meta.directive.define.erlang","keyword.control.directive.define.erlang","meta.directive.define.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.define.erlang","entity.name.function.macro.definition.erlang","meta.directive.define.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.directive.define.erlang"}]},{token:"meta.directive.define.erlang",regex:"(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{token:["text","punctuation.section.directive.begin.erlang","text","keyword.control.directive.define.erlang","text","punctuation.definition.parameters.begin.erlang","text","entity.name.function.macro.definition.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()",push:[{token:["punctuation.definition.parameters.end.erlang","text","punctuation.separator.parameters.erlang"],regex:"(\\))(\\s*)(,)",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:"punctuation.separator.define.erlang",regex:"\\|\Line truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){var n=e("../lib/oop"),r=e("./text").Mode,i=e("./forth_highlight_rules").ForthHighlightRules,s=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=i,this.foldingRules=new s};n.inherits(l,r),function(){this.lineCommentStart="(?<=^|\\s)\\.?\\( [^)]*\\)",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/forth"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{include:"#forth"}],"#comment":[{token:"comment.line.double-dash.forth",regex:"(?:^|\\s)--\\s.*$",comment:"line comments for iForth"},{token:"comment.line.backslash.forth",regex:"(?:^|\\s)\\\\[\\s\\S]*$",comment:"ANSI line comment"},{token:"comment.line.backslash-g.forth",regex:"(?:^|\\s)\\\\[Gg] .*$",comment:"gForth line comment"},{token:"comment.block.forth",regex:"(?:^|\\s)\\(\\*(?=\\s|$)",push:[{token:"comment.block.forth",regex:"(?:^|\\s)\\*\\)(?=\\s|$)",next:"pop"},{defaultToken:"comment.block.forth"}],comment:"multiline comments for iForth"},{token:"comment.block.documentation.forth",regex:"\\bDOC\\b",caseInsensitive:!0,push:[{token:"comment.block.documentation.forth",regex:"\\bENDDOC\\b",caseInsensitive:!0,next:"pop"},{defaultToken:"comment.block.documentation.forth"}],comment:"documentation comments for iForth"},{token:"comment.line.parentheses.forth",regex:"(?:^|\\s)\\.?\\( [^)]*\\)",comment:"ANSI line comment"}],"#constant":[{token:"constant.language.forth",regex:"(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)",caseInsensitive:!0},{token:"constant.numeric.forth",regex:"(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)"},{token:"constant.character.forth",regex:"(?:^|\\s)(?:[&^]\\S|(?:\"|')\\S(?:\"|'))(?=\\s|$)"}],"#forth":[{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{include:"#word-def"}],"#storage":[{token:"storage.type.forth",regex:"(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)",caseInsensitive:!0}],"#string":[{token:"string.quoted.double.forth",regex:'(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',caseInsensitive:!0},{token:"string.unquoted.forth",regex:"(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)",caseInsensitive:!0}],"#variable":[{token:"variable.language.forth",regex:"\\b(?:I|J)\\b",caseInsensitive:!0}],"#word":[{token:"keyword.control.immediate.forth",regex:"(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.immediate.forth",regex:"(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT'S|])(?=\\s|$)",caseInsensitive:!0},{token:"keyword.control.compile-only.forth",regex:'(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',caseInsensitive:!0},{token:"keyword.other.compile-only.forth",regex:"(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\['\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.non-immediate.forth",regex:"(?:^|\\s)(?:'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.warning.forth",regex:'(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',caseInsensitive:!0}],"#word-def":[{token:["keyword.other.compile-only.forth","keyword.other.compile-only.forth","meta.block.forth","entity.name.function.forth"],regex:"(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)",caseInsensitive:!0,push:[{token:"keyword.other.compile-only.forth",regex:";(?:CODE)?",caseInsensitive:!0,next:"pop"},{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{defaultToken:"meta.block.forth"}]}]},this.normalizeRules()};i.metaData={fileTypes:["frt","fs","ldr"],foldingStartMarker:"/\\*\\*|\\{\\s*$",foldingStopMarker:"\\*\\*/|^\\s*\\}",keyEquivalent:"^~F",name:"Forth",scopeName:"source.forth"},n.inherits(i,r),t.ForthHighlightRules=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){var n=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.folLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,a=e("./ftl_highlight_rules").FtlHighlightRules,i=function(){this.HighlightRules=a};r.inherits(i,o),function(){this.$id="ace/mode/ftl"}.call(i.prototype),t.Mode=i}),ace.define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./html_highlight_rules").HtmlHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|upper_case|word_list|xhtml|xml",t="c|round|floor|ceiling",n="iso_[a-z_]+",r="first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk",o="keys|values",a="children|parent|root|ancestors|node_name|node_type|node_namespace",i="byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew",s=e+t+n+r+o+a+i,l="default|exists|if_exists|web_safe",c="data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version",g="gt|gte|lt|lte|as|in|using",u="true|false",p="encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|attributes";this.$rules={start:[{token:"constant.character.entity",regex:/&[^;]+;/},{token:"support.function",regex:"\\?("+s+")"},{token:"support.function.deprecated",regex:"\\?("+l+")"},{token:"language.variable",regex:"\\.(?:"+c+")"},{token:"constant.language",regex:"\\b("+u+")\\b"},{token:"keyword.operator",regex:"\\b(?:"+g+")\\b"},{token:"entity.other.attribute-name",regex:p},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"variable"},regex:/[\w.+\-]+/},{token:"keyword.operator",regex:"!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qstring:[{token:"constant.character.escape",regex:'\\\\[nrtvef\\\\"$]'},{token:"string",regex:/['"]/,next:"start"},{defaultToken:"string"}]}};r.inherits(i,a);var s=function(){o.call(this);var e="assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|setting|stop|switch|t|visit",t=[{token:"comment",regex:"<#--",next:"ftl-dcomment"},{token:"string.interpolated",regex:"\\${",push:"ftl-start"},{token:"keyword.function",regex:"</?#("+e+")",push:"ftl-start"},{token:"keyword.other",regex:"</?@[a-zA-Z\\.]+",push:"ftl-start"}],n=[{token:"keyword",regex:"/?>",next:"pop"},{token:"string.interpolated",regex:"}",next:"pop"}];for(var r in this.$rules)this.$rules[r].unshift.apply(this.$rules[r],t);this.embedRules(i,"ftl-",n,["start"]),this.addRules({"ftl-dcomment":[{token:"comment",regex:".*?-->",next:"pop"},{token:"comment",regex:".+"}]}),this.normalizeRules()};r.inherits(s,o),t.FtlHighlightRules=s}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","scLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./gherkin_highlight_rules").GherkinHighlightRules,g=function(){this.HighlightRules=o};i.inherits(g,r),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=" ",o=this.getTokenizer().getLineTokens(t,e),g=o.tokens;return console.log(e),t.match("[ ]*\\|")&&(i+="| "),g.length&&"comment"==g[g.length-1].type?i:("start"==e&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?i+=r:t.match("(Given|Then).+(:)$|Examples:")?i+=r:t.match("\\*.+")&&(i+="* ")),i)}}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",g=function(){this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"Feature:|Background:|Scenario:|Scenario Outline:|Examples:|Given|When|Then|And|But|\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"comment",regex:"@[A-Za-z0-9]+",next:"start"},{token:"comment",regex:"<.+>"},{token:"comment",regex:"\\| ",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:o},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"string",regex:"[A-Za-z0-9 ]*",next:"start"}]}};i.inherits(g,r),t.GherkinHighlightRules=g});
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./glsl_highlight_rules").glslHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.$id="ace/mode/glsl"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",s=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|boLine truncated
+1
View File
@@ -0,0 +1 @@
ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./golang_highlight_rules").GolangHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.foldingRules=new u};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/golang"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="else|break|case|return|goto|if|const|select|continue|struct|default|switch|for|range|func|import|package|chan|defer|fallthrough|go|interface|map|range|select|type|var",t="string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error",n="make|close|new|panic|recover",r="nil|true|false|iota",i=this.createKeywordMapper({keyword:e,"constant.language":r,"support.function":n,"support.type":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[`](?:[^`]*)[`]"},{token:"string",merge:!0,regex:"[`](?:[^`]*)$",next:"bqstring"},{token:"constant.numeric",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"invalid",regex:"\\s+$"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],bqstring:[{token:"string",regex:"(?:[^`]*)`",next:"start"},{token:"string",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.GolangHighlightRules=a}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};r.inherits(i,o),i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c,l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.id,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?c=l[t]:void(c=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,o){var i=n.getCursorPLine truncated
Loaded 100 of 524 files, more files were not shown because too many files have changed in this diff. Show more