@designliquido/delegua 0.10.5 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -99,9 +99,14 @@ Se não quiser instalar as bibliotecas que acompanham Delégua, apenas o núcleo
99
99
  npm install -g @designliquido/delegua
100
100
  ```
101
101
 
102
+ ## Tradução para outras linguagens
103
+
104
+ Por ora, Delégua traduz para JavaScript simples. [Mais informações aqui](https://github.com/DesignLiquido/delegua/wiki/Tradu%C3%A7%C3%A3o-para-outras-linguagens).
105
+
102
106
  ## Documentação
103
107
 
104
108
  - [Delégua é documentada na Wiki deste GitHub](https://github.com/DesignLiquido/delegua/wiki).
109
+ - [A documentação técnica (gerada por TypeDoc) pode ser encontrada aqui](https://designliquido.github.io/delegua/).
105
110
  - Para acessar a documentação da linguagem Égua, visite https://egua.tech/docs.
106
111
 
107
112
  ## Contribuições e Comunidade
package/bin/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@designliquido/delegua",
3
- "version": "0.10.4",
3
+ "version": "0.10.5",
4
4
  "description": "Linguagem de programação simples e moderna usando português estruturado",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "empacotar": "rimraf ./dist && tsc && copyfiles -V ./bin/delegua ./bin/delegua.cmd ./dist && copyfiles -V ./package.json ./dist/bin && copyfiles -V ./README.md ./dist",
8
8
  "gerar-documentacao-tecnica": "typedoc --out docs index.ts",
9
9
  "lair": "ts-node execucao.ts",
10
+ "publicar-docs": "yarn gerar-documentacao-tecnica && copyfiles -V ./recursos/**/* ./docs && gh-pages -d docs",
10
11
  "publicar-npm": "npm publish ./dist --access public",
11
12
  "testes": "./bin/delegua-ts testes/exemplos/testes.egua",
12
13
  "testes:delegua:bhaskara": "./bin/delegua-ts testes/exemplos/dialetos/egua-classico/bhaskara.egua",
@@ -61,6 +62,7 @@
61
62
  "@babel/preset-env": "^7.20.2",
62
63
  "@designliquido/delegua-estatistica": "^0.0.5",
63
64
  "@designliquido/delegua-fisica": "^0.0.2",
65
+ "@designliquido/delegua-json": "^0.0.0",
64
66
  "@designliquido/delegua-matematica": "^0.2.0",
65
67
  "@designliquido/delegua-tempo": "^0.0.1",
66
68
  "@types/jest": "^29.2.4",
@@ -71,6 +73,7 @@
71
73
  "eslint": "^8.29.0",
72
74
  "eslint-config-prettier": "^8.5.0",
73
75
  "eslint-plugin-prettier": "^4.2.1",
76
+ "gh-pages": "^4.0.0",
74
77
  "jest": "^29.3.1",
75
78
  "prettier": "^2.8.1",
76
79
  "release-it": "^15.5.1",
@@ -0,0 +1 @@
1
+ declare function jumpToCode(event: any): void;
@@ -0,0 +1,70 @@
1
+ /* eslint-disable */
2
+ var jumpToCode = (function init() {
3
+ // Classes of code we would like to highlight in the file view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
+ // Elements to highlight in the file listing view
6
+ var fileListingElements = ['td.pct.low'];
7
+ // We don't want to select elements that are direct descendants of another match
8
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
9
+ // Selecter that finds elements on the page to which we can jump
10
+ var selector = fileListingElements.join(', ') +
11
+ ', ' +
12
+ notSelector +
13
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
14
+ // The NodeList of matching elements
15
+ var missingCoverageElements = document.querySelectorAll(selector);
16
+ var currentIndex;
17
+ function toggleClass(index) {
18
+ missingCoverageElements
19
+ .item(currentIndex)
20
+ .classList.remove('highlighted');
21
+ missingCoverageElements.item(index).classList.add('highlighted');
22
+ }
23
+ function makeCurrent(index) {
24
+ toggleClass(index);
25
+ currentIndex = index;
26
+ missingCoverageElements.item(index).scrollIntoView({
27
+ behavior: 'smooth',
28
+ block: 'center',
29
+ inline: 'center'
30
+ });
31
+ }
32
+ function goToPrevious() {
33
+ var nextIndex = 0;
34
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
35
+ nextIndex = missingCoverageElements.length - 1;
36
+ }
37
+ else if (missingCoverageElements.length > 1) {
38
+ nextIndex = currentIndex - 1;
39
+ }
40
+ makeCurrent(nextIndex);
41
+ }
42
+ function goToNext() {
43
+ var nextIndex = 0;
44
+ if (typeof currentIndex === 'number' &&
45
+ currentIndex < missingCoverageElements.length - 1) {
46
+ nextIndex = currentIndex + 1;
47
+ }
48
+ makeCurrent(nextIndex);
49
+ }
50
+ return function jump(event) {
51
+ if (document.getElementById('fileSearch') === document.activeElement &&
52
+ document.activeElement != null) {
53
+ // if we're currently focused on the search input, we don't want to navigate
54
+ return;
55
+ }
56
+ switch (event.which) {
57
+ case 78: // n
58
+ case 74: // j
59
+ goToNext();
60
+ break;
61
+ case 66: // b
62
+ case 75: // k
63
+ case 80: // p
64
+ goToPrevious();
65
+ break;
66
+ }
67
+ };
68
+ })();
69
+ window.addEventListener('keydown', jumpToCode);
70
+ //# sourceMappingURL=block-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-navigation.js","sourceRoot":"","sources":["../../../coverage/lcov-report/block-navigation.js"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,IAAI,UAAU,GAAG,CAAC,SAAS,IAAI;IAC3B,8DAA8D;IAC9D,IAAI,sBAAsB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAEvE,iDAAiD;IACjD,IAAI,mBAAmB,GAAG,CAAC,YAAY,CAAC,CAAC;IAEzC,gFAAgF;IAChF,IAAI,WAAW,GAAG,OAAO,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,8BAA8B;IAE1G,gEAAgE;IAChE,IAAI,QAAQ,GACR,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,IAAI;QACJ,WAAW;QACX,sBAAsB,CAAC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,mDAAmD;IAExG,oCAAoC;IACpC,IAAI,uBAAuB,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAElE,IAAI,YAAY,CAAC;IAEjB,SAAS,WAAW,CAAC,KAAK;QACtB,uBAAuB;aAClB,IAAI,CAAC,YAAY,CAAC;aAClB,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACrE,CAAC;IAED,SAAS,WAAW,CAAC,KAAK;QACtB,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,YAAY,GAAG,KAAK,CAAC;QACrB,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC;YAC/C,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SACnB,CAAC,CAAC;IACP,CAAC;IAED,SAAS,YAAY;QACjB,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,CAAC,EAAE;YACxD,SAAS,GAAG,uBAAuB,CAAC,MAAM,GAAG,CAAC,CAAC;SAClD;aAAM,IAAI,uBAAuB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3C,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC;SAChC;QAED,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,SAAS,QAAQ;QACb,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,IACI,OAAO,YAAY,KAAK,QAAQ;YAChC,YAAY,GAAG,uBAAuB,CAAC,MAAM,GAAG,CAAC,EACnD;YACE,SAAS,GAAG,YAAY,GAAG,CAAC,CAAC;SAChC;QAED,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,SAAS,IAAI,CAAC,KAAK;QACtB,IACI,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,aAAa;YAChE,QAAQ,CAAC,aAAa,IAAI,IAAI,EAChC;YACE,4EAA4E;YAC5E,OAAO;SACV;QAED,QAAQ,KAAK,CAAC,KAAK,EAAE;YACjB,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,KAAK,EAAE,EAAE,IAAI;gBACT,QAAQ,EAAE,CAAC;gBACX,MAAM;YACV,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,KAAK,EAAE,EAAE,IAAI;gBACT,YAAY,EAAE,CAAC;gBACf,MAAM;SACb;IACL,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AACL,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
File without changes
@@ -0,0 +1,477 @@
1
+ /* eslint-disable */
2
+ window.PR_SHOULD_USE_CONTINUATION = true;
3
+ (function () { var h = ["break,continue,do,else,for,if,return,while"]; var u = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"]; var p = [u, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"]; var l = [p, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"]; var x = [p, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"]; var R = [x, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"]; var r = "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,true,try,unless,until,when,while,yes"; var w = [p, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"]; var s = "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"; var I = [h, "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"]; var f = [h, "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"]; var H = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"]; var A = [l, R, w, s + I, f, H]; var e = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/; var C = "str"; var z = "kwd"; var j = "com"; var O = "typ"; var G = "lit"; var L = "pun"; var F = "pln"; var m = "tag"; var E = "dec"; var J = "src"; var P = "atn"; var n = "atv"; var N = "nocode"; var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*"; function k(Z) { var ad = 0; var S = false; var ac = false; for (var V = 0, U = Z.length; V < U; ++V) {
4
+ var ae = Z[V];
5
+ if (ae.ignoreCase) {
6
+ ac = true;
7
+ }
8
+ else {
9
+ if (/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
10
+ S = true;
11
+ ac = false;
12
+ break;
13
+ }
14
+ }
15
+ } var Y = { b: 8, t: 9, n: 10, v: 11, f: 12, r: 13 }; function ab(ah) { var ag = ah.charCodeAt(0); if (ag !== 92) {
16
+ return ag;
17
+ } var af = ah.charAt(1); ag = Y[af]; if (ag) {
18
+ return ag;
19
+ }
20
+ else {
21
+ if ("0" <= af && af <= "7") {
22
+ return parseInt(ah.substring(1), 8);
23
+ }
24
+ else {
25
+ if (af === "u" || af === "x") {
26
+ return parseInt(ah.substring(2), 16);
27
+ }
28
+ else {
29
+ return ah.charCodeAt(1);
30
+ }
31
+ }
32
+ } } function T(af) { if (af < 32) {
33
+ return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
34
+ } var ag = String.fromCharCode(af); if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
35
+ ag = "\\" + ag;
36
+ } return ag; } function X(am) { var aq = am.substring(1, am.length - 1).match(new RegExp("\\\\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")); var ak = []; var af = []; var ao = aq[0] === "^"; for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
37
+ var ah = aq[ar];
38
+ if (/\\[bdsw]/i.test(ah)) {
39
+ ak.push(ah);
40
+ }
41
+ else {
42
+ var ag = ab(ah);
43
+ var al;
44
+ if (ar + 2 < aj && "-" === aq[ar + 1]) {
45
+ al = ab(aq[ar + 2]);
46
+ ar += 2;
47
+ }
48
+ else {
49
+ al = ag;
50
+ }
51
+ af.push([ag, al]);
52
+ if (!(al < 65 || ag > 122)) {
53
+ if (!(al < 65 || ag > 90)) {
54
+ af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
55
+ }
56
+ if (!(al < 97 || ag > 122)) {
57
+ af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
58
+ }
59
+ }
60
+ }
61
+ } af.sort(function (av, au) { return (av[0] - au[0]) || (au[1] - av[1]); }); var ai = []; var ap = [NaN, NaN]; for (var ar = 0; ar < af.length; ++ar) {
62
+ var at = af[ar];
63
+ if (at[0] <= ap[1] + 1) {
64
+ ap[1] = Math.max(ap[1], at[1]);
65
+ }
66
+ else {
67
+ ai.push(ap = at);
68
+ }
69
+ } var an = ["["]; if (ao) {
70
+ an.push("^");
71
+ } an.push.apply(an, ak); for (var ar = 0; ar < ai.length; ++ar) {
72
+ var at = ai[ar];
73
+ an.push(T(at[0]));
74
+ if (at[1] > at[0]) {
75
+ if (at[1] + 1 > at[0]) {
76
+ an.push("-");
77
+ }
78
+ an.push(T(at[1]));
79
+ }
80
+ } an.push("]"); return an.join(""); } function W(al) { var aj = al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")); var ah = aj.length; var an = []; for (var ak = 0, am = 0; ak < ah; ++ak) {
81
+ var ag = aj[ak];
82
+ if (ag === "(") {
83
+ ++am;
84
+ }
85
+ else {
86
+ if ("\\" === ag.charAt(0)) {
87
+ var af = +ag.substring(1);
88
+ if (af && af <= am) {
89
+ an[af] = -1;
90
+ }
91
+ }
92
+ }
93
+ } for (var ak = 1; ak < an.length; ++ak) {
94
+ if (-1 === an[ak]) {
95
+ an[ak] = ++ad;
96
+ }
97
+ } for (var ak = 0, am = 0; ak < ah; ++ak) {
98
+ var ag = aj[ak];
99
+ if (ag === "(") {
100
+ ++am;
101
+ if (an[am] === undefined) {
102
+ aj[ak] = "(?:";
103
+ }
104
+ }
105
+ else {
106
+ if ("\\" === ag.charAt(0)) {
107
+ var af = +ag.substring(1);
108
+ if (af && af <= am) {
109
+ aj[ak] = "\\" + an[am];
110
+ }
111
+ }
112
+ }
113
+ } for (var ak = 0, am = 0; ak < ah; ++ak) {
114
+ if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
115
+ aj[ak] = "";
116
+ }
117
+ } if (al.ignoreCase && S) {
118
+ for (var ak = 0; ak < ah; ++ak) {
119
+ var ag = aj[ak];
120
+ var ai = ag.charAt(0);
121
+ if (ag.length >= 2 && ai === "[") {
122
+ aj[ak] = X(ag);
123
+ }
124
+ else {
125
+ if (ai !== "\\") {
126
+ aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) { var ap = ao.charCodeAt(0); return "[" + String.fromCharCode(ap & ~32, ap | 32) + "]"; });
127
+ }
128
+ }
129
+ }
130
+ } return aj.join(""); } var aa = []; for (var V = 0, U = Z.length; V < U; ++V) {
131
+ var ae = Z[V];
132
+ if (ae.global || ae.multiline) {
133
+ throw new Error("" + ae);
134
+ }
135
+ aa.push("(?:" + W(ae) + ")");
136
+ } return new RegExp(aa.join("|"), ac ? "gi" : "g"); } function a(V) { var U = /(?:^|\s)nocode(?:\s|$)/; var X = []; var T = 0; var Z = []; var W = 0; var S; if (V.currentStyle) {
137
+ S = V.currentStyle.whiteSpace;
138
+ }
139
+ else {
140
+ if (window.getComputedStyle) {
141
+ S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
142
+ }
143
+ } var Y = S && "pre" === S.substring(0, 3); function aa(ab) { switch (ab.nodeType) {
144
+ case 1:
145
+ if (U.test(ab.className)) {
146
+ return;
147
+ }
148
+ for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
149
+ aa(ae);
150
+ }
151
+ var ad = ab.nodeName;
152
+ if ("BR" === ad || "LI" === ad) {
153
+ X[W] = "\n";
154
+ Z[W << 1] = T++;
155
+ Z[(W++ << 1) | 1] = ab;
156
+ }
157
+ break;
158
+ case 3:
159
+ case 4:
160
+ var ac = ab.nodeValue;
161
+ if (ac.length) {
162
+ if (!Y) {
163
+ ac = ac.replace(/[ \t\r\n]+/g, " ");
164
+ }
165
+ else {
166
+ ac = ac.replace(/\r\n?/g, "\n");
167
+ }
168
+ X[W] = ac;
169
+ Z[W << 1] = T;
170
+ T += ac.length;
171
+ Z[(W++ << 1) | 1] = ab;
172
+ }
173
+ break;
174
+ } } aa(V); return { sourceCode: X.join("").replace(/\n$/, ""), spans: Z }; } function B(S, U, W, T) { if (!U) {
175
+ return;
176
+ } var V = { sourceCode: U, basePos: S }; W(V); T.push.apply(T, V.decorations); } var v = /\S/; function o(S) { var V = undefined; for (var U = S.firstChild; U; U = U.nextSibling) {
177
+ var T = U.nodeType;
178
+ V = (T === 1) ? (V ? S : U) : (T === 3) ? (v.test(U.nodeValue) ? S : V) : V;
179
+ } return V === S ? undefined : V; } function g(U, T) { var S = {}; var V; (function () { var ad = U.concat(T); var ah = []; var ag = {}; for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
180
+ var Y = ad[ab];
181
+ var ac = Y[3];
182
+ if (ac) {
183
+ for (var ae = ac.length; --ae >= 0;) {
184
+ S[ac.charAt(ae)] = Y;
185
+ }
186
+ }
187
+ var af = Y[1];
188
+ var aa = "" + af;
189
+ if (!ag.hasOwnProperty(aa)) {
190
+ ah.push(af);
191
+ ag[aa] = null;
192
+ }
193
+ } ah.push(/[\0-\uffff]/); V = k(ah); })(); var X = T.length; var W = function (ah) { var Z = ah.sourceCode, Y = ah.basePos; var ad = [Y, F]; var af = 0; var an = Z.match(V) || []; var aj = {}; for (var ae = 0, aq = an.length; ae < aq; ++ae) {
194
+ var ag = an[ae];
195
+ var ap = aj[ag];
196
+ var ai = void 0;
197
+ var am;
198
+ if (typeof ap === "string") {
199
+ am = false;
200
+ }
201
+ else {
202
+ var aa = S[ag.charAt(0)];
203
+ if (aa) {
204
+ ai = ag.match(aa[1]);
205
+ ap = aa[0];
206
+ }
207
+ else {
208
+ for (var ao = 0; ao < X; ++ao) {
209
+ aa = T[ao];
210
+ ai = ag.match(aa[1]);
211
+ if (ai) {
212
+ ap = aa[0];
213
+ break;
214
+ }
215
+ }
216
+ if (!ai) {
217
+ ap = F;
218
+ }
219
+ }
220
+ am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
221
+ if (am && !(ai && typeof ai[1] === "string")) {
222
+ am = false;
223
+ ap = J;
224
+ }
225
+ if (!am) {
226
+ aj[ag] = ap;
227
+ }
228
+ }
229
+ var ab = af;
230
+ af += ag.length;
231
+ if (!am) {
232
+ ad.push(Y + ab, ap);
233
+ }
234
+ else {
235
+ var al = ai[1];
236
+ var ak = ag.indexOf(al);
237
+ var ac = ak + al.length;
238
+ if (ai[2]) {
239
+ ac = ag.length - ai[2].length;
240
+ ak = ac - al.length;
241
+ }
242
+ var ar = ap.substring(5);
243
+ B(Y + ab, ag.substring(0, ak), W, ad);
244
+ B(Y + ab + ak, al, q(ar, al), ad);
245
+ B(Y + ab + ac, ag.substring(ac), W, ad);
246
+ }
247
+ } ah.decorations = ad; }; return W; } function i(T) { var W = [], S = []; if (T.tripleQuotedStrings) {
248
+ W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
249
+ }
250
+ else {
251
+ if (T.multiLineStrings) {
252
+ W.push([C, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]);
253
+ }
254
+ else {
255
+ W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
256
+ }
257
+ } if (T.verbatimStrings) {
258
+ S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
259
+ } var Y = T.hashComments; if (Y) {
260
+ if (T.cStyleComments) {
261
+ if (Y > 1) {
262
+ W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"]);
263
+ }
264
+ else {
265
+ W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
266
+ }
267
+ S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
268
+ }
269
+ else {
270
+ W.push([j, /^#[^\r\n]*/, null, "#"]);
271
+ }
272
+ } if (T.cStyleComments) {
273
+ S.push([j, /^\/\/[^\r\n]*/, null]);
274
+ S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
275
+ } if (T.regexLiterals) {
276
+ var X = ("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");
277
+ S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
278
+ } var V = T.types; if (V) {
279
+ S.push([O, V]);
280
+ } var U = ("" + T.keywords).replace(/^ | $/g, ""); if (U.length) {
281
+ S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
282
+ } W.push([F, /^\s+/, null, " \r\n\t\xA0"]); S.push([G, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [F, /^[a-z_$][a-z_$@0-9]*/i, null], [G, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [F, /^\\[\s\S]?/, null], [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]); return g(W, S); } var K = i({ keywords: A, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function Q(V, ag) { var U = /(?:^|\s)nocode(?:\s|$)/; var ab = /\r\n?|\n/; var ac = V.ownerDocument; var S; if (V.currentStyle) {
283
+ S = V.currentStyle.whiteSpace;
284
+ }
285
+ else {
286
+ if (window.getComputedStyle) {
287
+ S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
288
+ }
289
+ } var Z = S && "pre" === S.substring(0, 3); var af = ac.createElement("LI"); while (V.firstChild) {
290
+ af.appendChild(V.firstChild);
291
+ } var W = [af]; function ae(al) { switch (al.nodeType) {
292
+ case 1:
293
+ if (U.test(al.className)) {
294
+ break;
295
+ }
296
+ if ("BR" === al.nodeName) {
297
+ ad(al);
298
+ if (al.parentNode) {
299
+ al.parentNode.removeChild(al);
300
+ }
301
+ }
302
+ else {
303
+ for (var an = al.firstChild; an; an = an.nextSibling) {
304
+ ae(an);
305
+ }
306
+ }
307
+ break;
308
+ case 3:
309
+ case 4:
310
+ if (Z) {
311
+ var am = al.nodeValue;
312
+ var aj = am.match(ab);
313
+ if (aj) {
314
+ var ai = am.substring(0, aj.index);
315
+ al.nodeValue = ai;
316
+ var ah = am.substring(aj.index + aj[0].length);
317
+ if (ah) {
318
+ var ak = al.parentNode;
319
+ ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
320
+ }
321
+ ad(al);
322
+ if (!ai) {
323
+ al.parentNode.removeChild(al);
324
+ }
325
+ }
326
+ }
327
+ break;
328
+ } } function ad(ak) { while (!ak.nextSibling) {
329
+ ak = ak.parentNode;
330
+ if (!ak) {
331
+ return;
332
+ }
333
+ } function ai(al, ar) { var aq = ar ? al.cloneNode(false) : al; var ao = al.parentNode; if (ao) {
334
+ var ap = ai(ao, 1);
335
+ var an = al.nextSibling;
336
+ ap.appendChild(aq);
337
+ for (var am = an; am; am = an) {
338
+ an = am.nextSibling;
339
+ ap.appendChild(am);
340
+ }
341
+ } return aq; } var ah = ai(ak.nextSibling, 0); for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
342
+ ah = aj;
343
+ } W.push(ah); } for (var Y = 0; Y < W.length; ++Y) {
344
+ ae(W[Y]);
345
+ } if (ag === (ag | 0)) {
346
+ W[0].setAttribute("value", ag);
347
+ } var aa = ac.createElement("OL"); aa.className = "linenums"; var X = Math.max(0, ((ag - 1)) | 0) || 0; for (var Y = 0, T = W.length; Y < T; ++Y) {
348
+ af = W[Y];
349
+ af.className = "L" + ((Y + X) % 10);
350
+ if (!af.firstChild) {
351
+ af.appendChild(ac.createTextNode("\xA0"));
352
+ }
353
+ aa.appendChild(af);
354
+ } V.appendChild(aa); } function D(ac) { var aj = /\bMSIE\b/.test(navigator.userAgent); var am = /\n/g; var al = ac.sourceCode; var an = al.length; var V = 0; var aa = ac.spans; var T = aa.length; var ah = 0; var X = ac.decorations; var Y = X.length; var Z = 0; X[Y] = an; var ar, aq; for (aq = ar = 0; aq < Y;) {
355
+ if (X[aq] !== X[aq + 2]) {
356
+ X[ar++] = X[aq++];
357
+ X[ar++] = X[aq++];
358
+ }
359
+ else {
360
+ aq += 2;
361
+ }
362
+ } Y = ar; for (aq = ar = 0; aq < Y;) {
363
+ var at = X[aq];
364
+ var ab = X[aq + 1];
365
+ var W = aq + 2;
366
+ while (W + 2 <= Y && X[W + 1] === ab) {
367
+ W += 2;
368
+ }
369
+ X[ar++] = at;
370
+ X[ar++] = ab;
371
+ aq = W;
372
+ } Y = X.length = ar; var ae = null; while (ah < T) {
373
+ var af = aa[ah];
374
+ var S = aa[ah + 2] || an;
375
+ var ag = X[Z];
376
+ var ap = X[Z + 2] || an;
377
+ var W = Math.min(S, ap);
378
+ var ak = aa[ah + 1];
379
+ var U;
380
+ if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
381
+ if (aj) {
382
+ U = U.replace(am, "\r");
383
+ }
384
+ ak.nodeValue = U;
385
+ var ai = ak.ownerDocument;
386
+ var ao = ai.createElement("SPAN");
387
+ ao.className = X[Z + 1];
388
+ var ad = ak.parentNode;
389
+ ad.replaceChild(ao, ak);
390
+ ao.appendChild(ak);
391
+ if (V < S) {
392
+ aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
393
+ ad.insertBefore(ak, ao.nextSibling);
394
+ }
395
+ }
396
+ V = W;
397
+ if (V >= S) {
398
+ ah += 2;
399
+ }
400
+ if (V >= ap) {
401
+ Z += 2;
402
+ }
403
+ } } var t = {}; function c(U, V) { for (var S = V.length; --S >= 0;) {
404
+ var T = V[S];
405
+ if (!t.hasOwnProperty(T)) {
406
+ t[T] = U;
407
+ }
408
+ else {
409
+ if (window.console) {
410
+ console.warn("cannot override language handler %s", T);
411
+ }
412
+ }
413
+ } } function q(T, S) { if (!(T && t.hasOwnProperty(T))) {
414
+ T = /^\s*</.test(S) ? "default-markup" : "default-code";
415
+ } return t[T]; } c(K, ["default-code"]); c(g([], [[F, /^[^<?]+/], [E, /^<!\w[^>]*(?:>|$)/], [j, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [L, /^(?:<[%?]|[%?]>)/], ["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"]); c(g([[F, /^[\s]+/, null, " \t\r\n"], [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [[m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [L, /^[=<>\/]+/], ["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"]); c(g([], [[n, /^[\s\S]+/]]), ["uq.val"]); c(i({ keywords: l, hashComments: true, cStyleComments: true, types: e }), ["c", "cc", "cpp", "cxx", "cyc", "m"]); c(i({ keywords: "null,true,false" }), ["json"]); c(i({ keywords: R, hashComments: true, cStyleComments: true, verbatimStrings: true, types: e }), ["cs"]); c(i({ keywords: x, cStyleComments: true }), ["java"]); c(i({ keywords: H, hashComments: true, multiLineStrings: true }), ["bsh", "csh", "sh"]); c(i({ keywords: I, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ["cv", "py"]); c(i({ keywords: s, hashComments: true, multiLineStrings: true, regexLiterals: true }), ["perl", "pl", "pm"]); c(i({ keywords: f, hashComments: true, multiLineStrings: true, regexLiterals: true }), ["rb"]); c(i({ keywords: w, cStyleComments: true, regexLiterals: true }), ["js"]); c(i({ keywords: r, hashComments: 3, cStyleComments: true, multilineStrings: true, tripleQuotedStrings: true, regexLiterals: true }), ["coffee"]); c(g([], [[C, /^[\s\S]+/]]), ["regex"]); function d(V) { var U = V.langExtension; try {
416
+ var S = a(V.sourceNode);
417
+ var T = S.sourceCode;
418
+ V.sourceCode = T;
419
+ V.spans = S.spans;
420
+ V.basePos = 0;
421
+ q(U, T)(V);
422
+ D(V);
423
+ }
424
+ catch (W) {
425
+ if ("console" in window) {
426
+ console.log(W && W.stack ? W.stack : W);
427
+ }
428
+ } } function y(W, V, U) { var S = document.createElement("PRE"); S.innerHTML = W; if (U) {
429
+ Q(S, U);
430
+ } var T = { langExtension: V, numberLines: U, sourceNode: S }; d(T); return S.innerHTML; } function b(ad) { function Y(af) { return document.getElementsByTagName(af); } var ac = [Y("pre"), Y("code"), Y("xmp")]; var T = []; for (var aa = 0; aa < ac.length; ++aa) {
431
+ for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
432
+ T.push(ac[aa][Z]);
433
+ }
434
+ } ac = null; var W = Date; if (!W.now) {
435
+ W = { now: function () { return +(new Date); } };
436
+ } var X = 0; var S; var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/; var ae = /\bprettyprint\b/; function U() { var ag = (window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity); for (; X < T.length && W.now() < ag; X++) {
437
+ var aj = T[X];
438
+ var ai = aj.className;
439
+ if (ai.indexOf("prettyprint") >= 0) {
440
+ var ah = ai.match(ab);
441
+ var am;
442
+ if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
443
+ ah = am.className.match(ab);
444
+ }
445
+ if (ah) {
446
+ ah = ah[1];
447
+ }
448
+ var al = false;
449
+ for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
450
+ if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
451
+ al = true;
452
+ break;
453
+ }
454
+ }
455
+ if (!al) {
456
+ var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
457
+ af = af ? af[1] && af[1].length ? +af[1] : true : false;
458
+ if (af) {
459
+ Q(aj, af);
460
+ }
461
+ S = { langExtension: ah, sourceNode: aj, numberLines: af };
462
+ d(S);
463
+ }
464
+ }
465
+ } if (X < T.length) {
466
+ setTimeout(U, 250);
467
+ }
468
+ else {
469
+ if (ad) {
470
+ ad();
471
+ }
472
+ } } U(); } window.prettyPrintOne = y; window.prettyPrint = b; window.PR = { createSimpleLexer: g, registerLangHandler: c, sourceDecorator: i, PR_ATTRIB_NAME: P, PR_ATTRIB_VALUE: n, PR_COMMENT: j, PR_DECLARATION: E, PR_KEYWORD: z, PR_LITERAL: G, PR_NOCODE: N, PR_PLAIN: F, PR_PUNCTUATION: L, PR_SOURCE: J, PR_STRING: C, PR_TAG: m, PR_TYPE: O }; })();
473
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-handlebars", /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\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], [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/], [PR.PR_COMMENT, /^{{![^}]*}}/]]), ["handlebars", "hbs"]);
474
+ PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, " \t\r\n\f"]], [[PR.PR_STRING, /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null], [PR.PR_STRING, /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null], ["lang-css-str", /^url\(([^\)\"\']*)\)/i], [PR.PR_KEYWORD, /^(?: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], [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], [PR.PR_COMMENT, /^(?:<!--|-->)/], [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i], [PR.PR_PLAIN, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i], [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]]), ["css"]);
475
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);
476
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]), ["css-str"]);
477
+ //# sourceMappingURL=prettify.js.map