mirror of https://github.com/EasyDarwin/EasyDarwin
penggy
6 years ago
134 changed files with 17756 additions and 10 deletions
@ -0,0 +1,569 @@
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Content |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
body { |
||||
min-width: 980px; |
||||
max-width: 1280px; |
||||
} |
||||
|
||||
body, p, a, div, th, td { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 400; |
||||
font-size: 16px; |
||||
} |
||||
|
||||
td.code { |
||||
font-size: 14px; |
||||
font-family: "Source Code Pro", monospace; |
||||
font-style: normal; |
||||
font-weight: 400; |
||||
} |
||||
|
||||
#content { |
||||
padding-top: 16px; |
||||
z-Index: -1; |
||||
margin-left: 270px; |
||||
} |
||||
|
||||
p { |
||||
color: #808080; |
||||
} |
||||
|
||||
h1 { |
||||
font-family: "Source Sans Pro Semibold", sans-serif; |
||||
font-weight: normal; |
||||
font-size: 44px; |
||||
line-height: 50px; |
||||
margin: 0 0 10px 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
h2 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: normal; |
||||
font-size: 24px; |
||||
line-height: 40px; |
||||
margin: 0 0 20px 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
section { |
||||
border-top: 1px solid #ebebeb; |
||||
padding: 30px 0; |
||||
} |
||||
|
||||
section h1 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 700; |
||||
font-size: 32px; |
||||
line-height: 40px; |
||||
padding-bottom: 14px; |
||||
margin: 0 0 20px 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
article { |
||||
padding: 14px 0 30px 0; |
||||
} |
||||
|
||||
article h1 { |
||||
font-family: "Source Sans Pro Bold", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 24px; |
||||
line-height: 26px; |
||||
} |
||||
|
||||
article h2 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 18px; |
||||
line-height: 24px; |
||||
margin: 0 0 10px 0; |
||||
} |
||||
|
||||
article h3 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 16px; |
||||
line-height: 18px; |
||||
margin: 0 0 10px 0; |
||||
} |
||||
|
||||
article h4 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 14px; |
||||
line-height: 16px; |
||||
margin: 0 0 8px 0; |
||||
} |
||||
|
||||
table { |
||||
border-collapse: collapse; |
||||
width: 100%; |
||||
margin: 0 0 20px 0; |
||||
} |
||||
|
||||
th { |
||||
background-color: #f5f5f5; |
||||
text-align: left; |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 700; |
||||
padding: 4px 8px; |
||||
border: #e0e0e0 1px solid; |
||||
} |
||||
|
||||
td { |
||||
vertical-align: top; |
||||
padding: 10px 8px 0 8px; |
||||
border: #e0e0e0 1px solid; |
||||
} |
||||
|
||||
#generator .content { |
||||
color: #b0b0b0; |
||||
border-top: 1px solid #ebebeb; |
||||
padding: 10px 0; |
||||
} |
||||
|
||||
.label-optional { |
||||
float: right; |
||||
background-color: grey; |
||||
margin-top: 4px; |
||||
} |
||||
|
||||
.open-left { |
||||
right: 0; |
||||
left: auto; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* apidoc - intro |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
|
||||
#apidoc .apidoc { |
||||
border-top: 1px solid #ebebeb; |
||||
padding: 30px 0; |
||||
} |
||||
|
||||
#apidoc h1 { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 700; |
||||
font-size: 32px; |
||||
line-height: 40px; |
||||
padding-bottom: 14px; |
||||
margin: 0 0 20px 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
#apidoc h2 { |
||||
font-family: "Source Sans Pro Bold", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 22px; |
||||
line-height: 26px; |
||||
padding-top: 14px; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* pre / code |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
pre { |
||||
background-color: #292b36; |
||||
color: #ffffff; |
||||
padding: 10px; |
||||
border-radius: 6px; |
||||
position: relative; |
||||
margin: 10px 0 20px 0; |
||||
overflow-x: auto; |
||||
} |
||||
|
||||
pre.prettyprint { |
||||
width: 100%; |
||||
} |
||||
|
||||
code.language-text { |
||||
word-wrap: break-word; |
||||
} |
||||
|
||||
pre.language-json { |
||||
overflow: auto; |
||||
} |
||||
|
||||
pre.language-html { |
||||
margin: 0 0 20px 0; |
||||
} |
||||
|
||||
.type { |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 600; |
||||
font-size: 15px; |
||||
display: inline-block; |
||||
margin: 0 0 5px 0; |
||||
padding: 4px 5px; |
||||
border-radius: 6px; |
||||
text-transform: uppercase; |
||||
background-color: #3387CC; |
||||
color: #ffffff; |
||||
} |
||||
|
||||
.type__get { |
||||
background-color: green; |
||||
} |
||||
|
||||
.type__put { |
||||
background-color: #e5c500; |
||||
} |
||||
|
||||
.type__post { |
||||
background-color: #4070ec; |
||||
} |
||||
|
||||
.type__delete { |
||||
background-color: #ed0039; |
||||
} |
||||
|
||||
pre.language-api .str { |
||||
color: #ffffff; |
||||
} |
||||
|
||||
pre.language-api .pln, |
||||
pre.language-api .pun { |
||||
color: #65B042; |
||||
} |
||||
|
||||
pre code { |
||||
display: block; |
||||
font-size: 14px; |
||||
font-family: "Source Code Pro", monospace; |
||||
font-style: normal; |
||||
font-weight: 400; |
||||
word-wrap: normal; |
||||
white-space: pre; |
||||
} |
||||
|
||||
pre code.sample-request-response-json { |
||||
white-space: pre-wrap; |
||||
max-height: 500px; |
||||
overflow: auto; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Sidenav |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
.sidenav { |
||||
width: 228px; |
||||
margin: 0; |
||||
padding: 0 20px 20px 20px; |
||||
position: fixed; |
||||
top: 50px; |
||||
left: 0; |
||||
bottom: 0; |
||||
overflow-x: hidden; |
||||
overflow-y: auto; |
||||
background-color: #f5f5f5; |
||||
z-index: 10; |
||||
} |
||||
|
||||
.sidenav > li > a { |
||||
display: block; |
||||
width: 192px; |
||||
margin: 0; |
||||
padding: 2px 11px; |
||||
border: 0; |
||||
border-left: transparent 4px solid; |
||||
border-right: transparent 4px solid; |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 400; |
||||
font-size: 14px; |
||||
} |
||||
|
||||
.sidenav > li.nav-header { |
||||
margin-top: 8px; |
||||
margin-bottom: 8px; |
||||
} |
||||
|
||||
.sidenav > li.nav-header > a { |
||||
padding: 5px 15px; |
||||
border: 1px solid #e5e5e5; |
||||
width: 190px; |
||||
font-family: "Source Sans Pro", sans-serif; |
||||
font-weight: 700; |
||||
font-size: 16px; |
||||
background-color: #ffffff; |
||||
} |
||||
|
||||
.sidenav > li.active > a { |
||||
position: relative; |
||||
z-index: 2; |
||||
background-color: #0088cc; |
||||
color: #ffffff; |
||||
} |
||||
|
||||
.sidenav > li.has-modifications a { |
||||
border-right: #60d060 4px solid; |
||||
} |
||||
|
||||
.sidenav > li.is-new a { |
||||
border-left: #e5e5e5 4px solid; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Side nav search |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
.sidenav-search { |
||||
width: 228px; |
||||
left: 0px; |
||||
position: fixed; |
||||
padding: 16px 20px 10px 20px; |
||||
background-color: #F5F5F5; |
||||
z-index: 11; |
||||
} |
||||
|
||||
.sidenav-search .search { |
||||
height: 26px; |
||||
} |
||||
|
||||
.search-reset { |
||||
position: absolute; |
||||
display: block; |
||||
cursor: pointer; |
||||
width: 20px; |
||||
height: 20px; |
||||
text-align: center; |
||||
right: 28px; |
||||
top: 17px; |
||||
background-color: #fff; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Compare |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
|
||||
ins { |
||||
background: #60d060; |
||||
text-decoration: none; |
||||
color: #000000; |
||||
} |
||||
|
||||
del { |
||||
background: #f05050; |
||||
color: #000000; |
||||
} |
||||
|
||||
.label-ins { |
||||
background-color: #60d060; |
||||
} |
||||
|
||||
.label-del { |
||||
background-color: #f05050; |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
pre.ins { |
||||
background-color: #60d060; |
||||
} |
||||
|
||||
pre.del { |
||||
background-color: #f05050; |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
table.ins th, |
||||
table.ins td { |
||||
background-color: #60d060; |
||||
} |
||||
|
||||
table.del th, |
||||
table.del td { |
||||
background-color: #f05050; |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
tr.ins td { |
||||
background-color: #60d060; |
||||
} |
||||
|
||||
tr.del td { |
||||
background-color: #f05050; |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Spinner |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
|
||||
#loader { |
||||
position: absolute; |
||||
width: 100%; |
||||
} |
||||
|
||||
#loader p { |
||||
padding-top: 80px; |
||||
margin-left: -4px; |
||||
} |
||||
|
||||
.spinner { |
||||
margin: 200px auto; |
||||
width: 60px; |
||||
height: 60px; |
||||
position: relative; |
||||
} |
||||
|
||||
.container1 > div, .container2 > div, .container3 > div { |
||||
width: 14px; |
||||
height: 14px; |
||||
background-color: #0088cc; |
||||
|
||||
border-radius: 100%; |
||||
position: absolute; |
||||
-webkit-animation: bouncedelay 1.2s infinite ease-in-out; |
||||
animation: bouncedelay 1.2s infinite ease-in-out; |
||||
/* Prevent first frame from flickering when animation starts */ |
||||
-webkit-animation-fill-mode: both; |
||||
animation-fill-mode: both; |
||||
} |
||||
|
||||
.spinner .spinner-container { |
||||
position: absolute; |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.container2 { |
||||
-webkit-transform: rotateZ(45deg); |
||||
transform: rotateZ(45deg); |
||||
} |
||||
|
||||
.container3 { |
||||
-webkit-transform: rotateZ(90deg); |
||||
transform: rotateZ(90deg); |
||||
} |
||||
|
||||
.circle1 { top: 0; left: 0; } |
||||
.circle2 { top: 0; right: 0; } |
||||
.circle3 { right: 0; bottom: 0; } |
||||
.circle4 { left: 0; bottom: 0; } |
||||
|
||||
.container2 .circle1 { |
||||
-webkit-animation-delay: -1.1s; |
||||
animation-delay: -1.1s; |
||||
} |
||||
|
||||
.container3 .circle1 { |
||||
-webkit-animation-delay: -1.0s; |
||||
animation-delay: -1.0s; |
||||
} |
||||
|
||||
.container1 .circle2 { |
||||
-webkit-animation-delay: -0.9s; |
||||
animation-delay: -0.9s; |
||||
} |
||||
|
||||
.container2 .circle2 { |
||||
-webkit-animation-delay: -0.8s; |
||||
animation-delay: -0.8s; |
||||
} |
||||
|
||||
.container3 .circle2 { |
||||
-webkit-animation-delay: -0.7s; |
||||
animation-delay: -0.7s; |
||||
} |
||||
|
||||
.container1 .circle3 { |
||||
-webkit-animation-delay: -0.6s; |
||||
animation-delay: -0.6s; |
||||
} |
||||
|
||||
.container2 .circle3 { |
||||
-webkit-animation-delay: -0.5s; |
||||
animation-delay: -0.5s; |
||||
} |
||||
|
||||
.container3 .circle3 { |
||||
-webkit-animation-delay: -0.4s; |
||||
animation-delay: -0.4s; |
||||
} |
||||
|
||||
.container1 .circle4 { |
||||
-webkit-animation-delay: -0.3s; |
||||
animation-delay: -0.3s; |
||||
} |
||||
|
||||
.container2 .circle4 { |
||||
-webkit-animation-delay: -0.2s; |
||||
animation-delay: -0.2s; |
||||
} |
||||
|
||||
.container3 .circle4 { |
||||
-webkit-animation-delay: -0.1s; |
||||
animation-delay: -0.1s; |
||||
} |
||||
|
||||
@-webkit-keyframes bouncedelay { |
||||
0%, 80%, 100% { -webkit-transform: scale(0.0) } |
||||
40% { -webkit-transform: scale(1.0) } |
||||
} |
||||
|
||||
@keyframes bouncedelay { |
||||
0%, 80%, 100% { |
||||
transform: scale(0.0); |
||||
-webkit-transform: scale(0.0); |
||||
} 40% { |
||||
transform: scale(1.0); |
||||
-webkit-transform: scale(1.0); |
||||
} |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Tabs |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
ul.nav-tabs { |
||||
margin: 0; |
||||
} |
||||
|
||||
p.deprecated span{ |
||||
color: #ff0000; |
||||
font-weight: bold; |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
/* ------------------------------------------------------------------------------------------ |
||||
* Print |
||||
* ------------------------------------------------------------------------------------------ */ |
||||
|
||||
@media print { |
||||
|
||||
#sidenav, |
||||
#version, |
||||
#versions, |
||||
section .version, |
||||
section .versions { |
||||
display: none; |
||||
} |
||||
|
||||
#content { |
||||
margin-left: 0; |
||||
} |
||||
|
||||
a { |
||||
text-decoration: none; |
||||
color: inherit; |
||||
} |
||||
|
||||
a:after { |
||||
content: " [" attr(href) "] "; |
||||
} |
||||
|
||||
p { |
||||
color: #000000 |
||||
} |
||||
|
||||
pre { |
||||
background-color: #ffffff; |
||||
color: #000000; |
||||
padding: 10px; |
||||
border: #808080 1px solid; |
||||
border-radius: 6px; |
||||
position: relative; |
||||
margin: 10px 0 20px 0; |
||||
} |
||||
|
||||
} /* /@media print */ |
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 894 B |
@ -0,0 +1,669 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
||||
<title>Loading...</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
||||
<link href="vendor/bootstrap.min.css" rel="stylesheet" media="screen"> |
||||
<link href="vendor/prettify.css" rel="stylesheet" media="screen"> |
||||
<link href="css/style.css" rel="stylesheet" media="screen, print"> |
||||
<link href="img/favicon.ico" rel="icon" type="image/x-icon"> |
||||
<script src="vendor/polyfill.js"></script> |
||||
</head> |
||||
<body> |
||||
|
||||
<script id="template-sidenav" type="text/x-handlebars-template"> |
||||
<nav id="scrollingNav"> |
||||
<div class="sidenav-search"> |
||||
<input class="form-control search" type="text" placeholder="{{__ "Filter..."}}"> |
||||
<span class="search-reset">x</span> |
||||
</div> |
||||
<ul class="sidenav nav nav-list list"> |
||||
{{#each nav}} |
||||
{{#if title}} |
||||
{{#if isHeader}} |
||||
{{#if isFixed}} |
||||
<li class="nav-fixed nav-header navbar-btn nav-list-item" data-group="{{group}}"><a href="#api-{{group}}">{{underscoreToSpace title}}</a></li> |
||||
{{else}} |
||||
<li class="nav-header nav-list-item" data-group="{{group}}"><a href="#api-{{group}}">{{underscoreToSpace title}}</a></li> |
||||
{{/if}} |
||||
{{else}} |
||||
<li class="{{#if hidden}}hide {{/if}}" data-group="{{group}}" data-name="{{name}}" data-version="{{version}}"> |
||||
<a href="#api-{{group}}-{{name}}" class="nav-list-item">{{title}}</a> |
||||
</li> |
||||
{{/if}} |
||||
{{/if}} |
||||
{{/each}} |
||||
</ul> |
||||
</nav> |
||||
</script> |
||||
|
||||
<script id="template-project" type="text/x-handlebars-template"> |
||||
<div class="pull-left"> |
||||
<h1>{{name}}</h1> |
||||
{{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}} |
||||
</div> |
||||
{{#if template.withCompare}} |
||||
<div class="pull-right"> |
||||
<div class="btn-group"> |
||||
<button id="version" class="btn btn-lg btn-default dropdown-toggle" data-toggle="dropdown"> |
||||
<strong>{{version}}</strong> <span class="caret"></span> |
||||
</button> |
||||
<ul id="versions" class="dropdown-menu open-left"> |
||||
<li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li> |
||||
<li class="divider"></li> |
||||
<li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li> |
||||
{{#each versions}} |
||||
<li class="version"><a href="#">{{this}}</a></li> |
||||
{{/each}} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
{{/if}} |
||||
<div class="clearfix"></div> |
||||
</script> |
||||
|
||||
<script id="template-header" type="text/x-handlebars-template"> |
||||
{{#if content}} |
||||
<div id="api-_">{{{content}}}</div> |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-footer" type="text/x-handlebars-template"> |
||||
{{#if content}} |
||||
<div id="api-_footer">{{{content}}}</div> |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-generator" type="text/x-handlebars-template"> |
||||
{{#if template.withGenerator}} |
||||
{{#if generator}} |
||||
<div class="content"> |
||||
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}} |
||||
</div> |
||||
{{/if}} |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-sections" type="text/x-handlebars-template"> |
||||
<section id="api-{{group}}"> |
||||
<h1>{{underscoreToSpace title}}</h1> |
||||
{{#if description}} |
||||
<p>{{{nl2br description}}}</p> |
||||
{{/if}} |
||||
{{#each articles}} |
||||
<div id="api-{{group}}-{{name}}"> |
||||
{{{article}}} |
||||
</div> |
||||
{{/each}} |
||||
</section> |
||||
</script> |
||||
|
||||
<script id="template-article" type="text/x-handlebars-template"> |
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}"> |
||||
<div class="pull-left"> |
||||
<h1>{{article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1> |
||||
</div> |
||||
{{#if template.withCompare}} |
||||
<div class="pull-right"> |
||||
<div class="btn-group"> |
||||
<button class="version btn btn-default dropdown-toggle" data-toggle="dropdown"> |
||||
<strong>{{article.version}}</strong> <span class="caret"></span> |
||||
</button> |
||||
<ul class="versions dropdown-menu open-left"> |
||||
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li> |
||||
{{#each versions}} |
||||
<li class="version"><a href="#">{{this}}</a></li> |
||||
{{/each}} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
{{/if}} |
||||
<div class="clearfix"></div> |
||||
|
||||
{{#if article.deprecated}} |
||||
<p class="deprecated"><span>{{__ "DEPRECATED"}}</span> |
||||
{{{markdown article.deprecated.content}}} |
||||
</p> |
||||
{{/if}} |
||||
|
||||
{{#if article.description}} |
||||
<p>{{{nl2br article.description}}}</p> |
||||
{{/if}} |
||||
<span class="type type__{{toLowerCase article.type}}">{{toLowerCase article.type}}</span> |
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{article.url}}</code></pre> |
||||
|
||||
{{#if article.permission}} |
||||
<p> |
||||
{{__ "Permission:"}} |
||||
{{#each article.permission}} |
||||
{{name}} |
||||
{{#if title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{title}}" data-content="{{nl2br description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{/if}} |
||||
{{/each}} |
||||
</p> |
||||
{{/if}} |
||||
|
||||
{{#if_gt article.examples.length compare=0}} |
||||
<ul class="nav nav-tabs nav-tabs-examples"> |
||||
{{#each article.examples}} |
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#examples-{{../id}}-{{@index}}">{{title}}</a> |
||||
</li> |
||||
{{/each}} |
||||
</ul> |
||||
|
||||
<div class="tab-content"> |
||||
{{#each article.examples}} |
||||
<div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="examples-{{../id}}-{{@index}}"> |
||||
<pre class="prettyprint language-{{type}}" data-type="{{type}}"><code>{{content}}</code></pre> |
||||
</div> |
||||
{{/each}} |
||||
</div> |
||||
{{/if_gt}} |
||||
|
||||
{{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}} |
||||
{{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}} |
||||
{{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}} |
||||
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}} |
||||
|
||||
{{subTemplate "article-sample-request" article=article id=id}} |
||||
</article> |
||||
</script> |
||||
|
||||
<script id="template-article-param-block" type="text/x-handlebars-template"> |
||||
{{#if params}} |
||||
{{#each params.fields}} |
||||
<h2>{{__ @key}}</h2> |
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th> |
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}} |
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{#each this}} |
||||
<tr> |
||||
<td class="code">{{{splitFill field "." " "}}}{{#if optional}} <span class="label label-optional">{{__ "optional"}}</span>{{/if}}</td> |
||||
{{#if ../../_hasType}} |
||||
<td> |
||||
{{{type}}} |
||||
</td> |
||||
{{/if}} |
||||
<td> |
||||
{{{nl2br description}}} |
||||
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}} |
||||
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}} |
||||
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}} |
||||
{{#each allowedValues}} |
||||
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}} |
||||
{{/each}} |
||||
</p> |
||||
{{/if}} |
||||
</td> |
||||
</tr> |
||||
{{/each}} |
||||
</tbody> |
||||
</table> |
||||
{{/each}} |
||||
{{#if_gt params.examples.length compare=0}} |
||||
<ul class="nav nav-tabs nav-tabs-examples"> |
||||
{{#each params.examples}} |
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a> |
||||
</li> |
||||
{{/each}} |
||||
</ul> |
||||
|
||||
<div class="tab-content"> |
||||
{{#each params.examples}} |
||||
<div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="{{../section}}-examples-{{../id}}-{{@index}}"> |
||||
<pre class="prettyprint language-{{type}}" data-type="{{type}}"><code>{{reformat content type}}</code></pre> |
||||
</div> |
||||
{{/each}} |
||||
</div> |
||||
{{/if_gt}} |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-article-sample-request" type="text/x-handlebars-template"> |
||||
{{#if article.sampleRequest}} |
||||
<h2>{{__ "Send a Sample Request"}}</h2> |
||||
<form class="form-horizontal"> |
||||
<fieldset> |
||||
<div class="form-group"> |
||||
<label class="col-md-3 control-label" for="{{../id}}-sample-request-url"></label> |
||||
<div class="input-group"> |
||||
<input id="{{../id}}-sample-request-url" type="text" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" /> |
||||
<span class="input-group-addon">{{__ "url"}}</span> |
||||
</div> |
||||
</div> |
||||
|
||||
{{#if article.header}} |
||||
{{#if article.header.fields}} |
||||
<h3>{{__ "Headers"}}</h3> |
||||
{{#each article.header.fields}} |
||||
<h4><input type="radio" data-sample-request-header-group-id="sample-request-header-{{@index}}" name="{{../id}}-sample-request-header" value="{{@index}}" class="sample-request-header sample-request-switch" {{#if_eq @index compare=0}} checked{{/if_eq}} />{{@key}}</h4> |
||||
<div class="{{../id}}-sample-request-header-fields{{#if_gt @index compare=0}} hide{{/if_gt}}"> |
||||
{{#each this}} |
||||
<div class="form-group"> |
||||
<label class="col-md-3 control-label" for="sample-request-header-field-{{field}}">{{field}}</label> |
||||
<div class="input-group"> |
||||
<input type="text" placeholder="{{field}}" id="sample-request-header-field-{{field}}" class="form-control sample-request-header" data-sample-request-header-name="{{field}}" data-sample-request-header-group="sample-request-header-{{@../index}}"> |
||||
<span class="input-group-addon">{{{type}}}</span> |
||||
</div> |
||||
</div> |
||||
{{/each}} |
||||
</div> |
||||
{{/each}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
{{#if article.parameter}} |
||||
{{#if article.parameter.fields}} |
||||
<h3>{{__ "Parameters"}}</h3> |
||||
{{#each article.parameter.fields}} |
||||
<h4><input type="radio" data-sample-request-param-group-id="sample-request-param-{{@index}}" name="{{../id}}-sample-request-param" value="{{@index}}" class="sample-request-param sample-request-switch" {{#if_eq @index compare=0}} checked{{/if_eq}} />{{@key}}</h4> |
||||
<div class="form-group {{../id}}-sample-request-param-fields{{#if_gt @index compare=0}} hide{{/if_gt}}"> |
||||
{{#each this}} |
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label> |
||||
<div class="input-group"> |
||||
<input id="sample-request-param-field-{{field}}" type="text" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}" data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true"{{/if}}> |
||||
<div class="input-group-addon">{{{type}}}</div> |
||||
</div> |
||||
{{/each}} |
||||
</div> |
||||
{{/each}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
<div class="form-group"> |
||||
<div class="controls pull-right"> |
||||
<button class="btn btn-primary sample-request-send" data-sample-request-type="{{article.type}}">{{__ "Send"}}</button> |
||||
</div> |
||||
</div> |
||||
<div class="form-group sample-request-response" style="display: none;"> |
||||
<h3> |
||||
{{__ "Response"}} |
||||
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button> |
||||
</h3> |
||||
<pre class="prettyprint language-json" data-type="json"><code class="sample-request-response-json"></code></pre> |
||||
</div> |
||||
</fieldset> |
||||
</form> |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-compare-article" type="text/x-handlebars-template"> |
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}"> |
||||
<div class="pull-left"> |
||||
<h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.title}}}</h1> |
||||
</div> |
||||
|
||||
<div class="pull-right"> |
||||
<div class="btn-group"> |
||||
<button class="btn btn-success" disabled> |
||||
<strong>{{article.version}}</strong> {{__ "compared to"}} |
||||
</button> |
||||
<button class="version btn btn-danger dropdown-toggle" data-toggle="dropdown"> |
||||
<strong>{{compare.version}}</strong> <span class="caret"></span> |
||||
</button> |
||||
<ul class="versions dropdown-menu open-left"> |
||||
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li> |
||||
<li class="divider"></li> |
||||
{{#each versions}} |
||||
<li class="version"><a href="#">{{this}}</a></li> |
||||
{{/each}} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="clearfix"></div> |
||||
|
||||
{{#if article.description}} |
||||
<p>{{{showDiff article.description compare.description "nl2br"}}}</p> |
||||
{{else}} |
||||
{{#if compare.description}} |
||||
<p>{{{showDiff "" compare.description "nl2br"}}}</p> |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{{showDiff article.url compare.url}}}</code></pre> |
||||
|
||||
{{subTemplate "article-compare-permission" article=article compare=compare}} |
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples"> |
||||
{{#each_compare_title article.examples compare.examples}} |
||||
{{#if typeSame}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a> |
||||
</li> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a> |
||||
</li> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a> |
||||
</li> |
||||
{{/if}} |
||||
{{/each_compare_title}} |
||||
</ul> |
||||
|
||||
<div class="tab-content"> |
||||
{{#each_compare_title article.examples compare.examples}} |
||||
|
||||
{{#if typeSame}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{showDiff source.content compare.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{source.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{compare.type}}"><code>{{{compare.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
|
||||
{{/each_compare_title}} |
||||
</div> |
||||
|
||||
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}} |
||||
{{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}} |
||||
{{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}} |
||||
|
||||
{{subTemplate "article-sample-request" article=article id=id}} |
||||
|
||||
</article> |
||||
</script> |
||||
|
||||
<script id="template-article-compare-permission" type="text/x-handlebars-template"> |
||||
<p> |
||||
{{__ "Permission:"}} |
||||
{{#each_compare_list_field article.permission compare.permission field="name"}} |
||||
{{#if source}} |
||||
{{#if typeSame}} |
||||
{{source.name}} |
||||
{{#if source.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<ins>{{source.name}}</ins> |
||||
{{#if source.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<del>{{source.name}}</del> |
||||
{{#if source.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
{{else}} |
||||
{{#if typeSame}} |
||||
{{compare.name}} |
||||
{{#if compare.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<ins>{{compare.name}}</ins> |
||||
{{#if compare.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<del>{{compare.name}}</del> |
||||
{{#if compare.title}} |
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover"> |
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> |
||||
</button> |
||||
{{#unless _last}}, {{/unless}} |
||||
{{/if}} |
||||
{{/if}} |
||||
{{/if}} |
||||
{{/each_compare_list_field}} |
||||
</p> |
||||
</script> |
||||
|
||||
<script id="template-article-compare-param-block" type="text/x-handlebars-template"> |
||||
{{#if source}} |
||||
{{#each_compare_keys source.fields compare.fields}} |
||||
{{#if typeSame}} |
||||
<h2>{{__ source.key}}</h2> |
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th> |
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}} |
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th> |
||||
</tr> |
||||
</thead> |
||||
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}} |
||||
</table> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<h2><ins>{{__ source.key}}</ins></h2> |
||||
<table class="ins"> |
||||
<thead> |
||||
<tr> |
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th> |
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}} |
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th> |
||||
</tr> |
||||
</thead> |
||||
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}} |
||||
</table> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<h2><del>{{__ compare.key}}</del></h2> |
||||
<table class="del"> |
||||
<thead> |
||||
<tr> |
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th> |
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}} |
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th> |
||||
</tr> |
||||
</thead> |
||||
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}} |
||||
</table> |
||||
{{/if}} |
||||
{{/each_compare_keys}} |
||||
|
||||
{{#if source.examples}} |
||||
<ul class="nav nav-tabs nav-tabs-examples"> |
||||
{{#each_compare_title source.examples compare.examples}} |
||||
{{#if typeSame}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a> |
||||
</li> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a> |
||||
</li> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}> |
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a> |
||||
</li> |
||||
{{/if}} |
||||
{{/each_compare_title}} |
||||
</ul> |
||||
|
||||
<div class="tab-content"> |
||||
{{#each_compare_title source.examples compare.examples}} |
||||
|
||||
{{#if typeSame}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{showDiff source.content compare.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{source.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"> |
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{compare.type}}"><code>{{{compare.content}}}</code></pre> |
||||
</div> |
||||
{{/if}} |
||||
{{/each_compare_title}} |
||||
</div> |
||||
{{/if}} |
||||
{{/if}} |
||||
</script> |
||||
|
||||
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template"> |
||||
<tbody> |
||||
{{#each_compare_field source compare}} |
||||
{{#if typeSame}} |
||||
<tr> |
||||
<td class="code"> |
||||
{{{splitFill source.field "." " "}}} |
||||
{{#if source.optional}} |
||||
{{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span> |
||||
{{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span> |
||||
{{/if}} |
||||
{{else}} |
||||
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}} |
||||
{{/if}} |
||||
</td> |
||||
|
||||
{{#if source.type}} |
||||
{{#if compare.type}} |
||||
<td>{{{showDiff source.type compare.type}}}</td> |
||||
{{else}} |
||||
<td>{{{source.type}}}</td> |
||||
{{/if}} |
||||
{{else}} |
||||
{{#if compare.type}} |
||||
<td>{{{compare.type}}}</td> |
||||
{{else}} |
||||
{{#if ../../../../_hasType}}<td></td>{{/if}} |
||||
{{/if}} |
||||
{{/if}} |
||||
<td> |
||||
{{{showDiff source.description compare.description "nl2br"}}} |
||||
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code><p>{{/if}} |
||||
</td> |
||||
</tr> |
||||
{{/if}} |
||||
|
||||
{{#if typeIns}} |
||||
<tr class="ins"> |
||||
<td class="code"> |
||||
{{{splitFill source.field "." " "}}} |
||||
{{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}} |
||||
</td> |
||||
|
||||
{{#if source.type}} |
||||
<td>{{{source.type}}}</td> |
||||
{{else}} |
||||
{{{typRowTd}}} |
||||
{{/if}} |
||||
|
||||
<td> |
||||
{{{nl2br source.description}}} |
||||
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code><p>{{/if}} |
||||
</td> |
||||
</tr> |
||||
{{/if}} |
||||
|
||||
{{#if typeDel}} |
||||
<tr class="del"> |
||||
<td class="code"> |
||||
{{{splitFill compare.field "." " "}}} |
||||
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}} |
||||
</td> |
||||
|
||||
{{#if compare.type}} |
||||
<td>{{{compare.type}}}</td> |
||||
{{else}} |
||||
{{{typRowTd}}} |
||||
{{/if}} |
||||
|
||||
<td> |
||||
{{{nl2br compare.description}}} |
||||
{{#if compare.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{compare.defaultValue}}}</code><p>{{/if}} |
||||
</td> |
||||
</tr> |
||||
{{/if}} |
||||
|
||||
{{/each_compare_field}} |
||||
</tbody> |
||||
</script> |
||||
|
||||
<div class="container-fluid"> |
||||
<div class="row"> |
||||
<div id="sidenav" class="span2"></div> |
||||
<div id="content"> |
||||
<div id="project"></div> |
||||
<div id="header"></div> |
||||
<div id="sections"></div> |
||||
<div id="footer"></div> |
||||
<div id="generator"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div id="loader"> |
||||
<div class="spinner"> |
||||
<div class="spinner-container container1"> |
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div> |
||||
</div> |
||||
<div class="spinner-container container2"> |
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div> |
||||
</div> |
||||
<div class="spinner-container container3"> |
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div> |
||||
</div> |
||||
<p>Loading...</p> |
||||
</div> |
||||
</div> |
||||
|
||||
<script data-main="main.js" src="vendor/require.min.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
ca: { |
||||
'Allowed values:' : 'Valors permesos:', |
||||
'Compare all with predecessor': 'Comparar tot amb versió anterior', |
||||
'compare changes to:' : 'comparar canvis amb:', |
||||
'compared to' : 'comparat amb', |
||||
'Default value:' : 'Valor per defecte:', |
||||
'Description' : 'Descripció', |
||||
'Field' : 'Camp', |
||||
'General' : 'General', |
||||
'Generated with' : 'Generat amb', |
||||
'Name' : 'Nom', |
||||
'No response values.' : 'Sense valors en la resposta.', |
||||
'optional' : 'opcional', |
||||
'Parameter' : 'Paràmetre', |
||||
'Permission:' : 'Permisos:', |
||||
'Response' : 'Resposta', |
||||
'Send' : 'Enviar', |
||||
'Send a Sample Request' : 'Enviar una petició d\'exemple', |
||||
'show up to version:' : 'mostrar versió:', |
||||
'Size range:' : 'Tamany de rang:', |
||||
'Type' : 'Tipus', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
cs: { |
||||
'Allowed values:' : 'Povolené hodnoty:', |
||||
'Compare all with predecessor': 'Porovnat vše s předchozími verzemi', |
||||
'compare changes to:' : 'porovnat změny s:', |
||||
'compared to' : 'porovnat s', |
||||
'Default value:' : 'Výchozí hodnota:', |
||||
'Description' : 'Popis', |
||||
'Field' : 'Pole', |
||||
'General' : 'Obecné', |
||||
'Generated with' : 'Vygenerováno pomocí', |
||||
'Name' : 'Název', |
||||
'No response values.' : 'Nebyly vráceny žádné hodnoty.', |
||||
'optional' : 'volitelné', |
||||
'Parameter' : 'Parametr', |
||||
'Permission:' : 'Oprávnění:', |
||||
'Response' : 'Odpověď', |
||||
'Send' : 'Odeslat', |
||||
'Send a Sample Request' : 'Odeslat ukázkový požadavek', |
||||
'show up to version:' : 'zobrazit po verzi:', |
||||
'Size range:' : 'Rozsah velikosti:', |
||||
'Type' : 'Typ', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
de: { |
||||
'Allowed values:' : 'Erlaubte Werte:', |
||||
'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern', |
||||
'compare changes to:' : 'vergleiche Änderungen mit:', |
||||
'compared to' : 'verglichen mit', |
||||
'Default value:' : 'Standardwert:', |
||||
'Description' : 'Beschreibung', |
||||
'Field' : 'Feld', |
||||
'General' : 'Allgemein', |
||||
'Generated with' : 'Erstellt mit', |
||||
'Name' : 'Name', |
||||
'No response values.' : 'Keine Rückgabewerte.', |
||||
'optional' : 'optional', |
||||
'Parameter' : 'Parameter', |
||||
'Permission:' : 'Berechtigung:', |
||||
'Response' : 'Antwort', |
||||
'Send' : 'Senden', |
||||
'Send a Sample Request' : 'Eine Beispielanfrage senden', |
||||
'show up to version:' : 'zeige bis zur Version:', |
||||
'Size range:' : 'Größenbereich:', |
||||
'Type' : 'Typ', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
es: { |
||||
'Allowed values:' : 'Valores permitidos:', |
||||
'Compare all with predecessor': 'Comparar todo con versión anterior', |
||||
'compare changes to:' : 'comparar cambios con:', |
||||
'compared to' : 'comparado con', |
||||
'Default value:' : 'Valor por defecto:', |
||||
'Description' : 'Descripción', |
||||
'Field' : 'Campo', |
||||
'General' : 'General', |
||||
'Generated with' : 'Generado con', |
||||
'Name' : 'Nombre', |
||||
'No response values.' : 'Sin valores en la respuesta.', |
||||
'optional' : 'opcional', |
||||
'Parameter' : 'Parámetro', |
||||
'Permission:' : 'Permisos:', |
||||
'Response' : 'Respuesta', |
||||
'Send' : 'Enviar', |
||||
'Send a Sample Request' : 'Enviar una petición de ejemplo', |
||||
'show up to version:' : 'mostrar a versión:', |
||||
'Size range:' : 'Tamaño de rango:', |
||||
'Type' : 'Tipo', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
fr: { |
||||
'Allowed values:' : 'Valeurs autorisées :', |
||||
'Compare all with predecessor': 'Tout comparer avec ...', |
||||
'compare changes to:' : 'comparer les changements à :', |
||||
'compared to' : 'comparer à', |
||||
'Default value:' : 'Valeur par défaut :', |
||||
'Description' : 'Description', |
||||
'Field' : 'Champ', |
||||
'General' : 'Général', |
||||
'Generated with' : 'Généré avec', |
||||
'Name' : 'Nom', |
||||
'No response values.' : 'Aucune valeur de réponse.', |
||||
'optional' : 'optionnel', |
||||
'Parameter' : 'Paramètre', |
||||
'Permission:' : 'Permission :', |
||||
'Response' : 'Réponse', |
||||
'Send' : 'Envoyer', |
||||
'Send a Sample Request' : 'Envoyer une requête représentative', |
||||
'show up to version:' : 'Montrer à partir de la version :', |
||||
'Size range:' : 'Ordre de grandeur :', |
||||
'Type' : 'Type', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
it: { |
||||
'Allowed values:' : 'Valori permessi:', |
||||
'Compare all with predecessor': 'Confronta tutto con versioni precedenti', |
||||
'compare changes to:' : 'confronta modifiche con:', |
||||
'compared to' : 'confrontato con', |
||||
'Default value:' : 'Valore predefinito:', |
||||
'Description' : 'Descrizione', |
||||
'Field' : 'Campo', |
||||
'General' : 'Generale', |
||||
'Generated with' : 'Creato con', |
||||
'Name' : 'Nome', |
||||
'No response values.' : 'Nessun valore di risposta.', |
||||
'optional' : 'opzionale', |
||||
'Parameter' : 'Parametro', |
||||
'Permission:' : 'Permessi:', |
||||
'Response' : 'Risposta', |
||||
'Send' : 'Invia', |
||||
'Send a Sample Request' : 'Invia una richiesta di esempio', |
||||
'show up to version:' : 'mostra alla versione:', |
||||
'Size range:' : 'Intervallo dimensione:', |
||||
'Type' : 'Tipo', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
nl: { |
||||
'Allowed values:' : 'Toegestane waarden:', |
||||
'Compare all with predecessor': 'Vergelijk alle met voorgaande versie', |
||||
'compare changes to:' : 'vergelijk veranderingen met:', |
||||
'compared to' : 'vergelijk met', |
||||
'Default value:' : 'Standaard waarde:', |
||||
'Description' : 'Omschrijving', |
||||
'Field' : 'Veld', |
||||
'General' : 'Algemeen', |
||||
'Generated with' : 'Gegenereerd met', |
||||
'Name' : 'Naam', |
||||
'No response values.' : 'Geen response waardes.', |
||||
'optional' : 'optioneel', |
||||
'Parameter' : 'Parameter', |
||||
'Permission:' : 'Permissie:', |
||||
'Response' : 'Antwoorden', |
||||
'Send' : 'Sturen', |
||||
'Send a Sample Request' : 'Stuur een sample aanvragen', |
||||
'show up to version:' : 'toon tot en met versie:', |
||||
'Size range:' : 'Maatbereik:', |
||||
'Type' : 'Type', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
pl: { |
||||
'Allowed values:' : 'Dozwolone wartości:', |
||||
'Compare all with predecessor': 'Porównaj z poprzednimi wersjami', |
||||
'compare changes to:' : 'porównaj zmiany do:', |
||||
'compared to' : 'porównaj do:', |
||||
'Default value:' : 'Wartość domyślna:', |
||||
'Description' : 'Opis', |
||||
'Field' : 'Pole', |
||||
'General' : 'Generalnie', |
||||
'Generated with' : 'Wygenerowano z', |
||||
'Name' : 'Nazwa', |
||||
'No response values.' : 'Brak odpowiedzi.', |
||||
'optional' : 'opcjonalny', |
||||
'Parameter' : 'Parametr', |
||||
'Permission:' : 'Uprawnienia:', |
||||
'Response' : 'Odpowiedź', |
||||
'Send' : 'Wyślij', |
||||
'Send a Sample Request' : 'Wyślij przykładowe żądanie', |
||||
'show up to version:' : 'pokaż do wersji:', |
||||
'Size range:' : 'Zakres rozmiaru:', |
||||
'Type' : 'Typ', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
'pt_br': { |
||||
'Allowed values:' : 'Valores permitidos:', |
||||
'Compare all with predecessor': 'Compare todos com antecessores', |
||||
'compare changes to:' : 'comparar alterações com:', |
||||
'compared to' : 'comparado com', |
||||
'Default value:' : 'Valor padrão:', |
||||
'Description' : 'Descrição', |
||||
'Field' : 'Campo', |
||||
'General' : 'Geral', |
||||
'Generated with' : 'Gerado com', |
||||
'Name' : 'Nome', |
||||
'No response values.' : 'Sem valores de resposta.', |
||||
'optional' : 'opcional', |
||||
'Parameter' : 'Parâmetro', |
||||
'Permission:' : 'Permissão:', |
||||
'Response' : 'Resposta', |
||||
'Send' : 'Enviar', |
||||
'Send a Sample Request' : 'Enviar um Exemplo de Pedido', |
||||
'show up to version:' : 'aparecer para a versão:', |
||||
'Size range:' : 'Faixa de tamanho:', |
||||
'Type' : 'Tipo', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
ro: { |
||||
'Allowed values:' : 'Valori permise:', |
||||
'Compare all with predecessor': 'Compară toate cu versiunea precedentă', |
||||
'compare changes to:' : 'compară cu versiunea:', |
||||
'compared to' : 'comparat cu', |
||||
'Default value:' : 'Valoare implicită:', |
||||
'Description' : 'Descriere', |
||||
'Field' : 'Câmp', |
||||
'General' : 'General', |
||||
'Generated with' : 'Generat cu', |
||||
'Name' : 'Nume', |
||||
'No response values.' : 'Nici o valoare returnată.', |
||||
'optional' : 'opțional', |
||||
'Parameter' : 'Parametru', |
||||
'Permission:' : 'Permisiune:', |
||||
'Response' : 'Răspuns', |
||||
'Send' : 'Trimite', |
||||
'Send a Sample Request' : 'Trimite o cerere de probă', |
||||
'show up to version:' : 'arată până la versiunea:', |
||||
'Size range:' : 'Interval permis:', |
||||
'Type' : 'Tip', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
ru: { |
||||
'Allowed values:' : 'Допустимые значения:', |
||||
'Compare all with predecessor': 'Сравнить с предыдущей версией', |
||||
'compare changes to:' : 'сравнить с:', |
||||
'compared to' : 'в сравнении с', |
||||
'Default value:' : 'По умолчанию:', |
||||
'Description' : 'Описание', |
||||
'Field' : 'Название', |
||||
'General' : 'Общая информация', |
||||
'Generated with' : 'Сгенерировано с помощью', |
||||
'Name' : 'Название', |
||||
'No response values.' : 'Нет значений для ответа.', |
||||
'optional' : 'необязательный', |
||||
'Parameter' : 'Параметр', |
||||
'Permission:' : 'Разрешено:', |
||||
'Response' : 'Ответ', |
||||
'Send' : 'Отправить', |
||||
'Send a Sample Request' : 'Отправить тестовый запрос', |
||||
'show up to version:' : 'показать версию:', |
||||
'Size range:' : 'Ограничения:', |
||||
'Type' : 'Тип', |
||||
'url' : 'URL' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
tr: { |
||||
'Allowed values:' : 'İzin verilen değerler:', |
||||
'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır', |
||||
'compare changes to:' : 'değişiklikleri karşılaştır:', |
||||
'compared to' : 'karşılaştır', |
||||
'Default value:' : 'Varsayılan değer:', |
||||
'Description' : 'Açıklama', |
||||
'Field' : 'Alan', |
||||
'General' : 'Genel', |
||||
'Generated with' : 'Oluşturan', |
||||
'Name' : 'İsim', |
||||
'No response values.' : 'Dönüş verisi yok.', |
||||
'optional' : 'opsiyonel', |
||||
'Parameter' : 'Parametre', |
||||
'Permission:' : 'İzin:', |
||||
'Response' : 'Dönüş', |
||||
'Send' : 'Gönder', |
||||
'Send a Sample Request' : 'Örnek istek gönder', |
||||
'show up to version:' : 'bu versiyona kadar göster:', |
||||
'Size range:' : 'Boyut aralığı:', |
||||
'Type' : 'Tip', |
||||
'url' : 'url' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
vi: { |
||||
'Allowed values:' : 'Giá trị chấp nhận:', |
||||
'Compare all with predecessor': 'So sánh với tất cả phiên bản trước', |
||||
'compare changes to:' : 'so sánh sự thay đổi với:', |
||||
'compared to' : 'so sánh với', |
||||
'Default value:' : 'Giá trị mặc định:', |
||||
'Description' : 'Chú thích', |
||||
'Field' : 'Trường dữ liệu', |
||||
'General' : 'Tổng quan', |
||||
'Generated with' : 'Được tạo bởi', |
||||
'Name' : 'Tên', |
||||
'No response values.' : 'Không có kết quả trả về.', |
||||
'optional' : 'Tùy chọn', |
||||
'Parameter' : 'Tham số', |
||||
'Permission:' : 'Quyền hạn:', |
||||
'Response' : 'Kết quả', |
||||
'Send' : 'Gửi', |
||||
'Send a Sample Request' : 'Gửi một yêu cầu mẫu', |
||||
'show up to version:' : 'hiển thị phiên bản:', |
||||
'Size range:' : 'Kích cỡ:', |
||||
'Type' : 'Kiểu', |
||||
'url' : 'liên kết' |
||||
} |
||||
}); |
@ -0,0 +1,25 @@
|
||||
define({ |
||||
'zh_cn': { |
||||
'Allowed values:' : '允许值:', |
||||
'Compare all with predecessor': '与所有较早的比较', |
||||
'compare changes to:' : '将当前版本与指定版本比较:', |
||||
'compared to' : '相比于', |
||||
'Default value:' : '默认值:', |
||||
'Description' : '描述', |
||||
'Field' : '字段', |
||||
'General' : '概要', |
||||
'Generated with' : '基于', |
||||
'Name' : '名称', |
||||
'No response values.' : '无返回值.', |
||||
'optional' : '可选', |
||||
'Parameter' : '参数', |
||||
'Permission:' : '权限:', |
||||
'Response' : '返回', |
||||
'Send' : '发送', |
||||
'Send a Sample Request' : '发送示例请求', |
||||
'show up to version:' : '显示到指定版本:', |
||||
'Size range:' : '取值范围:', |
||||
'Type' : '类型', |
||||
'url' : '网址' |
||||
} |
||||
}); |
@ -0,0 +1,827 @@
|
||||
require.config({ |
||||
paths: { |
||||
bootstrap: './vendor/bootstrap.min', |
||||
diffMatchPatch: './vendor/diff_match_patch.min', |
||||
handlebars: './vendor/handlebars.min', |
||||
handlebarsExtended: './utils/handlebars_helper', |
||||
jquery: './vendor/jquery.min', |
||||
locales: './locales/locale', |
||||
lodash: './vendor/lodash.custom.min', |
||||
pathToRegexp: './vendor/path-to-regexp/index', |
||||
prettify: './vendor/prettify/prettify', |
||||
semver: './vendor/semver.min', |
||||
utilsSampleRequest: './utils/send_sample_request', |
||||
webfontloader: './vendor/webfontloader', |
||||
list: './vendor/list.min' |
||||
}, |
||||
shim: { |
||||
bootstrap: { |
||||
deps: ['jquery'] |
||||
}, |
||||
diffMatchPatch: { |
||||
exports: 'diff_match_patch' |
||||
}, |
||||
handlebars: { |
||||
exports: 'Handlebars' |
||||
}, |
||||
handlebarsExtended: { |
||||
deps: ['jquery', 'handlebars'], |
||||
exports: 'Handlebars' |
||||
}, |
||||
prettify: { |
||||
exports: 'prettyPrint' |
||||
} |
||||
}, |
||||
urlArgs: 'v=' + (new Date()).getTime(), |
||||
waitSeconds: 15 |
||||
}); |
||||
|
||||
require([ |
||||
'jquery', |
||||
'lodash', |
||||
'locales', |
||||
'handlebarsExtended', |
||||
'./api_project.js', |
||||
'./api_data.js', |
||||
'prettify', |
||||
'utilsSampleRequest', |
||||
'semver', |
||||
'webfontloader', |
||||
'bootstrap', |
||||
'pathToRegexp', |
||||
'list' |
||||
], function($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver, WebFont) { |
||||
|
||||
// load google web fonts
|
||||
loadGoogleFontCss(); |
||||
|
||||
var api = apiData.api; |
||||
|
||||
//
|
||||
// Templates
|
||||
//
|
||||
var templateHeader = Handlebars.compile( $('#template-header').html() ); |
||||
var templateFooter = Handlebars.compile( $('#template-footer').html() ); |
||||
var templateArticle = Handlebars.compile( $('#template-article').html() ); |
||||
var templateCompareArticle = Handlebars.compile( $('#template-compare-article').html() ); |
||||
var templateGenerator = Handlebars.compile( $('#template-generator').html() ); |
||||
var templateProject = Handlebars.compile( $('#template-project').html() ); |
||||
var templateSections = Handlebars.compile( $('#template-sections').html() ); |
||||
var templateSidenav = Handlebars.compile( $('#template-sidenav').html() ); |
||||
|
||||
//
|
||||
// apiProject defaults
|
||||
//
|
||||
if ( ! apiProject.template) |
||||
apiProject.template = {}; |
||||
|
||||
if (apiProject.template.withCompare == null) |
||||
apiProject.template.withCompare = true; |
||||
|
||||
if (apiProject.template.withGenerator == null) |
||||
apiProject.template.withGenerator = true; |
||||
|
||||
if (apiProject.template.forceLanguage) |
||||
locale.setLanguage(apiProject.template.forceLanguage); |
||||
|
||||
// Setup jQuery Ajax
|
||||
$.ajaxSetup(apiProject.template.jQueryAjaxSetup); |
||||
|
||||
//
|
||||
// Data transform
|
||||
//
|
||||
// grouped by group
|
||||
var apiByGroup = _.groupBy(api, function(entry) { |
||||
return entry.group; |
||||
}); |
||||
|
||||
// grouped by group and name
|
||||
var apiByGroupAndName = {}; |
||||
$.each(apiByGroup, function(index, entries) { |
||||
apiByGroupAndName[index] = _.groupBy(entries, function(entry) { |
||||
return entry.name; |
||||
}); |
||||
}); |
||||
|
||||
//
|
||||
// sort api within a group by title ASC and custom order
|
||||
//
|
||||
var newList = []; |
||||
var umlauts = { 'ä': 'ae', 'ü': 'ue', 'ö': 'oe', 'ß': 'ss' }; // TODO: remove in version 1.0
|
||||
$.each (apiByGroupAndName, function(index, groupEntries) { |
||||
// get titles from the first entry of group[].name[] (name has versioning)
|
||||
var titles = []; |
||||
$.each (groupEntries, function(titleName, entries) { |
||||
var title = entries[0].title; |
||||
if(title !== undefined) { |
||||
title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; }); |
||||
titles.push(title + '#~#' + titleName); // '#~#' keep reference to titleName after sorting
|
||||
} |
||||
}); |
||||
// sort by name ASC
|
||||
titles.sort(); |
||||
|
||||
// custom order
|
||||
if (apiProject.order) |
||||
titles = sortByOrder(titles, apiProject.order, '#~#'); |
||||
|
||||
// add single elements to the new list
|
||||
titles.forEach(function(name) { |
||||
var values = name.split('#~#'); |
||||
var key = values[1]; |
||||
groupEntries[key].forEach(function(entry) { |
||||
newList.push(entry); |
||||
}); |
||||
}); |
||||
}); |
||||
// api overwrite with ordered list
|
||||
api = newList; |
||||
|
||||
//
|
||||
// Group- and Versionlists
|
||||
//
|
||||
var apiGroups = {}; |
||||
var apiGroupTitles = {}; |
||||
var apiVersions = {}; |
||||
apiVersions[apiProject.version] = 1; |
||||
|
||||
$.each(api, function(index, entry) { |
||||
apiGroups[entry.group] = 1; |
||||
apiGroupTitles[entry.group] = entry.groupTitle || entry.group; |
||||
apiVersions[entry.version] = 1; |
||||
}); |
||||
|
||||
// sort groups
|
||||
apiGroups = Object.keys(apiGroups); |
||||
apiGroups.sort(); |
||||
|
||||
// custom order
|
||||
if (apiProject.order) |
||||
apiGroups = sortByOrder(apiGroups, apiProject.order); |
||||
|
||||
// sort versions DESC
|
||||
apiVersions = Object.keys(apiVersions); |
||||
apiVersions.sort(semver.compare); |
||||
apiVersions.reverse(); |
||||
|
||||
//
|
||||
// create Navigationlist
|
||||
//
|
||||
var nav = []; |
||||
apiGroups.forEach(function(group) { |
||||
// Mainmenu entry
|
||||
nav.push({ |
||||
group: group, |
||||
isHeader: true, |
||||
title: apiGroupTitles[group] |
||||
}); |
||||
|
||||
// Submenu
|
||||
var oldName = ''; |
||||
api.forEach(function(entry) { |
||||
if (entry.group === group) { |
||||
if (oldName !== entry.name) { |
||||
nav.push({ |
||||
title: entry.title, |
||||
group: group, |
||||
name: entry.name, |
||||
type: entry.type, |
||||
version: entry.version |
||||
}); |
||||
} else { |
||||
nav.push({ |
||||
title: entry.title, |
||||
group: group, |
||||
hidden: true, |
||||
name: entry.name, |
||||
type: entry.type, |
||||
version: entry.version |
||||
}); |
||||
} |
||||
oldName = entry.name; |
||||
} |
||||
}); |
||||
}); |
||||
|
||||
/** |
||||
* Add navigation items by analyzing the HTML content and searching for h1 and h2 tags |
||||
* @param nav Object the navigation array |
||||
* @param content string the compiled HTML content |
||||
* @param index where to insert items |
||||
* @return boolean true if any good-looking (i.e. with a group identifier) <h1> tag was found |
||||
*/ |
||||
function add_nav(nav, content, index) { |
||||
var found_level1 = false; |
||||
if ( ! content) { |
||||
return found_level1; |
||||
} |
||||
var topics = content.match(/<h(1|2).*?>(.+?)<\/h(1|2)>/gi); |
||||
if ( topics ) { |
||||
topics.forEach(function(entry) { |
||||
var level = entry.substring(2,3); |
||||
var title = entry.replace(/<.+?>/g, ''); // Remove all HTML tags for the title
|
||||
var entry_tags = entry.match(/id="api-([^\-]+)(?:-(.+))?"/); // Find the group and name in the id property
|
||||
var group = (entry_tags ? entry_tags[1] : null); |
||||
var name = (entry_tags ? entry_tags[2] : null); |
||||
if (level==1 && title && group) { |
||||
nav.splice(index, 0, { |
||||
group: group, |
||||
isHeader: true, |
||||
title: title, |
||||
isFixed: true |
||||
}); |
||||
index++; |
||||
found_level1 = true; |
||||
} |
||||
if (level==2 && title && group && name) { |
||||
nav.splice(index, 0, { |
||||
group: group, |
||||
name: name, |
||||
isHeader: false, |
||||
title: title, |
||||
isFixed: false, |
||||
version: '1.0' |
||||
}); |
||||
index++; |
||||
} |
||||
}); |
||||
} |
||||
return found_level1; |
||||
} |
||||
|
||||
// Mainmenu Header entry
|
||||
if (apiProject.header) { |
||||
var found_level1 = add_nav(nav, apiProject.header.content, 0); // Add level 1 and 2 titles
|
||||
if (!found_level1) { // If no Level 1 tags were found, make a title
|
||||
nav.unshift({ |
||||
group: '_', |
||||
isHeader: true, |
||||
title: (apiProject.header.title == null) ? locale.__('General') : apiProject.header.title, |
||||
isFixed: true |
||||
}); |
||||
} |
||||
} |
||||
|
||||
// Mainmenu Footer entry
|
||||
if (apiProject.footer) { |
||||
var last_nav_index = nav.length; |
||||
var found_level1 = add_nav(nav, apiProject.footer.content, nav.length); // Add level 1 and 2 titles
|
||||
if (!found_level1 && apiProject.footer.title != null) { // If no Level 1 tags were found, make a title
|
||||
nav.splice(last_nav_index, 0, { |
||||
group: '_footer', |
||||
isHeader: true, |
||||
title: apiProject.footer.title, |
||||
isFixed: true |
||||
}); |
||||
} |
||||
} |
||||
|
||||
// render pagetitle
|
||||
var title = apiProject.title ? apiProject.title : 'apiDoc: ' + apiProject.name + ' - ' + apiProject.version; |
||||
$(document).attr('title', title); |
||||
|
||||
// remove loader
|
||||
$('#loader').remove(); |
||||
|
||||
// render sidenav
|
||||
var fields = { |
||||
nav: nav |
||||
}; |
||||
$('#sidenav').append( templateSidenav(fields) ); |
||||
|
||||
// render Generator
|
||||
$('#generator').append( templateGenerator(apiProject) ); |
||||
|
||||
// render Project
|
||||
_.extend(apiProject, { versions: apiVersions}); |
||||
$('#project').append( templateProject(apiProject) ); |
||||
|
||||
// render apiDoc, header/footer documentation
|
||||
if (apiProject.header) |
||||
$('#header').append( templateHeader(apiProject.header) ); |
||||
|
||||
if (apiProject.footer) |
||||
$('#footer').append( templateFooter(apiProject.footer) ); |
||||
|
||||
//
|
||||
// Render Sections and Articles
|
||||
//
|
||||
var articleVersions = {}; |
||||
var content = ''; |
||||
apiGroups.forEach(function(groupEntry) { |
||||
var articles = []; |
||||
var oldName = ''; |
||||
var fields = {}; |
||||
var title = groupEntry; |
||||
var description = ''; |
||||
articleVersions[groupEntry] = {}; |
||||
|
||||
// render all articles of a group
|
||||
api.forEach(function(entry) { |
||||
if(groupEntry === entry.group) { |
||||
if (oldName !== entry.name) { |
||||
// determine versions
|
||||
api.forEach(function(versionEntry) { |
||||
if (groupEntry === versionEntry.group && entry.name === versionEntry.name) { |
||||
if ( ! articleVersions[entry.group].hasOwnProperty(entry.name) ) { |
||||
articleVersions[entry.group][entry.name] = []; |
||||
} |
||||
articleVersions[entry.group][entry.name].push(versionEntry.version); |
||||
} |
||||
}); |
||||
fields = { |
||||
article: entry, |
||||
versions: articleVersions[entry.group][entry.name] |
||||
}; |
||||
} else { |
||||
fields = { |
||||
article: entry, |
||||
hidden: true, |
||||
versions: articleVersions[entry.group][entry.name] |
||||
}; |
||||
} |
||||
|
||||
// add prefix URL for endpoint
|
||||
if (apiProject.url) |
||||
fields.article.url = apiProject.url + fields.article.url; |
||||
|
||||
addArticleSettings(fields, entry); |
||||
|
||||
if (entry.groupTitle) |
||||
title = entry.groupTitle; |
||||
|
||||
// TODO: make groupDescription compareable with older versions (not important for the moment)
|
||||
if (entry.groupDescription) |
||||
description = entry.groupDescription; |
||||
|
||||
articles.push({ |
||||
article: templateArticle(fields), |
||||
group: entry.group, |
||||
name: entry.name |
||||
}); |
||||
oldName = entry.name; |
||||
} |
||||
}); |
||||
|
||||
// render Section with Articles
|
||||
var fields = { |
||||
group: groupEntry, |
||||
title: title, |
||||
description: description, |
||||
articles: articles |
||||
}; |
||||
content += templateSections(fields); |
||||
}); |
||||
$('#sections').append( content ); |
||||
|
||||
// Bootstrap Scrollspy
|
||||
$(this).scrollspy({ target: '#scrollingNav', offset: 18 }); |
||||
|
||||
// Content-Scroll on Navigation click.
|
||||
$('.sidenav').find('a').on('click', function(e) { |
||||
e.preventDefault(); |
||||
var id = $(this).attr('href'); |
||||
if ($(id).length > 0) |
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 400); |
||||
window.location.hash = $(this).attr('href'); |
||||
}); |
||||
|
||||
// Quickjump on Pageload to hash position.
|
||||
if(window.location.hash) { |
||||
var id = window.location.hash; |
||||
if ($(id).length > 0) |
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0); |
||||
} |
||||
|
||||
/** |
||||
* Check if Parameter (sub) List has a type Field. |
||||
* Example: @apiSuccess varname1 No type. |
||||
* @apiSuccess {String} varname2 With type. |
||||
* |
||||
* @param {Object} fields |
||||
*/ |
||||
function _hasTypeInFields(fields) { |
||||
var result = false; |
||||
$.each(fields, function(name) { |
||||
result = result || _.some(fields[name], function(item) { return item.type; }); |
||||
}); |
||||
return result; |
||||
} |
||||
|
||||
/** |
||||
* On Template changes, recall plugins. |
||||
*/ |
||||
function initDynamic() { |
||||
// Bootstrap popover
|
||||
$('button[data-toggle="popover"]').popover().click(function(e) { |
||||
e.preventDefault(); |
||||
}); |
||||
|
||||
var version = $('#version strong').html(); |
||||
$('#sidenav li').removeClass('is-new'); |
||||
if (apiProject.template.withCompare) { |
||||
$('#sidenav li[data-version=\'' + version + '\']').each(function(){ |
||||
var group = $(this).data('group'); |
||||
var name = $(this).data('name'); |
||||
var length = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').length; |
||||
var index = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').index($(this)); |
||||
if (length === 1 || index === (length - 1)) |
||||
$(this).addClass('is-new'); |
||||
}); |
||||
} |
||||
|
||||
// tabs
|
||||
$('.nav-tabs-examples a').click(function (e) { |
||||
e.preventDefault(); |
||||
$(this).tab('show'); |
||||
}); |
||||
$('.nav-tabs-examples').find('a:first').tab('show'); |
||||
|
||||
// sample request switch
|
||||
$('.sample-request-switch').click(function (e) { |
||||
var name = '.' + $(this).attr('name') + '-fields'; |
||||
$(name).addClass('hide'); |
||||
$(this).parent().next(name).removeClass('hide'); |
||||
}); |
||||
|
||||
// call scrollspy refresh method
|
||||
$(window).scrollspy('refresh'); |
||||
|
||||
// init modules
|
||||
sampleRequest.initDynamic(); |
||||
} |
||||
initDynamic(); |
||||
|
||||
// Pre- / Code-Format
|
||||
prettyPrint(); |
||||
|
||||
//
|
||||
// HTML-Template specific jQuery-Functions
|
||||
//
|
||||
// Change Main Version
|
||||
$('#versions li.version a').on('click', function(e) { |
||||
e.preventDefault(); |
||||
|
||||
var selectedVersion = $(this).html(); |
||||
$('#version strong').html(selectedVersion); |
||||
|
||||
// hide all
|
||||
$('article').addClass('hide'); |
||||
$('#sidenav li:not(.nav-fixed)').addClass('hide'); |
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) { |
||||
var group = $(this).data('group'); |
||||
var name = $(this).data('name'); |
||||
var version = $(this).data('version'); |
||||
|
||||
if (semver.lte(version, selectedVersion)) { |
||||
if ($('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible').length === 0) { |
||||
// enable Article
|
||||
$('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide'); |
||||
// enable Navigation
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide'); |
||||
$('#sidenav li.nav-header[data-group=\'' + group + '\']').removeClass('hide'); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) { |
||||
var group = $(this).data('group'); |
||||
$('section#api-' + group).removeClass('hide'); |
||||
if ($('section#api-' + group + ' article:visible').length === 0) { |
||||
$('section#api-' + group).addClass('hide'); |
||||
} else { |
||||
$('section#api-' + group).removeClass('hide'); |
||||
} |
||||
}); |
||||
|
||||
initDynamic(); |
||||
return; |
||||
}); |
||||
|
||||
// compare all article with their predecessor
|
||||
$('#compareAllWithPredecessor').on('click', changeAllVersionCompareTo); |
||||
|
||||
// change version of an article
|
||||
$('article .versions li.version a').on('click', changeVersionCompareTo); |
||||
|
||||
// compare url-parameter
|
||||
$.urlParam = function(name) { |
||||
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); |
||||
return (results && results[1]) ? results[1] : null; |
||||
}; |
||||
|
||||
if ($.urlParam('compare')) { |
||||
// URL Paramter ?compare=1 is set
|
||||
$('#compareAllWithPredecessor').trigger('click'); |
||||
|
||||
if (window.location.hash) { |
||||
var id = window.location.hash; |
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) - 18 }, 0); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Initialize search |
||||
*/ |
||||
var options = { |
||||
valueNames: [ 'nav-list-item' ] |
||||
}; |
||||
var endpointsList = new List('scrollingNav', options); |
||||
|
||||
/** |
||||
* Set initial focus to search input |
||||
*/ |
||||
$('#scrollingNav .sidenav-search input.search').focus(); |
||||
|
||||
/** |
||||
* Detect ESC key to reset search |
||||
*/ |
||||
$(document).keyup(function(e) { |
||||
if (e.keyCode === 27) $('span.search-reset').click(); |
||||
}); |
||||
|
||||
/** |
||||
* Search reset |
||||
*/ |
||||
$('span.search-reset').on('click', function() { |
||||
$('#scrollingNav .sidenav-search input.search') |
||||
.val("") |
||||
.focus() |
||||
; |
||||
endpointsList.search(); |
||||
}); |
||||
|
||||
/** |
||||
* Change version of an article to compare it to an other version. |
||||
*/ |
||||
function changeVersionCompareTo(e) { |
||||
e.preventDefault(); |
||||
|
||||
var $root = $(this).parents('article'); |
||||
var selectedVersion = $(this).html(); |
||||
var $button = $root.find('.version'); |
||||
var currentVersion = $button.find('strong').html(); |
||||
$button.find('strong').html(selectedVersion); |
||||
|
||||
var group = $root.data('group'); |
||||
var name = $root.data('name'); |
||||
var version = $root.data('version'); |
||||
|
||||
var compareVersion = $root.data('compare-version'); |
||||
|
||||
if (compareVersion === selectedVersion) |
||||
return; |
||||
|
||||
if ( ! compareVersion && version == selectedVersion) |
||||
return; |
||||
|
||||
if (compareVersion && articleVersions[group][name][0] === selectedVersion || version === selectedVersion) { |
||||
// the version of the entry is set to the highest version (reset)
|
||||
resetArticle(group, name, version); |
||||
} else { |
||||
var $compareToArticle = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + selectedVersion + '\']'); |
||||
|
||||
var sourceEntry = {}; |
||||
var compareEntry = {}; |
||||
$.each(apiByGroupAndName[group][name], function(index, entry) { |
||||
if (entry.version === version) |
||||
sourceEntry = entry; |
||||
if (entry.version === selectedVersion) |
||||
compareEntry = entry; |
||||
}); |
||||
|
||||
var fields = { |
||||
article: sourceEntry, |
||||
compare: compareEntry, |
||||
versions: articleVersions[group][name] |
||||
}; |
||||
|
||||
// add unique id
|
||||
// TODO: replace all group-name-version in template with id.
|
||||
fields.article.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version; |
||||
fields.article.id = fields.article.id.replace(/\./g, '_'); |
||||
|
||||
fields.compare.id = fields.compare.group + '-' + fields.compare.name + '-' + fields.compare.version; |
||||
fields.compare.id = fields.compare.id.replace(/\./g, '_'); |
||||
|
||||
var entry = sourceEntry; |
||||
if (entry.parameter && entry.parameter.fields) |
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields); |
||||
|
||||
if (entry.error && entry.error.fields) |
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields); |
||||
|
||||
if (entry.success && entry.success.fields) |
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields); |
||||
|
||||
if (entry.info && entry.info.fields) |
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields); |
||||
|
||||
var entry = compareEntry; |
||||
if (fields._hasTypeInParameterFields !== true && entry.parameter && entry.parameter.fields) |
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields); |
||||
|
||||
if (fields._hasTypeInErrorFields !== true && entry.error && entry.error.fields) |
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields); |
||||
|
||||
if (fields._hasTypeInSuccessFields !== true && entry.success && entry.success.fields) |
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields); |
||||
|
||||
if (fields._hasTypeInInfoFields !== true && entry.info && entry.info.fields) |
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields); |
||||
|
||||
var content = templateCompareArticle(fields); |
||||
$root.after(content); |
||||
var $content = $root.next(); |
||||
|
||||
// Event on.click re-assign
|
||||
$content.find('.versions li.version a').on('click', changeVersionCompareTo); |
||||
|
||||
// select navigation
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + currentVersion + '\']').addClass('has-modifications'); |
||||
|
||||
$root.remove(); |
||||
// TODO: on change main version or select the highest version re-render
|
||||
} |
||||
|
||||
initDynamic(); |
||||
} |
||||
|
||||
/** |
||||
* Compare all currently selected Versions with their predecessor. |
||||
*/ |
||||
function changeAllVersionCompareTo(e) { |
||||
e.preventDefault(); |
||||
$('article:visible .versions').each(function(){ |
||||
var $root = $(this).parents('article'); |
||||
var currentVersion = $root.data('version'); |
||||
var $foundElement = null; |
||||
$(this).find('li.version a').each(function() { |
||||
var selectVersion = $(this).html(); |
||||
if (selectVersion < currentVersion && ! $foundElement) |
||||
$foundElement = $(this); |
||||
}); |
||||
|
||||
if($foundElement) |
||||
$foundElement.trigger('click'); |
||||
}); |
||||
initDynamic(); |
||||
} |
||||
|
||||
/** |
||||
* Sort the fields. |
||||
*/ |
||||
function sortFields(fields_object) { |
||||
$.each(fields_object, function (key, fields) { |
||||
|
||||
var reversed = fields.slice().reverse() |
||||
|
||||
var max_dot_count = Math.max.apply(null, reversed.map(function (item) { |
||||
return item.field.split(".").length - 1; |
||||
})) |
||||
|
||||
for (var dot_count = 1; dot_count <= max_dot_count; dot_count++) { |
||||
reversed.forEach(function (item, index) { |
||||
var parts = item.field.split("."); |
||||
if (parts.length - 1 == dot_count) { |
||||
var fields_names = fields.map(function (item) { return item.field; }); |
||||
if (parts.slice(1).length >= 1) { |
||||
var prefix = parts.slice(0, parts.length - 1).join("."); |
||||
var prefix_index = fields_names.indexOf(prefix); |
||||
if (prefix_index > -1) { |
||||
fields.splice(fields_names.indexOf(item.field), 1); |
||||
fields.splice(prefix_index + 1, 0, item); |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Add article settings. |
||||
*/ |
||||
function addArticleSettings(fields, entry) { |
||||
// add unique id
|
||||
// TODO: replace all group-name-version in template with id.
|
||||
fields.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version; |
||||
fields.id = fields.id.replace(/\./g, '_'); |
||||
|
||||
if (entry.header && entry.header.fields) { |
||||
sortFields(entry.header.fields); |
||||
fields._hasTypeInHeaderFields = _hasTypeInFields(entry.header.fields); |
||||
} |
||||
|
||||
if (entry.parameter && entry.parameter.fields) { |
||||
sortFields(entry.parameter.fields); |
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields); |
||||
} |
||||
|
||||
if (entry.error && entry.error.fields) { |
||||
sortFields(entry.error.fields); |
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields); |
||||
} |
||||
|
||||
if (entry.success && entry.success.fields) { |
||||
sortFields(entry.success.fields); |
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields); |
||||
} |
||||
|
||||
if (entry.info && entry.info.fields) { |
||||
sortFields(entry.info.fields); |
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields); |
||||
} |
||||
|
||||
// add template settings
|
||||
fields.template = apiProject.template; |
||||
} |
||||
|
||||
/** |
||||
* Render Article. |
||||
*/ |
||||
function renderArticle(group, name, version) { |
||||
var entry = {}; |
||||
$.each(apiByGroupAndName[group][name], function(index, currentEntry) { |
||||
if (currentEntry.version === version) |
||||
entry = currentEntry; |
||||
}); |
||||
var fields = { |
||||
article: entry, |
||||
versions: articleVersions[group][name] |
||||
}; |
||||
|
||||
addArticleSettings(fields, entry); |
||||
|
||||
return templateArticle(fields); |
||||
} |
||||
|
||||
/** |
||||
* Render original Article and remove the current visible Article. |
||||
*/ |
||||
function resetArticle(group, name, version) { |
||||
var $root = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible'); |
||||
var content = renderArticle(group, name, version); |
||||
|
||||
$root.after(content); |
||||
var $content = $root.next(); |
||||
|
||||
// Event on.click muss neu zugewiesen werden (sollte eigentlich mit on automatisch funktionieren... sollte)
|
||||
$content.find('.versions li.version a').on('click', changeVersionCompareTo); |
||||
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('has-modifications'); |
||||
|
||||
$root.remove(); |
||||
return; |
||||
} |
||||
|
||||
/** |
||||
* Load google fonts. |
||||
*/ |
||||
function loadGoogleFontCss() { |
||||
WebFont.load({ |
||||
active: function() { |
||||
// Update scrollspy
|
||||
$(window).scrollspy('refresh') |
||||
}, |
||||
google: { |
||||
families: ['Source Code Pro', 'Source Sans Pro:n4,n6,n7'] |
||||
} |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Return ordered entries by custom order and append not defined entries to the end. |
||||
* @param {String[]} elements |
||||
* @param {String[]} order |
||||
* @param {String} splitBy |
||||
* @return {String[]} Custom ordered list. |
||||
*/ |
||||
function sortByOrder(elements, order, splitBy) { |
||||
var results = []; |
||||
order.forEach (function(name) { |
||||
if (splitBy) |
||||
elements.forEach (function(element) { |
||||
var parts = element.split(splitBy); |
||||
var key = parts[1]; // reference keep for sorting
|
||||
if (key == name) |
||||
results.push(element); |
||||
}); |
||||
else |
||||
elements.forEach (function(key) { |
||||
if (key == name) |
||||
results.push(name); |
||||
}); |
||||
}); |
||||
// Append all other entries that ar not defined in order
|
||||
elements.forEach(function(element) { |
||||
if (results.indexOf(element) === -1) |
||||
results.push(element); |
||||
}); |
||||
return results; |
||||
} |
||||
|
||||
}); |
@ -0,0 +1,357 @@
|
||||
define([ |
||||
'locales', |
||||
'handlebars', |
||||
'diffMatchPatch' |
||||
], function(locale, Handlebars, DiffMatchPatch) { |
||||
|
||||
/** |
||||
* Return a text as markdown. |
||||
* Currently only a little helper to replace apidoc-inline Links (#Group:Name). |
||||
* Should be replaced with a full markdown lib. |
||||
* @param string text |
||||
*/ |
||||
Handlebars.registerHelper('markdown', function(text) { |
||||
if ( ! text ) { |
||||
return text; |
||||
} |
||||
text = text.replace(/((\[(.*?)\])?\(#)((.+?):(.+?))(\))/mg, function(match, p1, p2, p3, p4, p5, p6) { |
||||
var link = p3 || p5 + '/' + p6; |
||||
return '<a href="#api-' + p5 + '-' + p6 + '">' + link + '</a>'; |
||||
}); |
||||
return text; |
||||
}); |
||||
|
||||
/** |
||||
* start/stop timer for simple performance check. |
||||
*/ |
||||
var timer; |
||||
Handlebars.registerHelper('startTimer', function(text) { |
||||
timer = new Date(); |
||||
return ''; |
||||
}); |
||||
|
||||
Handlebars.registerHelper('stopTimer', function(text) { |
||||
console.log(new Date() - timer); |
||||
return ''; |
||||
}); |
||||
|
||||
/** |
||||
* Return localized Text. |
||||
* @param string text |
||||
*/ |
||||
Handlebars.registerHelper('__', function(text) { |
||||
return locale.__(text); |
||||
}); |
||||
|
||||
/** |
||||
* Console log. |
||||
* @param mixed obj |
||||
*/ |
||||
Handlebars.registerHelper('cl', function(obj) { |
||||
console.log(obj); |
||||
return ''; |
||||
}); |
||||
|
||||
/** |
||||
* Replace underscore with space. |
||||
* @param string text |
||||
*/ |
||||
Handlebars.registerHelper('underscoreToSpace', function(text) { |
||||
return text.replace(/(_+)/g, ' '); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('assign', function(name) { |
||||
if(arguments.length > 0) { |
||||
var type = typeof(arguments[1]); |
||||
var arg = null; |
||||
if(type === 'string' || type === 'number' || type === 'boolean') arg = arguments[1]; |
||||
Handlebars.registerHelper(name, function() { return arg; }); |
||||
} |
||||
return ''; |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('nl2br', function(text) { |
||||
return _handlebarsNewlineToBreak(text); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('if_eq', function(context, options) { |
||||
var compare = context; |
||||
// Get length if context is an object
|
||||
if (context instanceof Object && ! (options.hash.compare instanceof Object)) |
||||
compare = Object.keys(context).length; |
||||
|
||||
if (compare === options.hash.compare) |
||||
return options.fn(this); |
||||
|
||||
return options.inverse(this); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('if_gt', function(context, options) { |
||||
var compare = context; |
||||
// Get length if context is an object
|
||||
if (context instanceof Object && ! (options.hash.compare instanceof Object)) |
||||
compare = Object.keys(context).length; |
||||
|
||||
if(compare > options.hash.compare) |
||||
return options.fn(this); |
||||
|
||||
return options.inverse(this); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
var templateCache = {}; |
||||
Handlebars.registerHelper('subTemplate', function(name, sourceContext) { |
||||
if ( ! templateCache[name]) |
||||
templateCache[name] = Handlebars.compile($('#template-' + name).html()); |
||||
|
||||
var template = templateCache[name]; |
||||
var templateContext = $.extend({}, this, sourceContext.hash); |
||||
return new Handlebars.SafeString( template(templateContext) ); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('toLowerCase', function(value) { |
||||
return (value && typeof value === 'string') ? value.toLowerCase() : ''; |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('splitFill', function(value, splitChar, fillChar) { |
||||
var splits = value.split(splitChar); |
||||
return new Array(splits.length).join(fillChar) + splits[splits.length - 1]; |
||||
}); |
||||
|
||||
/** |
||||
* Convert Newline to HTML-Break (nl2br). |
||||
* |
||||
* @param {String} text |
||||
* @returns {String} |
||||
*/ |
||||
function _handlebarsNewlineToBreak(text) { |
||||
return ('' + text).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br>' + '$2'); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('each_compare_list_field', function(source, compare, options) { |
||||
var fieldName = options.hash.field; |
||||
var newSource = []; |
||||
if (source) { |
||||
source.forEach(function(entry) { |
||||
var values = entry; |
||||
values['key'] = entry[fieldName]; |
||||
newSource.push(values); |
||||
}); |
||||
} |
||||
|
||||
var newCompare = []; |
||||
if (compare) { |
||||
compare.forEach(function(entry) { |
||||
var values = entry; |
||||
values['key'] = entry[fieldName]; |
||||
newCompare.push(values); |
||||
}); |
||||
} |
||||
return _handlebarsEachCompared('key', newSource, newCompare, options); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('each_compare_keys', function(source, compare, options) { |
||||
var newSource = []; |
||||
if (source) { |
||||
var sourceFields = Object.keys(source); |
||||
sourceFields.forEach(function(name) { |
||||
var values = {}; |
||||
values['value'] = source[name]; |
||||
values['key'] = name; |
||||
newSource.push(values); |
||||
}); |
||||
} |
||||
|
||||
var newCompare = []; |
||||
if (compare) { |
||||
var compareFields = Object.keys(compare); |
||||
compareFields.forEach(function(name) { |
||||
var values = {}; |
||||
values['value'] = compare[name]; |
||||
values['key'] = name; |
||||
newCompare.push(values); |
||||
}); |
||||
} |
||||
return _handlebarsEachCompared('key', newSource, newCompare, options); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('each_compare_field', function(source, compare, options) { |
||||
return _handlebarsEachCompared('field', source, compare, options); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('each_compare_title', function(source, compare, options) { |
||||
return _handlebarsEachCompared('title', source, compare, options); |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('reformat', function(source, type){ |
||||
if (type == 'json') |
||||
try { |
||||
return JSON.stringify(JSON.parse(source.trim()),null, " "); |
||||
} catch(e) { |
||||
|
||||
} |
||||
return source |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
Handlebars.registerHelper('showDiff', function(source, compare, options) { |
||||
var ds = ''; |
||||
if(source === compare) { |
||||
ds = source; |
||||
} else { |
||||
if( ! source) |
||||
return compare; |
||||
|
||||
if( ! compare) |
||||
return source; |
||||
|
||||
var d = diffMatchPatch.diff_main(compare, source); |
||||
diffMatchPatch.diff_cleanupSemantic(d); |
||||
ds = diffMatchPatch.diff_prettyHtml(d); |
||||
ds = ds.replace(/¶/gm, ''); |
||||
} |
||||
if(options === 'nl2br') |
||||
ds = _handlebarsNewlineToBreak(ds); |
||||
|
||||
return ds; |
||||
}); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
function _handlebarsEachCompared(fieldname, source, compare, options) |
||||
{ |
||||
var dataList = []; |
||||
var index = 0; |
||||
if(source) { |
||||
source.forEach(function(sourceEntry) { |
||||
var found = false; |
||||
if (compare) { |
||||
compare.forEach(function(compareEntry) { |
||||
if(sourceEntry[fieldname] === compareEntry[fieldname]) { |
||||
var data = { |
||||
typeSame: true, |
||||
source: sourceEntry, |
||||
compare: compareEntry, |
||||
index: index |
||||
}; |
||||
dataList.push(data); |
||||
found = true; |
||||
index++; |
||||
} |
||||
}); |
||||
} |
||||
if ( ! found) { |
||||
var data = { |
||||
typeIns: true, |
||||
source: sourceEntry, |
||||
index: index |
||||
}; |
||||
dataList.push(data); |
||||
index++; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
if (compare) { |
||||
compare.forEach(function(compareEntry) { |
||||
var found = false; |
||||
if (source) { |
||||
source.forEach(function(sourceEntry) { |
||||
if(sourceEntry[fieldname] === compareEntry[fieldname]) |
||||
found = true; |
||||
}); |
||||
} |
||||
if ( ! found) { |
||||
var data = { |
||||
typeDel: true, |
||||
compare: compareEntry, |
||||
index: index |
||||
}; |
||||
dataList.push(data); |
||||
index++; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
var ret = ''; |
||||
var length = dataList.length; |
||||
for (var index in dataList) { |
||||
if(index == (length - 1)) |
||||
dataList[index]['_last'] = true; |
||||
ret = ret + options.fn(dataList[index]); |
||||
} |
||||
return ret; |
||||
} |
||||
|
||||
var diffMatchPatch = new DiffMatchPatch(); |
||||
|
||||
/** |
||||
* Overwrite Colors |
||||
*/ |
||||
DiffMatchPatch.prototype.diff_prettyHtml = function(diffs) { |
||||
var html = []; |
||||
var pattern_amp = /&/g; |
||||
var pattern_lt = /</g; |
||||
var pattern_gt = />/g; |
||||
var pattern_para = /\n/g; |
||||
for (var x = 0; x < diffs.length; x++) { |
||||
var op = diffs[x][0]; // Operation (insert, delete, equal)
|
||||
var data = diffs[x][1]; // Text of change.
|
||||
var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<') |
||||
.replace(pattern_gt, '>').replace(pattern_para, '¶<br>'); |
||||
switch (op) { |
||||
case DIFF_INSERT: |
||||
html[x] = '<ins>' + text + '</ins>'; |
||||
break; |
||||
case DIFF_DELETE: |
||||
html[x] = '<del>' + text + '</del>'; |
||||
break; |
||||
case DIFF_EQUAL: |
||||
html[x] = '<span>' + text + '</span>'; |
||||
break; |
||||
} |
||||
} |
||||
return html.join(''); |
||||
}; |
||||
|
||||
// Exports
|
||||
return Handlebars; |
||||
}); |
@ -0,0 +1,184 @@
|
||||
define([ |
||||
'jquery', |
||||
'lodash' |
||||
], function($, _) { |
||||
|
||||
var initDynamic = function() { |
||||
// Button send
|
||||
$(".sample-request-send").off("click"); |
||||
$(".sample-request-send").on("click", function(e) { |
||||
e.preventDefault(); |
||||
var $root = $(this).parents("article"); |
||||
var group = $root.data("group"); |
||||
var name = $root.data("name"); |
||||
var version = $root.data("version"); |
||||
sendSampleRequest(group, name, version, $(this).data("sample-request-type")); |
||||
}); |
||||
|
||||
// Button clear
|
||||
$(".sample-request-clear").off("click"); |
||||
$(".sample-request-clear").on("click", function(e) { |
||||
e.preventDefault(); |
||||
var $root = $(this).parents("article"); |
||||
var group = $root.data("group"); |
||||
var name = $root.data("name"); |
||||
var version = $root.data("version"); |
||||
clearSampleRequest(group, name, version); |
||||
}); |
||||
}; // initDynamic
|
||||
|
||||
function sendSampleRequest(group, name, version, type) |
||||
{ |
||||
var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]'); |
||||
|
||||
// Optional header
|
||||
var header = {}; |
||||
$root.find(".sample-request-header:checked").each(function(i, element) { |
||||
var group = $(element).data("sample-request-header-group-id"); |
||||
$root.find("[data-sample-request-header-group=\"" + group + "\"]").each(function(i, element) { |
||||
var key = $(element).data("sample-request-header-name"); |
||||
var value = element.value; |
||||
if ( ! element.optional && element.defaultValue !== '') { |
||||
value = element.defaultValue; |
||||
} |
||||
header[key] = value; |
||||
}); |
||||
}); |
||||
|
||||
// create JSON dictionary of parameters
|
||||
var param = {}; |
||||
var paramType = {}; |
||||
$root.find(".sample-request-param:checked").each(function(i, element) { |
||||
var group = $(element).data("sample-request-param-group-id"); |
||||
$root.find("[data-sample-request-param-group=\"" + group + "\"]").not(function(){ |
||||
return $(this).val() == "" && $(this).is("[data-sample-request-param-optional='true']"); |
||||
}).each(function(i, element) { |
||||
var key = $(element).data("sample-request-param-name"); |
||||
var value = element.value; |
||||
if ( ! element.optional && element.defaultValue !== '') { |
||||
value = element.defaultValue; |
||||
} |
||||
param[key] = value; |
||||
paramType[key] = $(element).next().text(); |
||||
}); |
||||
}); |
||||
|
||||
// grab user-inputted URL
|
||||
var url = $root.find(".sample-request-url").val(); |
||||
|
||||
// Insert url parameter
|
||||
var pattern = pathToRegexp(url, null); |
||||
var matches = pattern.exec(url); |
||||
for (var i = 1; i < matches.length; i++) { |
||||
var key = matches[i].substr(1); |
||||
if (param[key] !== undefined) { |
||||
url = url.replace(matches[i], encodeURIComponent(param[key])); |
||||
|
||||
// remove URL parameters from list
|
||||
delete param[key]; |
||||
} |
||||
} // for
|
||||
|
||||
$root.find(".sample-request-response").fadeTo(250, 1); |
||||
$root.find(".sample-request-response-json").html("Loading..."); |
||||
refreshScrollSpy(); |
||||
|
||||
_.each( param, function( val, key ) { |
||||
var t = paramType[ key ].toLowerCase(); |
||||
if ( t === 'object' || t === 'array' ) { |
||||
try { |
||||
param[ key ] = JSON.parse( val ); |
||||
} catch (e) { |
||||
} |
||||
} |
||||
}); |
||||
|
||||
// send AJAX request, catch success or error callback
|
||||
var ajaxRequest = { |
||||
url : url, |
||||
headers : header, |
||||
data : param, |
||||
type : type.toUpperCase(), |
||||
success : displaySuccess, |
||||
error : displayError |
||||
}; |
||||
|
||||
$.ajax(ajaxRequest); |
||||
|
||||
|
||||
function displaySuccess(data, status, jqXHR) { |
||||
var jsonResponse; |
||||
try { |
||||
jsonResponse = JSON.parse(jqXHR.responseText); |
||||
jsonResponse = JSON.stringify(jsonResponse, null, 4); |
||||
} catch (e) { |
||||
jsonResponse = data; |
||||
} |
||||
$root.find(".sample-request-response-json").html(jsonResponse); |
||||
refreshScrollSpy(); |
||||
}; |
||||
|
||||
function displayError(jqXHR, textStatus, error) { |
||||
var message = "Error " + jqXHR.status + ": " + error; |
||||
var jsonResponse; |
||||
try { |
||||
jsonResponse = JSON.parse(jqXHR.responseText); |
||||
jsonResponse = JSON.stringify(jsonResponse, null, 4); |
||||
} catch (e) { |
||||
jsonResponse = escape(jqXHR.responseText); |
||||
} |
||||
|
||||
if (jsonResponse) |
||||
message += "<br>" + jsonResponse; |
||||
|
||||
// flicker on previous error to make clear that there is a new response
|
||||
if($root.find(".sample-request-response").is(":visible")) |
||||
$root.find(".sample-request-response").fadeTo(1, 0.1); |
||||
|
||||
$root.find(".sample-request-response").fadeTo(250, 1); |
||||
$root.find(".sample-request-response-json").html(message); |
||||
refreshScrollSpy(); |
||||
}; |
||||
} |
||||
|
||||
function clearSampleRequest(group, name, version) |
||||
{ |
||||
var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]'); |
||||
|
||||
// hide sample response
|
||||
$root.find(".sample-request-response-json").html(""); |
||||
$root.find(".sample-request-response").hide(); |
||||
|
||||
// reset value of parameters
|
||||
$root.find(".sample-request-param").each(function(i, element) { |
||||
element.value = ""; |
||||
}); |
||||
|
||||
// restore default URL
|
||||
var $urlElement = $root.find(".sample-request-url"); |
||||
$urlElement.val($urlElement.prop("defaultValue")); |
||||
|
||||
refreshScrollSpy(); |
||||
} |
||||
|
||||
function refreshScrollSpy() |
||||
{ |
||||
$('[data-spy="scroll"]').each(function () { |
||||
$(this).scrollspy("refresh"); |
||||
}); |
||||
} |
||||
|
||||
function escapeHtml(str) { |
||||
var div = document.createElement("div"); |
||||
div.appendChild(document.createTextNode(str)); |
||||
return div.innerHTML; |
||||
} |
||||
|
||||
/** |
||||
* Exports. |
||||
*/ |
||||
return { |
||||
initDynamic: initDynamic |
||||
}; |
||||
|
||||
}); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,49 @@
|
||||
(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32} |
||||
diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a, |
||||
b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a}; |
||||
diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100<a.length&&100<b.length?this.diff_lineMode_(a,b, |
||||
d):this.diff_bisect_(a,b,d)}; |
||||
diff_match_patch.prototype.diff_lineMode_=function(a,b,c){var d=this.diff_linesToChars_(a,b);a=d.chars1;b=d.chars2;d=d.lineArray;a=this.diff_main(a,b,!1,c);this.diff_charsToLines_(a,d);this.diff_cleanupSemantic(a);a.push([0,""]);for(var e=d=b=0,f="",g="";b<a.length;){switch(a[b][0]){case 1:e++;g+=a[b][1];break;case -1:d++;f+=a[b][1];break;case 0:if(1<=d&&1<=e){a.splice(b-d-e,d+e);b=b-d-e;d=this.diff_main(f,g,!1,c);for(e=d.length-1;0<=e;e--)a.splice(b,0,d[e]);b+=d.length}d=e=0;g=f=""}b++}a.pop();return a}; |
||||
diff_match_patch.prototype.diff_bisect_=function(a,b,c){for(var d=a.length,e=b.length,f=Math.ceil((d+e)/2),g=f,h=2*f,j=Array(h),i=Array(h),k=0;k<h;k++)j[k]=-1,i[k]=-1;j[g+1]=0;i[g+1]=0;for(var k=d-e,q=0!=k%2,r=0,t=0,p=0,w=0,v=0;v<f&&!((new Date).getTime()>c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]<j[l+1]?j[l+1]:j[l-1]+1;for(var s=m-n;m<d&&s<e&&a.charAt(m)==b.charAt(s);)m++,s++;j[l]=m;if(m>d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l<h&&-1!=i[l])){var u=d-i[l];if(m>= |
||||
u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]<i[l+1]?i[l+1]:i[l-1]+1;for(m=u-n;u<d&&m<e&&a.charAt(d-u-1)==b.charAt(e-m-1);)u++,m++;i[l]=u;if(u>d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l<h&&-1!=j[l])&&(m=j[l],s=g+m-l,u=d-u,m>=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]}; |
||||
diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)}; |
||||
diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;f<a.length-1;){f=a.indexOf("\n",c);-1==f&&(f=a.length-1);var r=a.substring(c,f+1),c=f+1;(e.hasOwnProperty?e.hasOwnProperty(r):void 0!==e[r])?b+=String.fromCharCode(e[r]):(b+=String.fromCharCode(g),e[r]=g,d[g++]=r)}return b}var d=[],e={};d[0]="";var f=c(a),g=c(b);return{chars1:f,chars2:g,lineArray:d}}; |
||||
diff_match_patch.prototype.diff_charsToLines_=function(a,b){for(var c=0;c<a.length;c++){for(var d=a[c][1],e=[],f=0;f<d.length;f++)e[f]=b[d.charCodeAt(f)];a[c][1]=e.join("")}};diff_match_patch.prototype.diff_commonPrefix=function(a,b){if(!a||!b||a.charAt(0)!=b.charAt(0))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(f,e)==b.substring(f,e)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e}; |
||||
diff_match_patch.prototype.diff_commonSuffix=function(a,b){if(!a||!b||a.charAt(a.length-1)!=b.charAt(b.length-1))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(a.length-e,a.length-f)==b.substring(b.length-e,b.length-f)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e}; |
||||
diff_match_patch.prototype.diff_commonOverlap_=function(a,b){var c=a.length,d=b.length;if(0==c||0==d)return 0;c>d?a=a.substring(c-d):c<d&&(b=b.substring(0,c));c=Math.min(c,d);if(a==b)return c;for(var d=0,e=1;;){var f=a.substring(c-e),f=b.indexOf(f);if(-1==f)return d;e+=f;if(0==f||a.substring(c-e)==b.substring(0,e))d=e,e++}}; |
||||
diff_match_patch.prototype.diff_halfMatch_=function(a,b){function c(a,b,c){for(var d=a.substring(c,c+Math.floor(a.length/4)),e=-1,g="",h,j,n,l;-1!=(e=b.indexOf(d,e+1));){var m=f.diff_commonPrefix(a.substring(c),b.substring(e)),s=f.diff_commonSuffix(a.substring(0,c),b.substring(0,e));g.length<s+m&&(g=b.substring(e-s,e)+b.substring(e,e+m),h=a.substring(0,c-s),j=a.substring(c+m),n=b.substring(0,e-s),l=b.substring(e+m))}return 2*g.length>=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null; |
||||
var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.length<d.length)return null;var f=this,g=c(d,e,Math.ceil(d.length/4)),d=c(d,e,Math.ceil(d.length/2)),h;if(!g&&!d)return null;h=d?g?g[4].length>d[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]}; |
||||
diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f<a.length;)0==a[f][0]?(c[d++]=f,g=j,h=i,i=j=0,e=a[f][1]):(1==a[f][0]?j+=a[f][1].length:i+=a[f][1].length,e&&(e.length<=Math.max(g,h)&&e.length<=Math.max(j,i))&&(a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,d--,f=0<d?c[d-1]:-1,i=j=h=g=0,e=null,b=!0)),f++;b&&this.diff_cleanupMerge(a);this.diff_cleanupSemanticLossless(a);for(f=1;f<a.length;){if(-1==a[f-1][0]&&1==a[f][0]){b=a[f-1][1];c=a[f][1]; |
||||
d=this.diff_commonOverlap_(b,c);e=this.diff_commonOverlap_(c,b);if(d>=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}}; |
||||
diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_); |
||||
return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c<a.length-1;){if(0==a[c-1][0]&&0==a[c+1][0]){var d=a[c-1][1],e=a[c][1],f=a[c+1][1],g=this.diff_commonSuffix(d,e);if(g)var h=e.substring(e.length-g),d=d.substring(0,d.length-g),e=h+e.substring(0,e.length-g),f=h+f;for(var g=d,h=e,j=f,i=b(d,e)+b(e,f);e.charAt(0)===f.charAt(0);){var d=d+e.charAt(0),e=e.substring(1)+f.charAt(0),f=f.substring(1),k=b(d,e)+b(e,f);k>=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]= |
||||
h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/; |
||||
diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;f<a.length;){if(0==a[f][0])a[f][1].length<this.Diff_EditCost&&(j||i)?(c[d++]=f,g=j,h=i,e=a[f][1]):(d=0,e=null),j=i=!1;else if(-1==a[f][0]?i=!0:j=!0,e&&(g&&h&&j&&i||e.length<this.Diff_EditCost/2&&3==g+h+j+i))a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,e=null,g&&h?(j=i=!0,d=0):(d--,f=0<d?c[d-1]:-1,j=i=!1),b=!0;f++}b&&this.diff_cleanupMerge(a)}; |
||||
diff_match_patch.prototype.diff_cleanupMerge=function(a){a.push([0,""]);for(var b=0,c=0,d=0,e="",f="",g;b<a.length;)switch(a[b][0]){case 1:d++;f+=a[b][1];b++;break;case -1:c++;e+=a[b][1];b++;break;case 0:1<c+d?(0!==c&&0!==d&&(g=this.diff_commonPrefix(f,e),0!==g&&(0<b-c-d&&0==a[b-c-d-1][0]?a[b-c-d-1][1]+=f.substring(0,g):(a.splice(0,0,[0,f.substring(0,g)]),b++),f=f.substring(g),e=e.substring(g)),g=this.diff_commonSuffix(f,e),0!==g&&(a[b][1]=f.substring(f.length-g)+a[b][1],f=f.substring(0,f.length- |
||||
g),e=e.substring(0,e.length-g))),0===c?a.splice(b-d,c+d,[1,f]):0===d?a.splice(b-c,c+d,[-1,e]):a.splice(b-c-d,c+d,[-1,e],[1,f]),b=b-c-d+(c?1:0)+(d?1:0)+1):0!==b&&0==a[b-1][0]?(a[b-1][1]+=a[b][1],a.splice(b,1)):b++,c=d=0,f=e=""}""===a[a.length-1][1]&&a.pop();c=!1;for(b=1;b<a.length-1;)0==a[b-1][0]&&0==a[b+1][0]&&(a[b][1].substring(a[b][1].length-a[b-1][1].length)==a[b-1][1]?(a[b][1]=a[b-1][1]+a[b][1].substring(0,a[b][1].length-a[b-1][1].length),a[b+1][1]=a[b-1][1]+a[b+1][1],a.splice(b-1,1),c=!0):a[b][1].substring(0, |
||||
a[b+1][1].length)==a[b+1][1]&&(a[b-1][1]+=a[b+1][1],a[b][1]=a[b][1].substring(a[b+1][1].length)+a[b+1][1],a.splice(b+1,1),c=!0)),b++;c&&this.diff_cleanupMerge(a)};diff_match_patch.prototype.diff_xIndex=function(a,b){var c=0,d=0,e=0,f=0,g;for(g=0;g<a.length;g++){1!==a[g][0]&&(c+=a[g][1].length);-1!==a[g][0]&&(d+=a[g][1].length);if(c>b)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)}; |
||||
diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=/</g,e=/>/g,f=/\n/g,g=0;g<a.length;g++){var h=a[g][0],j=a[g][1],j=j.replace(c,"&").replace(d,"<").replace(e,">").replace(f,"¶<br>");switch(h){case 1:b[g]='<ins style="background:#e6ffe6;">'+j+"</ins>";break;case -1:b[g]='<del style="background:#ffe6e6;">'+j+"</del>";break;case 0:b[g]="<span>"+j+"</span>"}}return b.join("")}; |
||||
diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;c<a.length;c++)1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_text2=function(a){for(var b=[],c=0;c<a.length;c++)-1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_levenshtein=function(a){for(var b=0,c=0,d=0,e=0;e<a.length;e++){var f=a[e][0],g=a[e][1];switch(f){case 1:c+=g.length;break;case -1:d+=g.length;break;case 0:b+=Math.max(c,d),d=c=0}}return b+=Math.max(c,d)}; |
||||
diff_match_patch.prototype.diff_toDelta=function(a){for(var b=[],c=0;c<a.length;c++)switch(a[c][0]){case 1:b[c]="+"+encodeURI(a[c][1]);break;case -1:b[c]="-"+a[c][1].length;break;case 0:b[c]="="+a[c][1].length}return b.join("\t").replace(/%20/g," ")}; |
||||
diff_match_patch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/g),g=0;g<f.length;g++){var h=f[g].substring(1);switch(f[g].charAt(0)){case "+":try{c[d++]=[1,decodeURI(h)]}catch(j){throw Error("Illegal escape in diff_fromDelta: "+h);}break;case "-":case "=":var i=parseInt(h,10);if(isNaN(i)||0>i)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+ |
||||
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1}; |
||||
diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<<b.length-1,h=-1,i,k,q=b.length+a.length,r,t=0;t<b.length;t++){i=0;for(k=q;i<k;)d(t,c+ |
||||
k)<=g?i=k:q=k,k=Math.floor((q-i)/2+i);q=k;i=Math.max(1,c-k+1);var p=Math.min(c+k,a.length)+b.length;k=Array(p+2);for(k[p+1]=(1<<t)-1;p>=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h}; |
||||
diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=0;for(c=0;c<a.length;c++)b[a.charAt(c)]|=1<<a.length-c-1;return b}; |
||||
diff_match_patch.prototype.patch_addContext_=function(a,b){if(0!=b.length){for(var c=b.substring(a.start2,a.start2+a.length1),d=0;b.indexOf(c)!=b.lastIndexOf(c)&&c.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)d+=this.Patch_Margin,c=b.substring(a.start2-d,a.start2+a.length1+d);d+=this.Patch_Margin;(c=b.substring(a.start2-d,a.start2))&&a.diffs.unshift([0,c]);(d=b.substring(a.start2+a.length1,a.start2+a.length1+d))&&a.diffs.push([0,d]);a.start1-=c.length;a.start2-=c.length;a.length1+= |
||||
c.length+d.length;a.length2+=c.length+d.length}}; |
||||
diff_match_patch.prototype.patch_make=function(a,b,c){var d;if("string"==typeof a&&"string"==typeof b&&"undefined"==typeof c)d=a,b=this.diff_main(d,b,!0),2<b.length&&(this.diff_cleanupSemantic(b),this.diff_cleanupEfficiency(b));else if(a&&"object"==typeof a&&"undefined"==typeof b&&"undefined"==typeof c)b=a,d=this.diff_text1(b);else if("string"==typeof a&&b&&"object"==typeof b&&"undefined"==typeof c)d=a;else if("string"==typeof a&&"string"==typeof b&&c&&"object"==typeof c)d=a,b=c;else throw Error("Unknown call format to patch_make."); |
||||
if(0===b.length)return[];c=[];a=new diff_match_patch.patch_obj;for(var e=0,f=0,g=0,h=d,j=0;j<b.length;j++){var i=b[j][0],k=b[j][1];!e&&0!==i&&(a.start1=f,a.start2=g);switch(i){case 1:a.diffs[e++]=b[j];a.length2+=k.length;d=d.substring(0,g)+k+d.substring(g);break;case -1:a.length1+=k.length;a.diffs[e++]=b[j];d=d.substring(0,g)+d.substring(g+k.length);break;case 0:k.length<=2*this.Patch_Margin&&e&&b.length!=j+1?(a.diffs[e++]=b[j],a.length1+=k.length,a.length2+=k.length):k.length>=2*this.Patch_Margin&& |
||||
e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=new diff_match_patch.patch_obj;e.diffs=[];for(var f=0;f<d.diffs.length;f++)e.diffs[f]=d.diffs[f].slice();e.start1=d.start1;e.start2=d.start2;e.length1=d.length1;e.length2=d.length2;b[c]=e}return b}; |
||||
diff_match_patch.prototype.patch_apply=function(a,b){if(0==a.length)return[b,[]];a=this.patch_deepCopy(a);var c=this.patch_addPadding(a);b=c+b+c;this.patch_splitMax(a);for(var d=0,e=[],f=0;f<a.length;f++){var g=a[f].start2+d,h=this.diff_text1(a[f].diffs),j,i=-1;if(h.length>this.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g); |
||||
if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;i<a[f].diffs.length;i++){var q=a[f].diffs[i];0!==q[0]&&(k=this.diff_xIndex(g,h));1===q[0]?b=b.substring(0, |
||||
j+k)+q[1]+b.substring(j+k):-1===q[0]&&(b=b.substring(0,j+k)+b.substring(j+this.diff_xIndex(g,h+q[1].length)));-1!==q[0]&&(h+=q[1].length)}}}b=b.substring(c.length,b.length-c.length);return[b,e]}; |
||||
diff_match_patch.prototype.patch_addPadding=function(a){for(var b=this.Patch_Margin,c="",d=1;d<=b;d++)c+=String.fromCharCode(d);for(d=0;d<a.length;d++)a[d].start1+=b,a[d].start2+=b;var d=a[0],e=d.diffs;if(0==e.length||0!=e[0][0])e.unshift([0,c]),d.start1-=b,d.start2-=b,d.length1+=b,d.length2+=b;else if(b>e[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0, |
||||
c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c}; |
||||
diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c<a.length;c++)if(!(a[c].length1<=b)){var d=a[c];a.splice(c--,1);for(var e=d.start1,f=d.start2,g="";0!==d.diffs.length;){var h=new diff_match_patch.patch_obj,j=!0;h.start1=e-g.length;h.start2=f-g.length;""!==g&&(h.length1=h.length2=g.length,h.diffs.push([0,g]));for(;0!==d.diffs.length&&h.length1<b-this.Patch_Margin;){var g=d.diffs[0][0],i=d.diffs[0][1];1===g?(h.length2+=i.length,f+=i.length,h.diffs.push(d.diffs.shift()), |
||||
j=!1):-1===g&&1==h.diffs.length&&0==h.diffs[0][0]&&i.length>2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&& |
||||
(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b.join("")}; |
||||
diff_match_patch.prototype.patch_fromText=function(a){var b=[];if(!a)return b;a=a.split("\n");for(var c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<a.length;){var e=a[c].match(d);if(!e)throw Error("Invalid patch string: "+a[c]);var f=new diff_match_patch.patch_obj;b.push(f);f.start1=parseInt(e[1],10);""===e[2]?(f.start1--,f.length1=1):"0"==e[2]?f.length1=0:(f.start1--,f.length1=parseInt(e[2],10));f.start2=parseInt(e[3],10);""===e[4]?(f.start2--,f.length2=1):"0"==e[4]?f.length2=0:(f.start2--,f.length2= |
||||
parseInt(e[4],10));for(c++;c<a.length;){e=a[c].charAt(0);try{var g=decodeURI(a[c].substring(1))}catch(h){throw Error("Illegal escape in patch_fromText: "+g);}if("-"==e)f.diffs.push([-1,g]);else if("+"==e)f.diffs.push([1,g]);else if(" "==e)f.diffs.push([0,g]);else if("@"==e)break;else if(""!==e)throw Error('Invalid patch mode "'+e+'" in: '+g);c++}}return b};diff_match_patch.patch_obj=function(){this.diffs=[];this.start2=this.start1=null;this.length2=this.length1=0}; |
||||
diff_match_patch.patch_obj.prototype.toString=function(){var a,b;a=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;b=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;a=["@@ -"+a+" +"+b+" @@\n"];var c;for(b=0;b<this.diffs.length;b++){switch(this.diffs[b][0]){case 1:c="+";break;case -1:c="-";break;case 0:c=" "}a[b+1]=c+encodeURI(this.diffs[b][1])+"\n"}return a.join("").replace(/%20/g," ")}; |
||||
this.diff_match_patch=diff_match_patch;this.DIFF_DELETE=-1;this.DIFF_INSERT=1;this.DIFF_EQUAL=0;})() |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@
|
||||
/** |
||||
* @license |
||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE |
||||
* Build: `lodash -p -o template/vendor/lodash.custom.min.js include="groupBy,each,extend,some" exports="amd"` |
||||
*/ |
||||
;(function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function n(t,e,r,n){for(var o=-1,c=null==t?0:t.length;++o<c;){var u=t[o];e(n,u,r(u),t)}return n}function o(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&false!==e(t[r],r,t););return t}function c(t,e){for(var r=-1,n=null==t?0:t.length,o=0,c=[];++r<n;){ |
||||
var u=t[r];e(u,r,t)&&(c[o++]=u)}return c}function u(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function i(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)r=e(r,t[n],n,t);return r}function a(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return true;return false}function f(t){return function(e){return null==e?Bt:e[t]}}function s(t){return function(e){return t(e)}}function l(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function b(t){var e=Object; |
||||
return function(r){return t(e(r))}}function h(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function p(){}function y(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function j(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function _(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function g(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new _;++e<r;)this.add(t[e]); |
||||
}function v(t){this.size=(this.__data__=new j(t)).size}function d(t,e){var r=Je(t),n=!r&&He(t),o=!r&&!n&&Ke(t),c=!r&&!n&&!o&&Qe(t);if(r=r||n||o||c){for(var n=t.length,u=String,i=-1,a=Array(n);++i<n;)a[i]=u(i);n=a}else n=[];var f,u=n.length;for(f in t)!e&&!oe.call(t,f)||r&&("length"==f||o&&("offset"==f||"parent"==f)||c&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||ct(f,u))||n.push(f);return n}function A(t,e,r){var n=t[e];oe.call(t,e)&&yt(n,r)&&(r!==Bt||e in t)||z(t,e,r)}function w(t,e){for(var r=t.length;r--;)if(yt(t[r][0],e))return r; |
||||
return-1}function m(t,e,r,n){return Pe(t,function(t,o,c){e(n,t,r(t),c)}),n}function O(t,e){return t&&q(e,St(e),t)}function S(t,e){return t&&q(e,zt(e),t)}function z(t,e,r){"__proto__"==e&&_e?_e(t,e,{configurable:true,enumerable:true,value:r,writable:true}):t[e]=r}function k(t,e,r,n,c,u){var i,a=1&e,f=2&e,s=4&e;if(r&&(i=c?r(t,n,c,u):r(t)),i!==Bt)return i;if(!vt(t))return t;if(n=Je(t)){if(i=nt(t),!a)return G(t,i)}else{var l=Ne(t),b="[object Function]"==l||"[object GeneratorFunction]"==l;if(Ke(t))return N(t,a); |
||||
if("[object Object]"==l||"[object Arguments]"==l||b&&!c){if(i=f||b?{}:typeof t.constructor!="function"||at(t)?{}:Le(be(t)),!a)return f?J(t,S(i,t)):H(t,O(i,t))}else{if(!Wt[l])return c?t:{};i=ot(t,l,k,a)}}if(u||(u=new v),c=u.get(t))return c;u.set(t,i);var f=s?f?Y:X:f?zt:St,h=n?Bt:f(t);return o(h||t,function(n,o){h&&(o=n,n=t[o]),A(i,o,k(n,e,r,o,t,u))}),i}function x(t,e){e=C(e,t);for(var r=0,n=e.length;null!=t&&r<n;)t=t[lt(e[r++])];return r&&r==n?t:Bt}function F(t,e,r){return e=e(t),Je(t)?e:u(e,r(t)); |
||||
}function I(t){if(null==t)t=t===Bt?"[object Undefined]":"[object Null]";else if(je&&je in Object(t)){var e=oe.call(t,je),r=t[je];try{t[je]=Bt;var n=true}catch(t){}var o=ue.call(t);n&&(e?t[je]=r:delete t[je]),t=o}else t=ue.call(t);return t}function E(t){return dt(t)&&"[object Arguments]"==I(t)}function U(t,e,r,n,o){if(t===e)e=true;else if(null==t||null==e||!dt(t)&&!dt(e))e=t!==t&&e!==e;else t:{var c=Je(t),u=Je(e),i=c?"[object Array]":Ne(t),a=u?"[object Array]":Ne(e),i="[object Arguments]"==i?"[object Object]":i,a="[object Arguments]"==a?"[object Object]":a,f="[object Object]"==i,u="[object Object]"==a; |
||||
if((a=i==a)&&Ke(t)){if(!Ke(e)){e=false;break t}c=true,f=false}if(a&&!f)o||(o=new v),e=c||Qe(t)?K(t,e,r,n,U,o):Q(t,e,i,r,n,U,o);else{if(!(1&r)&&(c=f&&oe.call(t,"__wrapped__"),i=u&&oe.call(e,"__wrapped__"),c||i)){t=c?t.value():t,e=i?e.value():e,o||(o=new v),e=U(t,e,r,n,o);break t}if(a)e:if(o||(o=new v),c=1&r,i=X(t),u=i.length,a=X(e).length,u==a||c){for(f=u;f--;){var s=i[f];if(!(c?s in e:oe.call(e,s))){e=false;break e}}if((a=o.get(t))&&o.get(e))e=a==e;else{a=true,o.set(t,e),o.set(e,t);for(var l=c;++f<u;){var s=i[f],b=t[s],h=e[s]; |
||||
if(n)var p=c?n(h,b,s,e,t,o):n(b,h,s,t,e,o);if(p===Bt?b!==h&&!U(b,h,r,n,o):!p){a=false;break}l||(l="constructor"==s)}a&&!l&&(r=t.constructor,n=e.constructor,r!=n&&"constructor"in t&&"constructor"in e&&!(typeof r=="function"&&r instanceof r&&typeof n=="function"&&n instanceof n)&&(a=false)),o.delete(t),o.delete(e),e=a}}else e=false;else e=false}}return e}function B(t,e){var r=e.length,n=r;if(null==t)return!n;for(t=Object(t);r--;){var o=e[r];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return false}for(;++r<n;){var o=e[r],c=o[0],u=t[c],i=o[1]; |
||||
if(o[2]){if(u===Bt&&!(c in t))return false}else if(o=new v,void 0===Bt?!U(i,u,3,void 0,o):1)return false}return true}function M(t){return dt(t)&>(t.length)&&!!Nt[I(t)]}function D(t){return typeof t=="function"?t:null==t?xt:typeof t=="object"?Je(t)?L(t[0],t[1]):$(t):It(t)}function $(t){var e=et(t);return 1==e.length&&e[0][2]?ft(e[0][0],e[0][1]):function(r){return r===t||B(r,e)}}function L(t,e){return it(t)&&e===e&&!vt(e)?ft(lt(t),e):function(r){var n=mt(r,t);return n===Bt&&n===e?Ot(r,t):U(e,n,3)}}function P(t){ |
||||
return function(e){return x(e,t)}}function V(t){return We(st(t,xt),t+"")}function R(t,e){var r;return Pe(t,function(t,n,o){return r=e(t,n,o),!r}),!!r}function T(t){if(typeof t=="string")return t;if(Je(t)){for(var e=T,r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o+""}return At(t)?$e?$e.call(t):"":(e=t+"","0"==e&&1/t==-Mt?"-0":e)}function C(t,e){return Je(t)?t:it(t,e)?[t]:Ge(wt(t))}function N(t,e){if(e)return t.slice();var r=t.length,r=le?le(r):new t.constructor(r);return t.copy(r), |
||||
r}function W(t){var e=new t.constructor(t.byteLength);return new se(e).set(new se(t)),e}function G(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function q(t,e,r){var n=!r;r||(r={});for(var o=-1,c=e.length;++o<c;){var u=e[o],i=Bt;i===Bt&&(i=t[u]),n?z(r,u,i):A(r,u,i)}return r}function H(t,e){return q(t,Te(t),e)}function J(t,e){return q(t,Ce(t),e)}function K(t,e,r,n,o,c){var u=1&r,i=t.length,f=e.length;if(i!=f&&!(u&&f>i))return false;if((f=c.get(t))&&c.get(e))return f==e;var f=-1,s=true,l=2&r?new g:Bt; |
||||
for(c.set(t,e),c.set(e,t);++f<i;){var b=t[f],h=e[f];if(n)var p=u?n(h,b,f,e,t,c):n(b,h,f,t,e,c);if(p!==Bt){if(p)continue;s=false;break}if(l){if(!a(e,function(t,e){if(!l.has(e)&&(b===t||o(b,t,r,n,c)))return l.push(e)})){s=false;break}}else if(b!==h&&!o(b,h,r,n,c)){s=false;break}}return c.delete(t),c.delete(e),s}function Q(t,e,r,n,o,c,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!c(new se(t),new se(e)))break; |
||||
return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return yt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var i=l;case"[object Set]":if(i||(i=h),t.size!=e.size&&!(1&n))break;return(r=u.get(t))?r==e:(n|=2,u.set(t,e),e=K(i(t),i(e),n,o,c,u),u.delete(t),e);case"[object Symbol]":if(De)return De.call(t)==De.call(e)}return false}function X(t){return F(t,St,Te)}function Y(t){return F(t,zt,Ce); |
||||
}function Z(){var t=p.iteratee||Ft,t=t===Ft?D:t;return arguments.length?t(arguments[0],arguments[1]):t}function tt(t,e){var r=t.__data__,n=typeof e;return("string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?r[typeof e=="string"?"string":"hash"]:r.map}function et(t){for(var e=St(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,o===o&&!vt(o)]}return e}function rt(t,e){var r=null==t?Bt:t[e];return(!vt(r)||ce&&ce in r?0:(_t(r)?ie:Tt).test(bt(r)))?r:Bt}function nt(t){var e=t.length,r=t.constructor(e); |
||||
return e&&"string"==typeof t[0]&&oe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function ot(r,n,o,c){var u=r.constructor;switch(n){case"[object ArrayBuffer]":return W(r);case"[object Boolean]":case"[object Date]":return new u(+r);case"[object DataView]":return n=c?W(r.buffer):r.buffer,new r.constructor(n,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]": |
||||
case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return n=c?W(r.buffer):r.buffer,new r.constructor(n,r.byteOffset,r.length);case"[object Map]":return n=c?o(l(r),1):l(r),i(n,t,new r.constructor);case"[object Number]":case"[object String]":return new u(r);case"[object RegExp]":return n=new r.constructor(r.source,Rt.exec(r)),n.lastIndex=r.lastIndex,n;case"[object Set]":return n=c?o(h(r),1):h(r),i(n,e,new r.constructor);case"[object Symbol]":return De?Object(De.call(r)):{}; |
||||
}}function ct(t,e){return e=null==e?9007199254740991:e,!!e&&(typeof t=="number"||Ct.test(t))&&-1<t&&0==t%1&&t<e}function ut(t,e,r){if(!vt(r))return false;var n=typeof e;return!!("number"==n?jt(r)&&ct(e,r.length):"string"==n&&e in r)&&yt(r[e],t)}function it(t,e){if(Je(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!At(t))||($t.test(t)||!Dt.test(t)||null!=e&&t in Object(e))}function at(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||ee)}function ft(t,e){ |
||||
return function(r){return null!=r&&(r[t]===e&&(e!==Bt||t in Object(r)))}}function st(t,e){var n=void 0,n=Ae(n===Bt?t.length-1:n,0);return function(){for(var o=arguments,c=-1,u=Ae(o.length-n,0),i=Array(u);++c<u;)i[c]=o[n+c];for(c=-1,u=Array(n+1);++c<n;)u[c]=o[c];return u[n]=e(i),r(t,this,u)}}function lt(t){if(typeof t=="string"||At(t))return t;var e=t+"";return"0"==e&&1/t==-Mt?"-0":e}function bt(t){if(null!=t){try{return ne.call(t)}catch(t){}return t+""}return""}function ht(t,e){return(Je(t)?o:Pe)(t,Z(e,3)); |
||||
}function pt(t,e){function r(){var n=arguments,o=e?e.apply(this,n):n[0],c=r.cache;return c.has(o)?c.get(o):(n=t.apply(this,n),r.cache=c.set(o,n)||c,n)}if(typeof t!="function"||null!=e&&typeof e!="function")throw new TypeError("Expected a function");return r.cache=new(pt.Cache||_),r}function yt(t,e){return t===e||t!==t&&e!==e}function jt(t){return null!=t&>(t.length)&&!_t(t)}function _t(t){return!!vt(t)&&(t=I(t),"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t); |
||||
}function gt(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function vt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function dt(t){return null!=t&&typeof t=="object"}function At(t){return typeof t=="symbol"||dt(t)&&"[object Symbol]"==I(t)}function wt(t){return null==t?"":T(t)}function mt(t,e,r){return t=null==t?Bt:x(t,e),t===Bt?r:t}function Ot(t,e){var r;if(r=null!=t){r=t;var n;n=C(e,r);for(var o=-1,c=n.length,u=false;++o<c;){var i=lt(n[o]);if(!(u=null!=r&&null!=r&&i in Object(r)))break; |
||||
r=r[i]}u||++o!=c?r=u:(c=null==r?0:r.length,r=!!c&>(c)&&ct(i,c)&&(Je(r)||He(r)))}return r}function St(t){if(jt(t))t=d(t);else if(at(t)){var e,r=[];for(e in Object(t))oe.call(t,e)&&"constructor"!=e&&r.push(e);t=r}else t=de(t);return t}function zt(t){if(jt(t))t=d(t,true);else if(vt(t)){var e,r=at(t),n=[];for(e in t)("constructor"!=e||!r&&oe.call(t,e))&&n.push(e);t=n}else{if(e=[],null!=t)for(r in Object(t))e.push(r);t=e}return t}function kt(t){return function(){return t}}function xt(t){return t}function Ft(t){ |
||||
return D(typeof t=="function"?t:k(t,1))}function It(t){return it(t)?f(lt(t)):P(t)}function Et(){return[]}function Ut(){return false}var Bt,Mt=1/0,Dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$t=/^\w*$/,Lt=/^\./,Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vt=/\\(\\)?/g,Rt=/\w*$/,Tt=/^\[object .+?Constructor\]$/,Ct=/^(?:0|[1-9]\d*)$/,Nt={};Nt["[object Float32Array]"]=Nt["[object Float64Array]"]=Nt["[object Int8Array]"]=Nt["[object Int16Array]"]=Nt["[object Int32Array]"]=Nt["[object Uint8Array]"]=Nt["[object Uint8ClampedArray]"]=Nt["[object Uint16Array]"]=Nt["[object Uint32Array]"]=true, |
||||
Nt["[object Arguments]"]=Nt["[object Array]"]=Nt["[object ArrayBuffer]"]=Nt["[object Boolean]"]=Nt["[object DataView]"]=Nt["[object Date]"]=Nt["[object Error]"]=Nt["[object Function]"]=Nt["[object Map]"]=Nt["[object Number]"]=Nt["[object Object]"]=Nt["[object RegExp]"]=Nt["[object Set]"]=Nt["[object String]"]=Nt["[object WeakMap]"]=false;var Wt={};Wt["[object Arguments]"]=Wt["[object Array]"]=Wt["[object ArrayBuffer]"]=Wt["[object DataView]"]=Wt["[object Boolean]"]=Wt["[object Date]"]=Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Map]"]=Wt["[object Number]"]=Wt["[object Object]"]=Wt["[object RegExp]"]=Wt["[object Set]"]=Wt["[object String]"]=Wt["[object Symbol]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=true, |
||||
Wt["[object Error]"]=Wt["[object Function]"]=Wt["[object WeakMap]"]=false;var Gt,qt=typeof global=="object"&&global&&global.Object===Object&&global,Ht=typeof self=="object"&&self&&self.Object===Object&&self,Jt=qt||Ht||Function("return this")(),Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,Xt=Qt&&Qt.exports===Kt,Yt=Xt&&qt.process;t:{try{Gt=Yt&&Yt.binding&&Yt.binding("util");break t}catch(t){}Gt=void 0}var Zt=Gt&&Gt.isTypedArray,te=Array.prototype,ee=Object.prototype,re=Jt["__core-js_shared__"],ne=Function.prototype.toString,oe=ee.hasOwnProperty,ce=function(){ |
||||
var t=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ue=ee.toString,ie=RegExp("^"+ne.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ae=Xt?Jt.Buffer:Bt,fe=Jt.Symbol,se=Jt.Uint8Array,le=ae?ae.a:Bt,be=b(Object.getPrototypeOf),he=Object.create,pe=ee.propertyIsEnumerable,ye=te.splice,je=fe?fe.toStringTag:Bt,_e=function(){try{var t=rt(Object,"defineProperty");return t({},"",{}),t}catch(t){} |
||||
}(),ge=Object.getOwnPropertySymbols,ve=ae?ae.isBuffer:Bt,de=b(Object.keys),Ae=Math.max,we=Date.now,me=rt(Jt,"DataView"),Oe=rt(Jt,"Map"),Se=rt(Jt,"Promise"),ze=rt(Jt,"Set"),ke=rt(Jt,"WeakMap"),xe=rt(Object,"create"),Fe=bt(me),Ie=bt(Oe),Ee=bt(Se),Ue=bt(ze),Be=bt(ke),Me=fe?fe.prototype:Bt,De=Me?Me.valueOf:Bt,$e=Me?Me.toString:Bt,Le=function(){function t(){}return function(e){return vt(e)?he?he(e):(t.prototype=e,e=new t,t.prototype=Bt,e):{}}}();y.prototype.clear=function(){this.__data__=xe?xe(null):{}, |
||||
this.size=0},y.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},y.prototype.get=function(t){var e=this.__data__;return xe?(t=e[t],"__lodash_hash_undefined__"===t?Bt:t):oe.call(e,t)?e[t]:Bt},y.prototype.has=function(t){var e=this.__data__;return xe?e[t]!==Bt:oe.call(e,t)},y.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xe&&e===Bt?"__lodash_hash_undefined__":e,this},j.prototype.clear=function(){this.__data__=[],this.size=0; |
||||
},j.prototype.delete=function(t){var e=this.__data__;return t=w(e,t),!(0>t)&&(t==e.length-1?e.pop():ye.call(e,t,1),--this.size,true)},j.prototype.get=function(t){var e=this.__data__;return t=w(e,t),0>t?Bt:e[t][1]},j.prototype.has=function(t){return-1<w(this.__data__,t)},j.prototype.set=function(t,e){var r=this.__data__,n=w(r,t);return 0>n?(++this.size,r.push([t,e])):r[n][1]=e,this},_.prototype.clear=function(){this.size=0,this.__data__={hash:new y,map:new(Oe||j),string:new y}},_.prototype.delete=function(t){ |
||||
return t=tt(this,t).delete(t),this.size-=t?1:0,t},_.prototype.get=function(t){return tt(this,t).get(t)},_.prototype.has=function(t){return tt(this,t).has(t)},_.prototype.set=function(t,e){var r=tt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},g.prototype.add=g.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},g.prototype.has=function(t){return this.__data__.has(t)},v.prototype.clear=function(){this.__data__=new j,this.size=0},v.prototype.delete=function(t){ |
||||
var e=this.__data__;return t=e.delete(t),this.size=e.size,t},v.prototype.get=function(t){return this.__data__.get(t)},v.prototype.has=function(t){return this.__data__.has(t)},v.prototype.set=function(t,e){var r=this.__data__;if(r instanceof j){var n=r.__data__;if(!Oe||199>n.length)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new _(n)}return r.set(t,e),this.size=r.size,this};var Pe=function(t,e){return function(r,n){if(null==r)return r;if(!jt(r))return t(r,n);for(var o=r.length,c=e?o:-1,u=Object(r);(e?c--:++c<o)&&false!==n(u[c],c,u);); |
||||
return r}}(function(t,e){return t&&Ve(t,e,St)}),Ve=function(t){return function(e,r,n){var o=-1,c=Object(e);n=n(e);for(var u=n.length;u--;){var i=n[t?u:++o];if(false===r(c[i],i,c))break}return e}}(),Re=_e?function(t,e){return _e(t,"toString",{configurable:true,enumerable:false,value:kt(e),writable:true})}:xt,Te=ge?function(t){return null==t?[]:(t=Object(t),c(ge(t),function(e){return pe.call(t,e)}))}:Et,Ce=ge?function(t){for(var e=[];t;)u(e,Te(t)),t=be(t);return e}:Et,Ne=I;(me&&"[object DataView]"!=Ne(new me(new ArrayBuffer(1)))||Oe&&"[object Map]"!=Ne(new Oe)||Se&&"[object Promise]"!=Ne(Se.resolve())||ze&&"[object Set]"!=Ne(new ze)||ke&&"[object WeakMap]"!=Ne(new ke))&&(Ne=function(t){ |
||||
var e=I(t);if(t=(t="[object Object]"==e?t.constructor:Bt)?bt(t):"")switch(t){case Fe:return"[object DataView]";case Ie:return"[object Map]";case Ee:return"[object Promise]";case Ue:return"[object Set]";case Be:return"[object WeakMap]"}return e});var We=function(t){var e=0,r=0;return function(){var n=we(),o=16-(n-r);if(r=n,0<o){if(800<=++e)return arguments[0]}else e=0;return t.apply(Bt,arguments)}}(Re),Ge=function(t){t=pt(t,function(t){return 500===e.size&&e.clear(),t});var e=t.cache;return t}(function(t){ |
||||
var e=[];return Lt.test(t)&&e.push(""),t.replace(Pt,function(t,r,n,o){e.push(n?o.replace(Vt,"$1"):r||t)}),e}),qe=function(t,e){return function(r,o){var c=Je(r)?n:m,u=e?e():{};return c(r,t,Z(o,2),u)}}(function(t,e,r){oe.call(t,r)?t[r].push(e):z(t,r,[e])});pt.Cache=_;var He=E(function(){return arguments}())?E:function(t){return dt(t)&&oe.call(t,"callee")&&!pe.call(t,"callee")},Je=Array.isArray,Ke=ve||Ut,Qe=Zt?s(Zt):M,Xe=function(t){return V(function(e,r){var n=-1,o=r.length,c=1<o?r[o-1]:Bt,u=2<o?r[2]:Bt,c=3<t.length&&typeof c=="function"?(o--, |
||||
c):Bt;for(u&&ut(r[0],r[1],u)&&(c=3>o?Bt:c,o=1),e=Object(e);++n<o;)(u=r[n])&&t(e,u,n,c);return e})}(function(t,e){q(e,zt(e),t)});p.assignIn=Xe,p.constant=kt,p.groupBy=qe,p.iteratee=Ft,p.keys=St,p.keysIn=zt,p.memoize=pt,p.property=It,p.extend=Xe,p.eq=yt,p.forEach=ht,p.get=mt,p.hasIn=Ot,p.identity=xt,p.isArguments=He,p.isArray=Je,p.isArrayLike=jt,p.isBuffer=Ke,p.isFunction=_t,p.isLength=gt,p.isObject=vt,p.isObjectLike=dt,p.isSymbol=At,p.isTypedArray=Qe,p.stubArray=Et,p.stubFalse=Ut,p.some=function(t,e,r){ |
||||
var n=Je(t)?a:R;return r&&ut(t,e,r)&&(e=Bt),n(t,Z(e,3))},p.toString=wt,p.each=ht,p.VERSION="4.17.4",typeof define=="function"&&typeof define.amd=="object"&&define.amd&& define(function(){return p})}).call(this); |
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT) |
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
@ -0,0 +1,204 @@
|
||||
var isArray = Array.isArray || function (arr) { |
||||
return Object.prototype.toString.call(arr) == '[object Array]'; |
||||
}; |
||||
|
||||
/** |
||||
* Expose `pathToRegexp`. |
||||
*/ |
||||
// module.exports = pathToRegexp
|
||||
|
||||
/** |
||||
* The main path matching regexp utility. |
||||
* |
||||
* @type {RegExp} |
||||
*/ |
||||
var PATH_REGEXP = new RegExp([ |
||||
// Match escaped characters that would otherwise appear in future matches.
|
||||
// This allows the user to escape special characters that won't transform.
|
||||
'(\\\\.)', |
||||
// Match Express-style parameters and un-named parameters with a prefix
|
||||
// and optional suffixes. Matches appear as:
|
||||
//
|
||||
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
|
||||
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
|
||||
'([\\/.])?(?:\\:(\\w+)(?:\\(((?:\\\\.|[^)])*)\\))?|\\(((?:\\\\.|[^)])*)\\))([+*?])?', |
||||
// Match regexp special characters that are always escaped.
|
||||
'([.+*?=^!:${}()[\\]|\\/])' |
||||
].join('|'), 'g'); |
||||
|
||||
/** |
||||
* Escape the capturing group by escaping special characters and meaning. |
||||
* |
||||
* @param {String} group |
||||
* @return {String} |
||||
*/ |
||||
function escapeGroup (group) { |
||||
return group.replace(/([=!:$\/()])/g, '\\$1'); |
||||
} |
||||
|
||||
/** |
||||
* Attach the keys as a property of the regexp. |
||||
* |
||||
* @param {RegExp} re |
||||
* @param {Array} keys |
||||
* @return {RegExp} |
||||
*/ |
||||
function attachKeys (re, keys) { |
||||
re.keys = keys; |
||||
return re; |
||||
} |
||||
|
||||
/** |
||||
* Get the flags for a regexp from the options. |
||||
* |
||||
* @param {Object} options |
||||
* @return {String} |
||||
*/ |
||||
function flags (options) { |
||||
return options.sensitive ? '' : 'i'; |
||||
} |
||||
|
||||
/** |
||||
* Pull out keys from a regexp. |
||||
* |
||||
* @param {RegExp} path |
||||
* @param {Array} keys |
||||
* @return {RegExp} |
||||
*/ |
||||
function regexpToRegexp (path, keys) { |
||||
// Use a negative lookahead to match only capturing groups.
|
||||
var groups = path.source.match(/\((?!\?)/g); |
||||
|
||||
if (groups) { |
||||
for (var i = 0; i < groups.length; i++) { |
||||
keys.push({ |
||||
name: i, |
||||
delimiter: null, |
||||
optional: false, |
||||
repeat: false |
||||
}); |
||||
} |
||||
} |
||||
|
||||
return attachKeys(path, keys); |
||||
} |
||||
|
||||
/** |
||||
* Transform an array into a regexp. |
||||
* |
||||
* @param {Array} path |
||||
* @param {Array} keys |
||||
* @param {Object} options |
||||
* @return {RegExp} |
||||
*/ |
||||
function arrayToRegexp (path, keys, options) { |
||||
var parts = []; |
||||
|
||||
for (var i = 0; i < path.length; i++) { |
||||
parts.push(pathToRegexp(path[i], keys, options).source); |
||||
} |
||||
|
||||
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options)); |
||||
return attachKeys(regexp, keys); |
||||
} |
||||
|
||||
/** |
||||
* Replace the specific tags with regexp strings. |
||||
* |
||||
* @param {String} path |
||||
* @param {Array} keys |
||||
* @return {String} |
||||
*/ |
||||
function replacePath (path, keys) { |
||||
var index = 0; |
||||
|
||||
function replace (_, escaped, prefix, key, capture, group, suffix, escape) { |
||||
if (escaped) { |
||||
return escaped; |
||||
} |
||||
|
||||
if (escape) { |
||||
return '\\' + escape; |
||||
} |
||||
|
||||
var repeat = suffix === '+' || suffix === '*'; |
||||
var optional = suffix === '?' || suffix === '*'; |
||||
|
||||
keys.push({ |
||||
name: key || index++, |
||||
delimiter: prefix || '/', |
||||
optional: optional, |
||||
repeat: repeat |
||||
}); |
||||
|
||||
prefix = prefix ? ('\\' + prefix) : ''; |
||||
capture = escapeGroup(capture || group || '[^' + (prefix || '\\/') + ']+?'); |
||||
|
||||
if (repeat) { |
||||
capture = capture + '(?:' + prefix + capture + ')*'; |
||||
} |
||||
|
||||
if (optional) { |
||||
return '(?:' + prefix + '(' + capture + '))?'; |
||||
} |
||||
|
||||
// Basic parameter support.
|
||||
return prefix + '(' + capture + ')'; |
||||
} |
||||
|
||||
return path.replace(PATH_REGEXP, replace); |
||||
} |
||||
|
||||
/** |
||||
* Normalize the given path string, returning a regular expression. |
||||
* |
||||
* An empty array can be passed in for the keys, which will hold the |
||||
* placeholder key descriptions. For example, using `/user/:id`, `keys` will |
||||
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`. |
||||
* |
||||
* @param {(String|RegExp|Array)} path |
||||
* @param {Array} [keys] |
||||
* @param {Object} [options] |
||||
* @return {RegExp} |
||||
*/ |
||||
function pathToRegexp (path, keys, options) { |
||||
keys = keys || []; |
||||
|
||||
if (!isArray(keys)) { |
||||
options = keys; |
||||
keys = []; |
||||
} else if (!options) { |
||||
options = {}; |
||||
} |
||||
|
||||
if (path instanceof RegExp) { |
||||
return regexpToRegexp(path, keys, options); |
||||
} |
||||
|
||||
if (isArray(path)) { |
||||
return arrayToRegexp(path, keys, options); |
||||
} |
||||
|
||||
var strict = options.strict; |
||||
var end = options.end !== false; |
||||
var route = replacePath(path, keys); |
||||
var endsWithSlash = path.charAt(path.length - 1) === '/'; |
||||
|
||||
// In non-strict mode we allow a slash at the end of match. If the path to
|
||||
// match already ends with a slash, we remove it for consistency. The slash
|
||||
// is valid at the end of a path match, not in the middle. This is important
|
||||
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
||||
if (!strict) { |
||||
route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?'; |
||||
} |
||||
|
||||
if (end) { |
||||
route += '$'; |
||||
} else { |
||||
// In non-ending mode, we need the capturing groups to match as much as
|
||||
// possible by using a positive lookahead to the end or next path segment.
|
||||
route += strict && endsWithSlash ? '' : '(?=\\/|$)'; |
||||
} |
||||
|
||||
return attachKeys(new RegExp('^' + route, flags(options)), keys); |
||||
} |
@ -0,0 +1,96 @@
|
||||
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
|
||||
if (!Object.keys) { |
||||
Object.keys = (function () { |
||||
'use strict'; |
||||
var hasOwnProperty = Object.prototype.hasOwnProperty, |
||||
hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), |
||||
dontEnums = [ |
||||
'toString', |
||||
'toLocaleString', |
||||
'valueOf', |
||||
'hasOwnProperty', |
||||
'isPrototypeOf', |
||||
'propertyIsEnumerable', |
||||
'constructor' |
||||
], |
||||
dontEnumsLength = dontEnums.length; |
||||
|
||||
return function (obj) { |
||||
if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { |
||||
throw new TypeError('Object.keys called on non-object'); |
||||
} |
||||
|
||||
var result = [], prop, i; |
||||
|
||||
for (prop in obj) { |
||||
if (hasOwnProperty.call(obj, prop)) { |
||||
result.push(prop); |
||||
} |
||||
} |
||||
|
||||
if (hasDontEnumBug) { |
||||
for (i = 0; i < dontEnumsLength; i++) { |
||||
if (hasOwnProperty.call(obj, dontEnums[i])) { |
||||
result.push(dontEnums[i]); |
||||
} |
||||
} |
||||
} |
||||
return result; |
||||
}; |
||||
}()); |
||||
} |
||||
|
||||
//Production steps of ECMA-262, Edition 5, 15.4.4.18
|
||||
//Reference: http://es5.github.com/#x15.4.4.18
|
||||
if (!Array.prototype.forEach) { |
||||
Array.prototype.forEach = function (callback, thisArg) { |
||||
var T, k; |
||||
|
||||
if (this == null) { |
||||
throw new TypeError(' this is null or not defined'); |
||||
} |
||||
|
||||
// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
var O = Object(this); |
||||
|
||||
// 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// 3. Let len be ToUint32(lenValue).
|
||||
var len = O.length >>> 0; |
||||
|
||||
// 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// See: http://es5.github.com/#x9.11
|
||||
if (typeof callback !== "function") { |
||||
throw new TypeError(callback + " is not a function"); |
||||
} |
||||
|
||||
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
if (arguments.length > 1) { |
||||
T = thisArg; |
||||
} |
||||
|
||||
// 6. Let k be 0
|
||||
k = 0; |
||||
|
||||
// 7. Repeat, while k < len
|
||||
while (k < len) { |
||||
var kValue; |
||||
|
||||
// a. Let Pk be ToString(k).
|
||||
// This is implicit for LHS operands of the in operator
|
||||
// b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// This step can be combined with c
|
||||
// c. If kPresent is true, then
|
||||
if (k in O) { |
||||
// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
kValue = O[k]; |
||||
|
||||
// ii. Call the Call internal method of callback with T as the this value and
|
||||
// argument list containing kValue, k, and O.
|
||||
callback.call(T, kValue, k, O); |
||||
} |
||||
// d. Increase k by 1.
|
||||
k++; |
||||
} |
||||
// 8. return undefined
|
||||
}; |
||||
} |
@ -0,0 +1,51 @@
|
||||
/* Pretty printing styles. Used with prettify.js. */ |
||||
/* Vim sunburst theme by David Leibovic */ |
||||
|
||||
pre .str, code .str { color: #65B042; } /* string - green */ |
||||
pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */ |
||||
pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */ |
||||
pre .typ, code .typ { color: #89bdff; } /* type - light blue */ |
||||
pre .lit, code .lit { color: #3387CC; } /* literal - blue */ |
||||
pre .pun, code .pun { color: #fff; } /* punctuation - white */ |
||||
pre .pln, code .pln { color: #fff; } /* plaintext - white */ |
||||
pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */ |
||||
pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */ |
||||
pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */ |
||||
pre .dec, code .dec { color: #3387CC; } /* decimal - blue */ |
||||
|
||||
pre.prettyprint, code.prettyprint { |
||||
background-color: #000; |
||||
-moz-border-radius: 8px; |
||||
-webkit-border-radius: 8px; |
||||
-o-border-radius: 8px; |
||||
-ms-border-radius: 8px; |
||||
-khtml-border-radius: 8px; |
||||
border-radius: 8px; |
||||
} |
||||
|
||||
pre.prettyprint { |
||||
width: 95%; |
||||
margin: 1em auto; |
||||
padding: 1em; |
||||
white-space: pre-wrap; |
||||
} |
||||
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */ |
||||
ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */ |
||||
li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } |
||||
/* Alternate shading for lines */ |
||||
li.L1,li.L3,li.L5,li.L7,li.L9 { } |
||||
|
||||
@media print { |
||||
pre .str, code .str { color: #060; } |
||||
pre .kwd, code .kwd { color: #006; font-weight: bold; } |
||||
pre .com, code .com { color: #600; font-style: italic; } |
||||
pre .typ, code .typ { color: #404; font-weight: bold; } |
||||
pre .lit, code .lit { color: #044; } |
||||
pre .pun, code .pun { color: #440; } |
||||
pre .pln, code .pln { color: #000; } |
||||
pre .tag, code .tag { color: #006; font-weight: bold; } |
||||
pre .atn, code .atn { color: #404; } |
||||
pre .atv, code .atv { color: #060; } |
||||
} |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2012 Jeffrey B. Arnold |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], |
||||
["pun",/^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Onno Hommes. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, |
||||
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Onno Hommes. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, |
||||
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Onno Hommes. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, |
||||
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Peter Kofler |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, |
||||
null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Peter Kofler |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/,null,'"'],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^REM[^\r\n]*/,null],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,null],["pln",/^[A-Z][A-Z0-9]?(?:\$|%)?/i,null],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, |
||||
null,"0123456789"],["pun",/^.[^\s\w\.$%"]*/,null]]),["basic","cbm"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
Copyright (C) 2011 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[\(\{\[]+/,null,"([{"],["clo",/^[\)\}\]]+/,null,")]}"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, |
||||
null],["typ",/^:[0-9a-zA-Z\-]+/]]),["clj"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']+)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], |
||||
["com",/^(?:\x3c!--|--\x3e)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}\b/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!(?:.*)/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/(?:.*)/],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|sync|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i], |
||||
["typ",/^\b(?:bool|double|Dynamic|int|num|Object|String|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?[\']{3}[\s|\S]*?[^\\][\']{3}/],["str",/^r?[\"]{3}[\s|\S]*?[^\\][\"]{3}/],["str",/^r?\'(\'|(?:[^\n\r\f])*?[^\\]\')/],["str",/^r?\"(\"|(?:[^\n\r\f])*?[^\\]\")/],["typ",/^[A-Z]\w*/],["pln",/^[a-z_$][a-z0-9_]*/i],["pun",/^[~!%^&*+=|?:<>/-]/],["lit",/^\b0x[0-9a-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit", |
||||
/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(){}\[\],.;]/]]),["dart"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Andrew Allen |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], |
||||
["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Andrew Allen |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^\?[^ \t\n({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/], |
||||
["kwd",/^-[a-z_]+/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;]/]]),["erlang","erl"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], |
||||
["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2010 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])+(?:\'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\/\*[\s\S]*?\*\/)/],["pln",/^(?:[^\/\"\'`]|\/(?![\/\*]))+/i]]),["go"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\x0B\f\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, |
||||
null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Eric Knibbe |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], |
||||
["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], |
||||
["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Eric Knibbe |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], |
||||
["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], |
||||
["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2011 Martin S. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2014 Paulo Moura |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], |
||||
["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Nikhil Dabas |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Nikhil Dabas |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^!?\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["com",/^;[^\r\n]*/,null,";"]],[["pln",/^[%@!](?:[-a-zA-Z$._][-a-zA-Z$._0-9]*|\d+)/],["kwd",/^[A-Za-z_][0-9A-Za-z_]*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[xX][a-fA-F0-9]+)/],["pun",/^[()\[\]{},=*<>:]|\.\.\.$/]]),["llvm","ll"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2014 Paulo Moura |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["lit",/^[a-z][a-zA-Z0-9_]*/],["lit",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])+\'?/,null,"'"],["lit",/^(?:0'.|0b[0-1]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\r\n]*/,null,"%"],["com",/^\/\*[\s\S]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/], |
||||
["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_][a-zA-Z0-9_]*/],["pun",/^[.,;{}:^<>=\\/+*?#!-]/]]),["logtalk","lgt"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Eric Knibbe |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\`[^\`]*(?:\`|$)/,null,"`"],["lit",/^0x[\da-f]+|\d+/i,null,"0123456789"],["atn",/^#\d+|[#$][a-z_][\w.]*|#![ \S]+lasso9\b/i,null,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\r\n]*|\/\*[\s\S]*?\*\//], |
||||
["atn",/^-(?!infinity)[a-z_][\w.]*|\.\s*'[a-z_][\w.]*'/i],["lit",/^\d*\.\d+(?:e[-+]?\d+)?|infinity\b|NaN\b/i],["atv",/^::\s*[a-z_][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i], |
||||
["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[a-z_][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[-+*\/%=<>&|!?\\]/]]),["lasso","ls","lassoscript"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i], |
||||
["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"]); |
File diff suppressed because one or more lines are too long
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], |
||||
["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2011 Kitware Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"]|\\.)*")/,null,'"']],[["com",/^;[^\r\n]*/,null,";"],["dec",/^(?:\$(?:D|DEVICE|EC|ECODE|ES|ESTACK|ET|ETRAP|H|HOROLOG|I|IO|J|JOB|K|KEY|P|PRINCIPAL|Q|QUIT|ST|STACK|S|STORAGE|SY|SYSTEM|T|TEST|TL|TLEVEL|TR|TRESTART|X|Y|Z[A-Z]*|A|ASCII|C|CHAR|D|DATA|E|EXTRACT|F|FIND|FN|FNUMBER|G|GET|J|JUSTIFY|L|LENGTH|NA|NAME|O|ORDER|P|PIECE|QL|QLENGTH|QS|QSUBSCRIPT|Q|QUERY|R|RANDOM|RE|REVERSE|S|SELECT|ST|STACK|T|TEXT|TR|TRANSLATE|NaN))\b/i, |
||||
null],["kwd",/^(?:[^\$]B|BREAK|C|CLOSE|D|DO|E|ELSE|F|FOR|G|GOTO|H|HALT|H|HANG|I|IF|J|JOB|K|KILL|L|LOCK|M|MERGE|N|NEW|O|OPEN|Q|QUIT|R|READ|S|SET|TC|TCOMMIT|TRE|TRESTART|TRO|TROLLBACK|TS|TSTART|U|USE|V|VIEW|W|WRITE|X|XECUTE)\b/i,null],["lit",/^[+-]?(?:(?:\.\d+|\d+(?:\.\d*)?)(?:E[+\-]?\d+)?)/i],["pln",/^[a-z][a-zA-Z0-9]*/i],["pun",/^[^\w\t\n\r\xA0\"\$;%\^]|_/]]),["mumps"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2011 Zimin A.V. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, |
||||
null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, |
||||
null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2011 Zimin A.V. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null],["str",/^<#(?:[^#>])*(?:#>|$)/,null],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null],["com",/^\/\/[^\r\n]*/, |
||||
null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, |
||||
null],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,null],["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^@[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],["pln",/^'?[A-Za-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\"\`\/\#]*/,null]]),["n","nemerle"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2013 Peter Kofler |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/,null,"'"],["pln",/^\s+/,null," \r\n\t\u00a0"]],[["com",/^\(\*[\s\S]*?(?:\*\)|$)|^\{[\s\S]*?(?:\}|$)/,null],["kwd",/^(?:ABSOLUTE|AND|ARRAY|ASM|ASSEMBLER|BEGIN|CASE|CONST|CONSTRUCTOR|DESTRUCTOR|DIV|DO|DOWNTO|ELSE|END|EXTERNAL|FOR|FORWARD|FUNCTION|GOTO|IF|IMPLEMENTATION|IN|INLINE|INTERFACE|INTERRUPT|LABEL|MOD|NOT|OBJECT|OF|OR|PACKED|PROCEDURE|PROGRAM|RECORD|REPEAT|SET|SHL|SHR|THEN|TO|TYPE|UNIT|UNTIL|USES|VAR|VIRTUAL|WHILE|WITH|XOR)\b/i, |
||||
null],["lit",/^(?:true|false|self|nil)/i,null],["pln",/^[a-z][a-z0-9]*/i,null],["lit",/^(?:\$[a-f0-9]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?)/i,null,"0123456789"],["pun",/^.[^\s\w\.$@\'\/]*/,null]]),["pascal"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2006 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2012 Jeffrey B. Arnold |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], |
||||
["pun",/^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2012 Jeffrey Arnold |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[a-zA-Z@]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[{}()\[\]]+/]]),["Rd","rd"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,20 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2015 Chris Morgan |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([],[["pln",/^[\t\n\r \xA0]+/],["com",/^\/\/.*/],["com",/^\/\*[\s\S]*?(?:\*\/|$)/],["str",/^b"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}))*?"/],["str",/^"(?:[^\\]|\\(?:.|x[\da-fA-F]{2}|u\{\[\da-fA-F]{1,6}\}))*?"/],["str",/^b?r(#*)\"[\s\S]*?\"\1/],["str",/^b'([^\\]|\\(.|x[\da-fA-F]{2}))'/],["str",/^'([^\\]|\\(.|x[\da-fA-F]{2}|u\{[\da-fA-F]{1,6}\}))'/],["tag",/^'\w+?\b/],["kwd",/^(?:match|if|else|as|break|box|continue|extern|fn|for|in|if|impl|let|loop|pub|return|super|unsafe|where|while|use|mod|trait|struct|enum|type|move|mut|ref|static|const|crate)\b/], |
||||
["kwd",/^(?:alignof|become|do|offsetof|priv|pure|sizeof|typeof|unsized|yield|abstract|virtual|final|override|macro)\b/],["typ",/^(?:[iu](8|16|32|64|size)|char|bool|f32|f64|str|Self)\b/],["typ",/^(?:Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b/],["lit",/^(self|true|false|null)\b/], |
||||
["lit",/^\d[0-9_]*(?:[iu](?:size|8|16|32|64))?/],["lit",/^0x[a-fA-F0-9_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0o[0-7_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0b[01_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^\d[0-9_]*\.(?![^\s\d.])/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)(?:[eE][+-]?[0-9_]+)?(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)(?:f32|f64)?/],["lit",/^\d[0-9_]*(?:\.\d[0-9_]*)?(?:[eE][+-]?[0-9_]+)?(?:f32|f64)/], |
||||
["atn",/^[a-z_]\w*!/i],["pln",/^[a-z_]\w*/i],["atv",/^#!?\[[\s\S]*?\]/],["pun",/^[+\-/*=^&|!<>%[\](){}?:.,;]/],["pln",/./]]),["rust"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2012 Jeffrey B. Arnold |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\]|\\[\s\S])*(?:\'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![A-Za-z0-9_.])/],["lit",/^0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?/],["lit",/^[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|[0-9]+))(?![A-Za-z0-9_.])/], |
||||
["pun",/^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\*|\+|\^|\/|!|%.*?%|=|~|\$|@|:{1,3}|[\[\](){};,?])/],["pln",/^(?:[A-Za-z]+[A-Za-z0-9_.]*|\.[a-zA-Z_][0-9a-zA-Z\._]*)(?![A-Za-z0-9_.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2010 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], |
||||
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|APPLY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONNECT|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOLLOWING|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MATCHED|MERGE|NATURAL|NATIONAL|NOCHECK|NONCLUSTERED|NOCYCLE|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PARTITION|PERCENT|PIVOT|PLAN|PRECEDING|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|ROWS?|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|START|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNBOUNDED|UNION|UNIQUE|UNPIVOT|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WITHIN|WRITETEXT|XML)(?=[^\w-]|$)/i, |
||||
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2008 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,null,"("],["clo",/^\)+/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, |
||||
null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),"cl el lisp lsp scm ss rkt".split(" ")); |
@ -0,0 +1,16 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2015 Google Inc. |
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \n\r\t\v\f\0]+/,null," \n\r\t\v\f\x00"],["str",/^"(?:[^"\\]|(?:\\.)|(?:\\\((?:[^"\\)]|\\.)*\)))*"/,null,'"']],[["lit",/^(?:(?:0x[\da-fA-F][\da-fA-F_]*\.[\da-fA-F][\da-fA-F_]*[pP]?)|(?:\d[\d_]*\.\d[\d_]*[eE]?))[+-]?\d[\d_]*/,null],["lit",/^-?(?:(?:0(?:(?:b[01][01_]*)|(?:o[0-7][0-7_]*)|(?:x[\da-fA-F][\da-fA-F_]*)))|(?:\d[\d_]*))/,null],["lit",/^(?:true|false|nil)\b/,null],["kwd",/^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|#available|#else|#elseif|#endif|#if|#line|arch|arm|arm64|associativity|as|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|dynamicType|else|enum|fallthrough|final|for|func|get|import|indirect|infix|init|inout|internal|i386|if|in|iOS|iOSApplicationExtension|is|lazy|left|let|mutating|none|nonmutating|operator|optional|OSX|OSXApplicationExtension|override|postfix|precedence|prefix|private|protocol|Protocol|public|required|rethrows|return|right|safe|self|set|static|struct|subscript|super|switch|throw|try|Type|typealias|unowned|unsafe|var|weak|watchOS|while|willSet|x86_64)\b/, |
||||
null],["com",/^\/\/.*?[\n\r]/,null],["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null],["pun",/^<<=|<=|<<|>>=|>=|>>|===|==|\.\.\.|&&=|\.\.<|!==|!=|&=|~=|~|\(|\)|\[|\]|{|}|@|#|;|\.|,|:|\|\|=|\?\?|\|\||&&|&\*|&\+|&-|&=|\+=|-=|\/=|\*=|\^=|%=|\|=|->|`|==|\+\+|--|\/|\+|!|\*|%|<|>|&|\||\^|\?|=|-|_/,null],["typ",/^\b(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null]]),["swift"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2012 Pyrios |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\{+/,null,"{"],["clo",/^\}+/,null,"}"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,null],["lit",/^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i], |
||||
["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["tcl"]); |
@ -0,0 +1,17 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2011 Martin S. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\r\n]*/,null,"%"]],[["kwd",/^\\[a-zA-Z@]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[{}()\[\]=]+/]]),["latex","tex"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, |
||||
null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", |
||||
"vbs"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\r\n_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, |
||||
null],["com",/^REM\b[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[%&@!#]+\])?|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb", |
||||
"vbs"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2010 benoit@ryder.fr |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, |
||||
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], |
||||
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); |
@ -0,0 +1,19 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2010 benoit@ryder.fr |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, |
||||
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i], |
||||
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2009 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]); |
||||
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2015 ribrdb @ code.google.com |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", |
||||
/^\w+/]]),["yaml","yml"]); |
@ -0,0 +1,18 @@
|
||||
/* |
||||
|
||||
Copyright (C) 2015 ribrdb @ code.google.com |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[ \r\n]/],["pln", |
||||
/^\w+/]]),["yaml","yml"]); |
@ -0,0 +1 @@
|
||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} |
@ -0,0 +1,46 @@
|
||||
!function(){/* |
||||
|
||||
Copyright (C) 2006 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
window.PR_SHOULD_USE_CONTINUATION=!0; |
||||
(function(){function T(a){function d(e){var b=e.charCodeAt(0);if(92!==b)return b;var a=e.charAt(1);return(b=w[a])?b:"0"<=a&&"7">=a?parseInt(e.substring(1),8):"u"===a||"x"===a?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return"\\"===e||"-"===e||"]"===e||"^"===e?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[0-9A-Fa-f]{4}|\\x[0-9A-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\s\S]|-|[^-\\]/g);e= |
||||
[];var a="^"===b[0],c=["["];a&&c.push("^");for(var a=a?1:0,g=b.length;a<g;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),k;a+2<g&&"-"===b[a+1]?(k=d(b[a+2]),a+=2):k=h;e.push([h,k]);65>k||122<h||(65>k||90<h||e.push([Math.max(65,h)|32,Math.min(k,90)|32]),97>k||122<h||e.push([Math.max(97,h)&-33,Math.min(k,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];g=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=g[1]+1?g[1]=Math.max(g[1],h[1]):b.push(g=h);for(a=0;a<b.length;++a)h=b[a], |
||||
c.push(f(h[0])),h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(f(h[1])));c.push("]");return c.join("")}function v(e){for(var a=e.source.match(/(?:\[(?:[^\x5C\x5D]|\\[\s\S])*\]|\\u[A-Fa-f0-9]{4}|\\x[A-Fa-f0-9]{2}|\\[0-9]+|\\[^ux0-9]|\(\?[:!=]|[\(\)\^]|[^\x5B\x5C\(\)\^]+)/g),c=a.length,d=[],g=0,h=0;g<c;++g){var k=a[g];"("===k?++h:"\\"===k.charAt(0)&&(k=+k.substring(1))&&(k<=h?d[k]=-1:a[g]=f(k))}for(g=1;g<d.length;++g)-1===d[g]&&(d[g]=++A);for(h=g=0;g<c;++g)k=a[g],"("===k?(++h,d[h]||(a[g]="(?:")):"\\"=== |
||||
k.charAt(0)&&(k=+k.substring(1))&&k<=h&&(a[g]="\\"+d[k]);for(g=0;g<c;++g)"^"===a[g]&&"^"!==a[g+1]&&(a[g]="");if(e.ignoreCase&&n)for(g=0;g<c;++g)k=a[g],e=k.charAt(0),2<=k.length&&"["===e?a[g]=b(k):"\\"!==e&&(a[g]=k.replace(/[a-zA-Z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var A=0,n=!1,l=!1,m=0,c=a.length;m<c;++m){var p=a[m];if(p.ignoreCase)l=!0;else if(/[a-z]/i.test(p.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0; |
||||
l=!1;break}}for(var w={b:8,t:9,n:10,v:11,f:12,r:13},r=[],m=0,c=a.length;m<c;++m){p=a[m];if(p.global||p.multiline)throw Error(""+p);r.push("(?:"+v(p)+")")}return new RegExp(r.join("|"),l?"gi":"g")}function U(a,d){function f(a){var c=a.nodeType;if(1==c){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)f(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)v[l]="\n",n[l<<1]=A++,n[l++<<1|1]=a}}else if(3==c||4==c)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[ \t\r\n]+/g, |
||||
" "),v[l]=c,n[l<<1]=A,A+=c.length,n[l++<<1|1]=a)}var b=/(?:^|\s)nocode(?:\s|$)/,v=[],A=0,n=[],l=0;f(a);return{a:v.join("").replace(/\n$/,""),c:n}}function J(a,d,f,b,v){f&&(a={h:a,l:1,j:null,m:null,a:f,c:null,i:d,g:null},b(a),v.push.apply(v,a.g))}function V(a){for(var d=void 0,f=a.firstChild;f;f=f.nextSibling)var b=f.nodeType,d=1===b?d?a:f:3===b?W.test(f.nodeValue)?a:d:d;return d===a?void 0:d}function G(a,d){function f(a){for(var l=a.i,m=a.h,c=[l,"pln"],p=0,w=a.a.match(v)||[],r={},e=0,t=w.length;e< |
||||
t;++e){var z=w[e],q=r[z],g=void 0,h;if("string"===typeof q)h=!1;else{var k=b[z.charAt(0)];if(k)g=z.match(k[1]),q=k[0];else{for(h=0;h<A;++h)if(k=d[h],g=z.match(k[1])){q=k[0];break}g||(q="pln")}!(h=5<=q.length&&"lang-"===q.substring(0,5))||g&&"string"===typeof g[1]||(h=!1,q="src");h||(r[z]=q)}k=p;p+=z.length;if(h){h=g[1];var B=z.indexOf(h),D=B+h.length;g[2]&&(D=z.length-g[2].length,B=D-h.length);q=q.substring(5);J(m,l+k,z.substring(0,B),f,c);J(m,l+k+B,h,K(q,h),c);J(m,l+k+D,z.substring(D),f,c)}else c.push(l+ |
||||
k,q)}a.g=c}var b={},v;(function(){for(var f=a.concat(d),l=[],m={},c=0,p=f.length;c<p;++c){var w=f[c],r=w[3];if(r)for(var e=r.length;0<=--e;)b[r.charAt(e)]=w;w=w[1];r=""+w;m.hasOwnProperty(r)||(l.push(w),m[r]=null)}l.push(/[\0-\uffff]/);v=T(l)})();var A=d.length;return f}function y(a){var d=[],f=[];a.tripleQuotedStrings?d.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, |
||||
null,"'\""]):a.multiLineStrings?d.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):d.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);a.verbatimStrings&&f.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var b=a.hashComments;b&&(a.cStyleComments?(1<b?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, |
||||
null,"#"]),f.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):d.push(["com",/^#[^\r\n]*/,null,"#"]));a.cStyleComments&&(f.push(["com",/^\/\/[^\r\n]*/,null]),f.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));if(b=a.regexLiterals){var v=(b=1<b?"":"\n\r")?".":"[\\S\\s]";f.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+ |
||||
("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+v+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+v+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&f.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&f.push(["kwd",new RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),null]);d.push(["pln",/^\s+/,null," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");f.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i, |
||||
null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(b),null]);return G(d,f)}function L(a,d,f){function b(a){var c=a.nodeType;if(1==c&&!A.test(a.className))if("br"===a.nodeName)v(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((3==c||4==c)&&f){var d=a.nodeValue,q=d.match(n);q&&(c=d.substring(0,q.index),a.nodeValue=c,(d=d.substring(q.index+q[0].length))&& |
||||
a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),v(a),c||a.parentNode.removeChild(a))}}function v(a){function b(a,c){var d=c?a.cloneNode(!1):a,k=a.parentNode;if(k){var k=b(k,1),e=a.nextSibling;k.appendChild(d);for(var f=e;f;f=e)e=f.nextSibling,k.appendChild(f)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;a=b(a.nextSibling,0);for(var d;(d=a.parentNode)&&1===d.nodeType;)a=d;c.push(a)}for(var A=/(?:^|\s)nocode(?:\s|$)/,n=/\r\n?|\n/,l=a.ownerDocument,m=l.createElement("li");a.firstChild;)m.appendChild(a.firstChild); |
||||
for(var c=[m],p=0;p<c.length;++p)b(c[p]);d===(d|0)&&c[0].setAttribute("value",d);var w=l.createElement("ol");w.className="linenums";d=Math.max(0,d-1|0)||0;for(var p=0,r=c.length;p<r;++p)m=c[p],m.className="L"+(p+d)%10,m.firstChild||m.appendChild(l.createTextNode("\u00a0")),w.appendChild(m);a.appendChild(w)}function t(a,d){for(var f=d.length;0<=--f;){var b=d[f];I.hasOwnProperty(b)?E.console&&console.warn("cannot override language handler %s",b):I[b]=a}}function K(a,d){a&&I.hasOwnProperty(a)||(a=/^\s*</.test(d)? |
||||
"default-markup":"default-code");return I[a]}function M(a){var d=a.j;try{var f=U(a.h,a.l),b=f.a;a.a=b;a.c=f.c;a.i=0;K(d,b)(a);var v=/\bMSIE\s(\d+)/.exec(navigator.userAgent),v=v&&8>=+v[1],d=/\n/g,A=a.a,n=A.length,f=0,l=a.c,m=l.length,b=0,c=a.g,p=c.length,w=0;c[p]=n;var r,e;for(e=r=0;e<p;)c[e]!==c[e+2]?(c[r++]=c[e++],c[r++]=c[e++]):e+=2;p=r;for(e=r=0;e<p;){for(var t=c[e],z=c[e+1],q=e+2;q+2<=p&&c[q+1]===z;)q+=2;c[r++]=t;c[r++]=z;e=q}c.length=r;var g=a.h;a="";g&&(a=g.style.display,g.style.display="none"); |
||||
try{for(;b<m;){var h=l[b+2]||n,k=c[w+2]||n,q=Math.min(h,k),B=l[b+1],D;if(1!==B.nodeType&&(D=A.substring(f,q))){v&&(D=D.replace(d,"\r"));B.nodeValue=D;var N=B.ownerDocument,u=N.createElement("span");u.className=c[w+1];var y=B.parentNode;y.replaceChild(u,B);u.appendChild(B);f<h&&(l[b+1]=B=N.createTextNode(A.substring(q,h)),y.insertBefore(B,u.nextSibling))}f=q;f>=h&&(b+=2);f>=k&&(w+=2)}}finally{g&&(g.style.display=a)}}catch(x){E.console&&console.log(x&&x.stack||x)}}var E=window,C=["break,continue,do,else,for,if,return,while"], |
||||
F=[[C,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[F,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], |
||||
O=[F,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],P=[F,"abstract,as,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],F=[F,"debugger,eval,export,function,get,instanceof,null,set,undefined,var,with,Infinity,NaN"], |
||||
Q=[C,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],R=[C,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],C=[C,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, |
||||
W=/\S/,X=y({keywords:[H,P,O,F,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",Q,R,C],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),I={};t(X,["default-code"]);t(G([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", |
||||
/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));t(G([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], |
||||
["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);t(G([],[["atv",/^[\s\S]+/]]),["uq.val"]);t(y({keywords:H,hashComments:!0,cStyleComments:!0,types:S}),"c cc cpp cxx cyc m".split(" "));t(y({keywords:"null,true,false"}),["json"]);t(y({keywords:P,hashComments:!0,cStyleComments:!0, |
||||
verbatimStrings:!0,types:S}),["cs"]);t(y({keywords:O,cStyleComments:!0}),["java"]);t(y({keywords:C,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);t(y({keywords:Q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);t(y({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}), |
||||
["perl","pl","pm"]);t(y({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);t(y({keywords:F,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);t(y({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);t(G([],[["str",/^[\s\S]+/]]),["regex"]); |
||||
var Y=E.PR={createSimpleLexer:G,registerLangHandler:t,sourceDecorator:y,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:E.prettyPrintOne=function(a,d,f){f=f||!1;d=d||null;var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;f&&L(b,f,!0);M({j:d,m:f,h:b,l:1,a:null,i:null,c:null, |
||||
g:null});return b.innerHTML},prettyPrint:E.prettyPrint=function(a,d){function f(){for(var b=E.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<t.length&&c.now()<b;p++){for(var d=t[p],l=g,m=d;m=m.previousSibling;){var n=m.nodeType,u=(7===n||8===n)&&m.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==n||/\S/.test(m.nodeValue))break;if(u){l={};u.replace(/\b(\w+)=([\w:.%+-]+)/g,function(a,b,c){l[b]=c});break}}m=d.className;if((l!==g||r.test(m))&&!e.test(m)){n=!1;for(u=d.parentNode;u;u=u.parentNode)if(q.test(u.tagName)&& |
||||
u.className&&r.test(u.className)){n=!0;break}if(!n){d.className+=" prettyprinted";n=l.lang;if(!n){var n=m.match(w),C;!n&&(C=V(d))&&z.test(C.tagName)&&(n=C.className.match(w));n&&(n=n[1])}if(y.test(d.tagName))u=1;else var u=d.currentStyle,x=v.defaultView,u=(u=u?u.whiteSpace:x&&x.getComputedStyle?x.getComputedStyle(d,null).getPropertyValue("white-space"):0)&&"pre"===u.substring(0,3);x=l.linenums;(x="true"===x||+x)||(x=(x=m.match(/\blinenums\b(?::(\d+))?/))?x[1]&&x[1].length?+x[1]:!0:!1);x&&L(d,x,u); |
||||
M({j:n,h:d,m:x,l:u,a:null,i:null,c:null,g:null})}}}p<t.length?E.setTimeout(f,250):"function"===typeof a&&a()}for(var b=d||document.body,v=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],t=[],n=0;n<b.length;++n)for(var l=0,m=b[n].length;l<m;++l)t.push(b[n][l]);var b=null,c=Date;c.now||(c={now:function(){return+new Date}});var p=0,w=/\blang(?:uage)?-([\w.]+)(?!\S)/,r=/\bprettyprint\b/,e=/\bprettyprinted\b/,y=/pre|xmp/i,z=/^code$/i, |
||||
q=/^(?:pre|code|xmp)$/i,g={};f()}},H=E.define;"function"===typeof H&&H.amd&&H("google-code-prettify",[],function(){return Y})})();}() |
@ -0,0 +1,63 @@
|
||||
!function(){/* |
||||
|
||||
Copyright (C) 2013 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
|
||||
Copyright (C) 2006 Google Inc. |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
||||
*/ |
||||
(function(){function ba(g){function k(){try{M.doScroll("left")}catch(g){t.setTimeout(k,50);return}z("poll")}function z(k){if("readystatechange"!=k.type||"complete"==A.readyState)("load"==k.type?t:A)[B](p+k.type,z,!1),!q&&(q=!0)&&g.call(t,k.type||k)}var Y=A.addEventListener,q=!1,C=!0,x=Y?"addEventListener":"attachEvent",B=Y?"removeEventListener":"detachEvent",p=Y?"":"on";if("complete"==A.readyState)g.call(t,"lazy");else{if(A.createEventObject&&M.doScroll){try{C=!t.frameElement}catch(da){}C&&k()}A[x](p+ |
||||
"DOMContentLoaded",z,!1);A[x](p+"readystatechange",z,!1);t[x](p+"load",z,!1)}}function U(){V&&ba(function(){var g=N.length;ca(g?function(){for(var k=0;k<g;++k)(function(g){t.setTimeout(function(){t.exports[N[g]].apply(t,arguments)},0)})(k)}:void 0)})}for(var t=window,A=document,M=A.documentElement,O=A.head||A.getElementsByTagName("head")[0]||M,B="",F=A.getElementsByTagName("script"),q=F.length;0<=--q;){var P=F[q],Z=P.src.match(/^[^?#]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(Z){B=Z[1]||"";P.parentNode.removeChild(P); |
||||
break}}var V=!0,H=[],Q=[],N=[];B.replace(/[?&]([^&=]+)=([^&]+)/g,function(g,k,z){z=decodeURIComponent(z);k=decodeURIComponent(k);"autorun"==k?V=!/^[0fn]/i.test(z):"lang"==k?H.push(z):"skin"==k?Q.push(z):"callback"==k&&N.push(z)});q=0;for(B=H.length;q<B;++q)(function(){var g=A.createElement("script");g.onload=g.onerror=g.onreadystatechange=function(){!g||g.readyState&&!/loaded|complete/.test(g.readyState)||(g.onerror=g.onload=g.onreadystatechange=null,--T,T||t.setTimeout(U,0),g.parentNode&&g.parentNode.removeChild(g), |
||||
g=null)};g.type="text/javascript";g.src="https://cdn.rawgit.com/google/code-prettify/master/loader/lang-"+encodeURIComponent(H[q])+".js";O.insertBefore(g,O.firstChild)})(H[q]);for(var T=H.length,F=[],q=0,B=Q.length;q<B;++q)F.push("https://cdn.rawgit.com/google/code-prettify/master/loader/skins/"+encodeURIComponent(Q[q])+".css");F.push("https://cdn.rawgit.com/google/code-prettify/master/loader/prettify.css");(function(g){function k(q){if(q!==z){var t=A.createElement("link");t.rel="stylesheet";t.type= |
||||
"text/css";q+1<z&&(t.error=t.onerror=function(){k(q+1)});t.href=g[q];O.appendChild(t)}}var z=g.length;k(0)})(F);var ca=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var g;(function(){function k(a){function d(e){var b=e.charCodeAt(0);if(92!==b)return b;var a=e.charAt(1);return(b=W[a])?b:"0"<=a&&"7">=a?parseInt(e.substring(1),8):"u"===a||"x"===a?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(32>e)return(16>e?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return"\\"===e||"-"=== |
||||
e||"]"===e||"^"===e?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[0-9A-Fa-f]{4}|\\x[0-9A-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\s\S]|-|[^-\\]/g);e=[];var a="^"===b[0],c=["["];a&&c.push("^");for(var a=a?1:0,h=b.length;a<h;++a){var l=b[a];if(/\\[bdsw]/i.test(l))c.push(l);else{var l=d(l),n;a+2<h&&"-"===b[a+1]?(n=d(b[a+2]),a+=2):n=l;e.push([l,n]);65>n||122<l||(65>n||90<l||e.push([Math.max(65,l)|32,Math.min(n,90)|32]),97>n||122<l||e.push([Math.max(97,l)&-33,Math.min(n,122)&-33]))}}e.sort(function(e, |
||||
a){return e[0]-a[0]||a[1]-e[1]});b=[];h=[];for(a=0;a<e.length;++a)l=e[a],l[0]<=h[1]+1?h[1]=Math.max(h[1],l[1]):b.push(h=l);for(a=0;a<b.length;++a)l=b[a],c.push(f(l[0])),l[1]>l[0]&&(l[1]+1>l[0]&&c.push("-"),c.push(f(l[1])));c.push("]");return c.join("")}function g(e){for(var a=e.source.match(/(?:\[(?:[^\x5C\x5D]|\\[\s\S])*\]|\\u[A-Fa-f0-9]{4}|\\x[A-Fa-f0-9]{2}|\\[0-9]+|\\[^ux0-9]|\(\?[:!=]|[\(\)\^]|[^\x5B\x5C\(\)\^]+)/g),c=a.length,d=[],h=0,l=0;h<c;++h){var n=a[h];"("===n?++l:"\\"===n.charAt(0)&&(n= |
||||
+n.substring(1))&&(n<=l?d[n]=-1:a[h]=f(n))}for(h=1;h<d.length;++h)-1===d[h]&&(d[h]=++k);for(l=h=0;h<c;++h)n=a[h],"("===n?(++l,d[l]||(a[h]="(?:")):"\\"===n.charAt(0)&&(n=+n.substring(1))&&n<=l&&(a[h]="\\"+d[n]);for(h=0;h<c;++h)"^"===a[h]&&"^"!==a[h+1]&&(a[h]="");if(e.ignoreCase&&I)for(h=0;h<c;++h)n=a[h],e=n.charAt(0),2<=n.length&&"["===e?a[h]=b(n):"\\"!==e&&(a[h]=n.replace(/[a-zA-Z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var k=0,I=!1, |
||||
m=!1,J=0,c=a.length;J<c;++J){var r=a[J];if(r.ignoreCase)m=!0;else if(/[a-z]/i.test(r.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){I=!0;m=!1;break}}for(var W={b:8,t:9,n:10,v:11,f:12,r:13},u=[],J=0,c=a.length;J<c;++J){r=a[J];if(r.global||r.multiline)throw Error(""+r);u.push("(?:"+g(r)+")")}return new RegExp(u.join("|"),m?"gi":"g")}function q(a,d){function f(a){var c=a.nodeType;if(1==c){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)f(c);c=a.nodeName.toLowerCase();if("br"=== |
||||
c||"li"===c)g[m]="\n",I[m<<1]=k++,I[m++<<1|1]=a}}else if(3==c||4==c)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[ \t\r\n]+/g," "),g[m]=c,I[m<<1]=k,k+=c.length,I[m++<<1|1]=a)}var b=/(?:^|\s)nocode(?:\s|$)/,g=[],k=0,I=[],m=0;f(a);return{a:g.join("").replace(/\n$/,""),c:I}}function t(a,d,f,b,g){f&&(a={h:a,l:1,j:null,m:null,a:f,c:null,i:d,g:null},b(a),g.push.apply(g,a.g))}function A(a){for(var d=void 0,f=a.firstChild;f;f=f.nextSibling)var b=f.nodeType,d=1===b?d?a:f:3===b?T.test(f.nodeValue)? |
||||
a:d:d;return d===a?void 0:d}function C(a,d){function f(a){for(var m=a.i,k=a.h,c=[m,"pln"],r=0,W=a.a.match(g)||[],u={},e=0,q=W.length;e<q;++e){var D=W[e],w=u[D],h=void 0,l;if("string"===typeof w)l=!1;else{var n=b[D.charAt(0)];if(n)h=D.match(n[1]),w=n[0];else{for(l=0;l<p;++l)if(n=d[l],h=D.match(n[1])){w=n[0];break}h||(w="pln")}!(l=5<=w.length&&"lang-"===w.substring(0,5))||h&&"string"===typeof h[1]||(l=!1,w="src");l||(u[D]=w)}n=r;r+=D.length;if(l){l=h[1];var E=D.indexOf(l),G=E+l.length;h[2]&&(G=D.length- |
||||
h[2].length,E=G-l.length);w=w.substring(5);t(k,m+n,D.substring(0,E),f,c);t(k,m+n+E,l,F(w,l),c);t(k,m+n+G,D.substring(G),f,c)}else c.push(m+n,w)}a.g=c}var b={},g;(function(){for(var f=a.concat(d),m=[],p={},c=0,r=f.length;c<r;++c){var q=f[c],u=q[3];if(u)for(var e=u.length;0<=--e;)b[u.charAt(e)]=q;q=q[1];u=""+q;p.hasOwnProperty(u)||(m.push(q),p[u]=null)}m.push(/[\0-\uffff]/);g=k(m)})();var p=d.length;return f}function x(a){var d=[],f=[];a.tripleQuotedStrings?d.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, |
||||
null,"'\""]):a.multiLineStrings?d.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):d.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);a.verbatimStrings&&f.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var b=a.hashComments;b&&(a.cStyleComments?(1<b?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, |
||||
null,"#"]),f.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):d.push(["com",/^#[^\r\n]*/,null,"#"]));a.cStyleComments&&(f.push(["com",/^\/\/[^\r\n]*/,null]),f.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));if(b=a.regexLiterals){var g=(b=1<b?"":"\n\r")?".":"[\\S\\s]";f.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+ |
||||
("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+g+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+g+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&f.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&f.push(["kwd",new RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),null]);d.push(["pln",/^\s+/,null," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");f.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i, |
||||
null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(b),null]);return C(d,f)}function B(a,d,f){function b(a){var c=a.nodeType;if(1==c&&!k.test(a.className))if("br"===a.nodeName)g(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((3==c||4==c)&&f){var d=a.nodeValue,p=d.match(q);p&&(c=d.substring(0,p.index),a.nodeValue=c,(d=d.substring(p.index+p[0].length))&& |
||||
a.parentNode.insertBefore(m.createTextNode(d),a.nextSibling),g(a),c||a.parentNode.removeChild(a))}}function g(a){function b(a,c){var d=c?a.cloneNode(!1):a,n=a.parentNode;if(n){var n=b(n,1),e=a.nextSibling;n.appendChild(d);for(var f=e;f;f=e)e=f.nextSibling,n.appendChild(f)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;a=b(a.nextSibling,0);for(var d;(d=a.parentNode)&&1===d.nodeType;)a=d;c.push(a)}for(var k=/(?:^|\s)nocode(?:\s|$)/,q=/\r\n?|\n/,m=a.ownerDocument,p=m.createElement("li");a.firstChild;)p.appendChild(a.firstChild); |
||||
for(var c=[p],r=0;r<c.length;++r)b(c[r]);d===(d|0)&&c[0].setAttribute("value",d);var t=m.createElement("ol");t.className="linenums";d=Math.max(0,d-1|0)||0;for(var r=0,u=c.length;r<u;++r)p=c[r],p.className="L"+(r+d)%10,p.firstChild||p.appendChild(m.createTextNode("\u00a0")),t.appendChild(p);a.appendChild(t)}function p(a,d){for(var f=d.length;0<=--f;){var b=d[f];X.hasOwnProperty(b)?R.console&&console.warn("cannot override language handler %s",b):X[b]=a}}function F(a,d){a&&X.hasOwnProperty(a)||(a=/^\s*</.test(d)? |
||||
"default-markup":"default-code");return X[a]}function H(a){var d=a.j;try{var f=q(a.h,a.l),b=f.a;a.a=b;a.c=f.c;a.i=0;F(d,b)(a);var g=/\bMSIE\s(\d+)/.exec(navigator.userAgent),g=g&&8>=+g[1],d=/\n/g,p=a.a,k=p.length,f=0,m=a.c,t=m.length,b=0,c=a.g,r=c.length,x=0;c[r]=k;var u,e;for(e=u=0;e<r;)c[e]!==c[e+2]?(c[u++]=c[e++],c[u++]=c[e++]):e+=2;r=u;for(e=u=0;e<r;){for(var A=c[e],D=c[e+1],w=e+2;w+2<=r&&c[w+1]===D;)w+=2;c[u++]=A;c[u++]=D;e=w}c.length=u;var h=a.h;a="";h&&(a=h.style.display,h.style.display="none"); |
||||
try{for(;b<t;){var l=m[b+2]||k,n=c[x+2]||k,w=Math.min(l,n),E=m[b+1],G;if(1!==E.nodeType&&(G=p.substring(f,w))){g&&(G=G.replace(d,"\r"));E.nodeValue=G;var aa=E.ownerDocument,v=aa.createElement("span");v.className=c[x+1];var B=E.parentNode;B.replaceChild(v,E);v.appendChild(E);f<l&&(m[b+1]=E=aa.createTextNode(p.substring(w,l)),B.insertBefore(E,v.nextSibling))}f=w;f>=l&&(b+=2);f>=n&&(x+=2)}}finally{h&&(h.style.display=a)}}catch(y){R.console&&console.log(y&&y.stack||y)}}var R=window,K=["break,continue,do,else,for,if,return,while"], |
||||
L=[[K,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[L,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"], |
||||
M=[L,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],N=[L,"abstract,as,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],L=[L,"debugger,eval,export,function,get,instanceof,null,set,undefined,var,with,Infinity,NaN"], |
||||
O=[K,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],P=[K,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],K=[K,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, |
||||
T=/\S/,U=x({keywords:[S,N,M,L,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",O,P,K],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),X={};p(U,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", |
||||
/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" "));p(C([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], |
||||
["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\s\S]+/]]),["uq.val"]);p(x({keywords:S,hashComments:!0,cStyleComments:!0,types:Q}),"c cc cpp cxx cyc m".split(" "));p(x({keywords:"null,true,false"}),["json"]);p(x({keywords:N,hashComments:!0,cStyleComments:!0, |
||||
verbatimStrings:!0,types:Q}),["cs"]);p(x({keywords:M,cStyleComments:!0}),["java"]);p(x({keywords:K,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(x({keywords:O,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(x({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}), |
||||
["perl","pl","pm"]);p(x({keywords:P,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(x({keywords:L,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(x({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(C([],[["str",/^[\s\S]+/]]),["regex"]); |
||||
var V=R.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,f){f=f||!1;d=d||null;var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;f&&B(b,f,!0);H({j:d,m:f,h:b,l:1,a:null,i:null,c:null,g:null});return b.innerHTML}, |
||||
prettyPrint:g=g=function(a,d){function f(){for(var b=R.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;r<p.length&&c.now()<b;r++){for(var d=p[r],k=h,q=d;q=q.previousSibling;){var m=q.nodeType,v=(7===m||8===m)&&q.nodeValue;if(v?!/^\??prettify\b/.test(v):3!==m||/\S/.test(q.nodeValue))break;if(v){k={};v.replace(/\b(\w+)=([\w:.%+-]+)/g,function(a,b,c){k[b]=c});break}}q=d.className;if((k!==h||u.test(q))&&!e.test(q)){m=!1;for(v=d.parentNode;v;v=v.parentNode)if(w.test(v.tagName)&&v.className&&u.test(v.className)){m= |
||||
!0;break}if(!m){d.className+=" prettyprinted";m=k.lang;if(!m){var m=q.match(t),C;!m&&(C=A(d))&&z.test(C.tagName)&&(m=C.className.match(t));m&&(m=m[1])}if(x.test(d.tagName))v=1;else var v=d.currentStyle,y=g.defaultView,v=(v=v?v.whiteSpace:y&&y.getComputedStyle?y.getComputedStyle(d,null).getPropertyValue("white-space"):0)&&"pre"===v.substring(0,3);y=k.linenums;(y="true"===y||+y)||(y=(y=q.match(/\blinenums\b(?::(\d+))?/))?y[1]&&y[1].length?+y[1]:!0:!1);y&&B(d,y,v);H({j:m,h:d,m:y,l:v,a:null,i:null,c:null, |
||||
g:null})}}}r<p.length?R.setTimeout(f,250):"function"===typeof a&&a()}for(var b=d||document.body,g=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],k=0;k<b.length;++k)for(var m=0,q=b[k].length;m<q;++m)p.push(b[k][m]);var b=null,c=Date;c.now||(c={now:function(){return+new Date}});var r=0,t=/\blang(?:uage)?-([\w.]+)(?!\S)/,u=/\bprettyprint\b/,e=/\bprettyprinted\b/,x=/pre|xmp/i,z=/^code$/i,w=/^(?:pre|code|xmp)$/i,h={};f()}}, |
||||
S=R.define;"function"===typeof S&&S.amd&&S("google-code-prettify",[],function(){return V})})();return g}();T||t.setTimeout(U,0)})();}() |
@ -0,0 +1,37 @@
|
||||
/* |
||||
RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved. |
||||
Available via the MIT or new BSD license. |
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/ |
||||
var requirejs,require,define; |
||||
(function(ha){function L(b){return"[object Function]"===R.call(b)}function M(b){return"[object Array]"===R.call(b)}function x(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function Y(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));--d);}}function w(b,c){return la.call(b,c)}function g(b,c){return w(b,c)&&b[c]}function E(b,c){for(var d in b)if(w(b,d)&&c(b[d],d))break}function Z(b,c,d,k){c&&E(c,function(c,g){if(d||!w(b,g))!k||"object"!==typeof c||!c||M(c)||L(c)||c instanceof |
||||
RegExp?b[g]=c:(b[g]||(b[g]={}),Z(b[g],c,d,k))});return b}function y(b,c){return function(){return c.apply(b,arguments)}}function ia(b){throw b;}function ja(b){if(!b)return b;var c=ha;x(b.split("."),function(b){c=c[b]});return c}function G(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ma(b){function c(a,n,b){var f,l,c,d,h,k,e,A;n=n&&n.split("/");var q=m.map,p=q&&q["*"];if(a){a=a.split("/");l=a.length-1;m.nodeIdCompat&& |
||||
V.test(a[l])&&(a[l]=a[l].replace(V,""));"."===a[0].charAt(0)&&n&&(l=n.slice(0,n.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)d=l[c],"."===d?(l.splice(c,1),--c):".."===d&&0!==c&&(1!==c||".."!==l[2])&&".."!==l[c-1]&&0<c&&(l.splice(c-1,2),c-=2);a=a.join("/")}if(b&&q&&(n||p)){l=a.split("/");c=l.length;a:for(;0<c;--c){h=l.slice(0,c).join("/");if(n)for(d=n.length;0<d;--d)if(b=g(q,n.slice(0,d).join("/")))if(b=g(b,h)){f=b;k=c;break a}!e&&p&&g(p,h)&&(e=g(p,h),A=c)}!f&&e&&(f=e,k=A);f&&(l.splice(0,k, |
||||
f),a=l.join("/"))}return(f=g(m.pkgs,a))?f:a}function d(a){F&&x(document.getElementsByTagName("script"),function(n){if(n.getAttribute("data-requiremodule")===a&&n.getAttribute("data-requirecontext")===h.contextName)return n.parentNode.removeChild(n),!0})}function p(a){var n=g(m.paths,a);if(n&&M(n)&&1<n.length)return n.shift(),h.require.undef(a),h.makeRequire(null,{skipMap:!0})([a]),!0}function e(a){var n,b=a?a.indexOf("!"):-1;-1<b&&(n=a.substring(0,b),a=a.substring(b+1,a.length));return[n,a]}function q(a, |
||||
n,b,f){var l,d,z=null,k=n?n.name:null,m=a,q=!0,A="";a||(q=!1,a="_@r"+(R+=1));a=e(a);z=a[0];a=a[1];z&&(z=c(z,k,f),d=g(r,z));a&&(z?A=d&&d.normalize?d.normalize(a,function(a){return c(a,k,f)}):-1===a.indexOf("!")?c(a,k,f):a:(A=c(a,k,f),a=e(A),z=a[0],A=a[1],b=!0,l=h.nameToUrl(A)));b=!z||d||b?"":"_unnormalized"+(U+=1);return{prefix:z,name:A,parentMap:n,unnormalized:!!b,url:l,originalName:m,isDefine:q,id:(z?z+"!"+A:A)+b}}function u(a){var b=a.id,c=g(t,b);c||(c=t[b]=new h.Module(a));return c}function v(a, |
||||
b,c){var f=a.id,l=g(t,f);if(!w(r,f)||l&&!l.defineEmitComplete)if(l=u(a),l.error&&"error"===b)c(l.error);else l.on(b,c);else"defined"===b&&c(r[f])}function B(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(x(c,function(b){if(b=g(t,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)k.onError(a)}function C(){W.length&&(x(W,function(a){var b=a[0];"string"===typeof b&&(h.defQueueMap[b]=!0);H.push(a)}),W=[])}function D(a){delete t[a];delete aa[a]}function K(a,b,c){var f=a.map.id;a.error?a.emit("error", |
||||
a.error):(b[f]=!0,x(a.depMaps,function(f,d){var h=f.id,k=g(t,h);!k||a.depMatched[d]||c[h]||(g(b,h)?(a.defineDep(d,r[h]),a.check()):K(k,b,c))}),c[f]=!0)}function I(){var a,b,c=(a=1E3*m.waitSeconds)&&h.startTime+a<(new Date).getTime(),f=[],l=[],k=!1,g=!0;if(!ba){ba=!0;E(aa,function(a){var h=a.map,e=h.id;if(a.enabled&&(h.isDefine||l.push(a),!a.error))if(!a.inited&&c)p(e)?k=b=!0:(f.push(e),d(e));else if(!a.inited&&a.fetched&&h.isDefine&&(k=!0,!h.prefix))return g=!1});if(c&&f.length)return a=G("timeout", |
||||
"Load timeout for modules: "+f,null,f),a.contextName=h.contextName,B(a);g&&x(l,function(a){K(a,{},{})});c&&!b||!k||!F&&!ka||ca||(ca=setTimeout(function(){ca=0;I()},50));ba=!1}}function J(a){w(r,a[0])||u(q(a[0],null,!0)).init(a[1],a[2])}function P(a){a=a.currentTarget||a.srcElement;var b=h.onScriptLoad;a.detachEvent&&!da?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=h.onScriptError;a.detachEvent&&!da||a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}} |
||||
function Q(){var a;for(C();H.length;){a=H.shift();if(null===a[0])return B(G("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));J(a)}h.defQueueMap={}}var ba,ea,h,S,ca,m={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},t={},aa={},fa={},H=[],r={},X={},ga={},R=1,U=1;S={require:function(a){return a.require?a.require:a.require=h.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]= |
||||
{}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return g(m.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};ea=function(a){this.events=g(fa,a.id)||{};this.map=a;this.shim=g(m.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};ea.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=y(this,function(a){this.emit("error", |
||||
a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,--this.depCount,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;h.startTime=(new Date).getTime();var a=this.map;if(this.shim)h.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],y(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix? |
||||
this.callPlugin():this.load()}},load:function(){var a=this.map.url;X[a]||(X[a]=!0,h.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(!this.inited)w(h.defQueueMap,c)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(L(l)){try{f=h.execCb(c,l,b,f)}catch(d){a=d}this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports: |
||||
this.usingExports&&(f=this.exports));if(a){if(this.events.error&&this.map.isDefine||k.onError!==ia)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",B(this.error=a);if("undefined"!==typeof console&&console.error)console.error(a);else k.onError(a)}}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,k.onResourceLoad)){var e=[];x(this.depMaps,function(a){e.push(a.normalizedMap||a)});k.onResourceLoad(h, |
||||
this.map,e)}D(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);v(d,"defined",y(this,function(f){var l,d,e=g(ga,this.map.id),N=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,r=h.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(N=f.normalize(N,function(a){return c(a, |
||||
p,!0)})||""),d=q(a.prefix+"!"+N,this.map.parentMap),v(d,"defined",y(this,function(a){this.map.normalizedMap=d;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),f=g(t,d.id)){this.depMaps.push(d);if(this.events.error)f.on("error",y(this,function(a){this.emit("error",a)}));f.enable()}}else e?(this.map.url=h.nameToUrl(e),this.load()):(l=y(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=y(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b]; |
||||
E(t,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&D(a.map.id)});B(a)}),l.fromText=y(this,function(f,c){var d=a.name,e=q(d),N=T;c&&(f=c);N&&(T=!1);u(e);w(m.config,b)&&(m.config[d]=m.config[b]);try{k.exec(f)}catch(g){return B(G("fromtexteval","fromText eval for "+b+" failed: "+g,g,[b]))}N&&(T=!0);this.depMaps.push(e);h.completeLoad(d);r([d],l)}),f.load(a.name,r,l,m))}));h.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){aa[this.map.id]=this;this.enabling=this.enabled=!0;x(this.depMaps, |
||||
y(this,function(a,b){var c,f;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=g(S,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;v(a,"defined",y(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?v(a,"error",y(this,this.errback)):this.events.error&&v(a,"error",y(this,function(a){this.emit("error",a)}))}c=a.id;f=t[c];w(S,c)||!f||f.enabled||h.enable(a,this)}));E(this.pluginMaps,y(this,function(a){var b= |
||||
g(t,a.id);b&&!b.enabled&&h.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};h={config:m,contextName:b,registry:t,defined:r,urlFetched:X,defQueue:H,defQueueMap:{},Module:ea,makeModuleMap:q,nextTick:k.nextTick,onError:B,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.shim,c={paths:!0, |
||||
bundles:!0,config:!0,map:!0};E(a,function(a,b){c[b]?(m[b]||(m[b]={}),Z(m[b],a,!0,!0)):m[b]=a});a.bundles&&E(a.bundles,function(a,b){x(a,function(a){a!==b&&(ga[a]=b)})});a.shim&&(E(a.shim,function(a,c){M(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=h.makeShimExports(a));b[c]=a}),m.shim=b);a.packages&&x(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(m.paths[b]=a.location);m.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(V,"")});E(t, |
||||
function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&h.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ha,arguments));return b||a.exports&&ja(a.exports)}},makeRequire:function(a,n){function e(c,d,g){var m,p;n.enableBuildCallback&&d&&L(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(L(d))return B(G("requireargs","Invalid require call"),g);if(a&&w(S,c))return S[c](t[a.id]);if(k.get)return k.get(h, |
||||
c,a,e);m=q(c,a,!1,!0);m=m.id;return w(r,m)?r[m]:B(G("notloaded",'Module name "'+m+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}Q();h.nextTick(function(){Q();p=u(q(null,a));p.skipMap=n.skipMap;p.init(c,d,g,{enabled:!0});I()});return e}n=n||{};Z(e,{isBrowser:F,toUrl:function(b){var d,e=b.lastIndexOf("."),n=b.split("/")[0];-1!==e&&("."!==n&&".."!==n||1<e)&&(d=b.substring(e,b.length),b=b.substring(0,e));return h.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return w(r, |
||||
q(b,a,!1,!0).id)},specified:function(b){b=q(b,a,!1,!0).id;return w(r,b)||w(t,b)}});a||(e.undef=function(b){C();var c=q(b,a,!0),e=g(t,b);e.undefed=!0;d(b);delete r[b];delete X[c.url];delete fa[b];Y(H,function(a,c){a[0]===b&&H.splice(c,1)});delete h.defQueueMap[b];e&&(e.events.defined&&(fa[b]=e.events),D(b))});return e},enable:function(a){g(t,a.id)&&u(a).enable()},completeLoad:function(a){var b,c,d=g(m.shim,a)||{},e=d.exports;for(C();H.length;){c=H.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]=== |
||||
a&&(b=!0);J(c)}h.defQueueMap={};c=g(t,a);if(!b&&!w(r,a)&&c&&!c.inited)if(!m.enforceDefine||e&&ja(e))J([a,d.deps||[],d.exportsFn]);else return p(a)?void 0:B(G("nodefine","No define call for "+a,null,[a]));I()},nameToUrl:function(a,b,c){var d,e,p;(d=g(m.pkgs,a))&&(a=d);if(d=g(ga,a))return h.nameToUrl(d,b,c);if(k.jsExtRegExp.test(a))d=a+(b||"");else{d=m.paths;a=a.split("/");for(e=a.length;0<e;--e)if(p=a.slice(0,e).join("/"),p=g(d,p)){M(p)&&(p=p[0]);a.splice(0,e,p);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)|| |
||||
c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":m.baseUrl)+d}return m.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+m.urlArgs):d},load:function(a,b){k.load(h,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||oa.test((a.currentTarget||a.srcElement).readyState))O=null,a=P(a),h.completeLoad(a.id)},onScriptError:function(a){var b=P(a);if(!p(b.id)){var c=[];E(t,function(a,d){0!==d.indexOf("_@r")&&x(a.depMaps,function(a){a.id===b.id&&c.push(d);return!0})}); |
||||
return B(G("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}};h.require=h.makeRequire();return h}function pa(){if(O&&"interactive"===O.readyState)return O;Y(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return O=b});return O}var k,C,D,I,P,J,O,Q,u,U,qa=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ra=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,V=/\.js$/,na=/^\.\//;C=Object.prototype;var R=C.toString,la=C.hasOwnProperty, |
||||
F=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ka=!F&&"undefined"!==typeof importScripts,oa=F&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,da="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),K={},v={},W=[],T=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(L(requirejs))return;v=requirejs;requirejs=void 0}"undefined"===typeof require||L(require)||(v=require,require=void 0);k=requirejs=function(b, |
||||
c,d,p){var e,q="_";M(b)||"string"===typeof b||(e=b,M(c)?(b=c,c=d,d=p):b=[]);e&&e.context&&(q=e.context);(p=g(K,q))||(p=K[q]=k.s.newContext(q));e&&p.configure(e);return p.require(b,c,d)};k.config=function(b){return k(b)};k.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=k);k.version="2.1.22";k.jsExtRegExp=/^\/|:|\?|\.js$/;k.isBrowser=F;C=k.s={contexts:K,newContext:ma};k({});x(["toUrl","undef","defined","specified"],function(b){k[b]=function(){var c= |
||||
K._;return c.require[b].apply(c,arguments)}});F&&(D=C.head=document.getElementsByTagName("head")[0],I=document.getElementsByTagName("base")[0])&&(D=C.head=I.parentNode);k.onError=ia;k.createNode=function(b,c,d){c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};k.load=function(b,c,d){var g=b&&b.config||{},e;if(F){e=k.createNode(g,c,d);if(g.onNodeCreated)g.onNodeCreated(e, |
||||
g,c,d);e.setAttribute("data-requirecontext",b.contextName);e.setAttribute("data-requiremodule",c);!e.attachEvent||e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code")||da?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(T=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;Q=e;I?D.insertBefore(e,I):D.appendChild(e);Q=null;return e}if(ka)try{importScripts(d),b.completeLoad(c)}catch(q){b.onError(G("importscripts","importScripts failed for "+ |
||||
c+" at "+d,q,[c]))}};F&&!v.skipDataMain&&Y(document.getElementsByTagName("script"),function(b){D||(D=b.parentNode);if(P=b.getAttribute("data-main"))return u=P,v.baseUrl||(J=u.split("/"),u=J.pop(),U=J.length?J.join("/")+"/":"./",v.baseUrl=U),u=u.replace(V,""),k.jsExtRegExp.test(u)&&(u=P),v.deps=v.deps?v.deps.concat(u):[u],!0});define=function(b,c,d){var g,e;"string"!==typeof b&&(d=c,c=b,b=null);M(c)||(d=c,c=null);!c&&L(d)&&(c=[],d.length&&(d.toString().replace(qa,"").replace(ra,function(b,d){c.push(d)}), |
||||
c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));T&&(g=Q||pa())&&(b||(b=g.getAttribute("data-requiremodule")),e=K[g.getAttribute("data-requirecontext")]);e?(e.defQueue.push([b,c,d]),e.defQueueMap[b]=!0):W.push([b,c,d])};define.amd={jQuery:!0};k.exec=function(b){return eval(b)};k(v)}})(this); |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue