@magicpixel/rn-mp-client-sdk 0.2.0
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/LICENSE +20 -0
- package/README.md +29 -0
- package/lib/commonjs/common/app-types.js +6 -0
- package/lib/commonjs/common/app-types.js.map +1 -0
- package/lib/commonjs/common/constants.js +51 -0
- package/lib/commonjs/common/constants.js.map +1 -0
- package/lib/commonjs/common/data-store.js +361 -0
- package/lib/commonjs/common/data-store.js.map +1 -0
- package/lib/commonjs/common/event-bus.js +42 -0
- package/lib/commonjs/common/event-bus.js.map +1 -0
- package/lib/commonjs/common/logger.js +30 -0
- package/lib/commonjs/common/logger.js.map +1 -0
- package/lib/commonjs/common/network-service.js +90 -0
- package/lib/commonjs/common/network-service.js.map +1 -0
- package/lib/commonjs/common/reporter.js +107 -0
- package/lib/commonjs/common/reporter.js.map +1 -0
- package/lib/commonjs/common/utils.js +276 -0
- package/lib/commonjs/common/utils.js.map +1 -0
- package/lib/commonjs/coverage/clover.xml +6 -0
- package/lib/commonjs/coverage/coverage-final.json +1 -0
- package/lib/commonjs/coverage/lcov-report/base.css +224 -0
- package/lib/commonjs/coverage/lcov-report/block-navigation.js +83 -0
- package/lib/commonjs/coverage/lcov-report/block-navigation.js.map +1 -0
- package/lib/commonjs/coverage/lcov-report/favicon.png +0 -0
- package/lib/commonjs/coverage/lcov-report/index.html +101 -0
- package/lib/commonjs/coverage/lcov-report/prettify.css +1 -0
- package/lib/commonjs/coverage/lcov-report/prettify.js +995 -0
- package/lib/commonjs/coverage/lcov-report/prettify.js.map +1 -0
- package/lib/commonjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/lib/commonjs/coverage/lcov-report/sorter.js +212 -0
- package/lib/commonjs/coverage/lcov-report/sorter.js.map +1 -0
- package/lib/commonjs/coverage/lcov.info +0 -0
- package/lib/commonjs/eedl/eedl.js +262 -0
- package/lib/commonjs/eedl/eedl.js.map +1 -0
- package/lib/commonjs/index.js +214 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/models/mp-client-sdk.js +33 -0
- package/lib/commonjs/models/mp-client-sdk.js.map +1 -0
- package/lib/commonjs/processors/data-element.processor.js +191 -0
- package/lib/commonjs/processors/data-element.processor.js.map +1 -0
- package/lib/commonjs/processors/qc.processor.js +111 -0
- package/lib/commonjs/processors/qc.processor.js.map +1 -0
- package/lib/commonjs/processors/tag.processor.js +432 -0
- package/lib/commonjs/processors/tag.processor.js.map +1 -0
- package/lib/commonjs/processors/trans-function.processor.js +91 -0
- package/lib/commonjs/processors/trans-function.processor.js.map +1 -0
- package/lib/commonjs/processors/visit-id.processor.js +172 -0
- package/lib/commonjs/processors/visit-id.processor.js.map +1 -0
- package/lib/module/common/app-types.js +2 -0
- package/lib/module/common/app-types.js.map +1 -0
- package/lib/module/common/constants.js +41 -0
- package/lib/module/common/constants.js.map +1 -0
- package/lib/module/common/data-store.js +346 -0
- package/lib/module/common/data-store.js.map +1 -0
- package/lib/module/common/event-bus.js +31 -0
- package/lib/module/common/event-bus.js.map +1 -0
- package/lib/module/common/logger.js +21 -0
- package/lib/module/common/logger.js.map +1 -0
- package/lib/module/common/network-service.js +73 -0
- package/lib/module/common/network-service.js.map +1 -0
- package/lib/module/common/reporter.js +88 -0
- package/lib/module/common/reporter.js.map +1 -0
- package/lib/module/common/utils.js +263 -0
- package/lib/module/common/utils.js.map +1 -0
- package/lib/module/coverage/clover.xml +6 -0
- package/lib/module/coverage/coverage-final.json +1 -0
- package/lib/module/coverage/lcov-report/base.css +224 -0
- package/lib/module/coverage/lcov-report/block-navigation.js +81 -0
- package/lib/module/coverage/lcov-report/block-navigation.js.map +1 -0
- package/lib/module/coverage/lcov-report/favicon.png +0 -0
- package/lib/module/coverage/lcov-report/index.html +101 -0
- package/lib/module/coverage/lcov-report/prettify.css +1 -0
- package/lib/module/coverage/lcov-report/prettify.js +993 -0
- package/lib/module/coverage/lcov-report/prettify.js.map +1 -0
- package/lib/module/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/lib/module/coverage/lcov-report/sorter.js +210 -0
- package/lib/module/coverage/lcov-report/sorter.js.map +1 -0
- package/lib/module/coverage/lcov.info +0 -0
- package/lib/module/eedl/eedl.js +246 -0
- package/lib/module/eedl/eedl.js.map +1 -0
- package/lib/module/index.js +176 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/models/mp-client-sdk.js +24 -0
- package/lib/module/models/mp-client-sdk.js.map +1 -0
- package/lib/module/processors/data-element.processor.js +176 -0
- package/lib/module/processors/data-element.processor.js.map +1 -0
- package/lib/module/processors/qc.processor.js +90 -0
- package/lib/module/processors/qc.processor.js.map +1 -0
- package/lib/module/processors/tag.processor.js +396 -0
- package/lib/module/processors/tag.processor.js.map +1 -0
- package/lib/module/processors/trans-function.processor.js +73 -0
- package/lib/module/processors/trans-function.processor.js.map +1 -0
- package/lib/module/processors/visit-id.processor.js +144 -0
- package/lib/module/processors/visit-id.processor.js.map +1 -0
- package/lib/typescript/common/app-types.d.ts +101 -0
- package/lib/typescript/common/constants.d.ts +21 -0
- package/lib/typescript/common/data-store.d.ts +81 -0
- package/lib/typescript/common/event-bus.d.ts +6 -0
- package/lib/typescript/common/logger.d.ts +5 -0
- package/lib/typescript/common/network-service.d.ts +8 -0
- package/lib/typescript/common/reporter.d.ts +12 -0
- package/lib/typescript/common/utils.d.ts +38 -0
- package/lib/typescript/eedl/eedl.d.ts +46 -0
- package/lib/typescript/index.d.ts +18 -0
- package/lib/typescript/models/mp-client-sdk.d.ts +157 -0
- package/lib/typescript/processors/data-element.processor.d.ts +12 -0
- package/lib/typescript/processors/qc.processor.d.ts +4 -0
- package/lib/typescript/processors/tag.processor.d.ts +27 -0
- package/lib/typescript/processors/trans-function.processor.d.ts +12 -0
- package/lib/typescript/processors/visit-id.processor.d.ts +7 -0
- package/package.json +170 -0
- package/src/common/app-types.ts +128 -0
- package/src/common/constants.ts +43 -0
- package/src/common/data-store.ts +333 -0
- package/src/common/event-bus.ts +35 -0
- package/src/common/logger.ts +19 -0
- package/src/common/network-service.ts +85 -0
- package/src/common/reporter.ts +110 -0
- package/src/common/utils.ts +281 -0
- package/src/coverage/clover.xml +6 -0
- package/src/coverage/coverage-final.json +1 -0
- package/src/coverage/lcov-report/base.css +224 -0
- package/src/coverage/lcov-report/block-navigation.js +87 -0
- package/src/coverage/lcov-report/favicon.png +0 -0
- package/src/coverage/lcov-report/index.html +101 -0
- package/src/coverage/lcov-report/prettify.css +1 -0
- package/src/coverage/lcov-report/prettify.js +2 -0
- package/src/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/coverage/lcov-report/sorter.js +196 -0
- package/src/coverage/lcov.info +0 -0
- package/src/eedl/eedl.ts +233 -0
- package/src/index.tsx +258 -0
- package/src/models/mp-client-sdk.ts +174 -0
- package/src/processors/data-element.processor.ts +249 -0
- package/src/processors/qc.processor.ts +115 -0
- package/src/processors/tag.processor.ts +527 -0
- package/src/processors/trans-function.processor.ts +85 -0
- package/src/processors/visit-id.processor.ts +164 -0
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
window.PR_SHOULD_USE_CONTINUATION = true;
|
|
3
|
+
|
|
4
|
+
(function () {
|
|
5
|
+
var h = ["break,continue,do,else,for,if,return,while"];
|
|
6
|
+
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"];
|
|
7
|
+
var p = [u, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];
|
|
8
|
+
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"];
|
|
9
|
+
var x = [p, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];
|
|
10
|
+
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"];
|
|
11
|
+
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";
|
|
12
|
+
var w = [p, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];
|
|
13
|
+
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";
|
|
14
|
+
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"];
|
|
15
|
+
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"];
|
|
16
|
+
var H = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"];
|
|
17
|
+
var A = [l, R, w, s + I, f, H];
|
|
18
|
+
var e = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
|
|
19
|
+
var C = "str";
|
|
20
|
+
var z = "kwd";
|
|
21
|
+
var j = "com";
|
|
22
|
+
var O = "typ";
|
|
23
|
+
var G = "lit";
|
|
24
|
+
var L = "pun";
|
|
25
|
+
var F = "pln";
|
|
26
|
+
var m = "tag";
|
|
27
|
+
var E = "dec";
|
|
28
|
+
var J = "src";
|
|
29
|
+
var P = "atn";
|
|
30
|
+
var n = "atv";
|
|
31
|
+
var N = "nocode";
|
|
32
|
+
var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";
|
|
33
|
+
|
|
34
|
+
function k(Z) {
|
|
35
|
+
var ad = 0;
|
|
36
|
+
var S = false;
|
|
37
|
+
var ac = false;
|
|
38
|
+
|
|
39
|
+
for (var V = 0, U = Z.length; V < U; ++V) {
|
|
40
|
+
var ae = Z[V];
|
|
41
|
+
|
|
42
|
+
if (ae.ignoreCase) {
|
|
43
|
+
ac = true;
|
|
44
|
+
} else {
|
|
45
|
+
if (/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
|
|
46
|
+
S = true;
|
|
47
|
+
ac = false;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var Y = {
|
|
54
|
+
b: 8,
|
|
55
|
+
t: 9,
|
|
56
|
+
n: 10,
|
|
57
|
+
v: 11,
|
|
58
|
+
f: 12,
|
|
59
|
+
r: 13
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
function ab(ah) {
|
|
63
|
+
var ag = ah.charCodeAt(0);
|
|
64
|
+
|
|
65
|
+
if (ag !== 92) {
|
|
66
|
+
return ag;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var af = ah.charAt(1);
|
|
70
|
+
ag = Y[af];
|
|
71
|
+
|
|
72
|
+
if (ag) {
|
|
73
|
+
return ag;
|
|
74
|
+
} else {
|
|
75
|
+
if ("0" <= af && af <= "7") {
|
|
76
|
+
return parseInt(ah.substring(1), 8);
|
|
77
|
+
} else {
|
|
78
|
+
if (af === "u" || af === "x") {
|
|
79
|
+
return parseInt(ah.substring(2), 16);
|
|
80
|
+
} else {
|
|
81
|
+
return ah.charCodeAt(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function T(af) {
|
|
88
|
+
if (af < 32) {
|
|
89
|
+
return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var ag = String.fromCharCode(af);
|
|
93
|
+
|
|
94
|
+
if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
|
|
95
|
+
ag = "\\" + ag;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return ag;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function X(am) {
|
|
102
|
+
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"));
|
|
103
|
+
var ak = [];
|
|
104
|
+
var af = [];
|
|
105
|
+
var ao = aq[0] === "^";
|
|
106
|
+
|
|
107
|
+
for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
|
|
108
|
+
var ah = aq[ar];
|
|
109
|
+
|
|
110
|
+
if (/\\[bdsw]/i.test(ah)) {
|
|
111
|
+
ak.push(ah);
|
|
112
|
+
} else {
|
|
113
|
+
var ag = ab(ah);
|
|
114
|
+
var al;
|
|
115
|
+
|
|
116
|
+
if (ar + 2 < aj && "-" === aq[ar + 1]) {
|
|
117
|
+
al = ab(aq[ar + 2]);
|
|
118
|
+
ar += 2;
|
|
119
|
+
} else {
|
|
120
|
+
al = ag;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
af.push([ag, al]);
|
|
124
|
+
|
|
125
|
+
if (!(al < 65 || ag > 122)) {
|
|
126
|
+
if (!(al < 65 || ag > 90)) {
|
|
127
|
+
af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (!(al < 97 || ag > 122)) {
|
|
131
|
+
af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
af.sort(function (av, au) {
|
|
138
|
+
return av[0] - au[0] || au[1] - av[1];
|
|
139
|
+
});
|
|
140
|
+
var ai = [];
|
|
141
|
+
var ap = [NaN, NaN];
|
|
142
|
+
|
|
143
|
+
for (var ar = 0; ar < af.length; ++ar) {
|
|
144
|
+
var at = af[ar];
|
|
145
|
+
|
|
146
|
+
if (at[0] <= ap[1] + 1) {
|
|
147
|
+
ap[1] = Math.max(ap[1], at[1]);
|
|
148
|
+
} else {
|
|
149
|
+
ai.push(ap = at);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
var an = ["["];
|
|
154
|
+
|
|
155
|
+
if (ao) {
|
|
156
|
+
an.push("^");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
an.push.apply(an, ak);
|
|
160
|
+
|
|
161
|
+
for (var ar = 0; ar < ai.length; ++ar) {
|
|
162
|
+
var at = ai[ar];
|
|
163
|
+
an.push(T(at[0]));
|
|
164
|
+
|
|
165
|
+
if (at[1] > at[0]) {
|
|
166
|
+
if (at[1] + 1 > at[0]) {
|
|
167
|
+
an.push("-");
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
an.push(T(at[1]));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
an.push("]");
|
|
175
|
+
return an.join("");
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function W(al) {
|
|
179
|
+
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"));
|
|
180
|
+
var ah = aj.length;
|
|
181
|
+
var an = [];
|
|
182
|
+
|
|
183
|
+
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
184
|
+
var ag = aj[ak];
|
|
185
|
+
|
|
186
|
+
if (ag === "(") {
|
|
187
|
+
++am;
|
|
188
|
+
} else {
|
|
189
|
+
if ("\\" === ag.charAt(0)) {
|
|
190
|
+
var af = +ag.substring(1);
|
|
191
|
+
|
|
192
|
+
if (af && af <= am) {
|
|
193
|
+
an[af] = -1;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
for (var ak = 1; ak < an.length; ++ak) {
|
|
200
|
+
if (-1 === an[ak]) {
|
|
201
|
+
an[ak] = ++ad;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
206
|
+
var ag = aj[ak];
|
|
207
|
+
|
|
208
|
+
if (ag === "(") {
|
|
209
|
+
++am;
|
|
210
|
+
|
|
211
|
+
if (an[am] === undefined) {
|
|
212
|
+
aj[ak] = "(?:";
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
if ("\\" === ag.charAt(0)) {
|
|
216
|
+
var af = +ag.substring(1);
|
|
217
|
+
|
|
218
|
+
if (af && af <= am) {
|
|
219
|
+
aj[ak] = "\\" + an[am];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
226
|
+
if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
|
|
227
|
+
aj[ak] = "";
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (al.ignoreCase && S) {
|
|
232
|
+
for (var ak = 0; ak < ah; ++ak) {
|
|
233
|
+
var ag = aj[ak];
|
|
234
|
+
var ai = ag.charAt(0);
|
|
235
|
+
|
|
236
|
+
if (ag.length >= 2 && ai === "[") {
|
|
237
|
+
aj[ak] = X(ag);
|
|
238
|
+
} else {
|
|
239
|
+
if (ai !== "\\") {
|
|
240
|
+
aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) {
|
|
241
|
+
var ap = ao.charCodeAt(0);
|
|
242
|
+
return "[" + String.fromCharCode(ap & ~32, ap | 32) + "]";
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return aj.join("");
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
var aa = [];
|
|
253
|
+
|
|
254
|
+
for (var V = 0, U = Z.length; V < U; ++V) {
|
|
255
|
+
var ae = Z[V];
|
|
256
|
+
|
|
257
|
+
if (ae.global || ae.multiline) {
|
|
258
|
+
throw new Error("" + ae);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
aa.push("(?:" + W(ae) + ")");
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return new RegExp(aa.join("|"), ac ? "gi" : "g");
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function a(V) {
|
|
268
|
+
var U = /(?:^|\s)nocode(?:\s|$)/;
|
|
269
|
+
var X = [];
|
|
270
|
+
var T = 0;
|
|
271
|
+
var Z = [];
|
|
272
|
+
var W = 0;
|
|
273
|
+
var S;
|
|
274
|
+
|
|
275
|
+
if (V.currentStyle) {
|
|
276
|
+
S = V.currentStyle.whiteSpace;
|
|
277
|
+
} else {
|
|
278
|
+
if (window.getComputedStyle) {
|
|
279
|
+
S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
var Y = S && "pre" === S.substring(0, 3);
|
|
284
|
+
|
|
285
|
+
function aa(ab) {
|
|
286
|
+
switch (ab.nodeType) {
|
|
287
|
+
case 1:
|
|
288
|
+
if (U.test(ab.className)) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
|
|
293
|
+
aa(ae);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
var ad = ab.nodeName;
|
|
297
|
+
|
|
298
|
+
if ("BR" === ad || "LI" === ad) {
|
|
299
|
+
X[W] = "\n";
|
|
300
|
+
Z[W << 1] = T++;
|
|
301
|
+
Z[W++ << 1 | 1] = ab;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
break;
|
|
305
|
+
|
|
306
|
+
case 3:
|
|
307
|
+
case 4:
|
|
308
|
+
var ac = ab.nodeValue;
|
|
309
|
+
|
|
310
|
+
if (ac.length) {
|
|
311
|
+
if (!Y) {
|
|
312
|
+
ac = ac.replace(/[ \t\r\n]+/g, " ");
|
|
313
|
+
} else {
|
|
314
|
+
ac = ac.replace(/\r\n?/g, "\n");
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
X[W] = ac;
|
|
318
|
+
Z[W << 1] = T;
|
|
319
|
+
T += ac.length;
|
|
320
|
+
Z[W++ << 1 | 1] = ab;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
aa(V);
|
|
328
|
+
return {
|
|
329
|
+
sourceCode: X.join("").replace(/\n$/, ""),
|
|
330
|
+
spans: Z
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function B(S, U, W, T) {
|
|
335
|
+
if (!U) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
var V = {
|
|
340
|
+
sourceCode: U,
|
|
341
|
+
basePos: S
|
|
342
|
+
};
|
|
343
|
+
W(V);
|
|
344
|
+
T.push.apply(T, V.decorations);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
var v = /\S/;
|
|
348
|
+
|
|
349
|
+
function o(S) {
|
|
350
|
+
var V = undefined;
|
|
351
|
+
|
|
352
|
+
for (var U = S.firstChild; U; U = U.nextSibling) {
|
|
353
|
+
var T = U.nodeType;
|
|
354
|
+
V = T === 1 ? V ? S : U : T === 3 ? v.test(U.nodeValue) ? S : V : V;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return V === S ? undefined : V;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function g(U, T) {
|
|
361
|
+
var S = {};
|
|
362
|
+
var V;
|
|
363
|
+
|
|
364
|
+
(function () {
|
|
365
|
+
var ad = U.concat(T);
|
|
366
|
+
var ah = [];
|
|
367
|
+
var ag = {};
|
|
368
|
+
|
|
369
|
+
for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
|
|
370
|
+
var Y = ad[ab];
|
|
371
|
+
var ac = Y[3];
|
|
372
|
+
|
|
373
|
+
if (ac) {
|
|
374
|
+
for (var ae = ac.length; --ae >= 0;) {
|
|
375
|
+
S[ac.charAt(ae)] = Y;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
var af = Y[1];
|
|
380
|
+
var aa = "" + af;
|
|
381
|
+
|
|
382
|
+
if (!ag.hasOwnProperty(aa)) {
|
|
383
|
+
ah.push(af);
|
|
384
|
+
ag[aa] = null;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
ah.push(/[\0-\uffff]/);
|
|
389
|
+
V = k(ah);
|
|
390
|
+
})();
|
|
391
|
+
|
|
392
|
+
var X = T.length;
|
|
393
|
+
|
|
394
|
+
var W = function (ah) {
|
|
395
|
+
var Z = ah.sourceCode,
|
|
396
|
+
Y = ah.basePos;
|
|
397
|
+
var ad = [Y, F];
|
|
398
|
+
var af = 0;
|
|
399
|
+
var an = Z.match(V) || [];
|
|
400
|
+
var aj = {};
|
|
401
|
+
|
|
402
|
+
for (var ae = 0, aq = an.length; ae < aq; ++ae) {
|
|
403
|
+
var ag = an[ae];
|
|
404
|
+
var ap = aj[ag];
|
|
405
|
+
var ai = void 0;
|
|
406
|
+
var am;
|
|
407
|
+
|
|
408
|
+
if (typeof ap === "string") {
|
|
409
|
+
am = false;
|
|
410
|
+
} else {
|
|
411
|
+
var aa = S[ag.charAt(0)];
|
|
412
|
+
|
|
413
|
+
if (aa) {
|
|
414
|
+
ai = ag.match(aa[1]);
|
|
415
|
+
ap = aa[0];
|
|
416
|
+
} else {
|
|
417
|
+
for (var ao = 0; ao < X; ++ao) {
|
|
418
|
+
aa = T[ao];
|
|
419
|
+
ai = ag.match(aa[1]);
|
|
420
|
+
|
|
421
|
+
if (ai) {
|
|
422
|
+
ap = aa[0];
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (!ai) {
|
|
428
|
+
ap = F;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
|
|
433
|
+
|
|
434
|
+
if (am && !(ai && typeof ai[1] === "string")) {
|
|
435
|
+
am = false;
|
|
436
|
+
ap = J;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (!am) {
|
|
440
|
+
aj[ag] = ap;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
var ab = af;
|
|
445
|
+
af += ag.length;
|
|
446
|
+
|
|
447
|
+
if (!am) {
|
|
448
|
+
ad.push(Y + ab, ap);
|
|
449
|
+
} else {
|
|
450
|
+
var al = ai[1];
|
|
451
|
+
var ak = ag.indexOf(al);
|
|
452
|
+
var ac = ak + al.length;
|
|
453
|
+
|
|
454
|
+
if (ai[2]) {
|
|
455
|
+
ac = ag.length - ai[2].length;
|
|
456
|
+
ak = ac - al.length;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
var ar = ap.substring(5);
|
|
460
|
+
B(Y + ab, ag.substring(0, ak), W, ad);
|
|
461
|
+
B(Y + ab + ak, al, q(ar, al), ad);
|
|
462
|
+
B(Y + ab + ac, ag.substring(ac), W, ad);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
ah.decorations = ad;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
return W;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function i(T) {
|
|
473
|
+
var W = [],
|
|
474
|
+
S = [];
|
|
475
|
+
|
|
476
|
+
if (T.tripleQuotedStrings) {
|
|
477
|
+
W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
|
|
478
|
+
} else {
|
|
479
|
+
if (T.multiLineStrings) {
|
|
480
|
+
W.push([C, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]);
|
|
481
|
+
} else {
|
|
482
|
+
W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
if (T.verbatimStrings) {
|
|
487
|
+
S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
var Y = T.hashComments;
|
|
491
|
+
|
|
492
|
+
if (Y) {
|
|
493
|
+
if (T.cStyleComments) {
|
|
494
|
+
if (Y > 1) {
|
|
495
|
+
W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"]);
|
|
496
|
+
} else {
|
|
497
|
+
W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
|
|
501
|
+
} else {
|
|
502
|
+
W.push([j, /^#[^\r\n]*/, null, "#"]);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (T.cStyleComments) {
|
|
507
|
+
S.push([j, /^\/\/[^\r\n]*/, null]);
|
|
508
|
+
S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (T.regexLiterals) {
|
|
512
|
+
var X = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";
|
|
513
|
+
S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
var V = T.types;
|
|
517
|
+
|
|
518
|
+
if (V) {
|
|
519
|
+
S.push([O, V]);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
var U = ("" + T.keywords).replace(/^ | $/g, "");
|
|
523
|
+
|
|
524
|
+
if (U.length) {
|
|
525
|
+
S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
W.push([F, /^\s+/, null, " \r\n\t\xA0"]);
|
|
529
|
+
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]);
|
|
530
|
+
return g(W, S);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
var K = i({
|
|
534
|
+
keywords: A,
|
|
535
|
+
hashComments: true,
|
|
536
|
+
cStyleComments: true,
|
|
537
|
+
multiLineStrings: true,
|
|
538
|
+
regexLiterals: true
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
function Q(V, ag) {
|
|
542
|
+
var U = /(?:^|\s)nocode(?:\s|$)/;
|
|
543
|
+
var ab = /\r\n?|\n/;
|
|
544
|
+
var ac = V.ownerDocument;
|
|
545
|
+
var S;
|
|
546
|
+
|
|
547
|
+
if (V.currentStyle) {
|
|
548
|
+
S = V.currentStyle.whiteSpace;
|
|
549
|
+
} else {
|
|
550
|
+
if (window.getComputedStyle) {
|
|
551
|
+
S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
var Z = S && "pre" === S.substring(0, 3);
|
|
556
|
+
var af = ac.createElement("LI");
|
|
557
|
+
|
|
558
|
+
while (V.firstChild) {
|
|
559
|
+
af.appendChild(V.firstChild);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
var W = [af];
|
|
563
|
+
|
|
564
|
+
function ae(al) {
|
|
565
|
+
switch (al.nodeType) {
|
|
566
|
+
case 1:
|
|
567
|
+
if (U.test(al.className)) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if ("BR" === al.nodeName) {
|
|
572
|
+
ad(al);
|
|
573
|
+
|
|
574
|
+
if (al.parentNode) {
|
|
575
|
+
al.parentNode.removeChild(al);
|
|
576
|
+
}
|
|
577
|
+
} else {
|
|
578
|
+
for (var an = al.firstChild; an; an = an.nextSibling) {
|
|
579
|
+
ae(an);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
break;
|
|
584
|
+
|
|
585
|
+
case 3:
|
|
586
|
+
case 4:
|
|
587
|
+
if (Z) {
|
|
588
|
+
var am = al.nodeValue;
|
|
589
|
+
var aj = am.match(ab);
|
|
590
|
+
|
|
591
|
+
if (aj) {
|
|
592
|
+
var ai = am.substring(0, aj.index);
|
|
593
|
+
al.nodeValue = ai;
|
|
594
|
+
var ah = am.substring(aj.index + aj[0].length);
|
|
595
|
+
|
|
596
|
+
if (ah) {
|
|
597
|
+
var ak = al.parentNode;
|
|
598
|
+
ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
ad(al);
|
|
602
|
+
|
|
603
|
+
if (!ai) {
|
|
604
|
+
al.parentNode.removeChild(al);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
break;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
function ad(ak) {
|
|
614
|
+
while (!ak.nextSibling) {
|
|
615
|
+
ak = ak.parentNode;
|
|
616
|
+
|
|
617
|
+
if (!ak) {
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
function ai(al, ar) {
|
|
623
|
+
var aq = ar ? al.cloneNode(false) : al;
|
|
624
|
+
var ao = al.parentNode;
|
|
625
|
+
|
|
626
|
+
if (ao) {
|
|
627
|
+
var ap = ai(ao, 1);
|
|
628
|
+
var an = al.nextSibling;
|
|
629
|
+
ap.appendChild(aq);
|
|
630
|
+
|
|
631
|
+
for (var am = an; am; am = an) {
|
|
632
|
+
an = am.nextSibling;
|
|
633
|
+
ap.appendChild(am);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
return aq;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
var ah = ai(ak.nextSibling, 0);
|
|
641
|
+
|
|
642
|
+
for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
|
|
643
|
+
ah = aj;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
W.push(ah);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
for (var Y = 0; Y < W.length; ++Y) {
|
|
650
|
+
ae(W[Y]);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
if (ag === (ag | 0)) {
|
|
654
|
+
W[0].setAttribute("value", ag);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
var aa = ac.createElement("OL");
|
|
658
|
+
aa.className = "linenums";
|
|
659
|
+
var X = Math.max(0, ag - 1 | 0) || 0;
|
|
660
|
+
|
|
661
|
+
for (var Y = 0, T = W.length; Y < T; ++Y) {
|
|
662
|
+
af = W[Y];
|
|
663
|
+
af.className = "L" + (Y + X) % 10;
|
|
664
|
+
|
|
665
|
+
if (!af.firstChild) {
|
|
666
|
+
af.appendChild(ac.createTextNode("\xA0"));
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
aa.appendChild(af);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
V.appendChild(aa);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
function D(ac) {
|
|
676
|
+
var aj = /\bMSIE\b/.test(navigator.userAgent);
|
|
677
|
+
var am = /\n/g;
|
|
678
|
+
var al = ac.sourceCode;
|
|
679
|
+
var an = al.length;
|
|
680
|
+
var V = 0;
|
|
681
|
+
var aa = ac.spans;
|
|
682
|
+
var T = aa.length;
|
|
683
|
+
var ah = 0;
|
|
684
|
+
var X = ac.decorations;
|
|
685
|
+
var Y = X.length;
|
|
686
|
+
var Z = 0;
|
|
687
|
+
X[Y] = an;
|
|
688
|
+
var ar, aq;
|
|
689
|
+
|
|
690
|
+
for (aq = ar = 0; aq < Y;) {
|
|
691
|
+
if (X[aq] !== X[aq + 2]) {
|
|
692
|
+
X[ar++] = X[aq++];
|
|
693
|
+
X[ar++] = X[aq++];
|
|
694
|
+
} else {
|
|
695
|
+
aq += 2;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
Y = ar;
|
|
700
|
+
|
|
701
|
+
for (aq = ar = 0; aq < Y;) {
|
|
702
|
+
var at = X[aq];
|
|
703
|
+
var ab = X[aq + 1];
|
|
704
|
+
var W = aq + 2;
|
|
705
|
+
|
|
706
|
+
while (W + 2 <= Y && X[W + 1] === ab) {
|
|
707
|
+
W += 2;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
X[ar++] = at;
|
|
711
|
+
X[ar++] = ab;
|
|
712
|
+
aq = W;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
Y = X.length = ar;
|
|
716
|
+
var ae = null;
|
|
717
|
+
|
|
718
|
+
while (ah < T) {
|
|
719
|
+
var af = aa[ah];
|
|
720
|
+
var S = aa[ah + 2] || an;
|
|
721
|
+
var ag = X[Z];
|
|
722
|
+
var ap = X[Z + 2] || an;
|
|
723
|
+
var W = Math.min(S, ap);
|
|
724
|
+
var ak = aa[ah + 1];
|
|
725
|
+
var U;
|
|
726
|
+
|
|
727
|
+
if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
|
|
728
|
+
if (aj) {
|
|
729
|
+
U = U.replace(am, "\r");
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
ak.nodeValue = U;
|
|
733
|
+
var ai = ak.ownerDocument;
|
|
734
|
+
var ao = ai.createElement("SPAN");
|
|
735
|
+
ao.className = X[Z + 1];
|
|
736
|
+
var ad = ak.parentNode;
|
|
737
|
+
ad.replaceChild(ao, ak);
|
|
738
|
+
ao.appendChild(ak);
|
|
739
|
+
|
|
740
|
+
if (V < S) {
|
|
741
|
+
aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
|
|
742
|
+
ad.insertBefore(ak, ao.nextSibling);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
V = W;
|
|
747
|
+
|
|
748
|
+
if (V >= S) {
|
|
749
|
+
ah += 2;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (V >= ap) {
|
|
753
|
+
Z += 2;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
var t = {};
|
|
759
|
+
|
|
760
|
+
function c(U, V) {
|
|
761
|
+
for (var S = V.length; --S >= 0;) {
|
|
762
|
+
var T = V[S];
|
|
763
|
+
|
|
764
|
+
if (!t.hasOwnProperty(T)) {
|
|
765
|
+
t[T] = U;
|
|
766
|
+
} else {
|
|
767
|
+
if (window.console) {
|
|
768
|
+
console.warn("cannot override language handler %s", T);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function q(T, S) {
|
|
775
|
+
if (!(T && t.hasOwnProperty(T))) {
|
|
776
|
+
T = /^\s*</.test(S) ? "default-markup" : "default-code";
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
return t[T];
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
c(K, ["default-code"]);
|
|
783
|
+
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"]);
|
|
784
|
+
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"]);
|
|
785
|
+
c(g([], [[n, /^[\s\S]+/]]), ["uq.val"]);
|
|
786
|
+
c(i({
|
|
787
|
+
keywords: l,
|
|
788
|
+
hashComments: true,
|
|
789
|
+
cStyleComments: true,
|
|
790
|
+
types: e
|
|
791
|
+
}), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
|
|
792
|
+
c(i({
|
|
793
|
+
keywords: "null,true,false"
|
|
794
|
+
}), ["json"]);
|
|
795
|
+
c(i({
|
|
796
|
+
keywords: R,
|
|
797
|
+
hashComments: true,
|
|
798
|
+
cStyleComments: true,
|
|
799
|
+
verbatimStrings: true,
|
|
800
|
+
types: e
|
|
801
|
+
}), ["cs"]);
|
|
802
|
+
c(i({
|
|
803
|
+
keywords: x,
|
|
804
|
+
cStyleComments: true
|
|
805
|
+
}), ["java"]);
|
|
806
|
+
c(i({
|
|
807
|
+
keywords: H,
|
|
808
|
+
hashComments: true,
|
|
809
|
+
multiLineStrings: true
|
|
810
|
+
}), ["bsh", "csh", "sh"]);
|
|
811
|
+
c(i({
|
|
812
|
+
keywords: I,
|
|
813
|
+
hashComments: true,
|
|
814
|
+
multiLineStrings: true,
|
|
815
|
+
tripleQuotedStrings: true
|
|
816
|
+
}), ["cv", "py"]);
|
|
817
|
+
c(i({
|
|
818
|
+
keywords: s,
|
|
819
|
+
hashComments: true,
|
|
820
|
+
multiLineStrings: true,
|
|
821
|
+
regexLiterals: true
|
|
822
|
+
}), ["perl", "pl", "pm"]);
|
|
823
|
+
c(i({
|
|
824
|
+
keywords: f,
|
|
825
|
+
hashComments: true,
|
|
826
|
+
multiLineStrings: true,
|
|
827
|
+
regexLiterals: true
|
|
828
|
+
}), ["rb"]);
|
|
829
|
+
c(i({
|
|
830
|
+
keywords: w,
|
|
831
|
+
cStyleComments: true,
|
|
832
|
+
regexLiterals: true
|
|
833
|
+
}), ["js"]);
|
|
834
|
+
c(i({
|
|
835
|
+
keywords: r,
|
|
836
|
+
hashComments: 3,
|
|
837
|
+
cStyleComments: true,
|
|
838
|
+
multilineStrings: true,
|
|
839
|
+
tripleQuotedStrings: true,
|
|
840
|
+
regexLiterals: true
|
|
841
|
+
}), ["coffee"]);
|
|
842
|
+
c(g([], [[C, /^[\s\S]+/]]), ["regex"]);
|
|
843
|
+
|
|
844
|
+
function d(V) {
|
|
845
|
+
var U = V.langExtension;
|
|
846
|
+
|
|
847
|
+
try {
|
|
848
|
+
var S = a(V.sourceNode);
|
|
849
|
+
var T = S.sourceCode;
|
|
850
|
+
V.sourceCode = T;
|
|
851
|
+
V.spans = S.spans;
|
|
852
|
+
V.basePos = 0;
|
|
853
|
+
q(U, T)(V);
|
|
854
|
+
D(V);
|
|
855
|
+
} catch (W) {
|
|
856
|
+
if ("console" in window) {
|
|
857
|
+
console.log(W && W.stack ? W.stack : W);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
function y(W, V, U) {
|
|
863
|
+
var S = document.createElement("PRE");
|
|
864
|
+
S.innerHTML = W;
|
|
865
|
+
|
|
866
|
+
if (U) {
|
|
867
|
+
Q(S, U);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
var T = {
|
|
871
|
+
langExtension: V,
|
|
872
|
+
numberLines: U,
|
|
873
|
+
sourceNode: S
|
|
874
|
+
};
|
|
875
|
+
d(T);
|
|
876
|
+
return S.innerHTML;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
function b(ad) {
|
|
880
|
+
function Y(af) {
|
|
881
|
+
return document.getElementsByTagName(af);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
var ac = [Y("pre"), Y("code"), Y("xmp")];
|
|
885
|
+
var T = [];
|
|
886
|
+
|
|
887
|
+
for (var aa = 0; aa < ac.length; ++aa) {
|
|
888
|
+
for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
|
|
889
|
+
T.push(ac[aa][Z]);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
ac = null;
|
|
894
|
+
var W = Date;
|
|
895
|
+
|
|
896
|
+
if (!W.now) {
|
|
897
|
+
W = {
|
|
898
|
+
now: function () {
|
|
899
|
+
return +new Date();
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
var X = 0;
|
|
905
|
+
var S;
|
|
906
|
+
var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/;
|
|
907
|
+
var ae = /\bprettyprint\b/;
|
|
908
|
+
|
|
909
|
+
function U() {
|
|
910
|
+
var ag = window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity;
|
|
911
|
+
|
|
912
|
+
for (; X < T.length && W.now() < ag; X++) {
|
|
913
|
+
var aj = T[X];
|
|
914
|
+
var ai = aj.className;
|
|
915
|
+
|
|
916
|
+
if (ai.indexOf("prettyprint") >= 0) {
|
|
917
|
+
var ah = ai.match(ab);
|
|
918
|
+
var am;
|
|
919
|
+
|
|
920
|
+
if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
|
|
921
|
+
ah = am.className.match(ab);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
if (ah) {
|
|
925
|
+
ah = ah[1];
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
var al = false;
|
|
929
|
+
|
|
930
|
+
for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
|
|
931
|
+
if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
|
|
932
|
+
al = true;
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
if (!al) {
|
|
938
|
+
var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
|
|
939
|
+
af = af ? af[1] && af[1].length ? +af[1] : true : false;
|
|
940
|
+
|
|
941
|
+
if (af) {
|
|
942
|
+
Q(aj, af);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
S = {
|
|
946
|
+
langExtension: ah,
|
|
947
|
+
sourceNode: aj,
|
|
948
|
+
numberLines: af
|
|
949
|
+
};
|
|
950
|
+
d(S);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
if (X < T.length) {
|
|
956
|
+
setTimeout(U, 250);
|
|
957
|
+
} else {
|
|
958
|
+
if (ad) {
|
|
959
|
+
ad();
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
U();
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
window.prettyPrintOne = y;
|
|
968
|
+
window.prettyPrint = b;
|
|
969
|
+
window.PR = {
|
|
970
|
+
createSimpleLexer: g,
|
|
971
|
+
registerLangHandler: c,
|
|
972
|
+
sourceDecorator: i,
|
|
973
|
+
PR_ATTRIB_NAME: P,
|
|
974
|
+
PR_ATTRIB_VALUE: n,
|
|
975
|
+
PR_COMMENT: j,
|
|
976
|
+
PR_DECLARATION: E,
|
|
977
|
+
PR_KEYWORD: z,
|
|
978
|
+
PR_LITERAL: G,
|
|
979
|
+
PR_NOCODE: N,
|
|
980
|
+
PR_PLAIN: F,
|
|
981
|
+
PR_PUNCTUATION: L,
|
|
982
|
+
PR_SOURCE: J,
|
|
983
|
+
PR_STRING: C,
|
|
984
|
+
PR_TAG: m,
|
|
985
|
+
PR_TYPE: O
|
|
986
|
+
};
|
|
987
|
+
})();
|
|
988
|
+
|
|
989
|
+
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"]);
|
|
990
|
+
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"]);
|
|
991
|
+
PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);
|
|
992
|
+
PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]), ["css-str"]);
|
|
993
|
+
//# sourceMappingURL=prettify.js.map
|