boot-script/src/test/resources/net/java/html/boot/script/ko4j/env.nashorn.1.2-debug.js
author Jaroslav Tulach <jtulach@netbeans.org>
Wed, 04 Jun 2014 10:24:28 +0200
branchenvjs
changeset 678 ac3a8dafaad7
child 694 e4dad7683970
permissions -rw-r--r--
Adding env.js as found at https://bugs.openjdk.java.net/browse/JDK-8006183
     1 /*
     2  * Envjs core-env.1.2.13
     3  * Pure JavaScript Browser Environment
     4  * By John Resig <http://ejohn.org/> and the Envjs Team
     5  * Copyright 2008-2010 John Resig, under the MIT License
     6  */
     7 
     8 load("nashorn:mozilla_compat.js");
     9 
    10 var Envjs = function(){
    11     var i,
    12         name,
    13         override = function(){
    14             for(i=0;i<arguments.length;i++){
    15                 for ( name in arguments[i] ) {
    16                     var g = arguments[i].__lookupGetter__(name),
    17                         s = arguments[i].__lookupSetter__(name);
    18                     if ( g || s ) {
    19                         if ( g ) { Envjs.__defineGetter__(name, g); }
    20                         if ( s ) { Envjs.__defineSetter__(name, s); }
    21                     } else {
    22                         Envjs[name] = arguments[i][name];
    23                     }
    24                 }
    25             }
    26         };
    27     if(arguments.length === 1 && typeof(arguments[0]) == 'string'){
    28         window.location = arguments[0];
    29     }else if (arguments.length === 1 && typeof(arguments[0]) == "object"){
    30         override(arguments[0]);
    31     }else if(arguments.length === 2 && typeof(arguments[0]) == 'string'){
    32         override(arguments[1]);
    33         window.location = arguments[0];
    34     }
    35     return;
    36 },
    37 __this__ = this;
    38 
    39 //eg "Mozilla"
    40 Envjs.appCodeName  = "Envjs";
    41 
    42 //eg "Gecko/20070309 Firefox/2.0.0.3"
    43 Envjs.appName      = "Resig/20070309 PilotFish/1.2.13";
    44 
    45 Envjs.version = "1.6";//?
    46 Envjs.revision = '';
    47 /*
    48  * Envjs core-env.1.2.13 
    49  * Pure JavaScript Browser Environment
    50  * By John Resig <http://ejohn.org/> and the Envjs Team
    51  * Copyright 2008-2010 John Resig, under the MIT License
    52  */
    53 
    54 //CLOSURE_START
    55 (function(){
    56 
    57 
    58 
    59 
    60 
    61 /**
    62  * @author john resig
    63  */
    64 // Helper method for extending one object with another.
    65 function __extend__(a,b) {
    66     for ( var i in b ) {
    67         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
    68         if ( g || s ) {
    69             if ( g ) { a.__defineGetter__(i, g); }
    70             if ( s ) { a.__defineSetter__(i, s); }
    71         } else {
    72             a[i] = b[i];
    73         }
    74     } return a;
    75 }
    76 
    77 /**
    78  * Writes message to system out
    79  * @param {String} message
    80  */
    81 Envjs.log = function(message){};
    82 
    83 /**
    84  * Constants providing enumerated levels for logging in modules
    85  */
    86 Envjs.DEBUG = 1;
    87 Envjs.INFO = 2;
    88 Envjs.WARN = 3;
    89 Envjs.ERROR = 3;
    90 Envjs.NONE = 3;
    91 
    92 /**
    93  * Writes error info out to console
    94  * @param {Error} e
    95  */
    96 Envjs.lineSource = function(e){};
    97 
    98     
    99 /**
   100  * TODO: used in ./event/eventtarget.js
   101  * @param {Object} event
   102  */
   103 Envjs.defaultEventBehaviors = {};
   104 
   105 
   106 /**
   107  * describes which script src values will trigger Envjs to load
   108  * the script like a browser would
   109  */
   110 Envjs.scriptTypes = {
   111     "text/javascript"   :false,
   112     "text/envjs"        :true
   113 };
   114 
   115 /**
   116  * will be called when loading a script throws an error
   117  * @param {Object} script
   118  * @param {Object} e
   119  */
   120 Envjs.onScriptLoadError = function(script, e){
   121     console.log('error loading script %s %s', script, e);
   122 };
   123 
   124 
   125 /**
   126  * load and execute script tag text content
   127  * @param {Object} script
   128  */
   129 Envjs.loadInlineScript = function(script){
   130     var tmpFile;
   131     tmpFile = Envjs.writeToTempFile(script.text, 'js') ;
   132     load(tmpFile);
   133 };
   134 
   135 /**
   136  * Should evaluate script in some context
   137  * @param {Object} context
   138  * @param {Object} source
   139  * @param {Object} name
   140  */
   141 Envjs.eval = function(context, source, name){};
   142 
   143 
   144 /**
   145  * Executes a script tag
   146  * @param {Object} script
   147  * @param {Object} parser
   148  */
   149 Envjs.loadLocalScript = function(script){
   150     //console.log("loading script %s", script);
   151     var types,
   152     src,
   153     i,
   154     base,
   155     filename,
   156     xhr;
   157 
   158     if(script.type){
   159         types = script.type.split(";");
   160         for(i=0;i<types.length;i++){
   161             if(Envjs.scriptTypes[types[i]]){
   162                 //ok this script type is allowed
   163                 break;
   164             }
   165             if(i+1 == types.length){
   166                 //console.log('wont load script type %s', script.type);
   167                 return false;
   168             }
   169         }
   170     }
   171 
   172     try{
   173         //console.log('handling inline scripts');
   174         if(!script.src.length){
   175             Envjs.loadInlineScript(script);
   176             return true;
   177         }
   178     }catch(e){
   179         //Envjs.error("Error loading script.", e);
   180         Envjs.onScriptLoadError(script, e);
   181         return false;
   182     }
   183 
   184 
   185     //console.log("loading allowed external script %s", script.src);
   186 
   187     //lets you register a function to execute
   188     //before the script is loaded
   189     if(Envjs.beforeScriptLoad){
   190         for(src in Envjs.beforeScriptLoad){
   191             if(script.src.match(src)){
   192                 Envjs.beforeScriptLoad[src](script);
   193             }
   194         }
   195     }
   196     base = "" + script.ownerDocument.location;
   197     //filename = Envjs.uri(script.src.match(/([^\?#]*)/)[1], base );
   198     //console.log('loading script from base %s', base);
   199     filename = Envjs.uri(script.src, base);
   200     try {
   201         xhr = new XMLHttpRequest();
   202         xhr.open("GET", filename, false/*syncronous*/);
   203         //console.log("loading external script %s", filename);
   204         xhr.onreadystatechange = function(){
   205             //console.log("readyState %s", xhr.readyState);
   206             if(xhr.readyState === 4){
   207                 Envjs.eval(
   208                     script.ownerDocument.ownerWindow,
   209                     xhr.responseText,
   210                     filename
   211                 );
   212             }
   213         };
   214         xhr.send(null, false);
   215     } catch(e) {
   216         console.log("could not load script %s \n %s", filename, e );
   217         Envjs.onScriptLoadError(script, e);
   218         return false;
   219     }
   220     //lets you register a function to execute
   221     //after the script is loaded
   222     if(Envjs.afterScriptLoad){
   223         for(src in Envjs.afterScriptLoad){
   224             if(script.src.match(src)){
   225                 Envjs.afterScriptLoad[src](script);
   226             }
   227         }
   228     }
   229     return true;
   230 };
   231 
   232 
   233 /**
   234  * An 'image' was requested by the document.
   235  *
   236  * - During inital parse of a <link>
   237  * - Via an innerHTML parse of a <link>
   238  * - A modificiation of the 'src' attribute of an Image/HTMLImageElement
   239  *
   240  * NOTE: this is optional API.  If this doesn't exist then the default
   241  * 'loaded' event occurs.
   242  *
   243  * @param node {Object} the <img> node
   244  * @param node the src value
   245  * @return 'true' to indicate the 'load' succeed, false otherwise
   246  */
   247 Envjs.loadImage = function(node, src) {
   248     return true;
   249 };
   250 
   251 
   252 /**
   253  * A 'link'  was requested by the document.  Typically this occurs when:
   254  * - During inital parse of a <link>
   255  * - Via an innerHTML parse of a <link>
   256  * - A modificiation of the 'href' attribute on a <link> node in the tree
   257  *
   258  * @param node {Object} is the link node in question
   259  * @param href {String} is the href.
   260  *
   261  * Return 'true' to indicate that the 'load' was successful, or false
   262  * otherwise.  The appropriate event is then triggered.
   263  *
   264  * NOTE: this is optional API.  If this doesn't exist then the default
   265  *   'loaded' event occurs
   266  */
   267 Envjs.loadLink = function(node, href) {
   268     return true;
   269 };
   270 
   271 (function(){
   272 
   273 
   274 /*
   275  *  cookie handling
   276  *  Private internal helper class used to save/retreive cookies
   277  */
   278 
   279 /**
   280  * Specifies the location of the cookie file
   281  */
   282 Envjs.cookieFile = function(){
   283     return 'file://'+Envjs.homedir+'/.cookies';
   284 };
   285 
   286 /**
   287  * saves cookies to a local file
   288  * @param {Object} htmldoc
   289  */
   290 Envjs.saveCookies = function(){
   291     var cookiejson = JSON.stringify(Envjs.cookies.peristent,null,'\t');
   292     //console.log('persisting cookies %s', cookiejson);
   293     Envjs.writeToFile(cookiejson, Envjs.cookieFile());
   294 };
   295 
   296 /**
   297  * loads cookies from a local file
   298  * @param {Object} htmldoc
   299  */
   300 Envjs.loadCookies = function(){
   301     var cookiejson,
   302         js;
   303     try{
   304         cookiejson = Envjs.readFromFile(Envjs.cookieFile())
   305         js = JSON.parse(cookiejson, null, '\t');
   306     }catch(e){
   307         //console.log('failed to load cookies %s', e);
   308         js = {};
   309     }
   310     return js;
   311 };
   312 
   313 Envjs.cookies = {
   314     persistent:{
   315         //domain - key on domain name {
   316             //path - key on path {
   317                 //name - key on name {
   318                      //value : cookie value
   319                      //other cookie properties
   320                 //}
   321             //}
   322         //}
   323         //expire - provides a timestamp for expiring the cookie
   324         //cookie - the cookie!
   325     },
   326     temporary:{//transient is a reserved word :(
   327         //like above
   328     }
   329 };
   330 
   331 var __cookies__;
   332 
   333 //HTMLDocument cookie
   334 Envjs.setCookie = function(url, cookie){
   335     var i,
   336         index,
   337         name,
   338         value,
   339         properties = {},
   340         attr,
   341         attrs;
   342     url = Envjs.urlsplit(url);
   343     if(cookie)
   344         attrs = cookie.split(";");
   345     else
   346         return;
   347     
   348     //for now the strategy is to simply create a json object
   349     //and post it to a file in the .cookies.js file.  I hate parsing
   350     //dates so I decided not to implement support for 'expires' 
   351     //(which is deprecated) and instead focus on the easier 'max-age'
   352     //(which succeeds 'expires') 
   353     cookie = {};//keyword properties of the cookie
   354     cookie['domain'] = url.hostname;
   355     cookie['path'] = url.path||'/';
   356     for(i=0;i<attrs.length;i++){
   357         index = attrs[i].indexOf("=");
   358         if(index > -1){
   359             name = __trim__(attrs[i].slice(0,index));
   360             value = __trim__(attrs[i].slice(index+1));
   361             if(name=='max-age'){
   362                 //we'll have to when to check these
   363                 //and garbage collect expired cookies
   364                 cookie[name] = parseInt(value, 10);
   365             } else if( name == 'domain' ){
   366                 if(__domainValid__(url, value)){
   367                     cookie['domain'] = value;
   368                 }
   369             } else if( name == 'path' ){
   370                 //not sure of any special logic for path
   371                 cookie['path'] = value;
   372             } else {
   373                 //its not a cookie keyword so store it in our array of properties
   374                 //and we'll serialize individually in a moment
   375                 properties[name] = value;
   376             }
   377         }else{
   378             if( attrs[i] == 'secure' ){
   379                 cookie[attrs[i]] = true;
   380             }
   381         }
   382     }
   383     if(!('max-age' in cookie)){
   384         //it's a transient cookie so it only lasts as long as 
   385         //the window.location remains the same (ie in-memory cookie)
   386         __mergeCookie__(Envjs.cookies.temporary, cookie, properties);
   387     }else{
   388         //the cookie is persistent
   389         __mergeCookie__(Envjs.cookies.persistent, cookie, properties);
   390         Envjs.saveCookies();
   391     }
   392 };
   393 
   394 function __domainValid__(url, value){
   395     var i,
   396         domainParts = url.hostname.split('.').reverse(),
   397         newDomainParts = value.split('.').reverse();
   398     if(newDomainParts.length > 1){
   399         for(i=0;i<newDomainParts.length;i++){
   400             if(!(newDomainParts[i] == domainParts[i])){
   401                 return false;
   402             }
   403         }
   404         return true;
   405     }
   406     return false;
   407 };
   408 
   409 Envjs.getCookies = function(url){
   410     //The cookies that are returned must belong to the same domain
   411     //and be at or below the current window.location.path.  Also
   412     //we must check to see if the cookie was set to 'secure' in which
   413     //case we must check our current location.protocol to make sure it's
   414     //https:
   415     var persisted;
   416     url = Envjs.urlsplit(url);
   417     if(!__cookies__){
   418         try{
   419             __cookies__ = true;
   420             try{
   421                 persisted = Envjs.loadCookies();
   422             }catch(e){
   423                 //fail gracefully
   424                 //console.log('%s', e);
   425             }   
   426             if(persisted){
   427                 __extend__(Envjs.cookies.persistent, persisted);
   428             }
   429             //console.log('set cookies for doc %s', doc.baseURI);
   430         }catch(e){
   431             console.log('cookies not loaded %s', e)
   432         };
   433     }
   434     var temporary = __cookieString__(Envjs.cookies.temporary, url),
   435         persistent =  __cookieString__(Envjs.cookies.persistent, url);
   436     //console.log('temporary cookies: %s', temporary);  
   437     //console.log('persistent cookies: %s', persistent);  
   438     return  temporary + persistent;
   439 };
   440 
   441 function __cookieString__(cookies, url) {
   442     var cookieString = "",
   443         domain, 
   444         path,
   445         name,
   446         i=0;
   447     for (domain in cookies) {
   448         // check if the cookie is in the current domain (if domain is set)
   449         // console.log('cookie domain %s', domain);
   450         if (domain == "" || domain == url.hostname) {
   451             for (path in cookies[domain]) {
   452                 // console.log('cookie domain path %s', path);
   453                 // make sure path is at or below the window location path
   454                 if (path == "/" || url.path.indexOf(path) > -1) {
   455                     for (name in cookies[domain][path]) {
   456                         // console.log('cookie domain path name %s', name);
   457                         cookieString += 
   458                             ((i++ > 0)?'; ':'') +
   459                             name + "=" + 
   460                             cookies[domain][path][name].value;
   461                     }
   462                 }
   463             }
   464         }
   465     }
   466     return cookieString;
   467 };
   468 
   469 function __mergeCookie__(target, cookie, properties){
   470     var name, now;
   471     if(!target[cookie.domain]){
   472         target[cookie.domain] = {};
   473     }
   474     if(!target[cookie.domain][cookie.path]){
   475         target[cookie.domain][cookie.path] = {};
   476     }
   477     for(name in properties){
   478         now = new Date().getTime();
   479         target[cookie.domain][cookie.path][name] = {
   480             "value":properties[name],
   481             "secure":cookie.secure,
   482             "max-age":cookie['max-age'],
   483             "date-created":now,
   484             "expiration":(cookie['max-age']===0) ? 
   485                 0 :
   486                 now + cookie['max-age']
   487         };
   488         //console.log('cookie is %o',target[cookie.domain][cookie.path][name]);
   489     }
   490 };
   491 
   492 })();//end cookies
   493 /*
   494     http://www.JSON.org/json2.js
   495     2008-07-15
   496 
   497     Public Domain.
   498 
   499     NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
   500 
   501     See http://www.JSON.org/js.html
   502 
   503    
   504     This code should be minified before deployment.
   505     See http://javascript.crockford.com/jsmin.html
   506 
   507     USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
   508     NOT CONTROL.
   509 */
   510 try{ JSON; }catch(e){ 
   511 JSON = function () {
   512 
   513     function f(n) {
   514         // Format integers to have at least two digits.
   515         return n < 10 ? '0' + n : n;
   516     }
   517 
   518     Date.prototype.toJSON = function (key) {
   519 
   520         return this.getUTCFullYear()   + '-' +
   521              f(this.getUTCMonth() + 1) + '-' +
   522              f(this.getUTCDate())      + 'T' +
   523              f(this.getUTCHours())     + ':' +
   524              f(this.getUTCMinutes())   + ':' +
   525              f(this.getUTCSeconds())   + 'Z';
   526     };
   527 
   528     String.prototype.toJSON = function (key) {
   529         return String(this);
   530     };
   531     Number.prototype.toJSON =
   532     Boolean.prototype.toJSON = function (key) {
   533         return this.valueOf();
   534     };
   535 
   536     var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
   537         escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
   538         gap,
   539         indent,
   540         meta = {    // table of character substitutions
   541             '\b': '\\b',
   542             '\t': '\\t',
   543             '\n': '\\n',
   544             '\f': '\\f',
   545             '\r': '\\r',
   546             '"' : '\\"',
   547             '\\': '\\\\'
   548         },
   549         rep;
   550 
   551 
   552     function quote(string) {
   553         
   554         escapeable.lastIndex = 0;
   555         return escapeable.test(string) ?
   556             '"' + string.replace(escapeable, function (a) {
   557                 var c = meta[a];
   558                 if (typeof c === 'string') {
   559                     return c;
   560                 }
   561                 return '\\u' + ('0000' +
   562                         (+(a.charCodeAt(0))).toString(16)).slice(-4);
   563             }) + '"' :
   564             '"' + string + '"';
   565     }
   566 
   567 
   568     function str(key, holder) {
   569 
   570         var i,          // The loop counter.
   571             k,          // The member key.
   572             v,          // The member value.
   573             length,
   574             mind = gap,
   575             partial,
   576             value = holder[key];
   577 
   578         if (value && typeof value === 'object' &&
   579                 typeof value.toJSON === 'function') {
   580             value = value.toJSON(key);
   581         }
   582         if (typeof rep === 'function') {
   583             value = rep.call(holder, key, value);
   584         }
   585 
   586         switch (typeof value) {
   587         case 'string':
   588             return quote(value);
   589 
   590         case 'number':
   591             return isFinite(value) ? String(value) : 'null';
   592 
   593         case 'boolean':
   594         case 'null':
   595 
   596             return String(value);
   597             
   598         case 'object':
   599 
   600             if (!value) {
   601                 return 'null';
   602             }
   603             gap += indent;
   604             partial = [];
   605 
   606             if (typeof value.length === 'number' &&
   607                     !(value.propertyIsEnumerable('length'))) {
   608 
   609                 length = value.length;
   610                 for (i = 0; i < length; i += 1) {
   611                     partial[i] = str(i, value) || 'null';
   612                 }
   613                 
   614                 v = partial.length === 0 ? '[]' :
   615                     gap ? '[\n' + gap +
   616                             partial.join(',\n' + gap) + '\n' +
   617                                 mind + ']' :
   618                           '[' + partial.join(',') + ']';
   619                 gap = mind;
   620                 return v;
   621             }
   622 
   623             if (rep && typeof rep === 'object') {
   624                 length = rep.length;
   625                 for (i = 0; i < length; i += 1) {
   626                     k = rep[i];
   627                     if (typeof k === 'string') {
   628                         v = str(k, value);
   629                         if (v) {
   630                             partial.push(quote(k) + (gap ? ': ' : ':') + v);
   631                         }
   632                     }
   633                 }
   634             } else {
   635 
   636                 for (k in value) {
   637                     if (Object.hasOwnProperty.call(value, k)) {
   638                         v = str(k, value);
   639                         if (v) {
   640                             partial.push(quote(k) + (gap ? ': ' : ':') + v);
   641                         }
   642                     }
   643                 }
   644             }
   645 
   646             v = partial.length === 0 ? '{}' :
   647                 gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
   648                         mind + '}' : '{' + partial.join(',') + '}';
   649             gap = mind;
   650             return v;
   651         }
   652     }
   653 
   654     return {
   655         stringify: function (value, replacer, space) {
   656 
   657             var i;
   658             gap = '';
   659             indent = '';
   660 
   661             if (typeof space === 'number') {
   662                 for (i = 0; i < space; i += 1) {
   663                     indent += ' ';
   664                 }
   665 
   666             } else if (typeof space === 'string') {
   667                 indent = space;
   668             }
   669 
   670             rep = replacer;
   671             if (replacer && typeof replacer !== 'function' &&
   672                     (typeof replacer !== 'object' ||
   673                      typeof replacer.length !== 'number')) {
   674                 throw new Error('JSON.stringify');
   675             }
   676 
   677             return str('', {'': value});
   678         },
   679 
   680 
   681         parse: function (text, reviver) {
   682             var j;
   683             function walk(holder, key) {
   684                 var k, v, value = holder[key];
   685                 if (value && typeof value === 'object') {
   686                     for (k in value) {
   687                         if (Object.hasOwnProperty.call(value, k)) {
   688                             v = walk(value, k);
   689                             if (v !== undefined) {
   690                                 value[k] = v;
   691                             } else {
   692                                 delete value[k];
   693                             }
   694                         }
   695                     }
   696                 }
   697                 return reviver.call(holder, key, value);
   698             }
   699 
   700             cx.lastIndex = 0;
   701             if (cx.test(text)) {
   702                 text = text.replace(cx, function (a) {
   703                     return '\\u' + ('0000' +
   704                             (+(a.charCodeAt(0))).toString(16)).slice(-4);
   705                 });
   706             }
   707 
   708 
   709             if (/^[\],:{}\s]*$/.
   710 test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
   711 replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
   712 replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
   713         
   714                 j = eval('(' + text + ')');
   715 
   716                 return typeof reviver === 'function' ?
   717                     walk({'': j}, '') : j;
   718             }
   719 
   720             throw new SyntaxError('JSON.parse');
   721         }
   722     };
   723 }();
   724 
   725 }
   726 
   727 /**
   728  * synchronizes thread modifications
   729  * @param {Function} fn
   730  */
   731 Envjs.sync = function(fn){};
   732 
   733 /**
   734  * sleep thread for specified duration
   735  * @param {Object} millseconds
   736  */
   737 Envjs.sleep = function(millseconds){};
   738 
   739 /**
   740  * Interval to wait on event loop when nothing is happening
   741  */
   742 Envjs.WAIT_INTERVAL = 20;//milliseconds
   743 
   744 /*
   745  * Copyright (c) 2010 Nick Galbreath
   746  * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
   747  *
   748  * Permission is hereby granted, free of charge, to any person
   749  * obtaining a copy of this software and associated documentation
   750  * files (the "Software"), to deal in the Software without
   751  * restriction, including without limitation the rights to use,
   752  * copy, modify, merge, publish, distribute, sublicense, and/or sell
   753  * copies of the Software, and to permit persons to whom the
   754  * Software is furnished to do so, subject to the following
   755  * conditions:
   756  *
   757  * The above copyright notice and this permission notice shall be
   758  * included in all copies or substantial portions of the Software.
   759  *
   760  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   761  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
   762  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
   763  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
   764  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
   765  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   766  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
   767  * OTHER DEALINGS IN THE SOFTWARE.
   768  */
   769 
   770 /*
   771  * url processing in the spirit of python's urlparse module
   772  * see `pydoc urlparse` or
   773  * http://docs.python.org/library/urlparse.html
   774  *
   775  *  urlsplit: break apart a URL into components
   776  *  urlunsplit:  reconsistute a URL from componets
   777  *  urljoin: join an absolute and another URL
   778  *  urldefrag: remove the fragment from a URL
   779  *
   780  * Take a look at the tests in urlparse-test.html
   781  *
   782  * On URL Normalization:
   783  *
   784  * urlsplit only does minor normalization the components Only scheme
   785  * and hostname are lowercased urljoin does a bit more, normalizing
   786  * paths with "."  and "..".
   787 
   788  * urlnormalize adds additional normalization
   789  *
   790  *   * removes default port numbers
   791  *     http://abc.com:80/ -> http://abc.com/, etc
   792  *   * normalizes path
   793  *     http://abc.com -> http://abc.com/
   794  *     and other "." and ".." cleanups
   795  *   * if file, remove query and fragment
   796  *
   797  * It does not do:
   798  *   * normalizes escaped hex values
   799  *     http://abc.com/%7efoo -> http://abc.com/%7Efoo
   800  *   * normalize '+' <--> '%20'
   801  *
   802  * Differences with Python
   803  *
   804  * The javascript urlsplit returns a normal object with the following
   805  * properties: scheme, netloc, hostname, port, path, query, fragment.
   806  * All properties are read-write.
   807  *
   808  * In python, the resulting object is not a dict, but a specialized,
   809  * read-only, and has alternative tuple interface (e.g. obj[0] ==
   810  * obj.scheme).  It's not clear why such a simple function requires
   811  * a unique datastructure.
   812  *
   813  * urlunsplit in javascript takes an duck-typed object,
   814  *  { scheme: 'http', netloc: 'abc.com', ...}
   815  *  while in  * python it takes a list-like object.
   816  *  ['http', 'abc.com'... ]
   817  *
   818  * For all functions, the javascript version use
   819  * hostname+port if netloc is missing.  In python
   820  * hostname+port were always ignored.
   821  *
   822  * Similar functionality in different languages:
   823  *
   824  *   http://php.net/manual/en/function.parse-url.php
   825  *   returns assocative array but cannot handle relative URL
   826  *
   827  * TODO: test allowfragments more
   828  * TODO: test netloc missing, but hostname present
   829  */
   830 
   831 var urlparse = {};
   832 
   833 // Unlike to be useful standalone
   834 //
   835 // NORMALIZE PATH with "../" and "./"
   836 //   http://en.wikipedia.org/wiki/URL_normalization
   837 //   http://tools.ietf.org/html/rfc3986#section-5.2.3
   838 //
   839 urlparse.normalizepath = function(path)
   840 {
   841     if (!path || path === '/') {
   842         return '/';
   843     }
   844 
   845     var parts = path.split('/');
   846 
   847     var newparts = [];
   848     // make sure path always starts with '/'
   849     if (parts[0]) {
   850         newparts.push('');
   851     }
   852 
   853     for (var i = 0; i < parts.length; ++i) {
   854         if (parts[i] === '..') {
   855             if (newparts.length > 1) {
   856                 newparts.pop();
   857             } else {
   858                 newparts.push(parts[i]);
   859             }
   860         } else if (parts[i] != '.') {
   861             newparts.push(parts[i]);
   862         }
   863     }
   864 
   865     path = newparts.join('/');
   866     if (!path) {
   867         path = '/';
   868     }
   869     return path;
   870 };
   871 
   872 //
   873 // Does many of the normalizations that the stock
   874 //  python urlsplit/urlunsplit/urljoin neglects
   875 //
   876 // Doesn't do hex-escape normalization on path or query
   877 //   %7e -> %7E
   878 // Nor, '+' <--> %20 translation
   879 //
   880 urlparse.urlnormalize = function(url)
   881 {
   882     var parts = urlparse.urlsplit(url);
   883     switch (parts.scheme) {
   884     case 'file':
   885         // files can't have query strings
   886         //  and we don't bother with fragments
   887         parts.query = '';
   888         parts.fragment = '';
   889         break;
   890     case 'http':
   891     case 'https':
   892         // remove default port
   893         if ((parts.scheme === 'http' && parts.port == 80) ||
   894             (parts.scheme === 'https' && parts.port == 443)) {
   895             parts.port = null;
   896             // hostname is already lower case
   897             parts.netloc = parts.hostname;
   898         }
   899         break;
   900     default:
   901         // if we don't have specific normalizations for this
   902         // scheme, return the original url unmolested
   903         return url;
   904     }
   905 
   906     // for [file|http|https].  Not sure about other schemes
   907     parts.path = urlparse.normalizepath(parts.path);
   908 
   909     return urlparse.urlunsplit(parts);
   910 };
   911 
   912 urlparse.urldefrag = function(url)
   913 {
   914     var idx = url.indexOf('#');
   915     if (idx == -1) {
   916         return [ url, '' ];
   917     } else {
   918         return [ url.substr(0,idx), url.substr(idx+1) ];
   919     }
   920 };
   921 
   922 urlparse.urlsplit = function(url, default_scheme, allow_fragments)
   923 {
   924     var leftover;
   925 
   926     if (typeof allow_fragments === 'undefined') {
   927         allow_fragments = true;
   928     }
   929 
   930     // scheme (optional), host, port
   931     var fullurl = /^([A-Za-z]+)?(:?\/\/)([0-9.\-A-Za-z]*)(?::(\d+))?(.*)$/;
   932     // path, query, fragment
   933     var parse_leftovers = /([^?#]*)?(?:\?([^#]*))?(?:#(.*))?$/;
   934 
   935     var o = {};
   936 
   937     var parts = url.match(fullurl);
   938     if (parts) {
   939         o.scheme = parts[1] || default_scheme || '';
   940         o.hostname = parts[3].toLowerCase() || '';
   941         o.port = parseInt(parts[4],10) || '';
   942         // Probably should grab the netloc from regexp
   943         //  and then parse again for hostname/port
   944 
   945         o.netloc = parts[3];
   946         if (parts[4]) {
   947             o.netloc += ':' + parts[4];
   948         }
   949 
   950         leftover = parts[5];
   951     } else {
   952         o.scheme = default_scheme || '';
   953         o.netloc = '';
   954         o.hostname = '';
   955         leftover = url;
   956     }
   957     o.scheme = o.scheme.toLowerCase();
   958 
   959     parts = leftover.match(parse_leftovers);
   960 
   961     o.path =  parts[1] || '';
   962     o.query = parts[2] || '';
   963 
   964     if (allow_fragments) {
   965         o.fragment = parts[3] || '';
   966     } else {
   967         o.fragment = '';
   968     }
   969 
   970     return o;
   971 };
   972 
   973 urlparse.urlunsplit = function(o) {
   974     var s = '';
   975     if (o.scheme) {
   976         s += o.scheme + '://';
   977     }
   978 
   979     if (o.netloc) {
   980         if (s == '') {
   981             s += '//';
   982         }
   983         s +=  o.netloc;
   984     } else if (o.hostname) {
   985         // extension.  Python only uses netloc
   986         if (s == '') {
   987             s += '//';
   988         }
   989         s += o.hostname;
   990         if (o.port) {
   991             s += ':' + o.port;
   992         }
   993     }
   994 
   995     if (o.path) {
   996         s += o.path;
   997     }
   998 
   999     if (o.query) {
  1000         s += '?' + o.query;
  1001     }
  1002     if (o.fragment) {
  1003         s += '#' + o.fragment;
  1004     }
  1005     return s;
  1006 };
  1007 
  1008 urlparse.urljoin = function(base, url, allow_fragments)
  1009 {
  1010     if (typeof allow_fragments === 'undefined') {
  1011         allow_fragments = true;
  1012     }
  1013 
  1014     var url_parts = urlparse.urlsplit(url);
  1015 
  1016     // if url parts has a scheme (i.e. absolute)
  1017     // then nothing to do
  1018     if (url_parts.scheme) {
  1019         if (! allow_fragments) {
  1020             return url;
  1021         } else {
  1022             return urlparse.urldefrag(url)[0];
  1023         }
  1024     }
  1025     var base_parts = urlparse.urlsplit(base);
  1026 
  1027     // copy base, only if not present
  1028     if (!base_parts.scheme) {
  1029         base_parts.scheme = url_parts.scheme;
  1030     }
  1031 
  1032     // copy netloc, only if not present
  1033     if (!base_parts.netloc || !base_parts.hostname) {
  1034         base_parts.netloc = url_parts.netloc;
  1035         base_parts.hostname = url_parts.hostname;
  1036         base_parts.port = url_parts.port;
  1037     }
  1038 
  1039     // paths
  1040     if (url_parts.path.length > 0) {
  1041         if (url_parts.path.charAt(0) == '/') {
  1042             base_parts.path = url_parts.path;
  1043         } else {
  1044             // relative path.. get rid of "current filename" and
  1045             //   replace.  Same as var parts =
  1046             //   base_parts.path.split('/'); parts[parts.length-1] =
  1047             //   url_parts.path; base_parts.path = parts.join('/');
  1048             var idx = base_parts.path.lastIndexOf('/');
  1049             if (idx == -1) {
  1050                 base_parts.path = url_parts.path;
  1051             } else {
  1052                 base_parts.path = base_parts.path.substr(0,idx) + '/' +
  1053                     url_parts.path;
  1054             }
  1055         }
  1056     }
  1057 
  1058     // clean up path
  1059     base_parts.path = urlparse.normalizepath(base_parts.path);
  1060 
  1061     // copy query string
  1062     base_parts.query = url_parts.query;
  1063 
  1064     // copy fragments
  1065     if (allow_fragments) {
  1066         base_parts.fragment = url_parts.fragment;
  1067     } else {
  1068         base_parts.fragment = '';
  1069     }
  1070 
  1071     return urlparse.urlunsplit(base_parts);
  1072 };
  1073 
  1074 /**
  1075  * getcwd - named after posix call of same name (see 'man 2 getcwd')
  1076  *
  1077  */
  1078 Envjs.getcwd = function() {
  1079     return '.';
  1080 };
  1081 
  1082 /**
  1083  * resolves location relative to doc location
  1084  *
  1085  * @param {Object} path  Relative or absolute URL
  1086  * @param {Object} base  (semi-optional)  The base url used in resolving "path" above
  1087  */
  1088 Envjs.uri = function(path, base) {
  1089     //console.log('constructing uri from path %s and base %s', path, base);
  1090 
  1091     // Semi-common trick is to make an iframe with src='javascript:false'
  1092     //  (or some equivalent).  By returning '', the load is skipped
  1093     if (path.indexOf('javascript') === 0) {
  1094         return '';
  1095     }
  1096 
  1097     // if path is absolute, then just normalize and return
  1098     if (path.match('^[a-zA-Z]+://')) {
  1099         return urlparse.urlnormalize(path);
  1100     }
  1101 
  1102     // interesting special case, a few very large websites use
  1103     // '//foo/bar/' to mean 'http://foo/bar'
  1104     if (path.match('^//')) {
  1105         path = 'http:' + path;
  1106     }
  1107 
  1108     // if base not passed in, try to get it from document
  1109     // Ideally I would like the caller to pass in document.baseURI to
  1110     //  make this more self-sufficient and testable
  1111     if (!base && document) {
  1112         base = document.baseURI;
  1113     }
  1114 
  1115     // about:blank doesn't count
  1116     if (base === 'about:blank'){
  1117         base = '';
  1118     }
  1119 
  1120     // if base is still empty, then we are in QA mode loading local
  1121     // files.  Get current working directory
  1122     if (!base) {
  1123         base = 'file://' +  Envjs.getcwd() + '/';
  1124     }
  1125     // handles all cases if path is abosulte or relative to base
  1126     // 3rd arg is "false" --> remove fragments
  1127     var newurl = urlparse.urlnormalize(urlparse.urljoin(base, path, false));
  1128 
  1129     return newurl;
  1130 };
  1131 
  1132 
  1133 
  1134 /**
  1135  * Used in the XMLHttpRquest implementation to run a
  1136  * request in a seperate thread
  1137  * @param {Object} fn
  1138  */
  1139 Envjs.runAsync = function(fn){};
  1140 
  1141 
  1142 /**
  1143  * Used to write to a local file
  1144  * @param {Object} text
  1145  * @param {Object} url
  1146  */
  1147 Envjs.writeToFile = function(text, url){};
  1148 
  1149 
  1150 /**
  1151  * Used to write to a local file
  1152  * @param {Object} text
  1153  * @param {Object} suffix
  1154  */
  1155 Envjs.writeToTempFile = function(text, suffix){};
  1156 
  1157 /**
  1158  * Used to read the contents of a local file
  1159  * @param {Object} url
  1160  */
  1161 Envjs.readFromFile = function(url){};
  1162 
  1163 /**
  1164  * Used to delete a local file
  1165  * @param {Object} url
  1166  */
  1167 Envjs.deleteFile = function(url){};
  1168 
  1169 /**
  1170  * establishes connection and calls responsehandler
  1171  * @param {Object} xhr
  1172  * @param {Object} responseHandler
  1173  * @param {Object} data
  1174  */
  1175 Envjs.connection = function(xhr, responseHandler, data){};
  1176 
  1177 
  1178 __extend__(Envjs, urlparse);
  1179 
  1180 /**
  1181  * Makes an object window-like by proxying object accessors
  1182  * @param {Object} scope
  1183  * @param {Object} parent
  1184  */
  1185 Envjs.proxy = function(scope, parent, aliasList){};
  1186 
  1187 Envjs.javaEnabled = false;
  1188 
  1189 Envjs.homedir        = '';
  1190 Envjs.tmpdir         = '';
  1191 Envjs.os_name        = '';
  1192 Envjs.os_arch        = '';
  1193 Envjs.os_version     = '';
  1194 Envjs.lang           = '';
  1195 Envjs.platform       = '';
  1196 
  1197 /**
  1198  *
  1199  * @param {Object} frameElement
  1200  * @param {Object} url
  1201  */
  1202 Envjs.loadFrame = function(frame, url){
  1203     try {
  1204         if(frame.contentWindow){
  1205             //mark for garbage collection
  1206             frame.contentWindow = null;
  1207         }
  1208 
  1209         //create a new scope for the window proxy
  1210         //platforms will need to override this function
  1211         //to make sure the scope is global-like
  1212         frame.contentWindow = (function(){return this;})();
  1213         new Window(frame.contentWindow, window);
  1214 
  1215         //I dont think frames load asynchronously in firefox
  1216         //and I think the tests have verified this but for
  1217         //some reason I'm less than confident... Are there cases?
  1218         frame.contentDocument = frame.contentWindow.document;
  1219         frame.contentDocument.async = false;
  1220         if(url){
  1221             //console.log('envjs.loadFrame async %s', frame.contentDocument.async);
  1222             frame.contentWindow.location = url;
  1223         }
  1224     } catch(e) {
  1225         console.log("failed to load frame content: from %s %s", url, e);
  1226     }
  1227 };
  1228 
  1229 
  1230 // The following are in rhino/window.js
  1231 // TODO: Envjs.unloadFrame
  1232 // TODO: Envjs.proxy
  1233 
  1234 /**
  1235  * @author john resig & the envjs team
  1236  * @uri http://www.envjs.com/
  1237  * @copyright 2008-2010
  1238  * @license MIT
  1239  */
  1240 //CLOSURE_END
  1241 }());
  1242 /*
  1243  * Envjs rhino-env.1.2.13
  1244  * Pure JavaScript Browser Environment
  1245  * By John Resig <http://ejohn.org/> and the Envjs Team
  1246  * Copyright 2008-2010 John Resig, under the MIT License
  1247  */
  1248 
  1249 var __context__ = Packages.jdk.nashorn.internal.runtime.Context.getContext();
  1250 
  1251 Envjs.platform       = "Nashorn";
  1252 Envjs.revision       = "0.1";
  1253 
  1254 /*
  1255  * Envjs rhino-env.1.2.13 
  1256  * Pure JavaScript Browser Environment
  1257  * By John Resig <http://ejohn.org/> and the Envjs Team
  1258  * Copyright 2008-2010 John Resig, under the MIT License
  1259  */
  1260 
  1261 //CLOSURE_START
  1262 (function(){
  1263 
  1264 
  1265 
  1266 
  1267 
  1268 /**
  1269  * @author john resig
  1270  */
  1271 // Helper method for extending one object with another.
  1272 function __extend__(a,b) {
  1273     for ( var i in b ) {
  1274         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
  1275         if ( g || s ) {
  1276             if ( g ) { a.__defineGetter__(i, g); }
  1277             if ( s ) { a.__defineSetter__(i, s); }
  1278         } else {
  1279             a[i] = b[i];
  1280         }
  1281     } return a;
  1282 }
  1283 
  1284 /**
  1285  * Writes message to system out.
  1286  *
  1287  * Some sites redefine 'print' as in 'window.print', so instead of
  1288  * printing to stdout, you are popping open a new window, which might
  1289  * call print, etc, etc,etc This can cause infinite loops and can
  1290  * exhausing all memory.
  1291  *
  1292  * By defining this upfront now, Envjs.log will always call the native 'print'
  1293  * function
  1294  *
  1295  * @param {Object} message
  1296  */
  1297 Envjs.log = print;
  1298 
  1299 Envjs.lineSource = function(e){
  1300     return e&&e.rhinoException?e.rhinoException.lineSource():"(line ?)";
  1301 };
  1302 /**
  1303  * load and execute script tag text content
  1304  * @param {Object} script
  1305  */
  1306 Envjs.loadInlineScript = function(script){
  1307     if(script.ownerDocument.ownerWindow){
  1308         Envjs.eval(
  1309             script.ownerDocument.ownerWindow,
  1310             script.text,
  1311             'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
  1312         );
  1313     }else{
  1314         Envjs.eval(
  1315             __this__,
  1316             script.text,
  1317             'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
  1318         );
  1319     }
  1320     //console.log('evaluated at scope %s \n%s',
  1321     //    script.ownerDocument.ownerWindow.guid, script.text);
  1322 };
  1323 
  1324 
  1325 Envjs.eval = function(context, source, name){
  1326     __context__.eval(context, source, null, name, false);
  1327 };
  1328 
  1329 
  1330 /**
  1331  * Rhino provides a very succinct 'sync'
  1332  * @param {Function} fn
  1333  */
  1334 Envjs.sync = function(fn){
  1335     //console.log('Threadless platform, sync is safe');
  1336     return fn;
  1337 };
  1338 Envjs.spawn = function(fn){
  1339     //console.log('Threadless platform, spawn shares main thread.');
  1340     return fn();
  1341 };
  1342 
  1343 /**
  1344  * sleep thread for specified duration
  1345  * @param {Object} millseconds
  1346  */
  1347 Envjs.sleep = function(millseconds){
  1348     try{
  1349         java.lang.Thread.sleep(millseconds);
  1350     }catch(e){
  1351         console.log('Threadless platform, cannot sleep.');
  1352     }
  1353 };
  1354 
  1355 /**
  1356  * provides callback hook for when the system exits
  1357  */
  1358 Envjs.onExit = function(callback){
  1359     // TODO add exit listener
  1360 };
  1361 
  1362 /**
  1363  * Get 'Current Working Directory'
  1364  */
  1365 Envjs.getcwd = function() {
  1366     return java.lang.System.getProperty('user.dir');
  1367 }
  1368 
  1369 /**
  1370  *
  1371  * @param {Object} fn
  1372  * @param {Object} onInterupt
  1373  */
  1374 Envjs.runAsync = function(fn, onInterupt){
  1375     ////Envjs.debug("running async");
  1376     var running = true,
  1377         run;
  1378 
  1379     try{
  1380         run = Envjs.sync(function(){
  1381             fn();
  1382             Envjs.wait();
  1383         });
  1384         Envjs.spawn(run);
  1385     }catch(e){
  1386         console.log("error while running async operation", e);
  1387         try{if(onInterrupt)onInterrupt(e)}catch(ee){};
  1388     }
  1389 };
  1390 
  1391 /**
  1392  * Used to write to a local file
  1393  * @param {Object} text
  1394  * @param {Object} url
  1395  */
  1396 Envjs.writeToFile = function(text, url){
  1397     //Envjs.debug("writing text to url : " + url);
  1398     var out = new java.io.FileWriter(
  1399         new java.io.File(
  1400             new java.net.URI(url.toString())));
  1401     out.write( text, 0, text.length );
  1402     out.flush();
  1403     out.close();
  1404 };
  1405 
  1406 /**
  1407  * Used to write to a local file
  1408  * @param {Object} text
  1409  * @param {Object} suffix
  1410  */
  1411 Envjs.writeToTempFile = function(text, suffix){
  1412     //Envjs.debug("writing text to temp url : " + suffix);
  1413     // Create temp file.
  1414     var temp = java.io.File.createTempFile("envjs-tmp", suffix);
  1415 
  1416     // Delete temp file when program exits.
  1417     temp.deleteOnExit();
  1418 
  1419     // Write to temp file
  1420     var out = new java.io.FileWriter(temp);
  1421     out.write(text, 0, text.length);
  1422     out.close();
  1423     return temp.getAbsolutePath().toString()+'';
  1424 };
  1425 
  1426 
  1427 /**
  1428  * Used to read the contents of a local file
  1429  * @param {Object} url
  1430  */
  1431 Envjs.readFromFile = function( url ){
  1432     var fileReader = new java.io.FileReader(
  1433         new java.io.File( 
  1434             new java.net.URI( url )));
  1435             
  1436     var stringwriter = new java.io.StringWriter(),
  1437         buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024),
  1438         length;
  1439 
  1440     while ((length = fileReader.read(buffer, 0, 1024)) != -1) {
  1441         stringwriter.write(buffer, 0, length);
  1442     }
  1443 
  1444     stringwriter.close();
  1445     return stringwriter.toString()+"";
  1446 };
  1447     
  1448 
  1449 /**
  1450  * Used to delete a local file
  1451  * @param {Object} url
  1452  */
  1453 Envjs.deleteFile = function(url){
  1454     var file = new java.io.File( new java.net.URI( url ) );
  1455     file["delete"]();
  1456 };
  1457 
  1458 /**
  1459  * establishes connection and calls responsehandler
  1460  * @param {Object} xhr
  1461  * @param {Object} responseHandler
  1462  * @param {Object} data
  1463  */
  1464 Envjs.connection = function(xhr, responseHandler, data){
  1465     var url = new java.net.URL(xhr.url),
  1466         connection,
  1467         header,
  1468         outstream,
  1469         buffer,
  1470         length,
  1471         binary = false,
  1472         name, value,
  1473         contentEncoding,
  1474         instream,
  1475         responseXML,
  1476         i;
  1477     if ( /^file\:/.test(url) ) {
  1478         try{
  1479             if ( "PUT" == xhr.method || "POST" == xhr.method ) {
  1480                 data =  data || "" ;
  1481                 Envjs.writeToFile(data, url);
  1482                 xhr.readyState = 4;
  1483                 //could be improved, I just cant recall the correct http codes
  1484                 xhr.status = 200;
  1485                 xhr.statusText = "";
  1486             } else if ( xhr.method == "DELETE" ) {
  1487                 Envjs.deleteFile(url);
  1488                 xhr.readyState = 4;
  1489                 //could be improved, I just cant recall the correct http codes
  1490                 xhr.status = 200;
  1491                 xhr.statusText = "";
  1492             } else {
  1493                 connection = url.openConnection();
  1494                 connection.connect();
  1495                 //try to add some canned headers that make sense
  1496 
  1497                 try{
  1498                     if(xhr.url.match(/html$/)){
  1499                         xhr.responseHeaders["Content-Type"] = 'text/html';
  1500                     }else if(xhr.url.match(/.xml$/)){
  1501                         xhr.responseHeaders["Content-Type"] = 'text/xml';
  1502                     }else if(xhr.url.match(/.js$/)){
  1503                         xhr.responseHeaders["Content-Type"] = 'text/javascript';
  1504                     }else if(xhr.url.match(/.json$/)){
  1505                         xhr.responseHeaders["Content-Type"] = 'application/json';
  1506                     }else{
  1507                         xhr.responseHeaders["Content-Type"] = 'text/plain';
  1508                     }
  1509                     //xhr.responseHeaders['Last-Modified'] = connection.getLastModified();
  1510                     //xhr.responseHeaders['Content-Length'] = headerValue+'';
  1511                     //xhr.responseHeaders['Date'] = new Date()+'';*/
  1512                 }catch(e){
  1513                     console.log('failed to load response headers',e);
  1514                 }
  1515             }
  1516         }catch(e){
  1517             console.log('failed to open file %s %s', url, e);
  1518             connection = null;
  1519             xhr.readyState = 4;
  1520             xhr.statusText = "Local File Protocol Error";
  1521             xhr.responseText = "<html><head/><body><p>"+ e+ "</p></body></html>";
  1522         }
  1523     } else {
  1524         connection = url.openConnection();
  1525         connection.setRequestMethod( xhr.method );
  1526 
  1527         // Add headers to Java connection
  1528         for (header in xhr.headers){
  1529             connection.addRequestProperty(header+'', xhr.headers[header]+'');
  1530         }
  1531 
  1532         //write data to output stream if required
  1533         if(data){
  1534             if(data instanceof Document){
  1535                 if ( xhr.method == "PUT" || xhr.method == "POST" ) {
  1536                     connection.setDoOutput(true);
  1537                     outstream = connection.getOutputStream(),
  1538                     xml = (new XMLSerializer()).serializeToString(data);
  1539                     buffer = new java.lang.String(xml).getBytes('UTF-8');
  1540                     outstream.write(buffer, 0, buffer.length);
  1541                     outstream.close();
  1542                 }
  1543             }else if(data.length&&data.length>0){
  1544                 if ( xhr.method == "PUT" || xhr.method == "POST" ) {
  1545                     connection.setDoOutput(true);
  1546                     outstream = connection.getOutputStream();
  1547                     buffer = new java.lang.String(data).getBytes('UTF-8');
  1548                     outstream.write(buffer, 0, buffer.length);
  1549                     outstream.close();
  1550                 }
  1551             }
  1552             connection.connect();
  1553         }else{
  1554             connection.connect();
  1555         }
  1556     }
  1557 
  1558     if(connection){
  1559         try{
  1560             length = connection.getHeaderFields().size();
  1561             // Stick the response headers into responseHeaders
  1562             for (i = 0; i < length; i++) {
  1563                 name = connection.getHeaderFieldKey(i);
  1564                 value = connection.getHeaderField(i);
  1565                 if (name)
  1566                     xhr.responseHeaders[name+''] = value+'';
  1567             }
  1568         }catch(e){
  1569             console.log('failed to load response headers \n%s',e);
  1570         }
  1571 
  1572         xhr.readyState = 4;
  1573         xhr.status = parseInt(connection.responseCode,10) || undefined;
  1574         xhr.statusText = connection.responseMessage || "";
  1575 
  1576         contentEncoding = connection.getContentEncoding() || "utf-8";
  1577         instream = null;
  1578         responseXML = null;
  1579         
  1580         try{
  1581             //console.log('contentEncoding %s', contentEncoding);
  1582             if( contentEncoding.equalsIgnoreCase("gzip") ||
  1583                 contentEncoding.equalsIgnoreCase("decompress")){
  1584                 //zipped content
  1585                 binary = true;
  1586                 outstream = new java.io.ByteArrayOutputStream();
  1587                 buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
  1588                 instream = new java.util.zip.GZIPInputStream(connection.getInputStream())
  1589             }else{
  1590                 //this is a text file
  1591                 outstream = new java.io.StringWriter();
  1592                 buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024);
  1593                 instream = new java.io.InputStreamReader(connection.getInputStream());
  1594             }
  1595         }catch(e){
  1596             if (connection.getResponseCode() == 404){
  1597                 console.log('failed to open connection stream \n %s %s',
  1598                             e.toString(), e);
  1599             }else{
  1600                 console.log('failed to open connection stream \n %s %s',
  1601                             e.toString(), e);
  1602             }
  1603             instream = connection.getErrorStream();
  1604         }
  1605 
  1606         while ((length = instream.read(buffer, 0, 1024)) != -1) {
  1607             outstream.write(buffer, 0, length);
  1608         }
  1609 
  1610         outstream.close();
  1611         instream.close();
  1612         
  1613         if(binary){
  1614             xhr.responseText = new String(outstream.toByteArray(), 'UTF-8')+'';
  1615         }else{
  1616             xhr.responseText = outstream.toString()+'';
  1617         }
  1618 
  1619     }
  1620     if(responseHandler){
  1621         //Envjs.debug('calling ajax response handler');
  1622         responseHandler();
  1623     }
  1624 };
  1625 
  1626 //Since we're running in rhino I guess we can safely assume
  1627 //java is 'enabled'.  I'm sure this requires more thought
  1628 //than I've given it here
  1629 Envjs.javaEnabled = true;
  1630 
  1631 Envjs.homedir        = java.lang.System.getProperty("user.home");
  1632 Envjs.tmpdir         = java.lang.System.getProperty("java.io.tmpdir");
  1633 Envjs.os_name        = java.lang.System.getProperty("os.name");
  1634 Envjs.os_arch        = java.lang.System.getProperty("os.arch");
  1635 Envjs.os_version     = java.lang.System.getProperty("os.version");
  1636 Envjs.lang           = java.lang.System.getProperty("user.lang");
  1637 
  1638 
  1639 /**
  1640  *
  1641  * @param {Object} frameElement
  1642  * @param {Object} url
  1643  */
  1644 Envjs.loadFrame = function(frame, url){
  1645     try {
  1646         if(frame.contentWindow){
  1647             //mark for garbage collection
  1648             frame.contentWindow = null;
  1649         }
  1650 
  1651         //create a new scope for the window proxy
  1652         frame.contentWindow = Envjs.proxy();
  1653         new Window(frame.contentWindow, window);
  1654 
  1655         //I dont think frames load asynchronously in firefox
  1656         //and I think the tests have verified this but for
  1657         //some reason I'm less than confident... Are there cases?
  1658         frame.contentDocument = frame.contentWindow.document;
  1659         frame.contentDocument.async = false;
  1660         if(url){
  1661             //console.log('envjs.loadFrame async %s', frame.contentDocument.async);
  1662             frame.contentWindow.location = url;
  1663         }
  1664     } catch(e) {
  1665         console.log("failed to load frame content: from %s %s", url, e);
  1666     }
  1667 };
  1668 
  1669 /**
  1670  * unloadFrame
  1671  * @param {Object} frame
  1672  */
  1673 Envjs.unloadFrame = function(frame){
  1674     var all, length, i;
  1675     try{
  1676         //TODO: probably self-referencing structures within a document tree
  1677         //preventing it from being entirely garbage collected once orphaned.
  1678         //Should have code to walk tree and break all links between contained
  1679         //objects.
  1680         frame.contentDocument = null;
  1681         if(frame.contentWindow){
  1682             frame.contentWindow.close();
  1683         }
  1684         gc();
  1685     }catch(e){
  1686         console.log(e);
  1687     }
  1688 };
  1689 
  1690 /**
  1691  * Makes an object window-like by proxying object accessors
  1692  * @param {Object} scope
  1693  * @param {Object} parent
  1694  */
  1695 Envjs.proxy = function(scope, parent) {
  1696     try{
  1697         if(scope+'' == '[object global]'){
  1698             return scope
  1699         }else{
  1700             return __context__.createGlobal();
  1701         }
  1702     }catch(e){
  1703         console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
  1704     }
  1705 
  1706 };
  1707 
  1708 /**
  1709  * @author john resig & the envjs team
  1710  * @uri http://www.envjs.com/
  1711  * @copyright 2008-2010
  1712  * @license MIT
  1713  */
  1714 //CLOSURE_END
  1715 }());
  1716 
  1717 /**
  1718  * @author envjs team
  1719  */
  1720 var Console,
  1721     console;
  1722 
  1723 /*
  1724  * Envjs console.1.2.13 
  1725  * Pure JavaScript Browser Environment
  1726  * By John Resig <http://ejohn.org/> and the Envjs Team
  1727  * Copyright 2008-2010 John Resig, under the MIT License
  1728  */
  1729 
  1730 //CLOSURE_START
  1731 (function(){
  1732 
  1733 
  1734 
  1735 
  1736 
  1737 /**
  1738  * @author envjs team
  1739  * borrowed 99%-ish with love from firebug-lite
  1740  *
  1741  * http://wiki.commonjs.org/wiki/Console
  1742  */
  1743 Console = function(module){
  1744     var $level,
  1745     $logger,
  1746     $null = function(){};
  1747 
  1748 
  1749     if(Envjs[module] && Envjs[module].loglevel){
  1750         $level = Envjs.module.loglevel;
  1751         $logger = {
  1752             log: function(level){
  1753                 logFormatted(arguments, (module)+" ");
  1754             },
  1755             debug: $level>1 ? $null: function() {
  1756                 logFormatted(arguments, (module)+" debug");
  1757             },
  1758             info: $level>2 ? $null:function(){
  1759                 logFormatted(arguments, (module)+" info");
  1760             },
  1761             warn: $level>3 ? $null:function(){
  1762                 logFormatted(arguments, (module)+" warning");
  1763             },
  1764             error: $level>4 ? $null:function(){
  1765                 logFormatted(arguments, (module)+" error");
  1766             }
  1767         };
  1768     } else {
  1769         $logger = {
  1770             log: function(level){
  1771                 logFormatted(arguments, "");
  1772             },
  1773             debug: $null,
  1774             info: $null,
  1775             warn: $null,
  1776             error: $null
  1777         };
  1778     }
  1779 
  1780     return $logger;
  1781 };
  1782 
  1783 console = new Console("console",1);
  1784 
  1785 function logFormatted(objects, className)
  1786 {
  1787     var html = [];
  1788 
  1789     var format = objects[0];
  1790     var objIndex = 0;
  1791 
  1792     if (typeof(format) != "string")
  1793     {
  1794         format = "";
  1795         objIndex = -1;
  1796     }
  1797 
  1798     var parts = parseFormat(format);
  1799     for (var i = 0; i < parts.length; ++i)
  1800     {
  1801         var part = parts[i];
  1802         if (part && typeof(part) == "object")
  1803         {
  1804             var object = objects[++objIndex];
  1805             part.appender(object, html);
  1806         }
  1807         else {
  1808             appendText(part, html);
  1809 	}
  1810     }
  1811 
  1812     for (var i = objIndex+1; i < objects.length; ++i)
  1813     {
  1814         appendText(" ", html);
  1815 
  1816         var object = objects[i];
  1817         if (typeof(object) == "string") {
  1818             appendText(object, html);
  1819         } else {
  1820             appendObject(object, html);
  1821 	}
  1822     }
  1823 
  1824     Envjs.log(html.join(' '));
  1825 }
  1826 
  1827 function parseFormat(format)
  1828 {
  1829     var parts = [];
  1830 
  1831     var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
  1832     var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
  1833 
  1834     for (var m = reg.exec(format); m; m = reg.exec(format))
  1835     {
  1836         var type = m[8] ? m[8] : m[5];
  1837         var appender = type in appenderMap ? appenderMap[type] : appendObject;
  1838         var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
  1839 
  1840         parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
  1841         parts.push({appender: appender, precision: precision});
  1842 
  1843         format = format.substr(m.index+m[0].length);
  1844     }
  1845 
  1846     parts.push(format);
  1847 
  1848     return parts;
  1849 }
  1850 
  1851 function escapeHTML(value)
  1852 {
  1853     return value;
  1854 }
  1855 
  1856 function objectToString(object)
  1857 {
  1858     try
  1859     {
  1860         return object+"";
  1861     }
  1862     catch (exc)
  1863     {
  1864         return null;
  1865     }
  1866 }
  1867 
  1868 // ********************************************************************************************
  1869 
  1870 function appendText(object, html)
  1871 {
  1872     html.push(escapeHTML(objectToString(object)));
  1873 }
  1874 
  1875 function appendNull(object, html)
  1876 {
  1877     html.push(escapeHTML(objectToString(object)));
  1878 }
  1879 
  1880 function appendString(object, html)
  1881 {
  1882     html.push(escapeHTML(objectToString(object)));
  1883 }
  1884 
  1885 function appendInteger(object, html)
  1886 {
  1887     html.push(escapeHTML(objectToString(object)));
  1888 }
  1889 
  1890 function appendFloat(object, html)
  1891 {
  1892     html.push(escapeHTML(objectToString(object)));
  1893 }
  1894 
  1895 function appendFunction(object, html)
  1896 {
  1897     var reName = /function ?(.*?)\(/;
  1898     var m = reName.exec(objectToString(object));
  1899     var name = m ? m[1] : "function";
  1900     html.push(escapeHTML(name));
  1901 }
  1902 
  1903 function appendObject(object, html)
  1904 {
  1905     try
  1906     {
  1907         if (object == undefined) {
  1908             appendNull("undefined", html);
  1909         } else if (object == null) {
  1910             appendNull("null", html);
  1911         } else if (typeof object == "string") {
  1912             appendString(object, html);
  1913 	} else if (typeof object == "number") {
  1914             appendInteger(object, html);
  1915 	} else if (typeof object == "function") {
  1916             appendFunction(object, html);
  1917         } else if (object.nodeType == 1) {
  1918             appendSelector(object, html);
  1919         } else if (typeof object == "object") {
  1920             appendObjectFormatted(object, html);
  1921         } else {
  1922             appendText(object, html);
  1923 	}
  1924     }
  1925     catch (exc)
  1926     {
  1927     }
  1928 }
  1929 
  1930 function appendObjectFormatted(object, html)
  1931 {
  1932     var text = objectToString(object);
  1933     var reObject = /\[object (.*?)\]/;
  1934 
  1935     var m = reObject.exec(text);
  1936     html.push( m ? m[1] : text);
  1937 }
  1938 
  1939 function appendSelector(object, html)
  1940 {
  1941 
  1942     html.push(escapeHTML(object.nodeName.toLowerCase()));
  1943     if (object.id) {
  1944         html.push(escapeHTML(object.id));
  1945     }
  1946     if (object.className) {
  1947         html.push(escapeHTML(object.className));
  1948     }
  1949 }
  1950 
  1951 function appendNode(node, html)
  1952 {
  1953     if (node.nodeType == 1)
  1954     {
  1955         html.push( node.nodeName.toLowerCase());
  1956 
  1957         for (var i = 0; i < node.attributes.length; ++i)
  1958         {
  1959             var attr = node.attributes[i];
  1960             if (!attr.specified) {
  1961                 continue;
  1962 	    }
  1963 
  1964             html.push( attr.nodeName.toLowerCase(),escapeHTML(attr.nodeValue));
  1965         }
  1966 
  1967         if (node.firstChild)
  1968         {
  1969             for (var child = node.firstChild; child; child = child.nextSibling) {
  1970                 appendNode(child, html);
  1971 	    }
  1972 
  1973             html.push( node.nodeName.toLowerCase());
  1974         }
  1975     }
  1976     else if (node.nodeType === 3)
  1977     {
  1978         html.push(escapeHTML(node.nodeValue));
  1979     }
  1980 };
  1981 
  1982 /**
  1983  * @author john resig & the envjs team
  1984  * @uri http://www.envjs.com/
  1985  * @copyright 2008-2010
  1986  * @license MIT
  1987  */
  1988 //CLOSURE_END
  1989 }());
  1990 /*
  1991  * Envjs dom.1.2.13 
  1992  * Pure JavaScript Browser Environment
  1993  * By John Resig <http://ejohn.org/> and the Envjs Team
  1994  * Copyright 2008-2010 John Resig, under the MIT License
  1995  * 
  1996  * Parts of the implementation were originally written by:\
  1997  * and Jon van Noort   (jon@webarcana.com.au) \
  1998  * and David Joham     (djoham@yahoo.com)",\ 
  1999  * and Scott Severtson
  2000  * 
  2001  * This file simply provides the global definitions we need to \
  2002  * be able to correctly implement to core browser DOM interfaces."
  2003  */
  2004 
  2005 var Attr,
  2006     CDATASection,
  2007     CharacterData,
  2008     Comment,
  2009     Document,
  2010     DocumentFragment,
  2011     DocumentType,
  2012     DOMException,
  2013     DOMImplementation,
  2014     Element,
  2015     Entity,
  2016     EntityReference,
  2017     NamedNodeMap,
  2018     Namespace,
  2019     Node,
  2020     NodeList,
  2021     Notation,
  2022     ProcessingInstruction,
  2023     Text,
  2024     Range,
  2025     XMLSerializer,
  2026     DOMParser;
  2027 
  2028 
  2029 
  2030 /*
  2031  * Envjs dom.1.2.13 
  2032  * Pure JavaScript Browser Environment
  2033  * By John Resig <http://ejohn.org/> and the Envjs Team
  2034  * Copyright 2008-2010 John Resig, under the MIT License
  2035  */
  2036 
  2037 //CLOSURE_START
  2038 (function(){
  2039 
  2040 
  2041 
  2042 
  2043 
  2044 /**
  2045  * @author john resig
  2046  */
  2047 // Helper method for extending one object with another.
  2048 function __extend__(a,b) {
  2049     for ( var i in b ) {
  2050         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
  2051         if ( g || s ) {
  2052             if ( g ) { a.__defineGetter__(i, g); }
  2053             if ( s ) { a.__defineSetter__(i, s); }
  2054         } else {
  2055             a[i] = b[i];
  2056         }
  2057     } return a;
  2058 }
  2059 
  2060 /**
  2061  * @author john resig
  2062  */
  2063 //from jQuery
  2064 function __setArray__( target, array ) {
  2065     // Resetting the length to 0, then using the native Array push
  2066     // is a super-fast way to populate an object with array-like properties
  2067     target.length = 0;
  2068     Array.prototype.push.apply( target, array );
  2069 }
  2070 
  2071 /**
  2072  * @class  NodeList -
  2073  *      provides the abstraction of an ordered collection of nodes
  2074  *
  2075  * @param  ownerDocument : Document - the ownerDocument
  2076  * @param  parentNode    : Node - the node that the NodeList is attached to (or null)
  2077  */
  2078 NodeList = function(ownerDocument, parentNode) {
  2079     this.length = 0;
  2080     this.parentNode = parentNode;
  2081     this.ownerDocument = ownerDocument;
  2082     this._readonly = false;
  2083     __setArray__(this, []);
  2084 };
  2085 
  2086 __extend__(NodeList.prototype, {
  2087     item : function(index) {
  2088         var ret = null;
  2089         if ((index >= 0) && (index < this.length)) {
  2090             // bounds check
  2091             ret = this[index];
  2092         }
  2093         // if the index is out of bounds, default value null is returned
  2094         return ret;
  2095     },
  2096     get xml() {
  2097         var ret = "",
  2098             i;
  2099 
  2100         // create string containing the concatenation of the string values of each child
  2101         for (i=0; i < this.length; i++) {
  2102             if(this[i]){
  2103                 if(this[i].nodeType == Node.TEXT_NODE && i>0 &&
  2104                    this[i-1].nodeType == Node.TEXT_NODE){
  2105                     //add a single space between adjacent text nodes
  2106                     ret += " "+this[i].xml;
  2107                 }else{
  2108                     ret += this[i].xml;
  2109                 }
  2110             }
  2111         }
  2112         return ret;
  2113     },
  2114     toArray: function () {
  2115         var children = [],
  2116             i;
  2117         for ( i=0; i < this.length; i++) {
  2118             children.push (this[i]);
  2119         }
  2120         return children;
  2121     },
  2122     toString: function(){
  2123         return "[object NodeList]";
  2124     }
  2125 });
  2126 
  2127 
  2128 /**
  2129  * @method __findItemIndex__
  2130  *      find the item index of the node
  2131  * @author Jon van Noort (jon@webarcana.com.au)
  2132  * @param  node : Node
  2133  * @return : int
  2134  */
  2135 var __findItemIndex__ = function (nodelist, node) {
  2136     var ret = -1, i;
  2137     for (i=0; i<nodelist.length; i++) {
  2138         // compare id to each node's _id
  2139         if (nodelist[i] === node) {
  2140             // found it!
  2141             ret = i;
  2142             break;
  2143         }
  2144     }
  2145     // if node is not found, default value -1 is returned
  2146     return ret;
  2147 };
  2148 
  2149 /**
  2150  * @method __insertBefore__
  2151  *      insert the specified Node into the NodeList before the specified index
  2152  *      Used by Node.insertBefore(). Note: Node.insertBefore() is responsible
  2153  *      for Node Pointer surgery __insertBefore__ simply modifies the internal
  2154  *      data structure (Array).
  2155  * @param  newChild      : Node - the Node to be inserted
  2156  * @param  refChildIndex : int     - the array index to insert the Node before
  2157  */
  2158 var __insertBefore__ = function(nodelist, newChild, refChildIndex) {
  2159     if ((refChildIndex >= 0) && (refChildIndex <= nodelist.length)) {
  2160         // bounds check
  2161         if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2162             // node is a DocumentFragment
  2163             // append the children of DocumentFragment
  2164             Array.prototype.splice.apply(nodelist,
  2165                 [refChildIndex, 0].concat(newChild.childNodes.toArray()));
  2166         }
  2167         else {
  2168             // append the newChild
  2169             Array.prototype.splice.apply(nodelist,[refChildIndex, 0, newChild]);
  2170         }
  2171     }
  2172 };
  2173 
  2174 /**
  2175  * @method __replaceChild__
  2176  *      replace the specified Node in the NodeList at the specified index
  2177  *      Used by Node.replaceChild(). Note: Node.replaceChild() is responsible
  2178  *      for Node Pointer surgery __replaceChild__ simply modifies the internal
  2179  *      data structure (Array).
  2180  *
  2181  * @param  newChild      : Node - the Node to be inserted
  2182  * @param  refChildIndex : int     - the array index to hold the Node
  2183  */
  2184 var __replaceChild__ = function(nodelist, newChild, refChildIndex) {
  2185     var ret = null;
  2186 
  2187     // bounds check
  2188     if ((refChildIndex >= 0) && (refChildIndex < nodelist.length)) {
  2189         // preserve old child for return
  2190         ret = nodelist[refChildIndex];
  2191 
  2192         if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2193             // node is a DocumentFragment
  2194             // get array containing children prior to refChild
  2195             Array.prototype.splice.apply(nodelist,
  2196                 [refChildIndex, 1].concat(newChild.childNodes.toArray()));
  2197         }
  2198         else {
  2199             // simply replace node in array (links between Nodes are
  2200             // made at higher level)
  2201             nodelist[refChildIndex] = newChild;
  2202         }
  2203     }
  2204     // return replaced node
  2205     return ret;
  2206 };
  2207 
  2208 /**
  2209  * @method __removeChild__
  2210  *      remove the specified Node in the NodeList at the specified index
  2211  *      Used by Node.removeChild(). Note: Node.removeChild() is responsible
  2212  *      for Node Pointer surgery __removeChild__ simply modifies the internal
  2213  *      data structure (Array).
  2214  * @param  refChildIndex : int - the array index holding the Node to be removed
  2215  */
  2216 var __removeChild__ = function(nodelist, refChildIndex) {
  2217     var ret = null;
  2218 
  2219     if (refChildIndex > -1) {
  2220         // found it!
  2221         // return removed node
  2222         ret = nodelist[refChildIndex];
  2223 
  2224         // rebuild array without removed child
  2225         Array.prototype.splice.apply(nodelist,[refChildIndex, 1]);
  2226     }
  2227     // return removed node
  2228     return ret;
  2229 };
  2230 
  2231 /**
  2232  * @method __appendChild__
  2233  *      append the specified Node to the NodeList. Used by Node.appendChild().
  2234  *      Note: Node.appendChild() is responsible for Node Pointer surgery
  2235  *      __appendChild__ simply modifies the internal data structure (Array).
  2236  * @param  newChild      : Node - the Node to be inserted
  2237  */
  2238 var __appendChild__ = function(nodelist, newChild) {
  2239     if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2240         // node is a DocumentFragment
  2241         // append the children of DocumentFragment
  2242         Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
  2243     } else {
  2244         // simply add node to array (links between Nodes are made at higher level)
  2245         Array.prototype.push.apply(nodelist, [newChild]);
  2246     }
  2247 
  2248 };
  2249 
  2250 /**
  2251  * @method __cloneNodes__ -
  2252  *      Returns a NodeList containing clones of the Nodes in this NodeList
  2253  * @param  deep : boolean -
  2254  *      If true, recursively clone the subtree under each of the nodes;
  2255  *      if false, clone only the nodes themselves (and their attributes,
  2256  *      if it is an Element).
  2257  * @param  parentNode : Node - the new parent of the cloned NodeList
  2258  * @return : NodeList - NodeList containing clones of the Nodes in this NodeList
  2259  */
  2260 var __cloneNodes__ = function(nodelist, deep, parentNode) {
  2261     var cloneNodeList = new NodeList(nodelist.ownerDocument, parentNode);
  2262 
  2263     // create list containing clones of each child
  2264     for (var i=0; i < nodelist.length; i++) {
  2265         __appendChild__(cloneNodeList, nodelist[i].cloneNode(deep));
  2266     }
  2267 
  2268     return cloneNodeList;
  2269 };
  2270 
  2271 
  2272 var __ownerDocument__ = function(node){
  2273     return (node.nodeType == Node.DOCUMENT_NODE)?node:node.ownerDocument;
  2274 };
  2275 
  2276 /**
  2277  * @class  Node -
  2278  *      The Node interface is the primary datatype for the entire
  2279  *      Document Object Model. It represents a single node in the
  2280  *      document tree.
  2281  * @param  ownerDocument : Document - The Document object associated with this node.
  2282  */
  2283 
  2284 Node = function(ownerDocument) {
  2285     this.baseURI = 'about:blank';
  2286     this.namespaceURI = null;
  2287     this.nodeName = "";
  2288     this.nodeValue = null;
  2289 
  2290     // A NodeList that contains all children of this node. If there are no
  2291     // children, this is a NodeList containing no nodes.  The content of the
  2292     // returned NodeList is "live" in the sense that, for instance, changes to
  2293     // the children of the node object that it was created from are immediately
  2294     // reflected in the nodes returned by the NodeList accessors; it is not a
  2295     // static snapshot of the content of the node. This is true for every
  2296     // NodeList, including the ones returned by the getElementsByTagName method.
  2297     this.childNodes      = new NodeList(ownerDocument, this);
  2298 
  2299     // The first child of this node. If there is no such node, this is null
  2300     this.firstChild      = null;
  2301     // The last child of this node. If there is no such node, this is null.
  2302     this.lastChild       = null;
  2303     // The node immediately preceding this node. If there is no such node,
  2304     // this is null.
  2305     this.previousSibling = null;
  2306     // The node immediately following this node. If there is no such node,
  2307     // this is null.
  2308     this.nextSibling     = null;
  2309 
  2310     this.attributes = null;
  2311     // The namespaces in scope for this node
  2312     this._namespaces = new NamespaceNodeMap(ownerDocument, this);
  2313     this._readonly = false;
  2314 
  2315     //IMPORTANT: These must come last so rhino will not iterate parent
  2316     //           properties before child properties.  (qunit.equiv issue)
  2317 
  2318     // The parent of this node. All nodes, except Document, DocumentFragment,
  2319     // and Attr may have a parent.  However, if a node has just been created
  2320     // and not yet added to the tree, or if it has been removed from the tree,
  2321     // this is null
  2322     this.parentNode      = null;
  2323     // The Document object associated with this node
  2324     this.ownerDocument = ownerDocument;
  2325 
  2326 };
  2327 
  2328 // nodeType constants
  2329 Node.ELEMENT_NODE                = 1;
  2330 Node.ATTRIBUTE_NODE              = 2;
  2331 Node.TEXT_NODE                   = 3;
  2332 Node.CDATA_SECTION_NODE          = 4;
  2333 Node.ENTITY_REFERENCE_NODE       = 5;
  2334 Node.ENTITY_NODE                 = 6;
  2335 Node.PROCESSING_INSTRUCTION_NODE = 7;
  2336 Node.COMMENT_NODE                = 8;
  2337 Node.DOCUMENT_NODE               = 9;
  2338 Node.DOCUMENT_TYPE_NODE          = 10;
  2339 Node.DOCUMENT_FRAGMENT_NODE      = 11;
  2340 Node.NOTATION_NODE               = 12;
  2341 Node.NAMESPACE_NODE              = 13;
  2342 
  2343 Node.DOCUMENT_POSITION_EQUAL        = 0x00;
  2344 Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
  2345 Node.DOCUMENT_POSITION_PRECEDING    = 0x02;
  2346 Node.DOCUMENT_POSITION_FOLLOWING    = 0x04;
  2347 Node.DOCUMENT_POSITION_CONTAINS     = 0x08;
  2348 Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
  2349 Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC      = 0x20;
  2350 
  2351 
  2352 __extend__(Node.prototype, {
  2353     get localName(){
  2354         return this.prefix?
  2355             this.nodeName.substring(this.prefix.length+1, this.nodeName.length):
  2356             this.nodeName;
  2357     },
  2358     get prefix(){
  2359         return this.nodeName.split(':').length>1?
  2360             this.nodeName.split(':')[0]:
  2361             null;
  2362     },
  2363     set prefix(value){
  2364         if(value === null){
  2365             this.nodeName = this.localName;
  2366         }else{
  2367             this.nodeName = value+':'+this.localName;
  2368         }
  2369     },
  2370     hasAttributes : function() {
  2371         if (this.attributes.length == 0) {
  2372             return false;
  2373         }else{
  2374             return true;
  2375         }
  2376     },
  2377     get textContent(){
  2378         return __recursivelyGatherText__(this);
  2379     },
  2380     set textContent(newText){
  2381         while(this.firstChild != null){
  2382             this.removeChild( this.firstChild );
  2383         }
  2384         var text = this.ownerDocument.createTextNode(newText);
  2385         this.appendChild(text);
  2386     },
  2387     insertBefore : function(newChild, refChild) {
  2388         var prevNode;
  2389 
  2390         if(newChild==null){
  2391             return newChild;
  2392         }
  2393         if(refChild==null){
  2394             this.appendChild(newChild);
  2395             return this.newChild;
  2396         }
  2397 
  2398         // test for exceptions
  2399         if (__ownerDocument__(this).implementation.errorChecking) {
  2400             // throw Exception if Node is readonly
  2401             if (this._readonly) {
  2402                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  2403             }
  2404 
  2405             // throw Exception if newChild was not created by this Document
  2406             if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
  2407                 throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
  2408             }
  2409 
  2410             // throw Exception if the node is an ancestor
  2411             if (__isAncestor__(this, newChild)) {
  2412                 throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
  2413             }
  2414         }
  2415 
  2416         // if refChild is specified, insert before it
  2417         if (refChild) {
  2418             // find index of refChild
  2419             var itemIndex = __findItemIndex__(this.childNodes, refChild);
  2420             // throw Exception if there is no child node with this id
  2421             if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
  2422                 throw(new DOMException(DOMException.NOT_FOUND_ERR));
  2423             }
  2424 
  2425             // if the newChild is already in the tree,
  2426             var newChildParent = newChild.parentNode;
  2427             if (newChildParent) {
  2428                 // remove it
  2429                 newChildParent.removeChild(newChild);
  2430             }
  2431 
  2432             // insert newChild into childNodes
  2433             __insertBefore__(this.childNodes, newChild, itemIndex);
  2434 
  2435             // do node pointer surgery
  2436             prevNode = refChild.previousSibling;
  2437 
  2438             // handle DocumentFragment
  2439             if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2440                 if (newChild.childNodes.length > 0) {
  2441                     // set the parentNode of DocumentFragment's children
  2442                     for (var ind = 0; ind < newChild.childNodes.length; ind++) {
  2443                         newChild.childNodes[ind].parentNode = this;
  2444                     }
  2445 
  2446                     // link refChild to last child of DocumentFragment
  2447                     refChild.previousSibling = newChild.childNodes[newChild.childNodes.length-1];
  2448                 }
  2449             }else {
  2450                 // set the parentNode of the newChild
  2451                 newChild.parentNode = this;
  2452                 // link refChild to newChild
  2453                 refChild.previousSibling = newChild;
  2454             }
  2455 
  2456         }else {
  2457             // otherwise, append to end
  2458             prevNode = this.lastChild;
  2459             this.appendChild(newChild);
  2460         }
  2461 
  2462         if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2463             // do node pointer surgery for DocumentFragment
  2464             if (newChild.childNodes.length > 0) {
  2465                 if (prevNode) {
  2466                     prevNode.nextSibling = newChild.childNodes[0];
  2467                 }else {
  2468                     // this is the first child in the list
  2469                     this.firstChild = newChild.childNodes[0];
  2470                 }
  2471                 newChild.childNodes[0].previousSibling = prevNode;
  2472                 newChild.childNodes[newChild.childNodes.length-1].nextSibling = refChild;
  2473             }
  2474         }else {
  2475             // do node pointer surgery for newChild
  2476             if (prevNode) {
  2477                 prevNode.nextSibling = newChild;
  2478             }else {
  2479                 // this is the first child in the list
  2480                 this.firstChild = newChild;
  2481             }
  2482             newChild.previousSibling = prevNode;
  2483             newChild.nextSibling     = refChild;
  2484         }
  2485 
  2486         return newChild;
  2487     },
  2488     replaceChild : function(newChild, oldChild) {
  2489         var ret = null;
  2490 
  2491         if(newChild==null || oldChild==null){
  2492             return oldChild;
  2493         }
  2494 
  2495         // test for exceptions
  2496         if (__ownerDocument__(this).implementation.errorChecking) {
  2497             // throw Exception if Node is readonly
  2498             if (this._readonly) {
  2499                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  2500             }
  2501 
  2502             // throw Exception if newChild was not created by this Document
  2503             if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
  2504                 throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
  2505             }
  2506 
  2507             // throw Exception if the node is an ancestor
  2508             if (__isAncestor__(this, newChild)) {
  2509                 throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
  2510             }
  2511         }
  2512 
  2513         // get index of oldChild
  2514         var index = __findItemIndex__(this.childNodes, oldChild);
  2515 
  2516         // throw Exception if there is no child node with this id
  2517         if (__ownerDocument__(this).implementation.errorChecking && (index < 0)) {
  2518             throw(new DOMException(DOMException.NOT_FOUND_ERR));
  2519         }
  2520 
  2521         // if the newChild is already in the tree,
  2522         var newChildParent = newChild.parentNode;
  2523         if (newChildParent) {
  2524             // remove it
  2525             newChildParent.removeChild(newChild);
  2526         }
  2527 
  2528         // add newChild to childNodes
  2529         ret = __replaceChild__(this.childNodes,newChild, index);
  2530 
  2531 
  2532         if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2533             // do node pointer surgery for Document Fragment
  2534             if (newChild.childNodes.length > 0) {
  2535                 for (var ind = 0; ind < newChild.childNodes.length; ind++) {
  2536                     newChild.childNodes[ind].parentNode = this;
  2537                 }
  2538 
  2539                 if (oldChild.previousSibling) {
  2540                     oldChild.previousSibling.nextSibling = newChild.childNodes[0];
  2541                 } else {
  2542                     this.firstChild = newChild.childNodes[0];
  2543                 }
  2544 
  2545                 if (oldChild.nextSibling) {
  2546                     oldChild.nextSibling.previousSibling = newChild;
  2547                 } else {
  2548                     this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
  2549                 }
  2550 
  2551                 newChild.childNodes[0].previousSibling = oldChild.previousSibling;
  2552                 newChild.childNodes[newChild.childNodes.length-1].nextSibling = oldChild.nextSibling;
  2553             }
  2554         } else {
  2555             // do node pointer surgery for newChild
  2556             newChild.parentNode = this;
  2557 
  2558             if (oldChild.previousSibling) {
  2559                 oldChild.previousSibling.nextSibling = newChild;
  2560             }else{
  2561                 this.firstChild = newChild;
  2562             }
  2563             if (oldChild.nextSibling) {
  2564                 oldChild.nextSibling.previousSibling = newChild;
  2565             }else{
  2566                 this.lastChild = newChild;
  2567             }
  2568             newChild.previousSibling = oldChild.previousSibling;
  2569             newChild.nextSibling = oldChild.nextSibling;
  2570         }
  2571 
  2572         return ret;
  2573     },
  2574     removeChild : function(oldChild) {
  2575         if(!oldChild){
  2576             return null;
  2577         }
  2578         // throw Exception if NamedNodeMap is readonly
  2579         if (__ownerDocument__(this).implementation.errorChecking &&
  2580             (this._readonly || oldChild._readonly)) {
  2581             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  2582         }
  2583 
  2584         // get index of oldChild
  2585         var itemIndex = __findItemIndex__(this.childNodes, oldChild);
  2586 
  2587         // throw Exception if there is no child node with this id
  2588         if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
  2589             throw(new DOMException(DOMException.NOT_FOUND_ERR));
  2590         }
  2591 
  2592         // remove oldChild from childNodes
  2593         __removeChild__(this.childNodes, itemIndex);
  2594 
  2595         // do node pointer surgery
  2596         oldChild.parentNode = null;
  2597 
  2598         if (oldChild.previousSibling) {
  2599             oldChild.previousSibling.nextSibling = oldChild.nextSibling;
  2600         }else {
  2601             this.firstChild = oldChild.nextSibling;
  2602         }
  2603         if (oldChild.nextSibling) {
  2604             oldChild.nextSibling.previousSibling = oldChild.previousSibling;
  2605         }else {
  2606             this.lastChild = oldChild.previousSibling;
  2607         }
  2608 
  2609         oldChild.previousSibling = null;
  2610         oldChild.nextSibling = null;
  2611 
  2612         return oldChild;
  2613     },
  2614     appendChild : function(newChild) {
  2615         if(!newChild){
  2616             return null;
  2617         }
  2618         // test for exceptions
  2619         if (__ownerDocument__(this).implementation.errorChecking) {
  2620             // throw Exception if Node is readonly
  2621             if (this._readonly) {
  2622                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  2623             }
  2624 
  2625             // throw Exception if arg was not created by this Document
  2626             if (__ownerDocument__(this) != __ownerDocument__(this)) {
  2627                 throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
  2628             }
  2629 
  2630             // throw Exception if the node is an ancestor
  2631             if (__isAncestor__(this, newChild)) {
  2632               throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
  2633             }
  2634         }
  2635 
  2636         // if the newChild is already in the tree,
  2637         var newChildParent = newChild.parentNode;
  2638         if (newChildParent) {
  2639             // remove it
  2640            //console.debug('removing node %s', newChild);
  2641             newChildParent.removeChild(newChild);
  2642         }
  2643 
  2644         // add newChild to childNodes
  2645         __appendChild__(this.childNodes, newChild);
  2646 
  2647         if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2648             // do node pointer surgery for DocumentFragment
  2649             if (newChild.childNodes.length > 0) {
  2650                 for (var ind = 0; ind < newChild.childNodes.length; ind++) {
  2651                     newChild.childNodes[ind].parentNode = this;
  2652                 }
  2653 
  2654                 if (this.lastChild) {
  2655                     this.lastChild.nextSibling = newChild.childNodes[0];
  2656                     newChild.childNodes[0].previousSibling = this.lastChild;
  2657                     this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
  2658                 } else {
  2659                     this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
  2660                     this.firstChild = newChild.childNodes[0];
  2661                 }
  2662             }
  2663         } else {
  2664             // do node pointer surgery for newChild
  2665             newChild.parentNode = this;
  2666             if (this.lastChild) {
  2667                 this.lastChild.nextSibling = newChild;
  2668                 newChild.previousSibling = this.lastChild;
  2669                 this.lastChild = newChild;
  2670             } else {
  2671                 this.lastChild = newChild;
  2672                 this.firstChild = newChild;
  2673             }
  2674        }
  2675        return newChild;
  2676     },
  2677     hasChildNodes : function() {
  2678         return (this.childNodes.length > 0);
  2679     },
  2680     cloneNode: function(deep) {
  2681         // use importNode to clone this Node
  2682         //do not throw any exceptions
  2683         try {
  2684             return __ownerDocument__(this).importNode(this, deep);
  2685         } catch (e) {
  2686             //there shouldn't be any exceptions, but if there are, return null
  2687             // may want to warn: $debug("could not clone node: "+e.code);
  2688             return null;
  2689         }
  2690     },
  2691     normalize : function() {
  2692         var i;
  2693         var inode;
  2694         var nodesToRemove = new NodeList();
  2695 
  2696         if (this.nodeType == Node.ELEMENT_NODE || this.nodeType == Node.DOCUMENT_NODE) {
  2697             var adjacentTextNode = null;
  2698 
  2699             // loop through all childNodes
  2700             for(i = 0; i < this.childNodes.length; i++) {
  2701                 inode = this.childNodes.item(i);
  2702 
  2703                 if (inode.nodeType == Node.TEXT_NODE) {
  2704                     // this node is a text node
  2705                     if (inode.length < 1) {
  2706                         // this text node is empty
  2707                         // add this node to the list of nodes to be remove
  2708                         __appendChild__(nodesToRemove, inode);
  2709                     }else {
  2710                         if (adjacentTextNode) {
  2711                             // previous node was also text
  2712                             adjacentTextNode.appendData(inode.data);
  2713                             // merge the data in adjacent text nodes
  2714                             // add this node to the list of nodes to be removed
  2715                             __appendChild__(nodesToRemove, inode);
  2716                         } else {
  2717                             // remember this node for next cycle
  2718                             adjacentTextNode = inode;
  2719                         }
  2720                     }
  2721                 } else {
  2722                     // (soon to be) previous node is not a text node
  2723                     adjacentTextNode = null;
  2724                     // normalize non Text childNodes
  2725                     inode.normalize();
  2726                 }
  2727             }
  2728 
  2729             // remove redundant Text Nodes
  2730             for(i = 0; i < nodesToRemove.length; i++) {
  2731                 inode = nodesToRemove.item(i);
  2732                 inode.parentNode.removeChild(inode);
  2733             }
  2734         }
  2735     },
  2736     isSupported : function(feature, version) {
  2737         // use Implementation.hasFeature to determine if this feature is supported
  2738         return __ownerDocument__(this).implementation.hasFeature(feature, version);
  2739     },
  2740     getElementsByTagName : function(tagname) {
  2741         // delegate to _getElementsByTagNameRecursive
  2742         // recurse childNodes
  2743         var nodelist = new NodeList(__ownerDocument__(this));
  2744         for (var i = 0; i < this.childNodes.length; i++) {
  2745             __getElementsByTagNameRecursive__(this.childNodes.item(i),
  2746                                               tagname,
  2747                                               nodelist);
  2748         }
  2749         return nodelist;
  2750     },
  2751     getElementsByTagNameNS : function(namespaceURI, localName) {
  2752         // delegate to _getElementsByTagNameNSRecursive
  2753         return __getElementsByTagNameNSRecursive__(this, namespaceURI, localName,
  2754             new NodeList(__ownerDocument__(this)));
  2755     },
  2756     importNode : function(importedNode, deep) {
  2757         var i;
  2758         var importNode;
  2759 
  2760         //there is no need to perform namespace checks since everything has already gone through them
  2761         //in order to have gotten into the DOM in the first place. The following line
  2762         //turns namespace checking off in ._isValidNamespace
  2763         __ownerDocument__(this).importing = true;
  2764 
  2765         if (importedNode.nodeType == Node.ELEMENT_NODE) {
  2766             if (!__ownerDocument__(this).implementation.namespaceAware) {
  2767                 // create a local Element (with the name of the importedNode)
  2768                 importNode = __ownerDocument__(this).createElement(importedNode.tagName);
  2769 
  2770                 // create attributes matching those of the importedNode
  2771                 for(i = 0; i < importedNode.attributes.length; i++) {
  2772                     importNode.setAttribute(importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
  2773                 }
  2774             } else {
  2775                 // create a local Element (with the name & namespaceURI of the importedNode)
  2776                 importNode = __ownerDocument__(this).createElementNS(importedNode.namespaceURI, importedNode.nodeName);
  2777 
  2778                 // create attributes matching those of the importedNode
  2779                 for(i = 0; i < importedNode.attributes.length; i++) {
  2780                     importNode.setAttributeNS(importedNode.attributes.item(i).namespaceURI,
  2781                         importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
  2782                 }
  2783 
  2784                 // create namespace definitions matching those of the importedNode
  2785                 for(i = 0; i < importedNode._namespaces.length; i++) {
  2786                     importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
  2787                     importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
  2788                 }
  2789             }
  2790         } else if (importedNode.nodeType == Node.ATTRIBUTE_NODE) {
  2791             if (!__ownerDocument__(this).implementation.namespaceAware) {
  2792                 // create a local Attribute (with the name of the importedAttribute)
  2793                 importNode = __ownerDocument__(this).createAttribute(importedNode.name);
  2794             } else {
  2795                 // create a local Attribute (with the name & namespaceURI of the importedAttribute)
  2796                 importNode = __ownerDocument__(this).createAttributeNS(importedNode.namespaceURI, importedNode.nodeName);
  2797 
  2798                 // create namespace definitions matching those of the importedAttribute
  2799                 for(i = 0; i < importedNode._namespaces.length; i++) {
  2800                     importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
  2801                     importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
  2802                 }
  2803             }
  2804 
  2805             // set the value of the local Attribute to match that of the importedAttribute
  2806             importNode.value = importedNode.value;
  2807 
  2808         } else if (importedNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
  2809             // create a local DocumentFragment
  2810             importNode = __ownerDocument__(this).createDocumentFragment();
  2811         } else if (importedNode.nodeType == Node.NAMESPACE_NODE) {
  2812             // create a local NamespaceNode (with the same name & value as the importedNode)
  2813             importNode = __ownerDocument__(this).createNamespace(importedNode.nodeName);
  2814             importNode.value = importedNode.value;
  2815         } else if (importedNode.nodeType == Node.TEXT_NODE) {
  2816             // create a local TextNode (with the same data as the importedNode)
  2817             importNode = __ownerDocument__(this).createTextNode(importedNode.data);
  2818         } else if (importedNode.nodeType == Node.CDATA_SECTION_NODE) {
  2819             // create a local CDATANode (with the same data as the importedNode)
  2820             importNode = __ownerDocument__(this).createCDATASection(importedNode.data);
  2821         } else if (importedNode.nodeType == Node.PROCESSING_INSTRUCTION_NODE) {
  2822             // create a local ProcessingInstruction (with the same target & data as the importedNode)
  2823             importNode = __ownerDocument__(this).createProcessingInstruction(importedNode.target, importedNode.data);
  2824         } else if (importedNode.nodeType == Node.COMMENT_NODE) {
  2825             // create a local Comment (with the same data as the importedNode)
  2826             importNode = __ownerDocument__(this).createComment(importedNode.data);
  2827         } else {  // throw Exception if nodeType is not supported
  2828             throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
  2829         }
  2830 
  2831         if (deep) {
  2832             // recurse childNodes
  2833             for(i = 0; i < importedNode.childNodes.length; i++) {
  2834                 importNode.appendChild(__ownerDocument__(this).importNode(importedNode.childNodes.item(i), true));
  2835             }
  2836         }
  2837 
  2838         //reset importing
  2839         __ownerDocument__(this).importing = false;
  2840         return importNode;
  2841 
  2842     },
  2843     contains : function(node){
  2844         while(node && node != this ){
  2845             node = node.parentNode;
  2846         }
  2847         return !!node;
  2848     },
  2849     compareDocumentPosition : function(b){
  2850         //console.log("comparing document position %s %s", this, b);
  2851         var i,
  2852             length,
  2853             a = this,
  2854             parent,
  2855             aparents,
  2856             bparents;
  2857         //handle a couple simpler case first
  2858         if(a === b) {
  2859             return Node.DOCUMENT_POSITION_EQUAL;
  2860         }
  2861         if(a.ownerDocument !== b.ownerDocument) {
  2862             return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
  2863                Node.DOCUMENT_POSITION_FOLLOWING|
  2864                Node.DOCUMENT_POSITION_DISCONNECTED;
  2865         }
  2866         if(a.parentNode === b.parentNode){
  2867             length = a.parentNode.childNodes.length;
  2868             for(i=0;i<length;i++){
  2869                 if(a.parentNode.childNodes[i] === a){
  2870                     return Node.DOCUMENT_POSITION_FOLLOWING;
  2871                 }else if(a.parentNode.childNodes[i] === b){
  2872                     return Node.DOCUMENT_POSITION_PRECEDING;
  2873                 }
  2874             }
  2875         }
  2876 
  2877         if(a.contains(b)) {
  2878             return Node.DOCUMENT_POSITION_CONTAINED_BY|
  2879                    Node.DOCUMENT_POSITION_FOLLOWING;
  2880         }
  2881         if(b.contains(a)) {
  2882             return Node.DOCUMENT_POSITION_CONTAINS|
  2883                    Node.DOCUMENT_POSITION_PRECEDING;
  2884         }
  2885         aparents = [];
  2886         parent = a.parentNode;
  2887         while(parent){
  2888             aparents[aparents.length] = parent;
  2889             parent = parent.parentNode;
  2890         }
  2891 
  2892         bparents = [];
  2893         parent = b.parentNode;
  2894         while(parent){
  2895             i = aparents.indexOf(parent);
  2896             if(i < 0){
  2897                 bparents[bparents.length] = parent;
  2898                 parent = parent.parentNode;
  2899             }else{
  2900                 //i cant be 0 since we already checked for equal parentNode
  2901                 if(bparents.length > aparents.length){
  2902                     return Node.DOCUMENT_POSITION_FOLLOWING;
  2903                 }else if(bparents.length < aparents.length){
  2904                     return Node.DOCUMENT_POSITION_PRECEDING;
  2905                 }else{
  2906                     //common ancestor diverge point
  2907                     if (i === 0) {
  2908                         return Node.DOCUMENT_POSITION_FOLLOWING;
  2909                     } else {
  2910                         parent = aparents[i-1];
  2911                     }
  2912                     return parent.compareDocumentPosition(bparents.pop());
  2913                 }
  2914             }
  2915         }
  2916 
  2917         return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
  2918                Node.DOCUMENT_POSITION_DISCONNECTED;
  2919 
  2920     },
  2921     toString : function() {
  2922         return '[object Node]';
  2923     }
  2924 
  2925 });
  2926 
  2927 
  2928 
  2929 /**
  2930  * @method __getElementsByTagNameRecursive__ - implements getElementsByTagName()
  2931  * @param  elem     : Element  - The element which are checking and then recursing into
  2932  * @param  tagname  : string      - The name of the tag to match on. The special value "*" matches all tags
  2933  * @param  nodeList : NodeList - The accumulating list of matching nodes
  2934  *
  2935  * @return : NodeList
  2936  */
  2937 var __getElementsByTagNameRecursive__ = function (elem, tagname, nodeList) {
  2938 
  2939     if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
  2940 
  2941         if(elem.nodeType !== Node.DOCUMENT_NODE &&
  2942             ((elem.nodeName.toUpperCase() == tagname.toUpperCase()) ||
  2943                 (tagname == "*")) ){
  2944             // add matching node to nodeList
  2945             __appendChild__(nodeList, elem);
  2946         }
  2947 
  2948         // recurse childNodes
  2949         for(var i = 0; i < elem.childNodes.length; i++) {
  2950             nodeList = __getElementsByTagNameRecursive__(elem.childNodes.item(i), tagname, nodeList);
  2951         }
  2952     }
  2953 
  2954     return nodeList;
  2955 };
  2956 
  2957 /**
  2958  * @method __getElementsByTagNameNSRecursive__
  2959  *      implements getElementsByTagName()
  2960  *
  2961  * @param  elem     : Element  - The element which are checking and then recursing into
  2962  * @param  namespaceURI : string - the namespace URI of the required node
  2963  * @param  localName    : string - the local name of the required node
  2964  * @param  nodeList     : NodeList - The accumulating list of matching nodes
  2965  *
  2966  * @return : NodeList
  2967  */
  2968 var __getElementsByTagNameNSRecursive__ = function(elem, namespaceURI, localName, nodeList) {
  2969     if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
  2970 
  2971         if (((elem.namespaceURI == namespaceURI) || (namespaceURI == "*")) &&
  2972             ((elem.localName == localName) || (localName == "*"))) {
  2973             // add matching node to nodeList
  2974             __appendChild__(nodeList, elem);
  2975         }
  2976 
  2977         // recurse childNodes
  2978         for(var i = 0; i < elem.childNodes.length; i++) {
  2979             nodeList = __getElementsByTagNameNSRecursive__(
  2980                 elem.childNodes.item(i), namespaceURI, localName, nodeList);
  2981         }
  2982     }
  2983 
  2984     return nodeList;
  2985 };
  2986 
  2987 /**
  2988  * @method __isAncestor__ - returns true if node is ancestor of target
  2989  * @param  target         : Node - The node we are using as context
  2990  * @param  node         : Node - The candidate ancestor node
  2991  * @return : boolean
  2992  */
  2993 var __isAncestor__ = function(target, node) {
  2994     // if this node matches, return true,
  2995     // otherwise recurse up (if there is a parentNode)
  2996     return ((target == node) || ((target.parentNode) && (__isAncestor__(target.parentNode, node))));
  2997 };
  2998 
  2999 
  3000 
  3001 var __recursivelyGatherText__ = function(aNode) {
  3002     var accumulateText = "",
  3003         idx,
  3004         node;
  3005     for (idx=0;idx < aNode.childNodes.length;idx++){
  3006         node = aNode.childNodes.item(idx);
  3007         if(node.nodeType == Node.TEXT_NODE)
  3008             accumulateText += node.data;
  3009         else
  3010             accumulateText += __recursivelyGatherText__(node);
  3011     }
  3012     return accumulateText;
  3013 };
  3014 
  3015 /**
  3016  * function __escapeXML__
  3017  * @param  str : string - The string to be escaped
  3018  * @return : string - The escaped string
  3019  */
  3020 var escAmpRegEx = /&(?!(amp;|lt;|gt;|quot|apos;))/g;
  3021 var escLtRegEx = /</g;
  3022 var escGtRegEx = />/g;
  3023 var quotRegEx = /"/g;
  3024 var aposRegEx = /'/g;
  3025 
  3026 function __escapeXML__(str) {
  3027     str = str.replace(escAmpRegEx, "&amp;").
  3028             replace(escLtRegEx, "&lt;").
  3029             replace(escGtRegEx, "&gt;").
  3030             replace(quotRegEx, "&quot;").
  3031             replace(aposRegEx, "&apos;");
  3032 
  3033     return str;
  3034 };
  3035 
  3036 /*
  3037 function __escapeHTML5__(str) {
  3038     str = str.replace(escAmpRegEx, "&amp;").
  3039             replace(escLtRegEx, "&lt;").
  3040             replace(escGtRegEx, "&gt;");
  3041 
  3042     return str;
  3043 };
  3044 function __escapeHTML5Atribute__(str) {
  3045     str = str.replace(escAmpRegEx, "&amp;").
  3046             replace(escLtRegEx, "&lt;").
  3047             replace(escGtRegEx, "&gt;").
  3048             replace(quotRegEx, "&quot;").
  3049             replace(aposRegEx, "&apos;");
  3050 
  3051     return str;
  3052 };
  3053 */
  3054 
  3055 /**
  3056  * function __unescapeXML__
  3057  * @param  str : string - The string to be unescaped
  3058  * @return : string - The unescaped string
  3059  */
  3060 var unescAmpRegEx = /&amp;/g;
  3061 var unescLtRegEx = /&lt;/g;
  3062 var unescGtRegEx = /&gt;/g;
  3063 var unquotRegEx = /&quot;/g;
  3064 var unaposRegEx = /&apos;/g;
  3065 function __unescapeXML__(str) {
  3066     str = str.replace(unescAmpRegEx, "&").
  3067             replace(unescLtRegEx, "<").
  3068             replace(unescGtRegEx, ">").
  3069             replace(unquotRegEx, "\"").
  3070             replace(unaposRegEx, "'");
  3071 
  3072     return str;
  3073 };
  3074 
  3075 /**
  3076  * @class  NamedNodeMap -
  3077  *      used to represent collections of nodes that can be accessed by name
  3078  *      typically a set of Element attributes
  3079  *
  3080  * @extends NodeList -
  3081  *      note W3C spec says that this is not the case, but we need an item()
  3082  *      method identical to NodeList's, so why not?
  3083  * @param  ownerDocument : Document - the ownerDocument
  3084  * @param  parentNode    : Node - the node that the NamedNodeMap is attached to (or null)
  3085  */
  3086 NamedNodeMap = function(ownerDocument, parentNode) {
  3087     NodeList.apply(this, arguments);
  3088     __setArray__(this, []);
  3089 };
  3090 NamedNodeMap.prototype = new NodeList();
  3091 __extend__(NamedNodeMap.prototype, {
  3092     add: function(name){
  3093         this[this.length] = name;
  3094     },
  3095     getNamedItem : function(name) {
  3096         var ret = null;
  3097         //console.log('NamedNodeMap getNamedItem %s', name);
  3098         // test that Named Node exists
  3099         var itemIndex = __findNamedItemIndex__(this, name);
  3100 
  3101         if (itemIndex > -1) {
  3102             // found it!
  3103             ret = this[itemIndex];
  3104         }
  3105         // if node is not found, default value null is returned
  3106         return ret;
  3107     },
  3108     setNamedItem : function(arg) {
  3109       //console.log('setNamedItem %s', arg);
  3110       // test for exceptions
  3111       if (__ownerDocument__(this).implementation.errorChecking) {
  3112             // throw Exception if arg was not created by this Document
  3113             if (this.ownerDocument != arg.ownerDocument) {
  3114               throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
  3115             }
  3116 
  3117             // throw Exception if DOMNamedNodeMap is readonly
  3118             if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
  3119               throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3120             }
  3121 
  3122             // throw Exception if arg is already an attribute of another Element object
  3123             if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
  3124               throw(new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
  3125             }
  3126       }
  3127 
  3128      //console.log('setNamedItem __findNamedItemIndex__ ');
  3129       // get item index
  3130       var itemIndex = __findNamedItemIndex__(this, arg.name);
  3131       var ret = null;
  3132 
  3133      //console.log('setNamedItem __findNamedItemIndex__ %s', itemIndex);
  3134       if (itemIndex > -1) {                          // found it!
  3135             ret = this[itemIndex];                // use existing Attribute
  3136 
  3137             // throw Exception if DOMAttr is readonly
  3138             if (__ownerDocument__(this).implementation.errorChecking && ret._readonly) {
  3139               throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3140             } else {
  3141               this[itemIndex] = arg;                // over-write existing NamedNode
  3142               this[arg.name.toLowerCase()] = arg;
  3143             }
  3144       } else {
  3145             // add new NamedNode
  3146            //console.log('setNamedItem add new named node map (by index)');
  3147             Array.prototype.push.apply(this, [arg]);
  3148            //console.log('setNamedItem add new named node map (by name) %s %s', arg, arg.name);
  3149             this[arg.name] = arg;
  3150            //console.log('finsished setNamedItem add new named node map (by name) %s', arg.name);
  3151 
  3152       }
  3153 
  3154      //console.log('setNamedItem parentNode');
  3155       arg.ownerElement = this.parentNode;            // update ownerElement
  3156       // return old node or new node
  3157      //console.log('setNamedItem exit');
  3158       return ret;
  3159     },
  3160     removeNamedItem : function(name) {
  3161           var ret = null;
  3162           // test for exceptions
  3163           // throw Exception if NamedNodeMap is readonly
  3164           if (__ownerDocument__(this).implementation.errorChecking &&
  3165                 (this._readonly || (this.parentNode && this.parentNode._readonly))) {
  3166               throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3167           }
  3168 
  3169           // get item index
  3170           var itemIndex = __findNamedItemIndex__(this, name);
  3171 
  3172           // throw Exception if there is no node named name in this map
  3173           if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
  3174             throw(new DOMException(DOMException.NOT_FOUND_ERR));
  3175           }
  3176 
  3177           // get Node
  3178           var oldNode = this[itemIndex];
  3179           //this[oldNode.name] = undefined;
  3180 
  3181           // throw Exception if Node is readonly
  3182           if (__ownerDocument__(this).implementation.errorChecking && oldNode._readonly) {
  3183             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3184           }
  3185 
  3186           // return removed node
  3187           return __removeChild__(this, itemIndex);
  3188     },
  3189     getNamedItemNS : function(namespaceURI, localName) {
  3190         var ret = null;
  3191 
  3192         // test that Named Node exists
  3193         var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
  3194 
  3195         if (itemIndex > -1) {
  3196             // found it! return NamedNode
  3197             ret = this[itemIndex];
  3198         }
  3199         // if node is not found, default value null is returned
  3200         return ret;
  3201     },
  3202     setNamedItemNS : function(arg) {
  3203         //console.log('setNamedItemNS %s', arg);
  3204         // test for exceptions
  3205         if (__ownerDocument__(this).implementation.errorChecking) {
  3206             // throw Exception if NamedNodeMap is readonly
  3207             if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
  3208                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3209             }
  3210 
  3211             // throw Exception if arg was not created by this Document
  3212             if (__ownerDocument__(this) != __ownerDocument__(arg)) {
  3213                 throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
  3214             }
  3215 
  3216             // throw Exception if arg is already an attribute of another Element object
  3217             if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
  3218                 throw(new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
  3219             }
  3220         }
  3221 
  3222         // get item index
  3223         var itemIndex = __findNamedItemNSIndex__(this, arg.namespaceURI, arg.localName);
  3224         var ret = null;
  3225 
  3226         if (itemIndex > -1) {
  3227             // found it!
  3228             // use existing Attribute
  3229             ret = this[itemIndex];
  3230             // throw Exception if Attr is readonly
  3231             if (__ownerDocument__(this).implementation.errorChecking && ret._readonly) {
  3232                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3233             } else {
  3234                 // over-write existing NamedNode
  3235                 this[itemIndex] = arg;
  3236             }
  3237         }else {
  3238             // add new NamedNode
  3239             Array.prototype.push.apply(this, [arg]);
  3240         }
  3241         arg.ownerElement = this.parentNode;
  3242 
  3243         // return old node or null
  3244         return ret;
  3245         //console.log('finished setNamedItemNS %s', arg);
  3246     },
  3247     removeNamedItemNS : function(namespaceURI, localName) {
  3248           var ret = null;
  3249 
  3250           // test for exceptions
  3251           // throw Exception if NamedNodeMap is readonly
  3252           if (__ownerDocument__(this).implementation.errorChecking && (this._readonly || (this.parentNode && this.parentNode._readonly))) {
  3253             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3254           }
  3255 
  3256           // get item index
  3257           var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
  3258 
  3259           // throw Exception if there is no matching node in this map
  3260           if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
  3261             throw(new DOMException(DOMException.NOT_FOUND_ERR));
  3262           }
  3263 
  3264           // get Node
  3265           var oldNode = this[itemIndex];
  3266 
  3267           // throw Exception if Node is readonly
  3268           if (__ownerDocument__(this).implementation.errorChecking && oldNode._readonly) {
  3269             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3270           }
  3271 
  3272           return __removeChild__(this, itemIndex);             // return removed node
  3273     },
  3274     get xml() {
  3275           var ret = "";
  3276 
  3277           // create string containing concatenation of all (but last) Attribute string values (separated by spaces)
  3278           for (var i=0; i < this.length -1; i++) {
  3279             ret += this[i].xml +" ";
  3280           }
  3281 
  3282           // add last Attribute to string (without trailing space)
  3283           if (this.length > 0) {
  3284             ret += this[this.length -1].xml;
  3285           }
  3286 
  3287           return ret;
  3288     },
  3289     toString : function(){
  3290         return "[object NamedNodeMap]";
  3291     }
  3292 
  3293 });
  3294 
  3295 /**
  3296  * @method __findNamedItemIndex__
  3297  *      find the item index of the node with the specified name
  3298  *
  3299  * @param  name : string - the name of the required node
  3300  * @param  isnsmap : if its a NamespaceNodeMap
  3301  * @return : int
  3302  */
  3303 var __findNamedItemIndex__ = function(namednodemap, name, isnsmap) {
  3304     var ret = -1;
  3305     // loop through all nodes
  3306     for (var i=0; i<namednodemap.length; i++) {
  3307         // compare name to each node's nodeName
  3308         if(namednodemap[i].localName && name && isnsmap){
  3309             if (namednodemap[i].localName.toLowerCase() == name.toLowerCase()) {
  3310                 // found it!
  3311                 ret = i;
  3312                 break;
  3313             }
  3314         }else{
  3315             if(namednodemap[i].name && name){
  3316                 if (namednodemap[i].name.toLowerCase() == name.toLowerCase()) {
  3317                     // found it!
  3318                     ret = i;
  3319                     break;
  3320                 }
  3321             }
  3322         }
  3323     }
  3324     // if node is not found, default value -1 is returned
  3325     return ret;
  3326 };
  3327 
  3328 /**
  3329  * @method __findNamedItemNSIndex__
  3330  *      find the item index of the node with the specified
  3331  *      namespaceURI and localName
  3332  *
  3333  * @param  namespaceURI : string - the namespace URI of the required node
  3334  * @param  localName    : string - the local name of the required node
  3335  * @return : int
  3336  */
  3337 var __findNamedItemNSIndex__ = function(namednodemap, namespaceURI, localName) {
  3338     var ret = -1;
  3339     // test that localName is not null
  3340     if (localName) {
  3341         // loop through all nodes
  3342         for (var i=0; i<namednodemap.length; i++) {
  3343             if(namednodemap[i].namespaceURI && namednodemap[i].localName){
  3344                 // compare name to each node's namespaceURI and localName
  3345                 if ((namednodemap[i].namespaceURI.toLowerCase() == namespaceURI.toLowerCase()) &&
  3346                     (namednodemap[i].localName.toLowerCase() == localName.toLowerCase())) {
  3347                     // found it!
  3348                     ret = i;
  3349                     break;
  3350                 }
  3351             }
  3352         }
  3353     }
  3354     // if node is not found, default value -1 is returned
  3355     return ret;
  3356 };
  3357 
  3358 /**
  3359  * @method __hasAttribute__
  3360  *      Returns true if specified node exists
  3361  *
  3362  * @param  name : string - the name of the required node
  3363  * @return : boolean
  3364  */
  3365 var __hasAttribute__ = function(namednodemap, name) {
  3366     var ret = false;
  3367     // test that Named Node exists
  3368     var itemIndex = __findNamedItemIndex__(namednodemap, name);
  3369         if (itemIndex > -1) {
  3370         // found it!
  3371         ret = true;
  3372     }
  3373     // if node is not found, default value false is returned
  3374     return ret;
  3375 }
  3376 
  3377 /**
  3378  * @method __hasAttributeNS__
  3379  *      Returns true if specified node exists
  3380  *
  3381  * @param  namespaceURI : string - the namespace URI of the required node
  3382  * @param  localName    : string - the local name of the required node
  3383  * @return : boolean
  3384  */
  3385 var __hasAttributeNS__ = function(namednodemap, namespaceURI, localName) {
  3386     var ret = false;
  3387     // test that Named Node exists
  3388     var itemIndex = __findNamedItemNSIndex__(namednodemap, namespaceURI, localName);
  3389     if (itemIndex > -1) {
  3390         // found it!
  3391         ret = true;
  3392     }
  3393     // if node is not found, default value false is returned
  3394     return ret;
  3395 }
  3396 
  3397 /**
  3398  * @method __cloneNamedNodes__
  3399  *      Returns a NamedNodeMap containing clones of the Nodes in this NamedNodeMap
  3400  *
  3401  * @param  parentNode : Node - the new parent of the cloned NodeList
  3402  * @param  isnsmap : bool - is this a NamespaceNodeMap
  3403  * @return NamedNodeMap containing clones of the Nodes in this NamedNodeMap
  3404  */
  3405 var __cloneNamedNodes__ = function(namednodemap, parentNode, isnsmap) {
  3406     var cloneNamedNodeMap = isnsmap?
  3407         new NamespaceNodeMap(namednodemap.ownerDocument, parentNode):
  3408         new NamedNodeMap(namednodemap.ownerDocument, parentNode);
  3409 
  3410     // create list containing clones of all children
  3411     for (var i=0; i < namednodemap.length; i++) {
  3412         __appendChild__(cloneNamedNodeMap, namednodemap[i].cloneNode(false));
  3413     }
  3414 
  3415     return cloneNamedNodeMap;
  3416 };
  3417 
  3418 
  3419 /**
  3420  * @class  NamespaceNodeMap -
  3421  *      used to represent collections of namespace nodes that can be
  3422  *      accessed by name typically a set of Element attributes
  3423  *
  3424  * @extends NamedNodeMap
  3425  *
  3426  * @param  ownerDocument : Document - the ownerDocument
  3427  * @param  parentNode    : Node - the node that the NamespaceNodeMap is attached to (or null)
  3428  */
  3429 var NamespaceNodeMap = function(ownerDocument, parentNode) {
  3430     this.NamedNodeMap = NamedNodeMap;
  3431     this.NamedNodeMap(ownerDocument, parentNode);
  3432     __setArray__(this, []);
  3433 };
  3434 NamespaceNodeMap.prototype = new NamedNodeMap();
  3435 __extend__(NamespaceNodeMap.prototype, {
  3436     get xml() {
  3437         var ret = "",
  3438             ns,
  3439             ind;
  3440         // identify namespaces declared local to this Element (ie, not inherited)
  3441         for (ind = 0; ind < this.length; ind++) {
  3442             // if namespace declaration does not exist in the containing node's, parentNode's namespaces
  3443             ns = null;
  3444             try {
  3445                 var ns = this.parentNode.parentNode._namespaces.
  3446                     getNamedItem(this[ind].localName);
  3447             }catch (e) {
  3448                 //breaking to prevent default namespace being inserted into return value
  3449                 break;
  3450             }
  3451             if (!(ns && (""+ ns.nodeValue == ""+ this[ind].nodeValue))) {
  3452                 // display the namespace declaration
  3453                 ret += this[ind].xml +" ";
  3454             }
  3455         }
  3456         return ret;
  3457     }
  3458 });
  3459 
  3460 /**
  3461  * @class  Namespace -
  3462  *      The Namespace interface represents an namespace in an Element object
  3463  *
  3464  * @param  ownerDocument : The Document object associated with this node.
  3465  */
  3466 Namespace = function(ownerDocument) {
  3467     Node.apply(this, arguments);
  3468     // the name of this attribute
  3469     this.name      = "";
  3470 
  3471     // If this attribute was explicitly given a value in the original document,
  3472     // this is true; otherwise, it is false.
  3473     // Note that the implementation is in charge of this attribute, not the user.
  3474     // If the user changes the value of the attribute (even if it ends up having
  3475     // the same value as the default value) then the specified flag is
  3476     // automatically flipped to true
  3477     this.specified = false;
  3478 };
  3479 Namespace.prototype = new Node();
  3480 __extend__(Namespace.prototype, {
  3481     get value(){
  3482         // the value of the attribute is returned as a string
  3483         return this.nodeValue;
  3484     },
  3485     set value(value){
  3486         this.nodeValue = value+'';
  3487     },
  3488     get nodeType(){
  3489         return Node.NAMESPACE_NODE;
  3490     },
  3491     get xml(){
  3492         var ret = "";
  3493 
  3494           // serialize Namespace Declaration
  3495           if (this.nodeName != "") {
  3496             ret += this.nodeName +"=\""+ __escapeXML__(this.nodeValue) +"\"";
  3497           }
  3498           else {  // handle default namespace
  3499             ret += "xmlns=\""+ __escapeXML__(this.nodeValue) +"\"";
  3500           }
  3501 
  3502           return ret;
  3503     },
  3504     toString: function(){
  3505         return '[object Namespace]';
  3506     }
  3507 });
  3508 
  3509 
  3510 /**
  3511  * @class  CharacterData - parent abstract class for Text and Comment
  3512  * @extends Node
  3513  * @param  ownerDocument : The Document object associated with this node.
  3514  */
  3515 CharacterData = function(ownerDocument) {
  3516     Node.apply(this, arguments);
  3517 };
  3518 CharacterData.prototype = new Node();
  3519 __extend__(CharacterData.prototype,{
  3520     get data(){
  3521         return this.nodeValue;
  3522     },
  3523     set data(data){
  3524         this.nodeValue = data;
  3525     },
  3526     get textContent(){
  3527         return this.nodeValue;
  3528     },
  3529     set textContent(newText){
  3530         this.nodeValue = newText;
  3531     },
  3532     get length(){return this.nodeValue.length;},
  3533     appendData: function(arg){
  3534         // throw Exception if CharacterData is readonly
  3535         if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
  3536             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3537         }
  3538         // append data
  3539         this.data = "" + this.data + arg;
  3540     },
  3541     deleteData: function(offset, count){
  3542         // throw Exception if CharacterData is readonly
  3543         if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
  3544             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3545         }
  3546         if (this.data) {
  3547             // throw Exception if offset is negative or greater than the data length,
  3548             if (__ownerDocument__(this).implementation.errorChecking &&
  3549                 ((offset < 0) || (offset >  this.data.length) || (count < 0))) {
  3550                 throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3551             }
  3552 
  3553             // delete data
  3554             if(!count || (offset + count) > this.data.length) {
  3555               this.data = this.data.substring(0, offset);
  3556             }else {
  3557               this.data = this.data.substring(0, offset).
  3558                 concat(this.data.substring(offset + count));
  3559             }
  3560         }
  3561     },
  3562     insertData: function(offset, arg){
  3563         // throw Exception if CharacterData is readonly
  3564         if(__ownerDocument__(this).implementation.errorChecking && this._readonly){
  3565             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3566         }
  3567 
  3568         if(this.data){
  3569             // throw Exception if offset is negative or greater than the data length,
  3570             if (__ownerDocument__(this).implementation.errorChecking &&
  3571                 ((offset < 0) || (offset >  this.data.length))) {
  3572                 throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3573             }
  3574 
  3575             // insert data
  3576             this.data =  this.data.substring(0, offset).concat(arg, this.data.substring(offset));
  3577         }else {
  3578             // throw Exception if offset is negative or greater than the data length,
  3579             if (__ownerDocument__(this).implementation.errorChecking && (offset !== 0)) {
  3580                throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3581             }
  3582 
  3583             // set data
  3584             this.data = arg;
  3585         }
  3586     },
  3587     replaceData: function(offset, count, arg){
  3588         // throw Exception if CharacterData is readonly
  3589         if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
  3590             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3591         }
  3592 
  3593         if (this.data) {
  3594             // throw Exception if offset is negative or greater than the data length,
  3595             if (__ownerDocument__(this).implementation.errorChecking &&
  3596                 ((offset < 0) || (offset >  this.data.length) || (count < 0))) {
  3597                 throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3598             }
  3599 
  3600             // replace data
  3601             this.data = this.data.substring(0, offset).
  3602                 concat(arg, this.data.substring(offset + count));
  3603         }else {
  3604             // set data
  3605             this.data = arg;
  3606         }
  3607     },
  3608     substringData: function(offset, count){
  3609         var ret = null;
  3610         if (this.data) {
  3611             // throw Exception if offset is negative or greater than the data length,
  3612             // or the count is negative
  3613             if (__ownerDocument__(this).implementation.errorChecking &&
  3614                 ((offset < 0) || (offset > this.data.length) || (count < 0))) {
  3615                 throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3616             }
  3617             // if count is not specified
  3618             if (!count) {
  3619                 ret = this.data.substring(offset); // default to 'end of string'
  3620             }else{
  3621                 ret = this.data.substring(offset, offset + count);
  3622             }
  3623         }
  3624         return ret;
  3625     },
  3626     toString : function(){
  3627         return "[object CharacterData]";
  3628     }
  3629 });
  3630 
  3631 /**
  3632  * @class  Text
  3633  *      The Text interface represents the textual content (termed
  3634  *      character data in XML) of an Element or Attr.
  3635  *      If there is no markup inside an element's content, the text is
  3636  *      contained in a single object implementing the Text interface that
  3637  *      is the only child of the element. If there is markup, it is
  3638  *      parsed into a list of elements and Text nodes that form the
  3639  *      list of children of the element.
  3640  * @extends CharacterData
  3641  * @param  ownerDocument The Document object associated with this node.
  3642  */
  3643 Text = function(ownerDocument) {
  3644     CharacterData.apply(this, arguments);
  3645     this.nodeName  = "#text";
  3646 };
  3647 Text.prototype = new CharacterData();
  3648 __extend__(Text.prototype,{
  3649     get localName(){
  3650         return null;
  3651     },
  3652     // Breaks this Text node into two Text nodes at the specified offset,
  3653     // keeping both in the tree as siblings. This node then only contains
  3654     // all the content up to the offset point.  And a new Text node, which
  3655     // is inserted as the next sibling of this node, contains all the
  3656     // content at and after the offset point.
  3657     splitText : function(offset) {
  3658         var data,
  3659             inode;
  3660         // test for exceptions
  3661         if (__ownerDocument__(this).implementation.errorChecking) {
  3662             // throw Exception if Node is readonly
  3663             if (this._readonly) {
  3664               throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3665             }
  3666             // throw Exception if offset is negative or greater than the data length,
  3667             if ((offset < 0) || (offset > this.data.length)) {
  3668               throw(new DOMException(DOMException.INDEX_SIZE_ERR));
  3669             }
  3670         }
  3671         if (this.parentNode) {
  3672             // get remaining string (after offset)
  3673             data  = this.substringData(offset);
  3674             // create new TextNode with remaining string
  3675             inode = __ownerDocument__(this).createTextNode(data);
  3676             // attach new TextNode
  3677             if (this.nextSibling) {
  3678               this.parentNode.insertBefore(inode, this.nextSibling);
  3679             } else {
  3680               this.parentNode.appendChild(inode);
  3681             }
  3682             // remove remaining string from original TextNode
  3683             this.deleteData(offset);
  3684         }
  3685         return inode;
  3686     },
  3687     get nodeType(){
  3688         return Node.TEXT_NODE;
  3689     },
  3690     get xml(){
  3691         return __escapeXML__(""+ this.nodeValue);
  3692     },
  3693     toString: function(){
  3694         return "[object Text]";
  3695     }
  3696 });
  3697 
  3698 /**
  3699  * @class CDATASection 
  3700  *      CDATA sections are used to escape blocks of text containing 
  3701  *      characters that would otherwise be regarded as markup.
  3702  *      The only delimiter that is recognized in a CDATA section is 
  3703  *      the "\]\]\>" string that ends the CDATA section
  3704  * @extends Text
  3705  * @param  ownerDocument : The Document object associated with this node.
  3706  */
  3707 CDATASection = function(ownerDocument) {
  3708     Text.apply(this, arguments);
  3709     this.nodeName = '#cdata-section';
  3710 };
  3711 CDATASection.prototype = new Text();
  3712 __extend__(CDATASection.prototype,{
  3713     get nodeType(){
  3714         return Node.CDATA_SECTION_NODE;
  3715     },
  3716     get xml(){
  3717         return "<![CDATA[" + this.nodeValue + "]]>";
  3718     },
  3719     toString : function(){
  3720         return "[object CDATASection]";
  3721     }
  3722 });
  3723 /**
  3724  * @class  Comment
  3725  *      This represents the content of a comment, i.e., all the
  3726  *      characters between the starting '<!--' and ending '-->'
  3727  * @extends CharacterData
  3728  * @param  ownerDocument :  The Document object associated with this node.
  3729  */
  3730 Comment = function(ownerDocument) {
  3731     CharacterData.apply(this, arguments);
  3732     this.nodeName  = "#comment";
  3733 };
  3734 Comment.prototype = new CharacterData();
  3735 __extend__(Comment.prototype, {
  3736     get localName(){
  3737         return null;
  3738     },
  3739     get nodeType(){
  3740         return Node.COMMENT_NODE;
  3741     },
  3742     get xml(){
  3743         return "<!--" + this.nodeValue + "-->";
  3744     },
  3745     toString : function(){
  3746         return "[object Comment]";
  3747     }
  3748 });
  3749 
  3750 
  3751 /**
  3752  * @author envjs team
  3753  * @param {Document} onwnerDocument
  3754  */
  3755 DocumentType = function(ownerDocument) {
  3756     Node.apply(this, arguments);
  3757     this.systemId = null;
  3758     this.publicId = null;
  3759 };
  3760 DocumentType.prototype = new Node();
  3761 __extend__({
  3762     get name(){
  3763         return this.nodeName;
  3764     },
  3765     get entities(){
  3766         return null;
  3767     },
  3768     get internalSubsets(){
  3769         return null;
  3770     },
  3771     get notations(){
  3772         return null;
  3773     },
  3774     toString : function(){
  3775         return "[object DocumentType]";
  3776     }
  3777 });
  3778 
  3779 /**
  3780  * @class  Attr
  3781  *      The Attr interface represents an attribute in an Element object
  3782  * @extends Node
  3783  * @param  ownerDocument : The Document object associated with this node.
  3784  */
  3785 Attr = function(ownerDocument) {
  3786     Node.apply(this, arguments);
  3787     // set when Attr is added to NamedNodeMap
  3788     this.ownerElement = null;
  3789     //TODO: our implementation of Attr is incorrect because we don't
  3790     //      treat the value of the attribute as a child text node.
  3791 };
  3792 Attr.prototype = new Node();
  3793 __extend__(Attr.prototype, {
  3794     // the name of this attribute
  3795     get name(){
  3796         return this.nodeName;
  3797     },
  3798     // the value of the attribute is returned as a string
  3799     get value(){
  3800         return this.nodeValue||'';
  3801     },
  3802     set value(value){
  3803         // throw Exception if Attribute is readonly
  3804         if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
  3805             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3806         }
  3807         // delegate to node
  3808         this.nodeValue = value;
  3809     },
  3810     get textContent(){
  3811         return this.nodeValue;
  3812     },
  3813     set textContent(newText){
  3814         this.nodeValue = newText;
  3815     },
  3816     get specified(){
  3817         return (this !== null && this !== undefined);
  3818     },
  3819     get nodeType(){
  3820         return Node.ATTRIBUTE_NODE;
  3821     },
  3822     get xml() {
  3823         if (this.nodeValue) {
  3824             return  __escapeXML__(this.nodeValue+"");
  3825         } else {
  3826             return '';
  3827         }
  3828     },
  3829     toString : function() {
  3830         return '[object Attr]';
  3831     }
  3832 });
  3833 
  3834 
  3835 /**
  3836  * @class  Element -
  3837  *      By far the vast majority of objects (apart from text)
  3838  *      that authors encounter when traversing a document are
  3839  *      Element nodes.
  3840  * @extends Node
  3841  * @param  ownerDocument : The Document object associated with this node.
  3842  */
  3843 Element = function(ownerDocument) {
  3844     Node.apply(this, arguments);
  3845     this.attributes = new NamedNodeMap(this.ownerDocument, this);
  3846 };
  3847 Element.prototype = new Node();
  3848 __extend__(Element.prototype, {
  3849     // The name of the element.
  3850     get tagName(){
  3851         return this.nodeName;
  3852     },
  3853 
  3854     getAttribute: function(name) {
  3855         var ret = null;
  3856         // if attribute exists, use it
  3857         var attr = this.attributes.getNamedItem(name);
  3858         if (attr) {
  3859             ret = attr.value;
  3860         }
  3861         // if Attribute exists, return its value, otherwise, return null
  3862         return ret;
  3863     },
  3864     setAttribute : function (name, value) {
  3865         // if attribute exists, use it
  3866         var attr = this.attributes.getNamedItem(name);
  3867        //console.log('attr %s', attr);
  3868         //I had to add this check because as the script initializes
  3869         //the id may be set in the constructor, and the html element
  3870         //overrides the id property with a getter/setter.
  3871         if(__ownerDocument__(this)){
  3872             if (attr===null||attr===undefined) {
  3873                 // otherwise create it
  3874                 attr = __ownerDocument__(this).createAttribute(name);
  3875                //console.log('attr %s', attr);
  3876             }
  3877 
  3878 
  3879             // test for exceptions
  3880             if (__ownerDocument__(this).implementation.errorChecking) {
  3881                 // throw Exception if Attribute is readonly
  3882                 if (attr._readonly) {
  3883                     throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3884                 }
  3885 
  3886                 // throw Exception if the value string contains an illegal character
  3887                 if (!__isValidString__(value+'')) {
  3888                     throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  3889                 }
  3890             }
  3891 
  3892             // assign values to properties (and aliases)
  3893             attr.value     = value + '';
  3894 
  3895             // add/replace Attribute in NamedNodeMap
  3896             this.attributes.setNamedItem(attr);
  3897            //console.log('element setNamedItem %s', attr);
  3898         }else{
  3899            console.warn('Element has no owner document '+this.tagName+
  3900                 '\n\t cant set attribute ' + name + ' = '+value );
  3901         }
  3902     },
  3903     removeAttribute : function removeAttribute(name) {
  3904         // delegate to NamedNodeMap.removeNamedItem
  3905         return this.attributes.removeNamedItem(name);
  3906     },
  3907     getAttributeNode : function getAttributeNode(name) {
  3908         // delegate to NamedNodeMap.getNamedItem
  3909         return this.attributes.getNamedItem(name);
  3910     },
  3911     setAttributeNode: function(newAttr) {
  3912         // if this Attribute is an ID
  3913         if (__isIdDeclaration__(newAttr.name)) {
  3914             this.id = newAttr.value;  // cache ID for getElementById()
  3915         }
  3916         // delegate to NamedNodeMap.setNamedItem
  3917         return this.attributes.setNamedItem(newAttr);
  3918     },
  3919     removeAttributeNode: function(oldAttr) {
  3920       // throw Exception if Attribute is readonly
  3921       if (__ownerDocument__(this).implementation.errorChecking && oldAttr._readonly) {
  3922         throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3923       }
  3924 
  3925       // get item index
  3926       var itemIndex = this.attributes._findItemIndex(oldAttr._id);
  3927 
  3928       // throw Exception if node does not exist in this map
  3929       if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
  3930         throw(new DOMException(DOMException.NOT_FOUND_ERR));
  3931       }
  3932 
  3933       return this.attributes._removeChild(itemIndex);
  3934     },
  3935     getAttributeNS : function(namespaceURI, localName) {
  3936         var ret = "";
  3937         // delegate to NAmedNodeMap.getNamedItemNS
  3938         var attr = this.attributes.getNamedItemNS(namespaceURI, localName);
  3939         if (attr) {
  3940             ret = attr.value;
  3941         }
  3942         return ret;  // if Attribute exists, return its value, otherwise return ""
  3943     },
  3944     setAttributeNS : function(namespaceURI, qualifiedName, value) {
  3945         // call NamedNodeMap.getNamedItem
  3946         //console.log('setAttributeNS %s %s %s', namespaceURI, qualifiedName, value);
  3947         var attr = this.attributes.getNamedItem(namespaceURI, qualifiedName);
  3948 
  3949         if (!attr) {  // if Attribute exists, use it
  3950             // otherwise create it
  3951             attr = __ownerDocument__(this).createAttributeNS(namespaceURI, qualifiedName);
  3952         }
  3953 
  3954         value = '' + value;
  3955 
  3956         // test for exceptions
  3957         if (__ownerDocument__(this).implementation.errorChecking) {
  3958             // throw Exception if Attribute is readonly
  3959             if (attr._readonly) {
  3960                 throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  3961             }
  3962 
  3963             // throw Exception if the Namespace is invalid
  3964             if (!__isValidNamespace__(this.ownerDocument, namespaceURI, qualifiedName, true)) {
  3965                 throw(new DOMException(DOMException.NAMESPACE_ERR));
  3966             }
  3967 
  3968             // throw Exception if the value string contains an illegal character
  3969             if (!__isValidString__(value)) {
  3970                 throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  3971             }
  3972         }
  3973 
  3974         // if this Attribute is an ID
  3975         //if (__isIdDeclaration__(name)) {
  3976         //    this.id = value;
  3977         //}
  3978 
  3979         // assign values to properties (and aliases)
  3980         attr.value     = value;
  3981         attr.nodeValue = value;
  3982 
  3983         // delegate to NamedNodeMap.setNamedItem
  3984         this.attributes.setNamedItemNS(attr);
  3985     },
  3986     removeAttributeNS : function(namespaceURI, localName) {
  3987         // delegate to NamedNodeMap.removeNamedItemNS
  3988         return this.attributes.removeNamedItemNS(namespaceURI, localName);
  3989     },
  3990     getAttributeNodeNS : function(namespaceURI, localName) {
  3991         // delegate to NamedNodeMap.getNamedItemNS
  3992         return this.attributes.getNamedItemNS(namespaceURI, localName);
  3993     },
  3994     setAttributeNodeNS : function(newAttr) {
  3995         // if this Attribute is an ID
  3996         if ((newAttr.prefix == "") &&  __isIdDeclaration__(newAttr.name)) {
  3997             this.id = newAttr.value+'';  // cache ID for getElementById()
  3998         }
  3999 
  4000         // delegate to NamedNodeMap.setNamedItemNS
  4001         return this.attributes.setNamedItemNS(newAttr);
  4002     },
  4003     hasAttribute : function(name) {
  4004         // delegate to NamedNodeMap._hasAttribute
  4005         return __hasAttribute__(this.attributes,name);
  4006     },
  4007     hasAttributeNS : function(namespaceURI, localName) {
  4008         // delegate to NamedNodeMap._hasAttributeNS
  4009         return __hasAttributeNS__(this.attributes, namespaceURI, localName);
  4010     },
  4011     get nodeType(){
  4012         return Node.ELEMENT_NODE;
  4013     },
  4014     get xml() {
  4015         var ret = "",
  4016             ns = "",
  4017             attrs,
  4018             attrstring,
  4019             i;
  4020 
  4021         // serialize namespace declarations
  4022         if (this.namespaceURI ){
  4023             if((this === this.ownerDocument.documentElement) ||
  4024                (!this.parentNode)||
  4025                (this.parentNode && (this.parentNode.namespaceURI !== this.namespaceURI))) {
  4026                 ns = ' xmlns' + (this.prefix?(':'+this.prefix):'') +
  4027                     '="' + this.namespaceURI + '"';
  4028             }
  4029         }
  4030 
  4031         // serialize Attribute declarations
  4032         attrs = this.attributes;
  4033         attrstring = "";
  4034         for(i=0;i< attrs.length;i++){
  4035             if(attrs[i].name.match('xmlns:')) {
  4036                 attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
  4037             }
  4038         }
  4039         for(i=0;i< attrs.length;i++){
  4040             if(!attrs[i].name.match('xmlns:')) {
  4041                 attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
  4042             }
  4043         }
  4044 
  4045         if(this.hasChildNodes()){
  4046             // serialize this Element
  4047             ret += "<" + this.tagName + ns + attrstring +">";
  4048             ret += this.childNodes.xml;
  4049             ret += "</" + this.tagName + ">";
  4050         }else{
  4051             ret += "<" + this.tagName + ns + attrstring +"/>";
  4052         }
  4053 
  4054         return ret;
  4055     },
  4056     toString : function(){
  4057         return '[object Element]';
  4058     }
  4059 });
  4060 /**
  4061  * @class  DOMException - raised when an operation is impossible to perform
  4062  * @author Jon van Noort (jon@webarcana.com.au)
  4063  * @param  code : int - the exception code (one of the DOMException constants)
  4064  */
  4065 DOMException = function(code) {
  4066     this.code = code;
  4067 };
  4068 
  4069 // DOMException constants
  4070 // Introduced in DOM Level 1:
  4071 DOMException.INDEX_SIZE_ERR                 = 1;
  4072 DOMException.DOMSTRING_SIZE_ERR             = 2;
  4073 DOMException.HIERARCHY_REQUEST_ERR          = 3;
  4074 DOMException.WRONG_DOCUMENT_ERR             = 4;
  4075 DOMException.INVALID_CHARACTER_ERR          = 5;
  4076 DOMException.NO_DATA_ALLOWED_ERR            = 6;
  4077 DOMException.NO_MODIFICATION_ALLOWED_ERR    = 7;
  4078 DOMException.NOT_FOUND_ERR                  = 8;
  4079 DOMException.NOT_SUPPORTED_ERR              = 9;
  4080 DOMException.INUSE_ATTRIBUTE_ERR            = 10;
  4081 
  4082 // Introduced in DOM Level 2:
  4083 DOMException.INVALID_STATE_ERR              = 11;
  4084 DOMException.SYNTAX_ERR                     = 12;
  4085 DOMException.INVALID_MODIFICATION_ERR       = 13;
  4086 DOMException.NAMESPACE_ERR                  = 14;
  4087 DOMException.INVALID_ACCESS_ERR             = 15;
  4088 
  4089 /**
  4090  * @class  DocumentFragment -
  4091  *      DocumentFragment is a "lightweight" or "minimal" Document object.
  4092  * @extends Node
  4093  * @param  ownerDocument :  The Document object associated with this node.
  4094  */
  4095 DocumentFragment = function(ownerDocument) {
  4096     Node.apply(this, arguments);
  4097     this.nodeName  = "#document-fragment";
  4098 };
  4099 DocumentFragment.prototype = new Node();
  4100 __extend__(DocumentFragment.prototype,{
  4101     get nodeType(){
  4102         return Node.DOCUMENT_FRAGMENT_NODE;
  4103     },
  4104     get xml(){
  4105         var xml = "",
  4106         count = this.childNodes.length;
  4107 
  4108         // create string concatenating the serialized ChildNodes
  4109         for (var i = 0; i < count; i++) {
  4110             xml += this.childNodes.item(i).xml;
  4111         }
  4112 
  4113         return xml;
  4114     },
  4115     toString : function(){
  4116         return "[object DocumentFragment]";
  4117     },
  4118     get localName(){
  4119         return null;
  4120     }
  4121 });
  4122 
  4123 
  4124 /**
  4125  * @class  ProcessingInstruction -
  4126  *      The ProcessingInstruction interface represents a
  4127  *      "processing instruction", used in XML as a way to
  4128  *      keep processor-specific information in the text of
  4129  *      the document
  4130  * @extends Node
  4131  * @author Jon van Noort (jon@webarcana.com.au)
  4132  * @param  ownerDocument :  The Document object associated with this node.
  4133  */
  4134 ProcessingInstruction = function(ownerDocument) {
  4135     Node.apply(this, arguments);
  4136 };
  4137 ProcessingInstruction.prototype = new Node();
  4138 __extend__(ProcessingInstruction.prototype, {
  4139     get data(){
  4140         return this.nodeValue;
  4141     },
  4142     set data(data){
  4143         // throw Exception if Node is readonly
  4144         if (__ownerDocument__(this).errorChecking && this._readonly) {
  4145             throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
  4146         }
  4147         this.nodeValue = data;
  4148     },
  4149     get textContent(){
  4150         return this.data;
  4151     },
  4152     get localName(){
  4153         return null;
  4154     },
  4155     get target(){
  4156       // The target of this processing instruction.
  4157       // XML defines this as being the first token following the markup that begins the processing instruction.
  4158       // The content of this processing instruction.
  4159         return this.nodeName;
  4160     },
  4161     set target(value){
  4162       // The target of this processing instruction.
  4163       // XML defines this as being the first token following the markup that begins the processing instruction.
  4164       // The content of this processing instruction.
  4165         this.nodeName = value;
  4166     },
  4167     get nodeType(){
  4168         return Node.PROCESSING_INSTRUCTION_NODE;
  4169     },
  4170     get xml(){
  4171         return "<?" + this.nodeName +" "+ this.nodeValue + "?>";
  4172     },
  4173     toString : function(){
  4174         return "[object ProcessingInstruction]";
  4175     }
  4176 });
  4177 
  4178 
  4179 /**
  4180  * @author envjs team
  4181  */
  4182 
  4183 Entity = function() {
  4184     throw new Error("Entity Not Implemented" );
  4185 };
  4186 
  4187 Entity.constants = {
  4188         // content taken from W3C "HTML 4.01 Specification"
  4189         //                        "W3C Recommendation 24 December 1999"
  4190 
  4191     nbsp: "\u00A0",
  4192     iexcl: "\u00A1",
  4193     cent: "\u00A2",
  4194     pound: "\u00A3",
  4195     curren: "\u00A4",
  4196     yen: "\u00A5",
  4197     brvbar: "\u00A6",
  4198     sect: "\u00A7",
  4199     uml: "\u00A8",
  4200     copy: "\u00A9",
  4201     ordf: "\u00AA",
  4202     laquo: "\u00AB",
  4203     not: "\u00AC",
  4204     shy: "\u00AD",
  4205     reg: "\u00AE",
  4206     macr: "\u00AF",
  4207     deg: "\u00B0",
  4208     plusmn: "\u00B1",
  4209     sup2: "\u00B2",
  4210     sup3: "\u00B3",
  4211     acute: "\u00B4",
  4212     micro: "\u00B5",
  4213     para: "\u00B6",
  4214     middot: "\u00B7",
  4215     cedil: "\u00B8",
  4216     sup1: "\u00B9",
  4217     ordm: "\u00BA",
  4218     raquo: "\u00BB",
  4219     frac14: "\u00BC",
  4220     frac12: "\u00BD",
  4221     frac34: "\u00BE",
  4222     iquest: "\u00BF",
  4223     Agrave: "\u00C0",
  4224     Aacute: "\u00C1",
  4225     Acirc: "\u00C2",
  4226     Atilde: "\u00C3",
  4227     Auml: "\u00C4",
  4228     Aring: "\u00C5",
  4229     AElig: "\u00C6",
  4230     Ccedil: "\u00C7",
  4231     Egrave: "\u00C8",
  4232     Eacute: "\u00C9",
  4233     Ecirc: "\u00CA",
  4234     Euml: "\u00CB",
  4235     Igrave: "\u00CC",
  4236     Iacute: "\u00CD",
  4237     Icirc: "\u00CE",
  4238     Iuml: "\u00CF",
  4239     ETH: "\u00D0",
  4240     Ntilde: "\u00D1",
  4241     Ograve: "\u00D2",
  4242     Oacute: "\u00D3",
  4243     Ocirc: "\u00D4",
  4244     Otilde: "\u00D5",
  4245     Ouml: "\u00D6",
  4246     times: "\u00D7",
  4247     Oslash: "\u00D8",
  4248     Ugrave: "\u00D9",
  4249     Uacute: "\u00DA",
  4250     Ucirc: "\u00DB",
  4251     Uuml: "\u00DC",
  4252     Yacute: "\u00DD",
  4253     THORN: "\u00DE",
  4254     szlig: "\u00DF",
  4255     agrave: "\u00E0",
  4256     aacute: "\u00E1",
  4257     acirc: "\u00E2",
  4258     atilde: "\u00E3",
  4259     auml: "\u00E4",
  4260     aring: "\u00E5",
  4261     aelig: "\u00E6",
  4262     ccedil: "\u00E7",
  4263     egrave: "\u00E8",
  4264     eacute: "\u00E9",
  4265     ecirc: "\u00EA",
  4266     euml: "\u00EB",
  4267     igrave: "\u00EC",
  4268     iacute: "\u00ED",
  4269     icirc: "\u00EE",
  4270     iuml: "\u00EF",
  4271     eth: "\u00F0",
  4272     ntilde: "\u00F1",
  4273     ograve: "\u00F2",
  4274     oacute: "\u00F3",
  4275     ocirc: "\u00F4",
  4276     otilde: "\u00F5",
  4277     ouml: "\u00F6",
  4278     divide: "\u00F7",
  4279     oslash: "\u00F8",
  4280     ugrave: "\u00F9",
  4281     uacute: "\u00FA",
  4282     ucirc: "\u00FB",
  4283     uuml: "\u00FC",
  4284     yacute: "\u00FD",
  4285     thorn: "\u00FE",
  4286     yuml: "\u00FF",
  4287     fnof: "\u0192",
  4288     Alpha: "\u0391",
  4289     Beta: "\u0392",
  4290     Gamma: "\u0393",
  4291     Delta: "\u0394",
  4292     Epsilon: "\u0395",
  4293     Zeta: "\u0396",
  4294     Eta: "\u0397",
  4295     Theta: "\u0398",
  4296     Iota: "\u0399",
  4297     Kappa: "\u039A",
  4298     Lambda: "\u039B",
  4299     Mu: "\u039C",
  4300     Nu: "\u039D",
  4301     Xi: "\u039E",
  4302     Omicron: "\u039F",
  4303     Pi: "\u03A0",
  4304     Rho: "\u03A1",
  4305     Sigma: "\u03A3",
  4306     Tau: "\u03A4",
  4307     Upsilon: "\u03A5",
  4308     Phi: "\u03A6",
  4309     Chi: "\u03A7",
  4310     Psi: "\u03A8",
  4311     Omega: "\u03A9",
  4312     alpha: "\u03B1",
  4313     beta: "\u03B2",
  4314     gamma: "\u03B3",
  4315     delta: "\u03B4",
  4316     epsilon: "\u03B5",
  4317     zeta: "\u03B6",
  4318     eta: "\u03B7",
  4319     theta: "\u03B8",
  4320     iota: "\u03B9",
  4321     kappa: "\u03BA",
  4322     lambda: "\u03BB",
  4323     mu: "\u03BC",
  4324     nu: "\u03BD",
  4325     xi: "\u03BE",
  4326     omicron: "\u03BF",
  4327     pi: "\u03C0",
  4328     rho: "\u03C1",
  4329     sigmaf: "\u03C2",
  4330     sigma: "\u03C3",
  4331     tau: "\u03C4",
  4332     upsilon: "\u03C5",
  4333     phi: "\u03C6",
  4334     chi: "\u03C7",
  4335     psi: "\u03C8",
  4336     omega: "\u03C9",
  4337     thetasym: "\u03D1",
  4338     upsih: "\u03D2",
  4339     piv: "\u03D6",
  4340     bull: "\u2022",
  4341     hellip: "\u2026",
  4342     prime: "\u2032",
  4343     Prime: "\u2033",
  4344     oline: "\u203E",
  4345     frasl: "\u2044",
  4346     weierp: "\u2118",
  4347     image: "\u2111",
  4348     real: "\u211C",
  4349     trade: "\u2122",
  4350     alefsym: "\u2135",
  4351     larr: "\u2190",
  4352     uarr: "\u2191",
  4353     rarr: "\u2192",
  4354     darr: "\u2193",
  4355     harr: "\u2194",
  4356     crarr: "\u21B5",
  4357     lArr: "\u21D0",
  4358     uArr: "\u21D1",
  4359     rArr: "\u21D2",
  4360     dArr: "\u21D3",
  4361     hArr: "\u21D4",
  4362     forall: "\u2200",
  4363     part: "\u2202",
  4364     exist: "\u2203",
  4365     empty: "\u2205",
  4366     nabla: "\u2207",
  4367     isin: "\u2208",
  4368     notin: "\u2209",
  4369     ni: "\u220B",
  4370     prod: "\u220F",
  4371     sum: "\u2211",
  4372     minus: "\u2212",
  4373     lowast: "\u2217",
  4374     radic: "\u221A",
  4375     prop: "\u221D",
  4376     infin: "\u221E",
  4377     ang: "\u2220",
  4378     and: "\u2227",
  4379     or: "\u2228",
  4380     cap: "\u2229",
  4381     cup: "\u222A",
  4382     intXX: "\u222B",
  4383     there4: "\u2234",
  4384     sim: "\u223C",
  4385     cong: "\u2245",
  4386     asymp: "\u2248",
  4387     ne: "\u2260",
  4388     equiv: "\u2261",
  4389     le: "\u2264",
  4390     ge: "\u2265",
  4391     sub: "\u2282",
  4392     sup: "\u2283",
  4393     nsub: "\u2284",
  4394     sube: "\u2286",
  4395     supe: "\u2287",
  4396     oplus: "\u2295",
  4397     otimes: "\u2297",
  4398     perp: "\u22A5",
  4399     sdot: "\u22C5",
  4400     lceil: "\u2308",
  4401     rceil: "\u2309",
  4402     lfloor: "\u230A",
  4403     rfloor: "\u230B",
  4404     lang: "\u2329",
  4405     rang: "\u232A",
  4406     loz: "\u25CA",
  4407     spades: "\u2660",
  4408     clubs: "\u2663",
  4409     hearts: "\u2665",
  4410     diams: "\u2666",
  4411     quot: "\u0022",
  4412     amp: "\u0026",
  4413     lt: "\u003C",
  4414     gt: "\u003E",
  4415     OElig: "\u0152",
  4416     oelig: "\u0153",
  4417     Scaron: "\u0160",
  4418     scaron: "\u0161",
  4419     Yuml: "\u0178",
  4420     circ: "\u02C6",
  4421     tilde: "\u02DC",
  4422     ensp: "\u2002",
  4423     emsp: "\u2003",
  4424     thinsp: "\u2009",
  4425     zwnj: "\u200C",
  4426     zwj: "\u200D",
  4427     lrm: "\u200E",
  4428     rlm: "\u200F",
  4429     ndash: "\u2013",
  4430     mdash: "\u2014",
  4431     lsquo: "\u2018",
  4432     rsquo: "\u2019",
  4433     sbquo: "\u201A",
  4434     ldquo: "\u201C",
  4435     rdquo: "\u201D",
  4436     bdquo: "\u201E",
  4437     dagger: "\u2020",
  4438     Dagger: "\u2021",
  4439     permil: "\u2030",
  4440     lsaquo: "\u2039",
  4441     rsaquo: "\u203A",
  4442     euro: "\u20AC",
  4443 
  4444     // non-standard entities
  4445     apos: "'"
  4446 };
  4447 
  4448 /**
  4449  * @author envjs team
  4450  */
  4451 
  4452 EntityReference = function() {
  4453     throw new Error("EntityReference Not Implemented" );
  4454 };
  4455 
  4456 /**
  4457  * @class  DOMImplementation -
  4458  *      provides a number of methods for performing operations
  4459  *      that are independent of any particular instance of the
  4460  *      document object model.
  4461  *
  4462  * @author Jon van Noort (jon@webarcana.com.au)
  4463  */
  4464 DOMImplementation = function() {
  4465     this.preserveWhiteSpace = false;  // by default, ignore whitespace
  4466     this.namespaceAware = true;       // by default, handle namespaces
  4467     this.errorChecking  = true;      // by default, test for exceptions
  4468 };
  4469 
  4470 __extend__(DOMImplementation.prototype,{
  4471     // @param  feature : string - The package name of the feature to test.
  4472     //      the legal only values are "XML" and "CORE" (case-insensitive).
  4473     // @param  version : string - This is the version number of the package
  4474     //       name to test. In Level 1, this is the string "1.0".*
  4475     // @return : boolean
  4476     hasFeature : function(feature, version) {
  4477         var ret = false;
  4478         if (feature.toLowerCase() == "xml") {
  4479             ret = (!version || (version == "1.0") || (version == "2.0"));
  4480         }
  4481         else if (feature.toLowerCase() == "core") {
  4482             ret = (!version || (version == "2.0"));
  4483         }
  4484         else if (feature == "http://www.w3.org/TR/SVG11/feature#BasicStructure") {
  4485             ret = (version == "1.1");
  4486         }
  4487         return ret;
  4488     },
  4489     createDocumentType : function(qname, publicId, systemId){
  4490         var doctype = new DocumentType();
  4491         doctype.nodeName = qname?qname.toUpperCase():null;
  4492         doctype.publicId = publicId?publicId:null;
  4493         doctype.systemId = systemId?systemId:null;
  4494         return doctype;
  4495     },
  4496     createDocument : function(nsuri, qname, doctype){
  4497 
  4498         var doc = null, documentElement;
  4499 
  4500         doc = new Document(this, null);
  4501         if(doctype){
  4502             doc.doctype = doctype;
  4503         }
  4504 
  4505         if(nsuri && qname){
  4506             documentElement = doc.createElementNS(nsuri, qname);
  4507         }else if(qname){
  4508             documentElement = doc.createElement(qname);
  4509         }
  4510         if(documentElement){
  4511             doc.appendChild(documentElement);
  4512         }
  4513         return doc;
  4514     },
  4515     createHTMLDocument : function(title){
  4516         var doc = new HTMLDocument($implementation, null, "");
  4517         var html = doc.createElement("html"); doc.appendChild(html);
  4518         var head = doc.createElement("head"); html.appendChild(head);
  4519         var body = doc.createElement("body"); html.appendChild(body);
  4520         var t = doc.createElement("title"); head.appendChild(t);
  4521         if( title) {
  4522             t.appendChild(doc.createTextNode(title));
  4523         }
  4524         return doc;
  4525     },
  4526     translateErrCode : function(code) {
  4527         //convert DOMException Code to human readable error message;
  4528       var msg = "";
  4529 
  4530       switch (code) {
  4531         case DOMException.INDEX_SIZE_ERR :                // 1
  4532            msg = "INDEX_SIZE_ERR: Index out of bounds";
  4533            break;
  4534 
  4535         case DOMException.DOMSTRING_SIZE_ERR :            // 2
  4536            msg = "DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a DOMString";
  4537            break;
  4538 
  4539         case DOMException.HIERARCHY_REQUEST_ERR :         // 3
  4540            msg = "HIERARCHY_REQUEST_ERR: The Node can not be inserted at this location";
  4541            break;
  4542 
  4543         case DOMException.WRONG_DOCUMENT_ERR :            // 4
  4544            msg = "WRONG_DOCUMENT_ERR: The source and the destination Documents are not the same";
  4545            break;
  4546 
  4547         case DOMException.INVALID_CHARACTER_ERR :         // 5
  4548            msg = "INVALID_CHARACTER_ERR: The string contains an invalid character";
  4549            break;
  4550 
  4551         case DOMException.NO_DATA_ALLOWED_ERR :           // 6
  4552            msg = "NO_DATA_ALLOWED_ERR: This Node / NodeList does not support data";
  4553            break;
  4554 
  4555         case DOMException.NO_MODIFICATION_ALLOWED_ERR :   // 7
  4556            msg = "NO_MODIFICATION_ALLOWED_ERR: This object cannot be modified";
  4557            break;
  4558 
  4559         case DOMException.NOT_FOUND_ERR :                 // 8
  4560            msg = "NOT_FOUND_ERR: The item cannot be found";
  4561            break;
  4562 
  4563         case DOMException.NOT_SUPPORTED_ERR :             // 9
  4564            msg = "NOT_SUPPORTED_ERR: This implementation does not support function";
  4565            break;
  4566 
  4567         case DOMException.INUSE_ATTRIBUTE_ERR :           // 10
  4568            msg = "INUSE_ATTRIBUTE_ERR: The Attribute has already been assigned to another Element";
  4569            break;
  4570 
  4571         // Introduced in DOM Level 2:
  4572         case DOMException.INVALID_STATE_ERR :             // 11
  4573            msg = "INVALID_STATE_ERR: The object is no longer usable";
  4574            break;
  4575 
  4576         case DOMException.SYNTAX_ERR :                    // 12
  4577            msg = "SYNTAX_ERR: Syntax error";
  4578            break;
  4579 
  4580         case DOMException.INVALID_MODIFICATION_ERR :      // 13
  4581            msg = "INVALID_MODIFICATION_ERR: Cannot change the type of the object";
  4582            break;
  4583 
  4584         case DOMException.NAMESPACE_ERR :                 // 14
  4585            msg = "NAMESPACE_ERR: The namespace declaration is incorrect";
  4586            break;
  4587 
  4588         case DOMException.INVALID_ACCESS_ERR :            // 15
  4589            msg = "INVALID_ACCESS_ERR: The object does not support this function";
  4590            break;
  4591 
  4592         default :
  4593            msg = "UNKNOWN: Unknown Exception Code ("+ code +")";
  4594       }
  4595 
  4596       return msg;
  4597     },
  4598     toString : function(){
  4599         return "[object DOMImplementation]";
  4600     }
  4601 });
  4602 
  4603 
  4604 
  4605 /**
  4606  * @method DOMImplementation._isNamespaceDeclaration - Return true, if attributeName is a namespace declaration
  4607  * @author Jon van Noort (jon@webarcana.com.au)
  4608  * @param  attributeName : string - the attribute name
  4609  * @return : boolean
  4610  */
  4611 function __isNamespaceDeclaration__(attributeName) {
  4612   // test if attributeName is 'xmlns'
  4613   return (attributeName.indexOf('xmlns') > -1);
  4614 }
  4615 
  4616 /**
  4617  * @method DOMImplementation._isIdDeclaration - Return true, if attributeName is an id declaration
  4618  * @author Jon van Noort (jon@webarcana.com.au)
  4619  * @param  attributeName : string - the attribute name
  4620  * @return : boolean
  4621  */
  4622 function __isIdDeclaration__(attributeName) {
  4623   // test if attributeName is 'id' (case insensitive)
  4624   return attributeName?(attributeName.toLowerCase() == 'id'):false;
  4625 }
  4626 
  4627 /**
  4628  * @method DOMImplementation._isValidName - Return true,
  4629  *   if name contains no invalid characters
  4630  * @author Jon van Noort (jon@webarcana.com.au)
  4631  * @param  name : string - the candidate name
  4632  * @return : boolean
  4633  */
  4634 function __isValidName__(name) {
  4635   // test if name contains only valid characters
  4636   return name.match(re_validName);
  4637 }
  4638 var re_validName = /^[a-zA-Z_:][a-zA-Z0-9\.\-_:]*$/;
  4639 
  4640 /**
  4641  * @method DOMImplementation._isValidString - Return true, if string does not contain any illegal chars
  4642  *  All of the characters 0 through 31 and character 127 are nonprinting control characters.
  4643  *  With the exception of characters 09, 10, and 13, (Ox09, Ox0A, and Ox0D)
  4644  *  Note: different from _isValidName in that ValidStrings may contain spaces
  4645  * @author Jon van Noort (jon@webarcana.com.au)
  4646  * @param  name : string - the candidate string
  4647  * @return : boolean
  4648  */
  4649 function __isValidString__(name) {
  4650   // test that string does not contains invalid characters
  4651   return (name.search(re_invalidStringChars) < 0);
  4652 }
  4653 var re_invalidStringChars = /\x01|\x02|\x03|\x04|\x05|\x06|\x07|\x08|\x0B|\x0C|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F|\x7F/;
  4654 
  4655 /**
  4656  * @method DOMImplementation._parseNSName - parse the namespace name.
  4657  *  if there is no colon, the
  4658  * @author Jon van Noort (jon@webarcana.com.au)
  4659  * @param  qualifiedName : string - The qualified name
  4660  * @return : NSName - [
  4661          .prefix        : string - The prefix part of the qname
  4662          .namespaceName : string - The namespaceURI part of the qname
  4663     ]
  4664  */
  4665 function __parseNSName__(qualifiedName) {
  4666     var resultNSName = {};
  4667     // unless the qname has a namespaceName, the prefix is the entire String
  4668     resultNSName.prefix          = qualifiedName;
  4669     resultNSName.namespaceName   = "";
  4670     // split on ':'
  4671     var delimPos = qualifiedName.indexOf(':');
  4672     if (delimPos > -1) {
  4673         // get prefix
  4674         resultNSName.prefix        = qualifiedName.substring(0, delimPos);
  4675         // get namespaceName
  4676         resultNSName.namespaceName = qualifiedName.substring(delimPos +1, qualifiedName.length);
  4677     }
  4678     return resultNSName;
  4679 }
  4680 
  4681 /**
  4682  * @method DOMImplementation._parseQName - parse the qualified name
  4683  * @author Jon van Noort (jon@webarcana.com.au)
  4684  * @param  qualifiedName : string - The qualified name
  4685  * @return : QName
  4686  */
  4687 function __parseQName__(qualifiedName) {
  4688     var resultQName = {};
  4689     // unless the qname has a prefix, the local name is the entire String
  4690     resultQName.localName = qualifiedName;
  4691     resultQName.prefix    = "";
  4692     // split on ':'
  4693     var delimPos = qualifiedName.indexOf(':');
  4694     if (delimPos > -1) {
  4695         // get prefix
  4696         resultQName.prefix    = qualifiedName.substring(0, delimPos);
  4697         // get localName
  4698         resultQName.localName = qualifiedName.substring(delimPos +1, qualifiedName.length);
  4699     }
  4700     return resultQName;
  4701 }
  4702 /**
  4703  * @author envjs team
  4704  */
  4705 Notation = function() {
  4706     throw new Error("Notation Not Implemented" );
  4707 };/**
  4708  * @author thatcher
  4709  */
  4710 Range = function(){
  4711 
  4712 };
  4713 
  4714 __extend__(Range.prototype, {
  4715     get startContainer(){
  4716 
  4717     },
  4718     get endContainer(){
  4719 
  4720     },
  4721     get startOffset(){
  4722 
  4723     },
  4724     get endOffset(){
  4725 
  4726     },
  4727     get collapsed(){
  4728 
  4729     },
  4730     get commonAncestorContainer(){
  4731 
  4732     },
  4733     setStart: function(refNode, offset){//throws RangeException
  4734 
  4735     },
  4736     setEnd: function(refNode, offset){//throws RangeException
  4737     
  4738     },
  4739     setStartBefore: function(refNode){//throws RangeException
  4740     
  4741     },
  4742     setStartAfter: function(refNode){//throws RangeException
  4743     
  4744     },
  4745     setEndBefore: function(refNode){//throws RangeException
  4746     
  4747     },
  4748     setEndAfter: function(refNode){//throws RangeException
  4749     
  4750     },
  4751     collapse: function(toStart){//throws RangeException
  4752     
  4753     },
  4754     selectNode: function(refNode){//throws RangeException
  4755     
  4756     },
  4757     selectNodeContents: function(refNode){//throws RangeException
  4758     
  4759     },
  4760     compareBoundaryPoints: function(how, sourceRange){
  4761 
  4762     },
  4763     deleteContents: function(){
  4764 
  4765     },
  4766     extractContents: function(){
  4767 
  4768     },
  4769     cloneContents: function(){
  4770 
  4771     },
  4772     insertNode: function(newNode){
  4773 
  4774     },
  4775     surroundContents: function(newParent){
  4776 
  4777     },
  4778     cloneRange: function(){
  4779 
  4780     },
  4781     toString: function(){
  4782         return '[object Range]';
  4783     },
  4784     detach: function(){
  4785 
  4786     }
  4787 });
  4788 
  4789 
  4790   // CompareHow
  4791 Range.START_TO_START                 = 0;
  4792 Range.START_TO_END                   = 1;
  4793 Range.END_TO_END                     = 2;
  4794 Range.END_TO_START                   = 3;
  4795   
  4796 /*
  4797  * Forward declarations
  4798  */
  4799 var __isValidNamespace__;
  4800 
  4801 /**
  4802  * @class  Document - The Document interface represents the entire HTML
  4803  *      or XML document. Conceptually, it is the root of the document tree,
  4804  *      and provides the primary access to the document's data.
  4805  *
  4806  * @extends Node
  4807  * @param  implementation : DOMImplementation - the creator Implementation
  4808  */
  4809 Document = function(implementation, docParentWindow) {
  4810     Node.apply(this, arguments);
  4811 
  4812     //TODO: Temporary!!! Cnage back to true!!!
  4813     this.async = true;
  4814     // The Document Type Declaration (see DocumentType) associated with this document
  4815     this.doctype = null;
  4816     // The DOMImplementation object that handles this document.
  4817     this.implementation = implementation;
  4818 
  4819     this.nodeName  = "#document";
  4820     // initially false, set to true by parser
  4821     this.parsing = false;
  4822     this.baseURI = 'about:blank';
  4823 
  4824     this.ownerDocument = null;
  4825 
  4826     this.importing = false;
  4827 };
  4828 
  4829 Document.prototype = new Node();
  4830 __extend__(Document.prototype,{
  4831     get localName(){
  4832         return null;
  4833     },
  4834     get textContent(){
  4835         return null;
  4836     },
  4837     get all(){
  4838         return this.getElementsByTagName("*");
  4839     },
  4840     get documentElement(){
  4841         var i, length = this.childNodes?this.childNodes.length:0;
  4842         for(i=0;i<length;i++){
  4843             if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
  4844                 return this.childNodes[i];
  4845             }
  4846         }
  4847         return null;
  4848     },
  4849     get documentURI(){
  4850         return this.baseURI;
  4851     },
  4852     createExpression: function(xpath, nsuriMap){
  4853         return new XPathExpression(xpath, nsuriMap);
  4854     },
  4855     createDocumentFragment: function() {
  4856         var node = new DocumentFragment(this);
  4857         return node;
  4858     },
  4859     createTextNode: function(data) {
  4860         var node = new Text(this);
  4861         node.data = data;
  4862         return node;
  4863     },
  4864     createComment: function(data) {
  4865         var node = new Comment(this);
  4866         node.data = data;
  4867         return node;
  4868     },
  4869     createCDATASection : function(data) {
  4870         var node = new CDATASection(this);
  4871         node.data = data;
  4872         return node;
  4873     },
  4874     createProcessingInstruction: function(target, data) {
  4875         // throw Exception if the target string contains an illegal character
  4876         if (__ownerDocument__(this).implementation.errorChecking &&
  4877             (!__isValidName__(target))) {
  4878             throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  4879         }
  4880 
  4881         var node = new ProcessingInstruction(this);
  4882         node.target = target;
  4883         node.data = data;
  4884         return node;
  4885     },
  4886     createElement: function(tagName) {
  4887         // throw Exception if the tagName string contains an illegal character
  4888         if (__ownerDocument__(this).implementation.errorChecking &&
  4889             (!__isValidName__(tagName))) {
  4890             throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  4891         }
  4892         var node = new Element(this);
  4893         node.nodeName = tagName;
  4894         return node;
  4895     },
  4896     createElementNS : function(namespaceURI, qualifiedName) {
  4897         //we use this as a parser flag to ignore the xhtml
  4898         //namespace assumed by the parser
  4899         //console.log('creating element %s %s', namespaceURI, qualifiedName);
  4900         if(this.baseURI === 'http://envjs.com/xml' &&
  4901             namespaceURI === 'http://www.w3.org/1999/xhtml'){
  4902             return this.createElement(qualifiedName);
  4903         }
  4904         //console.log('createElementNS %s %s', namespaceURI, qualifiedName);
  4905         if (__ownerDocument__(this).implementation.errorChecking) {
  4906             // throw Exception if the Namespace is invalid
  4907             if (!__isValidNamespace__(this, namespaceURI, qualifiedName)) {
  4908                 throw(new DOMException(DOMException.NAMESPACE_ERR));
  4909             }
  4910 
  4911             // throw Exception if the qualifiedName string contains an illegal character
  4912             if (!__isValidName__(qualifiedName)) {
  4913                 throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  4914             }
  4915         }
  4916         var node  = new Element(this);
  4917         var qname = __parseQName__(qualifiedName);
  4918         node.namespaceURI = namespaceURI;
  4919         node.prefix       = qname.prefix;
  4920         node.nodeName     = qualifiedName;
  4921 
  4922         //console.log('created element %s %s', namespaceURI, qualifiedName);
  4923         return node;
  4924     },
  4925     createAttribute : function(name) {
  4926         //console.log('createAttribute %s ', name);
  4927         // throw Exception if the name string contains an illegal character
  4928         if (__ownerDocument__(this).implementation.errorChecking &&
  4929             (!__isValidName__(name))) {
  4930             throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  4931         }
  4932         var node = new Attr(this);
  4933         node.nodeName = name;
  4934         return node;
  4935     },
  4936     createAttributeNS : function(namespaceURI, qualifiedName) {
  4937         //we use this as a parser flag to ignore the xhtml
  4938         //namespace assumed by the parser
  4939         if(this.baseURI === 'http://envjs.com/xml' &&
  4940             namespaceURI === 'http://www.w3.org/1999/xhtml'){
  4941             return this.createAttribute(qualifiedName);
  4942         }
  4943         //console.log('createAttributeNS %s %s', namespaceURI, qualifiedName);
  4944         // test for exceptions
  4945         if (this.implementation.errorChecking) {
  4946             // throw Exception if the Namespace is invalid
  4947             if (!__isValidNamespace__(this, namespaceURI, qualifiedName, true)) {
  4948                 throw(new DOMException(DOMException.NAMESPACE_ERR));
  4949             }
  4950 
  4951             // throw Exception if the qualifiedName string contains an illegal character
  4952             if (!__isValidName__(qualifiedName)) {
  4953                 throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
  4954             }
  4955         }
  4956         var node  = new Attr(this);
  4957         var qname = __parseQName__(qualifiedName);
  4958         node.namespaceURI = namespaceURI === '' ? null : namespaceURI;
  4959         node.prefix       = qname.prefix;
  4960         node.nodeName     = qualifiedName;
  4961         node.nodeValue    = "";
  4962         //console.log('attribute %s %s %s', node.namespaceURI, node.prefix, node.nodeName);
  4963         return node;
  4964     },
  4965     createNamespace : function(qualifiedName) {
  4966         //console.log('createNamespace %s', qualifiedName);
  4967         // create Namespace specifying 'this' as ownerDocument
  4968         var node  = new Namespace(this);
  4969         var qname = __parseQName__(qualifiedName);
  4970 
  4971         // assign values to properties (and aliases)
  4972         node.prefix       = qname.prefix;
  4973         node.localName    = qname.localName;
  4974         node.name         = qualifiedName;
  4975         node.nodeValue    = "";
  4976 
  4977         return node;
  4978     },
  4979 
  4980     createRange: function(){
  4981         return new Range();
  4982     },
  4983 
  4984     evaluate: function(xpathText, contextNode, nsuriMapper, resultType, result){
  4985         //return new XPathExpression().evaluate();
  4986         throw Error('Document.evaluate not supported yet!');
  4987     },
  4988 
  4989     getElementById : function(elementId) {
  4990         var retNode = null,
  4991             node;
  4992         // loop through all Elements
  4993         var all = this.getElementsByTagName('*');
  4994         for (var i=0; i < all.length; i++) {
  4995             node = all[i];
  4996             // if id matches
  4997             if (node.id == elementId) {
  4998                 //found the node
  4999                 retNode = node;
  5000                 break;
  5001             }
  5002         }
  5003         return retNode;
  5004     },
  5005     normalizeDocument: function(){
  5006         this.normalize();
  5007     },
  5008     get nodeType(){
  5009         return Node.DOCUMENT_NODE;
  5010     },
  5011     get xml(){
  5012         return this.documentElement.xml;
  5013     },
  5014     toString: function(){
  5015         return "[object XMLDocument]";
  5016     },
  5017     get defaultView(){
  5018         return { getComputedStyle: function(elem){
  5019             return window.getComputedStyle(elem);
  5020         }};
  5021     },
  5022 });
  5023 
  5024 /*
  5025  * Helper function
  5026  *
  5027  */
  5028 __isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribute) {
  5029 
  5030     if (doc.importing === true) {
  5031         //we're doing an importNode operation (or a cloneNode) - in both cases, there
  5032         //is no need to perform any namespace checking since the nodes have to have been valid
  5033         //to have gotten into the DOM in the first place
  5034         return true;
  5035     }
  5036 
  5037     var valid = true;
  5038     // parse QName
  5039     var qName = __parseQName__(qualifiedName);
  5040 
  5041 
  5042     //only check for namespaces if we're finished parsing
  5043     if (this.parsing === false) {
  5044 
  5045         // if the qualifiedName is malformed
  5046         if (qName.localName.indexOf(":") > -1 ){
  5047             valid = false;
  5048         }
  5049 
  5050         if ((valid) && (!isAttribute)) {
  5051             // if the namespaceURI is not null
  5052             if (!namespaceURI) {
  5053                 valid = false;
  5054             }
  5055         }
  5056 
  5057         // if the qualifiedName has a prefix
  5058         if ((valid) && (qName.prefix === "")) {
  5059             valid = false;
  5060         }
  5061     }
  5062 
  5063     // if the qualifiedName has a prefix that is "xml" and the namespaceURI is
  5064     //  different from "http://www.w3.org/XML/1998/namespace" [Namespaces].
  5065     if ((valid) && (qName.prefix === "xml") && (namespaceURI !== "http://www.w3.org/XML/1998/namespace")) {
  5066         valid = false;
  5067     }
  5068 
  5069     return valid;
  5070 };
  5071 /**
  5072  *
  5073  * This file only handles XML parser.
  5074  * It is extended by parser/domparser.js (and parser/htmlparser.js)
  5075  *
  5076  * This depends on e4x, which some engines may not have.
  5077  *
  5078  * @author thatcher
  5079  */
  5080 DOMParser = function(principle, documentURI, baseURI) {
  5081     // TODO: why/what should these 3 args do?
  5082 };
  5083 __extend__(DOMParser.prototype,{
  5084     parseFromString: function(xmlstring, mimetype){
  5085         var doc = new Document(new DOMImplementation()),
  5086             e4;
  5087 
  5088         // The following are e4x directives.
  5089         // Full spec is here:
  5090         // http://www.ecma-international.org/publications/standards/Ecma-357.htm
  5091         //
  5092         // that is pretty gross, so checkout this summary
  5093         // http://rephrase.net/days/07/06/e4x
  5094         //
  5095         // also see the Mozilla Developer Center:
  5096         // https://developer.mozilla.org/en/E4X
  5097         //
  5098         XML.ignoreComments = false;
  5099         XML.ignoreProcessingInstructions = false;
  5100         XML.ignoreWhitespace = false;
  5101 
  5102         // for some reason e4x can't handle initial xml declarations
  5103         // https://bugzilla.mozilla.org/show_bug.cgi?id=336551
  5104         // The official workaround is the big regexp below
  5105         // but simpler one seems to be ok
  5106         // xmlstring = xmlstring.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, "");
  5107         //
  5108         xmlstring = xmlstring.replace(/<\?xml.*\?>/);
  5109 
  5110         e4 = new XMLList(xmlstring);
  5111 
  5112         __toDomNode__(e4, doc, doc);
  5113 
  5114         //console.log('xml \n %s', doc.documentElement.xml);
  5115         return doc;
  5116     }
  5117 });
  5118 
  5119 var __toDomNode__ = function(e4, parent, doc){
  5120     var xnode,
  5121         domnode,
  5122         children,
  5123         target,
  5124         value,
  5125         length,
  5126         element,
  5127         kind,
  5128         item;
  5129     //console.log('converting e4x node list \n %s', e4)
  5130 
  5131     // not using the for each(item in e4) since some engines can't
  5132     // handle the syntax (i.e. says syntax error)
  5133     //
  5134     // for each(xnode in e4) {
  5135     for (item in e4) {
  5136         // NO do not do this if (e4.hasOwnProperty(item)) {
  5137         // breaks spidermonkey
  5138         xnode = e4[item];
  5139 
  5140         kind = xnode.nodeKind();
  5141         //console.log('treating node kind %s', kind);
  5142         switch(kind){
  5143         case 'element':
  5144             // add node
  5145             //console.log('creating element %s %s', xnode.localName(), xnode.namespace());
  5146             if(xnode.namespace() && (xnode.namespace()+'') !== ''){
  5147                 //console.log('createElementNS %s %s',xnode.namespace()+'', xnode.localName() );
  5148                 domnode = doc.createElementNS(xnode.namespace()+'', xnode.localName());
  5149             }else{
  5150                 domnode = doc.createElement(xnode.name()+'');
  5151             }
  5152             parent.appendChild(domnode);
  5153 
  5154             // add attributes
  5155             __toDomNode__(xnode.attributes(), domnode, doc);
  5156 
  5157             // add children
  5158             children = xnode.children();
  5159             length = children.length();
  5160             //console.log('recursing? %s', length ? 'yes' : 'no');
  5161             if (length > 0) {
  5162                 __toDomNode__(children, domnode, doc);
  5163             }
  5164             break;
  5165         case 'attribute':
  5166             // console.log('setting attribute %s %s %s',
  5167             //       xnode.localName(), xnode.namespace(), xnode.valueOf());
  5168 
  5169             //
  5170             // cross-platform alert.  The original code used
  5171             //  xnode.text() to get the attribute value
  5172             //  This worked in Rhino, but did not in Spidermonkey
  5173             //  valueOf seemed to work in both
  5174             //
  5175             if(xnode.namespace() && xnode.namespace().prefix){
  5176                 //console.log("%s", xnode.namespace().prefix);
  5177                 parent.setAttributeNS(xnode.namespace()+'',
  5178                                       xnode.namespace().prefix+':'+xnode.localName(),
  5179                                       xnode.valueOf());
  5180             }else if((xnode.name()+'').match('http://www.w3.org/2000/xmlns/::')){
  5181                 if(xnode.localName()!=='xmlns'){
  5182                     parent.setAttributeNS('http://www.w3.org/2000/xmlns/',
  5183                                           'xmlns:'+xnode.localName(),
  5184                                           xnode.valueOf());
  5185                 }
  5186             }else{
  5187                 parent.setAttribute(xnode.localName()+'', xnode.valueOf());
  5188             }
  5189             break;
  5190         case 'text':
  5191             //console.log('creating text node : %s', xnode);
  5192             domnode = doc.createTextNode(xnode+'');
  5193             parent.appendChild(domnode);
  5194             break;
  5195         case 'comment':
  5196             //console.log('creating comment node : %s', xnode);
  5197             value = xnode+'';
  5198             domnode = doc.createComment(value.substring(4,value.length-3));
  5199             parent.appendChild(domnode);
  5200             break;
  5201         case 'processing-instruction':
  5202             //console.log('creating processing-instruction node : %s', xnode);
  5203             value = xnode+'';
  5204             target = value.split(' ')[0].substring(2);
  5205             value = value.split(' ').splice(1).join(' ').replace('?>','');
  5206             //console.log('creating processing-instruction data : %s', value);
  5207             domnode = doc.createProcessingInstruction(target, value);
  5208             parent.appendChild(domnode);
  5209             break;
  5210         default:
  5211             console.log('e4x DOM ERROR');
  5212             throw new Error("Assertion failed in xml parser");
  5213         }
  5214     }
  5215 };
  5216 /**
  5217  * @author envjs team
  5218  * @class XMLSerializer
  5219  */
  5220 
  5221 XMLSerializer = function() {};
  5222 
  5223 __extend__(XMLSerializer.prototype, {
  5224     serializeToString: function(node){
  5225         return node.xml;
  5226     },
  5227     toString : function(){
  5228         return "[object XMLSerializer]";
  5229     }
  5230 });
  5231 
  5232 /**
  5233  * @author john resig & the envjs team
  5234  * @uri http://www.envjs.com/
  5235  * @copyright 2008-2010
  5236  * @license MIT
  5237  */
  5238 //CLOSURE_END
  5239 }());
  5240 /*
  5241  * Envjs event.1.2.13
  5242  * Pure JavaScript Browser Environment
  5243  * By John Resig <http://ejohn.org/> and the Envjs Team
  5244  * Copyright 2008-2010 John Resig, under the MIT License
  5245  *
  5246  * This file simply provides the global definitions we need to
  5247  * be able to correctly implement to core browser DOM Event interfaces.
  5248  */
  5249 var Event,
  5250     MouseEvent,
  5251     UIEvent,
  5252     KeyboardEvent,
  5253     MutationEvent,
  5254     DocumentEvent,
  5255     EventTarget,
  5256     EventException,
  5257     //nonstandard but very useful for implementing mutation events
  5258     //among other things like general profiling
  5259     Aspect;
  5260 /*
  5261  * Envjs event.1.2.13 
  5262  * Pure JavaScript Browser Environment
  5263  * By John Resig <http://ejohn.org/> and the Envjs Team
  5264  * Copyright 2008-2010 John Resig, under the MIT License
  5265  */
  5266 
  5267 //CLOSURE_START
  5268 (function(){
  5269 
  5270 
  5271 
  5272 
  5273 
  5274 /**
  5275  * @author john resig
  5276  */
  5277 // Helper method for extending one object with another.
  5278 function __extend__(a,b) {
  5279     for ( var i in b ) {
  5280         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
  5281         if ( g || s ) {
  5282             if ( g ) { a.__defineGetter__(i, g); }
  5283             if ( s ) { a.__defineSetter__(i, s); }
  5284         } else {
  5285             a[i] = b[i];
  5286         }
  5287     } return a;
  5288 }
  5289 
  5290 /**
  5291  * @author john resig
  5292  */
  5293 //from jQuery
  5294 function __setArray__( target, array ) {
  5295     // Resetting the length to 0, then using the native Array push
  5296     // is a super-fast way to populate an object with array-like properties
  5297     target.length = 0;
  5298     Array.prototype.push.apply( target, array );
  5299 }
  5300 /**
  5301  * Borrowed with love from:
  5302  * 
  5303  * jQuery AOP - jQuery plugin to add features of aspect-oriented programming (AOP) to jQuery.
  5304  * http://jquery-aop.googlecode.com/
  5305  *
  5306  * Licensed under the MIT license:
  5307  * http://www.opensource.org/licenses/mit-license.php
  5308  *
  5309  * Version: 1.1
  5310  */
  5311 (function() {
  5312 
  5313 	var _after	= 1;
  5314 	var _before	= 2;
  5315 	var _around	= 3;
  5316 	var _intro  = 4;
  5317 	var _regexEnabled = true;
  5318 
  5319 	/**
  5320 	 * Private weaving function.
  5321 	 */
  5322 	var weaveOne = function(source, method, advice) {
  5323 
  5324 		var old = source[method];
  5325 
  5326 		var aspect;
  5327 		if (advice.type == _after)
  5328 			aspect = function() {
  5329 				var returnValue = old.apply(this, arguments);
  5330 				return advice.value.apply(this, [returnValue, method]);
  5331 			};
  5332 		else if (advice.type == _before)
  5333 			aspect = function() {
  5334 				advice.value.apply(this, [arguments, method]);
  5335 				return old.apply(this, arguments);
  5336 			};
  5337 		else if (advice.type == _intro)
  5338 			aspect = function() {
  5339 				return advice.value.apply(this, arguments);
  5340 			};
  5341 		else if (advice.type == _around) {
  5342 			aspect = function() {
  5343 				var invocation = { object: this, args: arguments };
  5344 				return advice.value.apply(invocation.object, [{ arguments: invocation.args, method: method, proceed : 
  5345 					function() {
  5346 						return old.apply(invocation.object, invocation.args);
  5347 					}
  5348 				}] );
  5349 			};
  5350 		}
  5351 
  5352 		aspect.unweave = function() { 
  5353 			source[method] = old;
  5354 			pointcut = source = aspect = old = null;
  5355 		};
  5356 
  5357 		source[method] = aspect;
  5358 
  5359 		return aspect;
  5360 
  5361 	};
  5362 
  5363 
  5364 	/**
  5365 	 * Private weaver and pointcut parser.
  5366 	 */
  5367 	var weave = function(pointcut, advice)
  5368 	{
  5369 
  5370 		var source = (typeof(pointcut.target.prototype) != 'undefined') ? pointcut.target.prototype : pointcut.target;
  5371 		var advices = [];
  5372 
  5373 		// If it's not an introduction and no method was found, try with regex...
  5374 		if (advice.type != _intro && typeof(source[pointcut.method]) == 'undefined')
  5375 		{
  5376 
  5377 			for (var method in source)
  5378 			{
  5379 				if (source[method] != null && source[method] instanceof Function && method.match(pointcut.method))
  5380 				{
  5381 					advices[advices.length] = weaveOne(source, method, advice);
  5382 				}
  5383 			}
  5384 
  5385 			if (advices.length == 0)
  5386 				throw 'No method: ' + pointcut.method;
  5387 
  5388 		} 
  5389 		else
  5390 		{
  5391 			// Return as an array of one element
  5392 			advices[0] = weaveOne(source, pointcut.method, advice);
  5393 		}
  5394 
  5395 		return _regexEnabled ? advices : advices[0];
  5396 
  5397 	};
  5398 
  5399 	Aspect = 
  5400 	{
  5401 		/**
  5402 		 * Creates an advice after the defined point-cut. The advice will be executed after the point-cut method 
  5403 		 * has completed execution successfully, and will receive one parameter with the result of the execution.
  5404 		 * This function returns an array of weaved aspects (Function).
  5405 		 *
  5406 		 * @example jQuery.aop.after( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
  5407 		 * @result Array<Function>
  5408 		 *
  5409 		 * @example jQuery.aop.after( {target: String, method: 'indexOf'}, function(index) { alert('Result found at: ' + index + ' on:' + this); } );
  5410 		 * @result Array<Function>
  5411 		 *
  5412 		 * @name after
  5413 		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
  5414 		 * @option Object target Target object to be weaved. 
  5415 		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
  5416 		 * @param Function advice Function containing the code that will get called after the execution of the point-cut. It receives one parameter
  5417 		 *                        with the result of the point-cut's execution.
  5418 		 *
  5419 		 * @type Array<Function>
  5420 		 * @cat Plugins/General
  5421 		 */
  5422 		after : function(pointcut, advice)
  5423 		{
  5424 			return weave( pointcut, { type: _after, value: advice } );
  5425 		},
  5426 
  5427 		/**
  5428 		 * Creates an advice before the defined point-cut. The advice will be executed before the point-cut method 
  5429 		 * but cannot modify the behavior of the method, or prevent its execution.
  5430 		 * This function returns an array of weaved aspects (Function).
  5431 		 *
  5432 		 * @example jQuery.aop.before( {target: window, method: 'MyGlobalMethod'}, function() { alert('About to execute MyGlobalMethod'); } );
  5433 		 * @result Array<Function>
  5434 		 *
  5435 		 * @example jQuery.aop.before( {target: String, method: 'indexOf'}, function(index) { alert('About to execute String.indexOf on: ' + this); } );
  5436 		 * @result Array<Function>
  5437 		 *
  5438 		 * @name before
  5439 		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
  5440 		 * @option Object target Target object to be weaved. 
  5441 		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
  5442 		 * @param Function advice Function containing the code that will get called before the execution of the point-cut.
  5443 		 *
  5444 		 * @type Array<Function>
  5445 		 * @cat Plugins/General
  5446 		 */
  5447 		before : function(pointcut, advice)
  5448 		{
  5449 			return weave( pointcut, { type: _before, value: advice } );
  5450 		},
  5451 
  5452 
  5453 		/**
  5454 		 * Creates an advice 'around' the defined point-cut. This type of advice can control the point-cut method execution by calling
  5455 		 * the functions '.proceed()' on the 'invocation' object, and also, can modify the arguments collection before sending them to the function call.
  5456 		 * This function returns an array of weaved aspects (Function).
  5457 		 *
  5458 		 * @example jQuery.aop.around( {target: window, method: 'MyGlobalMethod'}, function(invocation) {
  5459 		 *                alert('# of Arguments: ' + invocation.arguments.length); 
  5460 		 *                return invocation.proceed(); 
  5461 		 *          } );
  5462 		 * @result Array<Function>
  5463 		 *
  5464 		 * @example jQuery.aop.around( {target: String, method: 'indexOf'}, function(invocation) { 
  5465 		 *                alert('Searching: ' + invocation.arguments[0] + ' on: ' + this); 
  5466 		 *                return invocation.proceed(); 
  5467 		 *          } );
  5468 		 * @result Array<Function>
  5469 		 *
  5470 		 * @example jQuery.aop.around( {target: window, method: /Get(\d+)/}, function(invocation) {
  5471 		 *                alert('Executing ' + invocation.method); 
  5472 		 *                return invocation.proceed(); 
  5473 		 *          } );
  5474 		 * @desc Matches all global methods starting with 'Get' and followed by a number.
  5475 		 * @result Array<Function>
  5476 		 *
  5477 		 *
  5478 		 * @name around
  5479 		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
  5480 		 * @option Object target Target object to be weaved. 
  5481 		 * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
  5482 		 * @param Function advice Function containing the code that will get called around the execution of the point-cut. This advice will be called with one
  5483 		 *                        argument containing one function '.proceed()', the collection of arguments '.arguments', and the matched method name '.method'.
  5484 		 *
  5485 		 * @type Array<Function>
  5486 		 * @cat Plugins/General
  5487 		 */
  5488 		around : function(pointcut, advice)
  5489 		{
  5490 			return weave( pointcut, { type: _around, value: advice } );
  5491 		},
  5492 
  5493 		/**
  5494 		 * Creates an introduction on the defined point-cut. This type of advice replaces any existing methods with the same
  5495 		 * name. To restore them, just unweave it.
  5496 		 * This function returns an array with only one weaved aspect (Function).
  5497 		 *
  5498 		 * @example jQuery.aop.introduction( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
  5499 		 * @result Array<Function>
  5500 		 *
  5501 		 * @example jQuery.aop.introduction( {target: String, method: 'log'}, function() { alert('Console: ' + this); } );
  5502 		 * @result Array<Function>
  5503 		 *
  5504 		 * @name introduction
  5505 		 * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
  5506 		 * @option Object target Target object to be weaved. 
  5507 		 * @option String method Name of the function to be weaved.
  5508 		 * @param Function advice Function containing the code that will be executed on the point-cut. 
  5509 		 *
  5510 		 * @type Array<Function>
  5511 		 * @cat Plugins/General
  5512 		 */
  5513 		introduction : function(pointcut, advice)
  5514 		{
  5515 			return weave( pointcut, { type: _intro, value: advice } );
  5516 		},
  5517 		
  5518 		/**
  5519 		 * Configures global options.
  5520 		 *
  5521 		 * @name setup
  5522 		 * @param Map settings Configuration options.
  5523 		 * @option Boolean regexMatch Enables/disables regex matching of method names.
  5524 		 *
  5525 		 * @example jQuery.aop.setup( { regexMatch: false } );
  5526 		 * @desc Disable regex matching.
  5527 		 *
  5528 		 * @type Void
  5529 		 * @cat Plugins/General
  5530 		 */
  5531 		setup: function(settings)
  5532 		{
  5533 			_regexEnabled = settings.regexMatch;
  5534 		}
  5535 	};
  5536 
  5537 })();
  5538 
  5539 
  5540 
  5541 
  5542 /**
  5543  * @name EventTarget
  5544  * @w3c:domlevel 2
  5545  * @uri -//TODO: paste dom event level 2 w3c spc uri here
  5546  */
  5547 EventTarget = function(){};
  5548 EventTarget.prototype.addEventListener = function(type, fn, phase){
  5549     __addEventListener__(this, type, fn, phase);
  5550 };
  5551 EventTarget.prototype.removeEventListener = function(type, fn){
  5552     __removeEventListener__(this, type, fn);
  5553 };
  5554 EventTarget.prototype.dispatchEvent = function(event, bubbles){
  5555     __dispatchEvent__(this, event, bubbles);
  5556 };
  5557 
  5558 __extend__(Node.prototype, EventTarget.prototype);
  5559 
  5560 
  5561 var $events = [{}];
  5562 
  5563 function __addEventListener__(target, type, fn, phase){
  5564     phase = !!phase?"CAPTURING":"BUBBLING";
  5565     if ( !target.uuid ) {
  5566         //console.log('event uuid %s %s', target, target.uuid);
  5567         target.uuid = $events.length+'';
  5568     }
  5569     if ( !$events[target.uuid] ) {
  5570         //console.log('creating listener for target: %s %s', target, target.uuid);
  5571         $events[target.uuid] = {};
  5572     }
  5573     if ( !$events[target.uuid][type] ){
  5574         //console.log('creating listener for type: %s %s %s', target, target.uuid, type);
  5575         $events[target.uuid][type] = {
  5576             CAPTURING:[],
  5577             BUBBLING:[]
  5578         };
  5579     }
  5580     if ( $events[target.uuid][type][phase].indexOf( fn ) < 0 ){
  5581         //console.log('adding event listener %s %s %s %s %s %s', target, target.uuid, type, phase,
  5582         //    $events[target.uuid][type][phase].length, $events[target.uuid][type][phase].indexOf( fn ));
  5583         //console.log('creating listener for function: %s %s %s', target, target.uuid, phase);
  5584         $events[target.uuid][type][phase].push( fn );
  5585         //console.log('adding event listener %s %s %s %s %s %s', target, target.uuid, type, phase,
  5586         //    $events[target.uuid][type][phase].length, $events[target.uuid][type][phase].indexOf( fn ));
  5587     }
  5588     //console.log('registered event listeners %s', $events.length);
  5589 }
  5590 
  5591 function __removeEventListener__(target, type, fn, phase){
  5592 
  5593     phase = !!phase?"CAPTURING":"BUBBLING";
  5594     if ( !target.uuid ) {
  5595         return;
  5596     }
  5597     if ( !$events[target.uuid] ) {
  5598         return;
  5599     }
  5600     if(type == '*'){
  5601         //used to clean all event listeners for a given node
  5602         //console.log('cleaning all event listeners for node %s %s',target, target.uuid);
  5603         delete $events[target.uuid];
  5604         return;
  5605     }else if ( !$events[target.uuid][type] ){
  5606         return;
  5607     }
  5608     $events[target.uuid][type][phase] =
  5609     $events[target.uuid][type][phase].filter(function(f){
  5610         //console.log('removing event listener %s %s %s %s', target, type, phase, fn);
  5611         return f != fn;
  5612     });
  5613 }
  5614 
  5615 var __eventuuid__ = 0;
  5616 function __dispatchEvent__(target, event, bubbles){
  5617 
  5618     if (!event.uuid) {
  5619         event.uuid = __eventuuid__++;
  5620     }
  5621     //the window scope defines the $event object, for IE(^^^) compatibility;
  5622     //$event = event;
  5623     //console.log('dispatching event %s', event.uuid);
  5624     if (bubbles === undefined || bubbles === null) {
  5625         bubbles = true;
  5626     }
  5627 
  5628     if (!event.target) {
  5629         event.target = target;
  5630     }
  5631 
  5632     //console.log('dispatching? %s %s %s', target, event.type, bubbles);
  5633     if ( event.type && (target.nodeType || target === window )) {
  5634 
  5635         //console.log('dispatching event %s %s %s', target, event.type, bubbles);
  5636         __captureEvent__(target, event);
  5637 
  5638         event.eventPhase = Event.AT_TARGET;
  5639         if ( target.uuid && $events[target.uuid] && $events[target.uuid][event.type] ) {
  5640             event.currentTarget = target;
  5641             //console.log('dispatching %s %s %s %s', target, event.type,
  5642             //  $events[target.uuid][event.type]['CAPTURING'].length);
  5643             $events[target.uuid][event.type].CAPTURING.forEach(function(fn){
  5644                 //console.log('AT_TARGET (CAPTURING) event %s', fn);
  5645                 var returnValue = fn( event );
  5646                 //console.log('AT_TARGET (CAPTURING) return value %s', returnValue);
  5647                 if(returnValue === false){
  5648                     event.stopPropagation();
  5649                 }
  5650             });
  5651             //console.log('dispatching %s %s %s %s', target, event.type,
  5652             //  $events[target.uuid][event.type]['BUBBLING'].length);
  5653             $events[target.uuid][event.type].BUBBLING.forEach(function(fn){
  5654                 //console.log('AT_TARGET (BUBBLING) event %s', fn);
  5655                 var returnValue = fn( event );
  5656                 //console.log('AT_TARGET (BUBBLING) return value %s', returnValue);
  5657                 if(returnValue === false){
  5658                     event.stopPropagation();
  5659                 }
  5660             });
  5661         }
  5662         if (target["on" + event.type]) {
  5663             target["on" + event.type](event);
  5664         }
  5665         if (bubbles && !event.cancelled){
  5666             __bubbleEvent__(target, event);
  5667         }
  5668         if(!event._preventDefault){
  5669             //At this point I'm guessing that just HTMLEvents are concerned
  5670             //with default behavior being executed in a browser but I could be
  5671             //wrong as usual.  The goal is much more to filter at this point
  5672             //what events have no need to be handled
  5673             //console.log('triggering default behavior for %s', event.type);
  5674             if(event.type in Envjs.defaultEventBehaviors){
  5675                 Envjs.defaultEventBehaviors[event.type](event);
  5676             }
  5677         }
  5678         //console.log('deleting event %s', event.uuid);
  5679         event.target = null;
  5680         event = null;
  5681     }else{
  5682         throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR);
  5683     }
  5684 }
  5685 
  5686 function __captureEvent__(target, event){
  5687     var ancestorStack = [],
  5688         parent = target.parentNode;
  5689 
  5690     event.eventPhase = Event.CAPTURING_PHASE;
  5691     while(parent){
  5692         if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type]){
  5693             ancestorStack.push(parent);
  5694         }
  5695         parent = parent.parentNode;
  5696     }
  5697     while(ancestorStack.length && !event.cancelled){
  5698         event.currentTarget = ancestorStack.pop();
  5699         if($events[event.currentTarget.uuid] && $events[event.currentTarget.uuid][event.type]){
  5700             $events[event.currentTarget.uuid][event.type].CAPTURING.forEach(function(fn){
  5701                 var returnValue = fn( event );
  5702                 if(returnValue === false){
  5703                     event.stopPropagation();
  5704                 }
  5705             });
  5706         }
  5707     }
  5708 }
  5709 
  5710 function __bubbleEvent__(target, event){
  5711     var parent = target.parentNode;
  5712     event.eventPhase = Event.BUBBLING_PHASE;
  5713     while(parent){
  5714         if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type] ){
  5715             event.currentTarget = parent;
  5716             $events[event.currentTarget.uuid][event.type].BUBBLING.forEach(function(fn){
  5717                 var returnValue = fn( event );
  5718                 if(returnValue === false){
  5719                     event.stopPropagation();
  5720                 }
  5721             });
  5722         }
  5723         parent = parent.parentNode;
  5724     }
  5725 }
  5726 
  5727 /**
  5728  * @class Event
  5729  */
  5730 Event = function(options){
  5731     // event state is kept read-only by forcing
  5732     // a new object for each event.  This may not
  5733     // be appropriate in the long run and we'll
  5734     // have to decide if we simply dont adhere to
  5735     // the read-only restriction of the specification
  5736     this._bubbles = true;
  5737     this._cancelable = true;
  5738     this._cancelled = false;
  5739     this._currentTarget = null;
  5740     this._target = null;
  5741     this._eventPhase = Event.AT_TARGET;
  5742     this._timeStamp = new Date().getTime();
  5743     this._preventDefault = false;
  5744     this._stopPropogation = false;
  5745 };
  5746 
  5747 __extend__(Event.prototype,{
  5748     get bubbles(){return this._bubbles;},
  5749     get cancelable(){return this._cancelable;},
  5750     get currentTarget(){return this._currentTarget;},
  5751     set currentTarget(currentTarget){ this._currentTarget = currentTarget; },
  5752     get eventPhase(){return this._eventPhase;},
  5753     set eventPhase(eventPhase){this._eventPhase = eventPhase;},
  5754     get target(){return this._target;},
  5755     set target(target){ this._target = target;},
  5756     get timeStamp(){return this._timeStamp;},
  5757     get type(){return this._type;},
  5758     initEvent: function(type, bubbles, cancelable){
  5759         this._type=type?type:'';
  5760         this._bubbles=!!bubbles;
  5761         this._cancelable=!!cancelable;
  5762     },
  5763     preventDefault: function(){
  5764         this._preventDefault = true;
  5765     },
  5766     stopPropagation: function(){
  5767         if(this._cancelable){
  5768             this._cancelled = true;
  5769             this._bubbles = false;
  5770         }
  5771     },
  5772     get cancelled(){
  5773         return this._cancelled;
  5774     },
  5775     toString: function(){
  5776         return '[object Event]';
  5777     }
  5778 });
  5779 
  5780 __extend__(Event,{
  5781     CAPTURING_PHASE : 1,
  5782     AT_TARGET       : 2,
  5783     BUBBLING_PHASE  : 3
  5784 });
  5785 
  5786 
  5787 
  5788 /**
  5789  * @name UIEvent
  5790  * @param {Object} options
  5791  */
  5792 UIEvent = function(options) {
  5793     this._view = null;
  5794     this._detail = 0;
  5795 };
  5796 
  5797 UIEvent.prototype = new Event();
  5798 __extend__(UIEvent.prototype,{
  5799     get view(){
  5800         return this._view;
  5801     },
  5802     get detail(){
  5803         return this._detail;
  5804     },
  5805     initUIEvent: function(type, bubbles, cancelable, windowObject, detail){
  5806         this.initEvent(type, bubbles, cancelable);
  5807         this._detail = 0;
  5808         this._view = windowObject;
  5809     }
  5810 });
  5811 
  5812 var $onblur,
  5813     $onfocus,
  5814     $onresize;
  5815 
  5816 
  5817 /**
  5818  * @name MouseEvent
  5819  * @w3c:domlevel 2 
  5820  * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
  5821  */
  5822 MouseEvent = function(options) {
  5823     this._screenX= 0;
  5824     this._screenY= 0;
  5825     this._clientX= 0;
  5826     this._clientY= 0;
  5827     this._ctrlKey= false;
  5828     this._metaKey= false;
  5829     this._altKey= false;
  5830     this._button= null;
  5831     this._relatedTarget= null;
  5832 };
  5833 MouseEvent.prototype = new UIEvent();
  5834 __extend__(MouseEvent.prototype,{
  5835     get screenX(){
  5836         return this._screenX;
  5837     },
  5838     get screenY(){
  5839         return this._screenY;
  5840     },
  5841     get clientX(){
  5842         return this._clientX;
  5843     },
  5844     get clientY(){
  5845         return this._clientY;
  5846     },
  5847     get ctrlKey(){
  5848         return this._ctrlKey;
  5849     },
  5850     get altKey(){
  5851         return this._altKey;
  5852     },
  5853     get shiftKey(){
  5854         return this._shiftKey;
  5855     },
  5856     get metaKey(){
  5857         return this._metaKey;
  5858     },
  5859     get button(){
  5860         return this._button;
  5861     },
  5862     get relatedTarget(){
  5863         return this._relatedTarget;
  5864     },
  5865     initMouseEvent: function(type, bubbles, cancelable, windowObject, detail,
  5866             screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, 
  5867             metaKey, button, relatedTarget){
  5868         this.initUIEvent(type, bubbles, cancelable, windowObject, detail);
  5869         this._screenX = screenX;
  5870         this._screenY = screenY;
  5871         this._clientX = clientX;
  5872         this._clientY = clientY;
  5873         this._ctrlKey = ctrlKey;
  5874         this._altKey = altKey;
  5875         this._shiftKey = shiftKey;
  5876         this._metaKey = metaKey;
  5877         this._button = button;
  5878         this._relatedTarget = relatedTarget;
  5879     }
  5880 });
  5881 
  5882 /**
  5883  * Interface KeyboardEvent (introduced in DOM Level 3)
  5884  */
  5885 KeyboardEvent = function(options) {
  5886     this._keyIdentifier = 0;
  5887     this._keyLocation = 0;
  5888     this._ctrlKey = false;
  5889     this._metaKey = false;
  5890     this._altKey = false;
  5891     this._metaKey = false;
  5892 };
  5893 KeyboardEvent.prototype = new UIEvent();
  5894 
  5895 __extend__(KeyboardEvent.prototype,{
  5896 
  5897     get ctrlKey(){
  5898         return this._ctrlKey;
  5899     },
  5900     get altKey(){
  5901         return this._altKey;
  5902     },
  5903     get shiftKey(){
  5904         return this._shiftKey;
  5905     },
  5906     get metaKey(){
  5907         return this._metaKey;
  5908     },
  5909     get button(){
  5910         return this._button;
  5911     },
  5912     get relatedTarget(){
  5913         return this._relatedTarget;
  5914     },
  5915     getModifiersState: function(keyIdentifier){
  5916 
  5917     },
  5918     initMouseEvent: function(type, bubbles, cancelable, windowObject,
  5919             keyIdentifier, keyLocation, modifiersList, repeat){
  5920         this.initUIEvent(type, bubbles, cancelable, windowObject, 0);
  5921         this._keyIdentifier = keyIdentifier;
  5922         this._keyLocation = keyLocation;
  5923         this._modifiersList = modifiersList;
  5924         this._repeat = repeat;
  5925     }
  5926 });
  5927 
  5928 KeyboardEvent.DOM_KEY_LOCATION_STANDARD      = 0;
  5929 KeyboardEvent.DOM_KEY_LOCATION_LEFT          = 1;
  5930 KeyboardEvent.DOM_KEY_LOCATION_RIGHT         = 2;
  5931 KeyboardEvent.DOM_KEY_LOCATION_NUMPAD        = 3;
  5932 KeyboardEvent.DOM_KEY_LOCATION_MOBILE        = 4;
  5933 KeyboardEvent.DOM_KEY_LOCATION_JOYSTICK      = 5;
  5934 
  5935 
  5936 
  5937 //We dont fire mutation events until someone has registered for them
  5938 var __supportedMutations__ = /DOMSubtreeModified|DOMNodeInserted|DOMNodeRemoved|DOMAttrModified|DOMCharacterDataModified/;
  5939 
  5940 var __fireMutationEvents__ = Aspect.before({
  5941     target: EventTarget,
  5942     method: 'addEventListener'
  5943 }, function(target, type){
  5944     if(type && type.match(__supportedMutations__)){
  5945         //unweaving removes the __addEventListener__ aspect
  5946         __fireMutationEvents__.unweave();
  5947         // These two methods are enough to cover all dom 2 manipulations
  5948         Aspect.around({
  5949             target: Node,
  5950             method:"removeChild"
  5951         }, function(invocation){
  5952             var event,
  5953                 node = invocation.arguments[0];
  5954             event = node.ownerDocument.createEvent('MutationEvents');
  5955             event.initEvent('DOMNodeRemoved', true, false, node.parentNode, null, null, null, null);
  5956             node.dispatchEvent(event, false);
  5957             return invocation.proceed();
  5958 
  5959         });
  5960         Aspect.around({
  5961             target: Node,
  5962             method:"appendChild"
  5963         }, function(invocation) {
  5964             var event,
  5965                 node = invocation.proceed();
  5966             event = node.ownerDocument.createEvent('MutationEvents');
  5967             event.initEvent('DOMNodeInserted', true, false, node.parentNode, null, null, null, null);
  5968             node.dispatchEvent(event, false);
  5969             return node;
  5970         });
  5971     }
  5972 });
  5973 
  5974 /**
  5975  * @name MutationEvent
  5976  * @param {Object} options
  5977  */
  5978 MutationEvent = function(options) {
  5979     this._cancelable = false;
  5980     this._timeStamp = 0;
  5981 };
  5982 
  5983 MutationEvent.prototype = new Event();
  5984 __extend__(MutationEvent.prototype,{
  5985     get relatedNode(){
  5986         return this._relatedNode;
  5987     },
  5988     get prevValue(){
  5989         return this._prevValue;
  5990     },
  5991     get newValue(){
  5992         return this._newValue;
  5993     },
  5994     get attrName(){
  5995         return this._attrName;
  5996     },
  5997     get attrChange(){
  5998         return this._attrChange;
  5999     },
  6000     initMutationEvent: function( type, bubbles, cancelable,
  6001             relatedNode, prevValue, newValue, attrName, attrChange ){
  6002         this._relatedNode = relatedNode;
  6003         this._prevValue = prevValue;
  6004         this._newValue = newValue;
  6005         this._attrName = attrName;
  6006         this._attrChange = attrChange;
  6007         switch(type){
  6008             case "DOMSubtreeModified":
  6009                 this.initEvent(type, true, false);
  6010                 break;
  6011             case "DOMNodeInserted":
  6012                 this.initEvent(type, true, false);
  6013                 break;
  6014             case "DOMNodeRemoved":
  6015                 this.initEvent(type, true, false);
  6016                 break;
  6017             case "DOMNodeRemovedFromDocument":
  6018                 this.initEvent(type, false, false);
  6019                 break;
  6020             case "DOMNodeInsertedIntoDocument":
  6021                 this.initEvent(type, false, false);
  6022                 break;
  6023             case "DOMAttrModified":
  6024                 this.initEvent(type, true, false);
  6025                 break;
  6026             case "DOMCharacterDataModified":
  6027                 this.initEvent(type, true, false);
  6028                 break;
  6029             default:
  6030                 this.initEvent(type, bubbles, cancelable);
  6031         }
  6032     }
  6033 });
  6034 
  6035 // constants
  6036 MutationEvent.ADDITION = 0;
  6037 MutationEvent.MODIFICATION = 1;
  6038 MutationEvent.REMOVAL = 2;
  6039 
  6040 
  6041 /**
  6042  * @name EventException
  6043  */
  6044 EventException = function(code) {
  6045   this.code = code;
  6046 };
  6047 EventException.UNSPECIFIED_EVENT_TYPE_ERR = 0;
  6048 /**
  6049  *
  6050  * DOM Level 2: http://www.w3.org/TR/DOM-Level-2-Events/events.html
  6051  * DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Events/
  6052  *
  6053  * interface DocumentEvent {
  6054  *   Event createEvent (in DOMString eventType)
  6055  *      raises (DOMException);
  6056  * };
  6057  *
  6058  * Firefox (3.6) exposes DocumentEvent
  6059  * Safari (4) does NOT.
  6060  */
  6061 
  6062 /**
  6063  * TODO: Not sure we need a full prototype.  We not just an regular object?
  6064  */
  6065 DocumentEvent = function(){};
  6066 DocumentEvent.prototype.__EventMap__ = {
  6067     // Safari4: singular and plural forms accepted
  6068     // Firefox3.6: singular and plural forms accepted
  6069     'Event'          : Event,
  6070     'Events'         : Event,
  6071     'UIEvent'        : UIEvent,
  6072     'UIEvents'       : UIEvent,
  6073     'MouseEvent'     : MouseEvent,
  6074     'MouseEvents'    : MouseEvent,
  6075     'MutationEvent'  : MutationEvent,
  6076     'MutationEvents' : MutationEvent,
  6077 
  6078     // Safari4: accepts HTMLEvents, but not HTMLEvent
  6079     // Firefox3.6: accepts HTMLEvents, but not HTMLEvent
  6080     'HTMLEvent'      : Event,
  6081     'HTMLEvents'     : Event,
  6082 
  6083     // Safari4: both not accepted
  6084     // Firefox3.6, only KeyEvents is accepted
  6085     'KeyEvent'       : KeyboardEvent,
  6086     'KeyEvents'      : KeyboardEvent,
  6087 
  6088     // Safari4: both accepted
  6089     // Firefox3.6: none accepted
  6090     'KeyboardEvent'  : KeyboardEvent,
  6091     'KeyboardEvents' : KeyboardEvent
  6092 };
  6093 
  6094 DocumentEvent.prototype.createEvent = function(eventType) {
  6095     var Clazz = this.__EventMap__[eventType];
  6096     if (Clazz) {
  6097         return new Clazz();
  6098     }
  6099     throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
  6100 };
  6101 
  6102 __extend__(Document.prototype, DocumentEvent.prototype);
  6103 
  6104 /**
  6105  * @author john resig & the envjs team
  6106  * @uri http://www.envjs.com/
  6107  * @copyright 2008-2010
  6108  * @license MIT
  6109  */
  6110 //CLOSURE_END
  6111 }());
  6112 
  6113 /*
  6114  * Envjs timer.1.2.13 
  6115  * Pure JavaScript Browser Environment
  6116  * By John Resig <http://ejohn.org/> and the Envjs Team
  6117  * Copyright 2008-2010 John Resig, under the MIT License
  6118  * 
  6119  * Parts of the implementation were originally written by:\
  6120  * Steven Parkes
  6121  * 
  6122  * requires Envjs.wait, Envjs.sleep, Envjs.WAIT_INTERVAL
  6123  */
  6124 var setTimeout,
  6125     clearTimeout,
  6126     setInterval,
  6127     clearInterval;
  6128     
  6129 /*
  6130  * Envjs timer.1.2.13 
  6131  * Pure JavaScript Browser Environment
  6132  * By John Resig <http://ejohn.org/> and the Envjs Team
  6133  * Copyright 2008-2010 John Resig, under the MIT License
  6134  */
  6135 
  6136 //CLOSURE_START
  6137 (function(){
  6138 
  6139 
  6140 
  6141 
  6142 /*
  6143 *       timer.js
  6144 *   implementation provided by Steven Parkes
  6145 */
  6146 
  6147 //private
  6148 var $timers = [],
  6149     EVENT_LOOP_RUNNING = false;
  6150 
  6151 $timers.lock = function(fn){
  6152     Envjs.sync(fn)();
  6153 };
  6154 
  6155 //private internal class
  6156 var Timer = function(fn, interval){
  6157     this.fn = fn;
  6158     this.interval = interval;
  6159     this.at = Date.now() + interval;
  6160     // allows for calling wait() from callbacks
  6161     this.running = false;
  6162 };
  6163 
  6164 Timer.prototype.start = function(){};
  6165 Timer.prototype.stop = function(){};
  6166 
  6167 //static
  6168 Timer.normalize = function(time) {
  6169     time = time*1;
  6170     if ( isNaN(time) || time < 0 ) {
  6171         time = 0;
  6172     }
  6173 
  6174     if ( EVENT_LOOP_RUNNING && time < Timer.MIN_TIME ) {
  6175         time = Timer.MIN_TIME;
  6176     }
  6177     return time;
  6178 };
  6179 // html5 says this should be at least 4, but the parser is using
  6180 // a setTimeout for the SAX stuff which messes up the world
  6181 Timer.MIN_TIME = /* 4 */ 0;
  6182 
  6183 /**
  6184  * @function setTimeout
  6185  * @param {Object} fn
  6186  * @param {Object} time
  6187  */
  6188 setTimeout = function(fn, time){
  6189     var num;
  6190     time = Timer.normalize(time);
  6191     $timers.lock(function(){
  6192         num = $timers.length+1;
  6193         var tfn;
  6194         if (typeof fn == 'string') {
  6195             tfn = function() {
  6196                 try {
  6197                     // eval in global scope
  6198                     eval(fn, null);
  6199                 // } catch (e) {
  6200                 //     console.log('timer error %s %s', fn, e);
  6201                 } finally {
  6202                     clearInterval(num);
  6203                 }
  6204             };
  6205         } else {
  6206             tfn = function() {
  6207                 try {
  6208                     fn();
  6209                 // } catch (e) {
  6210                 //     console.log('timer error %s %s', fn, e);
  6211                 } finally {
  6212                     clearInterval(num);
  6213                 }
  6214             };
  6215         }
  6216         //console.log("Creating timer number %s", num);
  6217         $timers[num] = new Timer(tfn, time);
  6218         $timers[num].start();
  6219     });
  6220     return num;
  6221 };
  6222 
  6223 /**
  6224  * @function setInterval
  6225  * @param {Object} fn
  6226  * @param {Object} time
  6227  */
  6228 setInterval = function(fn, time){
  6229     //console.log('setting interval %s %s', time, fn.toString().substring(0,64));
  6230     time = Timer.normalize(time);
  6231     if ( time < 10 ) {
  6232         time = 10;
  6233     }
  6234     if (typeof fn == 'string') {
  6235         var fnstr = fn;
  6236         fn = function() {
  6237             eval(fnstr);
  6238         };
  6239     }
  6240     var num;
  6241     $timers.lock(function(){
  6242         num = $timers.length+1;
  6243         //Envjs.debug("Creating timer number "+num);
  6244         $timers[num] = new Timer(fn, time);
  6245         $timers[num].start();
  6246     });
  6247     return num;
  6248 };
  6249 
  6250 /**
  6251  * clearInterval
  6252  * @param {Object} num
  6253  */
  6254 clearInterval = clearTimeout = function(num){
  6255     //console.log("clearing interval "+num);
  6256     $timers.lock(function(){
  6257         if ( $timers[num] ) {
  6258             $timers[num].stop();
  6259             delete $timers[num];
  6260         }
  6261     });
  6262 };
  6263 
  6264 // wait === null/undefined: execute any timers as they fire,
  6265 //  waiting until there are none left
  6266 // wait(n) (n > 0): execute any timers as they fire until there
  6267 //  are none left waiting at least n ms but no more, even if there
  6268 //  are future events/current threads
  6269 // wait(0): execute any immediately runnable timers and return
  6270 // wait(-n): keep sleeping until the next event is more than n ms
  6271 //  in the future
  6272 //
  6273 // TODO: make a priority queue ...
  6274 
  6275 Envjs.wait = function(wait) {
  6276     //console.log('wait %s', wait);
  6277     var delta_wait,
  6278         start = Date.now(),
  6279         was_running = EVENT_LOOP_RUNNING;
  6280 
  6281     if (wait < 0) {
  6282         delta_wait = -wait;
  6283         wait = 0;
  6284     }
  6285     EVENT_LOOP_RUNNING = true;
  6286     if (wait !== 0 && wait !== null && wait !== undefined){
  6287         wait += Date.now();
  6288     }
  6289 
  6290     var earliest,
  6291         timer,
  6292         sleep,
  6293         index,
  6294         goal,
  6295         now,
  6296         nextfn;
  6297 
  6298     for (;;) {
  6299         //console.log('timer loop');
  6300         earliest = sleep = goal = now = nextfn = null;
  6301         $timers.lock(function(){
  6302             for(index in $timers){
  6303                 if( isNaN(index*0) ) {
  6304                     continue;
  6305                 }
  6306                 timer = $timers[index];
  6307                 // determine timer with smallest run-at time that is
  6308                 // not already running
  6309                 if( !timer.running && ( !earliest || timer.at < earliest.at) ) {
  6310                     earliest = timer;
  6311                 }
  6312             }
  6313         });
  6314         //next sleep time
  6315         sleep = earliest && earliest.at - Date.now();
  6316         if ( earliest && sleep <= 0 ) {
  6317             nextfn = earliest.fn;
  6318             try {
  6319                 //console.log('running stack %s', nextfn.toString().substring(0,64));
  6320                 earliest.running = true;
  6321                 nextfn();
  6322             // } catch (e) {
  6323             //     console.log('timer error %s %s', nextfn, e);
  6324             } finally {
  6325                 earliest.running = false;
  6326             }
  6327             goal = earliest.at + earliest.interval;
  6328             now = Date.now();
  6329             if ( goal < now ) {
  6330                 earliest.at = now;
  6331             } else {
  6332                 earliest.at = goal;
  6333             }
  6334             continue;
  6335         }
  6336 
  6337         // bunch of subtle cases here ...
  6338         if ( !earliest ) {
  6339             // no events in the queue (but maybe XHR will bring in events, so ...
  6340             if ( !wait || wait < Date.now() ) {
  6341                 // Loop ends if there are no events and a wait hasn't been
  6342                 // requested or has expired
  6343                 break;
  6344             }
  6345         // no events, but a wait requested: fall through to sleep
  6346         } else {
  6347             // there are events in the queue, but they aren't firable now
  6348             /*if ( delta_wait && sleep <= delta_wait ) {
  6349                 //TODO: why waste a check on a tight
  6350                 // loop if it just falls through?
  6351             // if they will happen within the next delta, fall through to sleep
  6352             } else */if ( wait === 0 || ( wait > 0 && wait < Date.now () ) ) {
  6353                 // loop ends even if there are events but the user
  6354                 // specifcally asked not to wait too long
  6355                 break;
  6356             }
  6357             // there are events and the user wants to wait: fall through to sleep
  6358         }
  6359 
  6360         // Related to ajax threads ... hopefully can go away ..
  6361         var interval =  Envjs.WAIT_INTERVAL || 100;
  6362         if ( !sleep || sleep > interval ) {
  6363             sleep = interval;
  6364         }
  6365         //console.log('sleeping %s', sleep);
  6366         Envjs.sleep(sleep);
  6367 
  6368     }
  6369     EVENT_LOOP_RUNNING = was_running;
  6370 };
  6371 
  6372 
  6373 /**
  6374  * @author john resig & the envjs team
  6375  * @uri http://www.envjs.com/
  6376  * @copyright 2008-2010
  6377  * @license MIT
  6378  */
  6379 //CLOSURE_END
  6380 }());
  6381 /*
  6382  * Pure JavaScript Browser Environment
  6383  * By John Resig <http://ejohn.org/> and the Envjs Team
  6384  * Copyright 2008-2010 John Resig, under the MIT License
  6385  *
  6386  * This file simply provides the global definitions we need to
  6387  * be able to correctly implement to core browser DOM HTML interfaces.
  6388  */
  6389 var HTMLDocument,
  6390     HTMLElement,
  6391     HTMLCollection,
  6392     HTMLAnchorElement,
  6393     HTMLAreaElement,
  6394     HTMLBaseElement,
  6395     HTMLQuoteElement,
  6396     HTMLBodyElement,
  6397     HTMLBRElement,
  6398     HTMLButtonElement,
  6399     HTMLCanvasElement,
  6400     HTMLTableColElement,
  6401     HTMLModElement,
  6402     HTMLDivElement,
  6403     HTMLDListElement,
  6404     HTMLFieldSetElement,
  6405     HTMLFormElement,
  6406     HTMLFrameElement,
  6407     HTMLFrameSetElement,
  6408     HTMLHeadElement,
  6409     HTMLHeadingElement,
  6410     HTMLHRElement,
  6411     HTMLHtmlElement,
  6412     HTMLIFrameElement,
  6413     HTMLImageElement,
  6414     HTMLInputElement,
  6415     HTMLLabelElement,
  6416     HTMLLegendElement,
  6417     HTMLLIElement,
  6418     HTMLLinkElement,
  6419     HTMLMapElement,
  6420     HTMLMetaElement,
  6421     HTMLObjectElement,
  6422     HTMLOListElement,
  6423     HTMLOptGroupElement,
  6424     HTMLOptionElement,
  6425     HTMLParagraphElement,
  6426     HTMLParamElement,
  6427     HTMLPreElement,
  6428     HTMLScriptElement,
  6429     HTMLSelectElement,
  6430     HTMLSpanElement,
  6431     HTMLStyleElement,
  6432     HTMLTableElement,
  6433     HTMLTableSectionElement,
  6434     HTMLTableCellElement,
  6435     HTMLTableDataCellElement,
  6436     HTMLTableHeaderCellElement,
  6437     HTMLTableRowElement,
  6438     HTMLTextAreaElement,
  6439     HTMLTitleElement,
  6440     HTMLUListElement,
  6441     HTMLUnknownElement,
  6442     Image,
  6443     Option,
  6444     __loadImage__,
  6445     __loadLink__;
  6446 
  6447 /*
  6448  * Envjs html.1.2.13 
  6449  * Pure JavaScript Browser Environment
  6450  * By John Resig <http://ejohn.org/> and the Envjs Team
  6451  * Copyright 2008-2010 John Resig, under the MIT License
  6452  */
  6453 
  6454 //CLOSURE_START
  6455 (function(){
  6456 
  6457 
  6458 
  6459 
  6460 
  6461 /**
  6462  * @author ariel flesler
  6463  *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
  6464  * @param {Object} str
  6465  */
  6466 function __trim__( str ){
  6467     return (str || "").replace( /^\s+|\s+$/g, "" );
  6468 }
  6469 
  6470 
  6471 /**
  6472  * @author john resig
  6473  */
  6474 // Helper method for extending one object with another.
  6475 function __extend__(a,b) {
  6476     for ( var i in b ) {
  6477         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
  6478         if ( g || s ) {
  6479             if ( g ) { a.__defineGetter__(i, g); }
  6480             if ( s ) { a.__defineSetter__(i, s); }
  6481         } else {
  6482             a[i] = b[i];
  6483         }
  6484     } return a;
  6485 }
  6486 
  6487 /**
  6488  * @author john resig
  6489  */
  6490 //from jQuery
  6491 function __setArray__( target, array ) {
  6492     // Resetting the length to 0, then using the native Array push
  6493     // is a super-fast way to populate an object with array-like properties
  6494     target.length = 0;
  6495     Array.prototype.push.apply( target, array );
  6496 }
  6497 
  6498 /**
  6499  * @class  HTMLDocument
  6500  *      The Document interface represents the entire HTML or XML document.
  6501  *      Conceptually, it is the root of the document tree, and provides
  6502  *      the primary access to the document's data.
  6503  *
  6504  * @extends Document
  6505  */
  6506 HTMLDocument = function(implementation, ownerWindow, referrer) {
  6507     Document.apply(this, arguments);
  6508     this.referrer = referrer || '';
  6509     this.baseURI = "about:blank";
  6510     this.ownerWindow = ownerWindow;
  6511 };
  6512 
  6513 HTMLDocument.prototype = new Document();
  6514 
  6515 __extend__(HTMLDocument.prototype, {
  6516     createElement: function(tagName){
  6517         var node;
  6518         tagName = tagName.toUpperCase();
  6519         // create Element specifying 'this' as ownerDocument
  6520         // This is an html document so we need to use explicit interfaces per the
  6521         //TODO: would be much faster as a big switch
  6522         switch(tagName){
  6523         case "A":
  6524             node = new HTMLAnchorElement(this);break;
  6525         case "AREA":
  6526             node = new HTMLAreaElement(this);break;
  6527         case "BASE":
  6528             node = new HTMLBaseElement(this);break;
  6529         case "BLOCKQUOTE":
  6530             node = new HTMLQuoteElement(this);break;
  6531         case "CANVAS":
  6532             node = new HTMLCanvasElement(this);break;
  6533         case "Q":
  6534             node = new HTMLQuoteElement(this);break;
  6535         case "BODY":
  6536             node = new HTMLBodyElement(this);break;
  6537         case "BR":
  6538             node = new HTMLBRElement(this);break;
  6539         case "BUTTON":
  6540             node = new HTMLButtonElement(this);break;
  6541         case "CAPTION":
  6542             node = new HTMLElement(this);break;
  6543         case "COL":
  6544             node = new HTMLTableColElement(this);break;
  6545         case "COLGROUP":
  6546             node = new HTMLTableColElement(this);break;
  6547         case "DEL":
  6548             node = new HTMLModElement(this);break;
  6549         case "INS":
  6550             node = new HTMLModElement(this);break;
  6551         case "DIV":
  6552             node = new HTMLDivElement(this);break;
  6553         case "DL":
  6554             node = new HTMLDListElement(this);break;
  6555         case "DT":
  6556             node = new HTMLElement(this); break;
  6557         case "FIELDSET":
  6558             node = new HTMLFieldSetElement(this);break;
  6559         case "FORM":
  6560             node = new HTMLFormElement(this);break;
  6561         case "FRAME":
  6562             node = new HTMLFrameElement(this);break;
  6563         case "H1":
  6564             node = new HTMLHeadingElement(this);break;
  6565         case "H2":
  6566             node = new HTMLHeadingElement(this);break;
  6567         case "H3":
  6568             node = new HTMLHeadingElement(this);break;
  6569         case "H4":
  6570             node = new HTMLHeadingElement(this);break;
  6571         case "H5":
  6572             node = new HTMLHeadingElement(this);break;
  6573         case "H6":
  6574             node = new HTMLHeadingElement(this);break;
  6575         case "HEAD":
  6576             node = new HTMLHeadElement(this);break;
  6577         case "HR":
  6578             node = new HTMLHRElement(this);break;
  6579         case "HTML":
  6580             node = new HTMLHtmlElement(this);break;
  6581         case "IFRAME":
  6582             node = new HTMLIFrameElement(this);break;
  6583         case "IMG":
  6584             node = new HTMLImageElement(this);break;
  6585         case "INPUT":
  6586             node = new HTMLInputElement(this);break;
  6587         case "LABEL":
  6588             node = new HTMLLabelElement(this);break;
  6589         case "LEGEND":
  6590             node = new HTMLLegendElement(this);break;
  6591         case "LI":
  6592             node = new HTMLLIElement(this);break;
  6593         case "LINK":
  6594             node = new HTMLLinkElement(this);break;
  6595         case "MAP":
  6596             node = new HTMLMapElement(this);break;
  6597         case "META":
  6598             node = new HTMLMetaElement(this);break;
  6599         case "NOSCRIPT":
  6600             node = new HTMLElement(this);break;
  6601         case "OBJECT":
  6602             node = new HTMLObjectElement(this);break;
  6603         case "OPTGROUP":
  6604             node = new HTMLOptGroupElement(this);break;
  6605         case "OL":
  6606             node = new HTMLOListElement(this); break;
  6607         case "OPTION":
  6608             node = new HTMLOptionElement(this);break;
  6609         case "P":
  6610             node = new HTMLParagraphElement(this);break;
  6611         case "PARAM":
  6612             node = new HTMLParamElement(this);break;
  6613         case "PRE":
  6614             node = new HTMLPreElement(this);break;
  6615         case "SCRIPT":
  6616             node = new HTMLScriptElement(this);break;
  6617         case "SELECT":
  6618             node = new HTMLSelectElement(this);break;
  6619         case "SMALL":
  6620             node = new HTMLElement(this);break;
  6621         case "SPAN":
  6622             node = new HTMLSpanElement(this);break;
  6623         case "STRONG":
  6624             node = new HTMLElement(this);break;
  6625         case "STYLE":
  6626             node = new HTMLStyleElement(this);break;
  6627         case "TABLE":
  6628             node = new HTMLTableElement(this);break;
  6629         case "TBODY":
  6630             node = new HTMLTableSectionElement(this);break;
  6631         case "TFOOT":
  6632             node = new HTMLTableSectionElement(this);break;
  6633         case "THEAD":
  6634             node = new HTMLTableSectionElement(this);break;
  6635         case "TD":
  6636             node = new HTMLTableDataCellElement(this);break;
  6637         case "TH":
  6638             node = new HTMLTableHeaderCellElement(this);break;
  6639         case "TEXTAREA":
  6640             node = new HTMLTextAreaElement(this);break;
  6641         case "TITLE":
  6642             node = new HTMLTitleElement(this);break;
  6643         case "TR":
  6644             node = new HTMLTableRowElement(this);break;
  6645         case "UL":
  6646             node = new HTMLUListElement(this);break;
  6647         default:
  6648             node = new HTMLUnknownElement(this);
  6649         }
  6650         // assign values to properties (and aliases)
  6651         node.nodeName  = tagName;
  6652         return node;
  6653     },
  6654     createElementNS : function (uri, local) {
  6655         //print('createElementNS :'+uri+" "+local);
  6656         if(!uri){
  6657             return this.createElement(local);
  6658         }else if ("http://www.w3.org/1999/xhtml" == uri) {
  6659             return this.createElement(local);
  6660         } else if ("http://www.w3.org/1998/Math/MathML" == uri) {
  6661             return this.createElement(local);
  6662         } else {
  6663             return Document.prototype.createElementNS.apply(this,[uri, local]);
  6664         }
  6665     },
  6666     get anchors(){
  6667         return new HTMLCollection(this.getElementsByTagName('a'));
  6668     },
  6669     get applets(){
  6670         return new HTMLCollection(this.getElementsByTagName('applet'));
  6671     },
  6672     get documentElement(){
  6673         var html = Document.prototype.__lookupGetter__('documentElement').apply(this,[]);
  6674         if( html === null){
  6675             html = this.createElement('html');
  6676             this.appendChild(html);
  6677             html.appendChild(this.createElement('head'));
  6678             html.appendChild(this.createElement('body'));
  6679         }
  6680         return html;
  6681     },
  6682     //document.head is non-standard
  6683     get head(){
  6684         //console.log('get head');
  6685         if (!this.documentElement) {
  6686             this.appendChild(this.createElement('html'));
  6687         }
  6688         var element = this.documentElement,
  6689         length = element.childNodes.length,
  6690         i;
  6691         //check for the presence of the head element in this html doc
  6692         for(i=0;i<length;i++){
  6693             if(element.childNodes[i].nodeType === Node.ELEMENT_NODE){
  6694                 if(element.childNodes[i].tagName.toLowerCase() === 'head'){
  6695                     return element.childNodes[i];
  6696                 }
  6697             }
  6698         }
  6699         //no head?  ugh bad news html.. I guess we'll force the issue?
  6700         var head = element.appendChild(this.createElement('head'));
  6701         return head;
  6702     },
  6703     get title(){
  6704         //console.log('get title');
  6705         if (!this.documentElement) {
  6706             this.appendChild(this.createElement('html'));
  6707         }
  6708         var title,
  6709         head = this.head,
  6710         length = head.childNodes.length,
  6711         i;
  6712         //check for the presence of the title element in this head element
  6713         for(i=0;i<length;i++){
  6714             if(head.childNodes[i].nodeType === Node.ELEMENT_NODE){
  6715                 if(head.childNodes[i].tagName.toLowerCase() === 'title'){
  6716                     return head.childNodes[i].textContent;
  6717                 }
  6718             }
  6719         }
  6720         //no title?  ugh bad news html.. I guess we'll force the issue?
  6721         title = head.appendChild(this.createElement('title'));
  6722         return title.appendChild(this.createTextNode('Untitled Document')).nodeValue;
  6723     },
  6724     set title(titleStr){
  6725         //console.log('set title %s', titleStr);
  6726         if (!this.documentElement) {
  6727             this.appendChild(this.createElement('html'));
  6728         }
  6729         var title = this.title;
  6730         title.textContent = titleStr;
  6731     },
  6732 
  6733     get body(){
  6734         //console.log('get body');
  6735         if (!this.documentElement) {
  6736             this.appendChild(this.createElement('html'));
  6737         }
  6738         var body,
  6739         element = this.documentElement,
  6740         length = element.childNodes.length,
  6741         i;
  6742         //check for the presence of the head element in this html doc
  6743         for(i=0;i<length;i++){
  6744             if(element.childNodes[i].nodeType === Node.ELEMENT_NODE){
  6745                 if(element.childNodes[i].tagName.toLowerCase() === 'body'){
  6746                     return element.childNodes[i];
  6747                 }
  6748             }
  6749         }
  6750         //no head?  ugh bad news html.. I guess we'll force the issue?
  6751         return element.appendChild(this.createElement('body'));
  6752     },
  6753     set body(x){console.log('set body');/**in firefox this is a benevolent do nothing*/},
  6754     get cookie(){
  6755         return Envjs.getCookies(this.location+'');
  6756     },
  6757     set cookie(cookie){
  6758         return Envjs.setCookie(this.location+'', cookie);
  6759     },
  6760 
  6761     /**
  6762      * document.location
  6763      *
  6764      * should be identical to window.location
  6765      *
  6766      * HTML5:
  6767      * http://dev.w3.org/html5/spec/Overview.html#the-location-interface
  6768      *
  6769      * Mozilla MDC:
  6770      * https://developer.mozilla.org/en/DOM/document.location
  6771      *
  6772      */
  6773     get location() {
  6774         if (this.ownerWindow) {
  6775             return this.ownerWindow.location;
  6776         } else {
  6777             return this.baseURI;
  6778         }
  6779     },
  6780     set location(url) {
  6781         this.baseURI = url;
  6782         if (this.ownerWindow) {
  6783             this.ownerWindow.location = url;
  6784         }
  6785     },
  6786 
  6787     /**
  6788      * document.URL (read-only)
  6789      *
  6790      * HTML DOM Level 2:
  6791      * http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-46183437
  6792      *
  6793      * HTML5:
  6794      * http://dev.w3.org/html5/spec/Overview.html#dom-document-url
  6795      *
  6796      * Mozilla MDC:
  6797      * https://developer.mozilla.org/en/DOM/document.URL
  6798      */
  6799     get URL() {
  6800         return this.location;
  6801     },
  6802     set URL(url) {
  6803         this.location = url;
  6804     },
  6805 
  6806     /**
  6807      * document.domain
  6808      *
  6809      * HTML5 Spec:
  6810      * http://dev.w3.org/html5/spec/Overview.html#dom-document-domain
  6811      *
  6812      * Mozilla MDC:
  6813      * https://developer.mozilla.org/en/DOM/document.domain
  6814      *
  6815      */
  6816     get domain(){
  6817         var HOSTNAME = new RegExp('\/\/([^\:\/]+)'),
  6818         matches = HOSTNAME.exec(this.baseURI);
  6819         return matches&&matches.length>1?matches[1]:"";
  6820     },
  6821     set domain(value){
  6822         var i,
  6823         domainParts = this.domain.split('.').reverse(),
  6824         newDomainParts = value.split('.').reverse();
  6825         if(newDomainParts.length > 1){
  6826             for(i=0;i<newDomainParts.length;i++){
  6827                 if(!(newDomainParts[i] === domainParts[i])){
  6828                     return;
  6829                 }
  6830             }
  6831             this.baseURI = this.baseURI.replace(domainParts.join('.'), value);
  6832         }
  6833     },
  6834 
  6835     get forms(){
  6836         return new HTMLCollection(this.getElementsByTagName('form'));
  6837     },
  6838     get images(){
  6839         return new HTMLCollection(this.getElementsByTagName('img'));
  6840     },
  6841     get lastModified(){
  6842         /* TODO */
  6843         return this._lastModified;
  6844     },
  6845     get links(){
  6846         return new HTMLCollection(this.getElementsByTagName('a'));
  6847     },
  6848     getElementsByName : function(name){
  6849         //returns a real Array + the NodeList
  6850         var retNodes = __extend__([],new NodeList(this, this.documentElement)),
  6851         node;
  6852         // loop through all Elements
  6853         var all = this.getElementsByTagName('*');
  6854         for (var i=0; i < all.length; i++) {
  6855             node = all[i];
  6856             if (node.nodeType === Node.ELEMENT_NODE &&
  6857                 node.getAttribute('name') == name) {
  6858                 retNodes.push(node);
  6859             }
  6860         }
  6861         return retNodes;
  6862     },
  6863     toString: function(){
  6864         return "[object HTMLDocument]";
  6865     },
  6866     get innerHTML(){
  6867         return this.documentElement.outerHTML;
  6868     }
  6869 });
  6870 
  6871 
  6872 
  6873 Aspect.around({
  6874     target: Node,
  6875     method:"appendChild"
  6876 }, function(invocation) {
  6877     var event,
  6878     okay,
  6879     node = invocation.proceed(),
  6880     doc = node.ownerDocument;
  6881 
  6882     //console.log('element appended: %s %s %s', node+'', node.nodeName, node.namespaceURI);
  6883     if((node.nodeType !== Node.ELEMENT_NODE)){
  6884         //for now we are only handling element insertions.  probably
  6885         //we will need to handle text node changes to script tags and
  6886         //changes to src attributes
  6887         return node;
  6888     }
  6889     //console.log('appended html element %s %s %s',
  6890     //             node.namespaceURI, node.nodeName, node);
  6891     switch(doc.parsing){
  6892         case true:
  6893             //handled by parser if included
  6894             //console.log('html document in parse mode');
  6895             break;
  6896         case false:
  6897             switch(node.namespaceURI){
  6898                 case null:
  6899                     //fall through
  6900                 case "":
  6901                     //fall through
  6902                 case "http://www.w3.org/1999/xhtml":
  6903                     switch(node.tagName.toLowerCase()){
  6904                     case 'style':
  6905                         document.styleSheets.push(CSSStyleSheet(node));
  6906                         break;
  6907                     case 'script':
  6908                         if((this.nodeName.toLowerCase() === 'head')){
  6909                             try{
  6910                                 okay = Envjs.loadLocalScript(node, null);
  6911                                 //console.log('loaded script? %s %s', node.uuid, okay);
  6912                                 // only fire event if we actually had something to load
  6913                                 if (node.src && node.src.length > 0){
  6914                                     event = doc.createEvent('HTMLEvents');
  6915                                     event.initEvent( okay ? "load" : "error", false, false );
  6916                                     node.dispatchEvent( event, false );
  6917                                 }
  6918                             }catch(e){
  6919                                 console.log('error loading html element %s %e', node, e.toString());
  6920                             }
  6921                         }
  6922                         break;
  6923                     case 'frame':
  6924                     case 'iframe':
  6925                         node.contentWindow = { };
  6926                         node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
  6927                         node.contentWindow.document = node.contentDocument;
  6928                         try{
  6929                             Window;
  6930                         }catch(e){
  6931                             node.contentDocument.addEventListener('DOMContentLoaded', function(){
  6932                                 event = node.contentDocument.createEvent('HTMLEvents');
  6933                                 event.initEvent("load", false, false);
  6934                                 node.dispatchEvent( event, false );
  6935                             });
  6936                         }
  6937                         try{
  6938                             if (node.src && node.src.length > 0){
  6939                                 //console.log("getting content document for (i)frame from %s", node.src);
  6940                                 Envjs.loadFrame(node, Envjs.uri(node.src));
  6941                                 event = node.contentDocument.createEvent('HTMLEvents');
  6942                                 event.initEvent("load", false, false);
  6943                                 node.dispatchEvent( event, false );
  6944                             }else{
  6945                                 //I dont like this being here:
  6946                                 //TODO: better  mix-in strategy so the try/catch isnt required
  6947                                 try{
  6948                                     if(Window){
  6949                                         Envjs.loadFrame(node);
  6950                                         //console.log('src/html/document.js: triggering frame load');
  6951                                         event = node.contentDocument.createEvent('HTMLEvents');
  6952                                         event.initEvent("load", false, false);
  6953                                         node.dispatchEvent( event, false );
  6954                                     }
  6955                                 }catch(e){}
  6956                             }
  6957                         }catch(e){
  6958                             console.log('error loading html element %s %e', node, e.toString());
  6959                         }
  6960                         break;
  6961         
  6962                     case 'link':
  6963                         if (node.href && node.href.length > 0) {
  6964                             __loadLink__(node, node.href);
  6965                         }
  6966                         break;
  6967                         /*
  6968                           case 'img':
  6969                           if (node.src && node.src.length > 0){
  6970                           // don't actually load anything, so we're "done" immediately:
  6971                           event = doc.createEvent('HTMLEvents');
  6972                           event.initEvent("load", false, false);
  6973                           node.dispatchEvent( event, false );
  6974                           }
  6975                           break;
  6976                         */
  6977                     case 'option':
  6978                         node._updateoptions();
  6979                         break;
  6980                     default:
  6981                         if(node.getAttribute('onload')){
  6982                             console.log('calling attribute onload %s | %s', node.onload, node.tagName);
  6983                             node.onload();
  6984                         }
  6985                         break;
  6986                     }//switch on name
  6987                 default:
  6988                     break;
  6989             }//switch on ns
  6990             break;
  6991         default:
  6992             // console.log('element appended: %s %s', node+'', node.namespaceURI);
  6993     }//switch on doc.parsing
  6994     return node;
  6995 
  6996 });
  6997 
  6998 Aspect.around({
  6999     target: Node,
  7000     method:"removeChild"
  7001 }, function(invocation) {
  7002     var event,
  7003         okay,
  7004         node = invocation.proceed(),
  7005         doc = node.ownerDocument;
  7006     if((node.nodeType !== Node.ELEMENT_NODE)){
  7007         //for now we are only handling element insertions.  probably we will need
  7008         //to handle text node changes to script tags and changes to src
  7009         //attributes
  7010         if(node.nodeType !== Node.DOCUMENT_NODE && node.uuid){
  7011             //console.log('removing event listeners, %s', node, node.uuid);
  7012             node.removeEventListener('*', null, null);
  7013         }
  7014         return node;
  7015     }
  7016     //console.log('appended html element %s %s %s', node.namespaceURI, node.nodeName, node);
  7017 
  7018     switch(doc.parsing){
  7019         case true:
  7020             //handled by parser if included
  7021             break;
  7022         case false:
  7023             switch(node.namespaceURI){
  7024             case null:
  7025                 //fall through
  7026             case "":
  7027                 //fall through
  7028             case "http://www.w3.org/1999/xhtml":
  7029                 //this is interesting dillema since our event engine is
  7030                 //storing the registered events in an array accessed
  7031                 //by the uuid property of the node.  unforunately this
  7032                 //means listeners hang out way after(forever ;)) the node
  7033                 //has been removed and gone out of scope.
  7034                 //console.log('removing event listeners, %s', node, node.uuid);
  7035                 node.removeEventListener('*', null, null);
  7036                 switch(node.tagName.toLowerCase()){
  7037                 case 'frame':
  7038                 case 'iframe':
  7039                     try{
  7040                         //console.log('removing iframe document');
  7041                         try{
  7042                             Envjs.unloadFrame(node);
  7043                         }catch(e){
  7044                             console.log('error freeing resources from frame %s', e);
  7045                         }
  7046                         node.contentWindow = null;
  7047                         node.contentDocument = null;
  7048                     }catch(e){
  7049                         console.log('error unloading html element %s %e', node, e.toString());
  7050                     }
  7051                     break;
  7052                 default:
  7053                     break;
  7054                 }//switch on name
  7055             default:
  7056                 break;
  7057             }//switch on ns
  7058             break;
  7059         default:
  7060             console.log('element appended: %s %s', node+'', node.namespaceURI);
  7061     }//switch on doc.parsing
  7062     return node;
  7063 
  7064 });
  7065 
  7066 
  7067 
  7068 /**
  7069  * Named Element Support
  7070  *
  7071  *
  7072  */
  7073 
  7074 /*
  7075  *
  7076  * @returns 'name' if the node has a appropriate name
  7077  *          null if node does not have a name
  7078  */
  7079 
  7080 var __isNamedElement__ = function(node) {
  7081     if (node.nodeType !== Node.ELEMENT_NODE) {
  7082         return null;
  7083     }
  7084     var tagName = node.tagName.toLowerCase();
  7085     var nodename = null;
  7086 
  7087     switch (tagName) {
  7088         case 'embed':
  7089         case 'form':
  7090         case 'iframe':
  7091             nodename = node.getAttribute('name');
  7092             break;
  7093         case 'applet':
  7094             nodename = node.id;
  7095             break;
  7096         case 'object':
  7097             // TODO: object needs to be 'fallback free'
  7098             nodename = node.id;
  7099             break;
  7100         case 'img':
  7101             nodename = node.id;
  7102             if (!nodename || ! node.getAttribute('name')) {
  7103                 nodename = null;
  7104             }
  7105             break;
  7106     }
  7107     return (nodename) ? nodename : null;
  7108 };
  7109 
  7110 
  7111 var __addNamedMap__ = function(target, node) {
  7112     var nodename = __isNamedElement__(node);
  7113     if (nodename) {
  7114         target.__defineGetter__(nodename, function() {
  7115             return node;
  7116         });
  7117     }
  7118 };
  7119 
  7120 var __removeNamedMap__ = function(target, node) {
  7121     if (!node) {
  7122         return;
  7123     }
  7124     var nodename = __isNamedElement__(node);
  7125     if (nodename) {
  7126         delete target[nodename];
  7127     }
  7128 };
  7129     
  7130 /**
  7131  * @name HTMLEvents
  7132  * @w3c:domlevel 2
  7133  * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
  7134  */
  7135 
  7136 var __eval__ = function(script, node){
  7137     if (!script == ""){
  7138         // don't assemble environment if no script...
  7139         try{
  7140             eval(script);
  7141         }catch(e){
  7142             console.log('error evaluating %s', e);
  7143         }
  7144     }
  7145 };
  7146 
  7147 var HTMLEvents= function(){};
  7148 HTMLEvents.prototype = {
  7149     onload: function(event){
  7150         __eval__(this.getAttribute('onload')||'', this);
  7151     },
  7152     onunload: function(event){
  7153         __eval__(this.getAttribute('onunload')||'', this);
  7154     },
  7155     onabort: function(event){
  7156         __eval__(this.getAttribute('onabort')||'', this);
  7157     },
  7158     onerror: function(event){
  7159         __eval__(this.getAttribute('onerror')||'', this);
  7160     },
  7161     onselect: function(event){
  7162         __eval__(this.getAttribute('onselect')||'', this);
  7163     },
  7164     onchange: function(event){
  7165         __eval__(this.getAttribute('onchange')||'', this);
  7166     },
  7167     onsubmit: function(event){
  7168         if (__eval__(this.getAttribute('onsubmit')||'', this)) {
  7169             this.submit();
  7170         }
  7171     },
  7172     onreset: function(event){
  7173         __eval__(this.getAttribute('onreset')||'', this);
  7174     },
  7175     onfocus: function(event){
  7176         __eval__(this.getAttribute('onfocus')||'', this);
  7177     },
  7178     onblur: function(event){
  7179         __eval__(this.getAttribute('onblur')||'', this);
  7180     },
  7181     onresize: function(event){
  7182         __eval__(this.getAttribute('onresize')||'', this);
  7183     },
  7184     onscroll: function(event){
  7185         __eval__(this.getAttribute('onscroll')||'', this);
  7186     }
  7187 };
  7188 
  7189 //HTMLDocument, HTMLFramesetElement, HTMLObjectElement
  7190 var  __load__ = function(element){
  7191     var event = new Event('HTMLEvents');
  7192     event.initEvent("load", false, false);
  7193     element.dispatchEvent(event);
  7194     return event;
  7195 };
  7196 
  7197 //HTMLFramesetElement, HTMLBodyElement
  7198 var  __unload__ = function(element){
  7199     var event = new Event('HTMLEvents');
  7200     event.initEvent("unload", false, false);
  7201     element.dispatchEvent(event);
  7202     return event;
  7203 };
  7204 
  7205 //HTMLObjectElement
  7206 var  __abort__ = function(element){
  7207     var event = new Event('HTMLEvents');
  7208     event.initEvent("abort", true, false);
  7209     element.dispatchEvent(event);
  7210     return event;
  7211 };
  7212 
  7213 //HTMLFramesetElement, HTMLObjectElement, HTMLBodyElement
  7214 var  __error__ = function(element){
  7215     var event = new Event('HTMLEvents');
  7216     event.initEvent("error", true, false);
  7217     element.dispatchEvent(event);
  7218     return event;
  7219 };
  7220 
  7221 //HTMLInputElement, HTMLTextAreaElement
  7222 var  __select__ = function(element){
  7223     var event = new Event('HTMLEvents');
  7224     event.initEvent("select", true, false);
  7225     element.dispatchEvent(event);
  7226     return event;
  7227 };
  7228 
  7229 //HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
  7230 var  __change__ = function(element){
  7231     var event = new Event('HTMLEvents');
  7232     event.initEvent("change", true, false);
  7233     element.dispatchEvent(event);
  7234     return event;
  7235 };
  7236 
  7237 //HtmlFormElement
  7238 var __submit__ = function(element){
  7239     var event = new Event('HTMLEvents');
  7240     event.initEvent("submit", true, true);
  7241     element.dispatchEvent(event);
  7242     return event;
  7243 };
  7244 
  7245 //HtmlFormElement
  7246 var  __reset__ = function(element){
  7247     var event = new Event('HTMLEvents');
  7248     event.initEvent("reset", false, false);
  7249     element.dispatchEvent(event);
  7250     return event;
  7251 };
  7252 
  7253 //LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
  7254 var __focus__ = function(element){
  7255     var event = new Event('HTMLEvents');
  7256     event.initEvent("focus", false, false);
  7257     element.dispatchEvent(event);
  7258     return event;
  7259 };
  7260 
  7261 //LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
  7262 var __blur__ = function(element){
  7263     var event = new Event('HTMLEvents');
  7264     event.initEvent("blur", false, false);
  7265     element.dispatchEvent(event);
  7266     return event;
  7267 };
  7268 
  7269 //Window
  7270 var __resize__ = function(element){
  7271     var event = new Event('HTMLEvents');
  7272     event.initEvent("resize", true, false);
  7273     element.dispatchEvent(event);
  7274     return event;
  7275 };
  7276 
  7277 //Window
  7278 var __scroll__ = function(element){
  7279     var event = new Event('HTMLEvents');
  7280     event.initEvent("scroll", true, false);
  7281     element.dispatchEvent(event);
  7282     return event;
  7283 };
  7284 
  7285 /**
  7286  * @name KeyboardEvents
  7287  * @w3c:domlevel 2 
  7288  * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
  7289  */
  7290 var KeyboardEvents= function(){};
  7291 KeyboardEvents.prototype = {
  7292     onkeydown: function(event){
  7293         __eval__(this.getAttribute('onkeydown')||'', this);
  7294     },
  7295     onkeypress: function(event){
  7296         __eval__(this.getAttribute('onkeypress')||'', this);
  7297     },
  7298     onkeyup: function(event){
  7299         __eval__(this.getAttribute('onkeyup')||'', this);
  7300     }
  7301 };
  7302 
  7303 
  7304 var __registerKeyboardEventAttrs__ = function(elm){
  7305     if(elm.hasAttribute('onkeydown')){ 
  7306         elm.addEventListener('keydown', elm.onkeydown, false); 
  7307     }
  7308     if(elm.hasAttribute('onkeypress')){ 
  7309         elm.addEventListener('keypress', elm.onkeypress, false); 
  7310     }
  7311     if(elm.hasAttribute('onkeyup')){ 
  7312         elm.addEventListener('keyup', elm.onkeyup, false); 
  7313     }
  7314     return elm;
  7315 };
  7316 
  7317 //HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
  7318 var  __keydown__ = function(element){
  7319     var event = new Event('KeyboardEvents');
  7320     event.initEvent("keydown", false, false);
  7321     element.dispatchEvent(event);
  7322 };
  7323 
  7324 //HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
  7325 var  __keypress__ = function(element){
  7326     var event = new Event('KeyboardEvents');
  7327     event.initEvent("keypress", false, false);
  7328     element.dispatchEvent(event);
  7329 };
  7330 
  7331 //HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
  7332 var  __keyup__ = function(element){
  7333     var event = new Event('KeyboardEvents');
  7334     event.initEvent("keyup", false, false);
  7335     element.dispatchEvent(event);
  7336 };
  7337 
  7338 /**
  7339  * @name MaouseEvents
  7340  * @w3c:domlevel 2 
  7341  * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
  7342  */
  7343 var MouseEvents= function(){};
  7344 MouseEvents.prototype = {
  7345     onclick: function(event){
  7346         __eval__(this.getAttribute('onclick')||'', this);
  7347     },
  7348     ondblclick: function(event){
  7349         __eval__(this.getAttribute('ondblclick')||'', this);
  7350     },
  7351     onmousedown: function(event){
  7352         __eval__(this.getAttribute('onmousedown')||'', this);
  7353     },
  7354     onmousemove: function(event){
  7355         __eval__(this.getAttribute('onmousemove')||'', this);
  7356     },
  7357     onmouseout: function(event){
  7358         __eval__(this.getAttribute('onmouseout')||'', this);
  7359     },
  7360     onmouseover: function(event){
  7361         __eval__(this.getAttribute('onmouseover')||'', this);
  7362     },
  7363     onmouseup: function(event){
  7364         __eval__(this.getAttribute('onmouseup')||'', this);
  7365     }  
  7366 };
  7367 
  7368 var __registerMouseEventAttrs__ = function(elm){
  7369     if(elm.hasAttribute('onclick')){ 
  7370         elm.addEventListener('click', elm.onclick, false); 
  7371     }
  7372     if(elm.hasAttribute('ondblclick')){ 
  7373         elm.addEventListener('dblclick', elm.ondblclick, false); 
  7374     }
  7375     if(elm.hasAttribute('onmousedown')){ 
  7376         elm.addEventListener('mousedown', elm.onmousedown, false); 
  7377     }
  7378     if(elm.hasAttribute('onmousemove')){ 
  7379         elm.addEventListener('mousemove', elm.onmousemove, false); 
  7380     }
  7381     if(elm.hasAttribute('onmouseout')){ 
  7382         elm.addEventListener('mouseout', elm.onmouseout, false); 
  7383     }
  7384     if(elm.hasAttribute('onmouseover')){ 
  7385         elm.addEventListener('mouseover', elm.onmouseover, false); 
  7386     }
  7387     if(elm.hasAttribute('onmouseup')){ 
  7388         elm.addEventListener('mouseup', elm.onmouseup, false); 
  7389     }
  7390     return elm;
  7391 };
  7392 
  7393 
  7394 var  __click__ = function(element){
  7395     var event = new Event('MouseEvents');
  7396     event.initEvent("click", true, true, null, 0,
  7397                 0, 0, 0, 0, false, false, false, 
  7398                 false, null, null);
  7399     element.dispatchEvent(event);
  7400 };
  7401 var  __mousedown__ = function(element){
  7402     var event = new Event('MouseEvents');
  7403     event.initEvent("mousedown", true, true, null, 0,
  7404                 0, 0, 0, 0, false, false, false, 
  7405                 false, null, null);
  7406     element.dispatchEvent(event);
  7407 };
  7408 var  __mouseup__ = function(element){
  7409     var event = new Event('MouseEvents');
  7410     event.initEvent("mouseup", true, true, null, 0,
  7411                 0, 0, 0, 0, false, false, false, 
  7412                 false, null, null);
  7413     element.dispatchEvent(event);
  7414 };
  7415 var  __mouseover__ = function(element){
  7416     var event = new Event('MouseEvents');
  7417     event.initEvent("mouseover", true, true, null, 0,
  7418                 0, 0, 0, 0, false, false, false, 
  7419                 false, null, null);
  7420     element.dispatchEvent(event);
  7421 };
  7422 var  __mousemove__ = function(element){
  7423     var event = new Event('MouseEvents');
  7424     event.initEvent("mousemove", true, true, null, 0,
  7425                 0, 0, 0, 0, false, false, false, 
  7426                 false, null, null);
  7427     element.dispatchEvent(event);
  7428 };
  7429 var  __mouseout__ = function(element){
  7430     var event = new Event('MouseEvents');
  7431     event.initEvent("mouseout", true, true, null, 0,
  7432                 0, 0, 0, 0, false, false, false, 
  7433                 false, null, null);
  7434     element.dispatchEvent(event);
  7435 };
  7436 
  7437 /**
  7438  * HTMLElement - DOM Level 2
  7439  */
  7440 
  7441 
  7442 /* Hack for http://www.prototypejs.org/
  7443  *
  7444  * Prototype 1.6 (the library) creates a new global Element, which causes
  7445  * envjs to use the wrong Element.
  7446  *
  7447  * http://envjs.lighthouseapp.com/projects/21590/tickets/108-prototypejs-wont-load-due-it-clobbering-element
  7448  *
  7449  * Options:
  7450  *  (1) Rename the dom/element to something else
  7451  *       rejected: been done before. people want Element.
  7452  *  (2) merge dom+html and not export Element to global namespace
  7453  *      (meaning we would use a local var Element in a closure, so prototype
  7454  *      can do what ever it wants)
  7455  *       rejected: want dom and html separate
  7456  *  (3) use global namespace (put everything under Envjs = {})
  7457  *       rejected: massive change
  7458  *  (4) use commonjs modules (similar to (3) in spirit)
  7459  *       rejected: massive change
  7460  *
  7461  *  or
  7462  *
  7463  *  (5) take a reference to Element during initial loading ("compile
  7464  *      time"), and use the reference instead of "Element".  That's
  7465  *      what the next line does.  We use __DOMElement__ if we need to
  7466  *      reference the parent class.  Only this file explcity uses
  7467  *      Element so this should work, and is the most minimal change I
  7468  *      could think of with no external API changes.
  7469  *
  7470  */
  7471 var  __DOMElement__ = Element;
  7472 
  7473 HTMLElement = function(ownerDocument) {
  7474     __DOMElement__.apply(this, arguments);
  7475 };
  7476 
  7477 HTMLElement.prototype = new Element();
  7478 __extend__(HTMLElement.prototype, HTMLEvents.prototype);
  7479 __extend__(HTMLElement.prototype, {
  7480     get className() {
  7481         return this.getAttribute("class")||'';
  7482     },
  7483     set className(value) {
  7484         return this.setAttribute("class",__trim__(value));
  7485     },
  7486     get dir() {
  7487         return this.getAttribute("dir")||"ltr";
  7488     },
  7489     set dir(val) {
  7490         return this.setAttribute("dir",val);
  7491     },
  7492     get id(){
  7493         return this.getAttribute('id');
  7494     },
  7495     set id(id){
  7496         this.setAttribute('id', id);
  7497     },
  7498     get innerHTML(){
  7499         var ret = "",
  7500         i;
  7501 
  7502         // create string containing the concatenation of the string
  7503         // values of each child
  7504         for (i=0; i < this.childNodes.length; i++) {
  7505             if(this.childNodes[i]){
  7506                 if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
  7507                     ret += this.childNodes[i].xhtml;
  7508                 } else if (this.childNodes[i].nodeType === Node.TEXT_NODE && i>0 &&
  7509                            this.childNodes[i-1].nodeType === Node.TEXT_NODE){
  7510                     //add a single space between adjacent text nodes
  7511                     ret += " "+this.childNodes[i].xml;
  7512                 }else{
  7513                     ret += this.childNodes[i].xml;
  7514                 }
  7515             }
  7516         }
  7517         return ret;
  7518     },
  7519     get lang() {
  7520         return this.getAttribute("lang");
  7521     },
  7522     set lang(val) {
  7523         return this.setAttribute("lang",val);
  7524     },
  7525     get offsetHeight(){
  7526         return Number((this.style.height || '').replace("px",""));
  7527     },
  7528     get offsetWidth(){
  7529         return Number((this.style.width || '').replace("px",""));
  7530     },
  7531     offsetLeft: 0,
  7532     offsetRight: 0,
  7533     get offsetParent(){
  7534         /* TODO */
  7535         return;
  7536     },
  7537     set offsetParent(element){
  7538         /* TODO */
  7539         return;
  7540     },
  7541     scrollHeight: 0,
  7542     scrollWidth: 0,
  7543     scrollLeft: 0,
  7544     scrollRight: 0,
  7545     get style(){
  7546         return this.getAttribute('style')||'';
  7547     },
  7548     get title() {
  7549         return this.getAttribute("title");
  7550     },
  7551     set title(value) {
  7552         return this.setAttribute("title", value);
  7553     },
  7554     get tabIndex(){
  7555         var tabindex = this.getAttribute('tabindex');
  7556         if(tabindex!==null){
  7557             return Number(tabindex);
  7558         } else {
  7559             return 0;
  7560         }
  7561     },
  7562     set tabIndex(value){
  7563         if (value === undefined || value === null) {
  7564             value = 0;
  7565         }
  7566         this.setAttribute('tabindex',Number(value));
  7567     },
  7568     get outerHTML(){
  7569         //Not in the specs but I'll leave it here for now.
  7570         return this.xhtml;
  7571     },
  7572     scrollIntoView: function(){
  7573         /*TODO*/
  7574         return;
  7575     },
  7576     toString: function(){
  7577         return '[object HTMLElement]';
  7578     },
  7579     get xhtml() {
  7580         // HTMLDocument.xhtml is non-standard
  7581         // This is exactly like Document.xml except the tagName has to be
  7582         // lower cased.  I dont like to duplicate this but its really not
  7583         // a simple work around between xml and html serialization via
  7584         // XMLSerializer (which uppercases html tags) and innerHTML (which
  7585         // lowercases tags)
  7586 
  7587         var ret = "",
  7588             ns = "",
  7589             name = (this.tagName+"").toLowerCase(),
  7590             attrs,
  7591             attrstring = "",
  7592             i;
  7593 
  7594         // serialize namespace declarations
  7595         if (this.namespaceURI){
  7596             if((this === this.ownerDocument.documentElement) ||
  7597                (!this.parentNode) ||
  7598                (this.parentNode &&
  7599                 (this.parentNode.namespaceURI !== this.namespaceURI))) {
  7600                 ns = ' xmlns' + (this.prefix ? (':' + this.prefix) : '') +
  7601                     '="' + this.namespaceURI + '"';
  7602             }
  7603         }
  7604 
  7605         // serialize Attribute declarations
  7606         attrs = this.attributes;
  7607         for(i=0;i< attrs.length;i++){
  7608             attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
  7609         }
  7610 
  7611         if(this.hasChildNodes()){
  7612             // serialize this Element
  7613             ret += "<" + name + ns + attrstring +">";
  7614             for(i=0;i< this.childNodes.length;i++){
  7615                 ret += this.childNodes[i].xhtml ?
  7616                     this.childNodes[i].xhtml :
  7617                     this.childNodes[i].xml;
  7618             }
  7619             ret += "</" + name + ">";
  7620         }else{
  7621             switch(name){
  7622             case 'script':
  7623                 ret += "<" + name + ns + attrstring +"></"+name+">";
  7624                 break;
  7625             default:
  7626                 ret += "<" + name + ns + attrstring +"/>";
  7627             }
  7628         }
  7629 
  7630         return ret;
  7631     },
  7632 
  7633     /**
  7634      * setAttribute use a dispatch table that other tags can set to
  7635      *  "listen" to various values being set.  The dispatch table
  7636      * and registration functions are at the end of the file.
  7637      *
  7638      */
  7639 
  7640     setAttribute: function(name, value) {
  7641         var result = __DOMElement__.prototype.setAttribute.apply(this, arguments);
  7642         __addNamedMap__(this.ownerDocument, this);
  7643         var tagname = this.tagName;
  7644         var callback = HTMLElement.getAttributeCallback('set', tagname, name);
  7645         if (callback) {
  7646             callback(this, value);
  7647         }
  7648     },
  7649     setAttributeNS: function(namespaceURI, name, value) {
  7650         var result = __DOMElement__.prototype.setAttributeNS.apply(this, arguments);
  7651         __addNamedMap__(this.ownerDocument, this);
  7652         var tagname = this.tagName;
  7653         var callback = HTMLElement.getAttributeCallback('set', tagname, name);
  7654         if (callback) {
  7655             callback(this, value);
  7656         }
  7657 
  7658         return result;
  7659     },
  7660     setAttributeNode: function(newnode) {
  7661         var result = __DOMElement__.prototype.setAttributeNode.apply(this, arguments);
  7662         __addNamedMap__(this.ownerDocument, this);
  7663         var tagname = this.tagName;
  7664         var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
  7665         if (callback) {
  7666             callback(this, node.value);
  7667         }
  7668         return result;
  7669     },
  7670     setAttributeNodeNS: function(newnode) {
  7671         var result = __DOMElement__.prototype.setAttributeNodeNS.apply(this, arguments);
  7672         __addNamedMap__(this.ownerDocument, this);
  7673         var tagname = this.tagName;
  7674         var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
  7675         if (callback) {
  7676             callback(this, node.value);
  7677         }
  7678         return result;
  7679     },
  7680     removeAttribute: function(name) {
  7681         __removeNamedMap__(this.ownerDocument, this);
  7682         return __DOMElement__.prototype.removeAttribute.apply(this, arguments);
  7683     },
  7684     removeAttributeNS: function(namespace, localname) {
  7685         __removeNamedMap__(this.ownerDocument, this);
  7686         return __DOMElement__.prototype.removeAttributeNS.apply(this, arguments);
  7687     },
  7688     removeAttributeNode: function(name) {
  7689         __removeNamedMap__(this.ownerDocument, this);
  7690         return __DOMElement__.prototype.removeAttribute.apply(this, arguments);
  7691     },
  7692     removeChild: function(oldChild) {
  7693         __removeNamedMap__(this.ownerDocument, oldChild);
  7694         return __DOMElement__.prototype.removeChild.apply(this, arguments);
  7695     },
  7696     importNode: function(othernode, deep) {
  7697         var newnode = __DOMElement__.prototype.importNode.apply(this, arguments);
  7698         __addNamedMap__(this.ownerDocument, newnode);
  7699         return newnode;
  7700     },
  7701 
  7702     // not actually sure if this is needed or not
  7703     replaceNode: function(newchild, oldchild) {
  7704         var newnode = __DOMElement__.prototype.replaceNode.apply(this, arguments);
  7705         __removeNamedMap__(this.ownerDocument, oldchild);
  7706         __addNamedMap__(this.ownerDocument, newnode);
  7707                 return newnode;
  7708     }
  7709 });
  7710 
  7711 
  7712 HTMLElement.attributeCallbacks = {};
  7713 HTMLElement.registerSetAttribute = function(tag, attrib, callbackfn) {
  7714     HTMLElement.attributeCallbacks[tag + ':set:' + attrib] = callbackfn;
  7715 };
  7716 HTMLElement.registerRemoveAttribute = function(tag, attrib, callbackfn) {
  7717     HTMLElement.attributeCallbacks[tag + ':remove:' + attrib] = callbackfn;
  7718 };
  7719 
  7720 /**
  7721  * This is really only useful internally
  7722  *
  7723  */
  7724 HTMLElement.getAttributeCallback = function(type, tag, attrib) {
  7725     return HTMLElement.attributeCallbacks[tag + ':' + type + ':' + attrib] || null;
  7726 };
  7727 /*
  7728  * HTMLCollection
  7729  *
  7730  * HTML5 -- 2.7.2.1 HTMLCollection
  7731  * http://dev.w3.org/html5/spec/Overview.html#htmlcollection
  7732  * http://dev.w3.org/html5/spec/Overview.html#collections
  7733  */
  7734 HTMLCollection = function(nodelist, type) {
  7735 
  7736     __setArray__(this, []);
  7737     var n;
  7738     for (var i=0; i<nodelist.length; i++) {
  7739         this[i] = nodelist[i];
  7740         n = nodelist[i].name;
  7741         if (n) {
  7742             this[n] = nodelist[i];
  7743         }
  7744         n = nodelist[i].id;
  7745         if (n) {
  7746             this[n] = nodelist[i];
  7747         }
  7748     }
  7749 
  7750     this.length = nodelist.length;
  7751 };
  7752 
  7753 HTMLCollection.prototype = {
  7754 
  7755     item: function (idx) {
  7756         return  ((idx >= 0) && (idx < this.length)) ? this[idx] : null;
  7757     },
  7758 
  7759     namedItem: function (name) {
  7760         return this[name] || null;
  7761     },
  7762 
  7763     toString: function() {
  7764         return '[object HTMLCollection]';
  7765     }
  7766 };
  7767 /*
  7768  *  a set of convenience classes to centralize implementation of
  7769  * properties and methods across multiple in-form elements
  7770  *
  7771  *  the hierarchy of related HTML elements and their members is as follows:
  7772  *
  7773  * Condensed Version
  7774  *
  7775  *  HTMLInputCommon
  7776  *     * legent (no value attr)
  7777  *     * fieldset (no value attr)
  7778  *     * label (no value attr)
  7779  *     * option (custom value)
  7780  *  HTMLTypeValueInputs (extends InputCommon)
  7781  *     * select  (custom value)
  7782  *     * button (just sets value)
  7783  *  HTMLInputAreaCommon (extends TypeValueIput)
  7784  *     * input  (custom)
  7785  *     * textarea (just sets value)
  7786  *
  7787  * -----------------------
  7788  *    HTMLInputCommon:  common to all elements
  7789  *       .form
  7790  *
  7791  *    <legend>
  7792  *          [common plus:]
  7793  *       .align
  7794  *
  7795  *    <fieldset>
  7796  *          [identical to "legend" plus:]
  7797  *       .margin
  7798  *
  7799  *
  7800  *  ****
  7801  *
  7802  *    <label>
  7803  *          [common plus:]
  7804  *       .dataFormatAs
  7805  *       .htmlFor
  7806  *       [plus data properties]
  7807  *
  7808  *    <option>
  7809  *          [common plus:]
  7810  *       .defaultSelected
  7811  *       .index
  7812  *       .label
  7813  *       .selected
  7814  *       .text
  7815  *       .value   // unique implementation, not duplicated
  7816  *       .form    // unique implementation, not duplicated
  7817  *  ****
  7818  *
  7819  *    HTMLTypeValueInputs:  common to remaining elements
  7820  *          [common plus:]
  7821  *       .name
  7822  *       .type
  7823  *       .value
  7824  *       [plus data properties]
  7825  *
  7826  *
  7827  *    <select>
  7828  *       .length
  7829  *       .multiple
  7830  *       .options[]
  7831  *       .selectedIndex
  7832  *       .add()
  7833  *       .remove()
  7834  *       .item()                                       // unimplemented
  7835  *       .namedItem()                                  // unimplemented
  7836  *       [plus ".onchange"]
  7837  *       [plus focus events]
  7838  *       [plus data properties]
  7839  *       [plus ".size"]
  7840  *
  7841  *    <button>
  7842  *       .dataFormatAs   // duplicated from above, oh well....
  7843  *       [plus ".status", ".createTextRange()"]
  7844  *
  7845  *  ****
  7846  *
  7847  *    HTMLInputAreaCommon:  common to remaining elements
  7848  *       .defaultValue
  7849  *       .readOnly
  7850  *       .handleEvent()                                // unimplemented
  7851  *       .select()
  7852  *       .onselect
  7853  *       [plus ".size"]
  7854  *       [plus ".status", ".createTextRange()"]
  7855  *       [plus focus events]
  7856  *       [plus ".onchange"]
  7857  *
  7858  *    <textarea>
  7859  *       .cols
  7860  *       .rows
  7861  *       .wrap                                         // unimplemented
  7862  *       .onscroll                                     // unimplemented
  7863  *
  7864  *    <input>
  7865  *       .alt
  7866  *       .accept                                       // unimplemented
  7867  *       .checked
  7868  *       .complete                                     // unimplemented
  7869  *       .defaultChecked
  7870  *       .dynsrc                                       // unimplemented
  7871  *       .height
  7872  *       .hspace                                       // unimplemented
  7873  *       .indeterminate                                // unimplemented
  7874  *       .loop                                         // unimplemented
  7875  *       .lowsrc                                       // unimplemented
  7876  *       .maxLength
  7877  *       .src
  7878  *       .start                                        // unimplemented
  7879  *       .useMap
  7880  *       .vspace                                       // unimplemented
  7881  *       .width
  7882  *       .onclick
  7883  *       [plus ".size"]
  7884  *       [plus ".status", ".createTextRange()"]
  7885 
  7886  *    [data properties]                                // unimplemented
  7887  *       .dataFld
  7888  *       .dataSrc
  7889 
  7890  *    [status stuff]                                   // unimplemented
  7891  *       .status
  7892  *       .createTextRange()
  7893 
  7894  *    [focus events]
  7895  *       .onblur
  7896  *       .onfocus
  7897 
  7898  */
  7899 
  7900 
  7901 
  7902 var inputElements_dataProperties = {};
  7903 var inputElements_status = {};
  7904 
  7905 var inputElements_onchange = {
  7906     onchange: function(event){
  7907         __eval__(this.getAttribute('onchange')||'', this);
  7908     }
  7909 };
  7910 
  7911 var inputElements_size = {
  7912     get size(){
  7913         return Number(this.getAttribute('size'));
  7914     },
  7915     set size(value){
  7916         this.setAttribute('size',value);
  7917     }
  7918 };
  7919 
  7920 var inputElements_focusEvents = {
  7921     blur: function(){
  7922         __blur__(this);
  7923 
  7924         if (this._oldValue != this.value){
  7925             var event = document.createEvent("HTMLEvents");
  7926             event.initEvent("change", true, true);
  7927             this.dispatchEvent( event );
  7928         }
  7929     },
  7930     focus: function(){
  7931         __focus__(this);
  7932         this._oldValue = this.value;
  7933     }
  7934 };
  7935 
  7936 
  7937 /*
  7938 * HTMLInputCommon - convenience class, not DOM
  7939 */
  7940 var HTMLInputCommon = function(ownerDocument) {
  7941     HTMLElement.apply(this, arguments);
  7942 };
  7943 HTMLInputCommon.prototype = new HTMLElement();
  7944 __extend__(HTMLInputCommon.prototype, {
  7945     get form() {
  7946         // parent can be null if element is outside of a form
  7947         // or not yet added to the document
  7948         var parent = this.parentNode;
  7949         while (parent && parent.nodeName.toLowerCase() !== 'form') {
  7950             parent = parent.parentNode;
  7951         }
  7952         return parent;
  7953     },
  7954     get accessKey(){
  7955         return this.getAttribute('accesskey');
  7956     },
  7957     set accessKey(value){
  7958         this.setAttribute('accesskey',value);
  7959     },
  7960     get access(){
  7961         return this.getAttribute('access');
  7962     },
  7963     set access(value){
  7964         this.setAttribute('access', value);
  7965     },
  7966     get disabled(){
  7967         return (this.getAttribute('disabled') === 'disabled');
  7968     },
  7969     set disabled(value){
  7970         this.setAttribute('disabled', (value ? 'disabled' :''));
  7971     }
  7972 });
  7973 
  7974 
  7975 
  7976 
  7977 /*
  7978 * HTMLTypeValueInputs - convenience class, not DOM
  7979 */
  7980 var HTMLTypeValueInputs = function(ownerDocument) {
  7981 
  7982     HTMLInputCommon.apply(this, arguments);
  7983 
  7984     this._oldValue = "";
  7985 };
  7986 HTMLTypeValueInputs.prototype = new HTMLInputCommon();
  7987 __extend__(HTMLTypeValueInputs.prototype, inputElements_size);
  7988 __extend__(HTMLTypeValueInputs.prototype, inputElements_status);
  7989 __extend__(HTMLTypeValueInputs.prototype, inputElements_dataProperties);
  7990 __extend__(HTMLTypeValueInputs.prototype, {
  7991     get name(){
  7992         return this.getAttribute('name')||'';
  7993     },
  7994     set name(value){
  7995         this.setAttribute('name',value);
  7996     },
  7997 });
  7998 
  7999 
  8000 /*
  8001 * HTMLInputAreaCommon - convenience class, not DOM
  8002 */
  8003 var HTMLInputAreaCommon = function(ownerDocument) {
  8004     HTMLTypeValueInputs.apply(this, arguments);
  8005 };
  8006 HTMLInputAreaCommon.prototype = new HTMLTypeValueInputs();
  8007 __extend__(HTMLInputAreaCommon.prototype, inputElements_focusEvents);
  8008 __extend__(HTMLInputAreaCommon.prototype, inputElements_onchange);
  8009 __extend__(HTMLInputAreaCommon.prototype, {
  8010     get readOnly(){
  8011         return (this.getAttribute('readonly')=='readonly');
  8012     },
  8013     set readOnly(value){
  8014         this.setAttribute('readonly', (value ? 'readonly' :''));
  8015     },
  8016     select:function(){
  8017         __select__(this);
  8018 
  8019     }
  8020 });
  8021 
  8022 
  8023 var __updateFormForNamedElement__ = function(node, value) {
  8024     if (node.form) {
  8025         // to check for ID or NAME attribute too
  8026         // not, then nothing to do
  8027         node.form._updateElements();
  8028     }
  8029 };
  8030 
  8031 /**
  8032  * HTMLAnchorElement - DOM Level 2
  8033  *
  8034  * HTML5: 4.6.1 The a element
  8035  * http://dev.w3.org/html5/spec/Overview.html#the-a-element
  8036  */
  8037 HTMLAnchorElement = function(ownerDocument) {
  8038     HTMLElement.apply(this, arguments);
  8039 };
  8040 HTMLAnchorElement.prototype = new HTMLElement();
  8041 __extend__(HTMLAnchorElement.prototype, {
  8042     get accessKey() {
  8043         return this.getAttribute("accesskey")||'';
  8044     },
  8045     set accessKey(val) {
  8046         return this.setAttribute("accesskey",val);
  8047     },
  8048     get charset() {
  8049         return this.getAttribute("charset")||'';
  8050     },
  8051     set charset(val) {
  8052         return this.setAttribute("charset",val);
  8053     },
  8054     get coords() {
  8055         return this.getAttribute("coords")||'';
  8056     },
  8057     set coords(val) {
  8058         return this.setAttribute("coords",val);
  8059     },
  8060     get href() {
  8061         var link = this.getAttribute('href');
  8062         if (!link) {
  8063             return '';
  8064         }
  8065         return Envjs.uri(link,
  8066                          this.ownerDocument.location.toString());
  8067     },
  8068     set href(val) {
  8069         return this.setAttribute("href", val);
  8070     },
  8071     get hreflang() {
  8072         return this.getAttribute("hreflang")||'';
  8073     },
  8074     set hreflang(val) {
  8075         this.setAttribute("hreflang",val);
  8076     },
  8077     get name() {
  8078         return this.getAttribute("name")||'';
  8079     },
  8080     set name(val) {
  8081         this.setAttribute("name",val);
  8082     },
  8083     get rel() {
  8084         return this.getAttribute("rel")||'';
  8085     },
  8086     set rel(val) {
  8087         return this.setAttribute("rel", val);
  8088     },
  8089     get rev() {
  8090         return this.getAttribute("rev")||'';
  8091     },
  8092     set rev(val) {
  8093         return this.setAttribute("rev",val);
  8094     },
  8095     get shape() {
  8096         return this.getAttribute("shape")||'';
  8097     },
  8098     set shape(val) {
  8099         return this.setAttribute("shape",val);
  8100     },
  8101     get target() {
  8102         return this.getAttribute("target")||'';
  8103     },
  8104     set target(val) {
  8105         return this.setAttribute("target",val);
  8106     },
  8107     get type() {
  8108         return this.getAttribute("type")||'';
  8109     },
  8110     set type(val) {
  8111         return this.setAttribute("type",val);
  8112     },
  8113     blur: function() {
  8114         __blur__(this);
  8115     },
  8116     focus: function() {
  8117         __focus__(this);
  8118     },
  8119 
  8120     /**
  8121      * Unlike other elements, toString returns the href
  8122      */
  8123     toString: function() {
  8124         return this.href;
  8125     }
  8126 });
  8127 
  8128 /*
  8129  * HTMLAreaElement - DOM Level 2
  8130  *
  8131  * HTML5: 4.8.13 The area element
  8132  * http://dev.w3.org/html5/spec/Overview.html#the-area-element
  8133  */
  8134 HTMLAreaElement = function(ownerDocument) {
  8135     HTMLElement.apply(this, arguments);
  8136 };
  8137 HTMLAreaElement.prototype = new HTMLElement();
  8138 __extend__(HTMLAreaElement.prototype, {
  8139     get accessKey(){
  8140         return this.getAttribute('accesskey');
  8141     },
  8142     set accessKey(value){
  8143         this.setAttribute('accesskey',value);
  8144     },
  8145     get alt(){
  8146         return this.getAttribute('alt') || '';
  8147     },
  8148     set alt(value){
  8149         this.setAttribute('alt',value);
  8150     },
  8151     get coords(){
  8152         return this.getAttribute('coords');
  8153     },
  8154     set coords(value){
  8155         this.setAttribute('coords',value);
  8156     },
  8157     get href(){
  8158         return this.getAttribute('href') || '';
  8159     },
  8160     set href(value){
  8161         this.setAttribute('href',value);
  8162     },
  8163     get noHref(){
  8164         return this.hasAttribute('href');
  8165     },
  8166     get shape(){
  8167         //TODO
  8168         return 0;
  8169     },
  8170     /*get tabIndex(){
  8171       return this.getAttribute('tabindex');
  8172       },
  8173       set tabIndex(value){
  8174       this.setAttribute('tabindex',value);
  8175       },*/
  8176     get target(){
  8177         return this.getAttribute('target');
  8178     },
  8179     set target(value){
  8180         this.setAttribute('target',value);
  8181     },
  8182 
  8183     /**
  8184      * toString like <a>, returns the href
  8185      */
  8186     toString: function() {
  8187         return this.href;
  8188     }
  8189 });
  8190 
  8191 
  8192 /*
  8193  * HTMLBaseElement - DOM Level 2
  8194  *
  8195  * HTML5: 4.2.3 The base element
  8196  * http://dev.w3.org/html5/spec/Overview.html#the-base-element
  8197  */
  8198 HTMLBaseElement = function(ownerDocument) {
  8199     HTMLElement.apply(this, arguments);
  8200 };
  8201 HTMLBaseElement.prototype = new HTMLElement();
  8202 __extend__(HTMLBaseElement.prototype, {
  8203     get href(){
  8204         return this.getAttribute('href');
  8205     },
  8206     set href(value){
  8207         this.setAttribute('href',value);
  8208     },
  8209     get target(){
  8210         return this.getAttribute('target');
  8211     },
  8212     set target(value){
  8213         this.setAttribute('target',value);
  8214     },
  8215     toString: function() {
  8216         return '[object HTMLBaseElement]';
  8217     }
  8218 });
  8219 
  8220 
  8221 /*
  8222  * HTMLQuoteElement - DOM Level 2
  8223  * HTML5: 4.5.5 The blockquote element
  8224  * http://dev.w3.org/html5/spec/Overview.html#htmlquoteelement
  8225  */
  8226 HTMLQuoteElement = function(ownerDocument) {
  8227     HTMLElement.apply(this, arguments);
  8228 };
  8229 __extend__(HTMLQuoteElement.prototype, HTMLElement.prototype);
  8230 __extend__(HTMLQuoteElement.prototype, {
  8231     /**
  8232      * Quoth the spec:
  8233      * """
  8234      * If the cite attribute is present, it must be a valid URL. To
  8235      * obtain the corresponding citation link, the value of the
  8236      * attribute must be resolved relative to the element. User agents
  8237      * should allow users to follow such citation links.
  8238      * """
  8239      *
  8240      * TODO: normalize
  8241      *
  8242      */
  8243     get cite() {
  8244         return this.getAttribute('cite') || '';
  8245     },
  8246 
  8247     set cite(value) {
  8248         this.setAttribute('cite', value);
  8249     },
  8250     toString: function() {
  8251         return '[object HTMLQuoteElement]';
  8252     }
  8253 });
  8254 
  8255 /*
  8256  * HTMLBodyElement - DOM Level 2
  8257  * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-body-element-0
  8258  */
  8259 HTMLBodyElement = function(ownerDocument) {
  8260     HTMLElement.apply(this, arguments);
  8261 };
  8262 HTMLBodyElement.prototype = new HTMLElement();
  8263 __extend__(HTMLBodyElement.prototype, {
  8264     onload: function(event){
  8265         __eval__(this.getAttribute('onload')||'', this);
  8266     },
  8267     onunload: function(event){
  8268         __eval__(this.getAttribute('onunload')||'', this);
  8269     },
  8270     toString: function() {
  8271         return '[object HTMLBodyElement]';
  8272     }
  8273 });
  8274 
  8275 /*
  8276  * HTMLBRElement
  8277  * HTML5: 4.5.3 The hr Element
  8278  * http://dev.w3.org/html5/spec/Overview.html#the-br-element
  8279  */
  8280 HTMLBRElement = function(ownerDocument) {
  8281     HTMLElement.apply(this, arguments);
  8282 };
  8283 
  8284 HTMLBRElement.prototype = new HTMLElement();
  8285 __extend__(HTMLBRElement.prototype, {
  8286 
  8287     // no additional properties or elements
  8288 
  8289     toString: function() {
  8290         return '[object HTMLBRElement]';
  8291     }
  8292 });
  8293 
  8294 
  8295 /*
  8296  * HTMLButtonElement - DOM Level 2
  8297  *
  8298  * HTML5: 4.10.6 The button element
  8299  * http://dev.w3.org/html5/spec/Overview.html#the-button-element
  8300  */
  8301 HTMLButtonElement = function(ownerDocument) {
  8302     HTMLTypeValueInputs.apply(this, arguments);
  8303 };
  8304 HTMLButtonElement.prototype = new HTMLTypeValueInputs();
  8305 __extend__(HTMLButtonElement.prototype, inputElements_status);
  8306 __extend__(HTMLButtonElement.prototype, {
  8307     get dataFormatAs(){
  8308         return this.getAttribute('dataFormatAs');
  8309     },
  8310     set dataFormatAs(value){
  8311         this.setAttribute('dataFormatAs',value);
  8312     },
  8313     get type() {
  8314         return this.getAttribute('type') || 'submit';
  8315     },
  8316     set type(value) {
  8317         this.setAttribute('type', value);
  8318     },
  8319     get value() {
  8320         return this.getAttribute('value') || '';
  8321     },
  8322     set value(value) {
  8323         this.setAttribute('value', value);
  8324     },
  8325     toString: function() {
  8326         return '[object HTMLButtonElement]';
  8327     }
  8328 });
  8329 
  8330 // Named Element Support
  8331 HTMLElement.registerSetAttribute('BUTTON', 'name',
  8332                                  __updateFormForNamedElement__);
  8333 
  8334 /*
  8335  * HTMLCanvasElement - DOM Level 2
  8336  * HTML5: 4.8.11 The canvas element
  8337  * http://dev.w3.org/html5/spec/Overview.html#the-canvas-element
  8338  */
  8339 
  8340 
  8341 /*
  8342  * This is a "non-Abstract Base Class". For an implmentation that actually
  8343  * did something, all these methods would need to over-written
  8344  */
  8345 CanvasRenderingContext2D = function() {
  8346     // NOP
  8347 };
  8348 
  8349 var nullfunction = function() {};
  8350 
  8351 CanvasRenderingContext2D.prototype = {
  8352     addColorStop: nullfunction,
  8353     arc: nullfunction,
  8354     beginPath: nullfunction,
  8355     bezierCurveTo: nullfunction,
  8356     clearRect: nullfunction,
  8357     clip: nullfunction,
  8358     closePath: nullfunction,
  8359     createLinearGradient: nullfunction,
  8360     createPattern: nullfunction,
  8361     createRadialGradient: nullfunction,
  8362     drawImage: nullfunction,
  8363     fill: nullfunction,
  8364     fillRect:  nullfunction,
  8365     lineTo: nullfunction,
  8366     moveTo: nullfunction,
  8367     quadraticCurveTo: nullfunction,
  8368     rect: nullfunction,
  8369     restore: nullfunction,
  8370     rotate: nullfunction,
  8371     save: nullfunction,
  8372     scale: nullfunction,
  8373     setTranform: nullfunction,
  8374     stroke: nullfunction,
  8375     strokeRect: nullfunction,
  8376     transform: nullfunction,
  8377     translate: nullfunction,
  8378 
  8379     toString: function() {
  8380         return '[object CanvasRenderingContext2D]';
  8381     }
  8382 };
  8383 
  8384 HTMLCanvasElement = function(ownerDocument) {
  8385     HTMLElement.apply(this, arguments);
  8386 };
  8387 HTMLCanvasElement.prototype = new HTMLElement();
  8388 __extend__(HTMLCanvasElement.prototype, {
  8389 
  8390     getContext: function(ctxtype) {
  8391         if (ctxtype === '2d') {
  8392             return new CanvasRenderingContext2D();
  8393         }
  8394         throw new Error("Unknown context type of '" + ctxtype + '"');
  8395     },
  8396 
  8397     get height(){
  8398         return Number(this.getAttribute('height')|| 150);
  8399     },
  8400     set height(value){
  8401         this.setAttribute('height', value);
  8402     },
  8403 
  8404     get width(){
  8405         return Number(this.getAttribute('width')|| 300);
  8406     },
  8407     set width(value){
  8408         this.setAttribute('width', value);
  8409     },
  8410 
  8411     toString: function() {
  8412         return '[object HTMLCanvasElement]';
  8413     }
  8414 
  8415 });
  8416 
  8417 
  8418 /*
  8419 * HTMLTableColElement - DOM Level 2
  8420 *
  8421 * HTML5: 4.9.3 The colgroup element
  8422 * http://dev.w3.org/html5/spec/Overview.html#the-colgroup-element
  8423 */
  8424 HTMLTableColElement = function(ownerDocument) {
  8425     HTMLElement.apply(this, arguments);
  8426 };
  8427 HTMLTableColElement.prototype = new HTMLElement();
  8428 __extend__(HTMLTableColElement.prototype, {
  8429     get align(){
  8430         return this.getAttribute('align');
  8431     },
  8432     set align(value){
  8433         this.setAttribute('align', value);
  8434     },
  8435     get ch(){
  8436         return this.getAttribute('ch');
  8437     },
  8438     set ch(value){
  8439         this.setAttribute('ch', value);
  8440     },
  8441     get chOff(){
  8442         return this.getAttribute('ch');
  8443     },
  8444     set chOff(value){
  8445         this.setAttribute('ch', value);
  8446     },
  8447     get span(){
  8448         return this.getAttribute('span');
  8449     },
  8450     set span(value){
  8451         this.setAttribute('span', value);
  8452     },
  8453     get vAlign(){
  8454         return this.getAttribute('valign');
  8455     },
  8456     set vAlign(value){
  8457         this.setAttribute('valign', value);
  8458     },
  8459     get width(){
  8460         return this.getAttribute('width');
  8461     },
  8462     set width(value){
  8463         this.setAttribute('width', value);
  8464     },
  8465     toString: function() {
  8466         return '[object HTMLTableColElement]';
  8467     }
  8468 });
  8469 
  8470 
  8471 /*
  8472  * HTMLModElement - DOM Level 2
  8473  * http://dev.w3.org/html5/spec/Overview.html#htmlmodelement
  8474  */
  8475 HTMLModElement = function(ownerDocument) {
  8476     HTMLElement.apply(this, arguments);
  8477 };
  8478 HTMLModElement.prototype = new HTMLElement();
  8479 __extend__(HTMLModElement.prototype, {
  8480     get cite(){
  8481         return this.getAttribute('cite');
  8482     },
  8483     set cite(value){
  8484         this.setAttribute('cite', value);
  8485     },
  8486     get dateTime(){
  8487         return this.getAttribute('datetime');
  8488     },
  8489     set dateTime(value){
  8490         this.setAttribute('datetime', value);
  8491     },
  8492     toString: function() {
  8493         return '[object HTMLModElement]';
  8494     }
  8495 });
  8496 
  8497 /*
  8498  * HTMLDivElement - DOM Level 2
  8499  * HTML5: 4.5.12 The Div Element
  8500  * http://dev.w3.org/html5/spec/Overview.html#the-div-element
  8501  */
  8502 HTMLDivElement = function(ownerDocument) {
  8503     HTMLElement.apply(this, arguments);
  8504 };
  8505 
  8506 HTMLDivElement.prototype = new HTMLElement();
  8507 __extend__(HTMLDivElement.prototype, {
  8508     get align(){
  8509         return this.getAttribute('align') || 'left';
  8510     },
  8511     set align(value){
  8512         this.setAttribute('align', value);
  8513     },
  8514     toString: function() {
  8515         return '[object HTMLDivElement]';
  8516     }
  8517 });
  8518 
  8519 
  8520 /*
  8521  * HTMLDListElement
  8522  * HTML5: 4.5.7 The dl Element
  8523  * http://dev.w3.org/html5/spec/Overview.html#the-dl-element
  8524  */
  8525 HTMLDListElement = function(ownerDocument) {
  8526     HTMLElement.apply(this, arguments);
  8527 };
  8528 
  8529 HTMLDListElement.prototype = new HTMLElement();
  8530 __extend__(HTMLDListElement.prototype, {
  8531 
  8532     // no additional properties or elements
  8533 
  8534     toString: function() {
  8535         return '[object HTMLDListElement]';
  8536     }
  8537 });
  8538 
  8539 
  8540 /**
  8541  * HTMLLegendElement - DOM Level 2
  8542  *
  8543  * HTML5: 4.10.3 The legend element
  8544  * http://dev.w3.org/html5/spec/Overview.html#the-legend-element
  8545  */
  8546 HTMLLegendElement = function(ownerDocument) {
  8547     HTMLInputCommon.apply(this, arguments);
  8548 };
  8549 HTMLLegendElement.prototype = new HTMLInputCommon();
  8550 __extend__(HTMLLegendElement.prototype, {
  8551     get align(){
  8552         return this.getAttribute('align');
  8553     },
  8554     set align(value){
  8555         this.setAttribute('align',value);
  8556     }
  8557 });
  8558 
  8559 
  8560 /*
  8561  * HTMLFieldSetElement - DOM Level 2
  8562  *
  8563  * HTML5: 4.10.2 The fieldset element
  8564  * http://dev.w3.org/html5/spec/Overview.html#the-fieldset-element
  8565  */
  8566 HTMLFieldSetElement = function(ownerDocument) {
  8567     HTMLLegendElement.apply(this, arguments);
  8568 };
  8569 HTMLFieldSetElement.prototype = new HTMLLegendElement();
  8570 __extend__(HTMLFieldSetElement.prototype, {
  8571     get margin(){
  8572         return this.getAttribute('margin');
  8573     },
  8574     set margin(value){
  8575         this.setAttribute('margin',value);
  8576     },
  8577     toString: function() {
  8578         return '[object HTMLFieldSetElement]';
  8579     }
  8580 });
  8581 
  8582 // Named Element Support
  8583 HTMLElement.registerSetAttribute('FIELDSET', 'name',
  8584                                  __updateFormForNamedElement__);
  8585 /*
  8586  * HTMLFormElement - DOM Level 2
  8587  *
  8588  * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-form-element
  8589  */
  8590 HTMLFormElement = function(ownerDocument){
  8591     HTMLElement.apply(this, arguments);
  8592 
  8593     //TODO: on __elementPopped__ from the parser
  8594     //      we need to determine all the forms default
  8595     //      values
  8596 };
  8597 HTMLFormElement.prototype = new HTMLElement();
  8598 __extend__(HTMLFormElement.prototype,{
  8599     get acceptCharset(){
  8600         return this.getAttribute('accept-charset');
  8601     },
  8602     set acceptCharset(acceptCharset) {
  8603         this.setAttribute('accept-charset', acceptCharset);
  8604     },
  8605     get action() {
  8606         return this.getAttribute('action');
  8607     },
  8608     set action(action){
  8609         this.setAttribute('action', action);
  8610     },
  8611 
  8612     get enctype() {
  8613         return this.getAttribute('enctype');
  8614     },
  8615     set enctype(enctype) {
  8616         this.setAttribute('enctype', enctype);
  8617     },
  8618     get method() {
  8619         return this.getAttribute('method');
  8620     },
  8621     set method(method) {
  8622         this.setAttribute('method', method);
  8623     },
  8624     get name() {
  8625         return this.getAttribute("name");
  8626     },
  8627     set name(val) {
  8628         return this.setAttribute("name",val);
  8629     },
  8630     get target() {
  8631         return this.getAttribute("target");
  8632     },
  8633     set target(val) {
  8634         return this.setAttribute("target",val);
  8635     },
  8636 
  8637     /**
  8638      * "Named Elements"
  8639      *
  8640      */
  8641     /**
  8642      * returns HTMLFormControlsCollection
  8643      * http://dev.w3.org/html5/spec/Overview.html#dom-form-elements
  8644      *
  8645      * button fieldset input keygen object output select textarea
  8646      */
  8647     get elements() {
  8648         var nodes = this.getElementsByTagName('*');
  8649         var alist = [];
  8650         var i, tmp;
  8651         for (i = 0; i < nodes.length; ++i) {
  8652             nodename = nodes[i].nodeName;
  8653             // would like to replace switch with something else
  8654             //  since it's redundant with the SetAttribute callbacks
  8655             switch (nodes[i].nodeName) {
  8656             case 'BUTTON':
  8657             case 'FIELDSET':
  8658             case 'INPUT':
  8659             case 'KEYGEN':
  8660             case 'OBJECT':
  8661             case 'OUTPUT':
  8662             case 'SELECT':
  8663             case 'TEXTAREA':
  8664                 alist.push(nodes[i]);
  8665                 this[i] = nodes[i];
  8666                 tmp = nodes[i].name;
  8667                 if (tmp) {
  8668                     this[tmp] = nodes[i];
  8669                 }
  8670                 tmp = nodes[i].id;
  8671                 if (tmp) {
  8672                     this[tmp] = nodes[i];
  8673                 }
  8674             }
  8675         }
  8676         return new HTMLCollection(alist);
  8677     },
  8678     _updateElements: function() {
  8679         this.elements;
  8680     },
  8681     get length() {
  8682         return this.elements.length;
  8683     },
  8684     item: function(idx) {
  8685         return this.elements[idx];
  8686     },
  8687     namedItem: function(aname) {
  8688         return this.elements.namedItem(aname);
  8689     },
  8690     toString: function() {
  8691         return '[object HTMLFormElement]';
  8692     },
  8693     submit: function() {
  8694         //TODO: this needs to perform the form inputs serialization
  8695         //      and submission
  8696         //  DONE: see xhr/form.js
  8697         var event = __submit__(this);
  8698 
  8699     },
  8700     reset: function() {
  8701         //TODO: this needs to reset all values specified in the form
  8702         //      to those which where set as defaults
  8703         __reset__(this);
  8704 
  8705     },
  8706     onsubmit: HTMLEvents.prototype.onsubmit,
  8707     onreset: HTMLEvents.prototype.onreset
  8708 });
  8709 
  8710 /**
  8711  * HTMLFrameElement - DOM Level 2
  8712  */
  8713 HTMLFrameElement = function(ownerDocument) {
  8714     HTMLElement.apply(this, arguments);
  8715     // this is normally a getter but we need to be
  8716     // able to set it to correctly emulate behavior
  8717     this.contentDocument = null;
  8718     this.contentWindow = null;
  8719 };
  8720 HTMLFrameElement.prototype = new HTMLElement();
  8721 __extend__(HTMLFrameElement.prototype, {
  8722 
  8723     get frameBorder(){
  8724         return this.getAttribute('border')||"";
  8725     },
  8726     set frameBorder(value){
  8727         this.setAttribute('border', value);
  8728     },
  8729     get longDesc(){
  8730         return this.getAttribute('longdesc')||"";
  8731     },
  8732     set longDesc(value){
  8733         this.setAttribute('longdesc', value);
  8734     },
  8735     get marginHeight(){
  8736         return this.getAttribute('marginheight')||"";
  8737     },
  8738     set marginHeight(value){
  8739         this.setAttribute('marginheight', value);
  8740     },
  8741     get marginWidth(){
  8742         return this.getAttribute('marginwidth')||"";
  8743     },
  8744     set marginWidth(value){
  8745         this.setAttribute('marginwidth', value);
  8746     },
  8747     get name(){
  8748         return this.getAttribute('name')||"";
  8749     },
  8750     set name(value){
  8751         this.setAttribute('name', value);
  8752     },
  8753     get noResize(){
  8754         return this.getAttribute('noresize')||false;
  8755     },
  8756     set noResize(value){
  8757         this.setAttribute('noresize', value);
  8758     },
  8759     get scrolling(){
  8760         return this.getAttribute('scrolling')||"";
  8761     },
  8762     set scrolling(value){
  8763         this.setAttribute('scrolling', value);
  8764     },
  8765     get src(){
  8766         return this.getAttribute('src')||"";
  8767     },
  8768     set src(value){
  8769         this.setAttribute('src', value);
  8770     },
  8771     toString: function(){
  8772         return '[object HTMLFrameElement]';
  8773     },
  8774     onload: HTMLEvents.prototype.onload
  8775 });
  8776 
  8777 /**
  8778  * HTMLFrameSetElement - DOM Level 2
  8779  *
  8780  * HTML5: 12.3.3 Frames
  8781  * http://dev.w3.org/html5/spec/Overview.html#frameset
  8782  */
  8783 HTMLFrameSetElement = function(ownerDocument) {
  8784     HTMLElement.apply(this, arguments);
  8785 };
  8786 HTMLFrameSetElement.prototype = new HTMLElement();
  8787 __extend__(HTMLFrameSetElement.prototype, {
  8788     get cols(){
  8789         return this.getAttribute('cols');
  8790     },
  8791     set cols(value){
  8792         this.setAttribute('cols', value);
  8793     },
  8794     get rows(){
  8795         return this.getAttribute('rows');
  8796     },
  8797     set rows(value){
  8798         this.setAttribute('rows', value);
  8799     },
  8800     toString: function() {
  8801         return '[object HTMLFrameSetElement]';
  8802     }
  8803 });
  8804 
  8805 /*
  8806  * HTMLHeadingElement
  8807  * HTML5: 4.4.6 The h1, h2, h3, h4, h5, and h6 elements
  8808  * http://dev.w3.org/html5/spec/Overview.html#the-h1-h2-h3-h4-h5-and-h6-elements
  8809  */
  8810 HTMLHeadingElement = function(ownerDocument) {
  8811     HTMLElement.apply(this, arguments);
  8812 };
  8813 
  8814 HTMLHeadingElement.prototype = new HTMLElement();
  8815 __extend__(HTMLHeadingElement.prototype, {
  8816     toString: function() {
  8817         return '[object HTMLHeadingElement]';
  8818     }
  8819 });
  8820 
  8821 /**
  8822  * HTMLHeadElement - DOM Level 2
  8823  *
  8824  * HTML5: 4.2.1 The head element
  8825  * http://dev.w3.org/html5/spec/Overview.html#the-head-element-0
  8826  */
  8827 HTMLHeadElement = function(ownerDocument) {
  8828     HTMLElement.apply(this, arguments);
  8829 };
  8830 HTMLHeadElement.prototype = new HTMLElement();
  8831 __extend__(HTMLHeadElement.prototype, {
  8832     get profile(){
  8833         return this.getAttribute('profile');
  8834     },
  8835     set profile(value){
  8836         this.setAttribute('profile', value);
  8837     },
  8838     //we override this so we can apply browser behavior specific to head children
  8839     //like loading scripts
  8840     appendChild : function(newChild) {
  8841         newChild = HTMLElement.prototype.appendChild.apply(this,[newChild]);
  8842         //TODO: evaluate scripts which are appended to the head
  8843         //__evalScript__(newChild);
  8844         return newChild;
  8845     },
  8846     insertBefore : function(newChild, refChild) {
  8847         newChild = HTMLElement.prototype.insertBefore.apply(this,[newChild]);
  8848         //TODO: evaluate scripts which are appended to the head
  8849         //__evalScript__(newChild);
  8850         return newChild;
  8851     },
  8852     toString: function(){
  8853         return '[object HTMLHeadElement]';
  8854     }
  8855 });
  8856 
  8857 
  8858 /*
  8859  * HTMLHRElement
  8860  * HTML5: 4.5.2 The hr Element
  8861  * http://dev.w3.org/html5/spec/Overview.html#the-hr-element
  8862  */
  8863 HTMLHRElement = function(ownerDocument) {
  8864     HTMLElement.apply(this, arguments);
  8865 };
  8866 
  8867 HTMLHRElement.prototype = new HTMLElement();
  8868 __extend__(HTMLHRElement.prototype, {
  8869 
  8870     // no additional properties or elements
  8871 
  8872     toString: function() {
  8873         return '[object HTMLHRElement]';
  8874     }
  8875 });
  8876 
  8877 
  8878 /*
  8879  * HTMLHtmlElement
  8880  * HTML5: 4.1.1 The Html Element
  8881  * http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
  8882  */
  8883 HTMLHtmlElement = function(ownerDocument) {
  8884     HTMLElement.apply(this, arguments);
  8885 };
  8886 
  8887 HTMLHtmlElement.prototype = new HTMLElement();
  8888 __extend__(HTMLHtmlElement.prototype, {
  8889 
  8890     // no additional properties or elements
  8891 
  8892     toString: function() {
  8893         return '[object HTMLHtmlElement]';
  8894     }
  8895 });
  8896 
  8897 
  8898 /*
  8899  * HTMLIFrameElement - DOM Level 2
  8900  *
  8901  * HTML5: 4.8.3 The iframe element
  8902  * http://dev.w3.org/html5/spec/Overview.html#the-iframe-element
  8903  */
  8904 HTMLIFrameElement = function(ownerDocument) {
  8905     HTMLFrameElement.apply(this, arguments);
  8906 };
  8907 HTMLIFrameElement.prototype = new HTMLFrameElement();
  8908 __extend__(HTMLIFrameElement.prototype, {
  8909     get height() {
  8910         return this.getAttribute("height") || "";
  8911     },
  8912     set height(val) {
  8913         return this.setAttribute("height",val);
  8914     },
  8915     get width() {
  8916         return this.getAttribute("width") || "";
  8917     },
  8918     set width(val) {
  8919         return this.setAttribute("width",val);
  8920     },
  8921     toString: function(){
  8922         return '[object HTMLIFrameElement]';
  8923     }
  8924 });
  8925 
  8926 /**
  8927  * HTMLImageElement and Image
  8928  */
  8929 
  8930 
  8931 HTMLImageElement = function(ownerDocument) {
  8932     HTMLElement.apply(this, arguments);
  8933 };
  8934 HTMLImageElement.prototype = new HTMLElement();
  8935 __extend__(HTMLImageElement.prototype, {
  8936     get alt(){
  8937         return this.getAttribute('alt');
  8938     },
  8939     set alt(value){
  8940         this.setAttribute('alt', value);
  8941     },
  8942     get height(){
  8943         return parseInt(this.getAttribute('height'), 10) || 0;
  8944     },
  8945     set height(value){
  8946         this.setAttribute('height', value);
  8947     },
  8948     get isMap(){
  8949         return this.hasAttribute('map');
  8950     },
  8951     set useMap(value){
  8952         this.setAttribute('map', value);
  8953     },
  8954     get longDesc(){
  8955         return this.getAttribute('longdesc');
  8956     },
  8957     set longDesc(value){
  8958         this.setAttribute('longdesc', value);
  8959     },
  8960     get name(){
  8961         return this.getAttribute('name');
  8962     },
  8963     set name(value){
  8964         this.setAttribute('name', value);
  8965     },
  8966     get src(){
  8967         return this.getAttribute('src') || '';
  8968     },
  8969     set src(value){
  8970         this.setAttribute('src', value);
  8971     },
  8972     get width(){
  8973         return parseInt(this.getAttribute('width'), 10) || 0;
  8974     },
  8975     set width(value){
  8976         this.setAttribute('width', value);
  8977     },
  8978     toString: function(){
  8979         return '[object HTMLImageElement]';
  8980     }
  8981 });
  8982 
  8983 /*
  8984  * html5 4.8.1
  8985  * http://dev.w3.org/html5/spec/Overview.html#the-img-element
  8986  */
  8987 Image = function(width, height) {
  8988     // Not sure if "[global].document" satifies this requirement:
  8989     // "The element's document must be the active document of the
  8990     // browsing context of the Window object on which the interface
  8991     // object of the invoked constructor is found."
  8992 
  8993     HTMLElement.apply(this, [document]);
  8994     // Note: firefox will throw an error if the width/height
  8995     //   is not an integer.  Safari just converts to 0 on error.
  8996     this.width = parseInt(width, 10) || 0;
  8997     this.height = parseInt(height, 10) || 0;
  8998     this.nodeName = 'IMG';
  8999 };
  9000 Image.prototype = new HTMLImageElement();
  9001 
  9002 
  9003 /*
  9004  * Image.src attribute events.
  9005  *
  9006  * Not sure where this should live... in events/img.js? in parser/img.js?
  9007  * Split out to make it easy to move.
  9008  */
  9009 
  9010 /**
  9011  * HTMLImageElement && Image are a bit odd in that the 'src' attribute
  9012  * is 'active' -- changing it triggers loading of the image from the
  9013  * network.
  9014  *
  9015  * This can occur by
  9016  *   - Directly setting the Image.src =
  9017  *   - Using one of the Element.setAttributeXXX methods
  9018  *   - Node.importNode an image
  9019  *   - The initial creation and parsing of an <img> tag
  9020  *
  9021  * __onImageRequest__ is a function that handles eventing
  9022  *  and dispatches to a user-callback.
  9023  *
  9024  */
  9025 __loadImage__ = function(node, value) {
  9026     var event;
  9027     if (value && (!Envjs.loadImage ||
  9028                   (Envjs.loadImage &&
  9029                    Envjs.loadImage(node, value)))) {
  9030         // value has to be something (easy)
  9031         // if the user-land API doesn't exist
  9032         // Or if the API exists and it returns true, then ok:
  9033         event = document.createEvent('Events');
  9034         event.initEvent('load');
  9035     } else {
  9036         // oops
  9037         event = document.createEvent('Events');
  9038         event.initEvent('error');
  9039     }
  9040     node.dispatchEvent(event, false);
  9041 };
  9042 
  9043 __extend__(HTMLImageElement.prototype, {
  9044     onload: function(event){
  9045         __eval__(this.getAttribute('onload') || '', this);
  9046     }
  9047 });
  9048 
  9049 
  9050 /*
  9051  * Image Loading
  9052  *
  9053  * The difference between "owner.parsing" and "owner.fragment"
  9054  *
  9055  * If owner.parsing === true, then during the html5 parsing then,
  9056  *  __elementPopped__ is called when a compete tag (with attrs and
  9057  *  children) is full parsed and added the DOM.
  9058  *
  9059  *   For images, __elementPopped__ is called with everything the
  9060  *    tag has.  which in turn looks for a "src" attr and calls
  9061  *    __loadImage__
  9062  *
  9063  * If owner.parser === false (or non-existant), then we are not in
  9064  * a parsing step.  For images, perhaps someone directly modified
  9065  * a 'src' attribute of an existing image.
  9066  *
  9067  * 'innerHTML' is tricky since we first create a "fake document",
  9068  *  parse it, then import the right parts.  This may call
  9069  *  img.setAttributeNS twice.  once during the parse and once
  9070  *  during the clone of the node.  We want event to trigger on the
  9071  *  later and not during th fake doco.  "owner.fragment" is set by
  9072  *  the fake doco parser to indicate that events should not be
  9073  *  triggered on this.
  9074  *
  9075  * We coud make 'owner.parser' == [ 'none', 'full', 'fragment']
  9076  * and just use one variable That was not done since the patch is
  9077  * quite large as is.
  9078  *
  9079  * This same problem occurs with scripts.  innerHTML oddly does
  9080  * not eval any <script> tags inside.
  9081  */
  9082 HTMLElement.registerSetAttribute('IMG', 'src', function(node, value) {
  9083     var owner = node.ownerDocument;
  9084     if (!owner.parsing && !owner.fragment) {
  9085         __loadImage__(node, value);
  9086     }
  9087 });
  9088 /**
  9089  * HTMLInputElement
  9090  *
  9091  * HTML5: 4.10.5 The input element
  9092  * http://dev.w3.org/html5/spec/Overview.html#the-input-element
  9093  */
  9094 HTMLInputElement = function(ownerDocument) {
  9095     HTMLInputAreaCommon.apply(this, arguments);
  9096     this._dirty = false;
  9097     this._checked = null;
  9098     this._value = null;
  9099 };
  9100 HTMLInputElement.prototype = new HTMLInputAreaCommon();
  9101 __extend__(HTMLInputElement.prototype, {
  9102     get alt(){
  9103         return this.getAttribute('alt') || '';
  9104     },
  9105     set alt(value){
  9106         this.setAttribute('alt', value);
  9107     },
  9108 
  9109     /**
  9110      * 'checked' returns state, NOT the value of the attribute
  9111      */
  9112     get checked(){
  9113         if (this._checked === null) {
  9114             this._checked = this.defaultChecked;
  9115         }
  9116         return this._checked;
  9117     },
  9118     set checked(value){
  9119         // force to boolean value
  9120         this._checked = (value) ? true : false;
  9121     },
  9122 
  9123     /**
  9124      * 'defaultChecked' actually reflects if the 'checked' attribute
  9125      * is present or not
  9126      */
  9127     get defaultChecked(){
  9128         return this.hasAttribute('checked');
  9129     },
  9130     set defaultChecked(val){
  9131         if (val) {
  9132             this.setAttribute('checked', '');
  9133         } else {
  9134             if (this.defaultChecked) {
  9135                 this.removeAttribute('checked');
  9136             }
  9137         }
  9138     },
  9139     get defaultValue() {
  9140         return this.getAttribute('value') || '';
  9141     },
  9142     set defaultValue(value) {
  9143         this._dirty = true;
  9144         this.setAttribute('value', value);
  9145     },
  9146     get value() {
  9147         return (this._value === null) ? this.defaultValue : this._value;
  9148     },
  9149     set value(newvalue) {
  9150         this._value = newvalue;
  9151     },
  9152     /**
  9153      * Height is a string
  9154      */
  9155     get height(){
  9156         // spec says it is a string
  9157         return this.getAttribute('height') || '';
  9158     },
  9159     set height(value){
  9160         this.setAttribute('height',value);
  9161     },
  9162 
  9163     /**
  9164      * MaxLength is a number
  9165      */
  9166     get maxLength(){
  9167         return Number(this.getAttribute('maxlength')||'-1');
  9168     },
  9169     set maxLength(value){
  9170         this.setAttribute('maxlength', value);
  9171     },
  9172 
  9173     /**
  9174      * Src is a URL string
  9175      */
  9176     get src(){
  9177         return this.getAttribute('src') || '';
  9178     },
  9179     set src(value){
  9180         // TODO: make absolute any relative URLS
  9181         this.setAttribute('src', value);
  9182     },
  9183 
  9184     get type() {
  9185         return this.getAttribute('type') || 'text';
  9186     },
  9187     set type(value) {
  9188         this.setAttribute('type', value);
  9189     },
  9190 
  9191     get useMap(){
  9192         return this.getAttribute('map') || '';
  9193     },
  9194 
  9195     /**
  9196      * Width: spec says it is a string
  9197      */
  9198     get width(){
  9199         return this.getAttribute('width') || '';
  9200     },
  9201     set width(value){
  9202         this.setAttribute('width',value);
  9203     },
  9204     click:function(){
  9205         __click__(this);
  9206     },
  9207     toString: function() {
  9208         return '[object HTMLInputElement]';
  9209     }
  9210 });
  9211 
  9212 //http://dev.w3.org/html5/spec/Overview.html#dom-input-value
  9213 // if someone directly modifies the value attribute, then the input's value
  9214 // also directly changes.
  9215 HTMLElement.registerSetAttribute('INPUT', 'value', function(node, value) {
  9216     if (!node._dirty) {
  9217         node._value = value;
  9218         node._dirty = true;
  9219     }
  9220 });
  9221 
  9222 /*
  9223  *The checked content attribute is a boolean attribute that gives the
  9224  *default checkedness of the input element. When the checked content
  9225  *attribute is added, if the control does not have dirty checkedness,
  9226  *the user agent must set the checkedness of the element to true; when
  9227  *the checked content attribute is removed, if the control does not
  9228  *have dirty checkedness, the user agent must set the checkedness of
  9229  *the element to false.
  9230  */
  9231 // Named Element Support
  9232 HTMLElement.registerSetAttribute('INPUT', 'name',
  9233                                  __updateFormForNamedElement__);
  9234 
  9235 /**
  9236  * HTMLLabelElement - DOM Level 2
  9237  * HTML5 4.10.4 The label element
  9238  * http://dev.w3.org/html5/spec/Overview.html#the-label-element
  9239  */
  9240 HTMLLabelElement = function(ownerDocument) {
  9241     HTMLInputCommon.apply(this, arguments);
  9242 };
  9243 HTMLLabelElement.prototype = new HTMLInputCommon();
  9244 __extend__(HTMLLabelElement.prototype, inputElements_dataProperties);
  9245 __extend__(HTMLLabelElement.prototype, {
  9246     get htmlFor() {
  9247         return this.getAttribute('for');
  9248     },
  9249     set htmlFor(value) {
  9250         this.setAttribute('for',value);
  9251     },
  9252     get dataFormatAs() {
  9253         return this.getAttribute('dataFormatAs');
  9254     },
  9255     set dataFormatAs(value) {
  9256         this.setAttribute('dataFormatAs',value);
  9257     },
  9258     toString: function() {
  9259         return '[object HTMLLabelElement]';
  9260     }
  9261 });
  9262 
  9263 /*
  9264  * HTMLLIElement
  9265  * HTML5: 4.5.8 The li Element
  9266  * http://dev.w3.org/html5/spec/Overview.html#the-li-element
  9267  */
  9268 HTMLLIElement = function(ownerDocument) {
  9269     HTMLElement.apply(this, arguments);
  9270 };
  9271 
  9272 HTMLLIElement.prototype = new HTMLElement();
  9273 __extend__(HTMLLIElement.prototype, {
  9274 
  9275     // TODO: attribute long value;
  9276 
  9277     toString: function() {
  9278         return '[object HTMLLIElement]';
  9279     }
  9280 });
  9281 
  9282 
  9283 /*
  9284  * HTMLLinkElement - DOM Level 2
  9285  *
  9286  * HTML5: 4.8.12 The map element
  9287  * http://dev.w3.org/html5/spec/Overview.html#the-map-element
  9288  */
  9289 HTMLLinkElement = function(ownerDocument) {
  9290     HTMLElement.apply(this, arguments);
  9291 };
  9292 HTMLLinkElement.prototype = new HTMLElement();
  9293 __extend__(HTMLLinkElement.prototype, {
  9294     get disabled(){
  9295         return this.getAttribute('disabled');
  9296     },
  9297     set disabled(value){
  9298         this.setAttribute('disabled',value);
  9299     },
  9300     get charset(){
  9301         return this.getAttribute('charset');
  9302     },
  9303     set charset(value){
  9304         this.setAttribute('charset',value);
  9305     },
  9306     get href(){
  9307         return this.getAttribute('href');
  9308     },
  9309     set href(value){
  9310         this.setAttribute('href',value);
  9311     },
  9312     get hreflang(){
  9313         return this.getAttribute('hreflang');
  9314     },
  9315     set hreflang(value){
  9316         this.setAttribute('hreflang',value);
  9317     },
  9318     get media(){
  9319         return this.getAttribute('media');
  9320     },
  9321     set media(value){
  9322         this.setAttribute('media',value);
  9323     },
  9324     get rel(){
  9325         return this.getAttribute('rel');
  9326     },
  9327     set rel(value){
  9328         this.setAttribute('rel',value);
  9329     },
  9330     get rev(){
  9331         return this.getAttribute('rev');
  9332     },
  9333     set rev(value){
  9334         this.setAttribute('rev',value);
  9335     },
  9336     get target(){
  9337         return this.getAttribute('target');
  9338     },
  9339     set target(value){
  9340         this.setAttribute('target',value);
  9341     },
  9342     get type(){
  9343         return this.getAttribute('type');
  9344     },
  9345     set type(value){
  9346         this.setAttribute('type',value);
  9347     },
  9348     toString: function() {
  9349         return '[object HTMLLinkElement]';
  9350     }
  9351 });
  9352 
  9353 __loadLink__ = function(node, value) {
  9354     var event;
  9355     var owner = node.ownerDocument;
  9356 
  9357     if (owner.fragment) {
  9358         /**
  9359          * if we are in an innerHTML fragment parsing step
  9360          * then ignore.  It will be handled once the fragment is
  9361          * added to the real doco
  9362          */
  9363         return;
  9364     }
  9365 
  9366     if (node.parentNode === null) {
  9367         /*
  9368          * if a <link> is parentless (normally by create a new link
  9369          * via document.createElement('link'), then do *not* fire an
  9370          * event, even if it has a valid 'href' attribute.
  9371          */
  9372         return;
  9373     }
  9374     if (value != '' && (!Envjs.loadLink ||
  9375                         (Envjs.loadLink &&
  9376                          Envjs.loadLink(node, value)))) {
  9377         // value has to be something (easy)
  9378         // if the user-land API doesn't exist
  9379         // Or if the API exists and it returns true, then ok:
  9380         event = document.createEvent('Events');
  9381         event.initEvent('load');
  9382     } else {
  9383         // oops
  9384         event = document.createEvent('Events');
  9385         event.initEvent('error');
  9386     }
  9387     node.dispatchEvent(event, false);
  9388 };
  9389 
  9390 
  9391 HTMLElement.registerSetAttribute('LINK', 'href', function(node, value) {
  9392     __loadLink__(node, value);
  9393 });
  9394 
  9395 /**
  9396  * Event stuff, not sure where it goes
  9397  */
  9398 __extend__(HTMLLinkElement.prototype, {
  9399     onload: function(event){
  9400         __eval__(this.getAttribute('onload')||'', this);
  9401     },
  9402 });
  9403 
  9404 /**
  9405  * HTMLMapElement
  9406  *
  9407  * 4.8.12 The map element
  9408  * http://dev.w3.org/html5/spec/Overview.html#the-map-element
  9409  */
  9410 HTMLMapElement = function(ownerDocument) {
  9411     HTMLElement.apply(this, arguments);
  9412 };
  9413 HTMLMapElement.prototype = new HTMLElement();
  9414 __extend__(HTMLMapElement.prototype, {
  9415     get areas(){
  9416         return this.getElementsByTagName('area');
  9417     },
  9418     get name(){
  9419         return this.getAttribute('name') || '';
  9420     },
  9421     set name(value){
  9422         this.setAttribute('name',value);
  9423     },
  9424     toString: function() {
  9425         return '[object HTMLMapElement]';
  9426     }
  9427 });
  9428 
  9429 /**
  9430  * HTMLMetaElement - DOM Level 2
  9431  * HTML5: 4.2.5 The meta element
  9432  * http://dev.w3.org/html5/spec/Overview.html#meta
  9433  */
  9434 HTMLMetaElement = function(ownerDocument) {
  9435     HTMLElement.apply(this, arguments);
  9436 };
  9437 HTMLMetaElement.prototype = new HTMLElement();
  9438 __extend__(HTMLMetaElement.prototype, {
  9439     get content() {
  9440         return this.getAttribute('content') || '';
  9441     },
  9442     set content(value){
  9443         this.setAttribute('content',value);
  9444     },
  9445     get httpEquiv(){
  9446         return this.getAttribute('http-equiv') || '';
  9447     },
  9448     set httpEquiv(value){
  9449         this.setAttribute('http-equiv',value);
  9450     },
  9451     get name(){
  9452         return this.getAttribute('name') || '';
  9453     },
  9454     set name(value){
  9455         this.setAttribute('name',value);
  9456     },
  9457     get scheme(){
  9458         return this.getAttribute('scheme');
  9459     },
  9460     set scheme(value){
  9461         this.setAttribute('scheme',value);
  9462     },
  9463     toString: function() {
  9464         return '[object HTMLMetaElement]';
  9465     }
  9466 });
  9467 
  9468 
  9469 /**
  9470  * HTMLObjectElement - DOM Level 2
  9471  * HTML5: 4.8.5 The object element
  9472  * http://dev.w3.org/html5/spec/Overview.html#the-object-element
  9473  */
  9474 HTMLObjectElement = function(ownerDocument) {
  9475     HTMLElement.apply(this, arguments);
  9476 };
  9477 HTMLObjectElement.prototype = new HTMLElement();
  9478 __extend__(HTMLObjectElement.prototype, {
  9479     get code(){
  9480         return this.getAttribute('code');
  9481     },
  9482     set code(value){
  9483         this.setAttribute('code',value);
  9484     },
  9485     get archive(){
  9486         return this.getAttribute('archive');
  9487     },
  9488     set archive(value){
  9489         this.setAttribute('archive',value);
  9490     },
  9491     get codeBase(){
  9492         return this.getAttribute('codebase');
  9493     },
  9494     set codeBase(value){
  9495         this.setAttribute('codebase',value);
  9496     },
  9497     get codeType(){
  9498         return this.getAttribute('codetype');
  9499     },
  9500     set codeType(value){
  9501         this.setAttribute('codetype',value);
  9502     },
  9503     get data(){
  9504         return this.getAttribute('data');
  9505     },
  9506     set data(value){
  9507         this.setAttribute('data',value);
  9508     },
  9509     get declare(){
  9510         return this.getAttribute('declare');
  9511     },
  9512     set declare(value){
  9513         this.setAttribute('declare',value);
  9514     },
  9515     get height(){
  9516         return this.getAttribute('height');
  9517     },
  9518     set height(value){
  9519         this.setAttribute('height',value);
  9520     },
  9521     get standby(){
  9522         return this.getAttribute('standby');
  9523     },
  9524     set standby(value){
  9525         this.setAttribute('standby',value);
  9526     },
  9527     /*get tabIndex(){
  9528       return this.getAttribute('tabindex');
  9529       },
  9530       set tabIndex(value){
  9531       this.setAttribute('tabindex',value);
  9532       },*/
  9533     get type(){
  9534         return this.getAttribute('type');
  9535     },
  9536     set type(value){
  9537         this.setAttribute('type',value);
  9538     },
  9539     get useMap(){
  9540         return this.getAttribute('usemap');
  9541     },
  9542     set useMap(value){
  9543         this.setAttribute('usemap',value);
  9544     },
  9545     get width(){
  9546         return this.getAttribute('width');
  9547     },
  9548     set width(value){
  9549         this.setAttribute('width',value);
  9550     },
  9551     get contentDocument(){
  9552         return this.ownerDocument;
  9553     },
  9554     toString: function() {
  9555         return '[object HTMLObjectElement]';
  9556     }
  9557 });
  9558 
  9559 // Named Element Support
  9560 HTMLElement.registerSetAttribute('OBJECT', 'name',
  9561                                  __updateFormForNamedElement__);
  9562 
  9563 /*
  9564  * HTMLOListElement
  9565  * HTML5: 4.5.6 The ol Element
  9566  * http://dev.w3.org/html5/spec/Overview.html#the-ol-element
  9567  */
  9568 HTMLOListElement = function(ownerDocument) {
  9569     HTMLElement.apply(this, arguments);
  9570 };
  9571 
  9572 HTMLOListElement.prototype = new HTMLElement();
  9573 __extend__(HTMLOListElement.prototype, {
  9574 
  9575     // TODO: attribute boolean reversed;
  9576     // TODO:  attribute long start;
  9577 
  9578     toString: function() {
  9579         return '[object HTMLOListElement]';
  9580     }
  9581 });
  9582 
  9583 
  9584 /**
  9585  * HTMLOptGroupElement - DOM Level 2
  9586  * HTML 5: 4.10.9 The optgroup element
  9587  * http://dev.w3.org/html5/spec/Overview.html#the-optgroup-element
  9588  */
  9589 HTMLOptGroupElement = function(ownerDocument) {
  9590     HTMLElement.apply(this, arguments);
  9591 };
  9592 HTMLOptGroupElement.prototype = new HTMLElement();
  9593 __extend__(HTMLOptGroupElement.prototype, {
  9594     get disabled(){
  9595         return this.getAttribute('disabled');
  9596     },
  9597     set disabled(value){
  9598         this.setAttribute('disabled',value);
  9599     },
  9600     get label(){
  9601         return this.getAttribute('label');
  9602     },
  9603     set label(value){
  9604         this.setAttribute('label',value);
  9605     },
  9606     appendChild: function(node){
  9607         var i,
  9608         length,
  9609         selected = false;
  9610         //make sure at least one is selected by default
  9611         if(node.nodeType === Node.ELEMENT_NODE && node.tagName === 'OPTION'){
  9612             length = this.childNodes.length;
  9613             for(i=0;i<length;i++){
  9614                 if(this.childNodes[i].nodeType === Node.ELEMENT_NODE &&
  9615                    this.childNodes[i].tagName === 'OPTION'){
  9616                     //check if it is selected
  9617                     if(this.selected){
  9618                         selected = true;
  9619                         break;
  9620                     }
  9621                 }
  9622             }
  9623             if(!selected){
  9624                 node.selected = true;
  9625                 this.value = node.value?node.value:'';
  9626             }
  9627         }
  9628         return HTMLElement.prototype.appendChild.apply(this, [node]);
  9629     },
  9630     toString: function() {
  9631         return '[object HTMLOptGroupElement]';
  9632     }
  9633 });
  9634 
  9635 /**
  9636  * HTMLOptionElement, Option
  9637  * HTML5: 4.10.10 The option element
  9638  * http://dev.w3.org/html5/spec/Overview.html#the-option-element
  9639  */
  9640 HTMLOptionElement = function(ownerDocument) {
  9641     HTMLInputCommon.apply(this, arguments);
  9642     this._selected = null;
  9643 };
  9644 HTMLOptionElement.prototype = new HTMLInputCommon();
  9645 __extend__(HTMLOptionElement.prototype, {
  9646 
  9647     /**
  9648      * defaultSelected actually reflects the presence of the
  9649      * 'selected' attribute.
  9650      */
  9651     get defaultSelected() {
  9652         return this.hasAttribute('selected');
  9653     },
  9654     set defaultSelected(value) {
  9655         if (value) {
  9656             this.setAttribute('selected','');
  9657         } else {
  9658             if (this.hasAttribute('selected')) {
  9659                 this.removeAttribute('selected');
  9660             }
  9661         }
  9662     },
  9663 
  9664     /*
  9665      * HTML5: The form IDL attribute's behavior depends on whether the
  9666      * option element is in a select element or not. If the option has
  9667      * a select element as its parent, or has a colgroup element as
  9668      * its parent and that colgroup element has a select element as
  9669      * its parent, then the form IDL attribute must return the same
  9670      * value as the form IDL attribute on that select
  9671      * element. Otherwise, it must return null.
  9672      */
  9673     _selectparent: function() {
  9674         var parent = this.parentNode;
  9675         if (!parent) {
  9676             return null;
  9677         }
  9678 
  9679         if (parent.tagName === 'SELECT') {
  9680             return parent;
  9681         }
  9682         if (parent.tagName === 'COLGROUP') {
  9683             parent = parent.parentNode;
  9684             if (parent && parent.tagName === 'SELECT') {
  9685                 return parent;
  9686             }
  9687         }
  9688     },
  9689     _updateoptions: function() {
  9690         var parent = this._selectparent();
  9691         if (parent) {
  9692             // has side effects and updates owner select's options
  9693             parent.options;
  9694         }
  9695     },
  9696     get form() {
  9697         var parent = this._selectparent();
  9698         return parent ? parent.form : null;
  9699     },
  9700     get index() {
  9701         var options, i;
  9702 
  9703         if (! this.parentNode) {
  9704             return -1;
  9705         }
  9706         options = this.parentNode.options;
  9707         for (i=0; i < options.length; ++i) {
  9708             if (this === options[i]) {
  9709                 return i;
  9710             }
  9711         }
  9712         return 0;
  9713     },
  9714     get label() {
  9715         return this.getAttribute('label');
  9716     },
  9717     set label(value) {
  9718         this.setAttribute('label', value);
  9719     },
  9720 
  9721     /*
  9722      * This is not in the spec, but safari and firefox both
  9723      * use this
  9724      */
  9725     get name() {
  9726         return this.getAttribute('name');
  9727     },
  9728     set name(value) {
  9729         this.setAttribute('name', value);
  9730     },
  9731 
  9732     /**
  9733      *
  9734      */
  9735     get selected() {
  9736         // if disabled, return false, no matter what
  9737         if (this.disabled) {
  9738             return false;
  9739         }
  9740         if (this._selected === null) {
  9741             return this.defaultSelected;
  9742         }
  9743 
  9744         return this._selected;
  9745     },
  9746     set selected(value) {
  9747         this._selected = (value) ? true : false;
  9748     },
  9749 
  9750     get text() {
  9751         var val = this.nodeValue;
  9752         return (val === null || this.value === undefined) ?
  9753             this.innerHTML :
  9754             val;
  9755     },
  9756     get value() {
  9757         var val = this.getAttribute('value');
  9758         return (val === null || val === undefined) ?
  9759             this.textContent :
  9760             val;
  9761     },
  9762     set value(value) {
  9763         this.setAttribute('value', value);
  9764     },
  9765     toString: function() {
  9766         return '[object HTMLOptionElement]';
  9767     }
  9768 });
  9769 
  9770 Option = function(text, value, defaultSelected, selected) {
  9771 
  9772     // Not sure if this is correct:
  9773     //
  9774     // The element's document must be the active document of the
  9775     // browsing context of the Window object on which the interface
  9776     // object of the invoked constructor is found.
  9777     HTMLOptionElement.apply(this, [document]);
  9778     this.nodeName = 'OPTION';
  9779 
  9780     if (arguments.length >= 1) {
  9781         this.appendChild(document.createTextNode('' + text));
  9782     }
  9783     if (arguments.length >= 2) {
  9784         this.value = value;
  9785     }
  9786     if (arguments.length >= 3) {
  9787         if (defaultSelected) {
  9788             this.defaultSelected = '';
  9789         }
  9790     }
  9791     if (arguments.length >= 4) {
  9792         this.selected = (selected) ? true : false;
  9793     }
  9794 };
  9795 
  9796 Option.prototype = new HTMLOptionElement();
  9797 
  9798 // Named Element Support
  9799 
  9800 function updater(node, value) {
  9801     node._updateoptions();
  9802 }
  9803 HTMLElement.registerSetAttribute('OPTION', 'name', updater);
  9804 HTMLElement.registerSetAttribute('OPTION', 'id', updater);
  9805 
  9806 /*
  9807 * HTMLParagraphElement - DOM Level 2
  9808 */
  9809 HTMLParagraphElement = function(ownerDocument) {
  9810     HTMLElement.apply(this, arguments);
  9811 };
  9812 HTMLParagraphElement.prototype = new HTMLElement();
  9813 __extend__(HTMLParagraphElement.prototype, {
  9814     toString: function(){
  9815         return '[object HTMLParagraphElement]';
  9816     }
  9817 });
  9818 
  9819 
  9820 /**
  9821  * HTMLParamElement
  9822  *
  9823  * HTML5: 4.8.6 The param element
  9824  * http://dev.w3.org/html5/spec/Overview.html#the-param-element
  9825  */
  9826 HTMLParamElement = function(ownerDocument) {
  9827     HTMLElement.apply(this, arguments);
  9828 };
  9829 HTMLParamElement.prototype = new HTMLElement();
  9830 __extend__(HTMLParamElement.prototype, {
  9831     get name() {
  9832         return this.getAttribute('name') || '';
  9833     },
  9834     set name(value) {
  9835         this.setAttribute('name', value);
  9836     },
  9837     get type(){
  9838         return this.getAttribute('type');
  9839     },
  9840     set type(value){
  9841         this.setAttribute('type',value);
  9842     },
  9843     get value(){
  9844         return this.getAttribute('value');
  9845     },
  9846     set value(value){
  9847         this.setAttribute('value',value);
  9848     },
  9849     get valueType(){
  9850         return this.getAttribute('valuetype');
  9851     },
  9852     set valueType(value){
  9853         this.setAttribute('valuetype',value);
  9854     },
  9855     toString: function() {
  9856         return '[object HTMLParamElement]';
  9857     }
  9858 });
  9859 
  9860 
  9861 /**
  9862  * HTMLScriptElement - DOM Level 2
  9863  *
  9864  * HTML5: 4.3.1 The script element
  9865  * http://dev.w3.org/html5/spec/Overview.html#script
  9866  */
  9867 HTMLScriptElement = function(ownerDocument) {
  9868     HTMLElement.apply(this, arguments);
  9869 };
  9870 HTMLScriptElement.prototype = new HTMLElement();
  9871 __extend__(HTMLScriptElement.prototype, {
  9872 
  9873     /**
  9874      * HTML5 spec @ http://dev.w3.org/html5/spec/Overview.html#script
  9875      *
  9876      * "The IDL attribute text must return a concatenation of the
  9877      * contents of all the text nodes that are direct children of the
  9878      * script element (ignoring any other nodes such as comments or
  9879      * elements), in tree order. On setting, it must act the same way
  9880      * as the textContent IDL attribute."
  9881      *
  9882      * AND... "The term text node refers to any Text node,
  9883      * including CDATASection nodes; specifically, any Node with node
  9884      * type TEXT_NODE (3) or CDATA_SECTION_NODE (4)"
  9885      */
  9886     get text() {
  9887         var kids = this.childNodes;
  9888         var kid;
  9889         var s = '';
  9890         var imax = kids.length;
  9891         for (var i = 0; i < imax; ++i) {
  9892             kid = kids[i];
  9893             if (kid.nodeType === Node.TEXT_NODE ||
  9894                 kid.nodeType === Node.CDATA_SECTION_NODE) {
  9895                 s += kid.nodeValue;
  9896             }
  9897         }
  9898         return s;
  9899     },
  9900 
  9901     /**
  9902      * HTML5 spec "Can be set, to replace the element's children with
  9903      * the given value."
  9904      */
  9905     set text(value) {
  9906         // this deletes all children, and make a new single text node
  9907         // with value
  9908         this.textContent = value;
  9909 
  9910         /* Currently we always execute, but this isn't quite right if
  9911          * the node has *not* been inserted into the document, then it
  9912          * should *not* fire.  The more detailed answer from the spec:
  9913          *
  9914          * When a script element that is neither marked as having
  9915          * "already started" nor marked as being "parser-inserted"
  9916          * experiences one of the events listed in the following list,
  9917          * the user agent must synchronously run the script element:
  9918          *
  9919          *   * The script element gets inserted into a document.
  9920          *   * The script element is in a Document and its child nodes
  9921          *     are changed.
  9922          *   * The script element is in a Document and has a src
  9923          *     attribute set where previously the element had no such
  9924          *     attribute.
  9925          *
  9926          * And no doubt there are other cases as well.
  9927          */
  9928         Envjs.loadInlineScript(this);
  9929     },
  9930 
  9931     get htmlFor(){
  9932         return this.getAttribute('for');
  9933     },
  9934     set htmlFor(value){
  9935         this.setAttribute('for',value);
  9936     },
  9937     get event(){
  9938         return this.getAttribute('event');
  9939     },
  9940     set event(value){
  9941         this.setAttribute('event',value);
  9942     },
  9943     get charset(){
  9944         return this.getAttribute('charset');
  9945     },
  9946     set charset(value){
  9947         this.setAttribute('charset',value);
  9948     },
  9949     get defer(){
  9950         return this.getAttribute('defer');
  9951     },
  9952     set defer(value){
  9953         this.setAttribute('defer',value);
  9954     },
  9955     get src(){
  9956         return this.getAttribute('src')||'';
  9957     },
  9958     set src(value){
  9959         this.setAttribute('src',value);
  9960     },
  9961     get type(){
  9962         return this.getAttribute('type')||'';
  9963     },
  9964     set type(value){
  9965         this.setAttribute('type',value);
  9966     },
  9967     onload: HTMLEvents.prototype.onload,
  9968     onerror: HTMLEvents.prototype.onerror,
  9969     toString: function() {
  9970         return '[object HTMLScriptElement]';
  9971     }
  9972 });
  9973 
  9974 
  9975 /**
  9976  * HTMLSelectElement
  9977  * HTML5: http://dev.w3.org/html5/spec/Overview.html#the-select-element
  9978  */
  9979 HTMLSelectElement = function(ownerDocument) {
  9980     HTMLTypeValueInputs.apply(this, arguments);
  9981     this._oldIndex = -1;
  9982 };
  9983 
  9984 HTMLSelectElement.prototype = new HTMLTypeValueInputs();
  9985 __extend__(HTMLSelectElement.prototype, inputElements_dataProperties);
  9986 __extend__(HTMLButtonElement.prototype, inputElements_size);
  9987 __extend__(HTMLSelectElement.prototype, inputElements_onchange);
  9988 __extend__(HTMLSelectElement.prototype, inputElements_focusEvents);
  9989 __extend__(HTMLSelectElement.prototype, {
  9990 
  9991     get value() {
  9992         var index = this.selectedIndex;
  9993         return (index === -1) ? '' : this.options[index].value;
  9994     },
  9995     set value(newValue) {
  9996         var options = this.options;
  9997         var imax = options.length;
  9998         for (var i=0; i< imax; ++i) {
  9999             if (options[i].value == newValue) {
 10000                 this.setAttribute('value', newValue);
 10001                 this.selectedIndex = i;
 10002                 return;
 10003             }
 10004         }
 10005     },
 10006     get multiple() {
 10007         return this.hasAttribute('multiple');
 10008     },
 10009     set multiple(value) {
 10010         if (value) {
 10011             this.setAttribute('multiple', '');
 10012         } else {
 10013             if (this.hasAttribute('multiple')) {
 10014                 this.removeAttribute('multiple');
 10015             }
 10016         }
 10017     },
 10018     // Returns HTMLOptionsCollection
 10019     get options() {
 10020         var nodes = this.getElementsByTagName('option');
 10021         var alist = [];
 10022         var i, tmp;
 10023         for (i = 0; i < nodes.length; ++i) {
 10024             alist.push(nodes[i]);
 10025             this[i] = nodes[i];
 10026             tmp = nodes[i].name;
 10027             if (tmp) {
 10028                 this[tmp] = nodes[i];
 10029             }
 10030             tmp = nodes[i].id;
 10031             if (tmp) {
 10032                 this[tmp] = nodes[i];
 10033             }
 10034         }
 10035         return new HTMLCollection(alist);
 10036     },
 10037     get length() {
 10038         return this.options.length;
 10039     },
 10040     item: function(idx) {
 10041         return this.options[idx];
 10042     },
 10043     namedItem: function(aname) {
 10044         return this.options[aname];
 10045     },
 10046 
 10047     get selectedIndex() {
 10048         var options = this.options;
 10049         var imax = options.length;
 10050         for (var i=0; i < imax; ++i) {
 10051             if (options[i].selected) {
 10052                 //console.log('select get selectedIndex %s', i);
 10053                 return i;
 10054             }
 10055         }
 10056         //console.log('select get selectedIndex %s', -1);
 10057         return -1;
 10058     },
 10059 
 10060     set selectedIndex(value) {
 10061         var options = this.options;
 10062         var num = Number(value);
 10063         var imax = options.length;
 10064         for (var i = 0; i < imax; ++i) {
 10065             options[i].selected = (i === num);
 10066         }
 10067     },
 10068     get type() {
 10069         return this.multiple ? 'select-multiple' : 'select-one';
 10070     },
 10071 
 10072     add: function(element, before) {
 10073         this.appendChild(element);
 10074         //__add__(this);
 10075     },
 10076     remove: function() {
 10077         __remove__(this);
 10078     },
 10079     toString: function() {
 10080         return '[object HTMLSelectElement]';
 10081     }
 10082 });
 10083 
 10084 // Named Element Support
 10085 HTMLElement.registerSetAttribute('SELECT', 'name',
 10086                                  __updateFormForNamedElement__);
 10087 /**
 10088  * HTML 5: 4.6.22 The span element
 10089  * http://dev.w3.org/html5/spec/Overview.html#the-span-element
 10090  * 
 10091  */
 10092 HTMLSpanElement = function(ownerDocument) {
 10093     HTMLElement.apply(this, arguments);
 10094 };
 10095 HTMLSpanElement.prototype = new HTMLElement();
 10096 __extend__(HTMLSpanElement.prototype, {
 10097     toString: function(){
 10098         return '[object HTMLSpanElement]';
 10099     }
 10100 });
 10101 
 10102 
 10103 /**
 10104  * HTMLStyleElement - DOM Level 2
 10105  * HTML5 4.2.6 The style element
 10106  * http://dev.w3.org/html5/spec/Overview.html#the-style-element
 10107  */
 10108 HTMLStyleElement = function(ownerDocument) {
 10109     HTMLElement.apply(this, arguments);
 10110 };
 10111 HTMLStyleElement.prototype = new HTMLElement();
 10112 __extend__(HTMLStyleElement.prototype, {
 10113     get disabled(){
 10114         return this.getAttribute('disabled');
 10115     },
 10116     set disabled(value){
 10117         this.setAttribute('disabled',value);
 10118     },
 10119     get media(){
 10120         return this.getAttribute('media');
 10121     },
 10122     set media(value){
 10123         this.setAttribute('media',value);
 10124     },
 10125     get type(){
 10126         return this.getAttribute('type');
 10127     },
 10128     set type(value){
 10129         this.setAttribute('type',value);
 10130     },
 10131     toString: function() {
 10132         return '[object HTMLStyleElement]';
 10133     }
 10134 });
 10135 
 10136 /**
 10137  * HTMLTableElement - DOM Level 2
 10138  * Implementation Provided by Steven Wood
 10139  *
 10140  * HTML5: 4.9.1 The table element
 10141  * http://dev.w3.org/html5/spec/Overview.html#the-table-element
 10142  */
 10143 HTMLTableElement = function(ownerDocument) {
 10144     HTMLElement.apply(this, arguments);
 10145 };
 10146 HTMLTableElement.prototype = new HTMLElement();
 10147 __extend__(HTMLTableElement.prototype, {
 10148 
 10149     get tFoot() {
 10150         //tFoot returns the table footer.
 10151         return this.getElementsByTagName("tfoot")[0];
 10152     },
 10153 
 10154     createTFoot : function () {
 10155         var tFoot = this.tFoot;
 10156 
 10157         if (!tFoot) {
 10158             tFoot = document.createElement("tfoot");
 10159             this.appendChild(tFoot);
 10160         }
 10161 
 10162         return tFoot;
 10163     },
 10164 
 10165     deleteTFoot : function () {
 10166         var foot = this.tFoot;
 10167         if (foot) {
 10168             foot.parentNode.removeChild(foot);
 10169         }
 10170     },
 10171 
 10172     get tHead() {
 10173         //tHead returns the table head.
 10174         return this.getElementsByTagName("thead")[0];
 10175     },
 10176 
 10177     createTHead : function () {
 10178         var tHead = this.tHead;
 10179 
 10180         if (!tHead) {
 10181             tHead = document.createElement("thead");
 10182             this.insertBefore(tHead, this.firstChild);
 10183         }
 10184 
 10185         return tHead;
 10186     },
 10187 
 10188     deleteTHead : function () {
 10189         var head = this.tHead;
 10190         if (head) {
 10191             head.parentNode.removeChild(head);
 10192         }
 10193     },
 10194 
 10195     /*appendChild : function (child) {
 10196 
 10197       var tagName;
 10198       if(child&&child.nodeType==Node.ELEMENT_NODE){
 10199       tagName = child.tagName.toLowerCase();
 10200       if (tagName === "tr") {
 10201       // need an implcit <tbody> to contain this...
 10202       if (!this.currentBody) {
 10203       this.currentBody = document.createElement("tbody");
 10204 
 10205       Node.prototype.appendChild.apply(this, [this.currentBody]);
 10206       }
 10207 
 10208       return this.currentBody.appendChild(child);
 10209 
 10210       } else if (tagName === "tbody" || tagName === "tfoot" && this.currentBody) {
 10211       this.currentBody = child;
 10212       return Node.prototype.appendChild.apply(this, arguments);
 10213 
 10214       } else {
 10215       return Node.prototype.appendChild.apply(this, arguments);
 10216       }
 10217       }else{
 10218       //tables can still have text node from white space
 10219       return Node.prototype.appendChild.apply(this, arguments);
 10220       }
 10221       },*/
 10222 
 10223     get tBodies() {
 10224         return new HTMLCollection(this.getElementsByTagName("tbody"));
 10225 
 10226     },
 10227 
 10228     get rows() {
 10229         return new HTMLCollection(this.getElementsByTagName("tr"));
 10230     },
 10231 
 10232     insertRow : function (idx) {
 10233         if (idx === undefined) {
 10234             throw new Error("Index omitted in call to HTMLTableElement.insertRow ");
 10235         }
 10236 
 10237         var rows = this.rows,
 10238             numRows = rows.length,
 10239             node,
 10240             inserted,
 10241             lastRow;
 10242 
 10243         if (idx > numRows) {
 10244             throw new Error("Index > rows.length in call to HTMLTableElement.insertRow");
 10245         }
 10246 
 10247         inserted = document.createElement("tr");
 10248         // If index is -1 or equal to the number of rows,
 10249         // the row is appended as the last row. If index is omitted
 10250         // or greater than the number of rows, an error will result
 10251         if (idx === -1 || idx === numRows) {
 10252             this.appendChild(inserted);
 10253         } else {
 10254             rows[idx].parentNode.insertBefore(inserted, rows[idx]);
 10255         }
 10256 
 10257         return inserted;
 10258     },
 10259 
 10260     deleteRow : function (idx) {
 10261         var elem = this.rows[idx];
 10262         elem.parentNode.removeChild(elem);
 10263     },
 10264 
 10265     get summary() {
 10266         return this.getAttribute("summary");
 10267     },
 10268 
 10269     set summary(summary) {
 10270         this.setAttribute("summary", summary);
 10271     },
 10272 
 10273     get align() {
 10274         return this.getAttribute("align");
 10275     },
 10276 
 10277     set align(align) {
 10278         this.setAttribute("align", align);
 10279     },
 10280 
 10281     get bgColor() {
 10282         return this.getAttribute("bgColor");
 10283     },
 10284 
 10285     set bgColor(bgColor) {
 10286         return this.setAttribute("bgColor", bgColor);
 10287     },
 10288 
 10289     get cellPadding() {
 10290         return this.getAttribute("cellPadding");
 10291     },
 10292 
 10293     set cellPadding(cellPadding) {
 10294         return this.setAttribute("cellPadding", cellPadding);
 10295     },
 10296 
 10297     get cellSpacing() {
 10298         return this.getAttribute("cellSpacing");
 10299     },
 10300 
 10301     set cellSpacing(cellSpacing) {
 10302         this.setAttribute("cellSpacing", cellSpacing);
 10303     },
 10304 
 10305     get frame() {
 10306         return this.getAttribute("frame");
 10307     },
 10308 
 10309     set frame(frame) {
 10310         this.setAttribute("frame", frame);
 10311     },
 10312 
 10313     get rules() {
 10314         return this.getAttribute("rules");
 10315     },
 10316 
 10317     set rules(rules) {
 10318         this.setAttribute("rules", rules);
 10319     },
 10320 
 10321     get width() {
 10322         return this.getAttribute("width");
 10323     },
 10324 
 10325     set width(width) {
 10326         this.setAttribute("width", width);
 10327     },
 10328     toString: function() {
 10329         return '[object HTMLTableElement]';
 10330     }
 10331 });
 10332 
 10333 /*
 10334  * HTMLxElement - DOM Level 2
 10335  * - Contributed by Steven Wood
 10336  *
 10337  * HTML5: 4.9.5 The tbody element
 10338  * http://dev.w3.org/html5/spec/Overview.html#the-tbody-element
 10339  * http://dev.w3.org/html5/spec/Overview.html#htmltablesectionelement
 10340  */
 10341 HTMLTableSectionElement = function(ownerDocument) {
 10342     HTMLElement.apply(this, arguments);
 10343 };
 10344 HTMLTableSectionElement.prototype = new HTMLElement();
 10345 __extend__(HTMLTableSectionElement.prototype, {
 10346 
 10347     /*appendChild : function (child) {
 10348 
 10349     // disallow nesting of these elements.
 10350     if (child.tagName.match(/TBODY|TFOOT|THEAD/)) {
 10351     return this.parentNode.appendChild(child);
 10352     } else {
 10353     return Node.prototype.appendChild.apply(this, arguments);
 10354     }
 10355 
 10356     },*/
 10357 
 10358     get align() {
 10359         return this.getAttribute("align");
 10360     },
 10361 
 10362     get ch() {
 10363         return this.getAttribute("ch");
 10364     },
 10365 
 10366     set ch(ch) {
 10367         this.setAttribute("ch", ch);
 10368     },
 10369 
 10370     // ch gets or sets the alignment character for cells in a column.
 10371     set chOff(chOff) {
 10372         this.setAttribute("chOff", chOff);
 10373     },
 10374 
 10375     get chOff() {
 10376         return this.getAttribute("chOff");
 10377     },
 10378 
 10379     get vAlign () {
 10380         return this.getAttribute("vAlign");
 10381     },
 10382 
 10383     get rows() {
 10384         return new HTMLCollection(this.getElementsByTagName("tr"));
 10385     },
 10386 
 10387     insertRow : function (idx) {
 10388         if (idx === undefined) {
 10389             throw new Error("Index omitted in call to HTMLTableSectionElement.insertRow ");
 10390         }
 10391 
 10392         var numRows = this.rows.length,
 10393         node = null;
 10394 
 10395         if (idx > numRows) {
 10396             throw new Error("Index > rows.length in call to HTMLTableSectionElement.insertRow");
 10397         }
 10398 
 10399         var row = document.createElement("tr");
 10400         // If index is -1 or equal to the number of rows,
 10401         // the row is appended as the last row. If index is omitted
 10402         // or greater than the number of rows, an error will result
 10403         if (idx === -1 || idx === numRows) {
 10404             this.appendChild(row);
 10405         } else {
 10406             node = this.firstChild;
 10407 
 10408             for (var i=0; i<idx; i++) {
 10409                 node = node.nextSibling;
 10410             }
 10411         }
 10412 
 10413         this.insertBefore(row, node);
 10414 
 10415         return row;
 10416     },
 10417 
 10418     deleteRow : function (idx) {
 10419         var elem = this.rows[idx];
 10420         this.removeChild(elem);
 10421     },
 10422 
 10423     toString: function() {
 10424         return '[object HTMLTableSectionElement]';
 10425     }
 10426 });
 10427 
 10428 /**
 10429  * HTMLTableCellElement
 10430  * base interface for TD and TH
 10431  *
 10432  * HTML5: 4.9.11 Attributes common to td and th elements
 10433  * http://dev.w3.org/html5/spec/Overview.html#htmltablecellelement
 10434  */
 10435 HTMLTableCellElement = function(ownerDocument) {
 10436     HTMLElement.apply(this, arguments);
 10437 };
 10438 HTMLTableCellElement.prototype = new HTMLElement();
 10439 __extend__(HTMLTableCellElement.prototype, {
 10440 
 10441 
 10442     // TOOD: attribute unsigned long  colSpan;
 10443     // TODO: attribute unsigned long  rowSpan;
 10444     // TODO: attribute DOMString      headers;
 10445     // TODO: readonly attribute long  cellIndex;
 10446 
 10447     // Not really necessary but might be helpful in debugging
 10448     toString: function() {
 10449         return '[object HTMLTableCellElement]';
 10450     }
 10451 
 10452 });
 10453 
 10454 /**
 10455  * HTMLTableDataCellElement
 10456  * HTML5: 4.9.9 The td Element
 10457  * http://dev.w3.org/html5/spec/Overview.html#the-td-element
 10458  */
 10459 HTMLTableDataCellElement = function(ownerDocument) {
 10460     HTMLElement.apply(this, arguments);
 10461 };
 10462 HTMLTableDataCellElement.prototype = new HTMLTableCellElement();
 10463 __extend__(HTMLTableDataCellElement.prototype, {
 10464 
 10465     // adds no new properties or methods
 10466 
 10467     toString: function() {
 10468         return '[object HTMLTableDataCellElement]';
 10469     }
 10470 });
 10471 
 10472 /**
 10473  * HTMLTableHeaderCellElement
 10474  * HTML5: 4.9.10 The th Element
 10475  * http://dev.w3.org/html5/spec/Overview.html#the-th-element
 10476  */
 10477 HTMLTableHeaderCellElement = function(ownerDocument) {
 10478     HTMLElement.apply(this, arguments);
 10479 };
 10480 HTMLTableHeaderCellElement.prototype = new HTMLTableCellElement();
 10481 __extend__(HTMLTableHeaderCellElement.prototype, {
 10482 
 10483     // TODO:  attribute DOMString scope
 10484 
 10485     toString: function() {
 10486         return '[object HTMLTableHeaderCellElement]';
 10487     }
 10488 });
 10489 
 10490 
 10491 /**
 10492  * HTMLTextAreaElement - DOM Level 2
 10493  * HTML5: 4.10.11 The textarea element
 10494  * http://dev.w3.org/html5/spec/Overview.html#the-textarea-element
 10495  */
 10496 HTMLTextAreaElement = function(ownerDocument) {
 10497     HTMLInputAreaCommon.apply(this, arguments);
 10498     this._rawvalue = null;
 10499 };
 10500 HTMLTextAreaElement.prototype = new HTMLInputAreaCommon();
 10501 __extend__(HTMLTextAreaElement.prototype, {
 10502     get cols(){
 10503         return Number(this.getAttribute('cols')||'-1');
 10504     },
 10505     set cols(value){
 10506         this.setAttribute('cols', value);
 10507     },
 10508     get rows(){
 10509         return Number(this.getAttribute('rows')||'-1');
 10510     },
 10511     set rows(value){
 10512         this.setAttribute('rows', value);
 10513     },
 10514 
 10515     /*
 10516      * read-only
 10517      */
 10518     get type() {
 10519         return this.getAttribute('type') || 'textarea';
 10520     },
 10521 
 10522     /**
 10523      * This modifies the text node under the widget
 10524      */
 10525     get defaultValue() {
 10526         return this.textContent;
 10527     },
 10528     set defaultValue(value) {
 10529         this.textContent = value;
 10530     },
 10531 
 10532     /**
 10533      * http://dev.w3.org/html5/spec/Overview.html#concept-textarea-raw-value
 10534      */
 10535     get value() {
 10536         return (this._rawvalue === null) ? this.defaultValue : this._rawvalue;
 10537     },
 10538     set value(value) {
 10539         this._rawvalue = value;
 10540     },
 10541     toString: function() {
 10542         return '[object HTMLTextAreaElement]';
 10543     }
 10544 });
 10545 
 10546 // Named Element Support
 10547 HTMLElement.registerSetAttribute('TEXTAREA', 'name',
 10548                                  __updateFormForNamedElement__);
 10549 
 10550 /**
 10551  * HTMLTitleElement - DOM Level 2
 10552  *
 10553  * HTML5: 4.2.2 The title element
 10554  * http://dev.w3.org/html5/spec/Overview.html#the-title-element-0
 10555  */
 10556 HTMLTitleElement = function(ownerDocument) {
 10557     HTMLElement.apply(this, arguments);
 10558 };
 10559 HTMLTitleElement.prototype = new HTMLElement();
 10560 __extend__(HTMLTitleElement.prototype, {
 10561     get text() {
 10562         return this.innerText;
 10563     },
 10564 
 10565     set text(titleStr) {
 10566         this.textContent = titleStr;
 10567     },
 10568     toString: function() {
 10569         return '[object HTMLTitleElement]';
 10570     }
 10571 });
 10572 
 10573 
 10574 
 10575 /**
 10576  * HTMLRowElement - DOM Level 2
 10577  * Implementation Provided by Steven Wood
 10578  *
 10579  * HTML5: 4.9.8 The tr element
 10580  * http://dev.w3.org/html5/spec/Overview.html#the-tr-element
 10581  */
 10582 HTMLTableRowElement = function(ownerDocument) {
 10583     HTMLElement.apply(this, arguments);
 10584 };
 10585 HTMLTableRowElement.prototype = new HTMLElement();
 10586 __extend__(HTMLTableRowElement.prototype, {
 10587 
 10588     /*appendChild : function (child) {
 10589 
 10590       var retVal = Node.prototype.appendChild.apply(this, arguments);
 10591       retVal.cellIndex = this.cells.length -1;
 10592 
 10593       return retVal;
 10594       },*/
 10595     // align gets or sets the horizontal alignment of data within cells of the row.
 10596     get align() {
 10597         return this.getAttribute("align");
 10598     },
 10599 
 10600     get bgColor() {
 10601         return this.getAttribute("bgcolor");
 10602     },
 10603 
 10604     get cells() {
 10605         var nl = this.getElementsByTagName("td");
 10606         return new HTMLCollection(nl);
 10607     },
 10608 
 10609     get ch() {
 10610         return this.getAttribute("ch");
 10611     },
 10612 
 10613     set ch(ch) {
 10614         this.setAttribute("ch", ch);
 10615     },
 10616 
 10617     // ch gets or sets the alignment character for cells in a column.
 10618     set chOff(chOff) {
 10619         this.setAttribute("chOff", chOff);
 10620     },
 10621 
 10622     get chOff() {
 10623         return this.getAttribute("chOff");
 10624     },
 10625 
 10626     /**
 10627      * http://dev.w3.org/html5/spec/Overview.html#dom-tr-rowindex
 10628      */
 10629     get rowIndex() {
 10630         var nl = this.parentNode.childNodes;
 10631         for (var i=0; i<nl.length; i++) {
 10632             if (nl[i] === this) {
 10633                 return i;
 10634             }
 10635         }
 10636         return -1;
 10637     },
 10638 
 10639     /**
 10640      * http://dev.w3.org/html5/spec/Overview.html#dom-tr-sectionrowindex
 10641      */
 10642     get sectionRowIndex() {
 10643         var nl = this.parentNode.getElementsByTagName(this.tagName);
 10644         for (var i=0; i<nl.length; i++) {
 10645             if (nl[i] === this) {
 10646                 return i;
 10647             }
 10648         }
 10649         return -1;
 10650     },
 10651 
 10652     get vAlign () {
 10653         return this.getAttribute("vAlign");
 10654     },
 10655 
 10656     insertCell : function (idx) {
 10657         if (idx === undefined) {
 10658             throw new Error("Index omitted in call to HTMLTableRow.insertCell");
 10659         }
 10660 
 10661         var numCells = this.cells.length,
 10662         node = null;
 10663 
 10664         if (idx > numCells) {
 10665             throw new Error("Index > rows.length in call to HTMLTableRow.insertCell");
 10666         }
 10667 
 10668         var cell = document.createElement("td");
 10669 
 10670         if (idx === -1 || idx === numCells) {
 10671             this.appendChild(cell);
 10672         } else {
 10673 
 10674 
 10675             node = this.firstChild;
 10676 
 10677             for (var i=0; i<idx; i++) {
 10678                 node = node.nextSibling;
 10679             }
 10680         }
 10681 
 10682         this.insertBefore(cell, node);
 10683         cell.cellIndex = idx;
 10684 
 10685         return cell;
 10686     },
 10687     deleteCell : function (idx) {
 10688         var elem = this.cells[idx];
 10689         this.removeChild(elem);
 10690     },
 10691     toString: function() {
 10692         return '[object HTMLTableRowElement]';
 10693     }
 10694 
 10695 });
 10696 
 10697 /*
 10698  * HTMLUListElement
 10699  * HTML5: 4.5.7 The ul Element
 10700  * http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
 10701  */
 10702 HTMLUListElement = function(ownerDocument) {
 10703     HTMLElement.apply(this, arguments);
 10704 };
 10705 
 10706 HTMLUListElement.prototype = new HTMLElement();
 10707 __extend__(HTMLUListElement.prototype, {
 10708 
 10709     // no additional properties or elements
 10710 
 10711     toString: function() {
 10712         return '[object HTMLUListElement]';
 10713     }
 10714 });
 10715 
 10716 
 10717 /**
 10718  * HTMLUnknownElement DOM Level 2
 10719  */
 10720 HTMLUnknownElement = function(ownerDocument) {
 10721     HTMLElement.apply(this, arguments);
 10722 };
 10723 HTMLUnknownElement.prototype = new HTMLElement();
 10724 __extend__(HTMLUnknownElement.prototype,{
 10725     toString: function(){
 10726         return '[object HTMLUnknownElement]';
 10727     }
 10728 });
 10729 
 10730 /**
 10731  * @author john resig & the envjs team
 10732  * @uri http://www.envjs.com/
 10733  * @copyright 2008-2010
 10734  * @license MIT
 10735  */
 10736 //CLOSURE_END
 10737 }());
 10738 
 10739 /**
 10740  * DOM Style Level 2
 10741  */
 10742 var CSS2Properties,
 10743     CSSRule,
 10744     CSSStyleRule,
 10745     CSSImportRule,
 10746     CSSMediaRule,
 10747     CSSFontFaceRule,
 10748     CSSPageRule,
 10749     CSSRuleList,
 10750     CSSStyleSheet,
 10751     StyleSheet,
 10752     StyleSheetList;
 10753 ;
 10754 
 10755 /*
 10756  * Envjs css.1.2.13 
 10757  * Pure JavaScript Browser Environment
 10758  * By John Resig <http://ejohn.org/> and the Envjs Team
 10759  * Copyright 2008-2010 John Resig, under the MIT License
 10760  */
 10761 
 10762 //CLOSURE_START
 10763 (function(){
 10764 
 10765 
 10766 
 10767 
 10768 
 10769 /**
 10770  * @author john resig
 10771  */
 10772 // Helper method for extending one object with another.
 10773 function __extend__(a,b) {
 10774     for ( var i in b ) {
 10775         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
 10776         if ( g || s ) {
 10777             if ( g ) { a.__defineGetter__(i, g); }
 10778             if ( s ) { a.__defineSetter__(i, s); }
 10779         } else {
 10780             a[i] = b[i];
 10781         }
 10782     } return a;
 10783 }
 10784 
 10785 /**
 10786  * @author john resig
 10787  */
 10788 //from jQuery
 10789 function __setArray__( target, array ) {
 10790     // Resetting the length to 0, then using the native Array push
 10791     // is a super-fast way to populate an object with array-like properties
 10792     target.length = 0;
 10793     Array.prototype.push.apply( target, array );
 10794 }
 10795 
 10796 /**
 10797  * @author ariel flesler
 10798  *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
 10799  * @param {Object} str
 10800  */
 10801 function __trim__( str ){
 10802     return (str || "").replace( /^\s+|\s+$/g, "" );
 10803 }
 10804 
 10805 /*
 10806  * Interface DocumentStyle (introduced in DOM Level 2)
 10807  * http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-StyleSheet-DocumentStyle
 10808  *
 10809  * interface DocumentStyle {
 10810  *   readonly attribute StyleSheetList   styleSheets;
 10811  * };
 10812  *
 10813  */
 10814 __extend__(Document.prototype, {
 10815     get styleSheets() {
 10816         if (! this._styleSheets) {
 10817             this._styleSheets = new StyleSheetList();
 10818         }
 10819         return this._styleSheets;
 10820     }
 10821 });
 10822 /*
 10823  * CSS2Properties - DOM Level 2 CSS
 10824  * Renamed to CSSStyleDeclaration??
 10825  */
 10826 
 10827 var __toCamelCase__ = function(name) {
 10828     if (name) {
 10829         return name.replace(/\-(\w)/g, function(all, letter) {
 10830             return letter.toUpperCase();
 10831         });
 10832     }
 10833     return name;
 10834 };
 10835 
 10836 var __toDashed__ = function(camelCaseName) {
 10837     if (camelCaseName) {
 10838         return camelCaseName.replace(/[A-Z]/g, function(all) {
 10839             return '-' + all.toLowerCase();
 10840         });
 10841     }
 10842     return camelCaseName;
 10843 };
 10844 
 10845 CSS2Properties = function(element){
 10846     //console.log('css2properties %s', __cssproperties__++);
 10847     this.styleIndex = __supportedStyles__;//non-standard
 10848     this.type = element.tagName;//non-standard
 10849     __setArray__(this, []);
 10850     __cssTextToStyles__(this, element.cssText || '');
 10851 };
 10852 __extend__(CSS2Properties.prototype, {
 10853     get cssText() {
 10854         var i, css = [];
 10855         for (i = 0; i < this.length; ++i) {
 10856             css.push(this[i] + ': ' + this.getPropertyValue(this[i]) + ';');
 10857         }
 10858         return css.join(' ');
 10859     },
 10860     set cssText(cssText) {
 10861         __cssTextToStyles__(this, cssText);
 10862     },
 10863     getPropertyCSSValue: function(name) {
 10864         //?
 10865     },
 10866     getPropertyPriority: function() {
 10867 
 10868     },
 10869     getPropertyValue: function(name) {
 10870         var index, cname = __toCamelCase__(name);
 10871         if (cname in this.styleIndex) {
 10872             return this[cname];
 10873         } else {
 10874             index = Array.prototype.indexOf.apply(this, [name]);
 10875             if (index > -1) {
 10876                 return this[index];
 10877             }
 10878         }
 10879         return null;
 10880     },
 10881     item: function(index) {
 10882         return this[index];
 10883     },
 10884     removeProperty: function(name) {
 10885         this.styleIndex[name] = null;
 10886         name = __toDashed__(name);
 10887         var index = Array.prototype.indexOf.apply(this, [name]);
 10888         if (index > -1) {
 10889             Array.prototype.splice.apply(this, [1,index]);
 10890         }
 10891     },
 10892     setProperty: function(name, value, priority) {
 10893         var nval;
 10894         name = __toCamelCase__(name);
 10895         if (value !== undefined && name in this.styleIndex) {
 10896             // NOTE:  parseFloat('300px') ==> 300  no
 10897             // NOTE:  Number('300px') ==> Nan      yes
 10898             nval = Number(value);
 10899             this.styleIndex[name] = isNaN(nval) ? value : nval;
 10900             name = __toDashed__(name);
 10901             if (Array.prototype.indexOf.apply(this, [name]) === -1 ){
 10902                 Array.prototype.push.apply(this,[name]);
 10903             }
 10904         }
 10905     },
 10906     toString: function() {
 10907         return '[object CSS2Properties]';
 10908     }
 10909 });
 10910 
 10911 
 10912 
 10913 var __cssTextToStyles__ = function(css2props, cssText) {
 10914     //console.log('__cssTextToStyles__ %s %s', css2props, cssText);
 10915     //var styleArray=[];
 10916     var i, style, styles = cssText.split(';');
 10917     for (i = 0; i < styles.length; ++i) {
 10918         style = styles[i].split(':');
 10919         if (style.length === 2) {
 10920             css2props.setProperty(style[0].replace(' ', '', 'g'),
 10921                                   style[1].replace(' ', '', 'g'));
 10922         }
 10923     }
 10924 };
 10925 
 10926 //Obviously these arent all supported but by commenting out various
 10927 //sections this provides a single location to configure what is
 10928 //exposed as supported.
 10929 var __supportedStyles__ = {
 10930     azimuth:                null,
 10931     background:             null,
 10932     backgroundAttachment:   null,
 10933     backgroundColor:        'rgb(0,0,0)',
 10934     backgroundImage:        null,
 10935     backgroundPosition:     null,
 10936     backgroundRepeat:       null,
 10937     border:                 null,
 10938     borderBottom:           null,
 10939     borderBottomColor:      null,
 10940     borderBottomStyle:      null,
 10941     borderBottomWidth:      null,
 10942     borderCollapse:         null,
 10943     borderColor:            null,
 10944     borderLeft:             null,
 10945     borderLeftColor:        null,
 10946     borderLeftStyle:        null,
 10947     borderLeftWidth:        null,
 10948     borderRight:            null,
 10949     borderRightColor:       null,
 10950     borderRightStyle:       null,
 10951     borderRightWidth:       null,
 10952     borderSpacing:          null,
 10953     borderStyle:            null,
 10954     borderTop:              null,
 10955     borderTopColor:         null,
 10956     borderTopStyle:         null,
 10957     borderTopWidth:         null,
 10958     borderWidth:            null,
 10959     bottom:                 null,
 10960     captionSide:            null,
 10961     clear:                  null,
 10962     clip:                   null,
 10963     color:                  null,
 10964     content:                null,
 10965     counterIncrement:       null,
 10966     counterReset:           null,
 10967     cssFloat:               null,
 10968     cue:                    null,
 10969     cueAfter:               null,
 10970     cueBefore:              null,
 10971     cursor:                 null,
 10972     direction:              'ltr',
 10973     display:                null,
 10974     elevation:              null,
 10975     emptyCells:             null,
 10976     font:                   null,
 10977     fontFamily:             null,
 10978     fontSize:               '1em',
 10979     fontSizeAdjust:         null,
 10980     fontStretch:            null,
 10981     fontStyle:              null,
 10982     fontVariant:            null,
 10983     fontWeight:             null,
 10984     height:                 '',
 10985     left:                   null,
 10986     letterSpacing:          null,
 10987     lineHeight:             null,
 10988     listStyle:              null,
 10989     listStyleImage:         null,
 10990     listStylePosition:      null,
 10991     listStyleType:          null,
 10992     margin:                 null,
 10993     marginBottom:           '0px',
 10994     marginLeft:             '0px',
 10995     marginRight:            '0px',
 10996     marginTop:              '0px',
 10997     markerOffset:           null,
 10998     marks:                  null,
 10999     maxHeight:              null,
 11000     maxWidth:               null,
 11001     minHeight:              null,
 11002     minWidth:               null,
 11003     opacity:                1,
 11004     orphans:                null,
 11005     outline:                null,
 11006     outlineColor:           null,
 11007     outlineOffset:          null,
 11008     outlineStyle:           null,
 11009     outlineWidth:           null,
 11010     overflow:               null,
 11011     overflowX:              null,
 11012     overflowY:              null,
 11013     padding:                null,
 11014     paddingBottom:          '0px',
 11015     paddingLeft:            '0px',
 11016     paddingRight:           '0px',
 11017     paddingTop:             '0px',
 11018     page:                   null,
 11019     pageBreakAfter:         null,
 11020     pageBreakBefore:        null,
 11021     pageBreakInside:        null,
 11022     pause:                  null,
 11023     pauseAfter:             null,
 11024     pauseBefore:            null,
 11025     pitch:                  null,
 11026     pitchRange:             null,
 11027     position:               null,
 11028     quotes:                 null,
 11029     richness:               null,
 11030     right:                  null,
 11031     size:                   null,
 11032     speak:                  null,
 11033     speakHeader:            null,
 11034     speakNumeral:           null,
 11035     speakPunctuation:       null,
 11036     speechRate:             null,
 11037     stress:                 null,
 11038     tableLayout:            null,
 11039     textAlign:              null,
 11040     textDecoration:         null,
 11041     textIndent:             null,
 11042     textShadow:             null,
 11043     textTransform:          null,
 11044     top:                    null,
 11045     unicodeBidi:            null,
 11046     verticalAlign:          null,
 11047     visibility:             '',
 11048     voiceFamily:            null,
 11049     volume:                 null,
 11050     whiteSpace:             null,
 11051     widows:                 null,
 11052     width:                  '1px',
 11053     wordSpacing:            null,
 11054     zIndex:                 1
 11055 };
 11056 
 11057 var __displayMap__ = {
 11058     DIV      : 'block',
 11059     P        : 'block',
 11060     A        : 'inline',
 11061     CODE     : 'inline',
 11062     PRE      : 'block',
 11063     SPAN     : 'inline',
 11064     TABLE    : 'table',
 11065     THEAD    : 'table-header-group',
 11066     TBODY    : 'table-row-group',
 11067     TR       : 'table-row',
 11068     TH       : 'table-cell',
 11069     TD       : 'table-cell',
 11070     UL       : 'block',
 11071     LI       : 'list-item'
 11072 };
 11073 
 11074 for (var style in __supportedStyles__) {
 11075     if (__supportedStyles__.hasOwnProperty(style)) {
 11076         (function(name) {
 11077             if (name === 'width' || name === 'height') {
 11078                 CSS2Properties.prototype.__defineGetter__(name, function() {
 11079                     if (this.display === 'none'){
 11080                         return '0px';
 11081                     }
 11082                     return this.styleIndex[name];
 11083                 });
 11084             } else if (name === 'display') {
 11085                 //display will be set to a tagName specific value if ''
 11086                 CSS2Properties.prototype.__defineGetter__(name, function() {
 11087                     var val = this.styleIndex[name];
 11088                     val = val ? val :__displayMap__[this.type];
 11089                     return val;
 11090                 });
 11091             } else {
 11092                 CSS2Properties.prototype.__defineGetter__(name, function() {
 11093                     return this.styleIndex[name];
 11094                 });
 11095             }
 11096             CSS2Properties.prototype.__defineSetter__(name, function(value) {
 11097                 this.setProperty(name, value);
 11098             });
 11099         }(style));
 11100     }
 11101 }
 11102 
 11103 /*
 11104  * CSSRule - DOM Level 2
 11105  */
 11106 CSSRule = function(options) {
 11107 
 11108 
 11109 
 11110     var $style,
 11111     $selectorText = options.selectorText ? options.selectorText : '';
 11112     $style = new CSS2Properties({
 11113         cssText: options.cssText ? options.cssText : null
 11114     });
 11115 
 11116     return __extend__(this, {
 11117         get style(){
 11118             return $style;
 11119         },
 11120         get selectorText(){
 11121             return $selectorText;
 11122         },
 11123         set selectorText(selectorText){
 11124             $selectorText = selectorText;
 11125         },
 11126         toString : function(){
 11127             return "[object CSSRule]";
 11128         }
 11129     });
 11130 };
 11131 CSSRule.STYLE_RULE     =  1;
 11132 CSSRule.IMPORT_RULE    =  3;
 11133 CSSRule.MEDIA_RULE     =  4;
 11134 CSSRule.FONT_FACE_RULE =  5;
 11135 CSSRule.PAGE_RULE      =  6;
 11136 //CSSRule.NAMESPACE_RULE = 10;
 11137 
 11138 
 11139 CSSStyleRule = function() {
 11140 
 11141 };
 11142 
 11143 CSSImportRule = function() {
 11144 
 11145 };
 11146 
 11147 CSSMediaRule = function() {
 11148 
 11149 };
 11150 
 11151 CSSFontFaceRule = function() {
 11152 
 11153 };
 11154 
 11155 CSSPageRule = function() {
 11156 
 11157 };
 11158 
 11159 
 11160 CSSRuleList = function(data) {
 11161     this.length = 0;
 11162     __setArray__(this, data);
 11163 };
 11164 
 11165 __extend__(CSSRuleList.prototype, {
 11166     item : function(index) {
 11167         if ((index >= 0) && (index < this.length)) {
 11168             // bounds check
 11169             return this[index];
 11170         }
 11171         return null;
 11172     },
 11173     toString: function() {
 11174         return '[object CSSRuleList]';
 11175     }
 11176 });
 11177 
 11178 /**
 11179  * StyleSheet
 11180  * http://dev.w3.org/csswg/cssom/#stylesheet
 11181  *
 11182  * interface StyleSheet {
 11183  *   readonly attribute DOMString type;
 11184  *   readonly attribute DOMString href;
 11185  *   readonly attribute Node ownerNode;
 11186  *   readonly attribute StyleSheet parentStyleSheet;
 11187  *   readonly attribute DOMString title;
 11188  *   [PutForwards=mediaText] readonly attribute MediaList media;
 11189  *          attribute boolean disabled;
 11190  * };
 11191  */
 11192 StyleSheet = function() {
 11193 }
 11194 
 11195 /*
 11196  * CSSStyleSheet
 11197  * http://dev.w3.org/csswg/cssom/#cssstylesheet
 11198  *
 11199  * interface CSSStyleSheet : StyleSheet {
 11200  *   readonly attribute CSSRule ownerRule;
 11201  *   readonly attribute CSSRuleList cssRules;
 11202  *   unsigned long insertRule(DOMString rule, unsigned long index);
 11203  *   void deleteRule(unsigned long index);
 11204  * };
 11205  */
 11206 CSSStyleSheet = function(options){
 11207     var $cssRules,
 11208         $disabled = options.disabled ? options.disabled : false,
 11209         $href = options.href ? options.href : null,
 11210         $parentStyleSheet = options.parentStyleSheet ? options.parentStyleSheet : null,
 11211         $title = options.title ? options.title : "",
 11212         $type = "text/css";
 11213 
 11214     function parseStyleSheet(text){
 11215         //$debug("parsing css");
 11216         //this is pretty ugly, but text is the entire text of a stylesheet
 11217         var cssRules = [];
 11218         if (!text) {
 11219             text = '';
 11220         }
 11221         text = __trim__(text.replace(/\/\*(\r|\n|.)*\*\//g,""));
 11222         // TODO: @import
 11223         var blocks = text.split("}");
 11224         blocks.pop();
 11225         var i, j, len = blocks.length;
 11226         var definition_block, properties, selectors;
 11227         for (i=0; i<len; i++) {
 11228             definition_block = blocks[i].split("{");
 11229             if (definition_block.length === 2) {
 11230                 selectors = definition_block[0].split(",");
 11231                 for (j=0; j<selectors.length; j++) {
 11232                     cssRules.push(new CSSRule({
 11233                         selectorText : __trim__(selectors[j]),
 11234                         cssText      : definition_block[1]
 11235                     }));
 11236                 }
 11237             }
 11238         }
 11239         return cssRules;
 11240     }
 11241 
 11242     $cssRules = new CSSRuleList(parseStyleSheet(options.textContent));
 11243 
 11244     return __extend__(this, {
 11245         get cssRules(){
 11246             return $cssRules;
 11247         },
 11248         get rule(){
 11249             return $cssRules;
 11250         },//IE - may be deprecated
 11251         get href(){
 11252             return $href;
 11253         },
 11254         get parentStyleSheet(){
 11255             return $parentStyleSheet;
 11256         },
 11257         get title(){
 11258             return $title;
 11259         },
 11260         get type(){
 11261             return $type;
 11262         },
 11263         addRule: function(selector, style, index){/*TODO*/},
 11264         deleteRule: function(index){/*TODO*/},
 11265         insertRule: function(rule, index){/*TODO*/},
 11266         //IE - may be deprecated
 11267         removeRule: function(index){
 11268             this.deleteRule(index);
 11269         }
 11270     });
 11271 };
 11272 
 11273 StyleSheetList = function() {
 11274 }
 11275 StyleSheetList.prototype = new Array();
 11276 __extend__(StyleSheetList.prototype, {
 11277     item : function(index) {
 11278         if ((index >= 0) && (index < this.length)) {
 11279             // bounds check
 11280             return this[index];
 11281         }
 11282         return null;
 11283     },
 11284     toString: function() {
 11285         return '[object StyleSheetList]';
 11286     }
 11287 });
 11288 /**
 11289  * This extends HTMLElement to handle CSS-specific interfaces.
 11290  *
 11291  * More work / research would be needed to extend just (DOM) Element
 11292  * for xml use and additional changes for just HTMLElement.
 11293  */
 11294 
 11295 
 11296 /**
 11297  * Replace or add  the getter for 'style'
 11298  *
 11299  * This could be wrapped in a closure
 11300  */
 11301 var $css2properties = [{}];
 11302 
 11303 __extend__(HTMLElement.prototype, {
 11304     get style(){
 11305         if ( !this.css2uuid ) {
 11306             this.css2uuid = $css2properties.length;
 11307             $css2properties[this.css2uuid] = new CSS2Properties(this);
 11308         }
 11309         return $css2properties[this.css2uuid];
 11310     },
 11311 });
 11312 
 11313 /**
 11314  * Change for how 'setAttribute("style", ...)' works
 11315  *
 11316  * We are truly adding functionality to HtmlElement.setAttribute, not
 11317  * replacing it.  So we need to save the old one first, call it, then
 11318  * do our stuff.  If we need to do more hacks like this, HTMLElement
 11319  * (or regular Element) needs to have a hooks array or dispatch table
 11320  * for global changes.
 11321  *
 11322  * This could be wrapped in a closure if desired.
 11323  */
 11324 var updateCss2Props = function(elem, values) {
 11325     //console.log('__updateCss2Props__ %s %s', elem, values);
 11326     if ( !elem.css2uuid ) {
 11327         elem.css2uuid = $css2properties.length;
 11328         $css2properties[elem.css2uuid] = new CSS2Properties(elem);
 11329     }
 11330     __cssTextToStyles__($css2properties[elem.css2uuid], values);
 11331 }
 11332 
 11333 var origSetAttribute =  HTMLElement.prototype.setAttribute;
 11334 
 11335 HTMLElement.prototype.setAttribute = function(name, value) {
 11336     //console.log("CSS set attribute: " + name + ", " + value);
 11337     origSetAttribute.apply(this, arguments);
 11338     if (name === "style") {
 11339         updateCss2Props(this, value);
 11340     }
 11341 }
 11342 
 11343 /**
 11344  * @author john resig & the envjs team
 11345  * @uri http://www.envjs.com/
 11346  * @copyright 2008-2010
 11347  * @license MIT
 11348  */
 11349 //CLOSURE_END
 11350 }());
 11351 
 11352 //these are both non-standard globals that
 11353 //provide static namespaces and functions
 11354 //to support the html 5 parser from nu.
 11355 var XMLParser = {},
 11356     HTMLParser = {};
 11357 
 11358     
 11359 /*
 11360  * Envjs parser.1.2.13 
 11361  * Pure JavaScript Browser Environment
 11362  * By John Resig <http://ejohn.org/> and the Envjs Team
 11363  * Copyright 2008-2010 John Resig, under the MIT License
 11364  */
 11365 
 11366 //CLOSURE_START
 11367 (function(){
 11368 
 11369 
 11370 
 11371 
 11372 
 11373 /**
 11374  * @author john resig
 11375  */
 11376 // Helper method for extending one object with another.
 11377 function __extend__(a,b) {
 11378     for ( var i in b ) {
 11379         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
 11380         if ( g || s ) {
 11381             if ( g ) { a.__defineGetter__(i, g); }
 11382             if ( s ) { a.__defineSetter__(i, s); }
 11383         } else {
 11384             a[i] = b[i];
 11385         }
 11386     } return a;
 11387 }
 11388 
 11389 /**
 11390  * @author john resig
 11391  */
 11392 //from jQuery
 11393 function __setArray__( target, array ) {
 11394     // Resetting the length to 0, then using the native Array push
 11395     // is a super-fast way to populate an object with array-like properties
 11396     target.length = 0;
 11397     Array.prototype.push.apply( target, array );
 11398 }
 11399 var __defineParser__;
 11400 (function () {var $gwt_version = "1.5.1";var $wnd = {};var $doc = {};var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var _, N8000000000000000_longLit = [0, -9223372036854775808], P1000000_longLit = [16777216, 0], P7fffffffffffffff_longLit = [4294967295, 9223372032559808512];
 11401 function equals_1(other){
 11402   return (this == null?null:this) === (other == null?null:other);
 11403 }
 11404 
 11405 function getClass_13(){
 11406   return Ljava_lang_Object_2_classLit;
 11407 }
 11408 
 11409 function hashCode_2(){
 11410   return this.$H || (this.$H = ++sNextHashId);
 11411 }
 11412 
 11413 function toString_3(){
 11414   return (this.typeMarker$ == nullMethod || this.typeId$ == 2?this.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName + '@' + toPowerOfTwoString(this.typeMarker$ == nullMethod || this.typeId$ == 2?this.hashCode$():this.$H || (this.$H = ++sNextHashId), 4);
 11415 }
 11416 
 11417 function Object_0(){
 11418 }
 11419 
 11420 _ = Object_0.prototype = {};
 11421 _.equals$ = equals_1;
 11422 _.getClass$ = getClass_13;
 11423 _.hashCode$ = hashCode_2;
 11424 _.toString$ = toString_3;
 11425 _.toString = function(){
 11426   return this.toString$();
 11427 }
 11428 ;
 11429 _.typeMarker$ = nullMethod;
 11430 _.typeId$ = 1;
 11431 function $toString_1(this$static){
 11432   var className, msg;
 11433   className = this$static.getClass$().typeName;
 11434   msg = this$static.getMessage();
 11435   if (msg != null) {
 11436     return className + ': ' + msg;
 11437   }
 11438    else {
 11439     return className;
 11440   }
 11441 }
 11442 
 11443 function getClass_19(){
 11444   return Ljava_lang_Throwable_2_classLit;
 11445 }
 11446 
 11447 function getMessage(){
 11448   return this.detailMessage;
 11449 }
 11450 
 11451 function toString_7(){
 11452   return $toString_1(this);
 11453 }
 11454 
 11455 function Throwable(){
 11456 }
 11457 
 11458 _ = Throwable.prototype = new Object_0();
 11459 _.getClass$ = getClass_19;
 11460 _.getMessage = getMessage;
 11461 _.toString$ = toString_7;
 11462 _.typeId$ = 3;
 11463 _.detailMessage = null;
 11464 function $Exception(this$static, message){
 11465   this$static.detailMessage = message;
 11466   return this$static;
 11467 }
 11468 
 11469 function getClass_9(){
 11470   return Ljava_lang_Exception_2_classLit;
 11471 }
 11472 
 11473 function Exception(){
 11474 }
 11475 
 11476 _ = Exception.prototype = new Throwable();
 11477 _.getClass$ = getClass_9;
 11478 _.typeId$ = 4;
 11479 function $RuntimeException(this$static, message){
 11480   this$static.detailMessage = message;
 11481   return this$static;
 11482 }
 11483 
 11484 function getClass_14(){
 11485   return Ljava_lang_RuntimeException_2_classLit;
 11486 }
 11487 
 11488 function RuntimeException(){
 11489 }
 11490 
 11491 _ = RuntimeException.prototype = new Exception();
 11492 _.getClass$ = getClass_14;
 11493 _.typeId$ = 5;
 11494 function $JavaScriptException(this$static, e){
 11495   $Exception(this$static, '(' + getName(e) + '): ' + getDescription(e) + (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)?getProperties0(dynamicCastJso(e)):''));
 11496   getName(e);
 11497   getDescription(e);
 11498   getException(e);
 11499   return this$static;
 11500 }
 11501 
 11502 function getClass_0(){
 11503   return Lcom_google_gwt_core_client_JavaScriptException_2_classLit;
 11504 }
 11505 
 11506 function getDescription(e){
 11507   if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
 11508     return getDescription0(dynamicCastJso(e));
 11509   }
 11510    else {
 11511     return e + '';
 11512   }
 11513 }
 11514 
 11515 function getDescription0(e){
 11516   return e == null?null:e.message;
 11517 }
 11518 
 11519 function getException(e){
 11520   if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
 11521     return dynamicCastJso(e);
 11522   }
 11523    else {
 11524     return null;
 11525   }
 11526 }
 11527 
 11528 function getName(e){
 11529   if (e == null) {
 11530     return 'null';
 11531   }
 11532    else if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
 11533     return getName0(dynamicCastJso(e));
 11534   }
 11535    else if (e != null && canCast(e.typeId$, 1)) {
 11536     return 'String';
 11537   }
 11538    else {
 11539     return (e.typeMarker$ == nullMethod || e.typeId$ == 2?e.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
 11540   }
 11541 }
 11542 
 11543 function getName0(e){
 11544   return e == null?null:e.name;
 11545 }
 11546 
 11547 function getProperties0(e){
 11548   var result = '';
 11549   for (prop in e) {
 11550     if (prop != 'name' && prop != 'message') {
 11551       result += '\n ' + prop + ': ' + e[prop];
 11552     }
 11553   }
 11554   return result;
 11555 }
 11556 
 11557 function JavaScriptException(){
 11558 }
 11559 
 11560 _ = JavaScriptException.prototype = new RuntimeException();
 11561 _.getClass$ = getClass_0;
 11562 _.typeId$ = 6;
 11563 function createFunction(){
 11564   return function(){
 11565   }
 11566   ;
 11567 }
 11568 
 11569 function equals__devirtual$(this$static, other){
 11570   return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.equals$(other):(this$static == null?null:this$static) === (other == null?null:other);
 11571 }
 11572 
 11573 function hashCode__devirtual$(this$static){
 11574   return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.hashCode$():this$static.$H || (this$static.$H = ++sNextHashId);
 11575 }
 11576 
 11577 var sNextHashId = 0;
 11578 function createFromSeed(seedType, length){
 11579   var seedArray = [null, 0, false, [0, 0]];
 11580   var value = seedArray[seedType];
 11581   var array = new Array(length);
 11582   for (var i = 0; i < length; ++i) {
 11583     array[i] = value;
 11584   }
 11585   return array;
 11586 }
 11587 
 11588 function getClass_2(){
 11589   return this.arrayClass$;
 11590 }
 11591 
 11592 function initDim(arrayClass, typeId, queryId, length, seedType){
 11593   var result;
 11594   result = createFromSeed(seedType, length);
 11595   initValues(arrayClass, typeId, queryId, result);
 11596   return result;
 11597 }
 11598 
 11599 function initValues(arrayClass, typeId, queryId, array){
 11600   if (!protoTypeArray_0) {
 11601     protoTypeArray_0 = new Array_0();
 11602   }
 11603   wrapArray(array, protoTypeArray_0);
 11604   array.arrayClass$ = arrayClass;
 11605   array.typeId$ = typeId;
 11606   array.queryId$ = queryId;
 11607   return array;
 11608 }
 11609 
 11610 function setCheck(array, index, value){
 11611   if (value != null) {
 11612     if (array.queryId$ > 0 && !canCastUnsafe(value.typeId$, array.queryId$)) {
 11613       throw new ArrayStoreException();
 11614     }
 11615     if (array.queryId$ < 0 && (value.typeMarker$ == nullMethod || value.typeId$ == 2)) {
 11616       throw new ArrayStoreException();
 11617     }
 11618   }
 11619   return array[index] = value;
 11620 }
 11621 
 11622 function wrapArray(array, protoTypeArray){
 11623   for (var i in protoTypeArray) {
 11624     var toCopy = protoTypeArray[i];
 11625     if (toCopy) {
 11626       array[i] = toCopy;
 11627     }
 11628   }
 11629   return array;
 11630 }
 11631 
 11632 function Array_0(){
 11633 }
 11634 
 11635 _ = Array_0.prototype = new Object_0();
 11636 _.getClass$ = getClass_2;
 11637 _.typeId$ = 0;
 11638 _.arrayClass$ = null;
 11639 _.length = 0;
 11640 _.queryId$ = 0;
 11641 var protoTypeArray_0 = null;
 11642 function canCast(srcId, dstId){
 11643   return srcId && !!typeIdArray[srcId][dstId];
 11644 }
 11645 
 11646 function canCastUnsafe(srcId, dstId){
 11647   return srcId && typeIdArray[srcId][dstId];
 11648 }
 11649 
 11650 function dynamicCast(src, dstId){
 11651   if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
 11652     throw new ClassCastException();
 11653   }
 11654   return src;
 11655 }
 11656 
 11657 function dynamicCastJso(src){
 11658   if (src != null && (src.typeMarker$ == nullMethod || src.typeId$ == 2)) {
 11659     throw new ClassCastException();
 11660   }
 11661   return src;
 11662 }
 11663 
 11664 function instanceOf(src, dstId){
 11665   return src != null && canCast(src.typeId$, dstId);
 11666 }
 11667 
 11668 var typeIdArray = [{}, {}, {1:1, 6:1, 7:1, 8:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1, 19:1}, {4:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {6:1, 8:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {7:1}, {7:1}, {2:1, 6:1}, {2:1, 6:1}, {18:1}, {14:1}, {14:1}, {14:1}, {15:1}, {15:1}, {6:1, 15:1}, {6:1, 16:1}, {6:1, 15:1}, {2:1, 6:1, 17:1}, {6:1, 8:1}, {6:1, 8:1}, {6:1, 8:1}, {20:1}, {3:1}, {9:1}, {10:1}, {11:1}, {21:1}, {2:1, 6:1, 22:1}, {2:1, 6:1, 22:1}, {12:1}, {13:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}];
 11669 function caught(e){
 11670   if (e != null && canCast(e.typeId$, 2)) {
 11671     return e;
 11672   }
 11673   return $JavaScriptException(new JavaScriptException(), e);
 11674 }
 11675 
 11676 function create(valueLow, valueHigh){
 11677   var diffHigh, diffLow;
 11678   valueHigh %= 1.8446744073709552E19;
 11679   valueLow %= 1.8446744073709552E19;
 11680   diffHigh = valueHigh % 4294967296;
 11681   diffLow = Math.floor(valueLow / 4294967296) * 4294967296;
 11682   valueHigh = valueHigh - diffHigh + diffLow;
 11683   valueLow = valueLow - diffLow + diffHigh;
 11684   while (valueLow < 0) {
 11685     valueLow += 4294967296;
 11686     valueHigh -= 4294967296;
 11687   }
 11688   while (valueLow > 4294967295) {
 11689     valueLow -= 4294967296;
 11690     valueHigh += 4294967296;
 11691   }
 11692   valueHigh = valueHigh % 1.8446744073709552E19;
 11693   while (valueHigh > 9223372032559808512) {
 11694     valueHigh -= 1.8446744073709552E19;
 11695   }
 11696   while (valueHigh < -9223372036854775808) {
 11697     valueHigh += 1.8446744073709552E19;
 11698   }
 11699   return [valueLow, valueHigh];
 11700 }
 11701 
 11702 function fromDouble(value){
 11703   if (isNaN(value)) {
 11704     return $clinit_7() , ZERO;
 11705   }
 11706   if (value < -9223372036854775808) {
 11707     return $clinit_7() , MIN_VALUE;
 11708   }
 11709   if (value >= 9223372036854775807) {
 11710     return $clinit_7() , MAX_VALUE;
 11711   }
 11712   if (value > 0) {
 11713     return create(Math.floor(value), 0);
 11714   }
 11715    else {
 11716     return create(Math.ceil(value), 0);
 11717   }
 11718 }
 11719 
 11720 function fromInt(value){
 11721   var rebase, result;
 11722   if (value > -129 && value < 128) {
 11723     rebase = value + 128;
 11724     result = ($clinit_6() , boxedValues)[rebase];
 11725     if (result == null) {
 11726       result = boxedValues[rebase] = internalFromInt(value);
 11727     }
 11728     return result;
 11729   }
 11730   return internalFromInt(value);
 11731 }
 11732 
 11733 function internalFromInt(value){
 11734   if (value >= 0) {
 11735     return [value, 0];
 11736   }
 11737    else {
 11738     return [value + 4294967296, -4294967296];
 11739   }
 11740 }
 11741 
 11742 function $clinit_6(){
 11743   $clinit_6 = nullMethod;
 11744   boxedValues = initDim(_3_3D_classLit, 53, 13, 256, 0);
 11745 }
 11746 
 11747 var boxedValues;
 11748 function $clinit_7(){
 11749   $clinit_7 = nullMethod;
 11750   Math.log(2);
 11751   MAX_VALUE = P7fffffffffffffff_longLit;
 11752   MIN_VALUE = N8000000000000000_longLit;
 11753   fromInt(-1);
 11754   fromInt(1);
 11755   fromInt(2);
 11756   ZERO = fromInt(0);
 11757 }
 11758 
 11759 var MAX_VALUE, MIN_VALUE, ZERO;
 11760 function $clinit_12(){
 11761   $clinit_12 = nullMethod;
 11762   timers = $ArrayList(new ArrayList());
 11763   addWindowCloseListener(new Timer$1());
 11764 }
 11765 
 11766 function $cancel(this$static){
 11767   if (this$static.isRepeating) {
 11768     clearInterval(this$static.timerId);
 11769   }
 11770    else {
 11771     clearTimeout(this$static.timerId);
 11772   }
 11773   $remove_0(timers, this$static);
 11774 }
 11775 
 11776 function $fireImpl(this$static){
 11777   if (!this$static.isRepeating) {
 11778     $remove_0(timers, this$static);
 11779   }
 11780   $run(this$static);
 11781 }
 11782 
 11783 function $schedule(this$static, delayMillis){
 11784   if (delayMillis <= 0) {
 11785     throw $IllegalArgumentException(new IllegalArgumentException(), 'must be positive');
 11786   }
 11787   $cancel(this$static);
 11788   this$static.isRepeating = false;
 11789   this$static.timerId = createTimeout(this$static, delayMillis);
 11790   $add(timers, this$static);
 11791 }
 11792 
 11793 function createTimeout(timer, delay){
 11794   return setTimeout(function(){
 11795     timer.fire();
 11796   }
 11797   , delay);
 11798 }
 11799 
 11800 function fire(){
 11801   $fireImpl(this);
 11802 }
 11803 
 11804 function getClass_4(){
 11805   return Lcom_google_gwt_user_client_Timer_2_classLit;
 11806 }
 11807 
 11808 function Timer(){
 11809 }
 11810 
 11811 _ = Timer.prototype = new Object_0();
 11812 _.fire = fire;
 11813 _.getClass$ = getClass_4;
 11814 _.typeId$ = 0;
 11815 _.isRepeating = false;
 11816 _.timerId = 0;
 11817 var timers;
 11818 function $onWindowClosed(){
 11819   while (($clinit_12() , timers).size > 0) {
 11820     $cancel(dynamicCast($get_0(timers, 0), 3));
 11821   }
 11822 }
 11823 
 11824 function getClass_3(){
 11825   return Lcom_google_gwt_user_client_Timer$1_2_classLit;
 11826 }
 11827 
 11828 function Timer$1(){
 11829 }
 11830 
 11831 _ = Timer$1.prototype = new Object_0();
 11832 _.getClass$ = getClass_3;
 11833 _.typeId$ = 7;
 11834 function addWindowCloseListener(listener){
 11835   maybeInitializeHandlers();
 11836   if (!closingListeners) {
 11837     closingListeners = $ArrayList(new ArrayList());
 11838   }
 11839   $add(closingListeners, listener);
 11840 }
 11841 
 11842 function fireClosedImpl(){
 11843   var listener$iterator;
 11844   if (closingListeners) {
 11845     for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
 11846       dynamicCast($next(listener$iterator), 4);
 11847       $onWindowClosed();
 11848     }
 11849   }
 11850 }
 11851 
 11852 function fireClosingImpl(){
 11853   var listener$iterator, ret;
 11854   ret = null;
 11855   if (closingListeners) {
 11856     for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
 11857       dynamicCast($next(listener$iterator), 4);
 11858       ret = null;
 11859     }
 11860   }
 11861   return ret;
 11862 }
 11863 
 11864 function __init__xxx__(){
 11865   __gwt_initHandlers(function(){
 11866   }
 11867   , function(){
 11868     return fireClosingImpl();
 11869   }
 11870   , function(){
 11871     fireClosedImpl();
 11872   }
 11873   );
 11874 }
 11875 
 11876 function maybeInitializeHandlers(){
 11877   if (!handlersAreInitialized) {
 11878     // __init__xxx__();
 11879     handlersAreInitialized = true;
 11880   }
 11881 }
 11882 
 11883 var closingListeners = null, handlersAreInitialized = false;
 11884 function $ArrayStoreException(this$static, message){
 11885   this$static.detailMessage = message;
 11886   return this$static;
 11887 }
 11888 
 11889 function getClass_5(){
 11890   return Ljava_lang_ArrayStoreException_2_classLit;
 11891 }
 11892 
 11893 function ArrayStoreException(){
 11894 }
 11895 
 11896 _ = ArrayStoreException.prototype = new RuntimeException();
 11897 _.getClass$ = getClass_5;
 11898 _.typeId$ = 9;
 11899 function createForArray(packageName, className){
 11900   var clazz;
 11901   clazz = new Class();
 11902   clazz.typeName = packageName + className;
 11903   clazz.modifiers = 4;
 11904   return clazz;
 11905 }
 11906 
 11907 function createForClass(packageName, className){
 11908   var clazz;
 11909   clazz = new Class();
 11910   clazz.typeName = packageName + className;
 11911   return clazz;
 11912 }
 11913 
 11914 function createForEnum(packageName, className){
 11915   var clazz;
 11916   clazz = new Class();
 11917   clazz.typeName = packageName + className;
 11918   clazz.modifiers = 8;
 11919   return clazz;
 11920 }
 11921 
 11922 function getClass_7(){
 11923   return Ljava_lang_Class_2_classLit;
 11924 }
 11925 
 11926 function toString_1(){
 11927   return ((this.modifiers & 2) != 0?'interface ':(this.modifiers & 1) != 0?'':'class ') + this.typeName;
 11928 }
 11929 
 11930 function Class(){
 11931 }
 11932 
 11933 _ = Class.prototype = new Object_0();
 11934 _.getClass$ = getClass_7;
 11935 _.toString$ = toString_1;
 11936 _.typeId$ = 0;
 11937 _.modifiers = 0;
 11938 _.typeName = null;
 11939 function getClass_6(){
 11940   return Ljava_lang_ClassCastException_2_classLit;
 11941 }
 11942 
 11943 function ClassCastException(){
 11944 }
 11945 
 11946 _ = ClassCastException.prototype = new RuntimeException();
 11947 _.getClass$ = getClass_6;
 11948 _.typeId$ = 12;
 11949 function compareTo(other){
 11950   return this.ordinal - other.ordinal;
 11951 }
 11952 
 11953 function equals_0(other){
 11954   return (this == null?null:this) === (other == null?null:other);
 11955 }
 11956 
 11957 function getClass_8(){
 11958   return Ljava_lang_Enum_2_classLit;
 11959 }
 11960 
 11961 function hashCode_1(){
 11962   return this.$H || (this.$H = ++sNextHashId);
 11963 }
 11964 
 11965 function toString_2(){
 11966   return this.name_0;
 11967 }
 11968 
 11969 function Enum(){
 11970 }
 11971 
 11972 _ = Enum.prototype = new Object_0();
 11973 _.compareTo$ = compareTo;
 11974 _.equals$ = equals_0;
 11975 _.getClass$ = getClass_8;
 11976 _.hashCode$ = hashCode_1;
 11977 _.toString$ = toString_2;
 11978 _.typeId$ = 13;
 11979 _.name_0 = null;
 11980 _.ordinal = 0;
 11981 function $IllegalArgumentException(this$static, message){
 11982   this$static.detailMessage = message;
 11983   return this$static;
 11984 }
 11985 
 11986 function getClass_10(){
 11987   return Ljava_lang_IllegalArgumentException_2_classLit;
 11988 }
 11989 
 11990 function IllegalArgumentException(){
 11991 }
 11992 
 11993 _ = IllegalArgumentException.prototype = new RuntimeException();
 11994 _.getClass$ = getClass_10;
 11995 _.typeId$ = 14;
 11996 function $IndexOutOfBoundsException(this$static, message){
 11997   this$static.detailMessage = message;
 11998   return this$static;
 11999 }
 12000 
 12001 function getClass_11(){
 12002   return Ljava_lang_IndexOutOfBoundsException_2_classLit;
 12003 }
 12004 
 12005 function IndexOutOfBoundsException(){
 12006 }
 12007 
 12008 _ = IndexOutOfBoundsException.prototype = new RuntimeException();
 12009 _.getClass$ = getClass_11;
 12010 _.typeId$ = 15;
 12011 function toPowerOfTwoString(value, shift){
 12012   var bitMask, buf, bufSize, pos;
 12013   bufSize = ~~(32 / shift);
 12014   bitMask = (1 << shift) - 1;
 12015   buf = initDim(_3C_classLit, 42, -1, bufSize, 1);
 12016   pos = bufSize - 1;
 12017   if (value >= 0) {
 12018     while (value > bitMask) {
 12019       buf[pos--] = ($clinit_31() , digits)[value & bitMask];
 12020       value >>= shift;
 12021     }
 12022   }
 12023    else {
 12024     while (pos > 0) {
 12025       buf[pos--] = ($clinit_31() , digits)[value & bitMask];
 12026       value >>= shift;
 12027     }
 12028   }
 12029   buf[pos] = ($clinit_31() , digits)[value & bitMask];
 12030   return __valueOf(buf, pos, bufSize);
 12031 }
 12032 
 12033 function getClass_12(){
 12034   return Ljava_lang_NullPointerException_2_classLit;
 12035 }
 12036 
 12037 function NullPointerException(){
 12038 }
 12039 
 12040 _ = NullPointerException.prototype = new RuntimeException();
 12041 _.getClass$ = getClass_12;
 12042 _.typeId$ = 16;
 12043 function $clinit_31(){
 12044   $clinit_31 = nullMethod;
 12045   digits = initValues(_3C_classLit, 42, -1, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122]);
 12046 }
 12047 
 12048 var digits;
 12049 function $equals_0(this$static, other){
 12050   if (!(other != null && canCast(other.typeId$, 1))) {
 12051     return false;
 12052   }
 12053   return String(this$static) == other;
 12054 }
 12055 
 12056 function $getChars_0(this$static, srcBegin, srcEnd, dst, dstBegin){
 12057   var srcIdx;
 12058   for (srcIdx = srcBegin; srcIdx < srcEnd; ++srcIdx) {
 12059     dst[dstBegin++] = this$static.charCodeAt(srcIdx);
 12060   }
 12061 }
 12062 
 12063 function $toCharArray(this$static){
 12064   var charArr, n;
 12065   n = this$static.length;
 12066   charArr = initDim(_3C_classLit, 42, -1, n, 1);
 12067   $getChars_0(this$static, 0, n, charArr, 0);
 12068   return charArr;
 12069 }
 12070 
 12071 function __checkBounds(legalCount, start, end){
 12072   if (start < 0) {
 12073     throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), start);
 12074   }
 12075   if (end < start) {
 12076     throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), end - start);
 12077   }
 12078   if (end > legalCount) {
 12079     throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), end);
 12080   }
 12081 }
 12082 
 12083 function __valueOf(x, start, end){
 12084   x = x.slice(start, end);
 12085   return String.fromCharCode.apply(null, x);
 12086 }
 12087 
 12088 function compareTo_1(thisStr, otherStr){
 12089   thisStr = String(thisStr);
 12090   if (thisStr == otherStr) {
 12091     return 0;
 12092   }
 12093   return thisStr < otherStr?-1:1;
 12094 }
 12095 
 12096 function compareTo_0(other){
 12097   return compareTo_1(this, other);
 12098 }
 12099 
 12100 function equals_2(other){
 12101   return $equals_0(this, other);
 12102 }
 12103 
 12104 function getClass_18(){
 12105   return Ljava_lang_String_2_classLit;
 12106 }
 12107 
 12108 function hashCode_3(){
 12109   return getHashCode_0(this);
 12110 }
 12111 
 12112 function toString_6(){
 12113   return this;
 12114 }
 12115 
 12116 function valueOf_1(x, offset, count){
 12117   var end;
 12118   end = offset + count;
 12119   __checkBounds(x.length, offset, end);
 12120   return __valueOf(x, offset, end);
 12121 }
 12122 
 12123 _ = String.prototype;
 12124 _.compareTo$ = compareTo_0;
 12125 _.equals$ = equals_2;
 12126 _.getClass$ = getClass_18;
 12127 _.hashCode$ = hashCode_3;
 12128 _.toString$ = toString_6;
 12129 _.typeId$ = 2;
 12130 function $clinit_35(){
 12131   $clinit_35 = nullMethod;
 12132   back = {};
 12133   front = {};
 12134 }
 12135 
 12136 function compute(str){
 12137   var hashCode, i, inc, n;
 12138   n = str.length;
 12139   inc = n < 64?1:~~(n / 32);
 12140   hashCode = 0;
 12141   for (i = 0; i < n; i += inc) {
 12142     hashCode <<= 1;
 12143     hashCode += str.charCodeAt(i);
 12144   }
 12145   hashCode |= 0;
 12146   return hashCode;
 12147 }
 12148 
 12149 function getHashCode_0(str){
 12150   $clinit_35();
 12151   var key = ':' + str;
 12152   var result = front[key];
 12153   if (result != null) {
 12154     return result;
 12155   }
 12156   result = back[key];
 12157   if (result == null) {
 12158     result = compute(str);
 12159   }
 12160   increment();
 12161   return front[key] = result;
 12162 }
 12163 
 12164 function increment(){
 12165   if (count_0 == 256) {
 12166     back = front;
 12167     front = {};
 12168     count_0 = 0;
 12169   }
 12170   ++count_0;
 12171 }
 12172 
 12173 var back, count_0 = 0, front;
 12174 function $StringBuffer(this$static){
 12175   this$static.builder = $StringBuilder(new StringBuilder());
 12176   return this$static;
 12177 }
 12178 
 12179 function $append(this$static, toAppend){
 12180   $append_0(this$static.builder, toAppend);
 12181   return this$static;
 12182 }
 12183 
 12184 function getClass_15(){
 12185   return Ljava_lang_StringBuffer_2_classLit;
 12186 }
 12187 
 12188 function toString_4(){
 12189   return $toString_0(this.builder);
 12190 }
 12191 
 12192 function StringBuffer(){
 12193 }
 12194 
 12195 _ = StringBuffer.prototype = new Object_0();
 12196 _.getClass$ = getClass_15;
 12197 _.toString$ = toString_4;
 12198 _.typeId$ = 17;
 12199 function $StringBuilder(this$static){
 12200   this$static.stringArray = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 0, 0);
 12201   return this$static;
 12202 }
 12203 
 12204 function $append_0(this$static, toAppend){
 12205   var appendLength;
 12206   if (toAppend == null) {
 12207     toAppend = 'null';
 12208   }
 12209   appendLength = toAppend.length;
 12210   if (appendLength > 0) {
 12211     this$static.stringArray[this$static.arrayLen++] = toAppend;
 12212     this$static.stringLength += appendLength;
 12213     if (this$static.arrayLen > 1024) {
 12214       $toString_0(this$static);
 12215       this$static.stringArray.length = 1024;
 12216     }
 12217   }
 12218   return this$static;
 12219 }
 12220 
 12221 function $getChars(this$static, srcStart, srcEnd, dst, dstStart){
 12222   var s;
 12223   __checkBounds(this$static.stringLength, srcStart, srcEnd);
 12224   __checkBounds(dst.length, dstStart, dstStart + (srcEnd - srcStart));
 12225   s = $toString_0(this$static);
 12226   while (srcStart < srcEnd) {
 12227     dst[dstStart++] = s.charCodeAt(srcStart++);
 12228   }
 12229 }
 12230 
 12231 function $setLength(this$static, newLength){
 12232   var oldLength, s;
 12233   oldLength = this$static.stringLength;
 12234   if (newLength < oldLength) {
 12235     s = $toString_0(this$static);
 12236     this$static.stringArray = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [s.substr(0, newLength - 0), '', s.substr(oldLength, s.length - oldLength)]);
 12237     this$static.arrayLen = 3;
 12238     this$static.stringLength += ''.length - (oldLength - newLength);
 12239   }
 12240    else if (newLength > oldLength) {
 12241     $append_0(this$static, String.fromCharCode.apply(null, initDim(_3C_classLit, 42, -1, newLength - oldLength, 1)));
 12242   }
 12243 }
 12244 
 12245 function $toString_0(this$static){
 12246   var s;
 12247   if (this$static.arrayLen != 1) {
 12248     this$static.stringArray.length = this$static.arrayLen;
 12249     s = this$static.stringArray.join('');
 12250     this$static.stringArray = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [s]);
 12251     this$static.arrayLen = 1;
 12252   }
 12253   return this$static.stringArray[0];
 12254 }
 12255 
 12256 function getClass_16(){
 12257   return Ljava_lang_StringBuilder_2_classLit;
 12258 }
 12259 
 12260 function toString_5(){
 12261   return $toString_0(this);
 12262 }
 12263 
 12264 function StringBuilder(){
 12265 }
 12266 
 12267 _ = StringBuilder.prototype = new Object_0();
 12268 _.getClass$ = getClass_16;
 12269 _.toString$ = toString_5;
 12270 _.typeId$ = 18;
 12271 _.arrayLen = 0;
 12272 _.stringLength = 0;
 12273 function $StringIndexOutOfBoundsException(this$static, index){
 12274   this$static.detailMessage = 'String index out of range: ' + index;
 12275   return this$static;
 12276 }
 12277 
 12278 function getClass_17(){
 12279   return Ljava_lang_StringIndexOutOfBoundsException_2_classLit;
 12280 }
 12281 
 12282 function StringIndexOutOfBoundsException(){
 12283 }
 12284 
 12285 _ = StringIndexOutOfBoundsException.prototype = new IndexOutOfBoundsException();
 12286 _.getClass$ = getClass_17;
 12287 _.typeId$ = 19;
 12288 function arraycopy(src, srcOfs, dest, destOfs, len){
 12289   var destArray, destEnd, destTypeName, destlen, srcArray, srcTypeName, srclen;
 12290   if (src == null || dest == null) {
 12291     throw new NullPointerException();
 12292   }
 12293   srcTypeName = (src.typeMarker$ == nullMethod || src.typeId$ == 2?src.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
 12294   destTypeName = (dest.typeMarker$ == nullMethod || dest.typeId$ == 2?dest.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
 12295   if (srcTypeName.charCodeAt(0) != 91 || destTypeName.charCodeAt(0) != 91) {
 12296     throw $ArrayStoreException(new ArrayStoreException(), 'Must be array types');
 12297   }
 12298   if (srcTypeName.charCodeAt(1) != destTypeName.charCodeAt(1)) {
 12299     throw $ArrayStoreException(new ArrayStoreException(), 'Array types must match');
 12300   }
 12301   srclen = src.length;
 12302   destlen = dest.length;
 12303   if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
 12304     throw new IndexOutOfBoundsException();
 12305   }
 12306   if ((srcTypeName.charCodeAt(1) == 76 || srcTypeName.charCodeAt(1) == 91) && !$equals_0(srcTypeName, destTypeName)) {
 12307     srcArray = dynamicCast(src, 5);
 12308     destArray = dynamicCast(dest, 5);
 12309     if ((src == null?null:src) === (dest == null?null:dest) && srcOfs < destOfs) {
 12310       srcOfs += len;
 12311       for (destEnd = destOfs + len; destEnd-- > destOfs;) {
 12312         setCheck(destArray, destEnd, srcArray[--srcOfs]);
 12313       }
 12314     }
 12315      else {
 12316       for (destEnd = destOfs + len; destOfs < destEnd;) {
 12317         setCheck(destArray, destOfs++, srcArray[srcOfs++]);
 12318       }
 12319     }
 12320   }
 12321    else {
 12322     Array.prototype.splice.apply(dest, [destOfs, len].concat(src.slice(srcOfs, srcOfs + len)));
 12323   }
 12324 }
 12325 
 12326 function $UnsupportedOperationException(this$static, message){
 12327   this$static.detailMessage = message;
 12328   return this$static;
 12329 }
 12330 
 12331 function getClass_20(){
 12332   return Ljava_lang_UnsupportedOperationException_2_classLit;
 12333 }
 12334 
 12335 function UnsupportedOperationException(){
 12336 }
 12337 
 12338 _ = UnsupportedOperationException.prototype = new RuntimeException();
 12339 _.getClass$ = getClass_20;
 12340 _.typeId$ = 20;
 12341 function $advanceToFind(iter, o){
 12342   var t;
 12343   while (iter.hasNext()) {
 12344     t = iter.next_0();
 12345     if (o == null?t == null:equals__devirtual$(o, t)) {
 12346       return iter;
 12347     }
 12348   }
 12349   return null;
 12350 }
 12351 
 12352 function add(o){
 12353   throw $UnsupportedOperationException(new UnsupportedOperationException(), 'Add not supported on this collection');
 12354 }
 12355 
 12356 function contains(o){
 12357   var iter;
 12358   iter = $advanceToFind(this.iterator(), o);
 12359   return !!iter;
 12360 }
 12361 
 12362 function getClass_21(){
 12363   return Ljava_util_AbstractCollection_2_classLit;
 12364 }
 12365 
 12366 function toString_8(){
 12367   var comma, iter, sb;
 12368   sb = $StringBuffer(new StringBuffer());
 12369   comma = null;
 12370   $append_0(sb.builder, '[');
 12371   iter = this.iterator();
 12372   while (iter.hasNext()) {
 12373     if (comma != null) {
 12374       $append_0(sb.builder, comma);
 12375     }
 12376      else {
 12377       comma = ', ';
 12378     }
 12379     $append(sb, '' + iter.next_0());
 12380   }
 12381   $append_0(sb.builder, ']');
 12382   return $toString_0(sb.builder);
 12383 }
 12384 
 12385 function AbstractCollection(){
 12386 }
 12387 
 12388 _ = AbstractCollection.prototype = new Object_0();
 12389 _.add_1 = add;
 12390 _.contains = contains;
 12391 _.getClass$ = getClass_21;
 12392 _.toString$ = toString_8;
 12393 _.typeId$ = 0;
 12394 function equals_5(obj){
 12395   var entry, entry$iterator, otherKey, otherMap, otherValue;
 12396   if ((obj == null?null:obj) === (this == null?null:this)) {
 12397     return true;
 12398   }
 12399   if (!(obj != null && canCast(obj.typeId$, 16))) {
 12400     return false;
 12401   }
 12402   otherMap = dynamicCast(obj, 16);
 12403   if (dynamicCast(this, 16).size != otherMap.size) {
 12404     return false;
 12405   }
 12406   for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), otherMap).this$0); $hasNext(entry$iterator.iter);) {
 12407     entry = dynamicCast($next(entry$iterator.iter), 14);
 12408     otherKey = entry.getKey();
 12409     otherValue = entry.getValue();
 12410     if (!(otherKey == null?dynamicCast(this, 16).nullSlotLive:otherKey != null?$hasStringValue(dynamicCast(this, 16), otherKey):$hasHashValue(dynamicCast(this, 16), otherKey, ~~getHashCode_0(otherKey)))) {
 12411       return false;
 12412     }
 12413     if (!equalsWithNullCheck(otherValue, otherKey == null?dynamicCast(this, 16).nullSlot:otherKey != null?dynamicCast(this, 16).stringMap[':' + otherKey]:$getHashValue(dynamicCast(this, 16), otherKey, ~~getHashCode_0(otherKey)))) {
 12414       return false;
 12415     }
 12416   }
 12417   return true;
 12418 }
 12419 
 12420 function getClass_31(){
 12421   return Ljava_util_AbstractMap_2_classLit;
 12422 }
 12423 
 12424 function hashCode_6(){
 12425   var entry, entry$iterator, hashCode;
 12426   hashCode = 0;
 12427   for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), dynamicCast(this, 16)).this$0); $hasNext(entry$iterator.iter);) {
 12428     entry = dynamicCast($next(entry$iterator.iter), 14);
 12429     hashCode += entry.hashCode$();
 12430     hashCode = ~~hashCode;
 12431   }
 12432   return hashCode;
 12433 }
 12434 
 12435 function toString_10(){
 12436   var comma, entry, iter, s;
 12437   s = '{';
 12438   comma = false;
 12439   for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), dynamicCast(this, 16)).this$0); $hasNext(iter.iter);) {
 12440     entry = dynamicCast($next(iter.iter), 14);
 12441     if (comma) {
 12442       s += ', ';
 12443     }
 12444      else {
 12445       comma = true;
 12446     }
 12447     s += '' + entry.getKey();
 12448     s += '=';
 12449     s += '' + entry.getValue();
 12450   }
 12451   return s + '}';
 12452 }
 12453 
 12454 function AbstractMap(){
 12455 }
 12456 
 12457 _ = AbstractMap.prototype = new Object_0();
 12458 _.equals$ = equals_5;
 12459 _.getClass$ = getClass_31;
 12460 _.hashCode$ = hashCode_6;
 12461 _.toString$ = toString_10;
 12462 _.typeId$ = 0;
 12463 function $addAllHashEntries(this$static, dest){
 12464   var hashCodeMap = this$static.hashCodeMap;
 12465   for (var hashCode in hashCodeMap) {
 12466     if (hashCode == parseInt(hashCode)) {
 12467       var array = hashCodeMap[hashCode];
 12468       for (var i = 0, c = array.length; i < c; ++i) {
 12469         dest.add_1(array[i]);
 12470       }
 12471     }
 12472   }
 12473 }
 12474 
 12475 function $addAllStringEntries(this$static, dest){
 12476   var stringMap = this$static.stringMap;
 12477   for (var key in stringMap) {
 12478     if (key.charCodeAt(0) == 58) {
 12479       var entry = new_$(this$static, key.substring(1));
 12480       dest.add_1(entry);
 12481     }
 12482   }
 12483 }
 12484 
 12485 function $clearImpl(this$static){
 12486   this$static.hashCodeMap = [];
 12487   this$static.stringMap = {};
 12488   this$static.nullSlotLive = false;
 12489   this$static.nullSlot = null;
 12490   this$static.size = 0;
 12491 }
 12492 
 12493 function $containsKey(this$static, key){
 12494   return key == null?this$static.nullSlotLive:key != null?':' + key in this$static.stringMap:$hasHashValue(this$static, key, ~~getHashCode_0(key));
 12495 }
 12496 
 12497 function $get(this$static, key){
 12498   return key == null?this$static.nullSlot:key != null?this$static.stringMap[':' + key]:$getHashValue(this$static, key, ~~getHashCode_0(key));
 12499 }
 12500 
 12501 function $getHashValue(this$static, key, hashCode){
 12502   var array = this$static.hashCodeMap[hashCode];
 12503   if (array) {
 12504     for (var i = 0, c = array.length; i < c; ++i) {
 12505       var entry = array[i];
 12506       var entryKey = entry.getKey();
 12507       if (this$static.equalsBridge(key, entryKey)) {
 12508         return entry.getValue();
 12509       }
 12510     }
 12511   }
 12512   return null;
 12513 }
 12514 
 12515 function $hasHashValue(this$static, key, hashCode){
 12516   var array = this$static.hashCodeMap[hashCode];
 12517   if (array) {
 12518     for (var i = 0, c = array.length; i < c; ++i) {
 12519       var entry = array[i];
 12520       var entryKey = entry.getKey();
 12521       if (this$static.equalsBridge(key, entryKey)) {
 12522         return true;
 12523       }
 12524     }
 12525   }
 12526   return false;
 12527 }
 12528 
 12529 function $hasStringValue(this$static, key){
 12530   return ':' + key in this$static.stringMap;
 12531 }
 12532 
 12533 function equalsBridge(value1, value2){
 12534   return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
 12535 }
 12536 
 12537 function getClass_26(){
 12538   return Ljava_util_AbstractHashMap_2_classLit;
 12539 }
 12540 
 12541 function AbstractHashMap(){
 12542 }
 12543 
 12544 _ = AbstractHashMap.prototype = new AbstractMap();
 12545 _.equalsBridge = equalsBridge;
 12546 _.getClass$ = getClass_26;
 12547 _.typeId$ = 0;
 12548 _.hashCodeMap = null;
 12549 _.nullSlot = null;
 12550 _.nullSlotLive = false;
 12551 _.size = 0;
 12552 _.stringMap = null;
 12553 function equals_6(o){
 12554   var iter, other, otherItem;
 12555   if ((o == null?null:o) === (this == null?null:this)) {
 12556     return true;
 12557   }
 12558   if (!(o != null && canCast(o.typeId$, 18))) {
 12559     return false;
 12560   }
 12561   other = dynamicCast(o, 18);
 12562   if (other.this$0.size != this.size_0()) {
 12563     return false;
 12564   }
 12565   for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), other.this$0); $hasNext(iter.iter);) {
 12566     otherItem = dynamicCast($next(iter.iter), 14);
 12567     if (!this.contains(otherItem)) {
 12568       return false;
 12569     }
 12570   }
 12571   return true;
 12572 }
 12573 
 12574 function getClass_33(){
 12575   return Ljava_util_AbstractSet_2_classLit;
 12576 }
 12577 
 12578 function hashCode_7(){
 12579   var hashCode, iter, next;
 12580   hashCode = 0;
 12581   for (iter = this.iterator(); iter.hasNext();) {
 12582     next = iter.next_0();
 12583     if (next != null) {
 12584       hashCode += hashCode__devirtual$(next);
 12585       hashCode = ~~hashCode;
 12586     }
 12587   }
 12588   return hashCode;
 12589 }
 12590 
 12591 function AbstractSet(){
 12592 }
 12593 
 12594 _ = AbstractSet.prototype = new AbstractCollection();
 12595 _.equals$ = equals_6;
 12596 _.getClass$ = getClass_33;
 12597 _.hashCode$ = hashCode_7;
 12598 _.typeId$ = 0;
 12599 function $AbstractHashMap$EntrySet(this$static, this$0){
 12600   this$static.this$0 = this$0;
 12601   return this$static;
 12602 }
 12603 
 12604 function contains_0(o){
 12605   var entry, key, value;
 12606   if (o != null && canCast(o.typeId$, 14)) {
 12607     entry = dynamicCast(o, 14);
 12608     key = entry.getKey();
 12609     if ($containsKey(this.this$0, key)) {
 12610       value = $get(this.this$0, key);
 12611       return $equals_1(entry.getValue(), value);
 12612     }
 12613   }
 12614   return false;
 12615 }
 12616 
 12617 function getClass_23(){
 12618   return Ljava_util_AbstractHashMap$EntrySet_2_classLit;
 12619 }
 12620 
 12621 function iterator(){
 12622   return $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), this.this$0);
 12623 }
 12624 
 12625 function size_0(){
 12626   return this.this$0.size;
 12627 }
 12628 
 12629 function AbstractHashMap$EntrySet(){
 12630 }
 12631 
 12632 _ = AbstractHashMap$EntrySet.prototype = new AbstractSet();
 12633 _.contains = contains_0;
 12634 _.getClass$ = getClass_23;
 12635 _.iterator = iterator;
 12636 _.size_0 = size_0;
 12637 _.typeId$ = 21;
 12638 _.this$0 = null;
 12639 function $AbstractHashMap$EntrySetIterator(this$static, this$0){
 12640   var list;
 12641   this$static.this$0 = this$0;
 12642   list = $ArrayList(new ArrayList());
 12643   if (this$static.this$0.nullSlotLive) {
 12644     $add(list, $AbstractHashMap$MapEntryNull(new AbstractHashMap$MapEntryNull(), this$static.this$0));
 12645   }
 12646   $addAllStringEntries(this$static.this$0, list);
 12647   $addAllHashEntries(this$static.this$0, list);
 12648   this$static.iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), list);
 12649   return this$static;
 12650 }
 12651 
 12652 function getClass_22(){
 12653   return Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit;
 12654 }
 12655 
 12656 function hasNext(){
 12657   return $hasNext(this.iter);
 12658 }
 12659 
 12660 function next_0(){
 12661   return dynamicCast($next(this.iter), 14);
 12662 }
 12663 
 12664 function AbstractHashMap$EntrySetIterator(){
 12665 }
 12666 
 12667 _ = AbstractHashMap$EntrySetIterator.prototype = new Object_0();
 12668 _.getClass$ = getClass_22;
 12669 _.hasNext = hasNext;
 12670 _.next_0 = next_0;
 12671 _.typeId$ = 0;
 12672 _.iter = null;
 12673 _.this$0 = null;
 12674 function equals_4(other){
 12675   var entry;
 12676   if (other != null && canCast(other.typeId$, 14)) {
 12677     entry = dynamicCast(other, 14);
 12678     if (equalsWithNullCheck(this.getKey(), entry.getKey()) && equalsWithNullCheck(this.getValue(), entry.getValue())) {
 12679       return true;
 12680     }
 12681   }
 12682   return false;
 12683 }
 12684 
 12685 function getClass_30(){
 12686   return Ljava_util_AbstractMapEntry_2_classLit;
 12687 }
 12688 
 12689 function hashCode_5(){
 12690   var keyHash, valueHash;
 12691   keyHash = 0;
 12692   valueHash = 0;
 12693   if (this.getKey() != null) {
 12694     keyHash = getHashCode_0(this.getKey());
 12695   }
 12696   if (this.getValue() != null) {
 12697     valueHash = hashCode__devirtual$(this.getValue());
 12698   }
 12699   return keyHash ^ valueHash;
 12700 }
 12701 
 12702 function toString_9(){
 12703   return this.getKey() + '=' + this.getValue();
 12704 }
 12705 
 12706 function AbstractMapEntry(){
 12707 }
 12708 
 12709 _ = AbstractMapEntry.prototype = new Object_0();
 12710 _.equals$ = equals_4;
 12711 _.getClass$ = getClass_30;
 12712 _.hashCode$ = hashCode_5;
 12713 _.toString$ = toString_9;
 12714 _.typeId$ = 22;
 12715 function $AbstractHashMap$MapEntryNull(this$static, this$0){
 12716   this$static.this$0 = this$0;
 12717   return this$static;
 12718 }
 12719 
 12720 function getClass_24(){
 12721   return Ljava_util_AbstractHashMap$MapEntryNull_2_classLit;
 12722 }
 12723 
 12724 function getKey(){
 12725   return null;
 12726 }
 12727 
 12728 function getValue(){
 12729   return this.this$0.nullSlot;
 12730 }
 12731 
 12732 function AbstractHashMap$MapEntryNull(){
 12733 }
 12734 
 12735 _ = AbstractHashMap$MapEntryNull.prototype = new AbstractMapEntry();
 12736 _.getClass$ = getClass_24;
 12737 _.getKey = getKey;
 12738 _.getValue = getValue;
 12739 _.typeId$ = 23;
 12740 _.this$0 = null;
 12741 function $AbstractHashMap$MapEntryString(this$static, key, this$0){
 12742   this$static.this$0 = this$0;
 12743   this$static.key = key;
 12744   return this$static;
 12745 }
 12746 
 12747 function getClass_25(){
 12748   return Ljava_util_AbstractHashMap$MapEntryString_2_classLit;
 12749 }
 12750 
 12751 function getKey_0(){
 12752   return this.key;
 12753 }
 12754 
 12755 function getValue_0(){
 12756   return this.this$0.stringMap[':' + this.key];
 12757 }
 12758 
 12759 function new_$(this$outer, key){
 12760   return $AbstractHashMap$MapEntryString(new AbstractHashMap$MapEntryString(), key, this$outer);
 12761 }
 12762 
 12763 function AbstractHashMap$MapEntryString(){
 12764 }
 12765 
 12766 _ = AbstractHashMap$MapEntryString.prototype = new AbstractMapEntry();
 12767 _.getClass$ = getClass_25;
 12768 _.getKey = getKey_0;
 12769 _.getValue = getValue_0;
 12770 _.typeId$ = 24;
 12771 _.key = null;
 12772 _.this$0 = null;
 12773 function add_1(obj){
 12774   this.add_0(this.size_0(), obj);
 12775   return true;
 12776 }
 12777 
 12778 function add_0(index, element){
 12779   throw $UnsupportedOperationException(new UnsupportedOperationException(), 'Add not supported on this list');
 12780 }
 12781 
 12782 function checkIndex(index, size){
 12783   if (index < 0 || index >= size) {
 12784     indexOutOfBounds(index, size);
 12785   }
 12786 }
 12787 
 12788 function equals_3(o){
 12789   var elem, elemOther, iter, iterOther, other;
 12790   if ((o == null?null:o) === (this == null?null:this)) {
 12791     return true;
 12792   }
 12793   if (!(o != null && canCast(o.typeId$, 15))) {
 12794     return false;
 12795   }
 12796   other = dynamicCast(o, 15);
 12797   if (this.size_0() != other.size_0()) {
 12798     return false;
 12799   }
 12800   iter = this.iterator();
 12801   iterOther = other.iterator();
 12802   while (iter.i < iter.this$0.size_0()) {
 12803     elem = $next(iter);
 12804     elemOther = $next(iterOther);
 12805     if (!(elem == null?elemOther == null:equals__devirtual$(elem, elemOther))) {
 12806       return false;
 12807     }
 12808   }
 12809   return true;
 12810 }
 12811 
 12812 function getClass_29(){
 12813   return Ljava_util_AbstractList_2_classLit;
 12814 }
 12815 
 12816 function hashCode_4(){
 12817   var iter, k, obj;
 12818   k = 1;
 12819   iter = this.iterator();
 12820   while (iter.i < iter.this$0.size_0()) {
 12821     obj = $next(iter);
 12822     k = 31 * k + (obj == null?0:hashCode__devirtual$(obj));
 12823     k = ~~k;
 12824   }
 12825   return k;
 12826 }
 12827 
 12828 function indexOutOfBounds(index, size){
 12829   throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Index: ' + index + ', Size: ' + size);
 12830 }
 12831 
 12832 function iterator_0(){
 12833   return $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this);
 12834 }
 12835 
 12836 function AbstractList(){
 12837 }
 12838 
 12839 _ = AbstractList.prototype = new AbstractCollection();
 12840 _.add_1 = add_1;
 12841 _.add_0 = add_0;
 12842 _.equals$ = equals_3;
 12843 _.getClass$ = getClass_29;
 12844 _.hashCode$ = hashCode_4;
 12845 _.iterator = iterator_0;
 12846 _.typeId$ = 25;
 12847 function $AbstractList$IteratorImpl(this$static, this$0){
 12848   this$static.this$0 = this$0;
 12849   return this$static;
 12850 }
 12851 
 12852 function $hasNext(this$static){
 12853   return this$static.i < this$static.this$0.size_0();
 12854 }
 12855 
 12856 function $next(this$static){
 12857   if (this$static.i >= this$static.this$0.size_0()) {
 12858     throw new NoSuchElementException();
 12859   }
 12860   return this$static.this$0.get(this$static.i++);
 12861 }
 12862 
 12863 function getClass_27(){
 12864   return Ljava_util_AbstractList$IteratorImpl_2_classLit;
 12865 }
 12866 
 12867 function hasNext_0(){
 12868   return this.i < this.this$0.size_0();
 12869 }
 12870 
 12871 function next_1(){
 12872   return $next(this);
 12873 }
 12874 
 12875 function AbstractList$IteratorImpl(){
 12876 }
 12877 
 12878 _ = AbstractList$IteratorImpl.prototype = new Object_0();
 12879 _.getClass$ = getClass_27;
 12880 _.hasNext = hasNext_0;
 12881 _.next_0 = next_1;
 12882 _.typeId$ = 0;
 12883 _.i = 0;
 12884 _.this$0 = null;
 12885 function $AbstractList$ListIteratorImpl(this$static, this$0){
 12886   this$static.this$0 = this$0;
 12887   return this$static;
 12888 }
 12889 
 12890 function getClass_28(){
 12891   return Ljava_util_AbstractList$ListIteratorImpl_2_classLit;
 12892 }
 12893 
 12894 function AbstractList$ListIteratorImpl(){
 12895 }
 12896 
 12897 _ = AbstractList$ListIteratorImpl.prototype = new AbstractList$IteratorImpl();
 12898 _.getClass$ = getClass_28;
 12899 _.typeId$ = 0;
 12900 function add_2(index, element){
 12901   var iter;
 12902   iter = $listIterator(this, index);
 12903   $addBefore(iter.this$0, element, iter.currentNode);
 12904   ++iter.currentIndex;
 12905   iter.lastNode = null;
 12906 }
 12907 
 12908 function get(index){
 12909   var $e0, iter;
 12910   iter = $listIterator(this, index);
 12911   try {
 12912     return $next_0(iter);
 12913   }
 12914    catch ($e0) {
 12915     $e0 = caught($e0);
 12916     if (instanceOf($e0, 17)) {
 12917       throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), "Can't get element " + index);
 12918     }
 12919      else 
 12920       throw $e0;
 12921   }
 12922 }
 12923 
 12924 function getClass_32(){
 12925   return Ljava_util_AbstractSequentialList_2_classLit;
 12926 }
 12927 
 12928 function iterator_1(){
 12929   return $AbstractList$ListIteratorImpl(new AbstractList$ListIteratorImpl(), this);
 12930 }
 12931 
 12932 function AbstractSequentialList(){
 12933 }
 12934 
 12935 _ = AbstractSequentialList.prototype = new AbstractList();
 12936 _.add_0 = add_2;
 12937 _.get = get;
 12938 _.getClass$ = getClass_32;
 12939 _.iterator = iterator_1;
 12940 _.typeId$ = 26;
 12941 function $ArrayList(this$static){
 12942   this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 47, 0, 0, 0);
 12943   this$static.size = 0;
 12944   return this$static;
 12945 }
 12946 
 12947 function $add(this$static, o){
 12948   setCheck(this$static.array, this$static.size++, o);
 12949   return true;
 12950 }
 12951 
 12952 function $get_0(this$static, index){
 12953   checkIndex(index, this$static.size);
 12954   return this$static.array[index];
 12955 }
 12956 
 12957 function $indexOf_0(this$static, o, index){
 12958   for (; index < this$static.size; ++index) {
 12959     if (equalsWithNullCheck(o, this$static.array[index])) {
 12960       return index;
 12961     }
 12962   }
 12963   return -1;
 12964 }
 12965 
 12966 function $remove_0(this$static, o){
 12967   var i, previous;
 12968   i = $indexOf_0(this$static, o, 0);
 12969   if (i == -1) {
 12970     return false;
 12971   }
 12972   previous = (checkIndex(i, this$static.size) , this$static.array[i]);
 12973   this$static.array.splice(i, 1);
 12974   --this$static.size;
 12975   return true;
 12976 }
 12977 
 12978 function add_4(o){
 12979   return setCheck(this.array, this.size++, o) , true;
 12980 }
 12981 
 12982 function add_3(index, o){
 12983   if (index < 0 || index > this.size) {
 12984     indexOutOfBounds(index, this.size);
 12985   }
 12986   this.array.splice(index, 0, o);
 12987   ++this.size;
 12988 }
 12989 
 12990 function contains_1(o){
 12991   return $indexOf_0(this, o, 0) != -1;
 12992 }
 12993 
 12994 function get_0(index){
 12995   return checkIndex(index, this.size) , this.array[index];
 12996 }
 12997 
 12998 function getClass_34(){
 12999   return Ljava_util_ArrayList_2_classLit;
 13000 }
 13001 
 13002 function size_1(){
 13003   return this.size;
 13004 }
 13005 
 13006 function ArrayList(){
 13007 }
 13008 
 13009 _ = ArrayList.prototype = new AbstractList();
 13010 _.add_1 = add_4;
 13011 _.add_0 = add_3;
 13012 _.contains = contains_1;
 13013 _.get = get_0;
 13014 _.getClass$ = getClass_34;
 13015 _.size_0 = size_1;
 13016 _.typeId$ = 27;
 13017 _.array = null;
 13018 _.size = 0;
 13019 function binarySearch(sortedArray, key){
 13020   var high, low, mid, midVal;
 13021   low = 0;
 13022   high = sortedArray.length - 1;
 13023   while (low <= high) {
 13024     mid = low + (high - low >> 1);
 13025     midVal = sortedArray[mid];
 13026     if (midVal < key) {
 13027       low = mid + 1;
 13028     }
 13029      else if (midVal > key) {
 13030       high = mid - 1;
 13031     }
 13032      else {
 13033       return mid;
 13034     }
 13035   }
 13036   return -low - 1;
 13037 }
 13038 
 13039 function binarySearch_0(sortedArray, key, comparator){
 13040   var compareResult, high, low, mid, midVal;
 13041   if (!comparator) {
 13042     comparator = ($clinit_61() , NATURAL);
 13043   }
 13044   low = 0;
 13045   high = sortedArray.length - 1;
 13046   while (low <= high) {
 13047     mid = low + (high - low >> 1);
 13048     midVal = sortedArray[mid];
 13049     compareResult = midVal.compareTo$(key);
 13050     if (compareResult < 0) {
 13051       low = mid + 1;
 13052     }
 13053      else if (compareResult > 0) {
 13054       high = mid - 1;
 13055     }
 13056      else {
 13057       return mid;
 13058     }
 13059   }
 13060   return -low - 1;
 13061 }
 13062 
 13063 function $clinit_61(){
 13064   $clinit_61 = nullMethod;
 13065   NATURAL = new Comparators$1();
 13066 }
 13067 
 13068 var NATURAL;
 13069 function getClass_35(){
 13070   return Ljava_util_Comparators$1_2_classLit;
 13071 }
 13072 
 13073 function Comparators$1(){
 13074 }
 13075 
 13076 _ = Comparators$1.prototype = new Object_0();
 13077 _.getClass$ = getClass_35;
 13078 _.typeId$ = 0;
 13079 function $HashMap(this$static){
 13080   $clearImpl(this$static);
 13081   return this$static;
 13082 }
 13083 
 13084 function $equals_1(value1, value2){
 13085   return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
 13086 }
 13087 
 13088 function getClass_36(){
 13089   return Ljava_util_HashMap_2_classLit;
 13090 }
 13091 
 13092 function HashMap(){
 13093 }
 13094 
 13095 _ = HashMap.prototype = new AbstractHashMap();
 13096 _.getClass$ = getClass_36;
 13097 _.typeId$ = 28;
 13098 function $LinkedList(this$static){
 13099   this$static.header = $LinkedList$Node(new LinkedList$Node());
 13100   this$static.size = 0;
 13101   return this$static;
 13102 }
 13103 
 13104 function $addBefore(this$static, o, target){
 13105   $LinkedList$Node_0(new LinkedList$Node(), o, target);
 13106   ++this$static.size;
 13107 }
 13108 
 13109 function $addLast(this$static, o){
 13110   $LinkedList$Node_0(new LinkedList$Node(), o, this$static.header);
 13111   ++this$static.size;
 13112 }
 13113 
 13114 function $clear(this$static){
 13115   this$static.header = $LinkedList$Node(new LinkedList$Node());
 13116   this$static.size = 0;
 13117 }
 13118 
 13119 function $getLast(this$static){
 13120   $throwEmptyException(this$static);
 13121   return this$static.header.prev.value;
 13122 }
 13123 
 13124 function $listIterator(this$static, index){
 13125   var i, node;
 13126   if (index < 0 || index > this$static.size) {
 13127     indexOutOfBounds(index, this$static.size);
 13128   }
 13129   if (index >= this$static.size >> 1) {
 13130     node = this$static.header;
 13131     for (i = this$static.size; i > index; --i) {
 13132       node = node.prev;
 13133     }
 13134   }
 13135    else {
 13136     node = this$static.header.next;
 13137     for (i = 0; i < index; ++i) {
 13138       node = node.next;
 13139     }
 13140   }
 13141   return $LinkedList$ListIteratorImpl(new LinkedList$ListIteratorImpl(), index, node, this$static);
 13142 }
 13143 
 13144 function $removeLast(this$static){
 13145   var node;
 13146   $throwEmptyException(this$static);
 13147   --this$static.size;
 13148   node = this$static.header.prev;
 13149   node.next.prev = node.prev;
 13150   node.prev.next = node.next;
 13151   node.next = node.prev = node;
 13152   return node.value;
 13153 }
 13154 
 13155 function $throwEmptyException(this$static){
 13156   if (this$static.size == 0) {
 13157     throw new NoSuchElementException();
 13158   }
 13159 }
 13160 
 13161 function add_5(o){
 13162   $LinkedList$Node_0(new LinkedList$Node(), o, this.header);
 13163   ++this.size;
 13164   return true;
 13165 }
 13166 
 13167 function getClass_39(){
 13168   return Ljava_util_LinkedList_2_classLit;
 13169 }
 13170 
 13171 function size_2(){
 13172   return this.size;
 13173 }
 13174 
 13175 function LinkedList(){
 13176 }
 13177 
 13178 _ = LinkedList.prototype = new AbstractSequentialList();
 13179 _.add_1 = add_5;
 13180 _.getClass$ = getClass_39;
 13181 _.size_0 = size_2;
 13182 _.typeId$ = 29;
 13183 _.header = null;
 13184 _.size = 0;
 13185 function $LinkedList$ListIteratorImpl(this$static, index, startNode, this$0){
 13186   this$static.this$0 = this$0;
 13187   this$static.currentNode = startNode;
 13188   this$static.currentIndex = index;
 13189   return this$static;
 13190 }
 13191 
 13192 function $next_0(this$static){
 13193   if (this$static.currentNode == this$static.this$0.header) {
 13194     throw new NoSuchElementException();
 13195   }
 13196   this$static.lastNode = this$static.currentNode;
 13197   this$static.currentNode = this$static.currentNode.next;
 13198   ++this$static.currentIndex;
 13199   return this$static.lastNode.value;
 13200 }
 13201 
 13202 function getClass_37(){
 13203   return Ljava_util_LinkedList$ListIteratorImpl_2_classLit;
 13204 }
 13205 
 13206 function hasNext_1(){
 13207   return this.currentNode != this.this$0.header;
 13208 }
 13209 
 13210 function next_2(){
 13211   return $next_0(this);
 13212 }
 13213 
 13214 function LinkedList$ListIteratorImpl(){
 13215 }
 13216 
 13217 _ = LinkedList$ListIteratorImpl.prototype = new Object_0();
 13218 _.getClass$ = getClass_37;
 13219 _.hasNext = hasNext_1;
 13220 _.next_0 = next_2;
 13221 _.typeId$ = 0;
 13222 _.currentIndex = 0;
 13223 _.currentNode = null;
 13224 _.lastNode = null;
 13225 _.this$0 = null;
 13226 function $LinkedList$Node(this$static){
 13227   this$static.next = this$static.prev = this$static;
 13228   return this$static;
 13229 }
 13230 
 13231 function $LinkedList$Node_0(this$static, value, nextNode){
 13232   this$static.value = value;
 13233   this$static.next = nextNode;
 13234   this$static.prev = nextNode.prev;
 13235   nextNode.prev.next = this$static;
 13236   nextNode.prev = this$static;
 13237   return this$static;
 13238 }
 13239 
 13240 function getClass_38(){
 13241   return Ljava_util_LinkedList$Node_2_classLit;
 13242 }
 13243 
 13244 function LinkedList$Node(){
 13245 }
 13246 
 13247 _ = LinkedList$Node.prototype = new Object_0();
 13248 _.getClass$ = getClass_38;
 13249 _.typeId$ = 0;
 13250 _.next = null;
 13251 _.prev = null;
 13252 _.value = null;
 13253 function getClass_40(){
 13254   return Ljava_util_NoSuchElementException_2_classLit;
 13255 }
 13256 
 13257 function NoSuchElementException(){
 13258 }
 13259 
 13260 _ = NoSuchElementException.prototype = new RuntimeException();
 13261 _.getClass$ = getClass_40;
 13262 _.typeId$ = 30;
 13263 function equalsWithNullCheck(a, b){
 13264   return (a == null?null:a) === (b == null?null:b) || a != null && equals__devirtual$(a, b);
 13265 }
 13266 
 13267 function $clinit_77(){
 13268   $clinit_77 = nullMethod;
 13269   HTML = $DoctypeExpectation(new DoctypeExpectation(), 'HTML', 0);
 13270   $DoctypeExpectation(new DoctypeExpectation(), 'HTML401_TRANSITIONAL', 1);
 13271   $DoctypeExpectation(new DoctypeExpectation(), 'HTML401_STRICT', 2);
 13272   $DoctypeExpectation(new DoctypeExpectation(), 'AUTO', 3);
 13273   $DoctypeExpectation(new DoctypeExpectation(), 'NO_DOCTYPE_ERRORS', 4);
 13274 }
 13275 
 13276 function $DoctypeExpectation(this$static, enum$name, enum$ordinal){
 13277   $clinit_77();
 13278   this$static.name_0 = enum$name;
 13279   this$static.ordinal = enum$ordinal;
 13280   return this$static;
 13281 }
 13282 
 13283 function getClass_41(){
 13284   return Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit;
 13285 }
 13286 
 13287 function DoctypeExpectation(){
 13288 }
 13289 
 13290 _ = DoctypeExpectation.prototype = new Enum();
 13291 _.getClass$ = getClass_41;
 13292 _.typeId$ = 31;
 13293 var HTML;
 13294 function $clinit_78(){
 13295   $clinit_78 = nullMethod;
 13296   STANDARDS_MODE = $DocumentMode(new DocumentMode(), 'STANDARDS_MODE', 0);
 13297   ALMOST_STANDARDS_MODE = $DocumentMode(new DocumentMode(), 'ALMOST_STANDARDS_MODE', 1);
 13298   QUIRKS_MODE = $DocumentMode(new DocumentMode(), 'QUIRKS_MODE', 2);
 13299 }
 13300 
 13301 function $DocumentMode(this$static, enum$name, enum$ordinal){
 13302   $clinit_78();
 13303   this$static.name_0 = enum$name;
 13304   this$static.ordinal = enum$ordinal;
 13305   return this$static;
 13306 }
 13307 
 13308 function getClass_42(){
 13309   return Lnu_validator_htmlparser_common_DocumentMode_2_classLit;
 13310 }
 13311 
 13312 function DocumentMode(){
 13313 }
 13314 
 13315 _ = DocumentMode.prototype = new Enum();
 13316 _.getClass$ = getClass_42;
 13317 _.typeId$ = 32;
 13318 var ALMOST_STANDARDS_MODE, QUIRKS_MODE, STANDARDS_MODE;
 13319 function $clinit_80(){
 13320   $clinit_80 = nullMethod;
 13321   ALLOW = $XmlViolationPolicy(new XmlViolationPolicy(), 'ALLOW', 0);
 13322   FATAL = $XmlViolationPolicy(new XmlViolationPolicy(), 'FATAL', 1);
 13323   ALTER_INFOSET = $XmlViolationPolicy(new XmlViolationPolicy(), 'ALTER_INFOSET', 2);
 13324 }
 13325 
 13326 function $XmlViolationPolicy(this$static, enum$name, enum$ordinal){
 13327   $clinit_80();
 13328   this$static.name_0 = enum$name;
 13329   this$static.ordinal = enum$ordinal;
 13330   return this$static;
 13331 }
 13332 
 13333 function getClass_43(){
 13334   return Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit;
 13335 }
 13336 
 13337 function XmlViolationPolicy(){
 13338 }
 13339 
 13340 _ = XmlViolationPolicy.prototype = new Enum();
 13341 _.getClass$ = getClass_43;
 13342 _.typeId$ = 33;
 13343 var ALLOW, ALTER_INFOSET, FATAL;
 13344 function $clinit_98(){
 13345   $clinit_98 = nullMethod;
 13346   ISINDEX_PROMPT = $toCharArray('This is a searchable index. Insert your search keywords here: ');
 13347   HTML4_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['-//W3C//DTD HTML 4.0 Frameset//EN', '-//W3C//DTD HTML 4.0 Transitional//EN', '-//W3C//DTD HTML 4.0//EN', '-//W3C//DTD HTML 4.01 Frameset//EN', '-//W3C//DTD HTML 4.01 Transitional//EN', '-//W3C//DTD HTML 4.01//EN']);
 13348   QUIRKY_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['+//silmaril//dtd html pro v0r11 19970101//', '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', '-//as//dtd html 3.0 aswedit + extensions//', '-//ietf//dtd html 2.0 level 1//', '-//ietf//dtd html 2.0 level 2//', '-//ietf//dtd html 2.0 strict level 1//', '-//ietf//dtd html 2.0 strict level 2//', '-//ietf//dtd html 2.0 strict//', '-//ietf//dtd html 2.0//', '-//ietf//dtd html 2.1e//', '-//ietf//dtd html 3.0//', '-//ietf//dtd html 3.2 final//', '-//ietf//dtd html 3.2//', '-//ietf//dtd html 3//', '-//ietf//dtd html level 0//', '-//ietf//dtd html level 1//', '-//ietf//dtd html level 2//', '-//ietf//dtd html level 3//', '-//ietf//dtd html strict level 0//', '-//ietf//dtd html strict level 1//', '-//ietf//dtd html strict level 2//', '-//ietf//dtd html strict level 3//', '-//ietf//dtd html strict//', '-//ietf//dtd html//', '-//metrius//dtd metrius presentational//', '-//microsoft//dtd internet explorer 2.0 html strict//', '-//microsoft//dtd internet explorer 2.0 html//', '-//microsoft//dtd internet explorer 2.0 tables//', '-//microsoft//dtd internet explorer 3.0 html strict//', '-//microsoft//dtd internet explorer 3.0 html//', '-//microsoft//dtd internet explorer 3.0 tables//', '-//netscape comm. corp.//dtd html//', '-//netscape comm. corp.//dtd strict html//', "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', '-//spyglass//dtd html 2.0 extended//', '-//sq//dtd html 2.0 hotmetal + extensions//', '-//sun microsystems corp.//dtd hotjava html//', '-//sun microsystems corp.//dtd hotjava strict html//', '-//w3c//dtd html 3 1995-03-24//', '-//w3c//dtd html 3.2 draft//', '-//w3c//dtd html 3.2 final//', '-//w3c//dtd html 3.2//', '-//w3c//dtd html 3.2s draft//', '-//w3c//dtd html 4.0 frameset//', '-//w3c//dtd html 4.0 transitional//', '-//w3c//dtd html experimental 19960712//', '-//w3c//dtd html experimental 970421//', '-//w3c//dtd w3 html//', '-//w3o//dtd w3 html 3.0//', '-//webtechs//dtd mozilla html 2.0//', '-//webtechs//dtd mozilla html//']);
 13349 }
 13350 
 13351 function $accumulateCharacter(this$static, c){
 13352   var newBuf, newLen;
 13353   newLen = this$static.charBufferLen + 1;
 13354   if (newLen > this$static.charBuffer.length) {
 13355     newBuf = initDim(_3C_classLit, 42, -1, newLen, 1);
 13356     arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
 13357     this$static.charBuffer = newBuf;
 13358   }
 13359   this$static.charBuffer[this$static.charBufferLen] = c;
 13360   this$static.charBufferLen = newLen;
 13361 }
 13362 
 13363 function $addAttributesToBody(this$static, attributes){
 13364   var body;
 13365   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13366   if (this$static.currentPtr >= 1) {
 13367     body = this$static.stack[1];
 13368     if (body.group == 3) {
 13369       $addAttributesToElement(this$static, body.node, attributes);
 13370     }
 13371   }
 13372 }
 13373 
 13374 function $adoptionAgencyEndTag(this$static, name){
 13375   var bookmark, clone, commonAncestor, formattingClone, formattingElt, formattingEltListPos, formattingEltStackPos, furthestBlock, furthestBlockPos, inScope, lastNode, listNode, newNode, node, nodeListPos, nodePos;
 13376   $flushCharacters(this$static);
 13377   for (;;) {
 13378     formattingEltListPos = this$static.listPtr;
 13379     while (formattingEltListPos > -1) {
 13380       listNode = this$static.listOfActiveFormattingElements[formattingEltListPos];
 13381       if (!listNode) {
 13382         formattingEltListPos = -1;
 13383         break;
 13384       }
 13385        else if (listNode.name_0 == name) {
 13386         break;
 13387       }
 13388       --formattingEltListPos;
 13389     }
 13390     if (formattingEltListPos == -1) {
 13391       return;
 13392     }
 13393     formattingElt = this$static.listOfActiveFormattingElements[formattingEltListPos];
 13394     formattingEltStackPos = this$static.currentPtr;
 13395     inScope = true;
 13396     while (formattingEltStackPos > -1) {
 13397       node = this$static.stack[formattingEltStackPos];
 13398       if (node == formattingElt) {
 13399         break;
 13400       }
 13401        else if (node.scoping) {
 13402         inScope = false;
 13403       }
 13404       --formattingEltStackPos;
 13405     }
 13406     if (formattingEltStackPos == -1) {
 13407       $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
 13408       return;
 13409     }
 13410     if (!inScope) {
 13411       return;
 13412     }
 13413     furthestBlockPos = formattingEltStackPos + 1;
 13414     while (furthestBlockPos <= this$static.currentPtr) {
 13415       node = this$static.stack[furthestBlockPos];
 13416       if (node.scoping || node.special) {
 13417         break;
 13418       }
 13419       ++furthestBlockPos;
 13420     }
 13421     if (furthestBlockPos > this$static.currentPtr) {
 13422       while (this$static.currentPtr >= formattingEltStackPos) {
 13423         $pop(this$static);
 13424       }
 13425       $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
 13426       return;
 13427     }
 13428     commonAncestor = this$static.stack[formattingEltStackPos - 1];
 13429     furthestBlock = this$static.stack[furthestBlockPos];
 13430     bookmark = formattingEltListPos;
 13431     nodePos = furthestBlockPos;
 13432     lastNode = furthestBlock;
 13433     for (;;) {
 13434       --nodePos;
 13435       node = this$static.stack[nodePos];
 13436       nodeListPos = $findInListOfActiveFormattingElements(this$static, node);
 13437       if (nodeListPos == -1) {
 13438         $removeFromStack(this$static, nodePos);
 13439         --furthestBlockPos;
 13440         continue;
 13441       }
 13442       if (nodePos == formattingEltStackPos) {
 13443         break;
 13444       }
 13445       if (nodePos == furthestBlockPos) {
 13446         bookmark = nodeListPos + 1;
 13447       }
 13448       clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', node.name_0, $cloneAttributes(node.attributes));
 13449       newNode = $StackNode(new StackNode(), node.group, node.ns, node.name_0, clone, node.scoping, node.special, node.fosterParenting, node.popName, node.attributes);
 13450       node.attributes = null;
 13451       this$static.stack[nodePos] = newNode;
 13452       ++newNode.refcount;
 13453       this$static.listOfActiveFormattingElements[nodeListPos] = newNode;
 13454       --node.refcount;
 13455       --node.refcount;
 13456       node = newNode;
 13457       $detachFromParent(this$static, lastNode.node);
 13458       $appendElement(this$static, lastNode.node, node.node);
 13459       lastNode = node;
 13460     }
 13461     if (commonAncestor.fosterParenting) {
 13462       $detachFromParent(this$static, lastNode.node);
 13463       $insertIntoFosterParent(this$static, lastNode.node);
 13464     }
 13465      else {
 13466       $detachFromParent(this$static, lastNode.node);
 13467       $appendElement(this$static, lastNode.node, commonAncestor.node);
 13468     }
 13469     clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', formattingElt.name_0, $cloneAttributes(formattingElt.attributes));
 13470     formattingClone = $StackNode(new StackNode(), formattingElt.group, formattingElt.ns, formattingElt.name_0, clone, formattingElt.scoping, formattingElt.special, formattingElt.fosterParenting, formattingElt.popName, formattingElt.attributes);
 13471     formattingElt.attributes = null;
 13472     $appendChildrenToNewParent(this$static, furthestBlock.node, clone);
 13473     $appendElement(this$static, clone, furthestBlock.node);
 13474     $removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
 13475     $insertIntoListOfActiveFormattingElements(this$static, formattingClone, bookmark);
 13476     $removeFromStack(this$static, formattingEltStackPos);
 13477     $insertIntoStack(this$static, formattingClone, furthestBlockPos);
 13478   }
 13479 }
 13480 
 13481 function $append_1(this$static, node){
 13482   var newList;
 13483   ++this$static.listPtr;
 13484   if (this$static.listPtr == this$static.listOfActiveFormattingElements.length) {
 13485     newList = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, this$static.listOfActiveFormattingElements.length + 64, 0);
 13486     arraycopy(this$static.listOfActiveFormattingElements, 0, newList, 0, this$static.listOfActiveFormattingElements.length);
 13487     this$static.listOfActiveFormattingElements = newList;
 13488   }
 13489   this$static.listOfActiveFormattingElements[this$static.listPtr] = node;
 13490 }
 13491 
 13492 function $appendHtmlElementToDocumentAndPush(this$static, attributes){
 13493   var elt, node;
 13494   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13495   elt = $createHtmlElementSetAsRoot(this$static, attributes);
 13496   node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HTML_0), elt);
 13497   $push_0(this$static, node);
 13498 }
 13499 
 13500 function $appendToCurrentNodeAndPushElement(this$static, ns, elementName, attributes){
 13501   var elt, node;
 13502   $flushCharacters(this$static);
 13503   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13504   elt = $createElement(this$static, ns, elementName.name_0, attributes);
 13505   $appendElement(this$static, elt, this$static.stack[this$static.currentPtr].node);
 13506   node = $StackNode_0(new StackNode(), ns, elementName, elt);
 13507   $push_0(this$static, node);
 13508 }
 13509 
 13510 function $appendToCurrentNodeAndPushElementMayFoster(this$static, ns, elementName, attributes){
 13511   var current, elt, node, popName;
 13512   $flushCharacters(this$static);
 13513   popName = elementName.name_0;
 13514   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13515   if (elementName.custom) {
 13516     popName = $checkPopName(this$static, popName);
 13517   }
 13518   elt = $createElement(this$static, ns, popName, attributes);
 13519   current = this$static.stack[this$static.currentPtr];
 13520   if (current.fosterParenting) {
 13521     $insertIntoFosterParent(this$static, elt);
 13522   }
 13523    else {
 13524     $appendElement(this$static, elt, current.node);
 13525   }
 13526   node = $StackNode_1(new StackNode(), ns, elementName, elt, popName);
 13527   $push_0(this$static, node);
 13528 }
 13529 
 13530 function $appendToCurrentNodeAndPushElementMayFoster_0(this$static, ns, elementName, attributes){
 13531   var current, elt, node;
 13532   $flushCharacters(this$static);
 13533   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13534   elt = $createElement_0(this$static, ns, elementName.name_0, attributes);
 13535   current = this$static.stack[this$static.currentPtr];
 13536   if (current.fosterParenting) {
 13537     $insertIntoFosterParent(this$static, elt);
 13538   }
 13539    else {
 13540     $appendElement(this$static, elt, current.node);
 13541   }
 13542   node = $StackNode_0(new StackNode(), ns, elementName, elt);
 13543   $push_0(this$static, node);
 13544 }
 13545 
 13546 function $appendToCurrentNodeAndPushElementMayFosterCamelCase(this$static, ns, elementName, attributes){
 13547   var current, elt, node, popName;
 13548   $flushCharacters(this$static);
 13549   popName = elementName.camelCaseName;
 13550   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13551   if (elementName.custom) {
 13552     popName = $checkPopName(this$static, popName);
 13553   }
 13554   elt = $createElement(this$static, ns, popName, attributes);
 13555   current = this$static.stack[this$static.currentPtr];
 13556   if (current.fosterParenting) {
 13557     $insertIntoFosterParent(this$static, elt);
 13558   }
 13559    else {
 13560     $appendElement(this$static, elt, current.node);
 13561   }
 13562   node = $StackNode_2(new StackNode(), ns, elementName, elt, popName, ($clinit_89() , FOREIGNOBJECT) == elementName);
 13563   $push_0(this$static, node);
 13564 }
 13565 
 13566 function $appendToCurrentNodeAndPushElementMayFosterNoScoping(this$static, ns, elementName, attributes){
 13567   var current, elt, node, popName;
 13568   $flushCharacters(this$static);
 13569   popName = elementName.name_0;
 13570   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13571   if (elementName.custom) {
 13572     popName = $checkPopName(this$static, popName);
 13573   }
 13574   elt = $createElement(this$static, ns, popName, attributes);
 13575   current = this$static.stack[this$static.currentPtr];
 13576   if (current.fosterParenting) {
 13577     $insertIntoFosterParent(this$static, elt);
 13578   }
 13579    else {
 13580     $appendElement(this$static, elt, current.node);
 13581   }
 13582   node = $StackNode_2(new StackNode(), ns, elementName, elt, popName, false);
 13583   $push_0(this$static, node);
 13584 }
 13585 
 13586 function $appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes){
 13587   var current, elt, node;
 13588   $flushCharacters(this$static);
 13589   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13590   elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'form', attributes);
 13591   this$static.formPointer = elt;
 13592   current = this$static.stack[this$static.currentPtr];
 13593   if (current.fosterParenting) {
 13594     $insertIntoFosterParent(this$static, elt);
 13595   }
 13596    else {
 13597     $appendElement(this$static, elt, current.node);
 13598   }
 13599   node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , FORM_0), elt);
 13600   $push_0(this$static, node);
 13601 }
 13602 
 13603 function $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, ns, elementName, attributes){
 13604   var current, elt, node;
 13605   $flushCharacters(this$static);
 13606   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13607   elt = $createElement(this$static, ns, elementName.name_0, attributes);
 13608   current = this$static.stack[this$static.currentPtr];
 13609   if (current.fosterParenting) {
 13610     $insertIntoFosterParent(this$static, elt);
 13611   }
 13612    else {
 13613     $appendElement(this$static, elt, current.node);
 13614   }
 13615   node = $StackNode_3(new StackNode(), ns, elementName, elt, $cloneAttributes(attributes));
 13616   $push_0(this$static, node);
 13617   $append_1(this$static, node);
 13618   ++node.refcount;
 13619 }
 13620 
 13621 function $appendToCurrentNodeAndPushHeadElement(this$static, attributes){
 13622   var elt, node;
 13623   $flushCharacters(this$static);
 13624   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13625   elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'head', attributes);
 13626   $appendElement(this$static, elt, this$static.stack[this$static.currentPtr].node);
 13627   this$static.headPointer = elt;
 13628   node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HEAD), elt);
 13629   $push_0(this$static, node);
 13630 }
 13631 
 13632 function $appendVoidElementToCurrentMayFoster(this$static, ns, name, attributes){
 13633   var current, elt;
 13634   $flushCharacters(this$static);
 13635   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13636   elt = $createElement_0(this$static, ns, name, attributes);
 13637   current = this$static.stack[this$static.currentPtr];
 13638   if (current.fosterParenting) {
 13639     $insertIntoFosterParent(this$static, elt);
 13640   }
 13641    else {
 13642     $appendElement(this$static, elt, current.node);
 13643   }
 13644   $elementPopped(this$static, ns, name, elt);
 13645 }
 13646 
 13647 function $appendVoidElementToCurrentMayFoster_0(this$static, ns, elementName, attributes){
 13648   var current, elt, popName;
 13649   $flushCharacters(this$static);
 13650   popName = elementName.name_0;
 13651   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13652   if (elementName.custom) {
 13653     popName = $checkPopName(this$static, popName);
 13654   }
 13655   elt = $createElement(this$static, ns, popName, attributes);
 13656   current = this$static.stack[this$static.currentPtr];
 13657   if (current.fosterParenting) {
 13658     $insertIntoFosterParent(this$static, elt);
 13659   }
 13660    else {
 13661     $appendElement(this$static, elt, current.node);
 13662   }
 13663   $elementPopped(this$static, ns, popName, elt);
 13664 }
 13665 
 13666 function $appendVoidElementToCurrentMayFosterCamelCase(this$static, ns, elementName, attributes){
 13667   var current, elt, popName;
 13668   $flushCharacters(this$static);
 13669   popName = elementName.camelCaseName;
 13670   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 13671   if (elementName.custom) {
 13672     popName = $checkPopName(this$static, popName);
 13673   }
 13674   elt = $createElement(this$static, ns, popName, attributes);
 13675   current = this$static.stack[this$static.currentPtr];
 13676   if (current.fosterParenting) {
 13677     $insertIntoFosterParent(this$static, elt);
 13678   }
 13679    else {
 13680     $appendElement(this$static, elt, current.node);
 13681   }
 13682   $elementPopped(this$static, ns, popName, elt);
 13683 }
 13684 
 13685 function $charBufferContainsNonWhitespace(this$static){
 13686   var i;
 13687   for (i = 0; i < this$static.charBufferLen; ++i) {
 13688     switch (this$static.charBuffer[i]) {
 13689       case 32:
 13690       case 9:
 13691       case 10:
 13692       case 12:
 13693         continue;
 13694       default:return true;
 13695     }
 13696   }
 13697   return false;
 13698 }
 13699 
 13700 function $characters(this$static, buf, start, length){
 13701   var end, i;
 13702   if (this$static.needToDropLF) {
 13703     if (buf[start] == 10) {
 13704       ++start;
 13705       --length;
 13706       if (length == 0) {
 13707         return;
 13708       }
 13709     }
 13710     this$static.needToDropLF = false;
 13711   }
 13712   switch (this$static.mode) {
 13713     case 6:
 13714     case 12:
 13715     case 8:
 13716       $reconstructTheActiveFormattingElements(this$static);
 13717     case 20:
 13718       $accumulateCharacters(this$static, buf, start, length);
 13719       return;
 13720     default:end = start + length;
 13721       charactersloop: for (i = start; i < end; ++i) {
 13722         switch (buf[i]) {
 13723           case 32:
 13724           case 9:
 13725           case 10:
 13726           case 12:
 13727             switch (this$static.mode) {
 13728               case 0:
 13729               case 1:
 13730               case 2:
 13731                 start = i + 1;
 13732                 continue;
 13733               case 21:
 13734               case 3:
 13735               case 4:
 13736               case 5:
 13737               case 9:
 13738               case 16:
 13739               case 17:
 13740                 continue;
 13741               case 6:
 13742               case 12:
 13743               case 8:
 13744                 if (start < i) {
 13745                   $accumulateCharacters(this$static, buf, start, i - start);
 13746                   start = i;
 13747                 }
 13748 
 13749                 $reconstructTheActiveFormattingElements(this$static);
 13750                 break charactersloop;
 13751               case 7:
 13752               case 10:
 13753               case 11:
 13754                 $reconstructTheActiveFormattingElements(this$static);
 13755                 $accumulateCharacter(this$static, buf[i]);
 13756                 start = i + 1;
 13757                 continue;
 13758               case 15:
 13759                 if (start < i) {
 13760                   $accumulateCharacters(this$static, buf, start, i - start);
 13761                   start = i;
 13762                 }
 13763 
 13764                 $reconstructTheActiveFormattingElements(this$static);
 13765                 continue;
 13766               case 18:
 13767               case 19:
 13768                 if (start < i) {
 13769                   $accumulateCharacters(this$static, buf, start, i - start);
 13770                   start = i;
 13771                 }
 13772 
 13773                 $reconstructTheActiveFormattingElements(this$static);
 13774                 continue;
 13775             }
 13776 
 13777           default:switch (this$static.mode) {
 13778               case 0:
 13779                 $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 13780                 this$static.mode = 1;
 13781                 --i;
 13782                 continue;
 13783               case 1:
 13784                 $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
 13785                 this$static.mode = 2;
 13786                 --i;
 13787                 continue;
 13788               case 2:
 13789                 if (start < i) {
 13790                   $accumulateCharacters(this$static, buf, start, i - start);
 13791                   start = i;
 13792                 }
 13793 
 13794                 $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
 13795                 this$static.mode = 3;
 13796                 --i;
 13797                 continue;
 13798               case 3:
 13799                 if (start < i) {
 13800                   $accumulateCharacters(this$static, buf, start, i - start);
 13801                   start = i;
 13802                 }
 13803 
 13804                 $pop(this$static);
 13805                 this$static.mode = 5;
 13806                 --i;
 13807                 continue;
 13808               case 4:
 13809                 if (start < i) {
 13810                   $accumulateCharacters(this$static, buf, start, i - start);
 13811                   start = i;
 13812                 }
 13813 
 13814                 $pop(this$static);
 13815                 this$static.mode = 3;
 13816                 --i;
 13817                 continue;
 13818               case 5:
 13819                 if (start < i) {
 13820                   $accumulateCharacters(this$static, buf, start, i - start);
 13821                   start = i;
 13822                 }
 13823 
 13824                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
 13825                 this$static.mode = 21;
 13826                 --i;
 13827                 continue;
 13828               case 21:
 13829                 this$static.mode = 6;
 13830                 --i;
 13831                 continue;
 13832               case 6:
 13833               case 12:
 13834               case 8:
 13835                 if (start < i) {
 13836                   $accumulateCharacters(this$static, buf, start, i - start);
 13837                   start = i;
 13838                 }
 13839 
 13840                 $reconstructTheActiveFormattingElements(this$static);
 13841                 break charactersloop;
 13842               case 7:
 13843               case 10:
 13844               case 11:
 13845                 $reconstructTheActiveFormattingElements(this$static);
 13846                 $accumulateCharacter(this$static, buf[i]);
 13847                 start = i + 1;
 13848                 continue;
 13849               case 9:
 13850                 if (start < i) {
 13851                   $accumulateCharacters(this$static, buf, start, i - start);
 13852                   start = i;
 13853                 }
 13854 
 13855                 if (this$static.currentPtr == 0) {
 13856                   start = i + 1;
 13857                   continue;
 13858                 }
 13859 
 13860                 $pop(this$static);
 13861                 this$static.mode = 7;
 13862                 --i;
 13863                 continue;
 13864                 break charactersloop;
 13865               case 15:
 13866                 this$static.mode = 6;
 13867                 --i;
 13868                 continue;
 13869               case 16:
 13870                 if (start < i) {
 13871                   $accumulateCharacters(this$static, buf, start, i - start);
 13872                   start = i;
 13873                 }
 13874 
 13875                 start = i + 1;
 13876                 continue;
 13877               case 17:
 13878                 if (start < i) {
 13879                   $accumulateCharacters(this$static, buf, start, i - start);
 13880                   start = i;
 13881                 }
 13882 
 13883                 start = i + 1;
 13884                 continue;
 13885               case 18:
 13886                 this$static.mode = 6;
 13887                 --i;
 13888                 continue;
 13889               case 19:
 13890                 this$static.mode = 16;
 13891                 --i;
 13892                 continue;
 13893             }
 13894 
 13895         }
 13896       }
 13897 
 13898       if (start < end) {
 13899         $accumulateCharacters(this$static, buf, start, end - start);
 13900       }
 13901 
 13902   }
 13903 }
 13904 
 13905 function $checkMetaCharset(this$static, attributes){
 13906   var content, internalCharsetHtml5, internalCharsetLegacy;
 13907   content = $getValue_0(attributes, ($clinit_87() , CONTENT));
 13908   internalCharsetLegacy = null;
 13909   if (content != null) {
 13910     internalCharsetLegacy = extractCharsetFromContent(content);
 13911   }
 13912   if (internalCharsetLegacy == null) {
 13913     internalCharsetHtml5 = $getValue_0(attributes, CHARSET);
 13914     if (internalCharsetHtml5 != null) {
 13915       this$static.tokenizer.shouldSuspend = true;
 13916     }
 13917   }
 13918    else {
 13919     this$static.tokenizer.shouldSuspend = true;
 13920   }
 13921 }
 13922 
 13923 function $checkPopName(this$static, name){
 13924   if (isNCName(name)) {
 13925     return name;
 13926   }
 13927    else {
 13928     switch (this$static.namePolicy.ordinal) {
 13929       case 0:
 13930         return name;
 13931       case 2:
 13932         return escapeName(name);
 13933       case 1:
 13934         $fatal_1(this$static, 'Element name \u201C' + name + '\u201D cannot be represented as XML 1.0.');
 13935     }
 13936   }
 13937   return null;
 13938 }
 13939 
 13940 function $clearStackBackTo(this$static, eltPos){
 13941   while (this$static.currentPtr > eltPos) {
 13942     $pop(this$static);
 13943   }
 13944 }
 13945 
 13946 function $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static){
 13947   while (this$static.listPtr > -1) {
 13948     if (!this$static.listOfActiveFormattingElements[this$static.listPtr]) {
 13949       --this$static.listPtr;
 13950       return;
 13951     }
 13952     --this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
 13953     --this$static.listPtr;
 13954   }
 13955 }
 13956 
 13957 function $closeTheCell(this$static, eltPos){
 13958   $generateImpliedEndTags(this$static);
 13959   while (this$static.currentPtr >= eltPos) {
 13960     $pop(this$static);
 13961   }
 13962   $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 13963   this$static.mode = 11;
 13964   return;
 13965 }
 13966 
 13967 function $comment(this$static, buf, start, length){
 13968   var end, end_0, end_1;
 13969   this$static.needToDropLF = false;
 13970   if (!this$static.wantingComments) {
 13971     return;
 13972   }
 13973   commentloop: for (;;) {
 13974     switch (this$static.foreignFlag) {
 13975       case 0:
 13976         break commentloop;
 13977       default:switch (this$static.mode) {
 13978           case 0:
 13979           case 1:
 13980           case 18:
 13981           case 19:
 13982             $appendCommentToDocument(this$static, (end = start + length , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)));
 13983             return;
 13984           case 15:
 13985             $flushCharacters(this$static);
 13986             $appendComment(this$static, this$static.stack[0].node, (end_0 = start + length , __checkBounds(buf.length, start, end_0) , __valueOf(buf, start, end_0)));
 13987             return;
 13988           default:break commentloop;
 13989         }
 13990 
 13991     }
 13992   }
 13993   $flushCharacters(this$static);
 13994   $appendComment(this$static, this$static.stack[this$static.currentPtr].node, (end_1 = start + length , __checkBounds(buf.length, start, end_1) , __valueOf(buf, start, end_1)));
 13995   return;
 13996 }
 13997 
 13998 function $doctype(this$static, name, publicIdentifier, systemIdentifier, forceQuirks){
 13999   this$static.needToDropLF = false;
 14000   doctypeloop: for (;;) {
 14001     switch (this$static.foreignFlag) {
 14002       case 0:
 14003         break doctypeloop;
 14004       default:switch (this$static.mode) {
 14005           case 0:
 14006             switch (this$static.doctypeExpectation.ordinal) {
 14007               case 0:
 14008                 if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
 14009                   $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14010                 }
 14011                  else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
 14012                   $documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
 14013                 }
 14014                  else {
 14015                   if ($equals_0('-//W3C//DTD HTML 4.0//EN', publicIdentifier) && (systemIdentifier == null || $equals_0('http://www.w3.org/TR/REC-html40/strict.dtd', systemIdentifier)) || $equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier) && (systemIdentifier == null || $equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier)) || $equals_0('-//W3C//DTD XHTML 1.0 Strict//EN', publicIdentifier) && $equals_0('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', systemIdentifier) || $equals_0('-//W3C//DTD XHTML 1.1//EN', publicIdentifier) && $equals_0('http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd', systemIdentifier)) {
 14016                   }
 14017                    else 
 14018                     !((systemIdentifier == null || $equals_0('about:legacy-compat', systemIdentifier)) && publicIdentifier == null);
 14019                   $documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
 14020                 }
 14021 
 14022                 break;
 14023               case 2:
 14024                 this$static.html4 = true;
 14025                 this$static.tokenizer.html4 = true;
 14026                 if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
 14027                   $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14028                 }
 14029                  else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
 14030                   $documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
 14031                 }
 14032                  else {
 14033                   if ($equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier)) {
 14034                     !$equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
 14035                   }
 14036                    else {
 14037                   }
 14038                   $documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
 14039                 }
 14040 
 14041                 break;
 14042               case 1:
 14043                 this$static.html4 = true;
 14044                 this$static.tokenizer.html4 = true;
 14045                 if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
 14046                   $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14047                 }
 14048                  else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
 14049                   if ($equals_0('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier) && systemIdentifier != null) {
 14050                     !$equals_0('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
 14051                   }
 14052                    else {
 14053                   }
 14054                   $documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
 14055                 }
 14056                  else {
 14057                   $documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
 14058                 }
 14059 
 14060                 break;
 14061               case 3:
 14062                 this$static.html4 = $isHtml4Doctype(publicIdentifier);
 14063                 if (this$static.html4) {
 14064                   this$static.tokenizer.html4 = true;
 14065                 }
 14066 
 14067                 if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
 14068                   $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14069                 }
 14070                  else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
 14071                   if ($equals_0('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier)) {
 14072                     !$equals_0('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
 14073                   }
 14074                    else {
 14075                   }
 14076                   $documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
 14077                 }
 14078                  else {
 14079                   if ($equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier)) {
 14080                     !$equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
 14081                   }
 14082                    else {
 14083                   }
 14084                   $documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
 14085                 }
 14086 
 14087                 break;
 14088               case 4:
 14089                 if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
 14090                   $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14091                 }
 14092                  else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
 14093                   $documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
 14094                 }
 14095                  else {
 14096                   $documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
 14097                 }
 14098 
 14099             }
 14100 
 14101             this$static.mode = 1;
 14102             return;
 14103           default:break doctypeloop;
 14104         }
 14105 
 14106     }
 14107   }
 14108   return;
 14109 }
 14110 
 14111 function $documentModeInternal(this$static, m){
 14112   this$static.quirks = m == ($clinit_78() , QUIRKS_MODE);
 14113 }
 14114 
 14115 function $endSelect(this$static){
 14116   var eltPos;
 14117   eltPos = $findLastInTableScope(this$static, 'select');
 14118   if (eltPos == 2147483647) {
 14119     return;
 14120   }
 14121   while (this$static.currentPtr >= eltPos) {
 14122     $pop(this$static);
 14123   }
 14124   $resetTheInsertionMode(this$static);
 14125 }
 14126 
 14127 function $endTag(this$static, elementName){
 14128   var eltPos, group, name, node;
 14129   this$static.needToDropLF = false;
 14130   endtagloop: for (;;) {
 14131     group = elementName.group;
 14132     name = elementName.name_0;
 14133     switch (this$static.mode) {
 14134       case 11:
 14135         switch (group) {
 14136           case 37:
 14137             eltPos = $findLastOrRoot(this$static, 37);
 14138             if (eltPos == 0) {
 14139               break endtagloop;
 14140             }
 14141 
 14142             $clearStackBackTo(this$static, eltPos);
 14143             $pop(this$static);
 14144             this$static.mode = 10;
 14145             break endtagloop;
 14146           case 34:
 14147             eltPos = $findLastOrRoot(this$static, 37);
 14148             if (eltPos == 0) {
 14149               break endtagloop;
 14150             }
 14151 
 14152             $clearStackBackTo(this$static, eltPos);
 14153             $pop(this$static);
 14154             this$static.mode = 10;
 14155             continue;
 14156           case 39:
 14157             if ($findLastInTableScope(this$static, name) == 2147483647) {
 14158               break endtagloop;
 14159             }
 14160 
 14161             eltPos = $findLastOrRoot(this$static, 37);
 14162             if (eltPos == 0) {
 14163               break endtagloop;
 14164             }
 14165 
 14166             $clearStackBackTo(this$static, eltPos);
 14167             $pop(this$static);
 14168             this$static.mode = 10;
 14169             continue;
 14170             break endtagloop;
 14171         }
 14172 
 14173       case 10:
 14174         switch (group) {
 14175           case 39:
 14176             eltPos = $findLastOrRoot_0(this$static, name);
 14177             if (eltPos == 0) {
 14178               break endtagloop;
 14179             }
 14180 
 14181             $clearStackBackTo(this$static, eltPos);
 14182             $pop(this$static);
 14183             this$static.mode = 7;
 14184             break endtagloop;
 14185           case 34:
 14186             eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
 14187             if (eltPos == 0) {
 14188               break endtagloop;
 14189             }
 14190 
 14191             $clearStackBackTo(this$static, eltPos);
 14192             $pop(this$static);
 14193             this$static.mode = 7;
 14194             continue;
 14195             break endtagloop;
 14196         }
 14197 
 14198       case 7:
 14199         switch (group) {
 14200           case 34:
 14201             eltPos = $findLast(this$static, 'table');
 14202             if (eltPos == 2147483647) {
 14203               break endtagloop;
 14204             }
 14205 
 14206             while (this$static.currentPtr >= eltPos) {
 14207               $pop(this$static);
 14208             }
 14209 
 14210             $resetTheInsertionMode(this$static);
 14211             break endtagloop;
 14212         }
 14213 
 14214       case 8:
 14215         switch (group) {
 14216           case 6:
 14217             eltPos = $findLastInTableScope(this$static, 'caption');
 14218             if (eltPos == 2147483647) {
 14219               break endtagloop;
 14220             }
 14221 
 14222             $generateImpliedEndTags(this$static);
 14223             while (this$static.currentPtr >= eltPos) {
 14224               $pop(this$static);
 14225             }
 14226 
 14227             $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 14228             this$static.mode = 7;
 14229             break endtagloop;
 14230           case 34:
 14231             eltPos = $findLastInTableScope(this$static, 'caption');
 14232             if (eltPos == 2147483647) {
 14233               break endtagloop;
 14234             }
 14235 
 14236             $generateImpliedEndTags(this$static);
 14237             while (this$static.currentPtr >= eltPos) {
 14238               $pop(this$static);
 14239             }
 14240 
 14241             $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 14242             this$static.mode = 7;
 14243             continue;
 14244             break endtagloop;
 14245         }
 14246 
 14247       case 12:
 14248         switch (group) {
 14249           case 40:
 14250             eltPos = $findLastInTableScope(this$static, name);
 14251             if (eltPos == 2147483647) {
 14252               break endtagloop;
 14253             }
 14254 
 14255             $generateImpliedEndTags(this$static);
 14256             while (this$static.currentPtr >= eltPos) {
 14257               $pop(this$static);
 14258             }
 14259 
 14260             $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 14261             this$static.mode = 11;
 14262             break endtagloop;
 14263           case 34:
 14264           case 39:
 14265           case 37:
 14266             if ($findLastInTableScope(this$static, name) == 2147483647) {
 14267               break endtagloop;
 14268             }
 14269 
 14270             $closeTheCell(this$static, $findLastInTableScopeTdTh(this$static));
 14271             continue;
 14272             break endtagloop;
 14273         }
 14274 
 14275       case 21:
 14276       case 6:
 14277         switch (group) {
 14278           case 3:
 14279             if (!(this$static.currentPtr >= 1 && this$static.stack[1].group == 3)) {
 14280               break endtagloop;
 14281             }
 14282 
 14283             this$static.mode = 15;
 14284             break endtagloop;
 14285           case 23:
 14286             if (!(this$static.currentPtr >= 1 && this$static.stack[1].group == 3)) {
 14287               break endtagloop;
 14288             }
 14289 
 14290             this$static.mode = 15;
 14291             continue;
 14292           case 50:
 14293           case 46:
 14294           case 44:
 14295           case 61:
 14296           case 51:
 14297             eltPos = $findLastInScope(this$static, name);
 14298             if (eltPos == 2147483647) {
 14299             }
 14300              else {
 14301               $generateImpliedEndTags(this$static);
 14302               while (this$static.currentPtr >= eltPos) {
 14303                 $pop(this$static);
 14304               }
 14305             }
 14306 
 14307             break endtagloop;
 14308           case 9:
 14309             if (!this$static.formPointer) {
 14310               break endtagloop;
 14311             }
 14312 
 14313             this$static.formPointer = null;
 14314             eltPos = $findLastInScope(this$static, name);
 14315             if (eltPos == 2147483647) {
 14316               break endtagloop;
 14317             }
 14318 
 14319             $generateImpliedEndTags(this$static);
 14320             $removeFromStack(this$static, eltPos);
 14321             break endtagloop;
 14322           case 29:
 14323             eltPos = $findLastInScope(this$static, 'p');
 14324             if (eltPos == 2147483647) {
 14325               if (this$static.foreignFlag == 0) {
 14326                 while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
 14327                   $pop(this$static);
 14328                 }
 14329                 this$static.foreignFlag = 1;
 14330               }
 14331               $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, ($clinit_91() , EMPTY_ATTRIBUTES));
 14332               break endtagloop;
 14333             }
 14334 
 14335             $generateImpliedEndTagsExceptFor(this$static, 'p');
 14336             while (this$static.currentPtr >= eltPos) {
 14337               $pop(this$static);
 14338             }
 14339 
 14340             break endtagloop;
 14341           case 41:
 14342           case 15:
 14343             eltPos = $findLastInScope(this$static, name);
 14344             if (eltPos == 2147483647) {
 14345             }
 14346              else {
 14347               $generateImpliedEndTagsExceptFor(this$static, name);
 14348               while (this$static.currentPtr >= eltPos) {
 14349                 $pop(this$static);
 14350               }
 14351             }
 14352 
 14353             break endtagloop;
 14354           case 42:
 14355             eltPos = $findLastInScopeHn(this$static);
 14356             if (eltPos == 2147483647) {
 14357             }
 14358              else {
 14359               $generateImpliedEndTags(this$static);
 14360               while (this$static.currentPtr >= eltPos) {
 14361                 $pop(this$static);
 14362               }
 14363             }
 14364 
 14365             break endtagloop;
 14366           case 1:
 14367           case 45:
 14368           case 64:
 14369           case 24:
 14370             $adoptionAgencyEndTag(this$static, name);
 14371             break endtagloop;
 14372           case 5:
 14373           case 63:
 14374           case 43:
 14375             eltPos = $findLastInScope(this$static, name);
 14376             if (eltPos == 2147483647) {
 14377             }
 14378              else {
 14379               $generateImpliedEndTags(this$static);
 14380               while (this$static.currentPtr >= eltPos) {
 14381                 $pop(this$static);
 14382               }
 14383               $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 14384             }
 14385 
 14386             break endtagloop;
 14387           case 4:
 14388             if (this$static.foreignFlag == 0) {
 14389               while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
 14390                 $pop(this$static);
 14391               }
 14392               this$static.foreignFlag = 1;
 14393             }
 14394 
 14395             $reconstructTheActiveFormattingElements(this$static);
 14396             $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, ($clinit_91() , EMPTY_ATTRIBUTES));
 14397             break endtagloop;
 14398           case 49:
 14399           case 55:
 14400           case 48:
 14401           case 12:
 14402           case 13:
 14403           case 65:
 14404           case 22:
 14405           case 14:
 14406           case 47:
 14407           case 60:
 14408           case 25:
 14409           case 32:
 14410           case 34:
 14411           case 35:
 14412             break endtagloop;
 14413           case 26:
 14414           default:if (name == this$static.stack[this$static.currentPtr].name_0) {
 14415               $pop(this$static);
 14416               break endtagloop;
 14417             }
 14418 
 14419             eltPos = this$static.currentPtr;
 14420             for (;;) {
 14421               node = this$static.stack[eltPos];
 14422               if (node.name_0 == name) {
 14423                 $generateImpliedEndTags(this$static);
 14424                 while (this$static.currentPtr >= eltPos) {
 14425                   $pop(this$static);
 14426                 }
 14427                 break endtagloop;
 14428               }
 14429                else if (node.scoping || node.special) {
 14430                 break endtagloop;
 14431               }
 14432               --eltPos;
 14433             }
 14434 
 14435         }
 14436 
 14437       case 9:
 14438         switch (group) {
 14439           case 8:
 14440             if (this$static.currentPtr == 0) {
 14441               break endtagloop;
 14442             }
 14443 
 14444             $pop(this$static);
 14445             this$static.mode = 7;
 14446             break endtagloop;
 14447           case 7:
 14448             break endtagloop;
 14449           default:if (this$static.currentPtr == 0) {
 14450               break endtagloop;
 14451             }
 14452 
 14453             $pop(this$static);
 14454             this$static.mode = 7;
 14455             continue;
 14456         }
 14457 
 14458       case 14:
 14459         switch (group) {
 14460           case 6:
 14461           case 34:
 14462           case 39:
 14463           case 37:
 14464           case 40:
 14465             if ($findLastInTableScope(this$static, name) != 2147483647) {
 14466               $endSelect(this$static);
 14467               continue;
 14468             }
 14469              else {
 14470               break endtagloop;
 14471             }
 14472 
 14473         }
 14474 
 14475       case 13:
 14476         switch (group) {
 14477           case 28:
 14478             if ('option' == this$static.stack[this$static.currentPtr].name_0) {
 14479               $pop(this$static);
 14480               break endtagloop;
 14481             }
 14482              else {
 14483               break endtagloop;
 14484             }
 14485 
 14486           case 27:
 14487             if ('option' == this$static.stack[this$static.currentPtr].name_0 && 'optgroup' == this$static.stack[this$static.currentPtr - 1].name_0) {
 14488               $pop(this$static);
 14489             }
 14490 
 14491             if ('optgroup' == this$static.stack[this$static.currentPtr].name_0) {
 14492               $pop(this$static);
 14493             }
 14494              else {
 14495             }
 14496 
 14497             break endtagloop;
 14498           case 32:
 14499             $endSelect(this$static);
 14500             break endtagloop;
 14501           default:break endtagloop;
 14502         }
 14503 
 14504       case 15:
 14505         switch (group) {
 14506           case 23:
 14507             if (this$static.fragment) {
 14508               break endtagloop;
 14509             }
 14510              else {
 14511               this$static.mode = 18;
 14512               break endtagloop;
 14513             }
 14514 
 14515           default:this$static.mode = 6;
 14516             continue;
 14517         }
 14518 
 14519       case 16:
 14520         switch (group) {
 14521           case 11:
 14522             if (this$static.currentPtr == 0) {
 14523               break endtagloop;
 14524             }
 14525 
 14526             $pop(this$static);
 14527             if (!this$static.fragment && 'frameset' != this$static.stack[this$static.currentPtr].name_0) {
 14528               this$static.mode = 17;
 14529             }
 14530 
 14531             break endtagloop;
 14532           default:break endtagloop;
 14533         }
 14534 
 14535       case 17:
 14536         switch (group) {
 14537           case 23:
 14538             this$static.mode = 19;
 14539             break endtagloop;
 14540           default:break endtagloop;
 14541         }
 14542 
 14543       case 0:
 14544         $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14545         this$static.mode = 1;
 14546         continue;
 14547       case 1:
 14548         $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
 14549         this$static.mode = 2;
 14550         continue;
 14551       case 2:
 14552         switch (group) {
 14553           case 20:
 14554           case 4:
 14555           case 23:
 14556           case 3:
 14557             $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
 14558             this$static.mode = 3;
 14559             continue;
 14560           default:break endtagloop;
 14561         }
 14562 
 14563       case 3:
 14564         switch (group) {
 14565           case 20:
 14566             $pop(this$static);
 14567             this$static.mode = 5;
 14568             break endtagloop;
 14569           case 4:
 14570           case 23:
 14571           case 3:
 14572             $pop(this$static);
 14573             this$static.mode = 5;
 14574             continue;
 14575           default:break endtagloop;
 14576         }
 14577 
 14578       case 4:
 14579         switch (group) {
 14580           case 26:
 14581             $pop(this$static);
 14582             this$static.mode = 3;
 14583             break endtagloop;
 14584           case 4:
 14585             $pop(this$static);
 14586             this$static.mode = 3;
 14587             continue;
 14588           default:break endtagloop;
 14589         }
 14590 
 14591       case 5:
 14592         switch (group) {
 14593           case 23:
 14594           case 3:
 14595           case 4:
 14596             $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
 14597             this$static.mode = 21;
 14598             continue;
 14599           default:break endtagloop;
 14600         }
 14601 
 14602       case 18:
 14603         this$static.mode = 6;
 14604         continue;
 14605       case 19:
 14606         this$static.mode = 16;
 14607         continue;
 14608       case 20:
 14609         if (this$static.originalMode == 5) {
 14610           $pop(this$static);
 14611         }
 14612 
 14613         $pop(this$static);
 14614         this$static.mode = this$static.originalMode;
 14615         break endtagloop;
 14616     }
 14617   }
 14618   if (this$static.foreignFlag == 0 && !$hasForeignInScope(this$static)) {
 14619     this$static.foreignFlag = 1;
 14620   }
 14621 }
 14622 
 14623 function $endTokenization(this$static){
 14624   this$static.formPointer = null;
 14625   this$static.headPointer = null;
 14626   while (this$static.currentPtr > -1) {
 14627     --this$static.stack[this$static.currentPtr].refcount;
 14628     --this$static.currentPtr;
 14629   }
 14630   this$static.stack = null;
 14631   while (this$static.listPtr > -1) {
 14632     if (this$static.listOfActiveFormattingElements[this$static.listPtr]) {
 14633       --this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
 14634     }
 14635     --this$static.listPtr;
 14636   }
 14637   this$static.listOfActiveFormattingElements = null;
 14638   $clearImpl(this$static.idLocations);
 14639   this$static.charBuffer = null;
 14640 }
 14641 
 14642 function $eof_0(this$static){
 14643   var group, i;
 14644   $flushCharacters(this$static);
 14645   switch (this$static.foreignFlag) {
 14646     case 0:
 14647       while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
 14648         $popOnEof(this$static);
 14649       }
 14650 
 14651       this$static.foreignFlag = 1;
 14652   }
 14653   eofloop: for (;;) {
 14654     switch (this$static.mode) {
 14655       case 0:
 14656         $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 14657         this$static.mode = 1;
 14658         continue;
 14659       case 1:
 14660         $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
 14661         this$static.mode = 2;
 14662         continue;
 14663       case 2:
 14664         $appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
 14665         this$static.mode = 3;
 14666         continue;
 14667       case 3:
 14668         while (this$static.currentPtr > 0) {
 14669           $popOnEof(this$static);
 14670         }
 14671 
 14672         this$static.mode = 5;
 14673         continue;
 14674       case 4:
 14675         while (this$static.currentPtr > 1) {
 14676           $popOnEof(this$static);
 14677         }
 14678 
 14679         this$static.mode = 3;
 14680         continue;
 14681       case 5:
 14682         $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
 14683         this$static.mode = 6;
 14684         continue;
 14685       case 9:
 14686         if (this$static.currentPtr == 0) {
 14687           break eofloop;
 14688         }
 14689          else {
 14690           $popOnEof(this$static);
 14691           this$static.mode = 7;
 14692           continue;
 14693         }
 14694 
 14695       case 21:
 14696       case 8:
 14697       case 12:
 14698       case 6:
 14699         openelementloop: for (i = this$static.currentPtr; i >= 0; --i) {
 14700           group = this$static.stack[i].group;
 14701           switch (group) {
 14702             case 41:
 14703             case 15:
 14704             case 29:
 14705             case 39:
 14706             case 40:
 14707             case 3:
 14708             case 23:
 14709               break;
 14710             default:break openelementloop;
 14711           }
 14712         }
 14713 
 14714         break eofloop;
 14715       case 20:
 14716         if (this$static.originalMode == 5) {
 14717           $popOnEof(this$static);
 14718         }
 14719 
 14720         $popOnEof(this$static);
 14721         this$static.mode = this$static.originalMode;
 14722         continue;
 14723       case 10:
 14724       case 11:
 14725       case 7:
 14726       case 13:
 14727       case 14:
 14728       case 16:
 14729         break eofloop;
 14730       case 15:
 14731       case 17:
 14732       case 18:
 14733       case 19:
 14734       default:if (this$static.currentPtr == 0) {
 14735           fromDouble((new Date()).getTime());
 14736         }
 14737 
 14738         break eofloop;
 14739     }
 14740   }
 14741   while (this$static.currentPtr > 0) {
 14742     $popOnEof(this$static);
 14743   }
 14744   if (!this$static.fragment) {
 14745     $popOnEof(this$static);
 14746   }
 14747 }
 14748 
 14749 function $fatal_0(this$static, e){
 14750   var spe;
 14751   spe = $SAXParseException_0(new SAXParseException(), e.detailMessage, this$static.tokenizer, e);
 14752   throw spe;
 14753 }
 14754 
 14755 function $fatal_1(this$static, s){
 14756   var spe;
 14757   spe = $SAXParseException(new SAXParseException(), s, this$static.tokenizer);
 14758   throw spe;
 14759 }
 14760 
 14761 function $findInListOfActiveFormattingElements(this$static, node){
 14762   var i;
 14763   for (i = this$static.listPtr; i >= 0; --i) {
 14764     if (node == this$static.listOfActiveFormattingElements[i]) {
 14765       return i;
 14766     }
 14767   }
 14768   return -1;
 14769 }
 14770 
 14771 function $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, name){
 14772   var i, node;
 14773   for (i = this$static.listPtr; i >= 0; --i) {
 14774     node = this$static.listOfActiveFormattingElements[i];
 14775     if (!node) {
 14776       return -1;
 14777     }
 14778      else if (node.name_0 == name) {
 14779       return i;
 14780     }
 14781   }
 14782   return -1;
 14783 }
 14784 
 14785 function $findLast(this$static, name){
 14786   var i;
 14787   for (i = this$static.currentPtr; i > 0; --i) {
 14788     if (this$static.stack[i].name_0 == name) {
 14789       return i;
 14790     }
 14791   }
 14792   return 2147483647;
 14793 }
 14794 
 14795 function $findLastInScope(this$static, name){
 14796   var i;
 14797   for (i = this$static.currentPtr; i > 0; --i) {
 14798     if (this$static.stack[i].name_0 == name) {
 14799       return i;
 14800     }
 14801      else if (this$static.stack[i].scoping) {
 14802       return 2147483647;
 14803     }
 14804   }
 14805   return 2147483647;
 14806 }
 14807 
 14808 function $findLastInScopeHn(this$static){
 14809   var i;
 14810   for (i = this$static.currentPtr; i > 0; --i) {
 14811     if (this$static.stack[i].group == 42) {
 14812       return i;
 14813     }
 14814      else if (this$static.stack[i].scoping) {
 14815       return 2147483647;
 14816     }
 14817   }
 14818   return 2147483647;
 14819 }
 14820 
 14821 function $findLastInTableScope(this$static, name){
 14822   var i;
 14823   for (i = this$static.currentPtr; i > 0; --i) {
 14824     if (this$static.stack[i].name_0 == name) {
 14825       return i;
 14826     }
 14827      else if (this$static.stack[i].name_0 == 'table') {
 14828       return 2147483647;
 14829     }
 14830   }
 14831   return 2147483647;
 14832 }
 14833 
 14834 function $findLastInTableScopeOrRootTbodyTheadTfoot(this$static){
 14835   var i;
 14836   for (i = this$static.currentPtr; i > 0; --i) {
 14837     if (this$static.stack[i].group == 39) {
 14838       return i;
 14839     }
 14840   }
 14841   return 0;
 14842 }
 14843 
 14844 function $findLastInTableScopeTdTh(this$static){
 14845   var i, name;
 14846   for (i = this$static.currentPtr; i > 0; --i) {
 14847     name = this$static.stack[i].name_0;
 14848     if ('td' == name || 'th' == name) {
 14849       return i;
 14850     }
 14851      else if (name == 'table') {
 14852       return 2147483647;
 14853     }
 14854   }
 14855   return 2147483647;
 14856 }
 14857 
 14858 function $findLastOrRoot_0(this$static, name){
 14859   var i;
 14860   for (i = this$static.currentPtr; i > 0; --i) {
 14861     if (this$static.stack[i].name_0 == name) {
 14862       return i;
 14863     }
 14864   }
 14865   return 0;
 14866 }
 14867 
 14868 function $findLastOrRoot(this$static, group){
 14869   var i;
 14870   for (i = this$static.currentPtr; i > 0; --i) {
 14871     if (this$static.stack[i].group == group) {
 14872       return i;
 14873     }
 14874   }
 14875   return 0;
 14876 }
 14877 
 14878 function $flushCharacters(this$static){
 14879   var current, elt, eltPos, node;
 14880   if (this$static.charBufferLen > 0) {
 14881     current = this$static.stack[this$static.currentPtr];
 14882     if (current.fosterParenting && $charBufferContainsNonWhitespace(this$static)) {
 14883       eltPos = $findLastOrRoot(this$static, 34);
 14884       node = this$static.stack[eltPos];
 14885       elt = node.node;
 14886       if (eltPos == 0) {
 14887         $appendCharacters(this$static, elt, valueOf_1(this$static.charBuffer, 0, this$static.charBufferLen));
 14888         this$static.charBufferLen = 0;
 14889         return;
 14890       }
 14891       $insertFosterParentedCharacters_0(this$static, this$static.charBuffer, 0, this$static.charBufferLen, elt, this$static.stack[eltPos - 1].node);
 14892       this$static.charBufferLen = 0;
 14893       return;
 14894     }
 14895     $appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(this$static.charBuffer, 0, this$static.charBufferLen));
 14896     this$static.charBufferLen = 0;
 14897   }
 14898 }
 14899 
 14900 function $generateImpliedEndTags(this$static){
 14901   for (;;) {
 14902     switch (this$static.stack[this$static.currentPtr].group) {
 14903       case 29:
 14904       case 15:
 14905       case 41:
 14906       case 28:
 14907       case 27:
 14908       case 53:
 14909         $pop(this$static);
 14910         continue;
 14911       default:return;
 14912     }
 14913   }
 14914 }
 14915 
 14916 function $generateImpliedEndTagsExceptFor(this$static, name){
 14917   var node;
 14918   for (;;) {
 14919     node = this$static.stack[this$static.currentPtr];
 14920     switch (node.group) {
 14921       case 29:
 14922       case 15:
 14923       case 41:
 14924       case 28:
 14925       case 27:
 14926       case 53:
 14927         if (node.name_0 == name) {
 14928           return;
 14929         }
 14930 
 14931         $pop(this$static);
 14932         continue;
 14933       default:return;
 14934     }
 14935   }
 14936 }
 14937 
 14938 function $hasForeignInScope(this$static){
 14939   var i;
 14940   for (i = this$static.currentPtr; i > 0; --i) {
 14941     if (this$static.stack[i].ns != 'http://www.w3.org/1999/xhtml') {
 14942       return true;
 14943     }
 14944      else if (this$static.stack[i].scoping) {
 14945       return false;
 14946     }
 14947   }
 14948   return false;
 14949 }
 14950 
 14951 function $implicitlyCloseP(this$static){
 14952   var eltPos;
 14953   eltPos = $findLastInScope(this$static, 'p');
 14954   if (eltPos == 2147483647) {
 14955     return;
 14956   }
 14957   $generateImpliedEndTagsExceptFor(this$static, 'p');
 14958   while (this$static.currentPtr >= eltPos) {
 14959     $pop(this$static);
 14960   }
 14961 }
 14962 
 14963 function $insertIntoFosterParent(this$static, child){
 14964   var elt, eltPos, node;
 14965   eltPos = $findLastOrRoot(this$static, 34);
 14966   node = this$static.stack[eltPos];
 14967   elt = node.node;
 14968   if (eltPos == 0) {
 14969     $appendElement(this$static, child, elt);
 14970     return;
 14971   }
 14972   $insertFosterParentedChild(this$static, child, elt, this$static.stack[eltPos - 1].node);
 14973 }
 14974 
 14975 function $insertIntoListOfActiveFormattingElements(this$static, formattingClone, bookmark){
 14976   ++formattingClone.refcount;
 14977   if (bookmark <= this$static.listPtr) {
 14978     arraycopy(this$static.listOfActiveFormattingElements, bookmark, this$static.listOfActiveFormattingElements, bookmark + 1, this$static.listPtr - bookmark + 1);
 14979   }
 14980   ++this$static.listPtr;
 14981   this$static.listOfActiveFormattingElements[bookmark] = formattingClone;
 14982 }
 14983 
 14984 function $insertIntoStack(this$static, node, position){
 14985   if (position == this$static.currentPtr + 1) {
 14986     $flushCharacters(this$static);
 14987     $push_0(this$static, node);
 14988   }
 14989    else {
 14990     arraycopy(this$static.stack, position, this$static.stack, position + 1, this$static.currentPtr - position + 1);
 14991     ++this$static.currentPtr;
 14992     this$static.stack[position] = node;
 14993   }
 14994 }
 14995 
 14996 function $isAlmostStandards(publicIdentifier, systemIdentifier){
 14997   if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 transitional//en', publicIdentifier)) {
 14998     return true;
 14999   }
 15000   if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 frameset//en', publicIdentifier)) {
 15001     return true;
 15002   }
 15003   if (systemIdentifier != null) {
 15004     if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
 15005       return true;
 15006     }
 15007     if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
 15008       return true;
 15009     }
 15010   }
 15011   return false;
 15012 }
 15013 
 15014 function $isHtml4Doctype(publicIdentifier){
 15015   if (publicIdentifier != null && binarySearch_0(HTML4_PUBLIC_IDS, publicIdentifier, ($clinit_61() , NATURAL)) > -1) {
 15016     return true;
 15017   }
 15018   return false;
 15019 }
 15020 
 15021 function $isInStack(this$static, node){
 15022   var i;
 15023   for (i = this$static.currentPtr; i >= 0; --i) {
 15024     if (this$static.stack[i] == node) {
 15025       return true;
 15026     }
 15027   }
 15028   return false;
 15029 }
 15030 
 15031 function $isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks){
 15032   var i;
 15033   if (forceQuirks) {
 15034     return true;
 15035   }
 15036   if (name != 'html') {
 15037     return true;
 15038   }
 15039   if (publicIdentifier != null) {
 15040     for (i = 0; i < QUIRKY_PUBLIC_IDS.length; ++i) {
 15041       if (lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(QUIRKY_PUBLIC_IDS[i], publicIdentifier)) {
 15042         return true;
 15043       }
 15044     }
 15045     if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3o//dtd w3 html strict 3.0//en//', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('-/w3c/dtd html 4.0 transitional/en', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('html', publicIdentifier)) {
 15046       return true;
 15047     }
 15048   }
 15049   if (systemIdentifier == null) {
 15050     if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
 15051       return true;
 15052     }
 15053      else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
 15054       return true;
 15055     }
 15056   }
 15057    else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', systemIdentifier)) {
 15058     return true;
 15059   }
 15060   return false;
 15061 }
 15062 
 15063 function $pop(this$static){
 15064   var node;
 15065   $flushCharacters(this$static);
 15066   node = this$static.stack[this$static.currentPtr];
 15067   --this$static.currentPtr;
 15068   $elementPopped(this$static, node.ns, node.popName, node.node);
 15069   --node.refcount;
 15070 }
 15071 
 15072 function $popOnEof(this$static){
 15073   var node;
 15074   $flushCharacters(this$static);
 15075   node = this$static.stack[this$static.currentPtr];
 15076   --this$static.currentPtr;
 15077   $elementPopped(this$static, node.ns, node.popName, node.node);
 15078   --node.refcount;
 15079 }
 15080 
 15081 function $push_0(this$static, node){
 15082   var newStack;
 15083   ++this$static.currentPtr;
 15084   if (this$static.currentPtr == this$static.stack.length) {
 15085     newStack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, this$static.stack.length + 64, 0);
 15086     arraycopy(this$static.stack, 0, newStack, 0, this$static.stack.length);
 15087     this$static.stack = newStack;
 15088   }
 15089   this$static.stack[this$static.currentPtr] = node;
 15090 }
 15091 
 15092 function $pushHeadPointerOntoStack(this$static){
 15093   $flushCharacters(this$static);
 15094   if (!this$static.headPointer) {
 15095     $push_0(this$static, this$static.stack[this$static.currentPtr]);
 15096   }
 15097    else {
 15098     $push_0(this$static, $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HEAD), this$static.headPointer));
 15099   }
 15100 }
 15101 
 15102 function $reconstructTheActiveFormattingElements(this$static){
 15103   var clone, currentNode, entry, entryClone, entryPos, mostRecent;
 15104   if (this$static.listPtr == -1) {
 15105     return;
 15106   }
 15107   mostRecent = this$static.listOfActiveFormattingElements[this$static.listPtr];
 15108   if (!mostRecent || $isInStack(this$static, mostRecent)) {
 15109     return;
 15110   }
 15111   entryPos = this$static.listPtr;
 15112   for (;;) {
 15113     --entryPos;
 15114     if (entryPos == -1) {
 15115       break;
 15116     }
 15117     if (!this$static.listOfActiveFormattingElements[entryPos]) {
 15118       break;
 15119     }
 15120     if ($isInStack(this$static, this$static.listOfActiveFormattingElements[entryPos])) {
 15121       break;
 15122     }
 15123   }
 15124   if (entryPos < this$static.listPtr) {
 15125     $flushCharacters(this$static);
 15126   }
 15127   while (entryPos < this$static.listPtr) {
 15128     ++entryPos;
 15129     entry = this$static.listOfActiveFormattingElements[entryPos];
 15130     clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', entry.name_0, $cloneAttributes(entry.attributes));
 15131     entryClone = $StackNode(new StackNode(), entry.group, entry.ns, entry.name_0, clone, entry.scoping, entry.special, entry.fosterParenting, entry.popName, entry.attributes);
 15132     entry.attributes = null;
 15133     currentNode = this$static.stack[this$static.currentPtr];
 15134     if (currentNode.fosterParenting) {
 15135       $insertIntoFosterParent(this$static, clone);
 15136     }
 15137      else {
 15138       $appendElement(this$static, clone, currentNode.node);
 15139     }
 15140     $push_0(this$static, entryClone);
 15141     this$static.listOfActiveFormattingElements[entryPos] = entryClone;
 15142     --entry.refcount;
 15143     ++entryClone.refcount;
 15144   }
 15145 }
 15146 
 15147 function $removeFromListOfActiveFormattingElements(this$static, pos){
 15148   --this$static.listOfActiveFormattingElements[pos].refcount;
 15149   if (pos == this$static.listPtr) {
 15150     --this$static.listPtr;
 15151     return;
 15152   }
 15153   arraycopy(this$static.listOfActiveFormattingElements, pos + 1, this$static.listOfActiveFormattingElements, pos, this$static.listPtr - pos);
 15154   --this$static.listPtr;
 15155 }
 15156 
 15157 function $removeFromStack(this$static, pos){
 15158   if (this$static.currentPtr == pos) {
 15159     $pop(this$static);
 15160   }
 15161    else {
 15162     --this$static.stack[pos].refcount;
 15163     arraycopy(this$static.stack, pos + 1, this$static.stack, pos, this$static.currentPtr - pos);
 15164     --this$static.currentPtr;
 15165   }
 15166 }
 15167 
 15168 function $removeFromStack_0(this$static, node){
 15169   var pos;
 15170   if (this$static.stack[this$static.currentPtr] == node) {
 15171     $pop(this$static);
 15172   }
 15173    else {
 15174     pos = this$static.currentPtr - 1;
 15175     while (pos >= 0 && this$static.stack[pos] != node) {
 15176       --pos;
 15177     }
 15178     if (pos == -1) {
 15179       return;
 15180     }
 15181     --node.refcount;
 15182     arraycopy(this$static.stack, pos + 1, this$static.stack, pos, this$static.currentPtr - pos);
 15183     --this$static.currentPtr;
 15184   }
 15185 }
 15186 
 15187 function $resetTheInsertionMode(this$static){
 15188   var i, name, node;
 15189   this$static.foreignFlag = 1;
 15190   for (i = this$static.currentPtr; i >= 0; --i) {
 15191     node = this$static.stack[i];
 15192     name = node.name_0;
 15193     if (i == 0) {
 15194       if (this$static.contextNamespace == 'http://www.w3.org/1999/xhtml' && (this$static.contextName == 'td' || this$static.contextName == 'th')) {
 15195         this$static.mode = 6;
 15196         return;
 15197       }
 15198        else {
 15199         name = this$static.contextName;
 15200       }
 15201     }
 15202     if ('select' == name) {
 15203       this$static.mode = 13;
 15204       return;
 15205     }
 15206      else if ('td' == name || 'th' == name) {
 15207       this$static.mode = 12;
 15208       return;
 15209     }
 15210      else if ('tr' == name) {
 15211       this$static.mode = 11;
 15212       return;
 15213     }
 15214      else if ('tbody' == name || 'thead' == name || 'tfoot' == name) {
 15215       this$static.mode = 10;
 15216       return;
 15217     }
 15218      else if ('caption' == name) {
 15219       this$static.mode = 8;
 15220       return;
 15221     }
 15222      else if ('colgroup' == name) {
 15223       this$static.mode = 9;
 15224       return;
 15225     }
 15226      else if ('table' == name) {
 15227       this$static.mode = 7;
 15228       return;
 15229     }
 15230      else if ('http://www.w3.org/1999/xhtml' != node.ns) {
 15231       this$static.foreignFlag = 0;
 15232       this$static.mode = 6;
 15233       return;
 15234     }
 15235      else if ('head' == name) {
 15236       this$static.mode = 6;
 15237       return;
 15238     }
 15239      else if ('body' == name) {
 15240       this$static.mode = 6;
 15241       return;
 15242     }
 15243      else if ('frameset' == name) {
 15244       this$static.mode = 16;
 15245       return;
 15246     }
 15247      else if ('html' == name) {
 15248       if (!this$static.headPointer) {
 15249         this$static.mode = 2;
 15250       }
 15251        else {
 15252         this$static.mode = 5;
 15253       }
 15254       return;
 15255     }
 15256      else if (i == 0) {
 15257       this$static.mode = 6;
 15258       return;
 15259     }
 15260   }
 15261 }
 15262 
 15263 function $setFragmentContext(this$static, context){
 15264   this$static.contextName = context;
 15265   this$static.contextNamespace = 'http://www.w3.org/1999/xhtml';
 15266   this$static.fragment = false;
 15267   this$static.quirks = false;
 15268 }
 15269 
 15270 function $startTag(this$static, elementName, attributes, selfClosing){
 15271   var actionIndex, activeA, activeAPos, attributeQName, currGroup, currNs, currentNode, eltPos, formAttrs, group, i, inputAttributes, name, needsPostProcessing, node, prompt, promptIndex, current, elt_53;
 15272   this$static.needToDropLF = false;
 15273   needsPostProcessing = false;
 15274   starttagloop: for (;;) {
 15275     group = elementName.group;
 15276     name = elementName.name_0;
 15277     switch (this$static.foreignFlag) {
 15278       case 0:
 15279         currentNode = this$static.stack[this$static.currentPtr];
 15280         currNs = currentNode.ns;
 15281         currGroup = currentNode.group;
 15282         if ('http://www.w3.org/1999/xhtml' == currNs || 'http://www.w3.org/1998/Math/MathML' == currNs && (56 != group && 57 == currGroup || 19 == group && 58 == currGroup) || 'http://www.w3.org/2000/svg' == currNs && (36 == currGroup || 59 == currGroup)) {
 15283           needsPostProcessing = true;
 15284         }
 15285          else {
 15286           switch (group) {
 15287             case 45:
 15288             case 50:
 15289             case 3:
 15290             case 4:
 15291             case 52:
 15292             case 41:
 15293             case 46:
 15294             case 48:
 15295             case 42:
 15296             case 20:
 15297             case 22:
 15298             case 15:
 15299             case 18:
 15300             case 24:
 15301             case 29:
 15302             case 44:
 15303             case 34:
 15304               while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
 15305                 $pop(this$static);
 15306               }
 15307 
 15308               this$static.foreignFlag = 1;
 15309               continue starttagloop;
 15310             case 64:
 15311               if ($contains(attributes, ($clinit_87() , COLOR)) || $contains(attributes, FACE) || $contains(attributes, SIZE)) {
 15312                 while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
 15313                   $pop(this$static);
 15314                 }
 15315                 this$static.foreignFlag = 1;
 15316                 continue starttagloop;
 15317               }
 15318 
 15319             default:if ('http://www.w3.org/2000/svg' == currNs) {
 15320                 attributes.mode = 2;
 15321                 if (selfClosing) {
 15322                   $appendVoidElementToCurrentMayFosterCamelCase(this$static, currNs, elementName, attributes);
 15323                   selfClosing = false;
 15324                 }
 15325                  else {
 15326                   $appendToCurrentNodeAndPushElementMayFosterCamelCase(this$static, currNs, elementName, attributes);
 15327                 }
 15328                 attributes = null;
 15329                 break starttagloop;
 15330               }
 15331                else {
 15332                 attributes.mode = 1;
 15333                 if (selfClosing) {
 15334                   $appendVoidElementToCurrentMayFoster_0(this$static, currNs, elementName, attributes);
 15335                   selfClosing = false;
 15336                 }
 15337                  else {
 15338                   $appendToCurrentNodeAndPushElementMayFosterNoScoping(this$static, currNs, elementName, attributes);
 15339                 }
 15340                 attributes = null;
 15341                 break starttagloop;
 15342               }
 15343 
 15344           }
 15345         }
 15346 
 15347       default:switch (this$static.mode) {
 15348           case 10:
 15349             switch (group) {
 15350               case 37:
 15351                 $clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
 15352                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15353                 this$static.mode = 11;
 15354                 attributes = null;
 15355                 break starttagloop;
 15356               case 40:
 15357                 $clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
 15358                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , TR), ($clinit_91() , EMPTY_ATTRIBUTES));
 15359                 this$static.mode = 11;
 15360                 continue;
 15361               case 6:
 15362               case 7:
 15363               case 8:
 15364               case 39:
 15365                 eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
 15366                 if (eltPos == 0) {
 15367                   break starttagloop;
 15368                 }
 15369                  else {
 15370                   $clearStackBackTo(this$static, eltPos);
 15371                   $pop(this$static);
 15372                   this$static.mode = 7;
 15373                   continue;
 15374                 }
 15375 
 15376             }
 15377 
 15378           case 11:
 15379             switch (group) {
 15380               case 40:
 15381                 $clearStackBackTo(this$static, $findLastOrRoot(this$static, 37));
 15382                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15383                 this$static.mode = 12;
 15384                 $append_1(this$static, null);
 15385                 attributes = null;
 15386                 break starttagloop;
 15387               case 6:
 15388               case 7:
 15389               case 8:
 15390               case 39:
 15391               case 37:
 15392                 eltPos = $findLastOrRoot(this$static, 37);
 15393                 if (eltPos == 0) {
 15394                   break starttagloop;
 15395                 }
 15396 
 15397                 $clearStackBackTo(this$static, eltPos);
 15398                 $pop(this$static);
 15399                 this$static.mode = 10;
 15400                 continue;
 15401             }
 15402 
 15403           case 7:
 15404             intableloop: for (;;) {
 15405               switch (group) {
 15406                 case 6:
 15407                   $clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
 15408                   $append_1(this$static, null);
 15409                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15410                   this$static.mode = 8;
 15411                   attributes = null;
 15412                   break starttagloop;
 15413                 case 8:
 15414                   $clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
 15415                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15416                   this$static.mode = 9;
 15417                   attributes = null;
 15418                   break starttagloop;
 15419                 case 7:
 15420                   $clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
 15421                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , COLGROUP), ($clinit_91() , EMPTY_ATTRIBUTES));
 15422                   this$static.mode = 9;
 15423                   continue starttagloop;
 15424                 case 39:
 15425                   $clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
 15426                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15427                   this$static.mode = 10;
 15428                   attributes = null;
 15429                   break starttagloop;
 15430                 case 37:
 15431                 case 40:
 15432                   $clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
 15433                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , TBODY), ($clinit_91() , EMPTY_ATTRIBUTES));
 15434                   this$static.mode = 10;
 15435                   continue starttagloop;
 15436                 case 34:
 15437                   eltPos = $findLastInTableScope(this$static, name);
 15438                   if (eltPos == 2147483647) {
 15439                     break starttagloop;
 15440                   }
 15441 
 15442                   $generateImpliedEndTags(this$static);
 15443                   while (this$static.currentPtr >= eltPos) {
 15444                     $pop(this$static);
 15445                   }
 15446 
 15447                   $resetTheInsertionMode(this$static);
 15448                   continue starttagloop;
 15449                 case 31:
 15450                 case 33:
 15451                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15452                   this$static.originalMode = this$static.mode;
 15453                   this$static.mode = 20;
 15454                   $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 15455                   attributes = null;
 15456                   break starttagloop;
 15457                 case 13:
 15458                   if (!lowerCaseLiteralEqualsIgnoreAsciiCaseString('hidden', $getValue_0(attributes, ($clinit_87() , TYPE)))) {
 15459                     break intableloop;
 15460                   }
 15461 
 15462                   $flushCharacters(this$static);
 15463                   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 15464                   elt_53 = $createElement_0(this$static, 'http://www.w3.org/1999/xhtml', name, attributes);
 15465                   current = this$static.stack[this$static.currentPtr];
 15466                   $appendElement(this$static, elt_53, current.node);
 15467                   $elementPopped(this$static, 'http://www.w3.org/1999/xhtml', name, elt_53);
 15468                   selfClosing = false;
 15469                   attributes = null;
 15470                   break starttagloop;
 15471                 default:break intableloop;
 15472               }
 15473             }
 15474 
 15475           case 8:
 15476             switch (group) {
 15477               case 6:
 15478               case 7:
 15479               case 8:
 15480               case 39:
 15481               case 37:
 15482               case 40:
 15483                 eltPos = $findLastInTableScope(this$static, 'caption');
 15484                 if (eltPos == 2147483647) {
 15485                   break starttagloop;
 15486                 }
 15487 
 15488                 $generateImpliedEndTags(this$static);
 15489                 while (this$static.currentPtr >= eltPos) {
 15490                   $pop(this$static);
 15491                 }
 15492 
 15493                 $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 15494                 this$static.mode = 7;
 15495                 continue;
 15496             }
 15497 
 15498           case 12:
 15499             switch (group) {
 15500               case 6:
 15501               case 7:
 15502               case 8:
 15503               case 39:
 15504               case 37:
 15505               case 40:
 15506                 eltPos = $findLastInTableScopeTdTh(this$static);
 15507                 if (eltPos == 2147483647) {
 15508                   break starttagloop;
 15509                 }
 15510                  else {
 15511                   $closeTheCell(this$static, eltPos);
 15512                   continue;
 15513                 }
 15514 
 15515             }
 15516 
 15517           case 21:
 15518             switch (group) {
 15519               case 11:
 15520                 if (this$static.mode == 21) {
 15521                   if (this$static.currentPtr == 0 || this$static.stack[1].group != 3) {
 15522                     break starttagloop;
 15523                   }
 15524                    else {
 15525                     $detachFromParent(this$static, this$static.stack[1].node);
 15526                     while (this$static.currentPtr > 0) {
 15527                       $pop(this$static);
 15528                     }
 15529                     $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15530                     this$static.mode = 16;
 15531                     attributes = null;
 15532                     break starttagloop;
 15533                   }
 15534                 }
 15535                  else {
 15536                   break starttagloop;
 15537                 }
 15538 
 15539               case 44:
 15540               case 15:
 15541               case 41:
 15542               case 5:
 15543               case 43:
 15544               case 63:
 15545               case 34:
 15546               case 49:
 15547               case 4:
 15548               case 48:
 15549               case 13:
 15550               case 65:
 15551               case 22:
 15552               case 35:
 15553               case 38:
 15554               case 47:
 15555               case 32:
 15556                 if (this$static.mode == 21) {
 15557                   this$static.mode = 6;
 15558                 }
 15559 
 15560             }
 15561 
 15562           case 6:
 15563             inbodyloop: for (;;) {
 15564               switch (group) {
 15565                 case 23:
 15566                   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 15567                   $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 15568                   attributes = null;
 15569                   break starttagloop;
 15570                 case 2:
 15571                 case 16:
 15572                 case 18:
 15573                 case 33:
 15574                 case 31:
 15575                 case 36:
 15576                 case 54:
 15577                   break inbodyloop;
 15578                 case 3:
 15579                   $addAttributesToBody(this$static, attributes);
 15580                   attributes = null;
 15581                   break starttagloop;
 15582                 case 29:
 15583                 case 50:
 15584                 case 46:
 15585                 case 51:
 15586                   $implicitlyCloseP(this$static);
 15587                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15588                   attributes = null;
 15589                   break starttagloop;
 15590                 case 42:
 15591                   $implicitlyCloseP(this$static);
 15592                   if (this$static.stack[this$static.currentPtr].group == 42) {
 15593                     $pop(this$static);
 15594                   }
 15595 
 15596                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15597                   attributes = null;
 15598                   break starttagloop;
 15599                 case 61:
 15600                   $implicitlyCloseP(this$static);
 15601                   $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15602                   attributes = null;
 15603                   break starttagloop;
 15604                 case 44:
 15605                   $implicitlyCloseP(this$static);
 15606                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15607                   this$static.needToDropLF = true;
 15608                   attributes = null;
 15609                   break starttagloop;
 15610                 case 9:
 15611                   if (this$static.formPointer) {
 15612                     break starttagloop;
 15613                   }
 15614                    else {
 15615                     $implicitlyCloseP(this$static);
 15616                     $appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes);
 15617                     attributes = null;
 15618                     break starttagloop;
 15619                   }
 15620 
 15621                 case 15:
 15622                 case 41:
 15623                   eltPos = this$static.currentPtr;
 15624                   for (;;) {
 15625                     node = this$static.stack[eltPos];
 15626                     if (node.group == group) {
 15627                       $generateImpliedEndTagsExceptFor(this$static, node.name_0);
 15628                       while (this$static.currentPtr >= eltPos) {
 15629                         $pop(this$static);
 15630                       }
 15631                       break;
 15632                     }
 15633                      else if (node.scoping || node.special && node.name_0 != 'p' && node.name_0 != 'address' && node.name_0 != 'div') {
 15634                       break;
 15635                     }
 15636                     --eltPos;
 15637                   }
 15638 
 15639                   $implicitlyCloseP(this$static);
 15640                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15641                   attributes = null;
 15642                   break starttagloop;
 15643                 case 30:
 15644                   $implicitlyCloseP(this$static);
 15645                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15646                   $setContentModelFlag_0(this$static.tokenizer, 3, elementName);
 15647                   attributes = null;
 15648                   break starttagloop;
 15649                 case 1:
 15650                   activeAPos = $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, 'a');
 15651                   if (activeAPos != -1) {
 15652                     activeA = this$static.listOfActiveFormattingElements[activeAPos];
 15653                     ++activeA.refcount;
 15654                     $adoptionAgencyEndTag(this$static, 'a');
 15655                     $removeFromStack_0(this$static, activeA);
 15656                     activeAPos = $findInListOfActiveFormattingElements(this$static, activeA);
 15657                     if (activeAPos != -1) {
 15658                       $removeFromListOfActiveFormattingElements(this$static, activeAPos);
 15659                     }
 15660                     --activeA.refcount;
 15661                   }
 15662 
 15663                   $reconstructTheActiveFormattingElements(this$static);
 15664                   $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15665                   attributes = null;
 15666                   break starttagloop;
 15667                 case 45:
 15668                 case 64:
 15669                   $reconstructTheActiveFormattingElements(this$static);
 15670                   $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15671                   attributes = null;
 15672                   break starttagloop;
 15673                 case 24:
 15674                   $reconstructTheActiveFormattingElements(this$static);
 15675                   if (2147483647 != $findLastInScope(this$static, 'nobr')) {
 15676                     $adoptionAgencyEndTag(this$static, 'nobr');
 15677                   }
 15678 
 15679                   $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15680                   attributes = null;
 15681                   break starttagloop;
 15682                 case 5:
 15683                   eltPos = $findLastInScope(this$static, name);
 15684                   if (eltPos != 2147483647) {
 15685                     $generateImpliedEndTags(this$static);
 15686                     while (this$static.currentPtr >= eltPos) {
 15687                       $pop(this$static);
 15688                     }
 15689                     $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
 15690                     continue starttagloop;
 15691                   }
 15692                    else {
 15693                     $reconstructTheActiveFormattingElements(this$static);
 15694                     $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15695                     $append_1(this$static, null);
 15696                     attributes = null;
 15697                     break starttagloop;
 15698                   }
 15699 
 15700                 case 63:
 15701                   $reconstructTheActiveFormattingElements(this$static);
 15702                   $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15703                   $append_1(this$static, null);
 15704                   attributes = null;
 15705                   break starttagloop;
 15706                 case 43:
 15707                   $reconstructTheActiveFormattingElements(this$static);
 15708                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15709                   $append_1(this$static, null);
 15710                   attributes = null;
 15711                   break starttagloop;
 15712                 case 38:
 15713                   $reconstructTheActiveFormattingElements(this$static);
 15714                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15715                   this$static.originalMode = this$static.mode;
 15716                   this$static.mode = 20;
 15717                   $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 15718                   attributes = null;
 15719                   break starttagloop;
 15720                 case 34:
 15721                   if (!this$static.quirks) {
 15722                     $implicitlyCloseP(this$static);
 15723                   }
 15724 
 15725                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15726                   this$static.mode = 7;
 15727                   attributes = null;
 15728                   break starttagloop;
 15729                 case 4:
 15730                 case 48:
 15731                 case 49:
 15732                   $reconstructTheActiveFormattingElements(this$static);
 15733                 case 55:
 15734                   $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15735                   selfClosing = false;
 15736                   attributes = null;
 15737                   break starttagloop;
 15738                 case 22:
 15739                   $implicitlyCloseP(this$static);
 15740                   $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15741                   selfClosing = false;
 15742                   attributes = null;
 15743                   break starttagloop;
 15744                 case 12:
 15745                   elementName = ($clinit_89() , IMG);
 15746                   continue starttagloop;
 15747                 case 65:
 15748                 case 13:
 15749                   $reconstructTheActiveFormattingElements(this$static);
 15750                   $appendVoidElementToCurrentMayFoster(this$static, 'http://www.w3.org/1999/xhtml', name, attributes);
 15751                   selfClosing = false;
 15752                   attributes = null;
 15753                   break starttagloop;
 15754                 case 14:
 15755                   if (this$static.formPointer) {
 15756                     break starttagloop;
 15757                   }
 15758 
 15759                   $implicitlyCloseP(this$static);
 15760                   formAttrs = $HtmlAttributes(new HtmlAttributes(), 0);
 15761                   actionIndex = $getIndex(attributes, ($clinit_87() , ACTION));
 15762                   if (actionIndex > -1) {
 15763                     $addAttribute(formAttrs, ACTION, $getValue(attributes, actionIndex), ($clinit_80() , ALLOW));
 15764                   }
 15765 
 15766                   $appendToCurrentNodeAndPushFormElementMayFoster(this$static, formAttrs);
 15767                   $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , HR), ($clinit_91() , EMPTY_ATTRIBUTES));
 15768                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', P, EMPTY_ATTRIBUTES);
 15769                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', LABEL_0, EMPTY_ATTRIBUTES);
 15770                   promptIndex = $getIndex(attributes, PROMPT);
 15771                   if (promptIndex > -1) {
 15772                     prompt = $toCharArray($getValue(attributes, promptIndex));
 15773                     $appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(prompt, 0, prompt.length));
 15774                   }
 15775                    else {
 15776                     $appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(ISINDEX_PROMPT, 0, ISINDEX_PROMPT.length));
 15777                   }
 15778 
 15779                   inputAttributes = $HtmlAttributes(new HtmlAttributes(), 0);
 15780                   $addAttribute(inputAttributes, NAME, 'isindex', ($clinit_80() , ALLOW));
 15781                   for (i = 0; i < attributes.length_0; ++i) {
 15782                     attributeQName = $getAttributeName(attributes, i);
 15783                     if (NAME == attributeQName || PROMPT == attributeQName) {
 15784                     }
 15785                      else if (ACTION != attributeQName) {
 15786                       $addAttribute(inputAttributes, attributeQName, $getValue(attributes, i), ALLOW);
 15787                     }
 15788                   }
 15789 
 15790                   $clearWithoutReleasingContents(attributes);
 15791                   $appendVoidElementToCurrentMayFoster(this$static, 'http://www.w3.org/1999/xhtml', 'input', inputAttributes);
 15792                   $pop(this$static);
 15793                   $pop(this$static);
 15794                   $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', HR, EMPTY_ATTRIBUTES);
 15795                   $pop(this$static);
 15796                   selfClosing = false;
 15797                   attributes = null;
 15798                   break starttagloop;
 15799                 case 35:
 15800                   $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15801                   $setContentModelFlag_0(this$static.tokenizer, 1, elementName);
 15802                   this$static.originalMode = this$static.mode;
 15803                   this$static.mode = 20;
 15804                   this$static.needToDropLF = true;
 15805                   attributes = null;
 15806                   break starttagloop;
 15807                 case 26:
 15808                   {
 15809                     $reconstructTheActiveFormattingElements(this$static);
 15810                     $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15811                     attributes = null;
 15812                     break starttagloop;
 15813                   }
 15814 
 15815                 case 25:
 15816                 case 47:
 15817                 case 60:
 15818                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15819                   this$static.originalMode = this$static.mode;
 15820                   this$static.mode = 20;
 15821                   $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 15822                   attributes = null;
 15823                   break starttagloop;
 15824                 case 32:
 15825                   $reconstructTheActiveFormattingElements(this$static);
 15826                   $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15827                   switch (this$static.mode) {
 15828                     case 7:
 15829                     case 8:
 15830                     case 9:
 15831                     case 10:
 15832                     case 11:
 15833                     case 12:
 15834                       this$static.mode = 14;
 15835                       break;
 15836                     default:this$static.mode = 13;
 15837                   }
 15838 
 15839                   attributes = null;
 15840                   break starttagloop;
 15841                 case 27:
 15842                 case 28:
 15843                   if ($findLastInScope(this$static, 'option') != 2147483647) {
 15844                     optionendtagloop: for (;;) {
 15845                       if ('option' == this$static.stack[this$static.currentPtr].name_0) {
 15846                         $pop(this$static);
 15847                         break optionendtagloop;
 15848                       }
 15849                       eltPos = this$static.currentPtr;
 15850                       for (;;) {
 15851                         if (this$static.stack[eltPos].name_0 == 'option') {
 15852                           $generateImpliedEndTags(this$static);
 15853                           while (this$static.currentPtr >= eltPos) {
 15854                             $pop(this$static);
 15855                           }
 15856                           break optionendtagloop;
 15857                         }
 15858                         --eltPos;
 15859                       }
 15860                     }
 15861                   }
 15862 
 15863                   $reconstructTheActiveFormattingElements(this$static);
 15864                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15865                   attributes = null;
 15866                   break starttagloop;
 15867                 case 53:
 15868                   eltPos = $findLastInScope(this$static, 'ruby');
 15869                   if (eltPos != 2147483647) {
 15870                     $generateImpliedEndTags(this$static);
 15871                   }
 15872 
 15873                   if (eltPos != this$static.currentPtr) {
 15874                     while (this$static.currentPtr > eltPos) {
 15875                       $pop(this$static);
 15876                     }
 15877                   }
 15878 
 15879                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15880                   attributes = null;
 15881                   break starttagloop;
 15882                 case 17:
 15883                   $reconstructTheActiveFormattingElements(this$static);
 15884                   attributes.mode = 1;
 15885                   if (selfClosing) {
 15886                     $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1998/Math/MathML', elementName, attributes);
 15887                     selfClosing = false;
 15888                   }
 15889                    else {
 15890                     $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1998/Math/MathML', elementName, attributes);
 15891                     this$static.foreignFlag = 0;
 15892                   }
 15893 
 15894                   attributes = null;
 15895                   break starttagloop;
 15896                 case 19:
 15897                   $reconstructTheActiveFormattingElements(this$static);
 15898                   attributes.mode = 2;
 15899                   if (selfClosing) {
 15900                     $appendVoidElementToCurrentMayFosterCamelCase(this$static, 'http://www.w3.org/2000/svg', elementName, attributes);
 15901                     selfClosing = false;
 15902                   }
 15903                    else {
 15904                     $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/2000/svg', elementName, attributes);
 15905                     this$static.foreignFlag = 0;
 15906                   }
 15907 
 15908                   attributes = null;
 15909                   break starttagloop;
 15910                 case 6:
 15911                 case 7:
 15912                 case 8:
 15913                 case 39:
 15914                 case 37:
 15915                 case 40:
 15916                 case 10:
 15917                 case 11:
 15918                 case 20:
 15919                   break starttagloop;
 15920                 case 62:
 15921                   $reconstructTheActiveFormattingElements(this$static);
 15922                   $appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15923                   attributes = null;
 15924                   break starttagloop;
 15925                 default:$reconstructTheActiveFormattingElements(this$static);
 15926                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15927                   attributes = null;
 15928                   break starttagloop;
 15929               }
 15930             }
 15931 
 15932           case 3:
 15933             inheadloop: for (;;) {
 15934               switch (group) {
 15935                 case 23:
 15936                   $processNonNcNames(attributes, this$static, this$static.namePolicy);
 15937                   $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 15938                   attributes = null;
 15939                   break starttagloop;
 15940                 case 2:
 15941                 case 54:
 15942                   $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15943                   selfClosing = false;
 15944                   attributes = null;
 15945                   break starttagloop;
 15946                 case 18:
 15947                 case 16:
 15948                   break inheadloop;
 15949                 case 36:
 15950                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15951                   this$static.originalMode = this$static.mode;
 15952                   this$static.mode = 20;
 15953                   $setContentModelFlag_0(this$static.tokenizer, 1, elementName);
 15954                   attributes = null;
 15955                   break starttagloop;
 15956                 case 26:
 15957                   {
 15958                     $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15959                     this$static.mode = 4;
 15960                   }
 15961 
 15962                   attributes = null;
 15963                   break starttagloop;
 15964                 case 31:
 15965                 case 33:
 15966                 case 25:
 15967                   $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15968                   this$static.originalMode = this$static.mode;
 15969                   this$static.mode = 20;
 15970                   $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 15971                   attributes = null;
 15972                   break starttagloop;
 15973                 case 20:
 15974                   break starttagloop;
 15975                 default:$pop(this$static);
 15976                   this$static.mode = 5;
 15977                   continue starttagloop;
 15978               }
 15979             }
 15980 
 15981           case 4:
 15982             switch (group) {
 15983               case 23:
 15984                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 15985                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 15986                 attributes = null;
 15987                 break starttagloop;
 15988               case 16:
 15989                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15990                 selfClosing = false;
 15991                 attributes = null;
 15992                 break starttagloop;
 15993               case 18:
 15994                 $checkMetaCharset(this$static, attributes);
 15995                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 15996                 selfClosing = false;
 15997                 attributes = null;
 15998                 break starttagloop;
 15999               case 33:
 16000               case 25:
 16001                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16002                 this$static.originalMode = this$static.mode;
 16003                 this$static.mode = 20;
 16004                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16005                 attributes = null;
 16006                 break starttagloop;
 16007               case 20:
 16008                 break starttagloop;
 16009               case 26:
 16010                 break starttagloop;
 16011               default:$pop(this$static);
 16012                 this$static.mode = 3;
 16013                 continue;
 16014             }
 16015 
 16016           case 9:
 16017             switch (group) {
 16018               case 23:
 16019                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16020                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16021                 attributes = null;
 16022                 break starttagloop;
 16023               case 7:
 16024                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16025                 selfClosing = false;
 16026                 attributes = null;
 16027                 break starttagloop;
 16028               default:if (this$static.currentPtr == 0) {
 16029                   break starttagloop;
 16030                 }
 16031 
 16032                 $pop(this$static);
 16033                 this$static.mode = 7;
 16034                 continue;
 16035             }
 16036 
 16037           case 14:
 16038             switch (group) {
 16039               case 6:
 16040               case 39:
 16041               case 37:
 16042               case 40:
 16043               case 34:
 16044                 $endSelect(this$static);
 16045                 continue;
 16046             }
 16047 
 16048           case 13:
 16049             switch (group) {
 16050               case 23:
 16051                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16052                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16053                 attributes = null;
 16054                 break starttagloop;
 16055               case 28:
 16056                 if ('option' == this$static.stack[this$static.currentPtr].name_0) {
 16057                   $pop(this$static);
 16058                 }
 16059 
 16060                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16061                 attributes = null;
 16062                 break starttagloop;
 16063               case 27:
 16064                 if ('option' == this$static.stack[this$static.currentPtr].name_0) {
 16065                   $pop(this$static);
 16066                 }
 16067 
 16068                 if ('optgroup' == this$static.stack[this$static.currentPtr].name_0) {
 16069                   $pop(this$static);
 16070                 }
 16071 
 16072                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16073                 attributes = null;
 16074                 break starttagloop;
 16075               case 32:
 16076                 eltPos = $findLastInTableScope(this$static, name);
 16077                 if (eltPos == 2147483647) {
 16078                   break starttagloop;
 16079                 }
 16080                  else {
 16081                   while (this$static.currentPtr >= eltPos) {
 16082                     $pop(this$static);
 16083                   }
 16084                   $resetTheInsertionMode(this$static);
 16085                   break starttagloop;
 16086                 }
 16087 
 16088               case 13:
 16089               case 35:
 16090                 $endSelect(this$static);
 16091                 continue;
 16092               case 31:
 16093                 $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16094                 this$static.originalMode = this$static.mode;
 16095                 this$static.mode = 20;
 16096                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16097                 attributes = null;
 16098                 break starttagloop;
 16099               default:break starttagloop;
 16100             }
 16101 
 16102           case 15:
 16103             switch (group) {
 16104               case 23:
 16105                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16106                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16107                 attributes = null;
 16108                 break starttagloop;
 16109               default:this$static.mode = 6;
 16110                 continue;
 16111             }
 16112 
 16113           case 16:
 16114             switch (group) {
 16115               case 11:
 16116                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16117                 attributes = null;
 16118                 break starttagloop;
 16119               case 10:
 16120                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16121                 selfClosing = false;
 16122                 attributes = null;
 16123                 break starttagloop;
 16124             }
 16125 
 16126           case 17:
 16127             switch (group) {
 16128               case 23:
 16129                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16130                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16131                 attributes = null;
 16132                 break starttagloop;
 16133               case 25:
 16134                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16135                 this$static.originalMode = this$static.mode;
 16136                 this$static.mode = 20;
 16137                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16138                 attributes = null;
 16139                 break starttagloop;
 16140               default:break starttagloop;
 16141             }
 16142 
 16143           case 0:
 16144             $documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
 16145             this$static.mode = 1;
 16146             continue;
 16147           case 1:
 16148             switch (group) {
 16149               case 23:
 16150                 if (attributes == ($clinit_91() , EMPTY_ATTRIBUTES)) {
 16151                   $appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
 16152                 }
 16153                  else {
 16154                   $appendHtmlElementToDocumentAndPush(this$static, attributes);
 16155                 }
 16156 
 16157                 this$static.mode = 2;
 16158                 attributes = null;
 16159                 break starttagloop;
 16160               default:$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
 16161                 this$static.mode = 2;
 16162                 continue;
 16163             }
 16164 
 16165           case 2:
 16166             switch (group) {
 16167               case 23:
 16168                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16169                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16170                 attributes = null;
 16171                 break starttagloop;
 16172               case 20:
 16173                 $appendToCurrentNodeAndPushHeadElement(this$static, attributes);
 16174                 this$static.mode = 3;
 16175                 attributes = null;
 16176                 break starttagloop;
 16177               default:$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
 16178                 this$static.mode = 3;
 16179                 continue;
 16180             }
 16181 
 16182           case 5:
 16183             switch (group) {
 16184               case 23:
 16185                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16186                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16187                 attributes = null;
 16188                 break starttagloop;
 16189               case 3:
 16190                 if (attributes.length_0 == 0) {
 16191                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
 16192                 }
 16193                  else {
 16194                   $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), attributes);
 16195                 }
 16196 
 16197                 this$static.mode = 21;
 16198                 attributes = null;
 16199                 break starttagloop;
 16200               case 11:
 16201                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16202                 this$static.mode = 16;
 16203                 attributes = null;
 16204                 break starttagloop;
 16205               case 2:
 16206                 $pushHeadPointerOntoStack(this$static);
 16207                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16208                 selfClosing = false;
 16209                 $pop(this$static);
 16210                 attributes = null;
 16211                 break starttagloop;
 16212               case 16:
 16213                 $pushHeadPointerOntoStack(this$static);
 16214                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16215                 selfClosing = false;
 16216                 $pop(this$static);
 16217                 attributes = null;
 16218                 break starttagloop;
 16219               case 18:
 16220                 $checkMetaCharset(this$static, attributes);
 16221                 $pushHeadPointerOntoStack(this$static);
 16222                 $appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16223                 selfClosing = false;
 16224                 $pop(this$static);
 16225                 attributes = null;
 16226                 break starttagloop;
 16227               case 31:
 16228                 $pushHeadPointerOntoStack(this$static);
 16229                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16230                 this$static.originalMode = this$static.mode;
 16231                 this$static.mode = 20;
 16232                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16233                 attributes = null;
 16234                 break starttagloop;
 16235               case 33:
 16236               case 25:
 16237                 $pushHeadPointerOntoStack(this$static);
 16238                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16239                 this$static.originalMode = this$static.mode;
 16240                 this$static.mode = 20;
 16241                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16242                 attributes = null;
 16243                 break starttagloop;
 16244               case 36:
 16245                 $pushHeadPointerOntoStack(this$static);
 16246                 $appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16247                 this$static.originalMode = this$static.mode;
 16248                 this$static.mode = 20;
 16249                 $setContentModelFlag_0(this$static.tokenizer, 1, elementName);
 16250                 attributes = null;
 16251                 break starttagloop;
 16252               case 20:
 16253                 break starttagloop;
 16254               default:$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
 16255                 this$static.mode = 21;
 16256                 continue;
 16257             }
 16258 
 16259           case 18:
 16260             switch (group) {
 16261               case 23:
 16262                 $processNonNcNames(attributes, this$static, this$static.namePolicy);
 16263                 $addAttributesToElement(this$static, this$static.stack[0].node, attributes);
 16264                 attributes = null;
 16265                 break starttagloop;
 16266               default:this$static.mode = 6;
 16267                 continue;
 16268             }
 16269 
 16270           case 19:
 16271             switch (group) {
 16272               case 25:
 16273                 $appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
 16274                 this$static.originalMode = this$static.mode;
 16275                 this$static.mode = 20;
 16276                 $setContentModelFlag_0(this$static.tokenizer, 2, elementName);
 16277                 attributes = null;
 16278                 break starttagloop;
 16279               default:break starttagloop;
 16280             }
 16281 
 16282         }
 16283 
 16284     }
 16285   }
 16286   if (needsPostProcessing && this$static.foreignFlag == 0 && !$hasForeignInScope(this$static)) {
 16287     this$static.foreignFlag = 1;
 16288   }
 16289   attributes != ($clinit_91() , EMPTY_ATTRIBUTES);
 16290 }
 16291 
 16292 function $startTokenization(this$static, self){
 16293   var elt, node;
 16294   this$static.tokenizer = self;
 16295   this$static.stack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, 64, 0);
 16296   this$static.listOfActiveFormattingElements = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, 64, 0);
 16297   this$static.needToDropLF = false;
 16298   this$static.originalMode = 0;
 16299   this$static.currentPtr = -1;
 16300   this$static.listPtr = -1;
 16301   this$static.formPointer = null;
 16302   this$static.headPointer = null;
 16303   this$static.html4 = false;
 16304   $clearImpl(this$static.idLocations);
 16305   this$static.wantingComments = this$static.wantingComments;
 16306   this$static.script = null;
 16307   this$static.placeholder = null;
 16308   this$static.readyToRun = false;
 16309   this$static.charBufferLen = 0;
 16310   this$static.charBuffer = initDim(_3C_classLit, 42, -1, 1024, 1);
 16311   if (this$static.fragment) {
 16312     elt = $createHtmlElementSetAsRoot(this$static, $emptyAttributes(this$static.tokenizer));
 16313     node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HTML_0), elt);
 16314     ++this$static.currentPtr;
 16315     this$static.stack[this$static.currentPtr] = node;
 16316     $resetTheInsertionMode(this$static);
 16317     if ('title' == this$static.contextName || 'textarea' == this$static.contextName) {
 16318       $setContentModelFlag(this$static.tokenizer, 1);
 16319     }
 16320      else if ('style' == this$static.contextName || 'script' == this$static.contextName || 'xmp' == this$static.contextName || 'iframe' == this$static.contextName || 'noembed' == this$static.contextName || 'noframes' == this$static.contextName) {
 16321       $setContentModelFlag(this$static.tokenizer, 2);
 16322     }
 16323      else if ('plaintext' == this$static.contextName) {
 16324       $setContentModelFlag(this$static.tokenizer, 3);
 16325     }
 16326      else {
 16327       $setContentModelFlag(this$static.tokenizer, 0);
 16328     }
 16329     this$static.contextName = null;
 16330   }
 16331    else {
 16332     this$static.mode = 0;
 16333     this$static.foreignFlag = 1;
 16334   }
 16335 }
 16336 
 16337 function extractCharsetFromContent(attributeValue){
 16338   var buffer, c, charset, charsetState, end, i, start;
 16339   charsetState = 0;
 16340   start = -1;
 16341   end = -1;
 16342   buffer = $toCharArray(attributeValue);
 16343   charsetloop: for (i = 0; i < buffer.length; ++i) {
 16344     c = buffer[i];
 16345     switch (charsetState) {
 16346       case 0:
 16347         switch (c) {
 16348           case 99:
 16349           case 67:
 16350             charsetState = 1;
 16351             continue;
 16352           default:continue;
 16353         }
 16354 
 16355       case 1:
 16356         switch (c) {
 16357           case 104:
 16358           case 72:
 16359             charsetState = 2;
 16360             continue;
 16361           default:charsetState = 0;
 16362             continue;
 16363         }
 16364 
 16365       case 2:
 16366         switch (c) {
 16367           case 97:
 16368           case 65:
 16369             charsetState = 3;
 16370             continue;
 16371           default:charsetState = 0;
 16372             continue;
 16373         }
 16374 
 16375       case 3:
 16376         switch (c) {
 16377           case 114:
 16378           case 82:
 16379             charsetState = 4;
 16380             continue;
 16381           default:charsetState = 0;
 16382             continue;
 16383         }
 16384 
 16385       case 4:
 16386         switch (c) {
 16387           case 115:
 16388           case 83:
 16389             charsetState = 5;
 16390             continue;
 16391           default:charsetState = 0;
 16392             continue;
 16393         }
 16394 
 16395       case 5:
 16396         switch (c) {
 16397           case 101:
 16398           case 69:
 16399             charsetState = 6;
 16400             continue;
 16401           default:charsetState = 0;
 16402             continue;
 16403         }
 16404 
 16405       case 6:
 16406         switch (c) {
 16407           case 116:
 16408           case 84:
 16409             charsetState = 7;
 16410             continue;
 16411           default:charsetState = 0;
 16412             continue;
 16413         }
 16414 
 16415       case 7:
 16416         switch (c) {
 16417           case 9:
 16418           case 10:
 16419           case 12:
 16420           case 13:
 16421           case 32:
 16422             continue;
 16423           case 61:
 16424             charsetState = 8;
 16425             continue;
 16426           default:return null;
 16427         }
 16428 
 16429       case 8:
 16430         switch (c) {
 16431           case 9:
 16432           case 10:
 16433           case 12:
 16434           case 13:
 16435           case 32:
 16436             continue;
 16437           case 39:
 16438             start = i + 1;
 16439             charsetState = 9;
 16440             continue;
 16441           case 34:
 16442             start = i + 1;
 16443             charsetState = 10;
 16444             continue;
 16445           default:start = i;
 16446             charsetState = 11;
 16447             continue;
 16448         }
 16449 
 16450       case 9:
 16451         switch (c) {
 16452           case 39:
 16453             end = i;
 16454             break charsetloop;
 16455           default:continue;
 16456         }
 16457 
 16458       case 10:
 16459         switch (c) {
 16460           case 34:
 16461             end = i;
 16462             break charsetloop;
 16463           default:continue;
 16464         }
 16465 
 16466       case 11:
 16467         switch (c) {
 16468           case 9:
 16469           case 10:
 16470           case 12:
 16471           case 13:
 16472           case 32:
 16473           case 59:
 16474             end = i;
 16475             break charsetloop;
 16476           default:continue;
 16477         }
 16478 
 16479     }
 16480   }
 16481   charset = null;
 16482   if (start != -1) {
 16483     if (end == -1) {
 16484       end = buffer.length;
 16485     }
 16486     charset = valueOf_1(buffer, start, end - start);
 16487   }
 16488   return charset;
 16489 }
 16490 
 16491 function getClass_57(){
 16492   return Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit;
 16493 }
 16494 
 16495 function TreeBuilder(){
 16496 }
 16497 
 16498 _ = TreeBuilder.prototype = new Object_0();
 16499 _.getClass$ = getClass_57;
 16500 _.typeId$ = 0;
 16501 _.charBuffer = null;
 16502 _.charBufferLen = 0;
 16503 _.contextName = null;
 16504 _.contextNamespace = null;
 16505 _.currentPtr = -1;
 16506 _.foreignFlag = 1;
 16507 _.formPointer = null;
 16508 _.fragment = false;
 16509 _.headPointer = null;
 16510 _.html4 = false;
 16511 _.listOfActiveFormattingElements = null;
 16512 _.listPtr = -1;
 16513 _.mode = 0;
 16514 _.needToDropLF = false;
 16515 _.originalMode = 0;
 16516 _.quirks = false;
 16517 _.stack = null;
 16518 _.tokenizer = null;
 16519 _.wantingComments = false;
 16520 var HTML4_PUBLIC_IDS, ISINDEX_PROMPT, QUIRKY_PUBLIC_IDS;
 16521 function $clinit_88(){
 16522   $clinit_88 = nullMethod;
 16523   $clinit_98();
 16524 }
 16525 
 16526 function $accumulateCharacters(this$static, buf, start, length){
 16527   var newBuf, newLen;
 16528   newLen = this$static.charBufferLen + length;
 16529   if (newLen > this$static.charBuffer.length) {
 16530     newBuf = initDim(_3C_classLit, 42, -1, newLen, 1);
 16531     arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
 16532     this$static.charBuffer = newBuf;
 16533   }
 16534   arraycopy(buf, start, this$static.charBuffer, this$static.charBufferLen, length);
 16535   this$static.charBufferLen = newLen;
 16536 }
 16537 
 16538 function $insertFosterParentedCharacters_0(this$static, buf, start, length, table, stackParent){
 16539   var end;
 16540   $insertFosterParentedCharacters(this$static, (end = start + length , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)), table, stackParent);
 16541 }
 16542 
 16543 function getClass_50(){
 16544   return Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit;
 16545 }
 16546 
 16547 function CoalescingTreeBuilder(){
 16548 }
 16549 
 16550 _ = CoalescingTreeBuilder.prototype = new TreeBuilder();
 16551 _.getClass$ = getClass_50;
 16552 _.typeId$ = 0;
 16553 function $clinit_82(){
 16554   $clinit_82 = nullMethod;
 16555   $clinit_88();
 16556 }
 16557 
 16558 function $BrowserTreeBuilder(this$static, document_0){
 16559   $clinit_82();
 16560   this$static.doctypeExpectation = ($clinit_77() , HTML);
 16561   this$static.namePolicy = ($clinit_80() , ALTER_INFOSET);
 16562   this$static.idLocations = $HashMap(new HashMap());
 16563   this$static.fragment = false;
 16564   this$static.scriptStack = $LinkedList(new LinkedList());
 16565   this$static.document_0 = document_0;
 16566   installExplorerCreateElementNS(document_0);
 16567   return this$static;
 16568 }
 16569 
 16570 function $addAttributesToElement(this$static, element, attributes){
 16571   var $e0, e, i, localName, uri;
 16572   try {
 16573     for (i = 0; i < attributes.length_0; ++i) {
 16574       localName = $getLocalName(attributes, i);
 16575       uri = $getURI(attributes, i);
 16576       if (!element.hasAttributeNS(uri, localName)) {
 16577         element.setAttributeNS(uri, localName, $getValue(attributes, i));
 16578       }
 16579     }
 16580   }
 16581    catch ($e0) {
 16582     $e0 = caught($e0);
 16583     if (instanceOf($e0, 19)) {
 16584       e = $e0;
 16585       $fatal_0(this$static, e);
 16586     }
 16587      else 
 16588       throw $e0;
 16589   }
 16590 }
 16591 
 16592 function $appendCharacters(this$static, parent, text){
 16593   var $e0, e;
 16594   try {
 16595     if (parent == this$static.placeholder) {
 16596       this$static.script.appendChild(this$static.document_0.createTextNode(text));
 16597     }
 16598     parent.appendChild(this$static.document_0.createTextNode(text));
 16599   }
 16600    catch ($e0) {
 16601     $e0 = caught($e0);
 16602     if (instanceOf($e0, 19)) {
 16603       e = $e0;
 16604       $fatal_0(this$static, e);
 16605     }
 16606      else 
 16607       throw $e0;
 16608   }
 16609 }
 16610 
 16611 function $appendChildrenToNewParent(this$static, oldParent, newParent){
 16612   var $e0, e;
 16613   try {
 16614     while (oldParent.hasChildNodes()) {
 16615       newParent.appendChild(oldParent.firstChild);
 16616     }
 16617   }
 16618    catch ($e0) {
 16619     $e0 = caught($e0);
 16620     if (instanceOf($e0, 19)) {
 16621       e = $e0;
 16622       $fatal_0(this$static, e);
 16623     }
 16624      else 
 16625       throw $e0;
 16626   }
 16627 }
 16628 
 16629 function $appendComment(this$static, parent, comment){
 16630   var $e0, e;
 16631   try {
 16632     if (parent == this$static.placeholder) {
 16633       this$static.script.appendChild(this$static.document_0.createComment(comment));
 16634     }
 16635     parent.appendChild(this$static.document_0.createComment(comment));
 16636   }
 16637    catch ($e0) {
 16638     $e0 = caught($e0);
 16639     if (instanceOf($e0, 19)) {
 16640       e = $e0;
 16641       $fatal_0(this$static, e);
 16642     }
 16643      else 
 16644       throw $e0;
 16645   }
 16646 }
 16647 
 16648 function $appendCommentToDocument(this$static, comment){
 16649   var $e0, e;
 16650   try {
 16651     this$static.document_0.appendChild(this$static.document_0.createComment(comment));
 16652   }
 16653    catch ($e0) {
 16654     $e0 = caught($e0);
 16655     if (instanceOf($e0, 19)) {
 16656       e = $e0;
 16657       $fatal_0(this$static, e);
 16658     }
 16659      else 
 16660       throw $e0;
 16661   }
 16662 }
 16663 
 16664 function $appendElement(this$static, child, newParent){
 16665   var $e0, e;
 16666   try {
 16667     if (newParent == this$static.placeholder) {
 16668       this$static.script.appendChild(child.cloneNode(true));
 16669     }
 16670     newParent.appendChild(child);
 16671   }
 16672    catch ($e0) {
 16673     $e0 = caught($e0);
 16674     if (instanceOf($e0, 19)) {
 16675       e = $e0;
 16676       $fatal_0(this$static, e);
 16677     }
 16678      else 
 16679       throw $e0;
 16680   }
 16681 }
 16682 
 16683 function $createElement(this$static, ns, name, attributes){
 16684   var $e0, e, i, rv;
 16685   try {
 16686     rv = this$static.document_0.createElementNS(ns, name);
 16687     for (i = 0; i < attributes.length_0; ++i) {
 16688       rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
 16689     }
 16690     if ('script' == name) {
 16691       if (this$static.placeholder) {
 16692         $addLast(this$static.scriptStack, $BrowserTreeBuilder$ScriptHolder(new BrowserTreeBuilder$ScriptHolder(), this$static.script, this$static.placeholder));
 16693       }
 16694       this$static.script = rv;
 16695       this$static.placeholder = this$static.document_0.createElementNS('http://n.validator.nu/placeholder/', 'script');
 16696       rv = this$static.placeholder;
 16697       for (i = 0; i < attributes.length_0; ++i) {
 16698         rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
 16699       }
 16700     }
 16701     return rv;
 16702   }
 16703    catch ($e0) {
 16704     $e0 = caught($e0);
 16705     if (instanceOf($e0, 19)) {
 16706       e = $e0;
 16707       $fatal_0(this$static, e);
 16708       throw $RuntimeException(new RuntimeException(), 'Unreachable');
 16709     }
 16710      else 
 16711       throw $e0;
 16712   }
 16713 }
 16714 
 16715 function $createElement_0(this$static, ns, name, attributes){
 16716   var $e0, e, rv;
 16717   try {
 16718     rv = $createElement(this$static, ns, name, attributes);
 16719     return rv;
 16720   }
 16721    catch ($e0) {
 16722     $e0 = caught($e0);
 16723     if (instanceOf($e0, 19)) {
 16724       e = $e0;
 16725       $fatal_0(this$static, e);
 16726       return null;
 16727     }
 16728      else 
 16729       throw $e0;
 16730   }
 16731 }
 16732 
 16733 function $createHtmlElementSetAsRoot(this$static, attributes){
 16734   var $e0, e, i, rv;
 16735   try {
 16736     rv = this$static.document_0.createElementNS('http://www.w3.org/1999/xhtml', 'html');
 16737     for (i = 0; i < attributes.length_0; ++i) {
 16738       rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
 16739     }
 16740     this$static.document_0.appendChild(rv);
 16741     return rv;
 16742   }
 16743    catch ($e0) {
 16744     $e0 = caught($e0);
 16745     if (instanceOf($e0, 19)) {
 16746       e = $e0;
 16747       $fatal_0(this$static, e);
 16748       throw $RuntimeException(new RuntimeException(), 'Unreachable');
 16749     }
 16750      else 
 16751       throw $e0;
 16752   }
 16753 }
 16754 
 16755 function $detachFromParent(this$static, element){
 16756   var $e0, e, parent;
 16757   try {
 16758     parent = element.parentNode;
 16759     if (parent) {
 16760       parent.removeChild(element);
 16761     }
 16762   }
 16763    catch ($e0) {
 16764     $e0 = caught($e0);
 16765     if (instanceOf($e0, 19)) {
 16766       e = $e0;
 16767       $fatal_0(this$static, e);
 16768     }
 16769      else 
 16770       throw $e0;
 16771   }
 16772 }
 16773 
 16774 function $elementPopped(this$static, ns, name, node){
 16775   if (node == this$static.placeholder) {
 16776     this$static.readyToRun = true;
 16777     this$static.tokenizer.shouldSuspend = true;
 16778   }
 16779   __elementPopped__(ns, name, node);
 16780 }
 16781 
 16782 function $getDocument(this$static){
 16783   var rv;
 16784   rv = this$static.document_0;
 16785   this$static.document_0 = null;
 16786   return rv;
 16787 }
 16788 
 16789 function $insertFosterParentedCharacters(this$static, text, table, stackParent){
 16790   var $e0, child, e, parent;
 16791   try {
 16792     child = this$static.document_0.createTextNode(text);
 16793     parent = table.parentNode;
 16794     if (!!parent && parent.nodeType == 1) {
 16795       parent.insertBefore(child, table);
 16796     }
 16797      else {
 16798       stackParent.appendChild(child);
 16799     }
 16800   }
 16801    catch ($e0) {
 16802     $e0 = caught($e0);
 16803     if (instanceOf($e0, 19)) {
 16804       e = $e0;
 16805       $fatal_0(this$static, e);
 16806     }
 16807      else 
 16808       throw $e0;
 16809   }
 16810 }
 16811 
 16812 function $insertFosterParentedChild(this$static, child, table, stackParent){
 16813   var $e0, e, parent;
 16814   parent = table.parentNode;
 16815   try {
 16816     if (!!parent && parent.nodeType == 1) {
 16817       parent.insertBefore(child, table);
 16818     }
 16819      else {
 16820       stackParent.appendChild(child);
 16821     }
 16822   }
 16823    catch ($e0) {
 16824     $e0 = caught($e0);
 16825     if (instanceOf($e0, 19)) {
 16826       e = $e0;
 16827       $fatal_0(this$static, e);
 16828     }
 16829      else 
 16830       throw $e0;
 16831   }
 16832 }
 16833 
 16834 function $maybeRunScript(this$static){
 16835   var scriptHolder;
 16836   if (this$static.readyToRun) {
 16837     this$static.readyToRun = false;
 16838     replace_0(this$static.placeholder, this$static.script);
 16839     if (this$static.scriptStack.size == 0) {
 16840       this$static.script = null;
 16841       this$static.placeholder = null;
 16842     }
 16843      else {
 16844       scriptHolder = dynamicCast($removeLast(this$static.scriptStack), 20);
 16845       this$static.script = scriptHolder.script;
 16846       this$static.placeholder = scriptHolder.placeholder;
 16847     }
 16848   }
 16849 }
 16850 
 16851 function getClass_45(){
 16852   return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit;
 16853 }
 16854 
 16855 function installExplorerCreateElementNS(doc){
 16856   if (!doc.createElementNS) {
 16857     doc.createElementNS = function(uri, local){
 16858       if ('http://www.w3.org/1999/xhtml' == uri) {
 16859         return doc.createElement(local);
 16860       }
 16861        else if ('http://www.w3.org/1998/Math/MathML' == uri) {
 16862         if (!doc.mathplayerinitialized) {
 16863           var obj = document.createElement('object');
 16864           obj.setAttribute('id', 'mathplayer');
 16865           obj.setAttribute('classid', 'clsid:32F66A20-7614-11D4-BD11-00104BD3F987');
 16866           document.getElementsByTagName('head')[0].appendChild(obj);
 16867           document.namespaces.add('m', 'http://www.w3.org/1998/Math/MathML', '#mathplayer');
 16868           doc.mathplayerinitialized = true;
 16869         }
 16870         return doc.createElement('m:' + local);
 16871       }
 16872        else if ('http://www.w3.org/2000/svg' == uri) {
 16873         if (!doc.renesisinitialized) {
 16874           var obj = document.createElement('object');
 16875           obj.setAttribute('id', 'renesis');
 16876           obj.setAttribute('classid', 'clsid:AC159093-1683-4BA2-9DCF-0C350141D7F2');
 16877           document.getElementsByTagName('head')[0].appendChild(obj);
 16878           document.namespaces.add('s', 'http://www.w3.org/2000/svg', '#renesis');
 16879           doc.renesisinitialized = true;
 16880         }
 16881         return doc.createElement('s:' + local);
 16882       }
 16883        else {
 16884       }
 16885     }
 16886     ;
 16887   }
 16888 }
 16889 
 16890 function replace_0(oldNode, newNode){
 16891   oldNode.parentNode.replaceChild(newNode, oldNode);
 16892   __elementPopped__('', newNode.nodeName, newNode);
 16893 }
 16894 
 16895 function BrowserTreeBuilder(){
 16896 }
 16897 
 16898 _ = BrowserTreeBuilder.prototype = new CoalescingTreeBuilder();
 16899 _.getClass$ = getClass_45;
 16900 _.typeId$ = 0;
 16901 _.document_0 = null;
 16902 _.placeholder = null;
 16903 _.readyToRun = false;
 16904 _.script = null;
 16905 function $BrowserTreeBuilder$ScriptHolder(this$static, script, placeholder){
 16906   this$static.script = script;
 16907   this$static.placeholder = placeholder;
 16908   return this$static;
 16909 }
 16910 
 16911 function getClass_44(){
 16912   return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit;
 16913 }
 16914 
 16915 function BrowserTreeBuilder$ScriptHolder(){
 16916 }
 16917 
 16918 _ = BrowserTreeBuilder$ScriptHolder.prototype = new Object_0();
 16919 _.getClass$ = getClass_44;
 16920 _.typeId$ = 34;
 16921 _.placeholder = null;
 16922 _.script = null;
 16923 function $HtmlParser(this$static, document_0){
 16924   this$static.documentWriteBuffer = $StringBuilder(new StringBuilder());
 16925   this$static.bufferStack = $LinkedList(new LinkedList());
 16926   this$static.domTreeBuilder = $BrowserTreeBuilder(new BrowserTreeBuilder(), document_0);
 16927   this$static.tokenizer = $ErrorReportingTokenizer(new ErrorReportingTokenizer(), this$static.domTreeBuilder);
 16928   this$static.domTreeBuilder.namePolicy = ($clinit_80() , ALTER_INFOSET);
 16929   this$static.tokenizer.commentPolicy = ALTER_INFOSET;
 16930   this$static.tokenizer.contentNonXmlCharPolicy = ALTER_INFOSET;
 16931   this$static.tokenizer.contentSpacePolicy = ALTER_INFOSET;
 16932   this$static.tokenizer.namePolicy = ALTER_INFOSET;
 16933   $setXmlnsPolicy(this$static.tokenizer, ALTER_INFOSET);
 16934   return this$static;
 16935 }
 16936 
 16937 function $parse(this$static, source, useSetTimeouts, callback){
 16938   this$static.parseEndListener = callback;
 16939   $setFragmentContext(this$static.domTreeBuilder, null);
 16940   this$static.lastWasCR = false;
 16941   this$static.ending = false;
 16942   $setLength(this$static.documentWriteBuffer, 0);
 16943   this$static.streamLength = source.length;
 16944   this$static.stream = $UTF16Buffer(new UTF16Buffer(), $toCharArray(source), 0, this$static.streamLength < 512?this$static.streamLength:512);
 16945   $clear(this$static.bufferStack);
 16946   $addLast(this$static.bufferStack, this$static.stream);
 16947   $setFragmentContext(this$static.domTreeBuilder, null);
 16948   $start_0(this$static.tokenizer);
 16949   $pump(this$static, useSetTimeouts);
 16950 }
 16951 
 16952 function $pump(this$static, useSetTimeouts){
 16953   var $e0, buffer, docWriteLen, newBuf, newEnd, timer;
 16954   if (this$static.ending) {
 16955     $end(this$static.tokenizer);
 16956     $getDocument(this$static.domTreeBuilder);
 16957     this$static.parseEndListener.callback();
 16958     return;
 16959   }
 16960   docWriteLen = this$static.documentWriteBuffer.stringLength;
 16961   if (docWriteLen > 0) {
 16962     newBuf = initDim(_3C_classLit, 42, -1, docWriteLen, 1);
 16963     $getChars(this$static.documentWriteBuffer, 0, docWriteLen, newBuf, 0);
 16964     $addLast(this$static.bufferStack, $UTF16Buffer(new UTF16Buffer(), newBuf, 0, docWriteLen));
 16965     $setLength(this$static.documentWriteBuffer, 0);
 16966   }
 16967   for (;;) {
 16968     buffer = dynamicCast($getLast(this$static.bufferStack), 21);
 16969     if (buffer.start >= buffer.end) {
 16970       if (buffer == this$static.stream) {
 16971         if (buffer.end == this$static.streamLength) {
 16972           $eof(this$static.tokenizer);
 16973           this$static.ending = true;
 16974           break;
 16975         }
 16976          else {
 16977           newEnd = buffer.start + 512;
 16978           buffer.end = newEnd < this$static.streamLength?newEnd:this$static.streamLength;
 16979           continue;
 16980         }
 16981       }
 16982        else {
 16983         dynamicCast($removeLast(this$static.bufferStack), 21);
 16984         continue;
 16985       }
 16986     }
 16987     $adjust(buffer, this$static.lastWasCR);
 16988     this$static.lastWasCR = false;
 16989     if (buffer.start < buffer.end) {
 16990       this$static.lastWasCR = $tokenizeBuffer(this$static.tokenizer, buffer);
 16991       $maybeRunScript(this$static.domTreeBuilder);
 16992       break;
 16993     }
 16994      else {
 16995       continue;
 16996     }
 16997   }
 16998   if (useSetTimeouts) {
 16999     timer = $HtmlParser$1(new HtmlParser$1(), this$static);
 17000     $schedule(timer, 1);
 17001   }
 17002    else {
 17003     try {
 17004       $pump(this$static, false);
 17005     }
 17006      catch ($e0) {
 17007       $e0 = caught($e0);
 17008       if (instanceOf($e0, 22)) {
 17009         this$static.ending = true;
 17010       }
 17011        else 
 17012         throw $e0;
 17013     }
 17014   }
 17015 }
 17016 
 17017 function documentWrite(text){
 17018   var buffer;
 17019   buffer = $UTF16Buffer(new UTF16Buffer(), $toCharArray(text), 0, text.length);
 17020   while (buffer.start < buffer.end) {
 17021     $adjust(buffer, this.lastWasCR);
 17022     this.lastWasCR = false;
 17023     if (buffer.start < buffer.end) {
 17024       this.lastWasCR = $tokenizeBuffer(this.tokenizer, buffer);
 17025       $maybeRunScript(this.domTreeBuilder);
 17026     }
 17027   }
 17028 }
 17029 
 17030 function getClass_47(){
 17031   return Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit;
 17032 }
 17033 
 17034 function HtmlParser(){
 17035 }
 17036 
 17037 _ = HtmlParser.prototype = new Object_0();
 17038 _.documentWrite = documentWrite;
 17039 _.getClass$ = getClass_47;
 17040 _.typeId$ = 0;
 17041 _.domTreeBuilder = null;
 17042 _.ending = false;
 17043 _.lastWasCR = false;
 17044 _.parseEndListener = null;
 17045 _.stream = null;
 17046 _.streamLength = 0;
 17047 _.tokenizer = null;
 17048 function $clinit_83(){
 17049   $clinit_83 = nullMethod;
 17050   $clinit_12();
 17051 }
 17052 
 17053 function $HtmlParser$1(this$static, this$0){
 17054   $clinit_83();
 17055   this$static.this$0 = this$0;
 17056   return this$static;
 17057 }
 17058 
 17059 function $run(this$static){
 17060   var $e0;
 17061   // try {
 17062     $pump(this$static.this$0, true);
 17063   /*}
 17064    catch ($e0) {
 17065     $e0 = caught($e0);
 17066     if (instanceOf($e0, 22)) {
 17067       this$static.this$0.ending = true;
 17068     }
 17069      else 
 17070       throw $e0;
 17071   } */
 17072 }
 17073 
 17074 function getClass_46(){
 17075   return Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit;
 17076 }
 17077 
 17078 function HtmlParser$1(){
 17079 }
 17080 
 17081 _ = HtmlParser$1.prototype = new Timer();
 17082 _.getClass$ = getClass_46;
 17083 _.typeId$ = 35;
 17084 _.this$0 = null;
 17085 function installDocWrite(doc, parser){
 17086   doc.write = function(){
 17087     if (arguments.length == 0) {
 17088       return;
 17089     }
 17090     var text = arguments[0];
 17091     for (var i = 1; i < arguments.length; i++) {
 17092       text += arguments[i];
 17093     }
 17094     parser.documentWrite(text);
 17095   }
 17096   ;
 17097   doc.writeln = function(){
 17098     if (arguments.length == 0) {
 17099       parser.documentWrite('\n');
 17100       return;
 17101     }
 17102     var text = arguments[0];
 17103     for (var i = 1; i < arguments.length; i++) {
 17104       text += arguments[i];
 17105     }
 17106     text += '\n';
 17107     parser.documentWrite(text);
 17108   }
 17109   ;
 17110 }
 17111 
 17112 function parseHtmlDocument(source, document_0, useSetTimeouts, readyCallback, errorHandler){
 17113   var parser;
 17114   if (!readyCallback) {
 17115     readyCallback = createFunction();
 17116   }
 17117   zapChildren(document_0);
 17118   parser = $HtmlParser(new HtmlParser(), document_0);
 17119   installDocWrite(document_0, parser);
 17120   $parse(parser, source, useSetTimeouts, $ParseEndListener(new ParseEndListener(), readyCallback));
 17121 }
 17122 
 17123 function zapChildren(node){
 17124   while (node.hasChildNodes()) {
 17125     node.removeChild(node.lastChild);
 17126   }
 17127 }
 17128 
 17129 function $ParseEndListener(this$static, callback){
 17130   this$static.callback = callback;
 17131   return this$static;
 17132 }
 17133 
 17134 function getClass_48(){
 17135   return Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit;
 17136 }
 17137 
 17138 function ParseEndListener(){
 17139 }
 17140 
 17141 _ = ParseEndListener.prototype = new Object_0();
 17142 _.getClass$ = getClass_48;
 17143 _.typeId$ = 0;
 17144 _.callback = null;
 17145 function $clinit_87(){
 17146   var arr_32;
 17147   $clinit_87 = nullMethod;
 17148   ALL_NO_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', '', '', '']);
 17149   XMLNS_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/2000/xmlns/', 'http://www.w3.org/2000/xmlns/', '']);
 17150   XML_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/XML/1998/namespace', 'http://www.w3.org/XML/1998/namespace', '']);
 17151   XLINK_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/1999/xlink', 'http://www.w3.org/1999/xlink', '']);
 17152   LANG_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', '', '', 'http://www.w3.org/XML/1998/namespace']);
 17153   ALL_NO_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, null, null, null]);
 17154   XMLNS_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xmlns', 'xmlns', null]);
 17155   XLINK_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xlink', 'xlink', null]);
 17156   XML_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xml', 'xml', null]);
 17157   LANG_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, null, null, 'xml']);
 17158   ALL_NCNAME = initValues(_3Z_classLit, 0, -1, [true, true, true, true]);
 17159   ALL_NO_NCNAME = initValues(_3Z_classLit, 0, -1, [false, false, false, false]);
 17160   D = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('d'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17161   K = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17162   R = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('r'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17163   X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17164   Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17165   Z = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('z'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17166   BY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('by'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17167   CX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cx'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17168   CY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17169   DX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dx'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17170   DY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17171   G2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('g2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17172   G1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('g1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17173   FX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fx'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17174   FY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17175   K4 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k4'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17176   K2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17177   K3 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k3'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17178   K1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17179   ID = $AttributeName_0(new AttributeName(), ALL_NO_NS, SAME_LOCAL('id'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17180   IN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('in'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17181   U2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('u2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17182   U1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('u1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17183   RT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rt'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17184   RX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rx'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17185   RY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ry'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17186   TO = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('to'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17187   Y2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17188   Y1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17189   X1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17190   X2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17191   ALT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alt'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17192   DIR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dir'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17193   DUR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dur'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17194   END = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('end'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17195   FOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('for'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17196   IN2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('in2'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17197   MAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('max'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17198   MIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('min'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17199   LOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('low'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17200   REL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rel'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17201   REV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rev'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17202   SRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('src'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17203   AXIS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('axis'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17204   ABBR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('abbr'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17205   BBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17206   CITE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cite'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17207   CODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('code'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17208   BIAS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bias'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17209   COLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cols'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17210   CLIP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17211   CHAR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('char'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17212   BASE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('base'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17213   EDGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('edge'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17214   DATA = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('data'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17215   FILL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17216   FROM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('from'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17217   FORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('form'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17218   FACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('face'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17219   HIGH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('high'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17220   HREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('href'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17221   OPEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('open'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17222   ICON = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('icon'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17223   NAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('name'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17224   MODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17225   MASK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mask'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17226   LINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('link'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17227   LANG = $AttributeName(new AttributeName(), LANG_NS, SAME_LOCAL('lang'), LANG_PREFIX, ALL_NCNAME, false);
 17228   LIST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('list'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17229   TYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('type'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17230   WHEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('when'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17231   WRAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('wrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17232   TEXT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17233   PATH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('path'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17234   PING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ping'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17235   REFX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('refx', 'refX'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17236   REFY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('refy', 'refY'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17237   SIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('size'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17238   SEED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('seed'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17239   ROWS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rows'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17240   SPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('span'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17241   STEP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('step'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17242   ROLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('role'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17243   XREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('xref'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17244   ASYNC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('async'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17245   ALINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alink'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17246   ALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('align'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17247   CLOSE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('close'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17248   COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17249   CLASS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('class'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17250   CLEAR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clear'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17251   BEGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('begin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17252   DEPTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('depth'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17253   DEFER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('defer'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17254   FENCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fence'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17255   FRAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('frame'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17256   ISMAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ismap'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17257   ONEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onend'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17258   INDEX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('index'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17259   ORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('order'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17260   OTHER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('other'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17261   ONCUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncut'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17262   NARGS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nargs'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17263   MEDIA = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('media'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17264   LABEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('label'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17265   LOCAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('local'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17266   WIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('width'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17267   TITLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('title'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17268   VLINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vlink'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17269   VALUE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('value'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17270   SLOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('slope'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17271   SHAPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('shape'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17272   SCOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scope'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17273   SCALE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scale'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17274   SPEED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('speed'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17275   STYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('style'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17276   RULES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rules'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17277   STEMH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stemh'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17278   STEMV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stemv'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17279   START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('start'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17280   XMLNS = $AttributeName(new AttributeName(), XMLNS_NS, SAME_LOCAL('xmlns'), ALL_NO_PREFIX, initValues(_3Z_classLit, 0, -1, [false, false, false, false]), true);
 17281   ACCEPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accept'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17282   ACCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17283   ASCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ascent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17284   ACTIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('active'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17285   ALTIMG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('altimg'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17286   ACTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('action'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17287   BORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('border'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17288   CURSOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cursor'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17289   COORDS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('coords'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17290   FILTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('filter'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17291   FORMAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('format'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17292   HIDDEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17293   HSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17294   HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('height'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17295   ONMOVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmove'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17296   ONLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onload'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17297   ONDRAG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondrag'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17298   ORIGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('origin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17299   ONZOOM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onzoom'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17300   ONHELP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onhelp'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17301   ONSTOP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onstop'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17302   ONDROP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17303   ONBLUR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onblur'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17304   OBJECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('object'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17305   OFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('offset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17306   ORIENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('orient'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17307   ONCOPY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17308   NOWRAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nowrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17309   NOHREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nohref'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17310   MACROS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('macros'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17311   METHOD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('method'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17312   LOWSRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lowsrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17313   LSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17314   LQUOTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17315   USEMAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('usemap'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17316   WIDTHS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('widths'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17317   TARGET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('target'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17318   VALUES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('values'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17319   VALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('valign'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17320   VSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17321   POSTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('poster'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17322   POINTS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('points'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17323   PROMPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('prompt'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17324   SCOPED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scoped'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17325   STRING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('string'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17326   SCHEME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scheme'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17327   STROKE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17328   RADIUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('radius'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17329   RESULT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('result'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17330   REPEAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17331   RSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17332   ROTATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rotate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17333   RQUOTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17334   ALTTEXT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alttext'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17335   ARCHIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('archive'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17336   AZIMUTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('azimuth'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17337   CLOSURE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('closure'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17338   CHECKED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17339   CLASSID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('classid'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17340   CHAROFF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('charoff'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17341   BGCOLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bgcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17342   COLSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('colspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17343   CHARSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17344   COMPACT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('compact'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17345   CONTENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('content'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17346   ENCTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('enctype'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17347   DATASRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datasrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17348   DATAFLD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datafld'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17349   DECLARE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('declare'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17350   DISPLAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('display'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17351   DIVISOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('divisor'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17352   DEFAULT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('default'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17353   DESCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('descent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17354   KERNING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('kerning'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17355   HANGING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17356   HEADERS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('headers'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17357   ONPASTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onpaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17358   ONCLICK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17359   OPTIMUM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('optimum'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17360   ONBEGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbegin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17361   ONKEYUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeyup'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17362   ONFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17363   ONERROR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onerror'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17364   ONINPUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oninput'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17365   ONABORT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onabort'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17366   ONSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17367   ONRESET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onreset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17368   OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17369   NOSHADE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('noshade'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17370   MINSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('minsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17371   MAXSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('maxsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17372   LOOPEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('loopend'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17373   LARGEOP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('largeop'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17374   UNICODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17375   TARGETX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('targetx', 'targetX'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17376   TARGETY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('targety', 'targetY'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17377   VIEWBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('viewbox', 'viewBox'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17378   VERSION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('version'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17379   PATTERN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('pattern'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17380   PROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17381   SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17382   RESTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('restart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17383   ROWSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17384   SANDBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('sandbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17385   SUMMARY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('summary'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17386   STANDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('standby'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17387   REPLACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('replace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17388   AUTOPLAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autoplay'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17389   ADDITIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('additive'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17390   CALCMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('calcmode', 'calcMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17391   CODETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('codetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17392   CODEBASE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('codebase'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17393   CONTROLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17394   BEVELLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bevelled'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17395   BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17396   EXPONENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('exponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17397   EDGEMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('edgemode', 'edgeMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17398   ENCODING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('encoding'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17399   GLYPHREF = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('glyphref', 'glyphRef'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17400   DATETIME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datetime'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17401   DISABLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17402   FONTSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17403   KEYTIMES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keytimes', 'keyTimes'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17404   PANOSE_1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('panose-1'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17405   HREFLANG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hreflang'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17406   ONRESIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17407   ONCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17408   ONBOUNCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbounce'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17409   ONUNLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17410   ONFINISH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfinish'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17411   ONSCROLL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onscroll'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17412   OPERATOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('operator'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17413   OVERFLOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overflow'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17414   ONSUBMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onsubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17415   ONREPEAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrepeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17416   ONSELECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17417   NOTATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('notation'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17418   NORESIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('noresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17419   MANIFEST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('manifest'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17420   MATHSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17421   MULTIPLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('multiple'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17422   LONGDESC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('longdesc'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17423   LANGUAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('language'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17424   TEMPLATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('template'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17425   TABINDEX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('tabindex'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17426   READONLY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17427   SELECTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17428   ROWLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17429   SEAMLESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('seamless'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17430   ROWALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17431   STRETCHY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stretchy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17432   REQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('required'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17433   XML_BASE = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:base', 'base'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17434   XML_LANG = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:lang', 'lang'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17435   X_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17436   ARIA_OWNS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-owns'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17437   AUTOFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autofocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17438   ARIA_SORT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-sort'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17439   ACCESSKEY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accesskey'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17440   ARIA_BUSY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-busy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17441   ARIA_GRAB = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-grab'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17442   AMPLITUDE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('amplitude'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17443   ARIA_LIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-live'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17444   CLIP_RULE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17445   CLIP_PATH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip-path'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17446   EQUALROWS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('equalrows'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17447   ELEVATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('elevation'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17448   DIRECTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('direction'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17449   DRAGGABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('draggable'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17450   FILTERRES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('filterres', 'filterRes'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17451   FILL_RULE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17452   FONTSTYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontstyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17453   FONT_SIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-size'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17454   KEYPOINTS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keypoints', 'keyPoints'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17455   HIDEFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hidefocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17456   ONMESSAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmessage'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17457   INTERCEPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('intercept'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17458   ONDRAGEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragend'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17459   ONMOVEEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmoveend'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17460   ONINVALID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oninvalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17461   ONKEYDOWN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeydown'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17462   ONFOCUSIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocusin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17463   ONMOUSEUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseup'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17464   INPUTMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('inputmode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17465   ONROWEXIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowexit'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17466   MATHCOLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17467   MASKUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('maskunits', 'maskUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17468   MAXLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('maxlength'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17469   LINEBREAK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('linebreak'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17470   LOOPSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('loopstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17471   TRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('transform'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17472   V_HANGING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17473   VALUETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('valuetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17474   POINTSATZ = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsatz', 'pointsAtZ'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17475   POINTSATX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsatx', 'pointsAtX'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17476   POINTSATY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsaty', 'pointsAtY'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17477   PLAYCOUNT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('playcount'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17478   SYMMETRIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('symmetric'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17479   SCROLLING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scrolling'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17480   REPEATDUR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('repeatdur', 'repeatDur'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17481   SELECTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('selection'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17482   SEPARATOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('separator'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17483   XML_SPACE = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:space', 'space'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17484   AUTOSUBMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autosubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17485   ALPHABETIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17486   ACTIONTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('actiontype'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17487   ACCUMULATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accumulate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17488   ARIA_LEVEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-level'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17489   COLUMNSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17490   CAP_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cap-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17491   BACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('background'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17492   GLYPH_NAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-name'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17493   GROUPALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('groupalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17494   FONTFAMILY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontfamily'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17495   FONTWEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontweight'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17496   FONT_STYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-style'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17497   KEYSPLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keysplines', 'keySplines'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17498   HTTP_EQUIV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('http-equiv'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17499   ONACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17500   OCCURRENCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('occurrence'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17501   IRRELEVANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('irrelevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17502   ONDBLCLICK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondblclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17503   ONDRAGDROP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragdrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17504   ONKEYPRESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeypress'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17505   ONROWENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17506   ONDRAGOVER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragover'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17507   ONFOCUSOUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocusout'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17508   ONMOUSEOUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseout'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17509   NUMOCTAVES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('numoctaves', 'numOctaves'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17510   MARKER_MID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-mid'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17511   MARKER_END = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-end'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17512   TEXTLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('textlength', 'textLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17513   VISIBILITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('visibility'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17514   VIEWTARGET = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('viewtarget', 'viewTarget'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17515   VERT_ADV_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-adv-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17516   PATHLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pathlength', 'pathLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17517   REPEAT_MAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-max'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17518   RADIOGROUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('radiogroup'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17519   STOP_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stop-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17520   SEPARATORS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('separators'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17521   REPEAT_MIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-min'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17522   ROWSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17523   ZOOMANDPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('zoomandpan', 'zoomAndPan'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17524   XLINK_TYPE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:type', 'type'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17525   XLINK_ROLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:role', 'role'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17526   XLINK_HREF = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:href', 'href'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17527   XLINK_SHOW = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:show', 'show'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17528   ACCENTUNDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accentunder'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17529   ARIA_SECRET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-secret'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17530   ARIA_ATOMIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-atomic'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17531   ARIA_HIDDEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17532   ARIA_FLOWTO = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-flowto'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17533   ARABIC_FORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('arabic-form'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17534   CELLPADDING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cellpadding'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17535   CELLSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cellspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17536   COLUMNWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17537   COLUMNALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17538   COLUMNLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17539   CONTEXTMENU = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('contextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17540   BASEPROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('baseprofile', 'baseProfile'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17541   FONT_FAMILY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-family'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17542   FRAMEBORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('frameborder'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17543   FILTERUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('filterunits', 'filterUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17544   FLOOD_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('flood-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17545   FONT_WEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-weight'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17546   HORIZ_ADV_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-adv-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17547   ONDRAGLEAVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17548   ONMOUSEMOVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousemove'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17549   ORIENTATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('orientation'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17550   ONMOUSEDOWN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousedown'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17551   ONMOUSEOVER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseover'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17552   ONDRAGENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17553   IDEOGRAPHIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17554   ONBEFORECUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforecut'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17555   ONFORMINPUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onforminput'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17556   ONDRAGSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17557   ONMOVESTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmovestart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17558   MARKERUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerunits', 'markerUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17559   MATHVARIANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathvariant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17560   MARGINWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marginwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17561   MARKERWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerwidth', 'markerWidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17562   TEXT_ANCHOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-anchor'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17563   TABLEVALUES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('tablevalues', 'tableValues'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17564   SCRIPTLEVEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptlevel'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17565   REPEATCOUNT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('repeatcount', 'repeatCount'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17566   STITCHTILES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('stitchtiles', 'stitchTiles'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17567   STARTOFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('startoffset', 'startOffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17568   SCROLLDELAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scrolldelay'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17569   XMLNS_XLINK = $AttributeName(new AttributeName(), XMLNS_NS, COLONIFIED_LOCAL('xmlns:xlink', 'xlink'), XMLNS_PREFIX, initValues(_3Z_classLit, 0, -1, [false, false, false, false]), true);
 17570   XLINK_TITLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:title', 'title'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17571   ARIA_INVALID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-invalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17572   ARIA_PRESSED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-pressed'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17573   ARIA_CHECKED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17574   AUTOCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17575   ARIA_SETSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-setsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17576   ARIA_CHANNEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-channel'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17577   EQUALCOLUMNS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('equalcolumns'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17578   DISPLAYSTYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('displaystyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17579   DATAFORMATAS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dataformatas'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17580   FILL_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17581   FONT_VARIANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-variant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17582   FONT_STRETCH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-stretch'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17583   FRAMESPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('framespacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17584   KERNELMATRIX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('kernelmatrix', 'kernelMatrix'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17585   ONDEACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17586   ONROWSDELETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowsdelete'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17587   ONMOUSELEAVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17588   ONFORMCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onformchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17589   ONCELLCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncellchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17590   ONMOUSEWHEEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousewheel'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17591   ONMOUSEENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17592   ONAFTERPRINT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onafterprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17593   ONBEFORECOPY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforecopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17594   MARGINHEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marginheight'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17595   MARKERHEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerheight', 'markerHeight'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17596   MARKER_START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17597   MATHEMATICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17598   LENGTHADJUST = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('lengthadjust', 'lengthAdjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17599   UNSELECTABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17600   UNICODE_BIDI = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode-bidi'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17601   UNITS_PER_EM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('units-per-em'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17602   WORD_SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('word-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17603   WRITING_MODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('writing-mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17604   V_ALPHABETIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17605   PATTERNUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patternunits', 'patternUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17606   SPREADMETHOD = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('spreadmethod', 'spreadMethod'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17607   SURFACESCALE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('surfacescale', 'surfaceScale'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17608   STROKE_WIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-width'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17609   REPEAT_START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17610   STDDEVIATION = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('stddeviation', 'stdDeviation'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17611   STOP_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stop-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17612   ARIA_CONTROLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17613   ARIA_HASPOPUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-haspopup'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17614   ACCENT_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accent-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17615   ARIA_VALUENOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuenow'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17616   ARIA_RELEVANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-relevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17617   ARIA_POSINSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-posinset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17618   ARIA_VALUEMAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuemax'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17619   ARIA_READONLY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17620   ARIA_SELECTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17621   ARIA_REQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-required'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17622   ARIA_EXPANDED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-expanded'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17623   ARIA_DISABLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17624   ATTRIBUTETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('attributetype', 'attributeType'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17625   ATTRIBUTENAME = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('attributename', 'attributeName'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17626   ARIA_DATATYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-datatype'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17627   ARIA_VALUEMIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuemin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17628   BASEFREQUENCY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('basefrequency', 'baseFrequency'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17629   COLUMNSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17630   COLOR_PROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17631   CLIPPATHUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('clippathunits', 'clipPathUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17632   DEFINITIONURL = $AttributeName(new AttributeName(), ALL_NO_NS, (arr_32 = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0) , arr_32[0] = 'definitionurl' , arr_32[1] = 'definitionURL' , arr_32[2] = 'definitionurl' , arr_32[3] = 'definitionurl' , arr_32), ALL_NO_PREFIX, ALL_NCNAME, false);
 17633   GRADIENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('gradientunits', 'gradientUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17634   FLOOD_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('flood-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17635   ONAFTERUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onafterupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17636   ONERRORUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onerrorupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17637   ONBEFOREPASTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforepaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17638   ONLOSECAPTURE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onlosecapture'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17639   ONCONTEXTMENU = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncontextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17640   ONSELECTSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onselectstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17641   ONBEFOREPRINT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17642   MOVABLELIMITS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('movablelimits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17643   LINETHICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('linethickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17644   UNICODE_RANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode-range'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17645   THINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('thinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17646   VERT_ORIGIN_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17647   VERT_ORIGIN_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17648   V_IDEOGRAPHIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17649   PRESERVEALPHA = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('preservealpha', 'preserveAlpha'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17650   SCRIPTMINSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptminsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17651   SPECIFICATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('specification'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17652   XLINK_ACTUATE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:actuate', 'actuate'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17653   XLINK_ARCROLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:arcrole', 'arcrole'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
 17654   ACCEPT_CHARSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accept-charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17655   ALIGNMENTSCOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alignmentscope'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17656   ARIA_MULTILINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-multiline'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17657   BASELINE_SHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('baseline-shift'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17658   HORIZ_ORIGIN_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17659   HORIZ_ORIGIN_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17660   ONBEFOREUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17661   ONFILTERCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfilterchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17662   ONROWSINSERTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowsinserted'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17663   ONBEFOREUNLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17664   MATHBACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathbackground'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17665   LETTER_SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('letter-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17666   LIGHTING_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lighting-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17667   THICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('thickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17668   TEXT_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17669   V_MATHEMATICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17670   POINTER_EVENTS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('pointer-events'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17671   PRIMITIVEUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('primitiveunits', 'primitiveUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17672   SYSTEMLANGUAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('systemlanguage', 'systemLanguage'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17673   STROKE_LINECAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-linecap'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17674   SUBSCRIPTSHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('subscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17675   STROKE_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17676   ARIA_DROPEFFECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-dropeffect'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17677   ARIA_LABELLEDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-labelledby'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17678   ARIA_TEMPLATEID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-templateid'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17679   COLOR_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17680   CONTENTEDITABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('contenteditable'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17681   DIFFUSECONSTANT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('diffuseconstant', 'diffuseConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17682   ONDATAAVAILABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondataavailable'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17683   ONCONTROLSELECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncontrolselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17684   IMAGE_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('image-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17685   MEDIUMMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mediummathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17686   TEXT_DECORATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-decoration'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17687   SHAPE_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('shape-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17688   STROKE_LINEJOIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-linejoin'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17689   REPEAT_TEMPLATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-template'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17690   ARIA_DESCRIBEDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-describedby'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17691   CONTENTSTYLETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('contentstyletype', 'contentStyleType'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17692   FONT_SIZE_ADJUST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-size-adjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17693   KERNELUNITLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('kernelunitlength', 'kernelUnitLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17694   ONBEFOREACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17695   ONPROPERTYCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onpropertychange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17696   ONDATASETCHANGED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondatasetchanged'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17697   MASKCONTENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('maskcontentunits', 'maskContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17698   PATTERNTRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patterntransform', 'patternTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17699   REQUIREDFEATURES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('requiredfeatures', 'requiredFeatures'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17700   RENDERING_INTENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rendering-intent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17701   SPECULAREXPONENT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('specularexponent', 'specularExponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17702   SPECULARCONSTANT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('specularconstant', 'specularConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17703   SUPERSCRIPTSHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('superscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17704   STROKE_DASHARRAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-dasharray'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17705   XCHANNELSELECTOR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('xchannelselector', 'xChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17706   YCHANNELSELECTOR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('ychannelselector', 'yChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17707   ARIA_AUTOCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17708   CONTENTSCRIPTTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('contentscripttype', 'contentScriptType'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17709   ENABLE_BACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('enable-background'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17710   DOMINANT_BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dominant-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17711   GRADIENTTRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('gradienttransform', 'gradientTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17712   ONBEFORDEACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbefordeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17713   ONDATASETCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondatasetcomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17714   OVERLINE_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17715   ONBEFOREEDITFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeeditfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17716   LIMITINGCONEANGLE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('limitingconeangle', 'limitingConeAngle'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17717   VERYTHINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('verythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17718   STROKE_DASHOFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-dashoffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17719   STROKE_MITERLIMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-miterlimit'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17720   ALIGNMENT_BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alignment-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17721   ONREADYSTATECHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onreadystatechange'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17722   OVERLINE_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17723   UNDERLINE_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('underline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17724   VERYTHICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('verythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17725   REQUIREDEXTENSIONS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('requiredextensions', 'requiredExtensions'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17726   COLOR_INTERPOLATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-interpolation'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17727   UNDERLINE_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('underline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17728   PRESERVEASPECTRATIO = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('preserveaspectratio', 'preserveAspectRatio'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17729   PATTERNCONTENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patterncontentunits', 'patternContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17730   ARIA_MULTISELECTABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-multiselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17731   SCRIPTSIZEMULTIPLIER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptsizemultiplier'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17732   ARIA_ACTIVEDESCENDANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-activedescendant'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17733   VERYVERYTHINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('veryverythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17734   VERYVERYTHICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('veryverythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17735   STRIKETHROUGH_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('strikethrough-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17736   STRIKETHROUGH_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('strikethrough-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17737   EXTERNALRESOURCESREQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('externalresourcesrequired', 'externalResourcesRequired'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17738   GLYPH_ORIENTATION_VERTICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-orientation-vertical'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17739   COLOR_INTERPOLATION_FILTERS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-interpolation-filters'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17740   GLYPH_ORIENTATION_HORIZONTAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-orientation-horizontal'), ALL_NO_PREFIX, ALL_NCNAME, false);
 17741   ATTRIBUTE_NAMES = initValues(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, [D, K, R, X, Y, Z, BY, CX, CY, DX, DY, G2, G1, FX, FY, K4, K2, K3, K1, ID, IN, U2, U1, RT, RX, RY, TO, Y2, Y1, X1, X2, ALT, DIR, DUR, END, FOR, IN2, MAX, MIN, LOW, REL, REV, SRC, AXIS, ABBR, BBOX, CITE, CODE, BIAS, COLS, CLIP, CHAR, BASE, EDGE, DATA, FILL, FROM, FORM, FACE, HIGH, HREF, OPEN, ICON, NAME, MODE, MASK, LINK, LANG, LIST, TYPE, WHEN, WRAP, TEXT, PATH, PING, REFX, REFY, SIZE, SEED, ROWS, SPAN, STEP, ROLE, XREF, ASYNC, ALINK, ALIGN, CLOSE, COLOR, CLASS, CLEAR, BEGIN, DEPTH, DEFER, FENCE, FRAME, ISMAP, ONEND, INDEX, ORDER, OTHER, ONCUT, NARGS, MEDIA, LABEL, LOCAL, WIDTH, TITLE, VLINK, VALUE, SLOPE, SHAPE, SCOPE, SCALE, SPEED, STYLE, RULES, STEMH, STEMV, START, XMLNS, ACCEPT, ACCENT, ASCENT, ACTIVE, ALTIMG, ACTION, BORDER, CURSOR, COORDS, FILTER, FORMAT, HIDDEN, HSPACE, HEIGHT, ONMOVE, ONLOAD, ONDRAG, ORIGIN, ONZOOM, ONHELP, ONSTOP, ONDROP, ONBLUR, OBJECT, OFFSET, ORIENT, ONCOPY, NOWRAP, NOHREF, MACROS, METHOD, LOWSRC, LSPACE, LQUOTE, USEMAP, WIDTHS, TARGET, VALUES, VALIGN, VSPACE, POSTER, POINTS, PROMPT, SCOPED, STRING, SCHEME, STROKE, RADIUS, RESULT, REPEAT, RSPACE, ROTATE, RQUOTE, ALTTEXT, ARCHIVE, AZIMUTH, CLOSURE, CHECKED, CLASSID, CHAROFF, BGCOLOR, COLSPAN, CHARSET, COMPACT, CONTENT, ENCTYPE, DATASRC, DATAFLD, DECLARE, DISPLAY, DIVISOR, DEFAULT, DESCENT, KERNING, HANGING, HEADERS, ONPASTE, ONCLICK, OPTIMUM, ONBEGIN, ONKEYUP, ONFOCUS, ONERROR, ONINPUT, ONABORT, ONSTART, ONRESET, OPACITY, NOSHADE, MINSIZE, MAXSIZE, LOOPEND, LARGEOP, UNICODE, TARGETX, TARGETY, VIEWBOX, VERSION, PATTERN, PROFILE, SPACING, RESTART, ROWSPAN, SANDBOX, SUMMARY, STANDBY, REPLACE, AUTOPLAY, ADDITIVE, CALCMODE, CODETYPE, CODEBASE, CONTROLS, BEVELLED, BASELINE, EXPONENT, EDGEMODE, ENCODING, GLYPHREF, DATETIME, DISABLED, FONTSIZE, KEYTIMES, PANOSE_1, HREFLANG, ONRESIZE, ONCHANGE, ONBOUNCE, ONUNLOAD, ONFINISH, ONSCROLL, OPERATOR, OVERFLOW, ONSUBMIT, ONREPEAT, ONSELECT, NOTATION, NORESIZE, MANIFEST, MATHSIZE, MULTIPLE, LONGDESC, LANGUAGE, TEMPLATE, TABINDEX, READONLY, SELECTED, ROWLINES, SEAMLESS, ROWALIGN, STRETCHY, REQUIRED, XML_BASE, XML_LANG, X_HEIGHT, ARIA_OWNS, AUTOFOCUS, ARIA_SORT, ACCESSKEY, ARIA_BUSY, ARIA_GRAB, AMPLITUDE, ARIA_LIVE, CLIP_RULE, CLIP_PATH, EQUALROWS, ELEVATION, DIRECTION, DRAGGABLE, FILTERRES, FILL_RULE, FONTSTYLE, FONT_SIZE, KEYPOINTS, HIDEFOCUS, ONMESSAGE, INTERCEPT, ONDRAGEND, ONMOVEEND, ONINVALID, ONKEYDOWN, ONFOCUSIN, ONMOUSEUP, INPUTMODE, ONROWEXIT, MATHCOLOR, MASKUNITS, MAXLENGTH, LINEBREAK, LOOPSTART, TRANSFORM, V_HANGING, VALUETYPE, POINTSATZ, POINTSATX, POINTSATY, PLAYCOUNT, SYMMETRIC, SCROLLING, REPEATDUR, SELECTION, SEPARATOR, XML_SPACE, AUTOSUBMIT, ALPHABETIC, ACTIONTYPE, ACCUMULATE, ARIA_LEVEL, COLUMNSPAN, CAP_HEIGHT, BACKGROUND, GLYPH_NAME, GROUPALIGN, FONTFAMILY, FONTWEIGHT, FONT_STYLE, KEYSPLINES, HTTP_EQUIV, ONACTIVATE, OCCURRENCE, IRRELEVANT, ONDBLCLICK, ONDRAGDROP, ONKEYPRESS, ONROWENTER, ONDRAGOVER, ONFOCUSOUT, ONMOUSEOUT, NUMOCTAVES, MARKER_MID, MARKER_END, TEXTLENGTH, VISIBILITY, VIEWTARGET, VERT_ADV_Y, PATHLENGTH, REPEAT_MAX, RADIOGROUP, STOP_COLOR, SEPARATORS, REPEAT_MIN, ROWSPACING, ZOOMANDPAN, XLINK_TYPE, XLINK_ROLE, XLINK_HREF, XLINK_SHOW, ACCENTUNDER, ARIA_SECRET, ARIA_ATOMIC, ARIA_HIDDEN, ARIA_FLOWTO, ARABIC_FORM, CELLPADDING, CELLSPACING, COLUMNWIDTH, COLUMNALIGN, COLUMNLINES, CONTEXTMENU, BASEPROFILE, FONT_FAMILY, FRAMEBORDER, FILTERUNITS, FLOOD_COLOR, FONT_WEIGHT, HORIZ_ADV_X, ONDRAGLEAVE, ONMOUSEMOVE, ORIENTATION, ONMOUSEDOWN, ONMOUSEOVER, ONDRAGENTER, IDEOGRAPHIC, ONBEFORECUT, ONFORMINPUT, ONDRAGSTART, ONMOVESTART, MARKERUNITS, MATHVARIANT, MARGINWIDTH, MARKERWIDTH, TEXT_ANCHOR, TABLEVALUES, SCRIPTLEVEL, REPEATCOUNT, STITCHTILES, STARTOFFSET, SCROLLDELAY, XMLNS_XLINK, XLINK_TITLE, ARIA_INVALID, ARIA_PRESSED, ARIA_CHECKED, AUTOCOMPLETE, ARIA_SETSIZE, ARIA_CHANNEL, EQUALCOLUMNS, DISPLAYSTYLE, DATAFORMATAS, FILL_OPACITY, FONT_VARIANT, FONT_STRETCH, FRAMESPACING, KERNELMATRIX, ONDEACTIVATE, ONROWSDELETE, ONMOUSELEAVE, ONFORMCHANGE, ONCELLCHANGE, ONMOUSEWHEEL, ONMOUSEENTER, ONAFTERPRINT, ONBEFORECOPY, MARGINHEIGHT, MARKERHEIGHT, MARKER_START, MATHEMATICAL, LENGTHADJUST, UNSELECTABLE, UNICODE_BIDI, UNITS_PER_EM, WORD_SPACING, WRITING_MODE, V_ALPHABETIC, PATTERNUNITS, SPREADMETHOD, SURFACESCALE, STROKE_WIDTH, REPEAT_START, STDDEVIATION, STOP_OPACITY, ARIA_CONTROLS, ARIA_HASPOPUP, ACCENT_HEIGHT, ARIA_VALUENOW, ARIA_RELEVANT, ARIA_POSINSET, ARIA_VALUEMAX, ARIA_READONLY, ARIA_SELECTED, ARIA_REQUIRED, ARIA_EXPANDED, ARIA_DISABLED, ATTRIBUTETYPE, ATTRIBUTENAME, ARIA_DATATYPE, ARIA_VALUEMIN, BASEFREQUENCY, COLUMNSPACING, COLOR_PROFILE, CLIPPATHUNITS, DEFINITIONURL, GRADIENTUNITS, FLOOD_OPACITY, ONAFTERUPDATE, ONERRORUPDATE, ONBEFOREPASTE, ONLOSECAPTURE, ONCONTEXTMENU, ONSELECTSTART, ONBEFOREPRINT, MOVABLELIMITS, LINETHICKNESS, UNICODE_RANGE, THINMATHSPACE, VERT_ORIGIN_X, VERT_ORIGIN_Y, V_IDEOGRAPHIC, PRESERVEALPHA, SCRIPTMINSIZE, SPECIFICATION, XLINK_ACTUATE, XLINK_ARCROLE, ACCEPT_CHARSET, ALIGNMENTSCOPE, ARIA_MULTILINE, BASELINE_SHIFT, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, ONBEFOREUPDATE, ONFILTERCHANGE, ONROWSINSERTED, ONBEFOREUNLOAD, MATHBACKGROUND, LETTER_SPACING, LIGHTING_COLOR, THICKMATHSPACE, TEXT_RENDERING, V_MATHEMATICAL, POINTER_EVENTS, PRIMITIVEUNITS, SYSTEMLANGUAGE, STROKE_LINECAP, SUBSCRIPTSHIFT, STROKE_OPACITY, ARIA_DROPEFFECT, ARIA_LABELLEDBY, ARIA_TEMPLATEID, COLOR_RENDERING, CONTENTEDITABLE, DIFFUSECONSTANT, ONDATAAVAILABLE, ONCONTROLSELECT, IMAGE_RENDERING, MEDIUMMATHSPACE, TEXT_DECORATION, SHAPE_RENDERING, STROKE_LINEJOIN, REPEAT_TEMPLATE, ARIA_DESCRIBEDBY, CONTENTSTYLETYPE, FONT_SIZE_ADJUST, KERNELUNITLENGTH, ONBEFOREACTIVATE, ONPROPERTYCHANGE, ONDATASETCHANGED, MASKCONTENTUNITS, PATTERNTRANSFORM, REQUIREDFEATURES, RENDERING_INTENT, SPECULAREXPONENT, SPECULARCONSTANT, SUPERSCRIPTSHIFT, STROKE_DASHARRAY, XCHANNELSELECTOR, YCHANNELSELECTOR, ARIA_AUTOCOMPLETE, CONTENTSCRIPTTYPE, ENABLE_BACKGROUND, DOMINANT_BASELINE, GRADIENTTRANSFORM, ONBEFORDEACTIVATE, ONDATASETCOMPLETE, OVERLINE_POSITION, ONBEFOREEDITFOCUS, LIMITINGCONEANGLE, VERYTHINMATHSPACE, STROKE_DASHOFFSET, STROKE_MITERLIMIT, ALIGNMENT_BASELINE, ONREADYSTATECHANGE, OVERLINE_THICKNESS, UNDERLINE_POSITION, VERYTHICKMATHSPACE, REQUIREDEXTENSIONS, COLOR_INTERPOLATION, UNDERLINE_THICKNESS, PRESERVEASPECTRATIO, PATTERNCONTENTUNITS, ARIA_MULTISELECTABLE, SCRIPTSIZEMULTIPLIER, ARIA_ACTIVEDESCENDANT, VERYVERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, EXTERNALRESOURCESREQUIRED, GLYPH_ORIENTATION_VERTICAL, COLOR_INTERPOLATION_FILTERS, GLYPH_ORIENTATION_HORIZONTAL]);
 17742   ATTRIBUTE_HASHES = initValues(_3I_classLit, 0, -1, [1153, 1383, 1601, 1793, 1827, 1857, 68600, 69146, 69177, 70237, 70270, 71572, 71669, 72415, 72444, 74846, 74904, 74943, 75001, 75276, 75590, 84742, 84839, 85575, 85963, 85992, 87204, 88074, 88171, 89130, 89163, 3207892, 3283895, 3284791, 3338752, 3358197, 3369562, 3539124, 3562402, 3574260, 3670335, 3696933, 3721879, 135280021, 135346322, 136317019, 136475749, 136548517, 136652214, 136884919, 136902418, 136942992, 137292068, 139120259, 139785574, 142250603, 142314056, 142331176, 142519584, 144752417, 145106895, 146147200, 146765926, 148805544, 149655723, 149809441, 150018784, 150445028, 150923321, 152528754, 152536216, 152647366, 152962785, 155219321, 155654904, 157317483, 157350248, 157437941, 157447478, 157604838, 157685404, 157894402, 158315188, 166078431, 169409980, 169700259, 169856932, 170007032, 170409695, 170466488, 170513710, 170608367, 173028944, 173896963, 176090625, 176129212, 179390001, 179489057, 179627464, 179840468, 179849042, 180004216, 181779081, 183027151, 183645319, 183698797, 185922012, 185997252, 188312483, 188675799, 190977533, 190992569, 191006194, 191033518, 191038774, 191096249, 191166163, 191194426, 191522106, 191568039, 200104642, 202506661, 202537381, 202602917, 203070590, 203120766, 203389054, 203690071, 203971238, 203986524, 209040857, 209125756, 212055489, 212322418, 212746849, 213002877, 213055164, 213088023, 213259873, 213273386, 213435118, 213437318, 213438231, 213493071, 213532268, 213542834, 213584431, 213659891, 215285828, 215880731, 216112976, 216684637, 217369699, 217565298, 217576549, 218186795, 219743185, 220082234, 221623802, 221986406, 222283890, 223089542, 223138630, 223311265, 224547358, 224587256, 224589550, 224655650, 224785518, 224810917, 224813302, 225429618, 225432950, 225440869, 236107233, 236709921, 236838947, 237117095, 237143271, 237172455, 237209953, 237354143, 237372743, 237668065, 237703073, 237714273, 239743521, 240512803, 240522627, 240560417, 240656513, 241015715, 241062755, 241065383, 243523041, 245865199, 246261793, 246556195, 246774817, 246923491, 246928419, 246981667, 247014847, 247058369, 247112833, 247118177, 247119137, 247128739, 247316903, 249533729, 250235623, 250269543, 251083937, 251402351, 252339047, 253260911, 253293679, 254844367, 255547879, 256077281, 256345377, 258124199, 258354465, 258605063, 258744193, 258845603, 258856961, 258926689, 269869248, 270174334, 270709417, 270778994, 270781796, 271102503, 271478858, 271490090, 272870654, 273335275, 273369140, 273924313, 274108530, 274116736, 276818662, 277476156, 279156579, 279349675, 280108533, 280128712, 280132869, 280162403, 280280292, 280413430, 280506130, 280677397, 280678580, 280686710, 280689066, 282736758, 283110901, 283275116, 283823226, 283890012, 284479340, 284606461, 286700477, 286798916, 291557706, 291665349, 291804100, 292138018, 292166446, 292418738, 292451039, 300298041, 300374839, 300597935, 303073389, 303083839, 303266673, 303354997, 303430688, 303576261, 303724281, 303819694, 304242723, 304382625, 306247792, 307227811, 307468786, 307724489, 309671175, 310252031, 310358241, 310373094, 311015256, 313357609, 313683893, 313701861, 313706996, 313707317, 313710350, 314027746, 314038181, 314091299, 314205627, 314233813, 316741830, 316797986, 317486755, 317794164, 318721061, 320076137, 322657125, 322887778, 323506876, 323572412, 323605180, 323938869, 325060058, 325320188, 325398738, 325541490, 325671619, 333868843, 336806130, 337212108, 337282686, 337285434, 337585223, 338036037, 338298087, 338566051, 340943551, 341190970, 342995704, 343352124, 343912673, 344585053, 346977248, 347218098, 347262163, 347278576, 347438191, 347655959, 347684788, 347726430, 347727772, 347776035, 347776629, 349500753, 350880161, 350887073, 353384123, 355496998, 355906922, 355979793, 356545959, 358637867, 358905016, 359164318, 359247286, 359350571, 359579447, 365560330, 367399355, 367420285, 367510727, 368013212, 370234760, 370353345, 370710317, 371074566, 371122285, 371194213, 371448425, 371448430, 371545055, 371596922, 371758751, 371964792, 372151328, 376550136, 376710172, 376795771, 376826271, 376906556, 380514830, 380774774, 380775037, 381030322, 381136500, 381281631, 381282269, 381285504, 381330595, 381331422, 381335911, 381336484, 383907298, 383917408, 384595009, 384595013, 387799894, 387823201, 392581647, 392584937, 392742684, 392906485, 393003349, 400644707, 400973830, 404428547, 404432113, 404432865, 404469244, 404478897, 404694860, 406887479, 408294949, 408789955, 410022510, 410467324, 410586448, 410945965, 411845275, 414327152, 414327932, 414329781, 414346257, 414346439, 414639928, 414835998, 414894517, 414986533, 417465377, 417465381, 417492216, 418259232, 419310946, 420103495, 420242342, 420380455, 420658662, 420717432, 423183880, 424539259, 425929170, 425972964, 426050649, 426126450, 426142833, 426607922, 437289840, 437347469, 437412335, 437423943, 437455540, 437462252, 437597991, 437617485, 437986305, 437986507, 437986828, 437987072, 438015591, 438034813, 438038966, 438179623, 438347971, 438483573, 438547062, 438895551, 441592676, 442032555, 443548979, 447881379, 447881655, 447881895, 447887844, 448416189, 448445746, 448449012, 450942191, 452816744, 453668677, 454434495, 456610076, 456642844, 456738709, 457544600, 459451897, 459680944, 468058810, 468083581, 470964084, 471470955, 471567278, 472267822, 481177859, 481210627, 481435874, 481455115, 481485378, 481490218, 485105638, 486005878, 486383494, 487988916, 488103783, 490661867, 491574090, 491578272, 493041952, 493441205, 493582844, 493716979, 504577572, 504740359, 505091638, 505592418, 505656212, 509516275, 514998531, 515571132, 515594682, 518712698, 521362273, 526592419, 526807354, 527348842, 538294791, 539214049, 544689535, 545535009, 548544752, 548563346, 548595116, 551679010, 558034099, 560329411, 560356209, 560671018, 560671152, 560692590, 560845442, 569212097, 569474241, 572252718, 572768481, 575326764, 576174758, 576190819, 582099184, 582099438, 582372519, 582558889, 586552164, 591325418, 594231990, 594243961, 605711268, 615672071, 616086845, 621792370, 624879850, 627432831, 640040548, 654392808, 658675477, 659420283, 672891587, 694768102, 705890982, 725543146, 759097578, 761686526, 795383908, 843809551, 878105336, 908643300, 945213471]);
 17743 }
 17744 
 17745 function $AttributeName_0(this$static, uri, local, prefix, ncname, xmlns){
 17746   $clinit_87();
 17747   this$static.uri = uri;
 17748   this$static.local = local;
 17749   COMPUTE_QNAME(local, prefix);
 17750   this$static.ncname = ncname;
 17751   this$static.xmlns = xmlns;
 17752   return this$static;
 17753 }
 17754 
 17755 function $AttributeName(this$static, uri, local, prefix, ncname, xmlns){
 17756   $clinit_87();
 17757   this$static.uri = uri;
 17758   this$static.local = local;
 17759   COMPUTE_QNAME(local, prefix);
 17760   this$static.ncname = ncname;
 17761   this$static.xmlns = xmlns;
 17762   return this$static;
 17763 }
 17764 
 17765 function $isBoolean(this$static){
 17766   return this$static == ACTIVE || this$static == ASYNC || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == COMPACT || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DISABLED || this$static == ISMAP || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REQUIRED || this$static == SELECTED;
 17767 }
 17768 
 17769 function $isCaseFolded(this$static){
 17770   return this$static == ACTIVE || this$static == ALIGN || this$static == ASYNC || this$static == AUTOCOMPLETE || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == CLEAR || this$static == COMPACT || this$static == DATAFORMATAS || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DIR || this$static == DISABLED || this$static == ENCTYPE || this$static == FRAME || this$static == ISMAP || this$static == METHOD || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REPLACE || this$static == REQUIRED || this$static == RULES || this$static == SCOPE || this$static == SCROLLING || this$static == SELECTED || this$static == SHAPE || this$static == STEP || this$static == TYPE || this$static == VALIGN || this$static == VALUETYPE;
 17771 }
 17772 
 17773 function COLONIFIED_LOCAL(name, suffix){
 17774   var arr;
 17775   arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
 17776   arr[0] = name;
 17777   arr[1] = suffix;
 17778   arr[2] = suffix;
 17779   arr[3] = name;
 17780   return arr;
 17781 }
 17782 
 17783 function COMPUTE_QNAME(local, prefix){
 17784   var arr, i;
 17785   arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
 17786   for (i = 0; i < arr.length; ++i) {
 17787     if (prefix[i] == null) {
 17788       arr[i] = local[i];
 17789     }
 17790      else {
 17791       arr[i] = String(prefix[i] + ':' + local[i]);
 17792     }
 17793   }
 17794   return arr;
 17795 }
 17796 
 17797 function SAME_LOCAL(name){
 17798   var arr;
 17799   arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
 17800   arr[0] = name;
 17801   arr[1] = name;
 17802   arr[2] = name;
 17803   arr[3] = name;
 17804   return arr;
 17805 }
 17806 
 17807 function SVG_DIFFERENT(name, camel){
 17808   var arr;
 17809   arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
 17810   arr[0] = name;
 17811   arr[1] = name;
 17812   arr[2] = camel;
 17813   arr[3] = name;
 17814   return arr;
 17815 }
 17816 
 17817 function bufToHash(buf, len){
 17818   var hash, hash2, i, j;
 17819   hash2 = 0;
 17820   hash = len;
 17821   hash <<= 5;
 17822   hash += buf[0] - 96;
 17823   j = len;
 17824   for (i = 0; i < 4 && j > 0; ++i) {
 17825     --j;
 17826     hash <<= 5;
 17827     hash += buf[j] - 96;
 17828     hash2 <<= 6;
 17829     hash2 += buf[i] - 95;
 17830   }
 17831   return hash ^ hash2;
 17832 }
 17833 
 17834 function createAttributeName(name, checkNcName){
 17835   var ncName, xmlns;
 17836   ncName = true;
 17837   xmlns = name.indexOf('xmlns:') == 0;
 17838   if (checkNcName) {
 17839     if (xmlns) {
 17840       ncName = false;
 17841     }
 17842      else {
 17843       ncName = isNCName(name);
 17844     }
 17845   }
 17846   return $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL(name), ALL_NO_PREFIX, ncName?ALL_NCNAME:ALL_NO_NCNAME, xmlns);
 17847 }
 17848 
 17849 function getClass_49(){
 17850   return Lnu_validator_htmlparser_impl_AttributeName_2_classLit;
 17851 }
 17852 
 17853 function nameByBuffer(buf, offset, length, checkNcName){
 17854   var end, end_0;
 17855   $clinit_87();
 17856   var attributeName, hash, index, name;
 17857   hash = bufToHash(buf, length);
 17858   index = binarySearch(ATTRIBUTE_HASHES, hash);
 17859   if (index < 0) {
 17860     return createAttributeName(String((end = offset + length , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))), checkNcName);
 17861   }
 17862    else {
 17863     attributeName = ATTRIBUTE_NAMES[index];
 17864     name = attributeName.local[0];
 17865     if (!localEqualsBuffer(name, buf, offset, length)) {
 17866       return createAttributeName(String((end_0 = offset + length , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))), checkNcName);
 17867     }
 17868     return attributeName;
 17869   }
 17870 }
 17871 
 17872 function AttributeName(){
 17873 }
 17874 
 17875 _ = AttributeName.prototype = new Object_0();
 17876 _.getClass$ = getClass_49;
 17877 _.typeId$ = 36;
 17878 _.local = null;
 17879 _.ncname = null;
 17880 _.uri = null;
 17881 _.xmlns = false;
 17882 var ABBR, ACCENT, ACCENTUNDER, ACCENT_HEIGHT, ACCEPT, ACCEPT_CHARSET, ACCESSKEY, ACCUMULATE, ACTION, ACTIONTYPE, ACTIVE, ADDITIVE, ALIGN, ALIGNMENTSCOPE, ALIGNMENT_BASELINE, ALINK, ALL_NCNAME, ALL_NO_NCNAME, ALL_NO_NS, ALL_NO_PREFIX, ALPHABETIC, ALT, ALTIMG, ALTTEXT, AMPLITUDE, ARABIC_FORM, ARCHIVE, ARIA_ACTIVEDESCENDANT, ARIA_ATOMIC, ARIA_AUTOCOMPLETE, ARIA_BUSY, ARIA_CHANNEL, ARIA_CHECKED, ARIA_CONTROLS, ARIA_DATATYPE, ARIA_DESCRIBEDBY, ARIA_DISABLED, ARIA_DROPEFFECT, ARIA_EXPANDED, ARIA_FLOWTO, ARIA_GRAB, ARIA_HASPOPUP, ARIA_HIDDEN, ARIA_INVALID, ARIA_LABELLEDBY, ARIA_LEVEL, ARIA_LIVE, ARIA_MULTILINE, ARIA_MULTISELECTABLE, ARIA_OWNS, ARIA_POSINSET, ARIA_PRESSED, ARIA_READONLY, ARIA_RELEVANT, ARIA_REQUIRED, ARIA_SECRET, ARIA_SELECTED, ARIA_SETSIZE, ARIA_SORT, ARIA_TEMPLATEID, ARIA_VALUEMAX, ARIA_VALUEMIN, ARIA_VALUENOW, ASCENT, ASYNC, ATTRIBUTENAME, ATTRIBUTETYPE, ATTRIBUTE_HASHES, ATTRIBUTE_NAMES, AUTOCOMPLETE, AUTOFOCUS, AUTOPLAY, AUTOSUBMIT, AXIS, AZIMUTH, BACKGROUND, BASE, BASEFREQUENCY, BASELINE, BASELINE_SHIFT, BASEPROFILE, BBOX, BEGIN, BEVELLED, BGCOLOR, BIAS, BORDER, BY, CALCMODE, CAP_HEIGHT, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CITE, CLASS, CLASSID, CLEAR, CLIP, CLIPPATHUNITS, CLIP_PATH, CLIP_RULE, CLOSE, CLOSURE, CODE, CODEBASE, CODETYPE, COLOR, COLOR_INTERPOLATION, COLOR_INTERPOLATION_FILTERS, COLOR_PROFILE, COLOR_RENDERING, COLS, COLSPAN, COLUMNALIGN, COLUMNLINES, COLUMNSPACING, COLUMNSPAN, COLUMNWIDTH, COMPACT, CONTENT, CONTENTEDITABLE, CONTENTSCRIPTTYPE, CONTENTSTYLETYPE, CONTEXTMENU, CONTROLS, COORDS, CURSOR, CX, CY, D, DATA, DATAFLD, DATAFORMATAS, DATASRC, DATETIME, DECLARE, DEFAULT, DEFER, DEFINITIONURL, DEPTH, DESCENT, DIFFUSECONSTANT, DIR, DIRECTION, DISABLED, DISPLAY, DISPLAYSTYLE, DIVISOR, DOMINANT_BASELINE, DRAGGABLE, DUR, DX, DY, EDGE, EDGEMODE, ELEVATION, ENABLE_BACKGROUND, ENCODING, ENCTYPE, END, EQUALCOLUMNS, EQUALROWS, EXPONENT, EXTERNALRESOURCESREQUIRED, FACE, FENCE, FILL, FILL_OPACITY, FILL_RULE, FILTER, FILTERRES, FILTERUNITS, FLOOD_COLOR, FLOOD_OPACITY, FONTFAMILY, FONTSIZE, FONTSTYLE, FONTWEIGHT, FONT_FAMILY, FONT_SIZE, FONT_SIZE_ADJUST, FONT_STRETCH, FONT_STYLE, FONT_VARIANT, FONT_WEIGHT, FOR, FORM, FORMAT, FRAME, FRAMEBORDER, FRAMESPACING, FROM, FX, FY, G1, G2, GLYPHREF, GLYPH_NAME, GLYPH_ORIENTATION_HORIZONTAL, GLYPH_ORIENTATION_VERTICAL, GRADIENTTRANSFORM, GRADIENTUNITS, GROUPALIGN, HANGING, HEADERS, HEIGHT, HIDDEN, HIDEFOCUS, HIGH, HORIZ_ADV_X, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, HREF, HREFLANG, HSPACE, HTTP_EQUIV, ICON, ID, IDEOGRAPHIC, IMAGE_RENDERING, IN, IN2, INDEX, INPUTMODE, INTERCEPT, IRRELEVANT, ISMAP, K, K1, K2, K3, K4, KERNELMATRIX, KERNELUNITLENGTH, KERNING, KEYPOINTS, KEYSPLINES, KEYTIMES, LABEL, LANG, LANGUAGE, LANG_NS, LANG_PREFIX, LARGEOP, LENGTHADJUST, LETTER_SPACING, LIGHTING_COLOR, LIMITINGCONEANGLE, LINEBREAK, LINETHICKNESS, LINK, LIST, LOCAL, LONGDESC, LOOPEND, LOOPSTART, LOW, LOWSRC, LQUOTE, LSPACE, MACROS, MANIFEST, MARGINHEIGHT, MARGINWIDTH, MARKERHEIGHT, MARKERUNITS, MARKERWIDTH, MARKER_END, MARKER_MID, MARKER_START, MASK, MASKCONTENTUNITS, MASKUNITS, MATHBACKGROUND, MATHCOLOR, MATHEMATICAL, MATHSIZE, MATHVARIANT, MAX, MAXLENGTH, MAXSIZE, MEDIA, MEDIUMMATHSPACE, METHOD, MIN, MINSIZE, MODE, MOVABLELIMITS, MULTIPLE, NAME, NARGS, NOHREF, NORESIZE, NOSHADE, NOTATION, NOWRAP, NUMOCTAVES, OBJECT, OCCURRENCE, OFFSET, ONABORT, ONACTIVATE, ONAFTERPRINT, ONAFTERUPDATE, ONBEFORDEACTIVATE, ONBEFOREACTIVATE, ONBEFORECOPY, ONBEFORECUT, ONBEFOREEDITFOCUS, ONBEFOREPASTE, ONBEFOREPRINT, ONBEFOREUNLOAD, ONBEFOREUPDATE, ONBEGIN, ONBLUR, ONBOUNCE, ONCELLCHANGE, ONCHANGE, ONCLICK, ONCONTEXTMENU, ONCONTROLSELECT, ONCOPY, ONCUT, ONDATAAVAILABLE, ONDATASETCHANGED, ONDATASETCOMPLETE, ONDBLCLICK, ONDEACTIVATE, ONDRAG, ONDRAGDROP, ONDRAGEND, ONDRAGENTER, ONDRAGLEAVE, ONDRAGOVER, ONDRAGSTART, ONDROP, ONEND, ONERROR, ONERRORUPDATE, ONFILTERCHANGE, ONFINISH, ONFOCUS, ONFOCUSIN, ONFOCUSOUT, ONFORMCHANGE, ONFORMINPUT, ONHELP, ONINPUT, ONINVALID, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONLOSECAPTURE, ONMESSAGE, ONMOUSEDOWN, ONMOUSEENTER, ONMOUSELEAVE, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONMOUSEWHEEL, ONMOVE, ONMOVEEND, ONMOVESTART, ONPASTE, ONPROPERTYCHANGE, ONREADYSTATECHANGE, ONREPEAT, ONRESET, ONRESIZE, ONROWENTER, ONROWEXIT, ONROWSDELETE, ONROWSINSERTED, ONSCROLL, ONSELECT, ONSELECTSTART, ONSTART, ONSTOP, ONSUBMIT, ONUNLOAD, ONZOOM, OPACITY, OPEN, OPERATOR, OPTIMUM, ORDER, ORIENT, ORIENTATION, ORIGIN, OTHER, OVERFLOW, OVERLINE_POSITION, OVERLINE_THICKNESS, PANOSE_1, PATH, PATHLENGTH, PATTERN, PATTERNCONTENTUNITS, PATTERNTRANSFORM, PATTERNUNITS, PING, PLAYCOUNT, POINTER_EVENTS, POINTS, POINTSATX, POINTSATY, POINTSATZ, POSTER, PRESERVEALPHA, PRESERVEASPECTRATIO, PRIMITIVEUNITS, PROFILE, PROMPT, R, RADIOGROUP, RADIUS, READONLY, REFX, REFY, REL, RENDERING_INTENT, REPEAT, REPEATCOUNT, REPEATDUR, REPEAT_MAX, REPEAT_MIN, REPEAT_START, REPEAT_TEMPLATE, REPLACE, REQUIRED, REQUIREDEXTENSIONS, REQUIREDFEATURES, RESTART, RESULT, REV, ROLE, ROTATE, ROWALIGN, ROWLINES, ROWS, ROWSPACING, ROWSPAN, RQUOTE, RSPACE, RT, RULES, RX, RY, SANDBOX, SCALE, SCHEME, SCOPE, SCOPED, SCRIPTLEVEL, SCRIPTMINSIZE, SCRIPTSIZEMULTIPLIER, SCROLLDELAY, SCROLLING, SEAMLESS, SEED, SELECTED, SELECTION, SEPARATOR, SEPARATORS, SHAPE, SHAPE_RENDERING, SIZE, SLOPE, SPACING, SPAN, SPECIFICATION, SPECULARCONSTANT, SPECULAREXPONENT, SPEED, SPREADMETHOD, SRC, STANDBY, START, STARTOFFSET, STDDEVIATION, STEMH, STEMV, STEP, STITCHTILES, STOP_COLOR, STOP_OPACITY, STRETCHY, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, STRING, STROKE, STROKE_DASHARRAY, STROKE_DASHOFFSET, STROKE_LINECAP, STROKE_LINEJOIN, STROKE_MITERLIMIT, STROKE_OPACITY, STROKE_WIDTH, STYLE, SUBSCRIPTSHIFT, SUMMARY, SUPERSCRIPTSHIFT, SURFACESCALE, SYMMETRIC, SYSTEMLANGUAGE, TABINDEX, TABLEVALUES, TARGET, TARGETX, TARGETY, TEMPLATE, TEXT, TEXTLENGTH, TEXT_ANCHOR, TEXT_DECORATION, TEXT_RENDERING, THICKMATHSPACE, THINMATHSPACE, TITLE, TO, TRANSFORM, TYPE, U1, U2, UNDERLINE_POSITION, UNDERLINE_THICKNESS, UNICODE, UNICODE_BIDI, UNICODE_RANGE, UNITS_PER_EM, UNSELECTABLE, USEMAP, VALIGN, VALUE, VALUES, VALUETYPE, VERSION, VERT_ADV_Y, VERT_ORIGIN_X, VERT_ORIGIN_Y, VERYTHICKMATHSPACE, VERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, VERYVERYTHINMATHSPACE, VIEWBOX, VIEWTARGET, VISIBILITY, VLINK, VSPACE, V_ALPHABETIC, V_HANGING, V_IDEOGRAPHIC, V_MATHEMATICAL, WHEN, WIDTH, WIDTHS, WORD_SPACING, WRAP, WRITING_MODE, X, X1, X2, XCHANNELSELECTOR, XLINK_ACTUATE, XLINK_ARCROLE, XLINK_HREF, XLINK_NS, XLINK_PREFIX, XLINK_ROLE, XLINK_SHOW, XLINK_TITLE, XLINK_TYPE, XMLNS, XMLNS_NS, XMLNS_PREFIX, XMLNS_XLINK, XML_BASE, XML_LANG, XML_NS, XML_PREFIX, XML_SPACE, XREF, X_HEIGHT, Y, Y1, Y2, YCHANNELSELECTOR, Z, ZOOMANDPAN;
 17883 function $clinit_89(){
 17884   $clinit_89 = nullMethod;
 17885   $ElementName(new ElementName(), null);
 17886   A = $ElementName_0(new ElementName(), 'a', 'a', 1, false, false, false);
 17887   B = $ElementName_0(new ElementName(), 'b', 'b', 45, false, false, false);
 17888   G = $ElementName_0(new ElementName(), 'g', 'g', 0, false, false, false);
 17889   I = $ElementName_0(new ElementName(), 'i', 'i', 45, false, false, false);
 17890   P = $ElementName_0(new ElementName(), 'p', 'p', 29, true, false, false);
 17891   Q = $ElementName_0(new ElementName(), 'q', 'q', 0, false, false, false);
 17892   S = $ElementName_0(new ElementName(), 's', 's', 45, false, false, false);
 17893   U = $ElementName_0(new ElementName(), 'u', 'u', 45, false, false, false);
 17894   BR = $ElementName_0(new ElementName(), 'br', 'br', 4, true, false, false);
 17895   CI = $ElementName_0(new ElementName(), 'ci', 'ci', 0, false, false, false);
 17896   CN = $ElementName_0(new ElementName(), 'cn', 'cn', 0, false, false, false);
 17897   DD = $ElementName_0(new ElementName(), 'dd', 'dd', 41, true, false, false);
 17898   DL = $ElementName_0(new ElementName(), 'dl', 'dl', 46, true, false, false);
 17899   DT = $ElementName_0(new ElementName(), 'dt', 'dt', 41, true, false, false);
 17900   EM = $ElementName_0(new ElementName(), 'em', 'em', 45, false, false, false);
 17901   EQ = $ElementName_0(new ElementName(), 'eq', 'eq', 0, false, false, false);
 17902   FN = $ElementName_0(new ElementName(), 'fn', 'fn', 0, false, false, false);
 17903   H1 = $ElementName_0(new ElementName(), 'h1', 'h1', 42, true, false, false);
 17904   H2 = $ElementName_0(new ElementName(), 'h2', 'h2', 42, true, false, false);
 17905   H3 = $ElementName_0(new ElementName(), 'h3', 'h3', 42, true, false, false);
 17906   H4 = $ElementName_0(new ElementName(), 'h4', 'h4', 42, true, false, false);
 17907   H5 = $ElementName_0(new ElementName(), 'h5', 'h5', 42, true, false, false);
 17908   H6 = $ElementName_0(new ElementName(), 'h6', 'h6', 42, true, false, false);
 17909   GT = $ElementName_0(new ElementName(), 'gt', 'gt', 0, false, false, false);
 17910   HR = $ElementName_0(new ElementName(), 'hr', 'hr', 22, true, false, false);
 17911   IN_0 = $ElementName_0(new ElementName(), 'in', 'in', 0, false, false, false);
 17912   LI = $ElementName_0(new ElementName(), 'li', 'li', 15, true, false, false);
 17913   LN = $ElementName_0(new ElementName(), 'ln', 'ln', 0, false, false, false);
 17914   LT = $ElementName_0(new ElementName(), 'lt', 'lt', 0, false, false, false);
 17915   MI = $ElementName_0(new ElementName(), 'mi', 'mi', 57, false, false, false);
 17916   MN = $ElementName_0(new ElementName(), 'mn', 'mn', 57, false, false, false);
 17917   MO = $ElementName_0(new ElementName(), 'mo', 'mo', 57, false, false, false);
 17918   MS = $ElementName_0(new ElementName(), 'ms', 'ms', 57, false, false, false);
 17919   OL = $ElementName_0(new ElementName(), 'ol', 'ol', 46, true, false, false);
 17920   OR = $ElementName_0(new ElementName(), 'or', 'or', 0, false, false, false);
 17921   PI = $ElementName_0(new ElementName(), 'pi', 'pi', 0, false, false, false);
 17922   RP = $ElementName_0(new ElementName(), 'rp', 'rp', 53, false, false, false);
 17923   RT_0 = $ElementName_0(new ElementName(), 'rt', 'rt', 53, false, false, false);
 17924   TD = $ElementName_0(new ElementName(), 'td', 'td', 40, false, true, false);
 17925   TH = $ElementName_0(new ElementName(), 'th', 'th', 40, false, true, false);
 17926   TR = $ElementName_0(new ElementName(), 'tr', 'tr', 37, true, false, true);
 17927   TT = $ElementName_0(new ElementName(), 'tt', 'tt', 45, false, false, false);
 17928   UL = $ElementName_0(new ElementName(), 'ul', 'ul', 46, true, false, false);
 17929   AND = $ElementName_0(new ElementName(), 'and', 'and', 0, false, false, false);
 17930   ARG = $ElementName_0(new ElementName(), 'arg', 'arg', 0, false, false, false);
 17931   ABS = $ElementName_0(new ElementName(), 'abs', 'abs', 0, false, false, false);
 17932   BIG = $ElementName_0(new ElementName(), 'big', 'big', 45, false, false, false);
 17933   BDO = $ElementName_0(new ElementName(), 'bdo', 'bdo', 0, false, false, false);
 17934   CSC = $ElementName_0(new ElementName(), 'csc', 'csc', 0, false, false, false);
 17935   COL = $ElementName_0(new ElementName(), 'col', 'col', 7, true, false, false);
 17936   COS = $ElementName_0(new ElementName(), 'cos', 'cos', 0, false, false, false);
 17937   COT = $ElementName_0(new ElementName(), 'cot', 'cot', 0, false, false, false);
 17938   DEL = $ElementName_0(new ElementName(), 'del', 'del', 0, false, false, false);
 17939   DFN = $ElementName_0(new ElementName(), 'dfn', 'dfn', 0, false, false, false);
 17940   DIR_0 = $ElementName_0(new ElementName(), 'dir', 'dir', 51, true, false, false);
 17941   DIV = $ElementName_0(new ElementName(), 'div', 'div', 50, true, false, false);
 17942   EXP = $ElementName_0(new ElementName(), 'exp', 'exp', 0, false, false, false);
 17943   GCD = $ElementName_0(new ElementName(), 'gcd', 'gcd', 0, false, false, false);
 17944   GEQ = $ElementName_0(new ElementName(), 'geq', 'geq', 0, false, false, false);
 17945   IMG = $ElementName_0(new ElementName(), 'img', 'img', 48, true, false, false);
 17946   INS = $ElementName_0(new ElementName(), 'ins', 'ins', 0, false, false, false);
 17947   INT = $ElementName_0(new ElementName(), 'int', 'int', 0, false, false, false);
 17948   KBD = $ElementName_0(new ElementName(), 'kbd', 'kbd', 0, false, false, false);
 17949   LOG = $ElementName_0(new ElementName(), 'log', 'log', 0, false, false, false);
 17950   LCM = $ElementName_0(new ElementName(), 'lcm', 'lcm', 0, false, false, false);
 17951   LEQ = $ElementName_0(new ElementName(), 'leq', 'leq', 0, false, false, false);
 17952   MTD = $ElementName_0(new ElementName(), 'mtd', 'mtd', 0, false, false, false);
 17953   MIN_0 = $ElementName_0(new ElementName(), 'min', 'min', 0, false, false, false);
 17954   MAP = $ElementName_0(new ElementName(), 'map', 'map', 0, false, false, false);
 17955   MTR = $ElementName_0(new ElementName(), 'mtr', 'mtr', 0, false, false, false);
 17956   MAX_0 = $ElementName_0(new ElementName(), 'max', 'max', 0, false, false, false);
 17957   NEQ = $ElementName_0(new ElementName(), 'neq', 'neq', 0, false, false, false);
 17958   NOT = $ElementName_0(new ElementName(), 'not', 'not', 0, false, false, false);
 17959   NAV = $ElementName_0(new ElementName(), 'nav', 'nav', 51, true, false, false);
 17960   PRE = $ElementName_0(new ElementName(), 'pre', 'pre', 44, true, false, false);
 17961   REM = $ElementName_0(new ElementName(), 'rem', 'rem', 0, false, false, false);
 17962   SUB = $ElementName_0(new ElementName(), 'sub', 'sub', 52, false, false, false);
 17963   SEC = $ElementName_0(new ElementName(), 'sec', 'sec', 0, false, false, false);
 17964   SVG = $ElementName_0(new ElementName(), 'svg', 'svg', 19, false, false, false);
 17965   SUM = $ElementName_0(new ElementName(), 'sum', 'sum', 0, false, false, false);
 17966   SIN = $ElementName_0(new ElementName(), 'sin', 'sin', 0, false, false, false);
 17967   SEP = $ElementName_0(new ElementName(), 'sep', 'sep', 0, false, false, false);
 17968   SUP = $ElementName_0(new ElementName(), 'sup', 'sup', 52, false, false, false);
 17969   SET = $ElementName_0(new ElementName(), 'set', 'set', 0, false, false, false);
 17970   TAN = $ElementName_0(new ElementName(), 'tan', 'tan', 0, false, false, false);
 17971   USE = $ElementName_0(new ElementName(), 'use', 'use', 0, false, false, false);
 17972   VAR = $ElementName_0(new ElementName(), 'var', 'var', 52, false, false, false);
 17973   WBR = $ElementName_0(new ElementName(), 'wbr', 'wbr', 49, true, false, false);
 17974   XMP = $ElementName_0(new ElementName(), 'xmp', 'xmp', 38, false, false, false);
 17975   XOR = $ElementName_0(new ElementName(), 'xor', 'xor', 0, false, false, false);
 17976   AREA = $ElementName_0(new ElementName(), 'area', 'area', 49, true, false, false);
 17977   ABBR_0 = $ElementName_0(new ElementName(), 'abbr', 'abbr', 0, false, false, false);
 17978   BASE_0 = $ElementName_0(new ElementName(), 'base', 'base', 2, true, false, false);
 17979   BVAR = $ElementName_0(new ElementName(), 'bvar', 'bvar', 0, false, false, false);
 17980   BODY = $ElementName_0(new ElementName(), 'body', 'body', 3, true, false, false);
 17981   CARD = $ElementName_0(new ElementName(), 'card', 'card', 0, false, false, false);
 17982   CODE_0 = $ElementName_0(new ElementName(), 'code', 'code', 45, false, false, false);
 17983   CITE_0 = $ElementName_0(new ElementName(), 'cite', 'cite', 0, false, false, false);
 17984   CSCH = $ElementName_0(new ElementName(), 'csch', 'csch', 0, false, false, false);
 17985   COSH = $ElementName_0(new ElementName(), 'cosh', 'cosh', 0, false, false, false);
 17986   COTH = $ElementName_0(new ElementName(), 'coth', 'coth', 0, false, false, false);
 17987   CURL = $ElementName_0(new ElementName(), 'curl', 'curl', 0, false, false, false);
 17988   DESC = $ElementName_0(new ElementName(), 'desc', 'desc', 59, false, false, false);
 17989   DIFF = $ElementName_0(new ElementName(), 'diff', 'diff', 0, false, false, false);
 17990   DEFS = $ElementName_0(new ElementName(), 'defs', 'defs', 0, false, false, false);
 17991   FORM_0 = $ElementName_0(new ElementName(), 'form', 'form', 9, true, false, false);
 17992   FONT = $ElementName_0(new ElementName(), 'font', 'font', 64, false, false, false);
 17993   GRAD = $ElementName_0(new ElementName(), 'grad', 'grad', 0, false, false, false);
 17994   HEAD = $ElementName_0(new ElementName(), 'head', 'head', 20, true, false, false);
 17995   HTML_0 = $ElementName_0(new ElementName(), 'html', 'html', 23, false, true, false);
 17996   LINE = $ElementName_0(new ElementName(), 'line', 'line', 0, false, false, false);
 17997   LINK_0 = $ElementName_0(new ElementName(), 'link', 'link', 16, true, false, false);
 17998   LIST_0 = $ElementName_0(new ElementName(), 'list', 'list', 0, false, false, false);
 17999   META = $ElementName_0(new ElementName(), 'meta', 'meta', 18, true, false, false);
 18000   MSUB = $ElementName_0(new ElementName(), 'msub', 'msub', 0, false, false, false);
 18001   MODE_0 = $ElementName_0(new ElementName(), 'mode', 'mode', 0, false, false, false);
 18002   MATH = $ElementName_0(new ElementName(), 'math', 'math', 17, false, false, false);
 18003   MARK = $ElementName_0(new ElementName(), 'mark', 'mark', 0, false, false, false);
 18004   MASK_0 = $ElementName_0(new ElementName(), 'mask', 'mask', 0, false, false, false);
 18005   MEAN = $ElementName_0(new ElementName(), 'mean', 'mean', 0, false, false, false);
 18006   MSUP = $ElementName_0(new ElementName(), 'msup', 'msup', 0, false, false, false);
 18007   MENU = $ElementName_0(new ElementName(), 'menu', 'menu', 50, true, false, false);
 18008   MROW = $ElementName_0(new ElementName(), 'mrow', 'mrow', 0, false, false, false);
 18009   NONE = $ElementName_0(new ElementName(), 'none', 'none', 0, false, false, false);
 18010   NOBR = $ElementName_0(new ElementName(), 'nobr', 'nobr', 24, false, false, false);
 18011   NEST = $ElementName_0(new ElementName(), 'nest', 'nest', 0, false, false, false);
 18012   PATH_0 = $ElementName_0(new ElementName(), 'path', 'path', 0, false, false, false);
 18013   PLUS = $ElementName_0(new ElementName(), 'plus', 'plus', 0, false, false, false);
 18014   RULE = $ElementName_0(new ElementName(), 'rule', 'rule', 0, false, false, false);
 18015   REAL = $ElementName_0(new ElementName(), 'real', 'real', 0, false, false, false);
 18016   RELN = $ElementName_0(new ElementName(), 'reln', 'reln', 0, false, false, false);
 18017   RECT = $ElementName_0(new ElementName(), 'rect', 'rect', 0, false, false, false);
 18018   ROOT = $ElementName_0(new ElementName(), 'root', 'root', 0, false, false, false);
 18019   RUBY = $ElementName_0(new ElementName(), 'ruby', 'ruby', 52, false, false, false);
 18020   SECH = $ElementName_0(new ElementName(), 'sech', 'sech', 0, false, false, false);
 18021   SINH = $ElementName_0(new ElementName(), 'sinh', 'sinh', 0, false, false, false);
 18022   SPAN_0 = $ElementName_0(new ElementName(), 'span', 'span', 52, false, false, false);
 18023   SAMP = $ElementName_0(new ElementName(), 'samp', 'samp', 0, false, false, false);
 18024   STOP = $ElementName_0(new ElementName(), 'stop', 'stop', 0, false, false, false);
 18025   SDEV = $ElementName_0(new ElementName(), 'sdev', 'sdev', 0, false, false, false);
 18026   TIME = $ElementName_0(new ElementName(), 'time', 'time', 0, false, false, false);
 18027   TRUE = $ElementName_0(new ElementName(), 'true', 'true', 0, false, false, false);
 18028   TREF = $ElementName_0(new ElementName(), 'tref', 'tref', 0, false, false, false);
 18029   TANH = $ElementName_0(new ElementName(), 'tanh', 'tanh', 0, false, false, false);
 18030   TEXT_0 = $ElementName_0(new ElementName(), 'text', 'text', 0, false, false, false);
 18031   VIEW = $ElementName_0(new ElementName(), 'view', 'view', 0, false, false, false);
 18032   ASIDE = $ElementName_0(new ElementName(), 'aside', 'aside', 51, true, false, false);
 18033   AUDIO = $ElementName_0(new ElementName(), 'audio', 'audio', 0, false, false, false);
 18034   APPLY = $ElementName_0(new ElementName(), 'apply', 'apply', 0, false, false, false);
 18035   EMBED = $ElementName_0(new ElementName(), 'embed', 'embed', 48, true, false, false);
 18036   FRAME_0 = $ElementName_0(new ElementName(), 'frame', 'frame', 10, true, false, false);
 18037   FALSE = $ElementName_0(new ElementName(), 'false', 'false', 0, false, false, false);
 18038   FLOOR = $ElementName_0(new ElementName(), 'floor', 'floor', 0, false, false, false);
 18039   GLYPH = $ElementName_0(new ElementName(), 'glyph', 'glyph', 0, false, false, false);
 18040   HKERN = $ElementName_0(new ElementName(), 'hkern', 'hkern', 0, false, false, false);
 18041   IMAGE = $ElementName_0(new ElementName(), 'image', 'image', 12, true, false, false);
 18042   IDENT = $ElementName_0(new ElementName(), 'ident', 'ident', 0, false, false, false);
 18043   INPUT = $ElementName_0(new ElementName(), 'input', 'input', 13, true, false, false);
 18044   LABEL_0 = $ElementName_0(new ElementName(), 'label', 'label', 62, false, false, false);
 18045   LIMIT = $ElementName_0(new ElementName(), 'limit', 'limit', 0, false, false, false);
 18046   MFRAC = $ElementName_0(new ElementName(), 'mfrac', 'mfrac', 0, false, false, false);
 18047   MPATH = $ElementName_0(new ElementName(), 'mpath', 'mpath', 0, false, false, false);
 18048   METER = $ElementName_0(new ElementName(), 'meter', 'meter', 0, false, false, false);
 18049   MOVER = $ElementName_0(new ElementName(), 'mover', 'mover', 0, false, false, false);
 18050   MINUS = $ElementName_0(new ElementName(), 'minus', 'minus', 0, false, false, false);
 18051   MROOT = $ElementName_0(new ElementName(), 'mroot', 'mroot', 0, false, false, false);
 18052   MSQRT = $ElementName_0(new ElementName(), 'msqrt', 'msqrt', 0, false, false, false);
 18053   MTEXT = $ElementName_0(new ElementName(), 'mtext', 'mtext', 57, false, false, false);
 18054   NOTIN = $ElementName_0(new ElementName(), 'notin', 'notin', 0, false, false, false);
 18055   PIECE = $ElementName_0(new ElementName(), 'piece', 'piece', 0, false, false, false);
 18056   PARAM = $ElementName_0(new ElementName(), 'param', 'param', 55, true, false, false);
 18057   POWER = $ElementName_0(new ElementName(), 'power', 'power', 0, false, false, false);
 18058   REALS = $ElementName_0(new ElementName(), 'reals', 'reals', 0, false, false, false);
 18059   STYLE_0 = $ElementName_0(new ElementName(), 'style', 'style', 33, true, false, false);
 18060   SMALL = $ElementName_0(new ElementName(), 'small', 'small', 45, false, false, false);
 18061   THEAD = $ElementName_0(new ElementName(), 'thead', 'thead', 39, true, false, true);
 18062   TABLE = $ElementName_0(new ElementName(), 'table', 'table', 34, false, true, true);
 18063   TITLE_0 = $ElementName_0(new ElementName(), 'title', 'title', 36, true, false, false);
 18064   TSPAN = $ElementName_0(new ElementName(), 'tspan', 'tspan', 0, false, false, false);
 18065   TIMES = $ElementName_0(new ElementName(), 'times', 'times', 0, false, false, false);
 18066   TFOOT = $ElementName_0(new ElementName(), 'tfoot', 'tfoot', 39, true, false, true);
 18067   TBODY = $ElementName_0(new ElementName(), 'tbody', 'tbody', 39, true, false, true);
 18068   UNION = $ElementName_0(new ElementName(), 'union', 'union', 0, false, false, false);
 18069   VKERN = $ElementName_0(new ElementName(), 'vkern', 'vkern', 0, false, false, false);
 18070   VIDEO = $ElementName_0(new ElementName(), 'video', 'video', 0, false, false, false);
 18071   ARCSEC = $ElementName_0(new ElementName(), 'arcsec', 'arcsec', 0, false, false, false);
 18072   ARCCSC = $ElementName_0(new ElementName(), 'arccsc', 'arccsc', 0, false, false, false);
 18073   ARCTAN = $ElementName_0(new ElementName(), 'arctan', 'arctan', 0, false, false, false);
 18074   ARCSIN = $ElementName_0(new ElementName(), 'arcsin', 'arcsin', 0, false, false, false);
 18075   ARCCOS = $ElementName_0(new ElementName(), 'arccos', 'arccos', 0, false, false, false);
 18076   APPLET = $ElementName_0(new ElementName(), 'applet', 'applet', 43, false, true, false);
 18077   ARCCOT = $ElementName_0(new ElementName(), 'arccot', 'arccot', 0, false, false, false);
 18078   APPROX = $ElementName_0(new ElementName(), 'approx', 'approx', 0, false, false, false);
 18079   BUTTON = $ElementName_0(new ElementName(), 'button', 'button', 5, false, true, false);
 18080   CIRCLE = $ElementName_0(new ElementName(), 'circle', 'circle', 0, false, false, false);
 18081   CENTER = $ElementName_0(new ElementName(), 'center', 'center', 50, true, false, false);
 18082   CURSOR_0 = $ElementName_0(new ElementName(), 'cursor', 'cursor', 0, false, false, false);
 18083   CANVAS = $ElementName_0(new ElementName(), 'canvas', 'canvas', 0, false, false, false);
 18084   DIVIDE = $ElementName_0(new ElementName(), 'divide', 'divide', 0, false, false, false);
 18085   DEGREE = $ElementName_0(new ElementName(), 'degree', 'degree', 0, false, false, false);
 18086   DIALOG = $ElementName_0(new ElementName(), 'dialog', 'dialog', 51, true, false, false);
 18087   DOMAIN = $ElementName_0(new ElementName(), 'domain', 'domain', 0, false, false, false);
 18088   EXISTS = $ElementName_0(new ElementName(), 'exists', 'exists', 0, false, false, false);
 18089   FETILE = $ElementName_0(new ElementName(), 'fetile', 'feTile', 0, false, false, false);
 18090   FIGURE = $ElementName_0(new ElementName(), 'figure', 'figure', 51, true, false, false);
 18091   FORALL = $ElementName_0(new ElementName(), 'forall', 'forall', 0, false, false, false);
 18092   FILTER_0 = $ElementName_0(new ElementName(), 'filter', 'filter', 0, false, false, false);
 18093   FOOTER = $ElementName_0(new ElementName(), 'footer', 'footer', 51, true, false, false);
 18094   HEADER = $ElementName_0(new ElementName(), 'header', 'header', 51, true, false, false);
 18095   IFRAME = $ElementName_0(new ElementName(), 'iframe', 'iframe', 47, true, false, false);
 18096   KEYGEN = $ElementName_0(new ElementName(), 'keygen', 'keygen', 65, true, false, false);
 18097   LAMBDA = $ElementName_0(new ElementName(), 'lambda', 'lambda', 0, false, false, false);
 18098   LEGEND = $ElementName_0(new ElementName(), 'legend', 'legend', 0, false, false, false);
 18099   MSPACE = $ElementName_0(new ElementName(), 'mspace', 'mspace', 0, false, false, false);
 18100   MTABLE = $ElementName_0(new ElementName(), 'mtable', 'mtable', 0, false, false, false);
 18101   MSTYLE = $ElementName_0(new ElementName(), 'mstyle', 'mstyle', 0, false, false, false);
 18102   MGLYPH = $ElementName_0(new ElementName(), 'mglyph', 'mglyph', 56, false, false, false);
 18103   MEDIAN = $ElementName_0(new ElementName(), 'median', 'median', 0, false, false, false);
 18104   MUNDER = $ElementName_0(new ElementName(), 'munder', 'munder', 0, false, false, false);
 18105   MARKER = $ElementName_0(new ElementName(), 'marker', 'marker', 0, false, false, false);
 18106   MERROR = $ElementName_0(new ElementName(), 'merror', 'merror', 0, false, false, false);
 18107   MOMENT = $ElementName_0(new ElementName(), 'moment', 'moment', 0, false, false, false);
 18108   MATRIX = $ElementName_0(new ElementName(), 'matrix', 'matrix', 0, false, false, false);
 18109   OPTION = $ElementName_0(new ElementName(), 'option', 'option', 28, true, false, false);
 18110   OBJECT_0 = $ElementName_0(new ElementName(), 'object', 'object', 63, false, true, false);
 18111   OUTPUT = $ElementName_0(new ElementName(), 'output', 'output', 62, false, false, false);
 18112   PRIMES = $ElementName_0(new ElementName(), 'primes', 'primes', 0, false, false, false);
 18113   SOURCE = $ElementName_0(new ElementName(), 'source', 'source', 55, false, false, false);
 18114   STRIKE = $ElementName_0(new ElementName(), 'strike', 'strike', 45, false, false, false);
 18115   STRONG = $ElementName_0(new ElementName(), 'strong', 'strong', 45, false, false, false);
 18116   SWITCH = $ElementName_0(new ElementName(), 'switch', 'switch', 0, false, false, false);
 18117   SYMBOL = $ElementName_0(new ElementName(), 'symbol', 'symbol', 0, false, false, false);
 18118   SPACER = $ElementName_0(new ElementName(), 'spacer', 'spacer', 49, true, false, false);
 18119   SELECT = $ElementName_0(new ElementName(), 'select', 'select', 32, true, false, false);
 18120   SUBSET = $ElementName_0(new ElementName(), 'subset', 'subset', 0, false, false, false);
 18121   SCRIPT = $ElementName_0(new ElementName(), 'script', 'script', 31, true, false, false);
 18122   TBREAK = $ElementName_0(new ElementName(), 'tbreak', 'tbreak', 0, false, false, false);
 18123   VECTOR = $ElementName_0(new ElementName(), 'vector', 'vector', 0, false, false, false);
 18124   ARTICLE = $ElementName_0(new ElementName(), 'article', 'article', 51, true, false, false);
 18125   ANIMATE = $ElementName_0(new ElementName(), 'animate', 'animate', 0, false, false, false);
 18126   ARCSECH = $ElementName_0(new ElementName(), 'arcsech', 'arcsech', 0, false, false, false);
 18127   ARCCSCH = $ElementName_0(new ElementName(), 'arccsch', 'arccsch', 0, false, false, false);
 18128   ARCTANH = $ElementName_0(new ElementName(), 'arctanh', 'arctanh', 0, false, false, false);
 18129   ARCSINH = $ElementName_0(new ElementName(), 'arcsinh', 'arcsinh', 0, false, false, false);
 18130   ARCCOSH = $ElementName_0(new ElementName(), 'arccosh', 'arccosh', 0, false, false, false);
 18131   ARCCOTH = $ElementName_0(new ElementName(), 'arccoth', 'arccoth', 0, false, false, false);
 18132   ACRONYM = $ElementName_0(new ElementName(), 'acronym', 'acronym', 0, false, false, false);
 18133   ADDRESS = $ElementName_0(new ElementName(), 'address', 'address', 51, true, false, false);
 18134   BGSOUND = $ElementName_0(new ElementName(), 'bgsound', 'bgsound', 49, true, false, false);
 18135   COMMAND = $ElementName_0(new ElementName(), 'command', 'command', 54, true, false, false);
 18136   COMPOSE = $ElementName_0(new ElementName(), 'compose', 'compose', 0, false, false, false);
 18137   CEILING = $ElementName_0(new ElementName(), 'ceiling', 'ceiling', 0, false, false, false);
 18138   CSYMBOL = $ElementName_0(new ElementName(), 'csymbol', 'csymbol', 0, false, false, false);
 18139   CAPTION = $ElementName_0(new ElementName(), 'caption', 'caption', 6, false, true, false);
 18140   DISCARD = $ElementName_0(new ElementName(), 'discard', 'discard', 0, false, false, false);
 18141   DECLARE_0 = $ElementName_0(new ElementName(), 'declare', 'declare', 0, false, false, false);
 18142   DETAILS = $ElementName_0(new ElementName(), 'details', 'details', 51, true, false, false);
 18143   ELLIPSE = $ElementName_0(new ElementName(), 'ellipse', 'ellipse', 0, false, false, false);
 18144   FEFUNCA = $ElementName_0(new ElementName(), 'fefunca', 'feFuncA', 0, false, false, false);
 18145   FEFUNCB = $ElementName_0(new ElementName(), 'fefuncb', 'feFuncB', 0, false, false, false);
 18146   FEBLEND = $ElementName_0(new ElementName(), 'feblend', 'feBlend', 0, false, false, false);
 18147   FEFLOOD = $ElementName_0(new ElementName(), 'feflood', 'feFlood', 0, false, false, false);
 18148   FEIMAGE = $ElementName_0(new ElementName(), 'feimage', 'feImage', 0, false, false, false);
 18149   FEMERGE = $ElementName_0(new ElementName(), 'femerge', 'feMerge', 0, false, false, false);
 18150   FEFUNCG = $ElementName_0(new ElementName(), 'fefuncg', 'feFuncG', 0, false, false, false);
 18151   FEFUNCR = $ElementName_0(new ElementName(), 'fefuncr', 'feFuncR', 0, false, false, false);
 18152   HANDLER = $ElementName_0(new ElementName(), 'handler', 'handler', 0, false, false, false);
 18153   INVERSE = $ElementName_0(new ElementName(), 'inverse', 'inverse', 0, false, false, false);
 18154   IMPLIES = $ElementName_0(new ElementName(), 'implies', 'implies', 0, false, false, false);
 18155   ISINDEX = $ElementName_0(new ElementName(), 'isindex', 'isindex', 14, true, false, false);
 18156   LOGBASE = $ElementName_0(new ElementName(), 'logbase', 'logbase', 0, false, false, false);
 18157   LISTING = $ElementName_0(new ElementName(), 'listing', 'listing', 44, true, false, false);
 18158   MFENCED = $ElementName_0(new ElementName(), 'mfenced', 'mfenced', 0, false, false, false);
 18159   MPADDED = $ElementName_0(new ElementName(), 'mpadded', 'mpadded', 0, false, false, false);
 18160   MARQUEE = $ElementName_0(new ElementName(), 'marquee', 'marquee', 43, false, true, false);
 18161   MACTION = $ElementName_0(new ElementName(), 'maction', 'maction', 0, false, false, false);
 18162   MSUBSUP = $ElementName_0(new ElementName(), 'msubsup', 'msubsup', 0, false, false, false);
 18163   NOEMBED = $ElementName_0(new ElementName(), 'noembed', 'noembed', 60, true, false, false);
 18164   POLYGON = $ElementName_0(new ElementName(), 'polygon', 'polygon', 0, false, false, false);
 18165   PATTERN_0 = $ElementName_0(new ElementName(), 'pattern', 'pattern', 0, false, false, false);
 18166   PRODUCT = $ElementName_0(new ElementName(), 'product', 'product', 0, false, false, false);
 18167   SETDIFF = $ElementName_0(new ElementName(), 'setdiff', 'setdiff', 0, false, false, false);
 18168   SECTION = $ElementName_0(new ElementName(), 'section', 'section', 51, true, false, false);
 18169   TENDSTO = $ElementName_0(new ElementName(), 'tendsto', 'tendsto', 0, false, false, false);
 18170   UPLIMIT = $ElementName_0(new ElementName(), 'uplimit', 'uplimit', 0, false, false, false);
 18171   ALTGLYPH = $ElementName_0(new ElementName(), 'altglyph', 'altGlyph', 0, false, false, false);
 18172   BASEFONT = $ElementName_0(new ElementName(), 'basefont', 'basefont', 49, true, false, false);
 18173   CLIPPATH = $ElementName_0(new ElementName(), 'clippath', 'clipPath', 0, false, false, false);
 18174   CODOMAIN = $ElementName_0(new ElementName(), 'codomain', 'codomain', 0, false, false, false);
 18175   COLGROUP = $ElementName_0(new ElementName(), 'colgroup', 'colgroup', 8, true, false, false);
 18176   DATAGRID = $ElementName_0(new ElementName(), 'datagrid', 'datagrid', 51, true, false, false);
 18177   EMPTYSET = $ElementName_0(new ElementName(), 'emptyset', 'emptyset', 0, false, false, false);
 18178   FACTOROF = $ElementName_0(new ElementName(), 'factorof', 'factorof', 0, false, false, false);
 18179   FIELDSET = $ElementName_0(new ElementName(), 'fieldset', 'fieldset', 61, true, false, false);
 18180   FRAMESET = $ElementName_0(new ElementName(), 'frameset', 'frameset', 11, true, false, false);
 18181   FEOFFSET = $ElementName_0(new ElementName(), 'feoffset', 'feOffset', 0, false, false, false);
 18182   GLYPHREF_0 = $ElementName_0(new ElementName(), 'glyphref', 'glyphRef', 0, false, false, false);
 18183   INTERVAL = $ElementName_0(new ElementName(), 'interval', 'interval', 0, false, false, false);
 18184   INTEGERS = $ElementName_0(new ElementName(), 'integers', 'integers', 0, false, false, false);
 18185   INFINITY = $ElementName_0(new ElementName(), 'infinity', 'infinity', 0, false, false, false);
 18186   LISTENER = $ElementName_0(new ElementName(), 'listener', 'listener', 0, false, false, false);
 18187   LOWLIMIT = $ElementName_0(new ElementName(), 'lowlimit', 'lowlimit', 0, false, false, false);
 18188   METADATA = $ElementName_0(new ElementName(), 'metadata', 'metadata', 0, false, false, false);
 18189   MENCLOSE = $ElementName_0(new ElementName(), 'menclose', 'menclose', 0, false, false, false);
 18190   MPHANTOM = $ElementName_0(new ElementName(), 'mphantom', 'mphantom', 0, false, false, false);
 18191   NOFRAMES = $ElementName_0(new ElementName(), 'noframes', 'noframes', 25, true, false, false);
 18192   NOSCRIPT = $ElementName_0(new ElementName(), 'noscript', 'noscript', 26, true, false, false);
 18193   OPTGROUP = $ElementName_0(new ElementName(), 'optgroup', 'optgroup', 27, true, false, false);
 18194   POLYLINE = $ElementName_0(new ElementName(), 'polyline', 'polyline', 0, false, false, false);
 18195   PREFETCH = $ElementName_0(new ElementName(), 'prefetch', 'prefetch', 0, false, false, false);
 18196   PROGRESS = $ElementName_0(new ElementName(), 'progress', 'progress', 0, false, false, false);
 18197   PRSUBSET = $ElementName_0(new ElementName(), 'prsubset', 'prsubset', 0, false, false, false);
 18198   QUOTIENT = $ElementName_0(new ElementName(), 'quotient', 'quotient', 0, false, false, false);
 18199   SELECTOR = $ElementName_0(new ElementName(), 'selector', 'selector', 0, false, false, false);
 18200   TEXTAREA = $ElementName_0(new ElementName(), 'textarea', 'textarea', 35, true, false, false);
 18201   TEXTPATH = $ElementName_0(new ElementName(), 'textpath', 'textPath', 0, false, false, false);
 18202   VARIANCE = $ElementName_0(new ElementName(), 'variance', 'variance', 0, false, false, false);
 18203   ANIMATION = $ElementName_0(new ElementName(), 'animation', 'animation', 0, false, false, false);
 18204   CONJUGATE = $ElementName_0(new ElementName(), 'conjugate', 'conjugate', 0, false, false, false);
 18205   CONDITION = $ElementName_0(new ElementName(), 'condition', 'condition', 0, false, false, false);
 18206   COMPLEXES = $ElementName_0(new ElementName(), 'complexes', 'complexes', 0, false, false, false);
 18207   FONT_FACE = $ElementName_0(new ElementName(), 'font-face', 'font-face', 0, false, false, false);
 18208   FACTORIAL = $ElementName_0(new ElementName(), 'factorial', 'factorial', 0, false, false, false);
 18209   INTERSECT = $ElementName_0(new ElementName(), 'intersect', 'intersect', 0, false, false, false);
 18210   IMAGINARY = $ElementName_0(new ElementName(), 'imaginary', 'imaginary', 0, false, false, false);
 18211   LAPLACIAN = $ElementName_0(new ElementName(), 'laplacian', 'laplacian', 0, false, false, false);
 18212   MATRIXROW = $ElementName_0(new ElementName(), 'matrixrow', 'matrixrow', 0, false, false, false);
 18213   NOTSUBSET = $ElementName_0(new ElementName(), 'notsubset', 'notsubset', 0, false, false, false);
 18214   OTHERWISE = $ElementName_0(new ElementName(), 'otherwise', 'otherwise', 0, false, false, false);
 18215   PIECEWISE = $ElementName_0(new ElementName(), 'piecewise', 'piecewise', 0, false, false, false);
 18216   PLAINTEXT = $ElementName_0(new ElementName(), 'plaintext', 'plaintext', 30, true, false, false);
 18217   RATIONALS = $ElementName_0(new ElementName(), 'rationals', 'rationals', 0, false, false, false);
 18218   SEMANTICS = $ElementName_0(new ElementName(), 'semantics', 'semantics', 0, false, false, false);
 18219   TRANSPOSE = $ElementName_0(new ElementName(), 'transpose', 'transpose', 0, false, false, false);
 18220   ANNOTATION = $ElementName_0(new ElementName(), 'annotation', 'annotation', 0, false, false, false);
 18221   BLOCKQUOTE = $ElementName_0(new ElementName(), 'blockquote', 'blockquote', 50, true, false, false);
 18222   DIVERGENCE = $ElementName_0(new ElementName(), 'divergence', 'divergence', 0, false, false, false);
 18223   EULERGAMMA = $ElementName_0(new ElementName(), 'eulergamma', 'eulergamma', 0, false, false, false);
 18224   EQUIVALENT = $ElementName_0(new ElementName(), 'equivalent', 'equivalent', 0, false, false, false);
 18225   IMAGINARYI = $ElementName_0(new ElementName(), 'imaginaryi', 'imaginaryi', 0, false, false, false);
 18226   MALIGNMARK = $ElementName_0(new ElementName(), 'malignmark', 'malignmark', 56, false, false, false);
 18227   MUNDEROVER = $ElementName_0(new ElementName(), 'munderover', 'munderover', 0, false, false, false);
 18228   MLABELEDTR = $ElementName_0(new ElementName(), 'mlabeledtr', 'mlabeledtr', 0, false, false, false);
 18229   NOTANUMBER = $ElementName_0(new ElementName(), 'notanumber', 'notanumber', 0, false, false, false);
 18230   SOLIDCOLOR = $ElementName_0(new ElementName(), 'solidcolor', 'solidcolor', 0, false, false, false);
 18231   ALTGLYPHDEF = $ElementName_0(new ElementName(), 'altglyphdef', 'altGlyphDef', 0, false, false, false);
 18232   DETERMINANT = $ElementName_0(new ElementName(), 'determinant', 'determinant', 0, false, false, false);
 18233   EVENTSOURCE = $ElementName_0(new ElementName(), 'eventsource', 'eventsource', 54, true, false, false);
 18234   FEMERGENODE = $ElementName_0(new ElementName(), 'femergenode', 'feMergeNode', 0, false, false, false);
 18235   FECOMPOSITE = $ElementName_0(new ElementName(), 'fecomposite', 'feComposite', 0, false, false, false);
 18236   FESPOTLIGHT = $ElementName_0(new ElementName(), 'fespotlight', 'feSpotLight', 0, false, false, false);
 18237   MALIGNGROUP = $ElementName_0(new ElementName(), 'maligngroup', 'maligngroup', 0, false, false, false);
 18238   MPRESCRIPTS = $ElementName_0(new ElementName(), 'mprescripts', 'mprescripts', 0, false, false, false);
 18239   MOMENTABOUT = $ElementName_0(new ElementName(), 'momentabout', 'momentabout', 0, false, false, false);
 18240   NOTPRSUBSET = $ElementName_0(new ElementName(), 'notprsubset', 'notprsubset', 0, false, false, false);
 18241   PARTIALDIFF = $ElementName_0(new ElementName(), 'partialdiff', 'partialdiff', 0, false, false, false);
 18242   ALTGLYPHITEM = $ElementName_0(new ElementName(), 'altglyphitem', 'altGlyphItem', 0, false, false, false);
 18243   ANIMATECOLOR = $ElementName_0(new ElementName(), 'animatecolor', 'animateColor', 0, false, false, false);
 18244   DATATEMPLATE = $ElementName_0(new ElementName(), 'datatemplate', 'datatemplate', 0, false, false, false);
 18245   EXPONENTIALE = $ElementName_0(new ElementName(), 'exponentiale', 'exponentiale', 0, false, false, false);
 18246   FETURBULENCE = $ElementName_0(new ElementName(), 'feturbulence', 'feTurbulence', 0, false, false, false);
 18247   FEPOINTLIGHT = $ElementName_0(new ElementName(), 'fepointlight', 'fePointLight', 0, false, false, false);
 18248   FEMORPHOLOGY = $ElementName_0(new ElementName(), 'femorphology', 'feMorphology', 0, false, false, false);
 18249   OUTERPRODUCT = $ElementName_0(new ElementName(), 'outerproduct', 'outerproduct', 0, false, false, false);
 18250   ANIMATEMOTION = $ElementName_0(new ElementName(), 'animatemotion', 'animateMotion', 0, false, false, false);
 18251   COLOR_PROFILE_0 = $ElementName_0(new ElementName(), 'color-profile', 'color-profile', 0, false, false, false);
 18252   FONT_FACE_SRC = $ElementName_0(new ElementName(), 'font-face-src', 'font-face-src', 0, false, false, false);
 18253   FONT_FACE_URI = $ElementName_0(new ElementName(), 'font-face-uri', 'font-face-uri', 0, false, false, false);
 18254   FOREIGNOBJECT = $ElementName_0(new ElementName(), 'foreignobject', 'foreignObject', 59, false, false, false);
 18255   FECOLORMATRIX = $ElementName_0(new ElementName(), 'fecolormatrix', 'feColorMatrix', 0, false, false, false);
 18256   MISSING_GLYPH = $ElementName_0(new ElementName(), 'missing-glyph', 'missing-glyph', 0, false, false, false);
 18257   MMULTISCRIPTS = $ElementName_0(new ElementName(), 'mmultiscripts', 'mmultiscripts', 0, false, false, false);
 18258   SCALARPRODUCT = $ElementName_0(new ElementName(), 'scalarproduct', 'scalarproduct', 0, false, false, false);
 18259   VECTORPRODUCT = $ElementName_0(new ElementName(), 'vectorproduct', 'vectorproduct', 0, false, false, false);
 18260   ANNOTATION_XML = $ElementName_0(new ElementName(), 'annotation-xml', 'annotation-xml', 58, false, false, false);
 18261   DEFINITION_SRC = $ElementName_0(new ElementName(), 'definition-src', 'definition-src', 0, false, false, false);
 18262   FONT_FACE_NAME = $ElementName_0(new ElementName(), 'font-face-name', 'font-face-name', 0, false, false, false);
 18263   FEGAUSSIANBLUR = $ElementName_0(new ElementName(), 'fegaussianblur', 'feGaussianBlur', 0, false, false, false);
 18264   FEDISTANTLIGHT = $ElementName_0(new ElementName(), 'fedistantlight', 'feDistantLight', 0, false, false, false);
 18265   LINEARGRADIENT = $ElementName_0(new ElementName(), 'lineargradient', 'linearGradient', 0, false, false, false);
 18266   NATURALNUMBERS = $ElementName_0(new ElementName(), 'naturalnumbers', 'naturalnumbers', 0, false, false, false);
 18267   RADIALGRADIENT = $ElementName_0(new ElementName(), 'radialgradient', 'radialGradient', 0, false, false, false);
 18268   ANIMATETRANSFORM = $ElementName_0(new ElementName(), 'animatetransform', 'animateTransform', 0, false, false, false);
 18269   CARTESIANPRODUCT = $ElementName_0(new ElementName(), 'cartesianproduct', 'cartesianproduct', 0, false, false, false);
 18270   FONT_FACE_FORMAT = $ElementName_0(new ElementName(), 'font-face-format', 'font-face-format', 0, false, false, false);
 18271   FECONVOLVEMATRIX = $ElementName_0(new ElementName(), 'feconvolvematrix', 'feConvolveMatrix', 0, false, false, false);
 18272   FEDIFFUSELIGHTING = $ElementName_0(new ElementName(), 'fediffuselighting', 'feDiffuseLighting', 0, false, false, false);
 18273   FEDISPLACEMENTMAP = $ElementName_0(new ElementName(), 'fedisplacementmap', 'feDisplacementMap', 0, false, false, false);
 18274   FESPECULARLIGHTING = $ElementName_0(new ElementName(), 'fespecularlighting', 'feSpecularLighting', 0, false, false, false);
 18275   DOMAINOFAPPLICATION = $ElementName_0(new ElementName(), 'domainofapplication', 'domainofapplication', 0, false, false, false);
 18276   FECOMPONENTTRANSFER = $ElementName_0(new ElementName(), 'fecomponenttransfer', 'feComponentTransfer', 0, false, false, false);
 18277   ELEMENT_NAMES = initValues(_3Lnu_validator_htmlparser_impl_ElementName_2_classLit, 50, 10, [A, B, G, I, P, Q, S, U, BR, CI, CN, DD, DL, DT, EM, EQ, FN, H1, H2, H3, H4, H5, H6, GT, HR, IN_0, LI, LN, LT, MI, MN, MO, MS, OL, OR, PI, RP, RT_0, TD, TH, TR, TT, UL, AND, ARG, ABS, BIG, BDO, CSC, COL, COS, COT, DEL, DFN, DIR_0, DIV, EXP, GCD, GEQ, IMG, INS, INT, KBD, LOG, LCM, LEQ, MTD, MIN_0, MAP, MTR, MAX_0, NEQ, NOT, NAV, PRE, REM, SUB, SEC, SVG, SUM, SIN, SEP, SUP, SET, TAN, USE, VAR, WBR, XMP, XOR, AREA, ABBR_0, BASE_0, BVAR, BODY, CARD, CODE_0, CITE_0, CSCH, COSH, COTH, CURL, DESC, DIFF, DEFS, FORM_0, FONT, GRAD, HEAD, HTML_0, LINE, LINK_0, LIST_0, META, MSUB, MODE_0, MATH, MARK, MASK_0, MEAN, MSUP, MENU, MROW, NONE, NOBR, NEST, PATH_0, PLUS, RULE, REAL, RELN, RECT, ROOT, RUBY, SECH, SINH, SPAN_0, SAMP, STOP, SDEV, TIME, TRUE, TREF, TANH, TEXT_0, VIEW, ASIDE, AUDIO, APPLY, EMBED, FRAME_0, FALSE, FLOOR, GLYPH, HKERN, IMAGE, IDENT, INPUT, LABEL_0, LIMIT, MFRAC, MPATH, METER, MOVER, MINUS, MROOT, MSQRT, MTEXT, NOTIN, PIECE, PARAM, POWER, REALS, STYLE_0, SMALL, THEAD, TABLE, TITLE_0, TSPAN, TIMES, TFOOT, TBODY, UNION, VKERN, VIDEO, ARCSEC, ARCCSC, ARCTAN, ARCSIN, ARCCOS, APPLET, ARCCOT, APPROX, BUTTON, CIRCLE, CENTER, CURSOR_0, CANVAS, DIVIDE, DEGREE, DIALOG, DOMAIN, EXISTS, FETILE, FIGURE, FORALL, FILTER_0, FOOTER, HEADER, IFRAME, KEYGEN, LAMBDA, LEGEND, MSPACE, MTABLE, MSTYLE, MGLYPH, MEDIAN, MUNDER, MARKER, MERROR, MOMENT, MATRIX, OPTION, OBJECT_0, OUTPUT, PRIMES, SOURCE, STRIKE, STRONG, SWITCH, SYMBOL, SPACER, SELECT, SUBSET, SCRIPT, TBREAK, VECTOR, ARTICLE, ANIMATE, ARCSECH, ARCCSCH, ARCTANH, ARCSINH, ARCCOSH, ARCCOTH, ACRONYM, ADDRESS, BGSOUND, COMMAND, COMPOSE, CEILING, CSYMBOL, CAPTION, DISCARD, DECLARE_0, DETAILS, ELLIPSE, FEFUNCA, FEFUNCB, FEBLEND, FEFLOOD, FEIMAGE, FEMERGE, FEFUNCG, FEFUNCR, HANDLER, INVERSE, IMPLIES, ISINDEX, LOGBASE, LISTING, MFENCED, MPADDED, MARQUEE, MACTION, MSUBSUP, NOEMBED, POLYGON, PATTERN_0, PRODUCT, SETDIFF, SECTION, TENDSTO, UPLIMIT, ALTGLYPH, BASEFONT, CLIPPATH, CODOMAIN, COLGROUP, DATAGRID, EMPTYSET, FACTOROF, FIELDSET, FRAMESET, FEOFFSET, GLYPHREF_0, INTERVAL, INTEGERS, INFINITY, LISTENER, LOWLIMIT, METADATA, MENCLOSE, MPHANTOM, NOFRAMES, NOSCRIPT, OPTGROUP, POLYLINE, PREFETCH, PROGRESS, PRSUBSET, QUOTIENT, SELECTOR, TEXTAREA, TEXTPATH, VARIANCE, ANIMATION, CONJUGATE, CONDITION, COMPLEXES, FONT_FACE, FACTORIAL, INTERSECT, IMAGINARY, LAPLACIAN, MATRIXROW, NOTSUBSET, OTHERWISE, PIECEWISE, PLAINTEXT, RATIONALS, SEMANTICS, TRANSPOSE, ANNOTATION, BLOCKQUOTE, DIVERGENCE, EULERGAMMA, EQUIVALENT, IMAGINARYI, MALIGNMARK, MUNDEROVER, MLABELEDTR, NOTANUMBER, SOLIDCOLOR, ALTGLYPHDEF, DETERMINANT, EVENTSOURCE, FEMERGENODE, FECOMPOSITE, FESPOTLIGHT, MALIGNGROUP, MPRESCRIPTS, MOMENTABOUT, NOTPRSUBSET, PARTIALDIFF, ALTGLYPHITEM, ANIMATECOLOR, DATATEMPLATE, EXPONENTIALE, FETURBULENCE, FEPOINTLIGHT, FEMORPHOLOGY, OUTERPRODUCT, ANIMATEMOTION, COLOR_PROFILE_0, FONT_FACE_SRC, FONT_FACE_URI, FOREIGNOBJECT, FECOLORMATRIX, MISSING_GLYPH, MMULTISCRIPTS, SCALARPRODUCT, VECTORPRODUCT, ANNOTATION_XML, DEFINITION_SRC, FONT_FACE_NAME, FEGAUSSIANBLUR, FEDISTANTLIGHT, LINEARGRADIENT, NATURALNUMBERS, RADIALGRADIENT, ANIMATETRANSFORM, CARTESIANPRODUCT, FONT_FACE_FORMAT, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FESPECULARLIGHTING, DOMAINOFAPPLICATION, FECOMPONENTTRANSFER]);
 18278   ELEMENT_HASHES = initValues(_3I_classLit, 0, -1, [1057, 1090, 1255, 1321, 1552, 1585, 1651, 1717, 68162, 68899, 69059, 69764, 70020, 70276, 71077, 71205, 72134, 72232, 72264, 72296, 72328, 72360, 72392, 73351, 74312, 75209, 78124, 78284, 78476, 79149, 79309, 79341, 79469, 81295, 81487, 82224, 84498, 84626, 86164, 86292, 86612, 86676, 87445, 3183041, 3186241, 3198017, 3218722, 3226754, 3247715, 3256803, 3263971, 3264995, 3289252, 3291332, 3295524, 3299620, 3326725, 3379303, 3392679, 3448233, 3460553, 3461577, 3510347, 3546604, 3552364, 3556524, 3576461, 3586349, 3588141, 3590797, 3596333, 3622062, 3625454, 3627054, 3675728, 3749042, 3771059, 3771571, 3776211, 3782323, 3782963, 3784883, 3785395, 3788979, 3815476, 3839605, 3885110, 3917911, 3948984, 3951096, 135304769, 135858241, 136498210, 136906434, 137138658, 137512995, 137531875, 137548067, 137629283, 137645539, 137646563, 137775779, 138529956, 138615076, 139040932, 140954086, 141179366, 141690439, 142738600, 143013512, 146979116, 147175724, 147475756, 147902637, 147936877, 148017645, 148131885, 148228141, 148229165, 148309165, 148395629, 148551853, 148618829, 149076462, 149490158, 149572782, 151277616, 151639440, 153268914, 153486514, 153563314, 153750706, 153763314, 153914034, 154406067, 154417459, 154600979, 154678323, 154680979, 154866835, 155366708, 155375188, 155391572, 155465780, 155869364, 158045494, 168988979, 169321621, 169652752, 173151309, 174240818, 174247297, 174669292, 175391532, 176638123, 177380397, 177879204, 177886734, 180753473, 181020073, 181503558, 181686320, 181999237, 181999311, 182048201, 182074866, 182078003, 182083764, 182920847, 184716457, 184976961, 185145071, 187281445, 187872052, 188100653, 188875944, 188919873, 188920457, 189203987, 189371817, 189414886, 189567458, 190266670, 191318187, 191337609, 202479203, 202493027, 202835587, 202843747, 203013219, 203036048, 203045987, 203177552, 203898516, 204648562, 205067918, 205078130, 205096654, 205689142, 205690439, 205766017, 205988909, 207213161, 207794484, 207800999, 208023602, 208213644, 208213647, 210310273, 210940978, 213325049, 213946445, 214055079, 215125040, 215134273, 215135028, 215237420, 215418148, 215553166, 215553394, 215563858, 215627949, 215754324, 217529652, 217713834, 217732628, 218731945, 221417045, 221424946, 221493746, 221515401, 221658189, 221844577, 221908140, 221910626, 221921586, 222659762, 225001091, 236105833, 236113965, 236194995, 236195427, 236206132, 236206387, 236211683, 236212707, 236381647, 236571826, 237124271, 238172205, 238210544, 238270764, 238435405, 238501172, 239224867, 239257644, 239710497, 240307721, 241208789, 241241557, 241318060, 241319404, 241343533, 241344069, 241405397, 241765845, 243864964, 244502085, 244946220, 245109902, 247647266, 247707956, 248648814, 248648836, 248682161, 248986932, 249058914, 249697357, 252132601, 252135604, 252317348, 255007012, 255278388, 256365156, 257566121, 269763372, 271202790, 271863856, 272049197, 272127474, 272770631, 274339449, 274939471, 275388004, 275388005, 275388006, 275977800, 278267602, 278513831, 278712622, 281613765, 281683369, 282120228, 282250732, 282508942, 283743649, 283787570, 284710386, 285391148, 285478533, 285854898, 285873762, 286931113, 288964227, 289445441, 289689648, 291671489, 303512884, 305319975, 305610036, 305764101, 308448294, 308675890, 312085683, 312264750, 315032867, 316391000, 317331042, 317902135, 318950711, 319447220, 321499182, 322538804, 323145200, 337067316, 337826293, 339905989, 340833697, 341457068, 345302593, 349554733, 349771471, 349786245, 350819405, 356072847, 370349192, 373962798, 374509141, 375558638, 375574835, 376053993, 383276530, 383373833, 383407586, 384439906, 386079012, 404133513, 404307343, 407031852, 408072233, 409112005, 409608425, 409771500, 419040932, 437730612, 439529766, 442616365, 442813037, 443157674, 443295316, 450118444, 450482697, 456789668, 459935396, 471217869, 474073645, 476230702, 476665218, 476717289, 483014825, 485083298, 489306281, 538364390, 540675748, 543819186, 543958612, 576960820, 577242548, 610515252, 642202932, 644420819]);
 18279 }
 18280 
 18281 function $ElementName_0(this$static, name, camelCaseName, group, special, scoping, fosterParenting){
 18282   $clinit_89();
 18283   this$static.name_0 = name;
 18284   this$static.camelCaseName = camelCaseName;
 18285   this$static.group = group;
 18286   this$static.special = special;
 18287   this$static.scoping = scoping;
 18288   this$static.fosterParenting = fosterParenting;
 18289   this$static.custom = false;
 18290   return this$static;
 18291 }
 18292 
 18293 function $ElementName(this$static, name){
 18294   $clinit_89();
 18295   this$static.name_0 = name;
 18296   this$static.camelCaseName = name;
 18297   this$static.group = 0;
 18298   this$static.special = false;
 18299   this$static.scoping = false;
 18300   this$static.fosterParenting = false;
 18301   this$static.custom = true;
 18302   return this$static;
 18303 }
 18304 
 18305 function bufToHash_0(buf, len){
 18306   var hash, i, j;
 18307   hash = len;
 18308   hash <<= 5;
 18309   hash += buf[0] - 96;
 18310   j = len;
 18311   for (i = 0; i < 4 && j > 0; ++i) {
 18312     --j;
 18313     hash <<= 5;
 18314     hash += buf[j] - 96;
 18315   }
 18316   return hash;
 18317 }
 18318 
 18319 function elementNameByBuffer(buf, offset, length){
 18320   var end, end_0;
 18321   $clinit_89();
 18322   var elementName, hash, index, name;
 18323   hash = bufToHash_0(buf, length);
 18324   index = binarySearch(ELEMENT_HASHES, hash);
 18325   if (index < 0) {
 18326     return $ElementName(new ElementName(), String((end = offset + length , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))));
 18327   }
 18328    else {
 18329     elementName = ELEMENT_NAMES[index];
 18330     name = elementName.name_0;
 18331     if (!localEqualsBuffer(name, buf, offset, length)) {
 18332       return $ElementName(new ElementName(), String((end_0 = offset + length , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))));
 18333     }
 18334     return elementName;
 18335   }
 18336 }
 18337 
 18338 function getClass_51(){
 18339   return Lnu_validator_htmlparser_impl_ElementName_2_classLit;
 18340 }
 18341 
 18342 function ElementName(){
 18343 }
 18344 
 18345 _ = ElementName.prototype = new Object_0();
 18346 _.getClass$ = getClass_51;
 18347 _.typeId$ = 37;
 18348 _.camelCaseName = null;
 18349 _.custom = false;
 18350 _.fosterParenting = false;
 18351 _.group = 0;
 18352 _.name_0 = null;
 18353 _.scoping = false;
 18354 _.special = false;
 18355 var A, ABBR_0, ABS, ACRONYM, ADDRESS, ALTGLYPH, ALTGLYPHDEF, ALTGLYPHITEM, AND, ANIMATE, ANIMATECOLOR, ANIMATEMOTION, ANIMATETRANSFORM, ANIMATION, ANNOTATION, ANNOTATION_XML, APPLET, APPLY, APPROX, ARCCOS, ARCCOSH, ARCCOT, ARCCOTH, ARCCSC, ARCCSCH, ARCSEC, ARCSECH, ARCSIN, ARCSINH, ARCTAN, ARCTANH, AREA, ARG, ARTICLE, ASIDE, AUDIO, B, BASE_0, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, BVAR, CANVAS, CAPTION, CARD, CARTESIANPRODUCT, CEILING, CENTER, CI, CIRCLE, CITE_0, CLIPPATH, CN, CODE_0, CODOMAIN, COL, COLGROUP, COLOR_PROFILE_0, COMMAND, COMPLEXES, COMPOSE, CONDITION, CONJUGATE, COS, COSH, COT, COTH, CSC, CSCH, CSYMBOL, CURL, CURSOR_0, DATAGRID, DATATEMPLATE, DD, DECLARE_0, DEFINITION_SRC, DEFS, DEGREE, DEL, DESC, DETAILS, DETERMINANT, DFN, DIALOG, DIFF, DIR_0, DISCARD, DIV, DIVERGENCE, DIVIDE, DL, DOMAIN, DOMAINOFAPPLICATION, DT, ELEMENT_HASHES, ELEMENT_NAMES, ELLIPSE, EM, EMBED, EMPTYSET, EQ, EQUIVALENT, EULERGAMMA, EVENTSOURCE, EXISTS, EXP, EXPONENTIALE, FACTORIAL, FACTOROF, FALSE, FEBLEND, FECOLORMATRIX, FECOMPONENTTRANSFER, FECOMPOSITE, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FEDISTANTLIGHT, FEFLOOD, FEFUNCA, FEFUNCB, FEFUNCG, FEFUNCR, FEGAUSSIANBLUR, FEIMAGE, FEMERGE, FEMERGENODE, FEMORPHOLOGY, FEOFFSET, FEPOINTLIGHT, FESPECULARLIGHTING, FESPOTLIGHT, FETILE, FETURBULENCE, FIELDSET, FIGURE, FILTER_0, FLOOR, FN, FONT, FONT_FACE, FONT_FACE_FORMAT, FONT_FACE_NAME, FONT_FACE_SRC, FONT_FACE_URI, FOOTER, FORALL, FOREIGNOBJECT, FORM_0, FRAME_0, FRAMESET, G, GCD, GEQ, GLYPH, GLYPHREF_0, GRAD, GT, H1, H2, H3, H4, H5, H6, HANDLER, HEAD, HEADER, HKERN, HR, HTML_0, I, IDENT, IFRAME, IMAGE, IMAGINARY, IMAGINARYI, IMG, IMPLIES, IN_0, INFINITY, INPUT, INS, INT, INTEGERS, INTERSECT, INTERVAL, INVERSE, ISINDEX, KBD, KEYGEN, LABEL_0, LAMBDA, LAPLACIAN, LCM, LEGEND, LEQ, LI, LIMIT, LINE, LINEARGRADIENT, LINK_0, LIST_0, LISTENER, LISTING, LN, LOG, LOGBASE, LOWLIMIT, LT, MACTION, MALIGNGROUP, MALIGNMARK, MAP, MARK, MARKER, MARQUEE, MASK_0, MATH, MATRIX, MATRIXROW, MAX_0, MEAN, MEDIAN, MENCLOSE, MENU, MERROR, META, METADATA, METER, MFENCED, MFRAC, MGLYPH, MI, MIN_0, MINUS, MISSING_GLYPH, MLABELEDTR, MMULTISCRIPTS, MN, MO, MODE_0, MOMENT, MOMENTABOUT, MOVER, MPADDED, MPATH, MPHANTOM, MPRESCRIPTS, MROOT, MROW, MS, MSPACE, MSQRT, MSTYLE, MSUB, MSUBSUP, MSUP, MTABLE, MTD, MTEXT, MTR, MUNDER, MUNDEROVER, NATURALNUMBERS, NAV, NEQ, NEST, NOBR, NOEMBED, NOFRAMES, NONE, NOSCRIPT, NOT, NOTANUMBER, NOTIN, NOTPRSUBSET, NOTSUBSET, OBJECT_0, OL, OPTGROUP, OPTION, OR, OTHERWISE, OUTERPRODUCT, OUTPUT, P, PARAM, PARTIALDIFF, PATH_0, PATTERN_0, PI, PIECE, PIECEWISE, PLAINTEXT, PLUS, POLYGON, POLYLINE, POWER, PRE, PREFETCH, PRIMES, PRODUCT, PROGRESS, PRSUBSET, Q, QUOTIENT, RADIALGRADIENT, RATIONALS, REAL, REALS, RECT, RELN, REM, ROOT, RP, RT_0, RUBY, RULE, S, SAMP, SCALARPRODUCT, SCRIPT, SDEV, SEC, SECH, SECTION, SELECT, SELECTOR, SEMANTICS, SEP, SET, SETDIFF, SIN, SINH, SMALL, SOLIDCOLOR, SOURCE, SPACER, SPAN_0, STOP, STRIKE, STRONG, STYLE_0, SUB, SUBSET, SUM, SUP, SVG, SWITCH, SYMBOL, TABLE, TAN, TANH, TBODY, TBREAK, TD, TENDSTO, TEXT_0, TEXTAREA, TEXTPATH, TFOOT, TH, THEAD, TIME, TIMES, TITLE_0, TR, TRANSPOSE, TREF, TRUE, TSPAN, TT, U, UL, UNION, UPLIMIT, USE, VAR, VARIANCE, VECTOR, VECTORPRODUCT, VIDEO, VIEW, VKERN, WBR, XMP, XOR;
 18356 function $clinit_97(){
 18357   $clinit_97 = nullMethod;
 18358   LT_GT = initValues(_3C_classLit, 42, -1, [60, 62]);
 18359   LT_SOLIDUS = initValues(_3C_classLit, 42, -1, [60, 47]);
 18360   RSQB_RSQB = initValues(_3C_classLit, 42, -1, [93, 93]);
 18361   REPLACEMENT_CHARACTER = initValues(_3C_classLit, 42, -1, [65533]);
 18362   SPACE = initValues(_3C_classLit, 42, -1, [32]);
 18363   LF = initValues(_3C_classLit, 42, -1, [10]);
 18364   CDATA_LSQB = $toCharArray('CDATA[');
 18365   OCTYPE = $toCharArray('octype');
 18366   UBLIC = $toCharArray('ublic');
 18367   YSTEM = $toCharArray('ystem');
 18368   TITLE_ARR = initValues(_3C_classLit, 42, -1, [116, 105, 116, 108, 101]);
 18369   SCRIPT_ARR = initValues(_3C_classLit, 42, -1, [115, 99, 114, 105, 112, 116]);
 18370   STYLE_ARR = initValues(_3C_classLit, 42, -1, [115, 116, 121, 108, 101]);
 18371   PLAINTEXT_ARR = initValues(_3C_classLit, 42, -1, [112, 108, 97, 105, 110, 116, 101, 120, 116]);
 18372   XMP_ARR = initValues(_3C_classLit, 42, -1, [120, 109, 112]);
 18373   TEXTAREA_ARR = initValues(_3C_classLit, 42, -1, [116, 101, 120, 116, 97, 114, 101, 97]);
 18374   IFRAME_ARR = initValues(_3C_classLit, 42, -1, [105, 102, 114, 97, 109, 101]);
 18375   NOEMBED_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 101, 109, 98, 101, 100]);
 18376   NOSCRIPT_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 115, 99, 114, 105, 112, 116]);
 18377   NOFRAMES_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 102, 114, 97, 109, 101, 115]);
 18378 }
 18379 
 18380 function $addAttributeWithValue(this$static){
 18381   var value;
 18382   this$static.metaBoundaryPassed && ($clinit_89() , META) == this$static.tagName && ($clinit_87() , CHARSET) == this$static.attributeName;
 18383   if (this$static.attributeName) {
 18384     value = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 18385     if (!this$static.endTag && this$static.html4 && this$static.html4ModeCompatibleWithXhtml1Schemata && $isCaseFolded(this$static.attributeName)) {
 18386       value = newAsciiLowerCaseStringFromString(value);
 18387     }
 18388     $addAttribute(this$static.attributes, this$static.attributeName, value, this$static.xmlnsPolicy);
 18389   }
 18390 }
 18391 
 18392 function $addAttributeWithoutValue(this$static){
 18393   this$static.metaBoundaryPassed && ($clinit_87() , CHARSET) == this$static.attributeName && ($clinit_89() , META) == this$static.tagName;
 18394   if (this$static.attributeName) {
 18395     if (this$static.html4) {
 18396       if ($isBoolean(this$static.attributeName)) {
 18397         if (this$static.html4ModeCompatibleWithXhtml1Schemata) {
 18398           $addAttribute(this$static.attributes, this$static.attributeName, this$static.attributeName.local[0], this$static.xmlnsPolicy);
 18399         }
 18400          else {
 18401           $addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
 18402         }
 18403       }
 18404        else {
 18405         $addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
 18406       }
 18407     }
 18408      else {
 18409       if (($clinit_87() , SRC) == this$static.attributeName || HREF == this$static.attributeName) {
 18410         'Attribute \u201C' + this$static.attributeName.local[0] + '\u201D without an explicit value seen. The attribute may be dropped by IE7.';
 18411       }
 18412       $addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
 18413     }
 18414   }
 18415 }
 18416 
 18417 function $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c){
 18418   switch (this$static.commentPolicy.ordinal) {
 18419     case 2:
 18420       --this$static.longStrBufLen;
 18421       $appendLongStrBuf(this$static, 32);
 18422       $appendLongStrBuf(this$static, 45);
 18423     case 0:
 18424       $appendLongStrBuf(this$static, c);
 18425       break;
 18426     case 1:
 18427       $fatal(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
 18428   }
 18429 }
 18430 
 18431 function $appendLongStrBuf(this$static, c){
 18432   var newBuf;
 18433   if (this$static.longStrBufLen == this$static.longStrBuf.length) {
 18434     newBuf = initDim(_3C_classLit, 42, -1, this$static.longStrBufLen + (this$static.longStrBufLen >> 1), 1);
 18435     arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
 18436     this$static.longStrBuf = newBuf;
 18437   }
 18438   this$static.longStrBuf[this$static.longStrBufLen++] = c;
 18439 }
 18440 
 18441 function $appendLongStrBuf_0(this$static, buffer, offset, length){
 18442   var newBuf, reqLen;
 18443   reqLen = this$static.longStrBufLen + length;
 18444   if (this$static.longStrBuf.length < reqLen) {
 18445     newBuf = initDim(_3C_classLit, 42, -1, reqLen + (reqLen >> 1), 1);
 18446     arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
 18447     this$static.longStrBuf = newBuf;
 18448   }
 18449   arraycopy(buffer, offset, this$static.longStrBuf, this$static.longStrBufLen, length);
 18450   this$static.longStrBufLen = reqLen;
 18451 }
 18452 
 18453 function $appendSecondHyphenToBogusComment(this$static){
 18454   switch (this$static.commentPolicy.ordinal) {
 18455     case 2:
 18456       $appendLongStrBuf(this$static, 32);
 18457     case 0:
 18458       $appendLongStrBuf(this$static, 45);
 18459       break;
 18460     case 1:
 18461       $fatal(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
 18462   }
 18463 }
 18464 
 18465 function $appendStrBuf(this$static, c){
 18466   var newBuf;
 18467   if (this$static.strBufLen == this$static.strBuf.length) {
 18468     newBuf = initDim(_3C_classLit, 42, -1, this$static.strBuf.length + 1024, 1);
 18469     arraycopy(this$static.strBuf, 0, newBuf, 0, this$static.strBuf.length);
 18470     this$static.strBuf = newBuf;
 18471   }
 18472   this$static.strBuf[this$static.strBufLen++] = c;
 18473 }
 18474 
 18475 function $attributeNameComplete(this$static){
 18476   this$static.attributeName = nameByBuffer(this$static.strBuf, 0, this$static.strBufLen, this$static.namePolicy != ($clinit_80() , ALLOW));
 18477   if (!this$static.attributes) {
 18478     this$static.attributes = $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
 18479   }
 18480   if ($contains(this$static.attributes, this$static.attributeName)) {
 18481     'Duplicate attribute \u201C' + this$static.attributeName.local[0] + '\u201D.';
 18482     this$static.attributeName = null;
 18483   }
 18484 }
 18485 
 18486 function $contentModelElementToArray(this$static){
 18487   switch (this$static.contentModelElement.group) {
 18488     case 36:
 18489       this$static.contentModelElementNameAsArray = TITLE_ARR;
 18490       return;
 18491     case 31:
 18492       this$static.contentModelElementNameAsArray = SCRIPT_ARR;
 18493       return;
 18494     case 33:
 18495       this$static.contentModelElementNameAsArray = STYLE_ARR;
 18496       return;
 18497     case 30:
 18498       this$static.contentModelElementNameAsArray = PLAINTEXT_ARR;
 18499       return;
 18500     case 38:
 18501       this$static.contentModelElementNameAsArray = XMP_ARR;
 18502       return;
 18503     case 35:
 18504       this$static.contentModelElementNameAsArray = TEXTAREA_ARR;
 18505       return;
 18506     case 47:
 18507       this$static.contentModelElementNameAsArray = IFRAME_ARR;
 18508       return;
 18509     case 60:
 18510       this$static.contentModelElementNameAsArray = NOEMBED_ARR;
 18511       return;
 18512     case 26:
 18513       this$static.contentModelElementNameAsArray = NOSCRIPT_ARR;
 18514       return;
 18515     case 25:
 18516       this$static.contentModelElementNameAsArray = NOFRAMES_ARR;
 18517       return;
 18518     default:return;
 18519   }
 18520 }
 18521 
 18522 function $emitCarriageReturn(this$static, buf, pos){
 18523   this$static.nextCharOnNewLine = true;
 18524   this$static.lastCR = true;
 18525   $flushChars(this$static, buf, pos);
 18526   $characters(this$static.tokenHandler, LF, 0, 1);
 18527   this$static.cstart = 2147483647;
 18528 }
 18529 
 18530 function $emitComment(this$static, provisionalHyphens, pos){
 18531   if (this$static.wantsComments) {
 18532     $comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - provisionalHyphens);
 18533   }
 18534   this$static.cstart = pos + 1;
 18535 }
 18536 
 18537 function $emitCurrentTagToken(this$static, selfClosing, pos){
 18538   var attrs;
 18539   this$static.cstart = pos + 1;
 18540   this$static.stateSave = 0;
 18541   attrs = !this$static.attributes?($clinit_91() , EMPTY_ATTRIBUTES):this$static.attributes;
 18542   if (this$static.endTag) {
 18543     $endTag(this$static.tokenHandler, this$static.tagName);
 18544   }
 18545    else {
 18546     $startTag(this$static.tokenHandler, this$static.tagName, attrs, selfClosing);
 18547   }
 18548   $resetAttributes(this$static);
 18549   return this$static.stateSave;
 18550 }
 18551 
 18552 function $emitOrAppend(this$static, val, returnState){
 18553   if ((returnState & -2) != 0) {
 18554     $appendLongStrBuf_0(this$static, val, 0, val.length);
 18555   }
 18556    else {
 18557     $characters(this$static.tokenHandler, val, 0, val.length);
 18558   }
 18559 }
 18560 
 18561 function $emitOrAppendOne(this$static, val, returnState){
 18562   if ((returnState & -2) != 0) {
 18563     $appendLongStrBuf(this$static, val[0]);
 18564   }
 18565    else {
 18566     $characters(this$static.tokenHandler, val, 0, 1);
 18567   }
 18568 }
 18569 
 18570 function $emitOrAppendStrBuf(this$static, returnState){
 18571   if ((returnState & -2) != 0) {
 18572     $appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
 18573   }
 18574    else {
 18575     $emitStrBuf(this$static);
 18576   }
 18577 }
 18578 
 18579 function $emitReplacementCharacter(this$static, buf, pos){
 18580   this$static.nextCharOnNewLine = true;
 18581   this$static.lastCR = true;
 18582   $flushChars(this$static, buf, pos);
 18583   $characters(this$static.tokenHandler, REPLACEMENT_CHARACTER, 0, 1);
 18584   this$static.cstart = 2147483647;
 18585 }
 18586 
 18587 function $emitStrBuf(this$static){
 18588   if (this$static.strBufLen > 0) {
 18589     $characters(this$static.tokenHandler, this$static.strBuf, 0, this$static.strBufLen);
 18590   }
 18591 }
 18592 
 18593 function $emptyAttributes(this$static){
 18594   if (this$static.newAttributesEachTime) {
 18595     return $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
 18596   }
 18597    else {
 18598     return $clinit_91() , EMPTY_ATTRIBUTES;
 18599   }
 18600 }
 18601 
 18602 function $end(this$static){
 18603   this$static.strBuf = null;
 18604   this$static.longStrBuf = null;
 18605   this$static.systemIdentifier = null;
 18606   this$static.publicIdentifier = null;
 18607   this$static.doctypeName = null;
 18608   this$static.tagName = null;
 18609   this$static.attributeName = null;
 18610   $endTokenization(this$static.tokenHandler);
 18611   if (this$static.attributes) {
 18612     $clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
 18613     this$static.attributes = null;
 18614   }
 18615 }
 18616 
 18617 function $eof(this$static){
 18618   var candidateArr, ch, i, returnState, state, val;
 18619   state = this$static.stateSave;
 18620   returnState = this$static.returnStateSave;
 18621   eofloop: for (;;) {
 18622     switch (state) {
 18623       case 53:
 18624         $characters(this$static.tokenHandler, LT_GT, 0, 1);
 18625         break eofloop;
 18626       case 4:
 18627         $characters(this$static.tokenHandler, LT_GT, 0, 1);
 18628         break eofloop;
 18629       case 37:
 18630         if (this$static.index < this$static.contentModelElementNameAsArray.length) {
 18631           break eofloop;
 18632         }
 18633          else {
 18634           break eofloop;
 18635         }
 18636 
 18637       case 5:
 18638         $characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
 18639         break eofloop;
 18640       case 6:
 18641         break eofloop;
 18642       case 7:
 18643       case 14:
 18644       case 48:
 18645         break eofloop;
 18646       case 8:
 18647         break eofloop;
 18648       case 9:
 18649       case 10:
 18650         break eofloop;
 18651       case 11:
 18652       case 12:
 18653       case 13:
 18654         break eofloop;
 18655       case 15:
 18656         $emitComment(this$static, 0, 0);
 18657         break eofloop;
 18658       case 59:
 18659         $maybeAppendSpaceToBogusComment(this$static);
 18660         $emitComment(this$static, 0, 0);
 18661         break eofloop;
 18662       case 16:
 18663         this$static.longStrBufLen = 0;
 18664         $emitComment(this$static, 0, 0);
 18665         break eofloop;
 18666       case 38:
 18667         $emitComment(this$static, 0, 0);
 18668         break eofloop;
 18669       case 39:
 18670         if (this$static.index < 6) {
 18671           $emitComment(this$static, 0, 0);
 18672         }
 18673          else {
 18674           this$static.doctypeName = '';
 18675           this$static.publicIdentifier = null;
 18676           this$static.systemIdentifier = null;
 18677           this$static.forceQuirks = true;
 18678           this$static.cstart = 1;
 18679           $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18680           break eofloop;
 18681         }
 18682 
 18683         break eofloop;
 18684       case 30:
 18685       case 32:
 18686       case 35:
 18687         $emitComment(this$static, 0, 0);
 18688         break eofloop;
 18689       case 34:
 18690         $emitComment(this$static, 2, 0);
 18691         break eofloop;
 18692       case 33:
 18693       case 31:
 18694         $emitComment(this$static, 1, 0);
 18695         break eofloop;
 18696       case 36:
 18697         $emitComment(this$static, 3, 0);
 18698         break eofloop;
 18699       case 17:
 18700       case 18:
 18701         this$static.forceQuirks = true;
 18702         this$static.cstart = 1;
 18703         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18704         break eofloop;
 18705       case 19:
 18706         this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
 18707         this$static.forceQuirks = true;
 18708         this$static.cstart = 1;
 18709         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18710         break eofloop;
 18711       case 40:
 18712       case 41:
 18713       case 20:
 18714       case 21:
 18715         this$static.forceQuirks = true;
 18716         this$static.cstart = 1;
 18717         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18718         break eofloop;
 18719       case 22:
 18720       case 23:
 18721         this$static.forceQuirks = true;
 18722         this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 18723         this$static.cstart = 1;
 18724         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18725         break eofloop;
 18726       case 24:
 18727       case 25:
 18728         this$static.forceQuirks = true;
 18729         this$static.cstart = 1;
 18730         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18731         break eofloop;
 18732       case 26:
 18733       case 27:
 18734         this$static.forceQuirks = true;
 18735         this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 18736         this$static.cstart = 1;
 18737         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18738         break eofloop;
 18739       case 28:
 18740         this$static.forceQuirks = true;
 18741         this$static.cstart = 1;
 18742         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18743         break eofloop;
 18744       case 29:
 18745         this$static.cstart = 1;
 18746         $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 18747         break eofloop;
 18748       case 42:
 18749         $emitOrAppendStrBuf(this$static, returnState);
 18750         state = returnState;
 18751         continue;
 18752       case 44:
 18753         outer: for (;;) {
 18754           ++this$static.entCol;
 18755           hiloop: for (;;) {
 18756             if (this$static.hi == -1) {
 18757               break hiloop;
 18758             }
 18759             if (this$static.entCol == ($clinit_94() , NAMES)[this$static.hi].length) {
 18760               break hiloop;
 18761             }
 18762             if (this$static.entCol > NAMES[this$static.hi].length) {
 18763               break outer;
 18764             }
 18765              else if (0 < NAMES[this$static.hi][this$static.entCol]) {
 18766               --this$static.hi;
 18767             }
 18768              else {
 18769               break hiloop;
 18770             }
 18771           }
 18772           loloop: for (;;) {
 18773             if (this$static.hi < this$static.lo) {
 18774               break outer;
 18775             }
 18776             if (this$static.entCol == ($clinit_94() , NAMES)[this$static.lo].length) {
 18777               this$static.candidate = this$static.lo;
 18778               this$static.strBufMark = this$static.strBufLen;
 18779               ++this$static.lo;
 18780             }
 18781              else if (this$static.entCol > NAMES[this$static.lo].length) {
 18782               break outer;
 18783             }
 18784              else if (0 > NAMES[this$static.lo][this$static.entCol]) {
 18785               ++this$static.lo;
 18786             }
 18787              else {
 18788               break loloop;
 18789             }
 18790           }
 18791           if (this$static.hi < this$static.lo) {
 18792             break outer;
 18793           }
 18794           continue;
 18795         }
 18796 
 18797         if (this$static.candidate == -1) {
 18798           $emitOrAppendStrBuf(this$static, returnState);
 18799           state = returnState;
 18800           continue eofloop;
 18801         }
 18802          else {
 18803           candidateArr = ($clinit_94() , NAMES)[this$static.candidate];
 18804           if (candidateArr[candidateArr.length - 1] != 59) {
 18805             if ((returnState & -2) != 0) {
 18806               if (this$static.strBufMark == this$static.strBufLen) {
 18807                 ch = 0;
 18808               }
 18809                else {
 18810                 ch = this$static.strBuf[this$static.strBufMark];
 18811               }
 18812               if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
 18813                 $appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
 18814                 state = returnState;
 18815                 continue eofloop;
 18816               }
 18817             }
 18818           }
 18819           val = VALUES_0[this$static.candidate];
 18820           $emitOrAppend(this$static, val, returnState);
 18821           if (this$static.strBufMark < this$static.strBufLen) {
 18822             if ((returnState & -2) != 0) {
 18823               for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
 18824                 $appendLongStrBuf(this$static, this$static.strBuf[i]);
 18825               }
 18826             }
 18827              else {
 18828               $characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
 18829             }
 18830           }
 18831           state = returnState;
 18832           continue eofloop;
 18833         }
 18834 
 18835       case 43:
 18836       case 46:
 18837       case 45:
 18838         if (this$static.seenDigits) {
 18839         }
 18840          else {
 18841           'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
 18842           $emitOrAppendStrBuf(this$static, returnState);
 18843           state = returnState;
 18844           continue;
 18845         }
 18846 
 18847         $handleNcrValue(this$static, returnState);
 18848         state = returnState;
 18849         continue;
 18850       case 0:
 18851       default:break eofloop;
 18852     }
 18853   }
 18854   $eof_0(this$static.tokenHandler);
 18855   return;
 18856 }
 18857 
 18858 function $fatal(this$static, message){
 18859   var spe;
 18860   spe = $SAXParseException(new SAXParseException(), message, this$static);
 18861   throw spe;
 18862 }
 18863 
 18864 function $handleNcrValue(this$static, returnState){
 18865   var ch, val;
 18866   if (this$static.value >= 128 && this$static.value <= 159) {
 18867     val = ($clinit_94() , WINDOWS_1252)[this$static.value - 128];
 18868     $emitOrAppendOne(this$static, val, returnState);
 18869   }
 18870    else if (this$static.value == 13) {
 18871     $emitOrAppendOne(this$static, LF, returnState);
 18872   }
 18873    else if (this$static.value == 12 && this$static.contentSpacePolicy != ($clinit_80() , ALLOW)) {
 18874     if (this$static.contentSpacePolicy == ($clinit_80() , ALTER_INFOSET)) {
 18875       $emitOrAppendOne(this$static, SPACE, returnState);
 18876     }
 18877      else if (this$static.contentSpacePolicy == FATAL) {
 18878       $fatal(this$static, 'A character reference expanded to a form feed which is not legal XML 1.0 white space.');
 18879     }
 18880   }
 18881    else if (this$static.value >= 0 && this$static.value <= 8 || this$static.value == 11 || this$static.value >= 14 && this$static.value <= 31 || this$static.value == 127) {
 18882     'Character reference expands to a control character (' + $toUPlusString(this$static.value & 65535) + ').';
 18883     $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
 18884   }
 18885    else if ((this$static.value & 63488) == 55296) {
 18886     $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
 18887   }
 18888    else if ((this$static.value & 65534) == 65534) {
 18889     $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
 18890   }
 18891    else if (this$static.value >= 64976 && this$static.value <= 65007) {
 18892     $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
 18893   }
 18894    else if (this$static.value <= 65535) {
 18895     ch = this$static.value & 65535;
 18896     this$static.bmpChar[0] = ch;
 18897     $emitOrAppendOne(this$static, this$static.bmpChar, returnState);
 18898   }
 18899    else if (this$static.value <= 1114111) {
 18900     this$static.astralChar[0] = 55232 + (this$static.value >> 10) & 65535;
 18901     this$static.astralChar[1] = 56320 + (this$static.value & 1023) & 65535;
 18902     $emitOrAppend(this$static, this$static.astralChar, returnState);
 18903   }
 18904    else {
 18905     $emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
 18906   }
 18907 }
 18908 
 18909 function $maybeAppendSpaceToBogusComment(this$static){
 18910   switch (this$static.commentPolicy.ordinal) {
 18911     case 2:
 18912       $appendLongStrBuf(this$static, 32);
 18913       break;
 18914     case 1:
 18915       $fatal(this$static, 'The document is not mappable to XML 1.0 due to a trailing hyphen in a comment.');
 18916   }
 18917 }
 18918 
 18919 function $resetAttributes(this$static){
 18920   if (this$static.newAttributesEachTime) {
 18921     this$static.attributes = null;
 18922   }
 18923    else {
 18924     $clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
 18925   }
 18926 }
 18927 
 18928 function $setContentModelFlag(this$static, contentModelFlag){
 18929   var asArray;
 18930   this$static.stateSave = contentModelFlag;
 18931   if (contentModelFlag == 0) {
 18932     return;
 18933   }
 18934   asArray = null.nullMethod();
 18935   this$static.contentModelElement = elementNameByBuffer(asArray, 0, null.nullField);
 18936   $contentModelElementToArray(this$static);
 18937 }
 18938 
 18939 function $setContentModelFlag_0(this$static, contentModelFlag, contentModelElement){
 18940   this$static.stateSave = contentModelFlag;
 18941   this$static.contentModelElement = contentModelElement;
 18942   $contentModelElementToArray(this$static);
 18943 }
 18944 
 18945 function $setXmlnsPolicy(this$static, xmlnsPolicy){
 18946   if (xmlnsPolicy == ($clinit_80() , FATAL)) {
 18947     throw $IllegalArgumentException(new IllegalArgumentException(), "Can't use FATAL here.");
 18948   }
 18949   this$static.xmlnsPolicy = xmlnsPolicy;
 18950 }
 18951 
 18952 function $start_0(this$static){
 18953   this$static.confident = false;
 18954   this$static.strBuf = initDim(_3C_classLit, 42, -1, 64, 1);
 18955   this$static.strBufLen = 0;
 18956   this$static.longStrBuf = initDim(_3C_classLit, 42, -1, 1024, 1);
 18957   this$static.longStrBufLen = 0;
 18958   this$static.stateSave = 0;
 18959   this$static.lastCR = false;
 18960   this$static.html4 = false;
 18961   this$static.metaBoundaryPassed = false;
 18962   $startTokenization(this$static.tokenHandler, this$static);
 18963   this$static.wantsComments = this$static.tokenHandler.wantingComments;
 18964   this$static.index = 0;
 18965   this$static.forceQuirks = false;
 18966   this$static.additional = 0;
 18967   this$static.entCol = -1;
 18968   this$static.lo = 0;
 18969   this$static.hi = ($clinit_94() , NAMES).length - 1;
 18970   this$static.candidate = -1;
 18971   this$static.strBufMark = 0;
 18972   this$static.prevValue = -1;
 18973   this$static.value = 0;
 18974   this$static.seenDigits = false;
 18975   this$static.shouldSuspend = false;
 18976   if (this$static.newAttributesEachTime) {
 18977     this$static.attributes = null;
 18978   }
 18979    else {
 18980     this$static.attributes = $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
 18981   }
 18982   this$static.alreadyComplainedAboutNonAscii = false;
 18983   this$static.line = this$static.linePrev = 0;
 18984   this$static.col = this$static.colPrev = 1;
 18985   this$static.nextCharOnNewLine = true;
 18986   this$static.prev = 0;
 18987   this$static.alreadyWarnedAboutPrivateUseCharacters = false;
 18988 }
 18989 
 18990 function $stateLoop(this$static, state, c, pos, buf, reconsume, returnState, endPos){
 18991   var candidateArr, ch, e, folded, i, val;
 18992   stateloop: for (;;) {
 18993     switch (state) {
 18994       case 0:
 18995         dataloop: for (;;) {
 18996           if (reconsume) {
 18997             reconsume = false;
 18998           }
 18999            else {
 19000             if (++pos == endPos) {
 19001               break stateloop;
 19002             }
 19003             c = $checkChar(this$static, buf, pos);
 19004           }
 19005           switch (c) {
 19006             case 38:
 19007               $flushChars(this$static, buf, pos);
 19008               this$static.strBuf[0] = c;
 19009               this$static.strBufLen = 1;
 19010               this$static.additional = 0;
 19011               $LocatorImpl(new LocatorImpl(), this$static);
 19012               returnState = state;
 19013               state = 42;
 19014               continue stateloop;
 19015             case 60:
 19016               $flushChars(this$static, buf, pos);
 19017               state = 4;
 19018               break dataloop;
 19019             case 0:
 19020               $emitReplacementCharacter(this$static, buf, pos);
 19021               continue;
 19022             case 13:
 19023               $emitCarriageReturn(this$static, buf, pos);
 19024               break stateloop;
 19025             case 10:
 19026               this$static.nextCharOnNewLine = true;
 19027             default:continue;
 19028           }
 19029         }
 19030 
 19031       case 4:
 19032         tagopenloop: for (;;) {
 19033           if (++pos == endPos) {
 19034             break stateloop;
 19035           }
 19036           c = $checkChar(this$static, buf, pos);
 19037           if (c >= 65 && c <= 90) {
 19038             this$static.endTag = false;
 19039             this$static.strBuf[0] = c + 32 & 65535;
 19040             this$static.strBufLen = 1;
 19041             state = 6;
 19042             break tagopenloop;
 19043           }
 19044            else if (c >= 97 && c <= 122) {
 19045             this$static.endTag = false;
 19046             this$static.strBuf[0] = c;
 19047             this$static.strBufLen = 1;
 19048             state = 6;
 19049             break tagopenloop;
 19050           }
 19051           switch (c) {
 19052             case 33:
 19053               state = 16;
 19054               continue stateloop;
 19055             case 47:
 19056               state = 5;
 19057               continue stateloop;
 19058             case 63:
 19059               this$static.longStrBuf[0] = c;
 19060               this$static.longStrBufLen = 1;
 19061               state = 15;
 19062               continue stateloop;
 19063             case 62:
 19064               $characters(this$static.tokenHandler, LT_GT, 0, 2);
 19065               this$static.cstart = pos + 1;
 19066               state = 0;
 19067               continue stateloop;
 19068             default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
 19069               this$static.cstart = pos;
 19070               state = 0;
 19071               reconsume = true;
 19072               continue stateloop;
 19073           }
 19074         }
 19075 
 19076       case 6:
 19077         tagnameloop: for (;;) {
 19078           if (++pos == endPos) {
 19079             break stateloop;
 19080           }
 19081           c = $checkChar(this$static, buf, pos);
 19082           switch (c) {
 19083             case 13:
 19084               this$static.nextCharOnNewLine = true;
 19085               this$static.lastCR = true;
 19086               this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
 19087               state = 7;
 19088               break stateloop;
 19089             case 10:
 19090               this$static.nextCharOnNewLine = true;
 19091             case 32:
 19092             case 9:
 19093             case 12:
 19094               this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
 19095               state = 7;
 19096               break tagnameloop;
 19097             case 47:
 19098               this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
 19099               state = 48;
 19100               continue stateloop;
 19101             case 62:
 19102               this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
 19103               state = $emitCurrentTagToken(this$static, false, pos);
 19104               if (this$static.shouldSuspend) {
 19105                 break stateloop;
 19106               }
 19107 
 19108               continue stateloop;
 19109             case 0:
 19110               c = 65533;
 19111             default:if (c >= 65 && c <= 90) {
 19112                 c += 32;
 19113               }
 19114 
 19115               $appendStrBuf(this$static, c);
 19116               continue;
 19117           }
 19118         }
 19119 
 19120       case 7:
 19121         beforeattributenameloop: for (;;) {
 19122           if (reconsume) {
 19123             reconsume = false;
 19124           }
 19125            else {
 19126             if (++pos == endPos) {
 19127               break stateloop;
 19128             }
 19129             c = $checkChar(this$static, buf, pos);
 19130           }
 19131           switch (c) {
 19132             case 13:
 19133               this$static.nextCharOnNewLine = true;
 19134               this$static.lastCR = true;
 19135               break stateloop;
 19136             case 10:
 19137               this$static.nextCharOnNewLine = true;
 19138             case 32:
 19139             case 9:
 19140             case 12:
 19141               continue;
 19142             case 47:
 19143               state = 48;
 19144               continue stateloop;
 19145             case 62:
 19146               state = $emitCurrentTagToken(this$static, false, pos);
 19147               if (this$static.shouldSuspend) {
 19148                 break stateloop;
 19149               }
 19150 
 19151               continue stateloop;
 19152             case 0:
 19153               c = 65533;
 19154             case 34:
 19155             case 39:
 19156             case 60:
 19157             case 61:
 19158             default:if (c >= 65 && c <= 90) {
 19159                 c += 32;
 19160               }
 19161 
 19162               this$static.strBuf[0] = c;
 19163               this$static.strBufLen = 1;
 19164               state = 8;
 19165               break beforeattributenameloop;
 19166           }
 19167         }
 19168 
 19169       case 8:
 19170         attributenameloop: for (;;) {
 19171           if (++pos == endPos) {
 19172             break stateloop;
 19173           }
 19174           c = $checkChar(this$static, buf, pos);
 19175           switch (c) {
 19176             case 13:
 19177               this$static.nextCharOnNewLine = true;
 19178               this$static.lastCR = true;
 19179               $attributeNameComplete(this$static);
 19180               state = 9;
 19181               break stateloop;
 19182             case 10:
 19183               this$static.nextCharOnNewLine = true;
 19184             case 32:
 19185             case 9:
 19186             case 12:
 19187               $attributeNameComplete(this$static);
 19188               state = 9;
 19189               continue stateloop;
 19190             case 47:
 19191               $attributeNameComplete(this$static);
 19192               $addAttributeWithoutValue(this$static);
 19193               state = 48;
 19194               continue stateloop;
 19195             case 61:
 19196               $attributeNameComplete(this$static);
 19197               state = 10;
 19198               break attributenameloop;
 19199             case 62:
 19200               $attributeNameComplete(this$static);
 19201               $addAttributeWithoutValue(this$static);
 19202               state = $emitCurrentTagToken(this$static, false, pos);
 19203               if (this$static.shouldSuspend) {
 19204                 break stateloop;
 19205               }
 19206 
 19207               continue stateloop;
 19208             case 0:
 19209               c = 65533;
 19210             case 34:
 19211             case 39:
 19212             case 60:
 19213             default:if (c >= 65 && c <= 90) {
 19214                 c += 32;
 19215               }
 19216 
 19217               $appendStrBuf(this$static, c);
 19218               continue;
 19219           }
 19220         }
 19221 
 19222       case 10:
 19223         beforeattributevalueloop: for (;;) {
 19224           if (++pos == endPos) {
 19225             break stateloop;
 19226           }
 19227           c = $checkChar(this$static, buf, pos);
 19228           switch (c) {
 19229             case 13:
 19230               this$static.nextCharOnNewLine = true;
 19231               this$static.lastCR = true;
 19232               break stateloop;
 19233             case 10:
 19234               this$static.nextCharOnNewLine = true;
 19235             case 32:
 19236             case 9:
 19237             case 12:
 19238               continue;
 19239             case 34:
 19240               this$static.longStrBufLen = 0;
 19241               state = 11;
 19242               break beforeattributevalueloop;
 19243             case 38:
 19244               this$static.longStrBufLen = 0;
 19245               state = 13;
 19246               reconsume = true;
 19247               continue stateloop;
 19248             case 39:
 19249               this$static.longStrBufLen = 0;
 19250               state = 12;
 19251               continue stateloop;
 19252             case 62:
 19253               $addAttributeWithoutValue(this$static);
 19254               state = $emitCurrentTagToken(this$static, false, pos);
 19255               if (this$static.shouldSuspend) {
 19256                 break stateloop;
 19257               }
 19258 
 19259               continue stateloop;
 19260             case 0:
 19261               c = 65533;
 19262             case 60:
 19263             case 61:
 19264               $errLtOrEqualsInUnquotedAttributeOrNull(c);
 19265             default:this$static.longStrBuf[0] = c;
 19266               this$static.longStrBufLen = 1;
 19267               state = 13;
 19268               continue stateloop;
 19269           }
 19270         }
 19271 
 19272       case 11:
 19273         attributevaluedoublequotedloop: for (;;) {
 19274           if (reconsume) {
 19275             reconsume = false;
 19276           }
 19277            else {
 19278             if (++pos == endPos) {
 19279               break stateloop;
 19280             }
 19281             c = $checkChar(this$static, buf, pos);
 19282           }
 19283           switch (c) {
 19284             case 34:
 19285               $addAttributeWithValue(this$static);
 19286               state = 14;
 19287               break attributevaluedoublequotedloop;
 19288             case 38:
 19289               this$static.strBuf[0] = c;
 19290               this$static.strBufLen = 1;
 19291               this$static.additional = 34;
 19292               $LocatorImpl(new LocatorImpl(), this$static);
 19293               returnState = state;
 19294               state = 42;
 19295               continue stateloop;
 19296             case 13:
 19297               this$static.nextCharOnNewLine = true;
 19298               this$static.lastCR = true;
 19299               $appendLongStrBuf(this$static, 10);
 19300               break stateloop;
 19301             case 10:
 19302               this$static.nextCharOnNewLine = true;
 19303               $appendLongStrBuf(this$static, 10);
 19304               continue;
 19305             case 0:
 19306               c = 65533;
 19307             default:$appendLongStrBuf(this$static, c);
 19308               continue;
 19309           }
 19310         }
 19311 
 19312       case 14:
 19313         afterattributevaluequotedloop: for (;;) {
 19314           if (++pos == endPos) {
 19315             break stateloop;
 19316           }
 19317           c = $checkChar(this$static, buf, pos);
 19318           switch (c) {
 19319             case 13:
 19320               this$static.nextCharOnNewLine = true;
 19321               this$static.lastCR = true;
 19322               state = 7;
 19323               break stateloop;
 19324             case 10:
 19325               this$static.nextCharOnNewLine = true;
 19326             case 32:
 19327             case 9:
 19328             case 12:
 19329               state = 7;
 19330               continue stateloop;
 19331             case 47:
 19332               state = 48;
 19333               break afterattributevaluequotedloop;
 19334             case 62:
 19335               state = $emitCurrentTagToken(this$static, false, pos);
 19336               if (this$static.shouldSuspend) {
 19337                 break stateloop;
 19338               }
 19339 
 19340               continue stateloop;
 19341             default:state = 7;
 19342               reconsume = true;
 19343               continue stateloop;
 19344           }
 19345         }
 19346 
 19347       case 48:
 19348         if (++pos == endPos) {
 19349           break stateloop;
 19350         }
 19351 
 19352         c = $checkChar(this$static, buf, pos);
 19353         switch (c) {
 19354           case 62:
 19355             state = $emitCurrentTagToken(this$static, true, pos);
 19356             if (this$static.shouldSuspend) {
 19357               break stateloop;
 19358             }
 19359 
 19360             continue stateloop;
 19361           default:state = 7;
 19362             reconsume = true;
 19363             continue stateloop;
 19364         }
 19365 
 19366       case 13:
 19367         for (;;) {
 19368           if (reconsume) {
 19369             reconsume = false;
 19370           }
 19371            else {
 19372             if (++pos == endPos) {
 19373               break stateloop;
 19374             }
 19375             c = $checkChar(this$static, buf, pos);
 19376           }
 19377           switch (c) {
 19378             case 13:
 19379               this$static.nextCharOnNewLine = true;
 19380               this$static.lastCR = true;
 19381               $addAttributeWithValue(this$static);
 19382               state = 7;
 19383               break stateloop;
 19384             case 10:
 19385               this$static.nextCharOnNewLine = true;
 19386             case 32:
 19387             case 9:
 19388             case 12:
 19389               $addAttributeWithValue(this$static);
 19390               state = 7;
 19391               continue stateloop;
 19392             case 38:
 19393               this$static.strBuf[0] = c;
 19394               this$static.strBufLen = 1;
 19395               this$static.additional = 62;
 19396               $LocatorImpl(new LocatorImpl(), this$static);
 19397               returnState = state;
 19398               state = 42;
 19399               continue stateloop;
 19400             case 62:
 19401               $addAttributeWithValue(this$static);
 19402               state = $emitCurrentTagToken(this$static, false, pos);
 19403               if (this$static.shouldSuspend) {
 19404                 break stateloop;
 19405               }
 19406 
 19407               continue stateloop;
 19408             case 0:
 19409               c = 65533;
 19410             case 60:
 19411             case 34:
 19412             case 39:
 19413             case 61:
 19414             default:$appendLongStrBuf(this$static, c);
 19415               continue;
 19416           }
 19417         }
 19418 
 19419       case 9:
 19420         for (;;) {
 19421           if (++pos == endPos) {
 19422             break stateloop;
 19423           }
 19424           c = $checkChar(this$static, buf, pos);
 19425           switch (c) {
 19426             case 13:
 19427               this$static.nextCharOnNewLine = true;
 19428               this$static.lastCR = true;
 19429               break stateloop;
 19430             case 10:
 19431               this$static.nextCharOnNewLine = true;
 19432             case 32:
 19433             case 9:
 19434             case 12:
 19435               continue;
 19436             case 47:
 19437               $addAttributeWithoutValue(this$static);
 19438               state = 48;
 19439               continue stateloop;
 19440             case 61:
 19441               state = 10;
 19442               continue stateloop;
 19443             case 62:
 19444               $addAttributeWithoutValue(this$static);
 19445               state = $emitCurrentTagToken(this$static, false, pos);
 19446               if (this$static.shouldSuspend) {
 19447                 break stateloop;
 19448               }
 19449 
 19450               continue stateloop;
 19451             case 0:
 19452               c = 65533;
 19453             case 34:
 19454             case 39:
 19455             case 60:
 19456             default:$addAttributeWithoutValue(this$static);
 19457               if (c >= 65 && c <= 90) {
 19458                 c += 32;
 19459               }
 19460 
 19461               this$static.strBuf[0] = c;
 19462               this$static.strBufLen = 1;
 19463               state = 8;
 19464               continue stateloop;
 19465           }
 19466         }
 19467 
 19468       case 15:
 19469         boguscommentloop: for (;;) {
 19470           if (reconsume) {
 19471             reconsume = false;
 19472           }
 19473            else {
 19474             if (++pos == endPos) {
 19475               break stateloop;
 19476             }
 19477             c = $checkChar(this$static, buf, pos);
 19478           }
 19479           switch (c) {
 19480             case 62:
 19481               $emitComment(this$static, 0, pos);
 19482               state = 0;
 19483               continue stateloop;
 19484             case 45:
 19485               $appendLongStrBuf(this$static, c);
 19486               state = 59;
 19487               break boguscommentloop;
 19488             case 13:
 19489               this$static.nextCharOnNewLine = true;
 19490               this$static.lastCR = true;
 19491               $appendLongStrBuf(this$static, 10);
 19492               break stateloop;
 19493             case 10:
 19494               this$static.nextCharOnNewLine = true;
 19495               $appendLongStrBuf(this$static, 10);
 19496               continue;
 19497             case 0:
 19498               c = 65533;
 19499             default:$appendLongStrBuf(this$static, c);
 19500               continue;
 19501           }
 19502         }
 19503 
 19504       case 59:
 19505         boguscommenthyphenloop: for (;;) {
 19506           if (++pos == endPos) {
 19507             break stateloop;
 19508           }
 19509           c = $checkChar(this$static, buf, pos);
 19510           switch (c) {
 19511             case 62:
 19512               $maybeAppendSpaceToBogusComment(this$static);
 19513               $emitComment(this$static, 0, pos);
 19514               state = 0;
 19515               continue stateloop;
 19516             case 45:
 19517               $appendSecondHyphenToBogusComment(this$static);
 19518               continue boguscommenthyphenloop;
 19519             case 13:
 19520               this$static.nextCharOnNewLine = true;
 19521               this$static.lastCR = true;
 19522               $appendLongStrBuf(this$static, 10);
 19523               state = 15;
 19524               break stateloop;
 19525             case 10:
 19526               this$static.nextCharOnNewLine = true;
 19527               $appendLongStrBuf(this$static, 10);
 19528               state = 15;
 19529               continue stateloop;
 19530             case 0:
 19531               c = 65533;
 19532             default:$appendLongStrBuf(this$static, c);
 19533               state = 15;
 19534               continue stateloop;
 19535           }
 19536         }
 19537 
 19538       case 16:
 19539         markupdeclarationopenloop: for (;;) {
 19540           if (++pos == endPos) {
 19541             break stateloop;
 19542           }
 19543           c = $checkChar(this$static, buf, pos);
 19544           switch (c) {
 19545             case 45:
 19546               this$static.longStrBuf[0] = c;
 19547               this$static.longStrBufLen = 1;
 19548               state = 38;
 19549               break markupdeclarationopenloop;
 19550             case 100:
 19551             case 68:
 19552               this$static.longStrBuf[0] = c;
 19553               this$static.longStrBufLen = 1;
 19554               this$static.index = 0;
 19555               state = 39;
 19556               continue stateloop;
 19557             case 91:
 19558               if (this$static.tokenHandler.foreignFlag == 0) {
 19559                 this$static.longStrBuf[0] = c;
 19560                 this$static.longStrBufLen = 1;
 19561                 this$static.index = 0;
 19562                 state = 49;
 19563                 continue stateloop;
 19564               }
 19565                else {
 19566               }
 19567 
 19568             default:this$static.longStrBufLen = 0;
 19569               state = 15;
 19570               reconsume = true;
 19571               continue stateloop;
 19572           }
 19573         }
 19574 
 19575       case 38:
 19576         markupdeclarationhyphenloop: for (;;) {
 19577           if (++pos == endPos) {
 19578             break stateloop;
 19579           }
 19580           c = $checkChar(this$static, buf, pos);
 19581           switch (c) {
 19582             case 0:
 19583               break stateloop;
 19584             case 45:
 19585               this$static.longStrBufLen = 0;
 19586               state = 30;
 19587               break markupdeclarationhyphenloop;
 19588             default:state = 15;
 19589               reconsume = true;
 19590               continue stateloop;
 19591           }
 19592         }
 19593 
 19594       case 30:
 19595         commentstartloop: for (;;) {
 19596           if (++pos == endPos) {
 19597             break stateloop;
 19598           }
 19599           c = $checkChar(this$static, buf, pos);
 19600           switch (c) {
 19601             case 45:
 19602               $appendLongStrBuf(this$static, c);
 19603               state = 31;
 19604               continue stateloop;
 19605             case 62:
 19606               $emitComment(this$static, 0, pos);
 19607               state = 0;
 19608               continue stateloop;
 19609             case 13:
 19610               this$static.nextCharOnNewLine = true;
 19611               this$static.lastCR = true;
 19612               $appendLongStrBuf(this$static, 10);
 19613               state = 32;
 19614               break stateloop;
 19615             case 10:
 19616               this$static.nextCharOnNewLine = true;
 19617               $appendLongStrBuf(this$static, 10);
 19618               state = 32;
 19619               break commentstartloop;
 19620             case 0:
 19621               c = 65533;
 19622             default:$appendLongStrBuf(this$static, c);
 19623               state = 32;
 19624               break commentstartloop;
 19625           }
 19626         }
 19627 
 19628       case 32:
 19629         commentloop: for (;;) {
 19630           if (++pos == endPos) {
 19631             break stateloop;
 19632           }
 19633           c = $checkChar(this$static, buf, pos);
 19634           switch (c) {
 19635             case 45:
 19636               $appendLongStrBuf(this$static, c);
 19637               state = 33;
 19638               break commentloop;
 19639             case 13:
 19640               this$static.nextCharOnNewLine = true;
 19641               this$static.lastCR = true;
 19642               $appendLongStrBuf(this$static, 10);
 19643               break stateloop;
 19644             case 10:
 19645               this$static.nextCharOnNewLine = true;
 19646               $appendLongStrBuf(this$static, 10);
 19647               continue;
 19648             case 0:
 19649               c = 65533;
 19650             default:$appendLongStrBuf(this$static, c);
 19651               continue;
 19652           }
 19653         }
 19654 
 19655       case 33:
 19656         commentenddashloop: for (;;) {
 19657           if (++pos == endPos) {
 19658             break stateloop;
 19659           }
 19660           c = $checkChar(this$static, buf, pos);
 19661           switch (c) {
 19662             case 45:
 19663               $appendLongStrBuf(this$static, c);
 19664               state = 34;
 19665               break commentenddashloop;
 19666             case 13:
 19667               this$static.nextCharOnNewLine = true;
 19668               this$static.lastCR = true;
 19669               $appendLongStrBuf(this$static, 10);
 19670               state = 32;
 19671               break stateloop;
 19672             case 10:
 19673               this$static.nextCharOnNewLine = true;
 19674               $appendLongStrBuf(this$static, 10);
 19675               state = 32;
 19676               continue stateloop;
 19677             case 0:
 19678               c = 65533;
 19679             default:$appendLongStrBuf(this$static, c);
 19680               state = 32;
 19681               continue stateloop;
 19682           }
 19683         }
 19684 
 19685       case 34:
 19686         commentendloop: for (;;) {
 19687           if (++pos == endPos) {
 19688             break stateloop;
 19689           }
 19690           c = $checkChar(this$static, buf, pos);
 19691           switch (c) {
 19692             case 62:
 19693               $emitComment(this$static, 2, pos);
 19694               state = 0;
 19695               continue stateloop;
 19696             case 45:
 19697               $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
 19698               continue;
 19699             case 32:
 19700             case 9:
 19701             case 12:
 19702               $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
 19703               state = 35;
 19704               break commentendloop;
 19705             case 13:
 19706               this$static.nextCharOnNewLine = true;
 19707               this$static.lastCR = true;
 19708               $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
 19709               state = 35;
 19710               break stateloop;
 19711             case 10:
 19712               this$static.nextCharOnNewLine = true;
 19713               $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
 19714               state = 35;
 19715               break commentendloop;
 19716             case 33:
 19717               $appendLongStrBuf(this$static, c);
 19718               state = 36;
 19719               continue stateloop;
 19720             case 0:
 19721               c = 65533;
 19722             default:$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
 19723               state = 32;
 19724               continue stateloop;
 19725           }
 19726         }
 19727 
 19728       case 35:
 19729         for (;;) {
 19730           if (++pos == endPos) {
 19731             break stateloop;
 19732           }
 19733           c = $checkChar(this$static, buf, pos);
 19734           switch (c) {
 19735             case 62:
 19736               $emitComment(this$static, 0, pos);
 19737               state = 0;
 19738               continue stateloop;
 19739             case 45:
 19740               $appendLongStrBuf(this$static, c);
 19741               state = 33;
 19742               continue stateloop;
 19743             case 32:
 19744             case 9:
 19745             case 12:
 19746               $appendLongStrBuf(this$static, c);
 19747               continue;
 19748             case 13:
 19749               this$static.nextCharOnNewLine = true;
 19750               this$static.lastCR = true;
 19751               $appendLongStrBuf(this$static, 10);
 19752               break stateloop;
 19753             case 10:
 19754               this$static.nextCharOnNewLine = true;
 19755               $appendLongStrBuf(this$static, 10);
 19756               continue;
 19757             case 0:
 19758               c = 65533;
 19759             default:$appendLongStrBuf(this$static, c);
 19760               state = 32;
 19761               continue stateloop;
 19762           }
 19763         }
 19764 
 19765       case 36:
 19766         for (;;) {
 19767           if (++pos == endPos) {
 19768             break stateloop;
 19769           }
 19770           c = $checkChar(this$static, buf, pos);
 19771           switch (c) {
 19772             case 62:
 19773               $emitComment(this$static, 3, pos);
 19774               state = 0;
 19775               continue stateloop;
 19776             case 45:
 19777               $appendLongStrBuf(this$static, c);
 19778               state = 33;
 19779               continue stateloop;
 19780             case 13:
 19781               this$static.nextCharOnNewLine = true;
 19782               this$static.lastCR = true;
 19783               $appendLongStrBuf(this$static, 10);
 19784               break stateloop;
 19785             case 10:
 19786               this$static.nextCharOnNewLine = true;
 19787               $appendLongStrBuf(this$static, 10);
 19788               continue;
 19789             case 0:
 19790               c = 65533;
 19791             default:$appendLongStrBuf(this$static, c);
 19792               state = 32;
 19793               continue stateloop;
 19794           }
 19795         }
 19796 
 19797       case 31:
 19798         if (++pos == endPos) {
 19799           break stateloop;
 19800         }
 19801 
 19802         c = $checkChar(this$static, buf, pos);
 19803         switch (c) {
 19804           case 45:
 19805             $appendLongStrBuf(this$static, c);
 19806             state = 34;
 19807             continue stateloop;
 19808           case 62:
 19809             $emitComment(this$static, 1, pos);
 19810             state = 0;
 19811             continue stateloop;
 19812           case 13:
 19813             this$static.nextCharOnNewLine = true;
 19814             this$static.lastCR = true;
 19815             $appendLongStrBuf(this$static, 10);
 19816             state = 32;
 19817             break stateloop;
 19818           case 10:
 19819             this$static.nextCharOnNewLine = true;
 19820             $appendLongStrBuf(this$static, 10);
 19821             state = 32;
 19822             continue stateloop;
 19823           case 0:
 19824             c = 65533;
 19825           default:$appendLongStrBuf(this$static, c);
 19826             state = 32;
 19827             continue stateloop;
 19828         }
 19829 
 19830       case 39:
 19831         markupdeclarationdoctypeloop: for (;;) {
 19832           if (++pos == endPos) {
 19833             break stateloop;
 19834           }
 19835           c = $checkChar(this$static, buf, pos);
 19836           if (this$static.index < 6) {
 19837             folded = c;
 19838             if (c >= 65 && c <= 90) {
 19839               folded += 32;
 19840             }
 19841             if (folded == OCTYPE[this$static.index]) {
 19842               $appendLongStrBuf(this$static, c);
 19843             }
 19844              else {
 19845               state = 15;
 19846               reconsume = true;
 19847               continue stateloop;
 19848             }
 19849             ++this$static.index;
 19850             continue;
 19851           }
 19852            else {
 19853             state = 17;
 19854             reconsume = true;
 19855             break markupdeclarationdoctypeloop;
 19856           }
 19857         }
 19858 
 19859       case 17:
 19860         doctypeloop: for (;;) {
 19861           if (reconsume) {
 19862             reconsume = false;
 19863           }
 19864            else {
 19865             if (++pos == endPos) {
 19866               break stateloop;
 19867             }
 19868             c = $checkChar(this$static, buf, pos);
 19869           }
 19870           this$static.doctypeName = '';
 19871           this$static.systemIdentifier = null;
 19872           this$static.publicIdentifier = null;
 19873           this$static.forceQuirks = false;
 19874           switch (c) {
 19875             case 13:
 19876               this$static.nextCharOnNewLine = true;
 19877               this$static.lastCR = true;
 19878               state = 18;
 19879               break stateloop;
 19880             case 10:
 19881               this$static.nextCharOnNewLine = true;
 19882             case 32:
 19883             case 9:
 19884             case 12:
 19885               state = 18;
 19886               break doctypeloop;
 19887             default:state = 18;
 19888               reconsume = true;
 19889               break doctypeloop;
 19890           }
 19891         }
 19892 
 19893       case 18:
 19894         beforedoctypenameloop: for (;;) {
 19895           if (reconsume) {
 19896             reconsume = false;
 19897           }
 19898            else {
 19899             if (++pos == endPos) {
 19900               break stateloop;
 19901             }
 19902             c = $checkChar(this$static, buf, pos);
 19903           }
 19904           switch (c) {
 19905             case 13:
 19906               this$static.nextCharOnNewLine = true;
 19907               this$static.lastCR = true;
 19908               break stateloop;
 19909             case 10:
 19910               this$static.nextCharOnNewLine = true;
 19911             case 32:
 19912             case 9:
 19913             case 12:
 19914               continue;
 19915             case 62:
 19916               this$static.forceQuirks = true;
 19917               this$static.cstart = pos + 1;
 19918               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 19919               state = 0;
 19920               continue stateloop;
 19921             case 0:
 19922               c = 65533;
 19923             default:if (c >= 65 && c <= 90) {
 19924                 c += 32;
 19925               }
 19926 
 19927               this$static.strBuf[0] = c;
 19928               this$static.strBufLen = 1;
 19929               state = 19;
 19930               break beforedoctypenameloop;
 19931           }
 19932         }
 19933 
 19934       case 19:
 19935         doctypenameloop: for (;;) {
 19936           if (++pos == endPos) {
 19937             break stateloop;
 19938           }
 19939           c = $checkChar(this$static, buf, pos);
 19940           switch (c) {
 19941             case 13:
 19942               this$static.nextCharOnNewLine = true;
 19943               this$static.lastCR = true;
 19944               this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
 19945               state = 20;
 19946               break stateloop;
 19947             case 10:
 19948               this$static.nextCharOnNewLine = true;
 19949             case 32:
 19950             case 9:
 19951             case 12:
 19952               this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
 19953               state = 20;
 19954               break doctypenameloop;
 19955             case 62:
 19956               this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
 19957               this$static.cstart = pos + 1;
 19958               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 19959               state = 0;
 19960               continue stateloop;
 19961             case 0:
 19962               c = 65533;
 19963             default:if (c >= 65 && c <= 90) {
 19964                 c += 32;
 19965               }
 19966 
 19967               $appendStrBuf(this$static, c);
 19968               continue;
 19969           }
 19970         }
 19971 
 19972       case 20:
 19973         afterdoctypenameloop: for (;;) {
 19974           if (++pos == endPos) {
 19975             break stateloop;
 19976           }
 19977           c = $checkChar(this$static, buf, pos);
 19978           switch (c) {
 19979             case 13:
 19980               this$static.nextCharOnNewLine = true;
 19981               this$static.lastCR = true;
 19982               break stateloop;
 19983             case 10:
 19984               this$static.nextCharOnNewLine = true;
 19985             case 32:
 19986             case 9:
 19987             case 12:
 19988               continue;
 19989             case 62:
 19990               this$static.cstart = pos + 1;
 19991               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 19992               state = 0;
 19993               continue stateloop;
 19994             case 112:
 19995             case 80:
 19996               this$static.index = 0;
 19997               state = 40;
 19998               break afterdoctypenameloop;
 19999             case 115:
 20000             case 83:
 20001               this$static.index = 0;
 20002               state = 41;
 20003               continue stateloop;
 20004             default:this$static.forceQuirks = true;
 20005               state = 29;
 20006               continue stateloop;
 20007           }
 20008         }
 20009 
 20010       case 40:
 20011         doctypeublicloop: for (;;) {
 20012           if (++pos == endPos) {
 20013             break stateloop;
 20014           }
 20015           c = $checkChar(this$static, buf, pos);
 20016           if (this$static.index < 5) {
 20017             folded = c;
 20018             if (c >= 65 && c <= 90) {
 20019               folded += 32;
 20020             }
 20021             if (folded != UBLIC[this$static.index]) {
 20022               this$static.forceQuirks = true;
 20023               state = 29;
 20024               reconsume = true;
 20025               continue stateloop;
 20026             }
 20027             ++this$static.index;
 20028             continue;
 20029           }
 20030            else {
 20031             state = 21;
 20032             reconsume = true;
 20033             break doctypeublicloop;
 20034           }
 20035         }
 20036 
 20037       case 21:
 20038         beforedoctypepublicidentifierloop: for (;;) {
 20039           if (reconsume) {
 20040             reconsume = false;
 20041           }
 20042            else {
 20043             if (++pos == endPos) {
 20044               break stateloop;
 20045             }
 20046             c = $checkChar(this$static, buf, pos);
 20047           }
 20048           switch (c) {
 20049             case 13:
 20050               this$static.nextCharOnNewLine = true;
 20051               this$static.lastCR = true;
 20052               break stateloop;
 20053             case 10:
 20054               this$static.nextCharOnNewLine = true;
 20055             case 32:
 20056             case 9:
 20057             case 12:
 20058               continue;
 20059             case 34:
 20060               this$static.longStrBufLen = 0;
 20061               state = 22;
 20062               break beforedoctypepublicidentifierloop;
 20063             case 39:
 20064               this$static.longStrBufLen = 0;
 20065               state = 23;
 20066               continue stateloop;
 20067             case 62:
 20068               this$static.forceQuirks = true;
 20069               this$static.cstart = pos + 1;
 20070               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20071               state = 0;
 20072               continue stateloop;
 20073             default:this$static.forceQuirks = true;
 20074               state = 29;
 20075               continue stateloop;
 20076           }
 20077         }
 20078 
 20079       case 22:
 20080         doctypepublicidentifierdoublequotedloop: for (;;) {
 20081           if (++pos == endPos) {
 20082             break stateloop;
 20083           }
 20084           c = $checkChar(this$static, buf, pos);
 20085           switch (c) {
 20086             case 34:
 20087               this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20088               state = 24;
 20089               break doctypepublicidentifierdoublequotedloop;
 20090             case 62:
 20091               this$static.forceQuirks = true;
 20092               this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20093               this$static.cstart = pos + 1;
 20094               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20095               state = 0;
 20096               continue stateloop;
 20097             case 13:
 20098               this$static.nextCharOnNewLine = true;
 20099               this$static.lastCR = true;
 20100               $appendLongStrBuf(this$static, 10);
 20101               break stateloop;
 20102             case 10:
 20103               this$static.nextCharOnNewLine = true;
 20104               $appendLongStrBuf(this$static, 10);
 20105               continue;
 20106             case 0:
 20107               c = 65533;
 20108             default:$appendLongStrBuf(this$static, c);
 20109               continue;
 20110           }
 20111         }
 20112 
 20113       case 24:
 20114         afterdoctypepublicidentifierloop: for (;;) {
 20115           if (++pos == endPos) {
 20116             break stateloop;
 20117           }
 20118           c = $checkChar(this$static, buf, pos);
 20119           switch (c) {
 20120             case 13:
 20121               this$static.nextCharOnNewLine = true;
 20122               this$static.lastCR = true;
 20123               break stateloop;
 20124             case 10:
 20125               this$static.nextCharOnNewLine = true;
 20126             case 32:
 20127             case 9:
 20128             case 12:
 20129               continue;
 20130             case 34:
 20131               this$static.longStrBufLen = 0;
 20132               state = 26;
 20133               break afterdoctypepublicidentifierloop;
 20134             case 39:
 20135               this$static.longStrBufLen = 0;
 20136               state = 27;
 20137               continue stateloop;
 20138             case 62:
 20139               this$static.cstart = pos + 1;
 20140               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20141               state = 0;
 20142               continue stateloop;
 20143             default:this$static.forceQuirks = true;
 20144               state = 29;
 20145               continue stateloop;
 20146           }
 20147         }
 20148 
 20149       case 26:
 20150         doctypesystemidentifierdoublequotedloop: for (;;) {
 20151           if (++pos == endPos) {
 20152             break stateloop;
 20153           }
 20154           c = $checkChar(this$static, buf, pos);
 20155           switch (c) {
 20156             case 34:
 20157               this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20158               state = 28;
 20159               continue stateloop;
 20160             case 62:
 20161               this$static.forceQuirks = true;
 20162               this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20163               this$static.cstart = pos + 1;
 20164               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20165               state = 0;
 20166               continue stateloop;
 20167             case 13:
 20168               this$static.nextCharOnNewLine = true;
 20169               this$static.lastCR = true;
 20170               $appendLongStrBuf(this$static, 10);
 20171               break stateloop;
 20172             case 10:
 20173               this$static.nextCharOnNewLine = true;
 20174               $appendLongStrBuf(this$static, 10);
 20175               continue;
 20176             case 0:
 20177               c = 65533;
 20178             default:$appendLongStrBuf(this$static, c);
 20179               continue;
 20180           }
 20181         }
 20182 
 20183       case 28:
 20184         afterdoctypesystemidentifierloop: for (;;) {
 20185           if (++pos == endPos) {
 20186             break stateloop;
 20187           }
 20188           c = $checkChar(this$static, buf, pos);
 20189           switch (c) {
 20190             case 13:
 20191               this$static.nextCharOnNewLine = true;
 20192               this$static.lastCR = true;
 20193               break stateloop;
 20194             case 10:
 20195               this$static.nextCharOnNewLine = true;
 20196             case 32:
 20197             case 9:
 20198             case 12:
 20199               continue;
 20200             case 62:
 20201               this$static.cstart = pos + 1;
 20202               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20203               state = 0;
 20204               continue stateloop;
 20205             default:this$static.forceQuirks = false;
 20206               state = 29;
 20207               break afterdoctypesystemidentifierloop;
 20208           }
 20209         }
 20210 
 20211       case 29:
 20212         for (;;) {
 20213           if (reconsume) {
 20214             reconsume = false;
 20215           }
 20216            else {
 20217             if (++pos == endPos) {
 20218               break stateloop;
 20219             }
 20220             c = $checkChar(this$static, buf, pos);
 20221           }
 20222           switch (c) {
 20223             case 62:
 20224               this$static.cstart = pos + 1;
 20225               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20226               state = 0;
 20227               continue stateloop;
 20228             case 13:
 20229               this$static.nextCharOnNewLine = true;
 20230               this$static.lastCR = true;
 20231               break stateloop;
 20232             case 10:
 20233               this$static.nextCharOnNewLine = true;
 20234             default:continue;
 20235           }
 20236         }
 20237 
 20238       case 41:
 20239         doctypeystemloop: for (;;) {
 20240           if (++pos == endPos) {
 20241             break stateloop;
 20242           }
 20243           c = $checkChar(this$static, buf, pos);
 20244           if (this$static.index < 5) {
 20245             folded = c;
 20246             if (c >= 65 && c <= 90) {
 20247               folded += 32;
 20248             }
 20249             if (folded != YSTEM[this$static.index]) {
 20250               this$static.forceQuirks = true;
 20251               state = 29;
 20252               reconsume = true;
 20253               continue stateloop;
 20254             }
 20255             ++this$static.index;
 20256             continue stateloop;
 20257           }
 20258            else {
 20259             state = 25;
 20260             reconsume = true;
 20261             break doctypeystemloop;
 20262           }
 20263         }
 20264 
 20265       case 25:
 20266         beforedoctypesystemidentifierloop: for (;;) {
 20267           if (reconsume) {
 20268             reconsume = false;
 20269           }
 20270            else {
 20271             if (++pos == endPos) {
 20272               break stateloop;
 20273             }
 20274             c = $checkChar(this$static, buf, pos);
 20275           }
 20276           switch (c) {
 20277             case 13:
 20278               this$static.nextCharOnNewLine = true;
 20279               this$static.lastCR = true;
 20280               break stateloop;
 20281             case 10:
 20282               this$static.nextCharOnNewLine = true;
 20283             case 32:
 20284             case 9:
 20285             case 12:
 20286               continue;
 20287             case 34:
 20288               this$static.longStrBufLen = 0;
 20289               state = 26;
 20290               continue stateloop;
 20291             case 39:
 20292               this$static.longStrBufLen = 0;
 20293               state = 27;
 20294               break beforedoctypesystemidentifierloop;
 20295             case 62:
 20296               this$static.forceQuirks = true;
 20297               this$static.cstart = pos + 1;
 20298               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20299               state = 0;
 20300               continue stateloop;
 20301             default:this$static.forceQuirks = true;
 20302               state = 29;
 20303               continue stateloop;
 20304           }
 20305         }
 20306 
 20307       case 27:
 20308         for (;;) {
 20309           if (++pos == endPos) {
 20310             break stateloop;
 20311           }
 20312           c = $checkChar(this$static, buf, pos);
 20313           switch (c) {
 20314             case 39:
 20315               this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20316               state = 28;
 20317               continue stateloop;
 20318             case 62:
 20319               this$static.forceQuirks = true;
 20320               this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20321               this$static.cstart = pos + 1;
 20322               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20323               state = 0;
 20324               continue stateloop;
 20325             case 13:
 20326               this$static.nextCharOnNewLine = true;
 20327               this$static.lastCR = true;
 20328               $appendLongStrBuf(this$static, 10);
 20329               break stateloop;
 20330             case 10:
 20331               this$static.nextCharOnNewLine = true;
 20332               $appendLongStrBuf(this$static, 10);
 20333               continue;
 20334             case 0:
 20335               c = 65533;
 20336             default:$appendLongStrBuf(this$static, c);
 20337               continue;
 20338           }
 20339         }
 20340 
 20341       case 23:
 20342         for (;;) {
 20343           if (++pos == endPos) {
 20344             break stateloop;
 20345           }
 20346           c = $checkChar(this$static, buf, pos);
 20347           switch (c) {
 20348             case 39:
 20349               this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20350               state = 24;
 20351               continue stateloop;
 20352             case 62:
 20353               this$static.forceQuirks = true;
 20354               this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
 20355               this$static.cstart = pos + 1;
 20356               $doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
 20357               state = 0;
 20358               continue stateloop;
 20359             case 13:
 20360               this$static.nextCharOnNewLine = true;
 20361               this$static.lastCR = true;
 20362               $appendLongStrBuf(this$static, 10);
 20363               break stateloop;
 20364             case 10:
 20365               this$static.nextCharOnNewLine = true;
 20366               $appendLongStrBuf(this$static, 10);
 20367               continue;
 20368             case 0:
 20369               c = 65533;
 20370             default:$appendLongStrBuf(this$static, c);
 20371               continue;
 20372           }
 20373         }
 20374 
 20375       case 49:
 20376         for (;;) {
 20377           if (++pos == endPos) {
 20378             break stateloop;
 20379           }
 20380           c = $checkChar(this$static, buf, pos);
 20381           if (this$static.index < 6) {
 20382             if (c == CDATA_LSQB[this$static.index]) {
 20383               $appendLongStrBuf(this$static, c);
 20384             }
 20385              else {
 20386               state = 15;
 20387               reconsume = true;
 20388               continue stateloop;
 20389             }
 20390             ++this$static.index;
 20391             continue;
 20392           }
 20393            else {
 20394             this$static.cstart = pos;
 20395             state = 50;
 20396             reconsume = true;
 20397             break;
 20398           }
 20399         }
 20400 
 20401       case 50:
 20402         cdatasectionloop: for (;;) {
 20403           if (reconsume) {
 20404             reconsume = false;
 20405           }
 20406            else {
 20407             if (++pos == endPos) {
 20408               break stateloop;
 20409             }
 20410             c = $checkChar(this$static, buf, pos);
 20411           }
 20412           switch (c) {
 20413             case 93:
 20414               $flushChars(this$static, buf, pos);
 20415               state = 51;
 20416               break cdatasectionloop;
 20417             case 0:
 20418               $emitReplacementCharacter(this$static, buf, pos);
 20419               continue;
 20420             case 13:
 20421               $emitCarriageReturn(this$static, buf, pos);
 20422               break stateloop;
 20423             case 10:
 20424               this$static.nextCharOnNewLine = true;
 20425             default:continue;
 20426           }
 20427         }
 20428 
 20429       case 51:
 20430         cdatarsqb: for (;;) {
 20431           if (++pos == endPos) {
 20432             break stateloop;
 20433           }
 20434           c = $checkChar(this$static, buf, pos);
 20435           switch (c) {
 20436             case 93:
 20437               state = 52;
 20438               break cdatarsqb;
 20439             default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 1);
 20440               this$static.cstart = pos;
 20441               state = 50;
 20442               reconsume = true;
 20443               continue stateloop;
 20444           }
 20445         }
 20446 
 20447       case 52:
 20448         if (++pos == endPos) {
 20449           break stateloop;
 20450         }
 20451 
 20452         c = $checkChar(this$static, buf, pos);
 20453         switch (c) {
 20454           case 62:
 20455             this$static.cstart = pos + 1;
 20456             state = 0;
 20457             continue stateloop;
 20458           default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 2);
 20459             this$static.cstart = pos;
 20460             state = 50;
 20461             reconsume = true;
 20462             continue stateloop;
 20463         }
 20464 
 20465       case 12:
 20466         attributevaluesinglequotedloop: for (;;) {
 20467           if (reconsume) {
 20468             reconsume = false;
 20469           }
 20470            else {
 20471             if (++pos == endPos) {
 20472               break stateloop;
 20473             }
 20474             c = $checkChar(this$static, buf, pos);
 20475           }
 20476           switch (c) {
 20477             case 39:
 20478               $addAttributeWithValue(this$static);
 20479               state = 14;
 20480               continue stateloop;
 20481             case 38:
 20482               this$static.strBuf[0] = c;
 20483               this$static.strBufLen = 1;
 20484               this$static.additional = 39;
 20485               $LocatorImpl(new LocatorImpl(), this$static);
 20486               returnState = state;
 20487               state = 42;
 20488               break attributevaluesinglequotedloop;
 20489             case 13:
 20490               this$static.nextCharOnNewLine = true;
 20491               this$static.lastCR = true;
 20492               $appendLongStrBuf(this$static, 10);
 20493               break stateloop;
 20494             case 10:
 20495               this$static.nextCharOnNewLine = true;
 20496               $appendLongStrBuf(this$static, 10);
 20497               continue;
 20498             case 0:
 20499               c = 65533;
 20500             default:$appendLongStrBuf(this$static, c);
 20501               continue;
 20502           }
 20503         }
 20504 
 20505       case 42:
 20506         if (++pos == endPos) {
 20507           break stateloop;
 20508         }
 20509 
 20510         c = $checkChar(this$static, buf, pos);
 20511         if (c == 0) {
 20512           break stateloop;
 20513         }
 20514 
 20515         switch (c) {
 20516           case 32:
 20517           case 9:
 20518           case 10:
 20519           case 13:
 20520           case 12:
 20521           case 60:
 20522           case 38:
 20523             $emitOrAppendStrBuf(this$static, returnState);
 20524             if ((returnState & -2) == 0) {
 20525               this$static.cstart = pos;
 20526             }
 20527 
 20528             state = returnState;
 20529             reconsume = true;
 20530             continue stateloop;
 20531           case 35:
 20532             $appendStrBuf(this$static, 35);
 20533             state = 43;
 20534             continue stateloop;
 20535           default:if (c == this$static.additional) {
 20536               $emitOrAppendStrBuf(this$static, returnState);
 20537               state = returnState;
 20538               reconsume = true;
 20539               continue stateloop;
 20540             }
 20541 
 20542             this$static.entCol = -1;
 20543             this$static.lo = 0;
 20544             this$static.hi = ($clinit_94() , NAMES).length - 1;
 20545             this$static.candidate = -1;
 20546             this$static.strBufMark = 0;
 20547             state = 44;
 20548             reconsume = true;
 20549         }
 20550 
 20551       case 44:
 20552         outer: for (;;) {
 20553           if (reconsume) {
 20554             reconsume = false;
 20555           }
 20556            else {
 20557             if (++pos == endPos) {
 20558               break stateloop;
 20559             }
 20560             c = $checkChar(this$static, buf, pos);
 20561           }
 20562           if (c == 0) {
 20563             break stateloop;
 20564           }
 20565           ++this$static.entCol;
 20566           hiloop: for (;;) {
 20567             if (this$static.hi == -1) {
 20568               break hiloop;
 20569             }
 20570             if (this$static.entCol == ($clinit_94() , NAMES)[this$static.hi].length) {
 20571               break hiloop;
 20572             }
 20573             if (this$static.entCol > NAMES[this$static.hi].length) {
 20574               break outer;
 20575             }
 20576              else if (c < NAMES[this$static.hi][this$static.entCol]) {
 20577               --this$static.hi;
 20578             }
 20579              else {
 20580               break hiloop;
 20581             }
 20582           }
 20583           loloop: for (;;) {
 20584             if (this$static.hi < this$static.lo) {
 20585               break outer;
 20586             }
 20587             if (this$static.entCol == ($clinit_94() , NAMES)[this$static.lo].length) {
 20588               this$static.candidate = this$static.lo;
 20589               this$static.strBufMark = this$static.strBufLen;
 20590               ++this$static.lo;
 20591             }
 20592              else if (this$static.entCol > NAMES[this$static.lo].length) {
 20593               break outer;
 20594             }
 20595              else if (c > NAMES[this$static.lo][this$static.entCol]) {
 20596               ++this$static.lo;
 20597             }
 20598              else {
 20599               break loloop;
 20600             }
 20601           }
 20602           if (this$static.hi < this$static.lo) {
 20603             break outer;
 20604           }
 20605           $appendStrBuf(this$static, c);
 20606           continue;
 20607         }
 20608 
 20609         if (this$static.candidate == -1) {
 20610           $emitOrAppendStrBuf(this$static, returnState);
 20611           if ((returnState & -2) == 0) {
 20612             this$static.cstart = pos;
 20613           }
 20614           state = returnState;
 20615           reconsume = true;
 20616           continue stateloop;
 20617         }
 20618          else {
 20619           candidateArr = ($clinit_94() , NAMES)[this$static.candidate];
 20620           if (candidateArr[candidateArr.length - 1] != 59) {
 20621             if ((returnState & -2) != 0) {
 20622               if (this$static.strBufMark == this$static.strBufLen) {
 20623                 ch = c;
 20624               }
 20625                else {
 20626                 ch = this$static.strBuf[this$static.strBufMark];
 20627               }
 20628               if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
 20629                 $appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
 20630                 state = returnState;
 20631                 reconsume = true;
 20632                 continue stateloop;
 20633               }
 20634             }
 20635           }
 20636           val = VALUES_0[this$static.candidate];
 20637           $emitOrAppend(this$static, val, returnState);
 20638           if (this$static.strBufMark < this$static.strBufLen) {
 20639             if ((returnState & -2) != 0) {
 20640               for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
 20641                 $appendLongStrBuf(this$static, this$static.strBuf[i]);
 20642               }
 20643             }
 20644              else {
 20645               $characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
 20646             }
 20647           }
 20648           if ((returnState & -2) == 0) {
 20649             this$static.cstart = pos;
 20650           }
 20651           state = returnState;
 20652           reconsume = true;
 20653           continue stateloop;
 20654         }
 20655 
 20656       case 43:
 20657         if (++pos == endPos) {
 20658           break stateloop;
 20659         }
 20660 
 20661         c = $checkChar(this$static, buf, pos);
 20662         this$static.prevValue = -1;
 20663         this$static.value = 0;
 20664         this$static.seenDigits = false;
 20665         switch (c) {
 20666           case 120:
 20667           case 88:
 20668             $appendStrBuf(this$static, c);
 20669             state = 45;
 20670             continue stateloop;
 20671           default:state = 46;
 20672             reconsume = true;
 20673         }
 20674 
 20675       case 46:
 20676         decimalloop: for (;;) {
 20677           if (reconsume) {
 20678             reconsume = false;
 20679           }
 20680            else {
 20681             if (++pos == endPos) {
 20682               break stateloop;
 20683             }
 20684             c = $checkChar(this$static, buf, pos);
 20685           }
 20686           if (this$static.value < this$static.prevValue) {
 20687             this$static.value = 1114112;
 20688           }
 20689           this$static.prevValue = this$static.value;
 20690           if (c >= 48 && c <= 57) {
 20691             this$static.seenDigits = true;
 20692             this$static.value *= 10;
 20693             this$static.value += c - 48;
 20694             continue;
 20695           }
 20696            else if (c == 59) {
 20697             if (this$static.seenDigits) {
 20698               if ((returnState & -2) == 0) {
 20699                 this$static.cstart = pos + 1;
 20700               }
 20701               state = 47;
 20702               break decimalloop;
 20703             }
 20704              else {
 20705               'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
 20706               $appendStrBuf(this$static, 59);
 20707               $emitOrAppendStrBuf(this$static, returnState);
 20708               if ((returnState & -2) == 0) {
 20709                 this$static.cstart = pos + 1;
 20710               }
 20711               state = returnState;
 20712               continue stateloop;
 20713             }
 20714           }
 20715            else {
 20716             if (this$static.seenDigits) {
 20717               if ((returnState & -2) == 0) {
 20718                 this$static.cstart = pos;
 20719               }
 20720               state = 47;
 20721               reconsume = true;
 20722               break decimalloop;
 20723             }
 20724              else {
 20725               'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
 20726               $emitOrAppendStrBuf(this$static, returnState);
 20727               if ((returnState & -2) == 0) {
 20728                 this$static.cstart = pos;
 20729               }
 20730               state = returnState;
 20731               reconsume = true;
 20732               continue stateloop;
 20733             }
 20734           }
 20735         }
 20736 
 20737       case 47:
 20738         $handleNcrValue(this$static, returnState);
 20739         state = returnState;
 20740         continue stateloop;
 20741       case 45:
 20742         for (;;) {
 20743           if (++pos == endPos) {
 20744             break stateloop;
 20745           }
 20746           c = $checkChar(this$static, buf, pos);
 20747           if (this$static.value < this$static.prevValue) {
 20748             this$static.value = 1114112;
 20749           }
 20750           this$static.prevValue = this$static.value;
 20751           if (c >= 48 && c <= 57) {
 20752             this$static.seenDigits = true;
 20753             this$static.value *= 16;
 20754             this$static.value += c - 48;
 20755             continue;
 20756           }
 20757            else if (c >= 65 && c <= 70) {
 20758             this$static.seenDigits = true;
 20759             this$static.value *= 16;
 20760             this$static.value += c - 65 + 10;
 20761             continue;
 20762           }
 20763            else if (c >= 97 && c <= 102) {
 20764             this$static.seenDigits = true;
 20765             this$static.value *= 16;
 20766             this$static.value += c - 97 + 10;
 20767             continue;
 20768           }
 20769            else if (c == 59) {
 20770             if (this$static.seenDigits) {
 20771               if ((returnState & -2) == 0) {
 20772                 this$static.cstart = pos + 1;
 20773               }
 20774               state = 47;
 20775               continue stateloop;
 20776             }
 20777              else {
 20778               'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
 20779               $appendStrBuf(this$static, 59);
 20780               $emitOrAppendStrBuf(this$static, returnState);
 20781               if ((returnState & -2) == 0) {
 20782                 this$static.cstart = pos + 1;
 20783               }
 20784               state = returnState;
 20785               continue stateloop;
 20786             }
 20787           }
 20788            else {
 20789             if (this$static.seenDigits) {
 20790               if ((returnState & -2) == 0) {
 20791                 this$static.cstart = pos;
 20792               }
 20793               state = 47;
 20794               reconsume = true;
 20795               continue stateloop;
 20796             }
 20797              else {
 20798               'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
 20799               $emitOrAppendStrBuf(this$static, returnState);
 20800               if ((returnState & -2) == 0) {
 20801                 this$static.cstart = pos;
 20802               }
 20803               state = returnState;
 20804               reconsume = true;
 20805               continue stateloop;
 20806             }
 20807           }
 20808         }
 20809 
 20810       case 3:
 20811         plaintextloop: for (;;) {
 20812           if (reconsume) {
 20813             reconsume = false;
 20814           }
 20815            else {
 20816             if (++pos == endPos) {
 20817               break stateloop;
 20818             }
 20819             c = $checkChar(this$static, buf, pos);
 20820           }
 20821           switch (c) {
 20822             case 0:
 20823               $emitReplacementCharacter(this$static, buf, pos);
 20824               continue;
 20825             case 13:
 20826               $emitCarriageReturn(this$static, buf, pos);
 20827               break stateloop;
 20828             case 10:
 20829               this$static.nextCharOnNewLine = true;
 20830             default:continue;
 20831           }
 20832         }
 20833 
 20834       case 2:
 20835         cdataloop: for (;;) {
 20836           if (reconsume) {
 20837             reconsume = false;
 20838           }
 20839            else {
 20840             if (++pos == endPos) {
 20841               break stateloop;
 20842             }
 20843             c = $checkChar(this$static, buf, pos);
 20844           }
 20845           switch (c) {
 20846             case 60:
 20847               $flushChars(this$static, buf, pos);
 20848               returnState = state;
 20849               state = 53;
 20850               break cdataloop;
 20851             case 0:
 20852               $emitReplacementCharacter(this$static, buf, pos);
 20853               continue;
 20854             case 13:
 20855               $emitCarriageReturn(this$static, buf, pos);
 20856               break stateloop;
 20857             case 10:
 20858               this$static.nextCharOnNewLine = true;
 20859             default:continue;
 20860           }
 20861         }
 20862 
 20863       case 53:
 20864         tagopennonpcdataloop: for (;;) {
 20865           if (++pos == endPos) {
 20866             break stateloop;
 20867           }
 20868           c = $checkChar(this$static, buf, pos);
 20869           switch (c) {
 20870             case 33:
 20871               $characters(this$static.tokenHandler, LT_GT, 0, 1);
 20872               this$static.cstart = pos;
 20873               state = 54;
 20874               break tagopennonpcdataloop;
 20875             case 47:
 20876               if (this$static.contentModelElement) {
 20877                 this$static.index = 0;
 20878                 this$static.strBufLen = 0;
 20879                 state = 37;
 20880                 continue stateloop;
 20881               }
 20882 
 20883             default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
 20884               this$static.cstart = pos;
 20885               state = returnState;
 20886               reconsume = true;
 20887               continue stateloop;
 20888           }
 20889         }
 20890 
 20891       case 54:
 20892         escapeexclamationloop: for (;;) {
 20893           if (++pos == endPos) {
 20894             break stateloop;
 20895           }
 20896           c = $checkChar(this$static, buf, pos);
 20897           switch (c) {
 20898             case 45:
 20899               state = 55;
 20900               break escapeexclamationloop;
 20901             default:state = returnState;
 20902               reconsume = true;
 20903               continue stateloop;
 20904           }
 20905         }
 20906 
 20907       case 55:
 20908         escapeexclamationhyphenloop: for (;;) {
 20909           if (++pos == endPos) {
 20910             break stateloop;
 20911           }
 20912           c = $checkChar(this$static, buf, pos);
 20913           switch (c) {
 20914             case 45:
 20915               state = 58;
 20916               break escapeexclamationhyphenloop;
 20917             default:state = returnState;
 20918               reconsume = true;
 20919               continue stateloop;
 20920           }
 20921         }
 20922 
 20923       case 58:
 20924         escapehyphenhyphenloop: for (;;) {
 20925           if (++pos == endPos) {
 20926             break stateloop;
 20927           }
 20928           c = $checkChar(this$static, buf, pos);
 20929           switch (c) {
 20930             case 45:
 20931               continue;
 20932             case 62:
 20933               state = returnState;
 20934               continue stateloop;
 20935             case 0:
 20936               $emitReplacementCharacter(this$static, buf, pos);
 20937               state = 56;
 20938               break escapehyphenhyphenloop;
 20939             case 13:
 20940               $emitCarriageReturn(this$static, buf, pos);
 20941               state = 56;
 20942               break stateloop;
 20943             case 10:
 20944               this$static.nextCharOnNewLine = true;
 20945             default:state = 56;
 20946               break escapehyphenhyphenloop;
 20947           }
 20948         }
 20949 
 20950       case 56:
 20951         escapeloop: for (;;) {
 20952           if (++pos == endPos) {
 20953             break stateloop;
 20954           }
 20955           c = $checkChar(this$static, buf, pos);
 20956           switch (c) {
 20957             case 45:
 20958               state = 57;
 20959               break escapeloop;
 20960             case 0:
 20961               $emitReplacementCharacter(this$static, buf, pos);
 20962               continue;
 20963             case 13:
 20964               $emitCarriageReturn(this$static, buf, pos);
 20965               break stateloop;
 20966             case 10:
 20967               this$static.nextCharOnNewLine = true;
 20968             default:continue;
 20969           }
 20970         }
 20971 
 20972       case 57:
 20973         escapehyphenloop: for (;;) {
 20974           if (++pos == endPos) {
 20975             break stateloop;
 20976           }
 20977           c = $checkChar(this$static, buf, pos);
 20978           switch (c) {
 20979             case 45:
 20980               state = 58;
 20981               continue stateloop;
 20982             case 0:
 20983               $emitReplacementCharacter(this$static, buf, pos);
 20984               state = 56;
 20985               continue stateloop;
 20986             case 13:
 20987               $emitCarriageReturn(this$static, buf, pos);
 20988               state = 56;
 20989               continue stateloop;
 20990             case 10:
 20991               this$static.nextCharOnNewLine = true;
 20992             default:state = 56;
 20993               continue stateloop;
 20994           }
 20995         }
 20996 
 20997       case 37:
 20998         for (;;) {
 20999           if (++pos == endPos) {
 21000             break stateloop;
 21001           }
 21002           c = $checkChar(this$static, buf, pos);
 21003           if (this$static.index < this$static.contentModelElementNameAsArray.length) {
 21004             e = this$static.contentModelElementNameAsArray[this$static.index];
 21005             folded = c;
 21006             if (c >= 65 && c <= 90) {
 21007               folded += 32;
 21008             }
 21009             if (folded != e) {
 21010               this$static.html4 && (this$static.index > 0 || folded >= 97 && folded <= 122) && ($clinit_89() , IFRAME) != this$static.contentModelElement;
 21011               $characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
 21012               $emitStrBuf(this$static);
 21013               this$static.cstart = pos;
 21014               state = returnState;
 21015               reconsume = true;
 21016               continue stateloop;
 21017             }
 21018             $appendStrBuf(this$static, c);
 21019             ++this$static.index;
 21020             continue;
 21021           }
 21022            else {
 21023             this$static.endTag = true;
 21024             this$static.tagName = this$static.contentModelElement;
 21025             switch (c) {
 21026               case 13:
 21027                 this$static.nextCharOnNewLine = true;
 21028                 this$static.lastCR = true;
 21029                 state = 7;
 21030                 break stateloop;
 21031               case 10:
 21032                 this$static.nextCharOnNewLine = true;
 21033               case 32:
 21034               case 9:
 21035               case 12:
 21036                 state = 7;
 21037                 continue stateloop;
 21038               case 62:
 21039                 state = $emitCurrentTagToken(this$static, false, pos);
 21040                 if (this$static.shouldSuspend) {
 21041                   break stateloop;
 21042                 }
 21043 
 21044                 continue stateloop;
 21045               case 47:
 21046                 state = 48;
 21047                 continue stateloop;
 21048               default:$characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
 21049                 $emitStrBuf(this$static);
 21050                 if (c == 0) {
 21051                   $emitReplacementCharacter(this$static, buf, pos);
 21052                 }
 21053                  else {
 21054                   this$static.cstart = pos;
 21055                 }
 21056 
 21057                 state = returnState;
 21058                 continue stateloop;
 21059             }
 21060           }
 21061         }
 21062 
 21063       case 5:
 21064         if (++pos == endPos) {
 21065           break stateloop;
 21066         }
 21067 
 21068         c = $checkChar(this$static, buf, pos);
 21069         switch (c) {
 21070           case 62:
 21071             this$static.cstart = pos + 1;
 21072             state = 0;
 21073             continue stateloop;
 21074           case 13:
 21075             this$static.nextCharOnNewLine = true;
 21076             this$static.lastCR = true;
 21077             this$static.longStrBuf[0] = 10;
 21078             this$static.longStrBufLen = 1;
 21079             state = 15;
 21080             break stateloop;
 21081           case 10:
 21082             this$static.nextCharOnNewLine = true;
 21083             this$static.longStrBuf[0] = 10;
 21084             this$static.longStrBufLen = 1;
 21085             state = 15;
 21086             continue stateloop;
 21087           case 0:
 21088             c = 65533;
 21089           default:if (c >= 65 && c <= 90) {
 21090               c += 32;
 21091             }
 21092 
 21093             if (c >= 97 && c <= 122) {
 21094               this$static.endTag = true;
 21095               this$static.strBuf[0] = c;
 21096               this$static.strBufLen = 1;
 21097               state = 6;
 21098               continue stateloop;
 21099             }
 21100              else {
 21101               this$static.longStrBuf[0] = c;
 21102               this$static.longStrBufLen = 1;
 21103               state = 15;
 21104               continue stateloop;
 21105             }
 21106 
 21107         }
 21108 
 21109       case 1:
 21110         rcdataloop: for (;;) {
 21111           if (reconsume) {
 21112             reconsume = false;
 21113           }
 21114            else {
 21115             if (++pos == endPos) {
 21116               break stateloop;
 21117             }
 21118             c = $checkChar(this$static, buf, pos);
 21119           }
 21120           switch (c) {
 21121             case 38:
 21122               $flushChars(this$static, buf, pos);
 21123               this$static.strBuf[0] = c;
 21124               this$static.strBufLen = 1;
 21125               this$static.additional = 0;
 21126               returnState = state;
 21127               state = 42;
 21128               continue stateloop;
 21129             case 60:
 21130               $flushChars(this$static, buf, pos);
 21131               returnState = state;
 21132               state = 53;
 21133               continue stateloop;
 21134             case 0:
 21135               $emitReplacementCharacter(this$static, buf, pos);
 21136               continue;
 21137             case 13:
 21138               $emitCarriageReturn(this$static, buf, pos);
 21139               break stateloop;
 21140             case 10:
 21141               this$static.nextCharOnNewLine = true;
 21142             default:continue;
 21143           }
 21144         }
 21145 
 21146     }
 21147   }
 21148   $flushChars(this$static, buf, pos);
 21149   this$static.stateSave = state;
 21150   this$static.returnStateSave = returnState;
 21151   return pos;
 21152 }
 21153 
 21154 function $tokenizeBuffer(this$static, buffer){
 21155   var pos, returnState, start, state;
 21156   state = this$static.stateSave;
 21157   returnState = this$static.returnStateSave;
 21158   this$static.shouldSuspend = false;
 21159   this$static.lastCR = false;
 21160   start = buffer.start;
 21161   pos = start - 1;
 21162   switch (state) {
 21163     case 0:
 21164     case 1:
 21165     case 2:
 21166     case 3:
 21167     case 50:
 21168     case 56:
 21169     case 54:
 21170     case 55:
 21171     case 57:
 21172     case 58:
 21173       this$static.cstart = start;
 21174       break;
 21175     default:this$static.cstart = 2147483647;
 21176   }
 21177   pos = $stateLoop(this$static, state, 0, pos, buffer.buffer, false, returnState, buffer.end);
 21178   if (pos == buffer.end) {
 21179     buffer.start = pos;
 21180   }
 21181    else {
 21182     buffer.start = pos + 1;
 21183   }
 21184   return this$static.lastCR;
 21185 }
 21186 
 21187 function getClass_56(){
 21188   return Lnu_validator_htmlparser_impl_Tokenizer_2_classLit;
 21189 }
 21190 
 21191 function newAsciiLowerCaseStringFromString(str){
 21192   var buf, c, i;
 21193   if (str == null) {
 21194     return null;
 21195   }
 21196   buf = initDim(_3C_classLit, 42, -1, str.length, 1);
 21197   for (i = 0; i < str.length; ++i) {
 21198     c = str.charCodeAt(i);
 21199     if (c >= 65 && c <= 90) {
 21200       c += 32;
 21201     }
 21202     buf[i] = c;
 21203   }
 21204   return String.fromCharCode.apply(null, buf);
 21205 }
 21206 
 21207 function Tokenizer(){
 21208 }
 21209 
 21210 _ = Tokenizer.prototype = new Object_0();
 21211 _.getClass$ = getClass_56;
 21212 _.typeId$ = 0;
 21213 _.additional = 0;
 21214 _.astralChar = null;
 21215 _.attributeName = null;
 21216 _.attributes = null;
 21217 _.bmpChar = null;
 21218 _.candidate = 0;
 21219 _.confident = false;
 21220 _.contentModelElement = null;
 21221 _.contentModelElementNameAsArray = null;
 21222 _.cstart = 0;
 21223 _.doctypeName = null;
 21224 _.endTag = false;
 21225 _.entCol = 0;
 21226 _.forceQuirks = false;
 21227 _.hi = 0;
 21228 _.html4 = false;
 21229 _.html4ModeCompatibleWithXhtml1Schemata = false;
 21230 _.index = 0;
 21231 _.lastCR = false;
 21232 _.lo = 0;
 21233 _.longStrBuf = null;
 21234 _.longStrBufLen = 0;
 21235 _.mappingLangToXmlLang = 0;
 21236 _.metaBoundaryPassed = false;
 21237 _.newAttributesEachTime = false;
 21238 _.prevValue = 0;
 21239 _.publicIdentifier = null;
 21240 _.returnStateSave = 0;
 21241 _.seenDigits = false;
 21242 _.shouldSuspend = false;
 21243 _.stateSave = 0;
 21244 _.strBuf = null;
 21245 _.strBufLen = 0;
 21246 _.strBufMark = 0;
 21247 _.systemIdentifier = null;
 21248 _.tagName = null;
 21249 _.tokenHandler = null;
 21250 _.value = 0;
 21251 _.wantsComments = false;
 21252 var CDATA_LSQB, IFRAME_ARR, LF, LT_GT, LT_SOLIDUS, NOEMBED_ARR, NOFRAMES_ARR, NOSCRIPT_ARR, OCTYPE, PLAINTEXT_ARR, REPLACEMENT_CHARACTER, RSQB_RSQB, SCRIPT_ARR, SPACE, STYLE_ARR, TEXTAREA_ARR, TITLE_ARR, UBLIC, XMP_ARR, YSTEM;
 21253 function $clinit_90(){
 21254   $clinit_90 = nullMethod;
 21255   $clinit_97();
 21256 }
 21257 
 21258 function $ErrorReportingTokenizer(this$static, tokenHandler){
 21259   $clinit_90();
 21260   this$static.contentSpacePolicy = ($clinit_80() , ALTER_INFOSET);
 21261   this$static.commentPolicy = ALTER_INFOSET;
 21262   this$static.xmlnsPolicy = ALTER_INFOSET;
 21263   this$static.namePolicy = ALTER_INFOSET;
 21264   this$static.tokenHandler = tokenHandler;
 21265   this$static.newAttributesEachTime = false;
 21266   this$static.bmpChar = initDim(_3C_classLit, 42, -1, 1, 1);
 21267   this$static.astralChar = initDim(_3C_classLit, 42, -1, 2, 1);
 21268   this$static.contentNonXmlCharPolicy = ALTER_INFOSET;
 21269   return this$static;
 21270 }
 21271 
 21272 function $checkChar(this$static, buf, pos){
 21273   var c, intVal;
 21274   this$static.linePrev = this$static.line;
 21275   this$static.colPrev = this$static.col;
 21276   if (this$static.nextCharOnNewLine) {
 21277     ++this$static.line;
 21278     this$static.col = 1;
 21279     this$static.nextCharOnNewLine = false;
 21280   }
 21281    else {
 21282     ++this$static.col;
 21283   }
 21284   c = buf[pos];
 21285   if (!this$static.confident && !this$static.alreadyComplainedAboutNonAscii && c > 127) {
 21286     this$static.alreadyComplainedAboutNonAscii = true;
 21287   }
 21288   switch (c) {
 21289     case 0:
 21290     case 9:
 21291     case 13:
 21292     case 10:
 21293       break;
 21294     case 12:
 21295       if (this$static.contentNonXmlCharPolicy == ($clinit_80() , FATAL)) {
 21296         $fatal(this$static, 'This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.');
 21297       }
 21298        else {
 21299         if (this$static.contentNonXmlCharPolicy == ALTER_INFOSET) {
 21300           c = buf[pos] = 32;
 21301         }
 21302         'This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.';
 21303       }
 21304 
 21305       break;
 21306     default:if ((c & 64512) == 56320) {
 21307         if ((this$static.prev & 64512) == 55296) {
 21308           intVal = (this$static.prev << 10) + c + -56613888;
 21309           if (intVal >= 983040 && intVal <= 1048573 || intVal >= 1048576 && intVal <= 1114109) {
 21310             $warnAboutPrivateUseChar(this$static);
 21311           }
 21312         }
 21313       }
 21314        else if (c < 32 || (c & 65534) == 65534) {
 21315         switch (this$static.contentNonXmlCharPolicy.ordinal) {
 21316           case 1:
 21317             $fatal(this$static, 'Forbidden code point ' + $toUPlusString(c) + '.');
 21318             break;
 21319           case 2:
 21320             c = buf[pos] = 65533;
 21321           case 0:
 21322             'Forbidden code point ' + $toUPlusString(c) + '.';
 21323         }
 21324       }
 21325        else if (c >= 127 && c <= 159 || c >= 64976 && c <= 64991) {
 21326         'Forbidden code point ' + $toUPlusString(c) + '.';
 21327       }
 21328        else if (c >= 57344 && c <= 63743) {
 21329         $warnAboutPrivateUseChar(this$static);
 21330       }
 21331 
 21332   }
 21333   this$static.prev = c;
 21334   return c;
 21335 }
 21336 
 21337 function $errLtOrEqualsInUnquotedAttributeOrNull(c){
 21338   switch (c) {
 21339     case 61:
 21340       return;
 21341     case 60:
 21342       return;
 21343   }
 21344 }
 21345 
 21346 function $flushChars(this$static, buf, pos){
 21347   var currCol, currLine;
 21348   if (pos > this$static.cstart) {
 21349     currLine = this$static.line;
 21350     currCol = this$static.col;
 21351     this$static.line = this$static.linePrev;
 21352     this$static.col = this$static.colPrev;
 21353     $characters(this$static.tokenHandler, buf, this$static.cstart, pos - this$static.cstart);
 21354     this$static.line = currLine;
 21355     this$static.col = currCol;
 21356   }
 21357   this$static.cstart = 2147483647;
 21358 }
 21359 
 21360 function $getColumnNumber(this$static){
 21361   if (this$static.col > 0) {
 21362     return this$static.col;
 21363   }
 21364    else {
 21365     return -1;
 21366   }
 21367 }
 21368 
 21369 function $getLineNumber(this$static){
 21370   if (this$static.line > 0) {
 21371     return this$static.line;
 21372   }
 21373    else {
 21374     return -1;
 21375   }
 21376 }
 21377 
 21378 function $toUPlusString(c){
 21379   var hexString;
 21380   hexString = toPowerOfTwoString(c, 4);
 21381   switch (hexString.length) {
 21382     case 1:
 21383       return 'U+000' + hexString;
 21384     case 2:
 21385       return 'U+00' + hexString;
 21386     case 3:
 21387       return 'U+0' + hexString;
 21388     case 4:
 21389       return 'U+' + hexString;
 21390     default:throw $RuntimeException(new RuntimeException(), 'Unreachable.');
 21391   }
 21392 }
 21393 
 21394 function $warnAboutPrivateUseChar(this$static){
 21395   if (!this$static.alreadyWarnedAboutPrivateUseCharacters) {
 21396     this$static.alreadyWarnedAboutPrivateUseCharacters = true;
 21397   }
 21398 }
 21399 
 21400 function getClass_52(){
 21401   return Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit;
 21402 }
 21403 
 21404 function ErrorReportingTokenizer(){
 21405 }
 21406 
 21407 _ = ErrorReportingTokenizer.prototype = new Tokenizer();
 21408 _.getClass$ = getClass_52;
 21409 _.typeId$ = 0;
 21410 _.alreadyComplainedAboutNonAscii = false;
 21411 _.alreadyWarnedAboutPrivateUseCharacters = false;
 21412 _.col = 0;
 21413 _.colPrev = 0;
 21414 _.line = 0;
 21415 _.linePrev = 0;
 21416 _.nextCharOnNewLine = false;
 21417 _.prev = 0;
 21418 function $clinit_91(){
 21419   $clinit_91 = nullMethod;
 21420   EMPTY_ATTRIBUTENAMES = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, 0, 0);
 21421   EMPTY_STRINGS = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 0, 0);
 21422   EMPTY_ATTRIBUTES = $HtmlAttributes(new HtmlAttributes(), 0);
 21423 }
 21424 
 21425 function $HtmlAttributes(this$static, mode){
 21426   $clinit_91();
 21427   this$static.mode = mode;
 21428   this$static.length_0 = 0;
 21429   this$static.names = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, 5, 0);
 21430   this$static.values = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 5, 0);
 21431   this$static.xmlnsLength = 0;
 21432   this$static.xmlnsNames = EMPTY_ATTRIBUTENAMES;
 21433   this$static.xmlnsValues = EMPTY_STRINGS;
 21434   return this$static;
 21435 }
 21436 
 21437 function $addAttribute(this$static, name, value, xmlnsPolicy){
 21438   var newLen, newNames, newValues;
 21439   name == ($clinit_87() , ID);
 21440   if (name.xmlns) {
 21441     if (this$static.xmlnsNames.length == this$static.xmlnsLength) {
 21442       newLen = this$static.xmlnsLength == 0?2:this$static.xmlnsLength << 1;
 21443       newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, newLen, 0);
 21444       arraycopy(this$static.xmlnsNames, 0, newNames, 0, this$static.xmlnsNames.length);
 21445       this$static.xmlnsNames = newNames;
 21446       newValues = initDim(_3Ljava_lang_String_2_classLit, 48, 1, newLen, 0);
 21447       arraycopy(this$static.xmlnsValues, 0, newValues, 0, this$static.xmlnsValues.length);
 21448       this$static.xmlnsValues = newValues;
 21449     }
 21450     this$static.xmlnsNames[this$static.xmlnsLength] = name;
 21451     this$static.xmlnsValues[this$static.xmlnsLength] = value;
 21452     ++this$static.xmlnsLength;
 21453     switch (xmlnsPolicy.ordinal) {
 21454       case 1:
 21455         throw $SAXException(new SAXException(), 'Saw an xmlns attribute.');
 21456       case 2:
 21457         return;
 21458     }
 21459   }
 21460   if (this$static.names.length == this$static.length_0) {
 21461     newLen = this$static.length_0 << 1;
 21462     newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, newLen, 0);
 21463     arraycopy(this$static.names, 0, newNames, 0, this$static.names.length);
 21464     this$static.names = newNames;
 21465     newValues = initDim(_3Ljava_lang_String_2_classLit, 48, 1, newLen, 0);
 21466     arraycopy(this$static.values, 0, newValues, 0, this$static.values.length);
 21467     this$static.values = newValues;
 21468   }
 21469   this$static.names[this$static.length_0] = name;
 21470   this$static.values[this$static.length_0] = value;
 21471   ++this$static.length_0;
 21472 }
 21473 
 21474 function $clear_0(this$static, m){
 21475   var i;
 21476   for (i = 0; i < this$static.length_0; ++i) {
 21477     setCheck(this$static.names, i, null);
 21478     setCheck(this$static.values, i, null);
 21479   }
 21480   this$static.length_0 = 0;
 21481   this$static.mode = m;
 21482   for (i = 0; i < this$static.xmlnsLength; ++i) {
 21483     setCheck(this$static.xmlnsNames, i, null);
 21484     setCheck(this$static.xmlnsValues, i, null);
 21485   }
 21486   this$static.xmlnsLength = 0;
 21487 }
 21488 
 21489 function $clearWithoutReleasingContents(this$static){
 21490   var i;
 21491   for (i = 0; i < this$static.length_0; ++i) {
 21492     setCheck(this$static.names, i, null);
 21493     setCheck(this$static.values, i, null);
 21494   }
 21495   this$static.length_0 = 0;
 21496 }
 21497 
 21498 function $cloneAttributes(this$static){
 21499   var clone, i;
 21500   clone = $HtmlAttributes(new HtmlAttributes(), 0);
 21501   for (i = 0; i < this$static.length_0; ++i) {
 21502     $addAttribute(clone, this$static.names[i], this$static.values[i], ($clinit_80() , ALLOW));
 21503   }
 21504   for (i = 0; i < this$static.xmlnsLength; ++i) {
 21505     $addAttribute(clone, this$static.xmlnsNames[i], this$static.xmlnsValues[i], ($clinit_80() , ALLOW));
 21506   }
 21507   return clone;
 21508 }
 21509 
 21510 function $contains(this$static, name){
 21511   var i;
 21512   for (i = 0; i < this$static.length_0; ++i) {
 21513     if (name.local[0] == this$static.names[i].local[0]) {
 21514       return true;
 21515     }
 21516   }
 21517   for (i = 0; i < this$static.xmlnsLength; ++i) {
 21518     if (name.local[0] == this$static.xmlnsNames[i].local[0]) {
 21519       return true;
 21520     }
 21521   }
 21522   return false;
 21523 }
 21524 
 21525 function $getAttributeName(this$static, index){
 21526   if (index < this$static.length_0 && index >= 0) {
 21527     return this$static.names[index];
 21528   }
 21529    else {
 21530     return null;
 21531   }
 21532 }
 21533 
 21534 function $getIndex(this$static, name){
 21535   var i;
 21536   for (i = 0; i < this$static.length_0; ++i) {
 21537     if (this$static.names[i] == name) {
 21538       return i;
 21539     }
 21540   }
 21541   return -1;
 21542 }
 21543 
 21544 function $getLocalName(this$static, index){
 21545   if (index < this$static.length_0 && index >= 0) {
 21546     return this$static.names[index].local[this$static.mode];
 21547   }
 21548    else {
 21549     return null;
 21550   }
 21551 }
 21552 
 21553 function $getURI(this$static, index){
 21554   if (index < this$static.length_0 && index >= 0) {
 21555     return this$static.names[index].uri[this$static.mode];
 21556   }
 21557    else {
 21558     return null;
 21559   }
 21560 }
 21561 
 21562 function $getValue(this$static, index){
 21563   if (index < this$static.length_0 && index >= 0) {
 21564     return this$static.values[index];
 21565   }
 21566    else {
 21567     return null;
 21568   }
 21569 }
 21570 
 21571 function $getValue_0(this$static, name){
 21572   var index;
 21573   index = $getIndex(this$static, name);
 21574   if (index == -1) {
 21575     return null;
 21576   }
 21577    else {
 21578     return $getValue(this$static, index);
 21579   }
 21580 }
 21581 
 21582 function $processNonNcNames(this$static, treeBuilder, namePolicy){
 21583   var attName, i, name;
 21584   for (i = 0; i < this$static.length_0; ++i) {
 21585     attName = this$static.names[i];
 21586     if (!attName.ncname[this$static.mode]) {
 21587       name = attName.local[this$static.mode];
 21588       switch (namePolicy.ordinal) {
 21589         case 2:
 21590           this$static.names[i] = ($clinit_87() , $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL(escapeName(name)), ALL_NO_PREFIX, ALL_NCNAME, false));
 21591         case 0:
 21592           attName != ($clinit_87() , XML_LANG);
 21593           break;
 21594         case 1:
 21595           $fatal_1(treeBuilder, 'Attribute \u201C' + name + '\u201D is not serializable as XML 1.0.');
 21596       }
 21597     }
 21598   }
 21599 }
 21600 
 21601 function getClass_53(){
 21602   return Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit;
 21603 }
 21604 
 21605 function HtmlAttributes(){
 21606 }
 21607 
 21608 _ = HtmlAttributes.prototype = new Object_0();
 21609 _.getClass$ = getClass_53;
 21610 _.typeId$ = 0;
 21611 _.length_0 = 0;
 21612 _.mode = 0;
 21613 _.names = null;
 21614 _.values = null;
 21615 _.xmlnsLength = 0;
 21616 _.xmlnsNames = null;
 21617 _.xmlnsValues = null;
 21618 var EMPTY_ATTRIBUTENAMES, EMPTY_ATTRIBUTES, EMPTY_STRINGS;
 21619 function $LocatorImpl(this$static, locator){
 21620   $getColumnNumber(locator);
 21621   $getLineNumber(locator);
 21622   return this$static;
 21623 }
 21624 
 21625 function getClass_54(){
 21626   return Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit;
 21627 }
 21628 
 21629 function LocatorImpl(){
 21630 }
 21631 
 21632 _ = LocatorImpl.prototype = new Object_0();
 21633 _.getClass$ = getClass_54;
 21634 _.typeId$ = 0;
 21635 function $clinit_93(){
 21636   $clinit_93 = nullMethod;
 21637   HEX_TABLE = $toCharArray('0123456789ABCDEF');
 21638 }
 21639 
 21640 function appendUHexTo(sb, c){
 21641   var i;
 21642   $append_0(sb, 'U');
 21643   for (i = 0; i < 6; ++i) {
 21644     $append_0(sb, String.fromCharCode(HEX_TABLE[(c & 15728640) >> 20]));
 21645     c <<= 4;
 21646   }
 21647 }
 21648 
 21649 function escapeName(str){
 21650   $clinit_93();
 21651   var c, i, next, sb;
 21652   sb = $StringBuilder(new StringBuilder());
 21653   for (i = 0; i < str.length; ++i) {
 21654     c = str.charCodeAt(i);
 21655     if ((c & 64512) == 55296) {
 21656       next = str.charCodeAt(++i);
 21657       appendUHexTo(sb, (c << 10) + next + -56613888);
 21658     }
 21659      else if (i == 0 && !(c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95)) {
 21660       appendUHexTo(sb, c);
 21661     }
 21662      else if (i != 0 && !(c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542)) {
 21663       appendUHexTo(sb, c);
 21664     }
 21665      else {
 21666       $append_0(sb, String.fromCharCode(c));
 21667     }
 21668   }
 21669   return String($toString_0(sb));
 21670 }
 21671 
 21672 function isNCName(str){
 21673   $clinit_93();
 21674   var i, len;
 21675   if (str == null) {
 21676     return false;
 21677   }
 21678    else {
 21679     len = str.length;
 21680     switch (len) {
 21681       case 0:
 21682         return false;
 21683       case 1:
 21684         return isNCNameStart(str.charCodeAt(0));
 21685       default:if (!isNCNameStart(str.charCodeAt(0))) {
 21686           return false;
 21687         }
 21688 
 21689         for (i = 1; i < len; ++i) {
 21690           if (!isNCNameTrail(str.charCodeAt(i))) {
 21691             return false;
 21692           }
 21693         }
 21694 
 21695     }
 21696     return true;
 21697   }
 21698 }
 21699 
 21700 function isNCNameStart(c){
 21701   return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95;
 21702 }
 21703 
 21704 function isNCNameTrail(c){
 21705   return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542;
 21706 }
 21707 
 21708 var HEX_TABLE;
 21709 function $clinit_94(){
 21710   $clinit_94 = nullMethod;
 21711   NAMES = initValues(_3_3C_classLit, 52, 12, [$toCharArray('AElig'), $toCharArray('AElig;'), $toCharArray('AMP'), $toCharArray('AMP;'), $toCharArray('Aacute'), $toCharArray('Aacute;'), $toCharArray('Abreve;'), $toCharArray('Acirc'), $toCharArray('Acirc;'), $toCharArray('Acy;'), $toCharArray('Afr;'), $toCharArray('Agrave'), $toCharArray('Agrave;'), $toCharArray('Alpha;'), $toCharArray('Amacr;'), $toCharArray('And;'), $toCharArray('Aogon;'), $toCharArray('Aopf;'), $toCharArray('ApplyFunction;'), $toCharArray('Aring'), $toCharArray('Aring;'), $toCharArray('Ascr;'), $toCharArray('Assign;'), $toCharArray('Atilde'), $toCharArray('Atilde;'), $toCharArray('Auml'), $toCharArray('Auml;'), $toCharArray('Backslash;'), $toCharArray('Barv;'), $toCharArray('Barwed;'), $toCharArray('Bcy;'), $toCharArray('Because;'), $toCharArray('Bernoullis;'), $toCharArray('Beta;'), $toCharArray('Bfr;'), $toCharArray('Bopf;'), $toCharArray('Breve;'), $toCharArray('Bscr;'), $toCharArray('Bumpeq;'), $toCharArray('CHcy;'), $toCharArray('COPY'), $toCharArray('COPY;'), $toCharArray('Cacute;'), $toCharArray('Cap;'), $toCharArray('CapitalDifferentialD;'), $toCharArray('Cayleys;'), $toCharArray('Ccaron;'), $toCharArray('Ccedil'), $toCharArray('Ccedil;'), $toCharArray('Ccirc;'), $toCharArray('Cconint;'), $toCharArray('Cdot;'), $toCharArray('Cedilla;'), $toCharArray('CenterDot;'), $toCharArray('Cfr;'), $toCharArray('Chi;'), $toCharArray('CircleDot;'), $toCharArray('CircleMinus;'), $toCharArray('CirclePlus;'), $toCharArray('CircleTimes;'), $toCharArray('ClockwiseContourIntegral;'), $toCharArray('CloseCurlyDoubleQuote;'), $toCharArray('CloseCurlyQuote;'), $toCharArray('Colon;'), $toCharArray('Colone;'), $toCharArray('Congruent;'), $toCharArray('Conint;'), $toCharArray('ContourIntegral;'), $toCharArray('Copf;'), $toCharArray('Coproduct;'), $toCharArray('CounterClockwiseContourIntegral;'), $toCharArray('Cross;'), $toCharArray('Cscr;'), $toCharArray('Cup;'), $toCharArray('CupCap;'), $toCharArray('DD;'), $toCharArray('DDotrahd;'), $toCharArray('DJcy;'), $toCharArray('DScy;'), $toCharArray('DZcy;'), $toCharArray('Dagger;'), $toCharArray('Darr;'), $toCharArray('Dashv;'), $toCharArray('Dcaron;'), $toCharArray('Dcy;'), $toCharArray('Del;'), $toCharArray('Delta;'), $toCharArray('Dfr;'), $toCharArray('DiacriticalAcute;'), $toCharArray('DiacriticalDot;'), $toCharArray('DiacriticalDoubleAcute;'), $toCharArray('DiacriticalGrave;'), $toCharArray('DiacriticalTilde;'), $toCharArray('Diamond;'), $toCharArray('DifferentialD;'), $toCharArray('Dopf;'), $toCharArray('Dot;'), $toCharArray('DotDot;'), $toCharArray('DotEqual;'), $toCharArray('DoubleContourIntegral;'), $toCharArray('DoubleDot;'), $toCharArray('DoubleDownArrow;'), $toCharArray('DoubleLeftArrow;'), $toCharArray('DoubleLeftRightArrow;'), $toCharArray('DoubleLeftTee;'), $toCharArray('DoubleLongLeftArrow;'), $toCharArray('DoubleLongLeftRightArrow;'), $toCharArray('DoubleLongRightArrow;'), $toCharArray('DoubleRightArrow;'), $toCharArray('DoubleRightTee;'), $toCharArray('DoubleUpArrow;'), $toCharArray('DoubleUpDownArrow;'), $toCharArray('DoubleVerticalBar;'), $toCharArray('DownArrow;'), $toCharArray('DownArrowBar;'), $toCharArray('DownArrowUpArrow;'), $toCharArray('DownBreve;'), $toCharArray('DownLeftRightVector;'), $toCharArray('DownLeftTeeVector;'), $toCharArray('DownLeftVector;'), $toCharArray('DownLeftVectorBar;'), $toCharArray('DownRightTeeVector;'), $toCharArray('DownRightVector;'), $toCharArray('DownRightVectorBar;'), $toCharArray('DownTee;'), $toCharArray('DownTeeArrow;'), $toCharArray('Downarrow;'), $toCharArray('Dscr;'), $toCharArray('Dstrok;'), $toCharArray('ENG;'), $toCharArray('ETH'), $toCharArray('ETH;'), $toCharArray('Eacute'), $toCharArray('Eacute;'), $toCharArray('Ecaron;'), $toCharArray('Ecirc'), $toCharArray('Ecirc;'), $toCharArray('Ecy;'), $toCharArray('Edot;'), $toCharArray('Efr;'), $toCharArray('Egrave'), $toCharArray('Egrave;'), $toCharArray('Element;'), $toCharArray('Emacr;'), $toCharArray('EmptySmallSquare;'), $toCharArray('EmptyVerySmallSquare;'), $toCharArray('Eogon;'), $toCharArray('Eopf;'), $toCharArray('Epsilon;'), $toCharArray('Equal;'), $toCharArray('EqualTilde;'), $toCharArray('Equilibrium;'), $toCharArray('Escr;'), $toCharArray('Esim;'), $toCharArray('Eta;'), $toCharArray('Euml'), $toCharArray('Euml;'), $toCharArray('Exists;'), $toCharArray('ExponentialE;'), $toCharArray('Fcy;'), $toCharArray('Ffr;'), $toCharArray('FilledSmallSquare;'), $toCharArray('FilledVerySmallSquare;'), $toCharArray('Fopf;'), $toCharArray('ForAll;'), $toCharArray('Fouriertrf;'), $toCharArray('Fscr;'), $toCharArray('GJcy;'), $toCharArray('GT'), $toCharArray('GT;'), $toCharArray('Gamma;'), $toCharArray('Gammad;'), $toCharArray('Gbreve;'), $toCharArray('Gcedil;'), $toCharArray('Gcirc;'), $toCharArray('Gcy;'), $toCharArray('Gdot;'), $toCharArray('Gfr;'), $toCharArray('Gg;'), $toCharArray('Gopf;'), $toCharArray('GreaterEqual;'), $toCharArray('GreaterEqualLess;'), $toCharArray('GreaterFullEqual;'), $toCharArray('GreaterGreater;'), $toCharArray('GreaterLess;'), $toCharArray('GreaterSlantEqual;'), $toCharArray('GreaterTilde;'), $toCharArray('Gscr;'), $toCharArray('Gt;'), $toCharArray('HARDcy;'), $toCharArray('Hacek;'), $toCharArray('Hat;'), $toCharArray('Hcirc;'), $toCharArray('Hfr;'), $toCharArray('HilbertSpace;'), $toCharArray('Hopf;'), $toCharArray('HorizontalLine;'), $toCharArray('Hscr;'), $toCharArray('Hstrok;'), $toCharArray('HumpDownHump;'), $toCharArray('HumpEqual;'), $toCharArray('IEcy;'), $toCharArray('IJlig;'), $toCharArray('IOcy;'), $toCharArray('Iacute'), $toCharArray('Iacute;'), $toCharArray('Icirc'), $toCharArray('Icirc;'), $toCharArray('Icy;'), $toCharArray('Idot;'), $toCharArray('Ifr;'), $toCharArray('Igrave'), $toCharArray('Igrave;'), $toCharArray('Im;'), $toCharArray('Imacr;'), $toCharArray('ImaginaryI;'), $toCharArray('Implies;'), $toCharArray('Int;'), $toCharArray('Integral;'), $toCharArray('Intersection;'), $toCharArray('InvisibleComma;'), $toCharArray('InvisibleTimes;'), $toCharArray('Iogon;'), $toCharArray('Iopf;'), $toCharArray('Iota;'), $toCharArray('Iscr;'), $toCharArray('Itilde;'), $toCharArray('Iukcy;'), $toCharArray('Iuml'), $toCharArray('Iuml;'), $toCharArray('Jcirc;'), $toCharArray('Jcy;'), $toCharArray('Jfr;'), $toCharArray('Jopf;'), $toCharArray('Jscr;'), $toCharArray('Jsercy;'), $toCharArray('Jukcy;'), $toCharArray('KHcy;'), $toCharArray('KJcy;'), $toCharArray('Kappa;'), $toCharArray('Kcedil;'), $toCharArray('Kcy;'), $toCharArray('Kfr;'), $toCharArray('Kopf;'), $toCharArray('Kscr;'), $toCharArray('LJcy;'), $toCharArray('LT'), $toCharArray('LT;'), $toCharArray('Lacute;'), $toCharArray('Lambda;'), $toCharArray('Lang;'), $toCharArray('Laplacetrf;'), $toCharArray('Larr;'), $toCharArray('Lcaron;'), $toCharArray('Lcedil;'), $toCharArray('Lcy;'), $toCharArray('LeftAngleBracket;'), $toCharArray('LeftArrow;'), $toCharArray('LeftArrowBar;'), $toCharArray('LeftArrowRightArrow;'), $toCharArray('LeftCeiling;'), $toCharArray('LeftDoubleBracket;'), $toCharArray('LeftDownTeeVector;'), $toCharArray('LeftDownVector;'), $toCharArray('LeftDownVectorBar;'), $toCharArray('LeftFloor;'), $toCharArray('LeftRightArrow;'), $toCharArray('LeftRightVector;'), $toCharArray('LeftTee;'), $toCharArray('LeftTeeArrow;'), $toCharArray('LeftTeeVector;'), $toCharArray('LeftTriangle;'), $toCharArray('LeftTriangleBar;'), $toCharArray('LeftTriangleEqual;'), $toCharArray('LeftUpDownVector;'), $toCharArray('LeftUpTeeVector;'), $toCharArray('LeftUpVector;'), $toCharArray('LeftUpVectorBar;'), $toCharArray('LeftVector;'), $toCharArray('LeftVectorBar;'), $toCharArray('Leftarrow;'), $toCharArray('Leftrightarrow;'), $toCharArray('LessEqualGreater;'), $toCharArray('LessFullEqual;'), $toCharArray('LessGreater;'), $toCharArray('LessLess;'), $toCharArray('LessSlantEqual;'), $toCharArray('LessTilde;'), $toCharArray('Lfr;'), $toCharArray('Ll;'), $toCharArray('Lleftarrow;'), $toCharArray('Lmidot;'), $toCharArray('LongLeftArrow;'), $toCharArray('LongLeftRightArrow;'), $toCharArray('LongRightArrow;'), $toCharArray('Longleftarrow;'), $toCharArray('Longleftrightarrow;'), $toCharArray('Longrightarrow;'), $toCharArray('Lopf;'), $toCharArray('LowerLeftArrow;'), $toCharArray('LowerRightArrow;'), $toCharArray('Lscr;'), $toCharArray('Lsh;'), $toCharArray('Lstrok;'), $toCharArray('Lt;'), $toCharArray('Map;'), $toCharArray('Mcy;'), $toCharArray('MediumSpace;'), $toCharArray('Mellintrf;'), $toCharArray('Mfr;'), $toCharArray('MinusPlus;'), $toCharArray('Mopf;'), $toCharArray('Mscr;'), $toCharArray('Mu;'), $toCharArray('NJcy;'), $toCharArray('Nacute;'), $toCharArray('Ncaron;'), $toCharArray('Ncedil;'), $toCharArray('Ncy;'), $toCharArray('NegativeMediumSpace;'), $toCharArray('NegativeThickSpace;'), $toCharArray('NegativeThinSpace;'), $toCharArray('NegativeVeryThinSpace;'), $toCharArray('NestedGreaterGreater;'), $toCharArray('NestedLessLess;'), $toCharArray('NewLine;'), $toCharArray('Nfr;'), $toCharArray('NoBreak;'), $toCharArray('NonBreakingSpace;'), $toCharArray('Nopf;'), $toCharArray('Not;'), $toCharArray('NotCongruent;'), $toCharArray('NotCupCap;'), $toCharArray('NotDoubleVerticalBar;'), $toCharArray('NotElement;'), $toCharArray('NotEqual;'), $toCharArray('NotExists;'), $toCharArray('NotGreater;'), $toCharArray('NotGreaterEqual;'), $toCharArray('NotGreaterLess;'), $toCharArray('NotGreaterTilde;'), $toCharArray('NotLeftTriangle;'), $toCharArray('NotLeftTriangleEqual;'), $toCharArray('NotLess;'), $toCharArray('NotLessEqual;'), $toCharArray('NotLessGreater;'), $toCharArray('NotLessTilde;'), $toCharArray('NotPrecedes;'), $toCharArray('NotPrecedesSlantEqual;'), $toCharArray('NotReverseElement;'), $toCharArray('NotRightTriangle;'), $toCharArray('NotRightTriangleEqual;'), $toCharArray('NotSquareSubsetEqual;'), $toCharArray('NotSquareSupersetEqual;'), $toCharArray('NotSubsetEqual;'), $toCharArray('NotSucceeds;'), $toCharArray('NotSucceedsSlantEqual;'), $toCharArray('NotSupersetEqual;'), $toCharArray('NotTilde;'), $toCharArray('NotTildeEqual;'), $toCharArray('NotTildeFullEqual;'), $toCharArray('NotTildeTilde;'), $toCharArray('NotVerticalBar;'), $toCharArray('Nscr;'), $toCharArray('Ntilde'), $toCharArray('Ntilde;'), $toCharArray('Nu;'), $toCharArray('OElig;'), $toCharArray('Oacute'), $toCharArray('Oacute;'), $toCharArray('Ocirc'), $toCharArray('Ocirc;'), $toCharArray('Ocy;'), $toCharArray('Odblac;'), $toCharArray('Ofr;'), $toCharArray('Ograve'), $toCharArray('Ograve;'), $toCharArray('Omacr;'), $toCharArray('Omega;'), $toCharArray('Omicron;'), $toCharArray('Oopf;'), $toCharArray('OpenCurlyDoubleQuote;'), $toCharArray('OpenCurlyQuote;'), $toCharArray('Or;'), $toCharArray('Oscr;'), $toCharArray('Oslash'), $toCharArray('Oslash;'), $toCharArray('Otilde'), $toCharArray('Otilde;'), $toCharArray('Otimes;'), $toCharArray('Ouml'), $toCharArray('Ouml;'), $toCharArray('OverBar;'), $toCharArray('OverBrace;'), $toCharArray('OverBracket;'), $toCharArray('OverParenthesis;'), $toCharArray('PartialD;'), $toCharArray('Pcy;'), $toCharArray('Pfr;'), $toCharArray('Phi;'), $toCharArray('Pi;'), $toCharArray('PlusMinus;'), $toCharArray('Poincareplane;'), $toCharArray('Popf;'), $toCharArray('Pr;'), $toCharArray('Precedes;'), $toCharArray('PrecedesEqual;'), $toCharArray('PrecedesSlantEqual;'), $toCharArray('PrecedesTilde;'), $toCharArray('Prime;'), $toCharArray('Product;'), $toCharArray('Proportion;'), $toCharArray('Proportional;'), $toCharArray('Pscr;'), $toCharArray('Psi;'), $toCharArray('QUOT'), $toCharArray('QUOT;'), $toCharArray('Qfr;'), $toCharArray('Qopf;'), $toCharArray('Qscr;'), $toCharArray('RBarr;'), $toCharArray('REG'), $toCharArray('REG;'), $toCharArray('Racute;'), $toCharArray('Rang;'), $toCharArray('Rarr;'), $toCharArray('Rarrtl;'), $toCharArray('Rcaron;'), $toCharArray('Rcedil;'), $toCharArray('Rcy;'), $toCharArray('Re;'), $toCharArray('ReverseElement;'), $toCharArray('ReverseEquilibrium;'), $toCharArray('ReverseUpEquilibrium;'), $toCharArray('Rfr;'), $toCharArray('Rho;'), $toCharArray('RightAngleBracket;'), $toCharArray('RightArrow;'), $toCharArray('RightArrowBar;'), $toCharArray('RightArrowLeftArrow;'), $toCharArray('RightCeiling;'), $toCharArray('RightDoubleBracket;'), $toCharArray('RightDownTeeVector;'), $toCharArray('RightDownVector;'), $toCharArray('RightDownVectorBar;'), $toCharArray('RightFloor;'), $toCharArray('RightTee;'), $toCharArray('RightTeeArrow;'), $toCharArray('RightTeeVector;'), $toCharArray('RightTriangle;'), $toCharArray('RightTriangleBar;'), $toCharArray('RightTriangleEqual;'), $toCharArray('RightUpDownVector;'), $toCharArray('RightUpTeeVector;'), $toCharArray('RightUpVector;'), $toCharArray('RightUpVectorBar;'), $toCharArray('RightVector;'), $toCharArray('RightVectorBar;'), $toCharArray('Rightarrow;'), $toCharArray('Ropf;'), $toCharArray('RoundImplies;'), $toCharArray('Rrightarrow;'), $toCharArray('Rscr;'), $toCharArray('Rsh;'), $toCharArray('RuleDelayed;'), $toCharArray('SHCHcy;'), $toCharArray('SHcy;'), $toCharArray('SOFTcy;'), $toCharArray('Sacute;'), $toCharArray('Sc;'), $toCharArray('Scaron;'), $toCharArray('Scedil;'), $toCharArray('Scirc;'), $toCharArray('Scy;'), $toCharArray('Sfr;'), $toCharArray('ShortDownArrow;'), $toCharArray('ShortLeftArrow;'), $toCharArray('ShortRightArrow;'), $toCharArray('ShortUpArrow;'), $toCharArray('Sigma;'), $toCharArray('SmallCircle;'), $toCharArray('Sopf;'), $toCharArray('Sqrt;'), $toCharArray('Square;'), $toCharArray('SquareIntersection;'), $toCharArray('SquareSubset;'), $toCharArray('SquareSubsetEqual;'), $toCharArray('SquareSuperset;'), $toCharArray('SquareSupersetEqual;'), $toCharArray('SquareUnion;'), $toCharArray('Sscr;'), $toCharArray('Star;'), $toCharArray('Sub;'), $toCharArray('Subset;'), $toCharArray('SubsetEqual;'), $toCharArray('Succeeds;'), $toCharArray('SucceedsEqual;'), $toCharArray('SucceedsSlantEqual;'), $toCharArray('SucceedsTilde;'), $toCharArray('SuchThat;'), $toCharArray('Sum;'), $toCharArray('Sup;'), $toCharArray('Superset;'), $toCharArray('SupersetEqual;'), $toCharArray('Supset;'), $toCharArray('THORN'), $toCharArray('THORN;'), $toCharArray('TRADE;'), $toCharArray('TSHcy;'), $toCharArray('TScy;'), $toCharArray('Tab;'), $toCharArray('Tau;'), $toCharArray('Tcaron;'), $toCharArray('Tcedil;'), $toCharArray('Tcy;'), $toCharArray('Tfr;'), $toCharArray('Therefore;'), $toCharArray('Theta;'), $toCharArray('ThinSpace;'), $toCharArray('Tilde;'), $toCharArray('TildeEqual;'), $toCharArray('TildeFullEqual;'), $toCharArray('TildeTilde;'), $toCharArray('Topf;'), $toCharArray('TripleDot;'), $toCharArray('Tscr;'), $toCharArray('Tstrok;'), $toCharArray('Uacute'), $toCharArray('Uacute;'), $toCharArray('Uarr;'), $toCharArray('Uarrocir;'), $toCharArray('Ubrcy;'), $toCharArray('Ubreve;'), $toCharArray('Ucirc'), $toCharArray('Ucirc;'), $toCharArray('Ucy;'), $toCharArray('Udblac;'), $toCharArray('Ufr;'), $toCharArray('Ugrave'), $toCharArray('Ugrave;'), $toCharArray('Umacr;'), $toCharArray('UnderBar;'), $toCharArray('UnderBrace;'), $toCharArray('UnderBracket;'), $toCharArray('UnderParenthesis;'), $toCharArray('Union;'), $toCharArray('UnionPlus;'), $toCharArray('Uogon;'), $toCharArray('Uopf;'), $toCharArray('UpArrow;'), $toCharArray('UpArrowBar;'), $toCharArray('UpArrowDownArrow;'), $toCharArray('UpDownArrow;'), $toCharArray('UpEquilibrium;'), $toCharArray('UpTee;'), $toCharArray('UpTeeArrow;'), $toCharArray('Uparrow;'), $toCharArray('Updownarrow;'), $toCharArray('UpperLeftArrow;'), $toCharArray('UpperRightArrow;'), $toCharArray('Upsi;'), $toCharArray('Upsilon;'), $toCharArray('Uring;'), $toCharArray('Uscr;'), $toCharArray('Utilde;'), $toCharArray('Uuml'), $toCharArray('Uuml;'), $toCharArray('VDash;'), $toCharArray('Vbar;'), $toCharArray('Vcy;'), $toCharArray('Vdash;'), $toCharArray('Vdashl;'), $toCharArray('Vee;'), $toCharArray('Verbar;'), $toCharArray('Vert;'), $toCharArray('VerticalBar;'), $toCharArray('VerticalLine;'), $toCharArray('VerticalSeparator;'), $toCharArray('VerticalTilde;'), $toCharArray('VeryThinSpace;'), $toCharArray('Vfr;'), $toCharArray('Vopf;'), $toCharArray('Vscr;'), $toCharArray('Vvdash;'), $toCharArray('Wcirc;'), $toCharArray('Wedge;'), $toCharArray('Wfr;'), $toCharArray('Wopf;'), $toCharArray('Wscr;'), $toCharArray('Xfr;'), $toCharArray('Xi;'), $toCharArray('Xopf;'), $toCharArray('Xscr;'), $toCharArray('YAcy;'), $toCharArray('YIcy;'), $toCharArray('YUcy;'), $toCharArray('Yacute'), $toCharArray('Yacute;'), $toCharArray('Ycirc;'), $toCharArray('Ycy;'), $toCharArray('Yfr;'), $toCharArray('Yopf;'), $toCharArray('Yscr;'), $toCharArray('Yuml;'), $toCharArray('ZHcy;'), $toCharArray('Zacute;'), $toCharArray('Zcaron;'), $toCharArray('Zcy;'), $toCharArray('Zdot;'), $toCharArray('ZeroWidthSpace;'), $toCharArray('Zeta;'), $toCharArray('Zfr;'), $toCharArray('Zopf;'), $toCharArray('Zscr;'), $toCharArray('aacute'), $toCharArray('aacute;'), $toCharArray('abreve;'), $toCharArray('ac;'), $toCharArray('acd;'), $toCharArray('acirc'), $toCharArray('acirc;'), $toCharArray('acute'), $toCharArray('acute;'), $toCharArray('acy;'), $toCharArray('aelig'), $toCharArray('aelig;'), $toCharArray('af;'), $toCharArray('afr;'), $toCharArray('agrave'), $toCharArray('agrave;'), $toCharArray('alefsym;'), $toCharArray('aleph;'), $toCharArray('alpha;'), $toCharArray('amacr;'), $toCharArray('amalg;'), $toCharArray('amp'), $toCharArray('amp;'), $toCharArray('and;'), $toCharArray('andand;'), $toCharArray('andd;'), $toCharArray('andslope;'), $toCharArray('andv;'), $toCharArray('ang;'), $toCharArray('ange;'), $toCharArray('angle;'), $toCharArray('angmsd;'), $toCharArray('angmsdaa;'), $toCharArray('angmsdab;'), $toCharArray('angmsdac;'), $toCharArray('angmsdad;'), $toCharArray('angmsdae;'), $toCharArray('angmsdaf;'), $toCharArray('angmsdag;'), $toCharArray('angmsdah;'), $toCharArray('angrt;'), $toCharArray('angrtvb;'), $toCharArray('angrtvbd;'), $toCharArray('angsph;'), $toCharArray('angst;'), $toCharArray('angzarr;'), $toCharArray('aogon;'), $toCharArray('aopf;'), $toCharArray('ap;'), $toCharArray('apE;'), $toCharArray('apacir;'), $toCharArray('ape;'), $toCharArray('apid;'), $toCharArray('apos;'), $toCharArray('approx;'), $toCharArray('approxeq;'), $toCharArray('aring'), $toCharArray('aring;'), $toCharArray('ascr;'), $toCharArray('ast;'), $toCharArray('asymp;'), $toCharArray('asympeq;'), $toCharArray('atilde'), $toCharArray('atilde;'), $toCharArray('auml'), $toCharArray('auml;'), $toCharArray('awconint;'), $toCharArray('awint;'), $toCharArray('bNot;'), $toCharArray('backcong;'), $toCharArray('backepsilon;'), $toCharArray('backprime;'), $toCharArray('backsim;'), $toCharArray('backsimeq;'), $toCharArray('barvee;'), $toCharArray('barwed;'), $toCharArray('barwedge;'), $toCharArray('bbrk;'), $toCharArray('bbrktbrk;'), $toCharArray('bcong;'), $toCharArray('bcy;'), $toCharArray('bdquo;'), $toCharArray('becaus;'), $toCharArray('because;'), $toCharArray('bemptyv;'), $toCharArray('bepsi;'), $toCharArray('bernou;'), $toCharArray('beta;'), $toCharArray('beth;'), $toCharArray('between;'), $toCharArray('bfr;'), $toCharArray('bigcap;'), $toCharArray('bigcirc;'), $toCharArray('bigcup;'), $toCharArray('bigodot;'), $toCharArray('bigoplus;'), $toCharArray('bigotimes;'), $toCharArray('bigsqcup;'), $toCharArray('bigstar;'), $toCharArray('bigtriangledown;'), $toCharArray('bigtriangleup;'), $toCharArray('biguplus;'), $toCharArray('bigvee;'), $toCharArray('bigwedge;'), $toCharArray('bkarow;'), $toCharArray('blacklozenge;'), $toCharArray('blacksquare;'), $toCharArray('blacktriangle;'), $toCharArray('blacktriangledown;'), $toCharArray('blacktriangleleft;'), $toCharArray('blacktriangleright;'), $toCharArray('blank;'), $toCharArray('blk12;'), $toCharArray('blk14;'), $toCharArray('blk34;'), $toCharArray('block;'), $toCharArray('bnot;'), $toCharArray('bopf;'), $toCharArray('bot;'), $toCharArray('bottom;'), $toCharArray('bowtie;'), $toCharArray('boxDL;'), $toCharArray('boxDR;'), $toCharArray('boxDl;'), $toCharArray('boxDr;'), $toCharArray('boxH;'), $toCharArray('boxHD;'), $toCharArray('boxHU;'), $toCharArray('boxHd;'), $toCharArray('boxHu;'), $toCharArray('boxUL;'), $toCharArray('boxUR;'), $toCharArray('boxUl;'), $toCharArray('boxUr;'), $toCharArray('boxV;'), $toCharArray('boxVH;'), $toCharArray('boxVL;'), $toCharArray('boxVR;'), $toCharArray('boxVh;'), $toCharArray('boxVl;'), $toCharArray('boxVr;'), $toCharArray('boxbox;'), $toCharArray('boxdL;'), $toCharArray('boxdR;'), $toCharArray('boxdl;'), $toCharArray('boxdr;'), $toCharArray('boxh;'), $toCharArray('boxhD;'), $toCharArray('boxhU;'), $toCharArray('boxhd;'), $toCharArray('boxhu;'), $toCharArray('boxminus;'), $toCharArray('boxplus;'), $toCharArray('boxtimes;'), $toCharArray('boxuL;'), $toCharArray('boxuR;'), $toCharArray('boxul;'), $toCharArray('boxur;'), $toCharArray('boxv;'), $toCharArray('boxvH;'), $toCharArray('boxvL;'), $toCharArray('boxvR;'), $toCharArray('boxvh;'), $toCharArray('boxvl;'), $toCharArray('boxvr;'), $toCharArray('bprime;'), $toCharArray('breve;'), $toCharArray('brvbar'), $toCharArray('brvbar;'), $toCharArray('bscr;'), $toCharArray('bsemi;'), $toCharArray('bsim;'), $toCharArray('bsime;'), $toCharArray('bsol;'), $toCharArray('bsolb;'), $toCharArray('bull;'), $toCharArray('bullet;'), $toCharArray('bump;'), $toCharArray('bumpE;'), $toCharArray('bumpe;'), $toCharArray('bumpeq;'), $toCharArray('cacute;'), $toCharArray('cap;'), $toCharArray('capand;'), $toCharArray('capbrcup;'), $toCharArray('capcap;'), $toCharArray('capcup;'), $toCharArray('capdot;'), $toCharArray('caret;'), $toCharArray('caron;'), $toCharArray('ccaps;'), $toCharArray('ccaron;'), $toCharArray('ccedil'), $toCharArray('ccedil;'), $toCharArray('ccirc;'), $toCharArray('ccups;'), $toCharArray('ccupssm;'), $toCharArray('cdot;'), $toCharArray('cedil'), $toCharArray('cedil;'), $toCharArray('cemptyv;'), $toCharArray('cent'), $toCharArray('cent;'), $toCharArray('centerdot;'), $toCharArray('cfr;'), $toCharArray('chcy;'), $toCharArray('check;'), $toCharArray('checkmark;'), $toCharArray('chi;'), $toCharArray('cir;'), $toCharArray('cirE;'), $toCharArray('circ;'), $toCharArray('circeq;'), $toCharArray('circlearrowleft;'), $toCharArray('circlearrowright;'), $toCharArray('circledR;'), $toCharArray('circledS;'), $toCharArray('circledast;'), $toCharArray('circledcirc;'), $toCharArray('circleddash;'), $toCharArray('cire;'), $toCharArray('cirfnint;'), $toCharArray('cirmid;'), $toCharArray('cirscir;'), $toCharArray('clubs;'), $toCharArray('clubsuit;'), $toCharArray('colon;'), $toCharArray('colone;'), $toCharArray('coloneq;'), $toCharArray('comma;'), $toCharArray('commat;'), $toCharArray('comp;'), $toCharArray('compfn;'), $toCharArray('complement;'), $toCharArray('complexes;'), $toCharArray('cong;'), $toCharArray('congdot;'), $toCharArray('conint;'), $toCharArray('copf;'), $toCharArray('coprod;'), $toCharArray('copy'), $toCharArray('copy;'), $toCharArray('copysr;'), $toCharArray('crarr;'), $toCharArray('cross;'), $toCharArray('cscr;'), $toCharArray('csub;'), $toCharArray('csube;'), $toCharArray('csup;'), $toCharArray('csupe;'), $toCharArray('ctdot;'), $toCharArray('cudarrl;'), $toCharArray('cudarrr;'), $toCharArray('cuepr;'), $toCharArray('cuesc;'), $toCharArray('cularr;'), $toCharArray('cularrp;'), $toCharArray('cup;'), $toCharArray('cupbrcap;'), $toCharArray('cupcap;'), $toCharArray('cupcup;'), $toCharArray('cupdot;'), $toCharArray('cupor;'), $toCharArray('curarr;'), $toCharArray('curarrm;'), $toCharArray('curlyeqprec;'), $toCharArray('curlyeqsucc;'), $toCharArray('curlyvee;'), $toCharArray('curlywedge;'), $toCharArray('curren'), $toCharArray('curren;'), $toCharArray('curvearrowleft;'), $toCharArray('curvearrowright;'), $toCharArray('cuvee;'), $toCharArray('cuwed;'), $toCharArray('cwconint;'), $toCharArray('cwint;'), $toCharArray('cylcty;'), $toCharArray('dArr;'), $toCharArray('dHar;'), $toCharArray('dagger;'), $toCharArray('daleth;'), $toCharArray('darr;'), $toCharArray('dash;'), $toCharArray('dashv;'), $toCharArray('dbkarow;'), $toCharArray('dblac;'), $toCharArray('dcaron;'), $toCharArray('dcy;'), $toCharArray('dd;'), $toCharArray('ddagger;'), $toCharArray('ddarr;'), $toCharArray('ddotseq;'), $toCharArray('deg'), $toCharArray('deg;'), $toCharArray('delta;'), $toCharArray('demptyv;'), $toCharArray('dfisht;'), $toCharArray('dfr;'), $toCharArray('dharl;'), $toCharArray('dharr;'), $toCharArray('diam;'), $toCharArray('diamond;'), $toCharArray('diamondsuit;'), $toCharArray('diams;'), $toCharArray('die;'), $toCharArray('digamma;'), $toCharArray('disin;'), $toCharArray('div;'), $toCharArray('divide'), $toCharArray('divide;'), $toCharArray('divideontimes;'), $toCharArray('divonx;'), $toCharArray('djcy;'), $toCharArray('dlcorn;'), $toCharArray('dlcrop;'), $toCharArray('dollar;'), $toCharArray('dopf;'), $toCharArray('dot;'), $toCharArray('doteq;'), $toCharArray('doteqdot;'), $toCharArray('dotminus;'), $toCharArray('dotplus;'), $toCharArray('dotsquare;'), $toCharArray('doublebarwedge;'), $toCharArray('downarrow;'), $toCharArray('downdownarrows;'), $toCharArray('downharpoonleft;'), $toCharArray('downharpoonright;'), $toCharArray('drbkarow;'), $toCharArray('drcorn;'), $toCharArray('drcrop;'), $toCharArray('dscr;'), $toCharArray('dscy;'), $toCharArray('dsol;'), $toCharArray('dstrok;'), $toCharArray('dtdot;'), $toCharArray('dtri;'), $toCharArray('dtrif;'), $toCharArray('duarr;'), $toCharArray('duhar;'), $toCharArray('dwangle;'), $toCharArray('dzcy;'), $toCharArray('dzigrarr;'), $toCharArray('eDDot;'), $toCharArray('eDot;'), $toCharArray('eacute'), $toCharArray('eacute;'), $toCharArray('easter;'), $toCharArray('ecaron;'), $toCharArray('ecir;'), $toCharArray('ecirc'), $toCharArray('ecirc;'), $toCharArray('ecolon;'), $toCharArray('ecy;'), $toCharArray('edot;'), $toCharArray('ee;'), $toCharArray('efDot;'), $toCharArray('efr;'), $toCharArray('eg;'), $toCharArray('egrave'), $toCharArray('egrave;'), $toCharArray('egs;'), $toCharArray('egsdot;'), $toCharArray('el;'), $toCharArray('elinters;'), $toCharArray('ell;'), $toCharArray('els;'), $toCharArray('elsdot;'), $toCharArray('emacr;'), $toCharArray('empty;'), $toCharArray('emptyset;'), $toCharArray('emptyv;'), $toCharArray('emsp13;'), $toCharArray('emsp14;'), $toCharArray('emsp;'), $toCharArray('eng;'), $toCharArray('ensp;'), $toCharArray('eogon;'), $toCharArray('eopf;'), $toCharArray('epar;'), $toCharArray('eparsl;'), $toCharArray('eplus;'), $toCharArray('epsi;'), $toCharArray('epsilon;'), $toCharArray('epsiv;'), $toCharArray('eqcirc;'), $toCharArray('eqcolon;'), $toCharArray('eqsim;'), $toCharArray('eqslantgtr;'), $toCharArray('eqslantless;'), $toCharArray('equals;'), $toCharArray('equest;'), $toCharArray('equiv;'), $toCharArray('equivDD;'), $toCharArray('eqvparsl;'), $toCharArray('erDot;'), $toCharArray('erarr;'), $toCharArray('escr;'), $toCharArray('esdot;'), $toCharArray('esim;'), $toCharArray('eta;'), $toCharArray('eth'), $toCharArray('eth;'), $toCharArray('euml'), $toCharArray('euml;'), $toCharArray('euro;'), $toCharArray('excl;'), $toCharArray('exist;'), $toCharArray('expectation;'), $toCharArray('exponentiale;'), $toCharArray('fallingdotseq;'), $toCharArray('fcy;'), $toCharArray('female;'), $toCharArray('ffilig;'), $toCharArray('fflig;'), $toCharArray('ffllig;'), $toCharArray('ffr;'), $toCharArray('filig;'), $toCharArray('flat;'), $toCharArray('fllig;'), $toCharArray('fltns;'), $toCharArray('fnof;'), $toCharArray('fopf;'), $toCharArray('forall;'), $toCharArray('fork;'), $toCharArray('forkv;'), $toCharArray('fpartint;'), $toCharArray('frac12'), $toCharArray('frac12;'), $toCharArray('frac13;'), $toCharArray('frac14'), $toCharArray('frac14;'), $toCharArray('frac15;'), $toCharArray('frac16;'), $toCharArray('frac18;'), $toCharArray('frac23;'), $toCharArray('frac25;'), $toCharArray('frac34'), $toCharArray('frac34;'), $toCharArray('frac35;'), $toCharArray('frac38;'), $toCharArray('frac45;'), $toCharArray('frac56;'), $toCharArray('frac58;'), $toCharArray('frac78;'), $toCharArray('frasl;'), $toCharArray('frown;'), $toCharArray('fscr;'), $toCharArray('gE;'), $toCharArray('gEl;'), $toCharArray('gacute;'), $toCharArray('gamma;'), $toCharArray('gammad;'), $toCharArray('gap;'), $toCharArray('gbreve;'), $toCharArray('gcirc;'), $toCharArray('gcy;'), $toCharArray('gdot;'), $toCharArray('ge;'), $toCharArray('gel;'), $toCharArray('geq;'), $toCharArray('geqq;'), $toCharArray('geqslant;'), $toCharArray('ges;'), $toCharArray('gescc;'), $toCharArray('gesdot;'), $toCharArray('gesdoto;'), $toCharArray('gesdotol;'), $toCharArray('gesles;'), $toCharArray('gfr;'), $toCharArray('gg;'), $toCharArray('ggg;'), $toCharArray('gimel;'), $toCharArray('gjcy;'), $toCharArray('gl;'), $toCharArray('glE;'), $toCharArray('gla;'), $toCharArray('glj;'), $toCharArray('gnE;'), $toCharArray('gnap;'), $toCharArray('gnapprox;'), $toCharArray('gne;'), $toCharArray('gneq;'), $toCharArray('gneqq;'), $toCharArray('gnsim;'), $toCharArray('gopf;'), $toCharArray('grave;'), $toCharArray('gscr;'), $toCharArray('gsim;'), $toCharArray('gsime;'), $toCharArray('gsiml;'), $toCharArray('gt'), $toCharArray('gt;'), $toCharArray('gtcc;'), $toCharArray('gtcir;'), $toCharArray('gtdot;'), $toCharArray('gtlPar;'), $toCharArray('gtquest;'), $toCharArray('gtrapprox;'), $toCharArray('gtrarr;'), $toCharArray('gtrdot;'), $toCharArray('gtreqless;'), $toCharArray('gtreqqless;'), $toCharArray('gtrless;'), $toCharArray('gtrsim;'), $toCharArray('hArr;'), $toCharArray('hairsp;'), $toCharArray('half;'), $toCharArray('hamilt;'), $toCharArray('hardcy;'), $toCharArray('harr;'), $toCharArray('harrcir;'), $toCharArray('harrw;'), $toCharArray('hbar;'), $toCharArray('hcirc;'), $toCharArray('hearts;'), $toCharArray('heartsuit;'), $toCharArray('hellip;'), $toCharArray('hercon;'), $toCharArray('hfr;'), $toCharArray('hksearow;'), $toCharArray('hkswarow;'), $toCharArray('hoarr;'), $toCharArray('homtht;'), $toCharArray('hookleftarrow;'), $toCharArray('hookrightarrow;'), $toCharArray('hopf;'), $toCharArray('horbar;'), $toCharArray('hscr;'), $toCharArray('hslash;'), $toCharArray('hstrok;'), $toCharArray('hybull;'), $toCharArray('hyphen;'), $toCharArray('iacute'), $toCharArray('iacute;'), $toCharArray('ic;'), $toCharArray('icirc'), $toCharArray('icirc;'), $toCharArray('icy;'), $toCharArray('iecy;'), $toCharArray('iexcl'), $toCharArray('iexcl;'), $toCharArray('iff;'), $toCharArray('ifr;'), $toCharArray('igrave'), $toCharArray('igrave;'), $toCharArray('ii;'), $toCharArray('iiiint;'), $toCharArray('iiint;'), $toCharArray('iinfin;'), $toCharArray('iiota;'), $toCharArray('ijlig;'), $toCharArray('imacr;'), $toCharArray('image;'), $toCharArray('imagline;'), $toCharArray('imagpart;'), $toCharArray('imath;'), $toCharArray('imof;'), $toCharArray('imped;'), $toCharArray('in;'), $toCharArray('incare;'), $toCharArray('infin;'), $toCharArray('infintie;'), $toCharArray('inodot;'), $toCharArray('int;'), $toCharArray('intcal;'), $toCharArray('integers;'), $toCharArray('intercal;'), $toCharArray('intlarhk;'), $toCharArray('intprod;'), $toCharArray('iocy;'), $toCharArray('iogon;'), $toCharArray('iopf;'), $toCharArray('iota;'), $toCharArray('iprod;'), $toCharArray('iquest'), $toCharArray('iquest;'), $toCharArray('iscr;'), $toCharArray('isin;'), $toCharArray('isinE;'), $toCharArray('isindot;'), $toCharArray('isins;'), $toCharArray('isinsv;'), $toCharArray('isinv;'), $toCharArray('it;'), $toCharArray('itilde;'), $toCharArray('iukcy;'), $toCharArray('iuml'), $toCharArray('iuml;'), $toCharArray('jcirc;'), $toCharArray('jcy;'), $toCharArray('jfr;'), $toCharArray('jmath;'), $toCharArray('jopf;'), $toCharArray('jscr;'), $toCharArray('jsercy;'), $toCharArray('jukcy;'), $toCharArray('kappa;'), $toCharArray('kappav;'), $toCharArray('kcedil;'), $toCharArray('kcy;'), $toCharArray('kfr;'), $toCharArray('kgreen;'), $toCharArray('khcy;'), $toCharArray('kjcy;'), $toCharArray('kopf;'), $toCharArray('kscr;'), $toCharArray('lAarr;'), $toCharArray('lArr;'), $toCharArray('lAtail;'), $toCharArray('lBarr;'), $toCharArray('lE;'), $toCharArray('lEg;'), $toCharArray('lHar;'), $toCharArray('lacute;'), $toCharArray('laemptyv;'), $toCharArray('lagran;'), $toCharArray('lambda;'), $toCharArray('lang;'), $toCharArray('langd;'), $toCharArray('langle;'), $toCharArray('lap;'), $toCharArray('laquo'), $toCharArray('laquo;'), $toCharArray('larr;'), $toCharArray('larrb;'), $toCharArray('larrbfs;'), $toCharArray('larrfs;'), $toCharArray('larrhk;'), $toCharArray('larrlp;'), $toCharArray('larrpl;'), $toCharArray('larrsim;'), $toCharArray('larrtl;'), $toCharArray('lat;'), $toCharArray('latail;'), $toCharArray('late;'), $toCharArray('lbarr;'), $toCharArray('lbbrk;'), $toCharArray('lbrace;'), $toCharArray('lbrack;'), $toCharArray('lbrke;'), $toCharArray('lbrksld;'), $toCharArray('lbrkslu;'), $toCharArray('lcaron;'), $toCharArray('lcedil;'), $toCharArray('lceil;'), $toCharArray('lcub;'), $toCharArray('lcy;'), $toCharArray('ldca;'), $toCharArray('ldquo;'), $toCharArray('ldquor;'), $toCharArray('ldrdhar;'), $toCharArray('ldrushar;'), $toCharArray('ldsh;'), $toCharArray('le;'), $toCharArray('leftarrow;'), $toCharArray('leftarrowtail;'), $toCharArray('leftharpoondown;'), $toCharArray('leftharpoonup;'), $toCharArray('leftleftarrows;'), $toCharArray('leftrightarrow;'), $toCharArray('leftrightarrows;'), $toCharArray('leftrightharpoons;'), $toCharArray('leftrightsquigarrow;'), $toCharArray('leftthreetimes;'), $toCharArray('leg;'), $toCharArray('leq;'), $toCharArray('leqq;'), $toCharArray('leqslant;'), $toCharArray('les;'), $toCharArray('lescc;'), $toCharArray('lesdot;'), $toCharArray('lesdoto;'), $toCharArray('lesdotor;'), $toCharArray('lesges;'), $toCharArray('lessapprox;'), $toCharArray('lessdot;'), $toCharArray('lesseqgtr;'), $toCharArray('lesseqqgtr;'), $toCharArray('lessgtr;'), $toCharArray('lesssim;'), $toCharArray('lfisht;'), $toCharArray('lfloor;'), $toCharArray('lfr;'), $toCharArray('lg;'), $toCharArray('lgE;'), $toCharArray('lhard;'), $toCharArray('lharu;'), $toCharArray('lharul;'), $toCharArray('lhblk;'), $toCharArray('ljcy;'), $toCharArray('ll;'), $toCharArray('llarr;'), $toCharArray('llcorner;'), $toCharArray('llhard;'), $toCharArray('lltri;'), $toCharArray('lmidot;'), $toCharArray('lmoust;'), $toCharArray('lmoustache;'), $toCharArray('lnE;'), $toCharArray('lnap;'), $toCharArray('lnapprox;'), $toCharArray('lne;'), $toCharArray('lneq;'), $toCharArray('lneqq;'), $toCharArray('lnsim;'), $toCharArray('loang;'), $toCharArray('loarr;'), $toCharArray('lobrk;'), $toCharArray('longleftarrow;'), $toCharArray('longleftrightarrow;'), $toCharArray('longmapsto;'), $toCharArray('longrightarrow;'), $toCharArray('looparrowleft;'), $toCharArray('looparrowright;'), $toCharArray('lopar;'), $toCharArray('lopf;'), $toCharArray('loplus;'), $toCharArray('lotimes;'), $toCharArray('lowast;'), $toCharArray('lowbar;'), $toCharArray('loz;'), $toCharArray('lozenge;'), $toCharArray('lozf;'), $toCharArray('lpar;'), $toCharArray('lparlt;'), $toCharArray('lrarr;'), $toCharArray('lrcorner;'), $toCharArray('lrhar;'), $toCharArray('lrhard;'), $toCharArray('lrm;'), $toCharArray('lrtri;'), $toCharArray('lsaquo;'), $toCharArray('lscr;'), $toCharArray('lsh;'), $toCharArray('lsim;'), $toCharArray('lsime;'), $toCharArray('lsimg;'), $toCharArray('lsqb;'), $toCharArray('lsquo;'), $toCharArray('lsquor;'), $toCharArray('lstrok;'), $toCharArray('lt'), $toCharArray('lt;'), $toCharArray('ltcc;'), $toCharArray('ltcir;'), $toCharArray('ltdot;'), $toCharArray('lthree;'), $toCharArray('ltimes;'), $toCharArray('ltlarr;'), $toCharArray('ltquest;'), $toCharArray('ltrPar;'), $toCharArray('ltri;'), $toCharArray('ltrie;'), $toCharArray('ltrif;'), $toCharArray('lurdshar;'), $toCharArray('luruhar;'), $toCharArray('mDDot;'), $toCharArray('macr'), $toCharArray('macr;'), $toCharArray('male;'), $toCharArray('malt;'), $toCharArray('maltese;'), $toCharArray('map;'), $toCharArray('mapsto;'), $toCharArray('mapstodown;'), $toCharArray('mapstoleft;'), $toCharArray('mapstoup;'), $toCharArray('marker;'), $toCharArray('mcomma;'), $toCharArray('mcy;'), $toCharArray('mdash;'), $toCharArray('measuredangle;'), $toCharArray('mfr;'), $toCharArray('mho;'), $toCharArray('micro'), $toCharArray('micro;'), $toCharArray('mid;'), $toCharArray('midast;'), $toCharArray('midcir;'), $toCharArray('middot'), $toCharArray('middot;'), $toCharArray('minus;'), $toCharArray('minusb;'), $toCharArray('minusd;'), $toCharArray('minusdu;'), $toCharArray('mlcp;'), $toCharArray('mldr;'), $toCharArray('mnplus;'), $toCharArray('models;'), $toCharArray('mopf;'), $toCharArray('mp;'), $toCharArray('mscr;'), $toCharArray('mstpos;'), $toCharArray('mu;'), $toCharArray('multimap;'), $toCharArray('mumap;'), $toCharArray('nLeftarrow;'), $toCharArray('nLeftrightarrow;'), $toCharArray('nRightarrow;'), $toCharArray('nVDash;'), $toCharArray('nVdash;'), $toCharArray('nabla;'), $toCharArray('nacute;'), $toCharArray('nap;'), $toCharArray('napos;'), $toCharArray('napprox;'), $toCharArray('natur;'), $toCharArray('natural;'), $toCharArray('naturals;'), $toCharArray('nbsp'), $toCharArray('nbsp;'), $toCharArray('ncap;'), $toCharArray('ncaron;'), $toCharArray('ncedil;'), $toCharArray('ncong;'), $toCharArray('ncup;'), $toCharArray('ncy;'), $toCharArray('ndash;'), $toCharArray('ne;'), $toCharArray('neArr;'), $toCharArray('nearhk;'), $toCharArray('nearr;'), $toCharArray('nearrow;'), $toCharArray('nequiv;'), $toCharArray('nesear;'), $toCharArray('nexist;'), $toCharArray('nexists;'), $toCharArray('nfr;'), $toCharArray('nge;'), $toCharArray('ngeq;'), $toCharArray('ngsim;'), $toCharArray('ngt;'), $toCharArray('ngtr;'), $toCharArray('nhArr;'), $toCharArray('nharr;'), $toCharArray('nhpar;'), $toCharArray('ni;'), $toCharArray('nis;'), $toCharArray('nisd;'), $toCharArray('niv;'), $toCharArray('njcy;'), $toCharArray('nlArr;'), $toCharArray('nlarr;'), $toCharArray('nldr;'), $toCharArray('nle;'), $toCharArray('nleftarrow;'), $toCharArray('nleftrightarrow;'), $toCharArray('nleq;'), $toCharArray('nless;'), $toCharArray('nlsim;'), $toCharArray('nlt;'), $toCharArray('nltri;'), $toCharArray('nltrie;'), $toCharArray('nmid;'), $toCharArray('nopf;'), $toCharArray('not'), $toCharArray('not;'), $toCharArray('notin;'), $toCharArray('notinva;'), $toCharArray('notinvb;'), $toCharArray('notinvc;'), $toCharArray('notni;'), $toCharArray('notniva;'), $toCharArray('notnivb;'), $toCharArray('notnivc;'), $toCharArray('npar;'), $toCharArray('nparallel;'), $toCharArray('npolint;'), $toCharArray('npr;'), $toCharArray('nprcue;'), $toCharArray('nprec;'), $toCharArray('nrArr;'), $toCharArray('nrarr;'), $toCharArray('nrightarrow;'), $toCharArray('nrtri;'), $toCharArray('nrtrie;'), $toCharArray('nsc;'), $toCharArray('nsccue;'), $toCharArray('nscr;'), $toCharArray('nshortmid;'), $toCharArray('nshortparallel;'), $toCharArray('nsim;'), $toCharArray('nsime;'), $toCharArray('nsimeq;'), $toCharArray('nsmid;'), $toCharArray('nspar;'), $toCharArray('nsqsube;'), $toCharArray('nsqsupe;'), $toCharArray('nsub;'), $toCharArray('nsube;'), $toCharArray('nsubseteq;'), $toCharArray('nsucc;'), $toCharArray('nsup;'), $toCharArray('nsupe;'), $toCharArray('nsupseteq;'), $toCharArray('ntgl;'), $toCharArray('ntilde'), $toCharArray('ntilde;'), $toCharArray('ntlg;'), $toCharArray('ntriangleleft;'), $toCharArray('ntrianglelefteq;'), $toCharArray('ntriangleright;'), $toCharArray('ntrianglerighteq;'), $toCharArray('nu;'), $toCharArray('num;'), $toCharArray('numero;'), $toCharArray('numsp;'), $toCharArray('nvDash;'), $toCharArray('nvHarr;'), $toCharArray('nvdash;'), $toCharArray('nvinfin;'), $toCharArray('nvlArr;'), $toCharArray('nvrArr;'), $toCharArray('nwArr;'), $toCharArray('nwarhk;'), $toCharArray('nwarr;'), $toCharArray('nwarrow;'), $toCharArray('nwnear;'), $toCharArray('oS;'), $toCharArray('oacute'), $toCharArray('oacute;'), $toCharArray('oast;'), $toCharArray('ocir;'), $toCharArray('ocirc'), $toCharArray('ocirc;'), $toCharArray('ocy;'), $toCharArray('odash;'), $toCharArray('odblac;'), $toCharArray('odiv;'), $toCharArray('odot;'), $toCharArray('odsold;'), $toCharArray('oelig;'), $toCharArray('ofcir;'), $toCharArray('ofr;'), $toCharArray('ogon;'), $toCharArray('ograve'), $toCharArray('ograve;'), $toCharArray('ogt;'), $toCharArray('ohbar;'), $toCharArray('ohm;'), $toCharArray('oint;'), $toCharArray('olarr;'), $toCharArray('olcir;'), $toCharArray('olcross;'), $toCharArray('oline;'), $toCharArray('olt;'), $toCharArray('omacr;'), $toCharArray('omega;'), $toCharArray('omicron;'), $toCharArray('omid;'), $toCharArray('ominus;'), $toCharArray('oopf;'), $toCharArray('opar;'), $toCharArray('operp;'), $toCharArray('oplus;'), $toCharArray('or;'), $toCharArray('orarr;'), $toCharArray('ord;'), $toCharArray('order;'), $toCharArray('orderof;'), $toCharArray('ordf'), $toCharArray('ordf;'), $toCharArray('ordm'), $toCharArray('ordm;'), $toCharArray('origof;'), $toCharArray('oror;'), $toCharArray('orslope;'), $toCharArray('orv;'), $toCharArray('oscr;'), $toCharArray('oslash'), $toCharArray('oslash;'), $toCharArray('osol;'), $toCharArray('otilde'), $toCharArray('otilde;'), $toCharArray('otimes;'), $toCharArray('otimesas;'), $toCharArray('ouml'), $toCharArray('ouml;'), $toCharArray('ovbar;'), $toCharArray('par;'), $toCharArray('para'), $toCharArray('para;'), $toCharArray('parallel;'), $toCharArray('parsim;'), $toCharArray('parsl;'), $toCharArray('part;'), $toCharArray('pcy;'), $toCharArray('percnt;'), $toCharArray('period;'), $toCharArray('permil;'), $toCharArray('perp;'), $toCharArray('pertenk;'), $toCharArray('pfr;'), $toCharArray('phi;'), $toCharArray('phiv;'), $toCharArray('phmmat;'), $toCharArray('phone;'), $toCharArray('pi;'), $toCharArray('pitchfork;'), $toCharArray('piv;'), $toCharArray('planck;'), $toCharArray('planckh;'), $toCharArray('plankv;'), $toCharArray('plus;'), $toCharArray('plusacir;'), $toCharArray('plusb;'), $toCharArray('pluscir;'), $toCharArray('plusdo;'), $toCharArray('plusdu;'), $toCharArray('pluse;'), $toCharArray('plusmn'), $toCharArray('plusmn;'), $toCharArray('plussim;'), $toCharArray('plustwo;'), $toCharArray('pm;'), $toCharArray('pointint;'), $toCharArray('popf;'), $toCharArray('pound'), $toCharArray('pound;'), $toCharArray('pr;'), $toCharArray('prE;'), $toCharArray('prap;'), $toCharArray('prcue;'), $toCharArray('pre;'), $toCharArray('prec;'), $toCharArray('precapprox;'), $toCharArray('preccurlyeq;'), $toCharArray('preceq;'), $toCharArray('precnapprox;'), $toCharArray('precneqq;'), $toCharArray('precnsim;'), $toCharArray('precsim;'), $toCharArray('prime;'), $toCharArray('primes;'), $toCharArray('prnE;'), $toCharArray('prnap;'), $toCharArray('prnsim;'), $toCharArray('prod;'), $toCharArray('profalar;'), $toCharArray('profline;'), $toCharArray('profsurf;'), $toCharArray('prop;'), $toCharArray('propto;'), $toCharArray('prsim;'), $toCharArray('prurel;'), $toCharArray('pscr;'), $toCharArray('psi;'), $toCharArray('puncsp;'), $toCharArray('qfr;'), $toCharArray('qint;'), $toCharArray('qopf;'), $toCharArray('qprime;'), $toCharArray('qscr;'), $toCharArray('quaternions;'), $toCharArray('quatint;'), $toCharArray('quest;'), $toCharArray('questeq;'), $toCharArray('quot'), $toCharArray('quot;'), $toCharArray('rAarr;'), $toCharArray('rArr;'), $toCharArray('rAtail;'), $toCharArray('rBarr;'), $toCharArray('rHar;'), $toCharArray('race;'), $toCharArray('racute;'), $toCharArray('radic;'), $toCharArray('raemptyv;'), $toCharArray('rang;'), $toCharArray('rangd;'), $toCharArray('range;'), $toCharArray('rangle;'), $toCharArray('raquo'), $toCharArray('raquo;'), $toCharArray('rarr;'), $toCharArray('rarrap;'), $toCharArray('rarrb;'), $toCharArray('rarrbfs;'), $toCharArray('rarrc;'), $toCharArray('rarrfs;'), $toCharArray('rarrhk;'), $toCharArray('rarrlp;'), $toCharArray('rarrpl;'), $toCharArray('rarrsim;'), $toCharArray('rarrtl;'), $toCharArray('rarrw;'), $toCharArray('ratail;'), $toCharArray('ratio;'), $toCharArray('rationals;'), $toCharArray('rbarr;'), $toCharArray('rbbrk;'), $toCharArray('rbrace;'), $toCharArray('rbrack;'), $toCharArray('rbrke;'), $toCharArray('rbrksld;'), $toCharArray('rbrkslu;'), $toCharArray('rcaron;'), $toCharArray('rcedil;'), $toCharArray('rceil;'), $toCharArray('rcub;'), $toCharArray('rcy;'), $toCharArray('rdca;'), $toCharArray('rdldhar;'), $toCharArray('rdquo;'), $toCharArray('rdquor;'), $toCharArray('rdsh;'), $toCharArray('real;'), $toCharArray('realine;'), $toCharArray('realpart;'), $toCharArray('reals;'), $toCharArray('rect;'), $toCharArray('reg'), $toCharArray('reg;'), $toCharArray('rfisht;'), $toCharArray('rfloor;'), $toCharArray('rfr;'), $toCharArray('rhard;'), $toCharArray('rharu;'), $toCharArray('rharul;'), $toCharArray('rho;'), $toCharArray('rhov;'), $toCharArray('rightarrow;'), $toCharArray('rightarrowtail;'), $toCharArray('rightharpoondown;'), $toCharArray('rightharpoonup;'), $toCharArray('rightleftarrows;'), $toCharArray('rightleftharpoons;'), $toCharArray('rightrightarrows;'), $toCharArray('rightsquigarrow;'), $toCharArray('rightthreetimes;'), $toCharArray('ring;'), $toCharArray('risingdotseq;'), $toCharArray('rlarr;'), $toCharArray('rlhar;'), $toCharArray('rlm;'), $toCharArray('rmoust;'), $toCharArray('rmoustache;'), $toCharArray('rnmid;'), $toCharArray('roang;'), $toCharArray('roarr;'), $toCharArray('robrk;'), $toCharArray('ropar;'), $toCharArray('ropf;'), $toCharArray('roplus;'), $toCharArray('rotimes;'), $toCharArray('rpar;'), $toCharArray('rpargt;'), $toCharArray('rppolint;'), $toCharArray('rrarr;'), $toCharArray('rsaquo;'), $toCharArray('rscr;'), $toCharArray('rsh;'), $toCharArray('rsqb;'), $toCharArray('rsquo;'), $toCharArray('rsquor;'), $toCharArray('rthree;'), $toCharArray('rtimes;'), $toCharArray('rtri;'), $toCharArray('rtrie;'), $toCharArray('rtrif;'), $toCharArray('rtriltri;'), $toCharArray('ruluhar;'), $toCharArray('rx;'), $toCharArray('sacute;'), $toCharArray('sbquo;'), $toCharArray('sc;'), $toCharArray('scE;'), $toCharArray('scap;'), $toCharArray('scaron;'), $toCharArray('sccue;'), $toCharArray('sce;'), $toCharArray('scedil;'), $toCharArray('scirc;'), $toCharArray('scnE;'), $toCharArray('scnap;'), $toCharArray('scnsim;'), $toCharArray('scpolint;'), $toCharArray('scsim;'), $toCharArray('scy;'), $toCharArray('sdot;'), $toCharArray('sdotb;'), $toCharArray('sdote;'), $toCharArray('seArr;'), $toCharArray('searhk;'), $toCharArray('searr;'), $toCharArray('searrow;'), $toCharArray('sect'), $toCharArray('sect;'), $toCharArray('semi;'), $toCharArray('seswar;'), $toCharArray('setminus;'), $toCharArray('setmn;'), $toCharArray('sext;'), $toCharArray('sfr;'), $toCharArray('sfrown;'), $toCharArray('sharp;'), $toCharArray('shchcy;'), $toCharArray('shcy;'), $toCharArray('shortmid;'), $toCharArray('shortparallel;'), $toCharArray('shy'), $toCharArray('shy;'), $toCharArray('sigma;'), $toCharArray('sigmaf;'), $toCharArray('sigmav;'), $toCharArray('sim;'), $toCharArray('simdot;'), $toCharArray('sime;'), $toCharArray('simeq;'), $toCharArray('simg;'), $toCharArray('simgE;'), $toCharArray('siml;'), $toCharArray('simlE;'), $toCharArray('simne;'), $toCharArray('simplus;'), $toCharArray('simrarr;'), $toCharArray('slarr;'), $toCharArray('smallsetminus;'), $toCharArray('smashp;'), $toCharArray('smeparsl;'), $toCharArray('smid;'), $toCharArray('smile;'), $toCharArray('smt;'), $toCharArray('smte;'), $toCharArray('softcy;'), $toCharArray('sol;'), $toCharArray('solb;'), $toCharArray('solbar;'), $toCharArray('sopf;'), $toCharArray('spades;'), $toCharArray('spadesuit;'), $toCharArray('spar;'), $toCharArray('sqcap;'), $toCharArray('sqcup;'), $toCharArray('sqsub;'), $toCharArray('sqsube;'), $toCharArray('sqsubset;'), $toCharArray('sqsubseteq;'), $toCharArray('sqsup;'), $toCharArray('sqsupe;'), $toCharArray('sqsupset;'), $toCharArray('sqsupseteq;'), $toCharArray('squ;'), $toCharArray('square;'), $toCharArray('squarf;'), $toCharArray('squf;'), $toCharArray('srarr;'), $toCharArray('sscr;'), $toCharArray('ssetmn;'), $toCharArray('ssmile;'), $toCharArray('sstarf;'), $toCharArray('star;'), $toCharArray('starf;'), $toCharArray('straightepsilon;'), $toCharArray('straightphi;'), $toCharArray('strns;'), $toCharArray('sub;'), $toCharArray('subE;'), $toCharArray('subdot;'), $toCharArray('sube;'), $toCharArray('subedot;'), $toCharArray('submult;'), $toCharArray('subnE;'), $toCharArray('subne;'), $toCharArray('subplus;'), $toCharArray('subrarr;'), $toCharArray('subset;'), $toCharArray('subseteq;'), $toCharArray('subseteqq;'), $toCharArray('subsetneq;'), $toCharArray('subsetneqq;'), $toCharArray('subsim;'), $toCharArray('subsub;'), $toCharArray('subsup;'), $toCharArray('succ;'), $toCharArray('succapprox;'), $toCharArray('succcurlyeq;'), $toCharArray('succeq;'), $toCharArray('succnapprox;'), $toCharArray('succneqq;'), $toCharArray('succnsim;'), $toCharArray('succsim;'), $toCharArray('sum;'), $toCharArray('sung;'), $toCharArray('sup1'), $toCharArray('sup1;'), $toCharArray('sup2'), $toCharArray('sup2;'), $toCharArray('sup3'), $toCharArray('sup3;'), $toCharArray('sup;'), $toCharArray('supE;'), $toCharArray('supdot;'), $toCharArray('supdsub;'), $toCharArray('supe;'), $toCharArray('supedot;'), $toCharArray('suphsub;'), $toCharArray('suplarr;'), $toCharArray('supmult;'), $toCharArray('supnE;'), $toCharArray('supne;'), $toCharArray('supplus;'), $toCharArray('supset;'), $toCharArray('supseteq;'), $toCharArray('supseteqq;'), $toCharArray('supsetneq;'), $toCharArray('supsetneqq;'), $toCharArray('supsim;'), $toCharArray('supsub;'), $toCharArray('supsup;'), $toCharArray('swArr;'), $toCharArray('swarhk;'), $toCharArray('swarr;'), $toCharArray('swarrow;'), $toCharArray('swnwar;'), $toCharArray('szlig'), $toCharArray('szlig;'), $toCharArray('target;'), $toCharArray('tau;'), $toCharArray('tbrk;'), $toCharArray('tcaron;'), $toCharArray('tcedil;'), $toCharArray('tcy;'), $toCharArray('tdot;'), $toCharArray('telrec;'), $toCharArray('tfr;'), $toCharArray('there4;'), $toCharArray('therefore;'), $toCharArray('theta;'), $toCharArray('thetasym;'), $toCharArray('thetav;'), $toCharArray('thickapprox;'), $toCharArray('thicksim;'), $toCharArray('thinsp;'), $toCharArray('thkap;'), $toCharArray('thksim;'), $toCharArray('thorn'), $toCharArray('thorn;'), $toCharArray('tilde;'), $toCharArray('times'), $toCharArray('times;'), $toCharArray('timesb;'), $toCharArray('timesbar;'), $toCharArray('timesd;'), $toCharArray('tint;'), $toCharArray('toea;'), $toCharArray('top;'), $toCharArray('topbot;'), $toCharArray('topcir;'), $toCharArray('topf;'), $toCharArray('topfork;'), $toCharArray('tosa;'), $toCharArray('tprime;'), $toCharArray('trade;'), $toCharArray('triangle;'), $toCharArray('triangledown;'), $toCharArray('triangleleft;'), $toCharArray('trianglelefteq;'), $toCharArray('triangleq;'), $toCharArray('triangleright;'), $toCharArray('trianglerighteq;'), $toCharArray('tridot;'), $toCharArray('trie;'), $toCharArray('triminus;'), $toCharArray('triplus;'), $toCharArray('trisb;'), $toCharArray('tritime;'), $toCharArray('trpezium;'), $toCharArray('tscr;'), $toCharArray('tscy;'), $toCharArray('tshcy;'), $toCharArray('tstrok;'), $toCharArray('twixt;'), $toCharArray('twoheadleftarrow;'), $toCharArray('twoheadrightarrow;'), $toCharArray('uArr;'), $toCharArray('uHar;'), $toCharArray('uacute'), $toCharArray('uacute;'), $toCharArray('uarr;'), $toCharArray('ubrcy;'), $toCharArray('ubreve;'), $toCharArray('ucirc'), $toCharArray('ucirc;'), $toCharArray('ucy;'), $toCharArray('udarr;'), $toCharArray('udblac;'), $toCharArray('udhar;'), $toCharArray('ufisht;'), $toCharArray('ufr;'), $toCharArray('ugrave'), $toCharArray('ugrave;'), $toCharArray('uharl;'), $toCharArray('uharr;'), $toCharArray('uhblk;'), $toCharArray('ulcorn;'), $toCharArray('ulcorner;'), $toCharArray('ulcrop;'), $toCharArray('ultri;'), $toCharArray('umacr;'), $toCharArray('uml'), $toCharArray('uml;'), $toCharArray('uogon;'), $toCharArray('uopf;'), $toCharArray('uparrow;'), $toCharArray('updownarrow;'), $toCharArray('upharpoonleft;'), $toCharArray('upharpoonright;'), $toCharArray('uplus;'), $toCharArray('upsi;'), $toCharArray('upsih;'), $toCharArray('upsilon;'), $toCharArray('upuparrows;'), $toCharArray('urcorn;'), $toCharArray('urcorner;'), $toCharArray('urcrop;'), $toCharArray('uring;'), $toCharArray('urtri;'), $toCharArray('uscr;'), $toCharArray('utdot;'), $toCharArray('utilde;'), $toCharArray('utri;'), $toCharArray('utrif;'), $toCharArray('uuarr;'), $toCharArray('uuml'), $toCharArray('uuml;'), $toCharArray('uwangle;'), $toCharArray('vArr;'), $toCharArray('vBar;'), $toCharArray('vBarv;'), $toCharArray('vDash;'), $toCharArray('vangrt;'), $toCharArray('varepsilon;'), $toCharArray('varkappa;'), $toCharArray('varnothing;'), $toCharArray('varphi;'), $toCharArray('varpi;'), $toCharArray('varpropto;'), $toCharArray('varr;'), $toCharArray('varrho;'), $toCharArray('varsigma;'), $toCharArray('vartheta;'), $toCharArray('vartriangleleft;'), $toCharArray('vartriangleright;'), $toCharArray('vcy;'), $toCharArray('vdash;'), $toCharArray('vee;'), $toCharArray('veebar;'), $toCharArray('veeeq;'), $toCharArray('vellip;'), $toCharArray('verbar;'), $toCharArray('vert;'), $toCharArray('vfr;'), $toCharArray('vltri;'), $toCharArray('vopf;'), $toCharArray('vprop;'), $toCharArray('vrtri;'), $toCharArray('vscr;'), $toCharArray('vzigzag;'), $toCharArray('wcirc;'), $toCharArray('wedbar;'), $toCharArray('wedge;'), $toCharArray('wedgeq;'), $toCharArray('weierp;'), $toCharArray('wfr;'), $toCharArray('wopf;'), $toCharArray('wp;'), $toCharArray('wr;'), $toCharArray('wreath;'), $toCharArray('wscr;'), $toCharArray('xcap;'), $toCharArray('xcirc;'), $toCharArray('xcup;'), $toCharArray('xdtri;'), $toCharArray('xfr;'), $toCharArray('xhArr;'), $toCharArray('xharr;'), $toCharArray('xi;'), $toCharArray('xlArr;'), $toCharArray('xlarr;'), $toCharArray('xmap;'), $toCharArray('xnis;'), $toCharArray('xodot;'), $toCharArray('xopf;'), $toCharArray('xoplus;'), $toCharArray('xotime;'), $toCharArray('xrArr;'), $toCharArray('xrarr;'), $toCharArray('xscr;'), $toCharArray('xsqcup;'), $toCharArray('xuplus;'), $toCharArray('xutri;'), $toCharArray('xvee;'), $toCharArray('xwedge;'), $toCharArray('yacute'), $toCharArray('yacute;'), $toCharArray('yacy;'), $toCharArray('ycirc;'), $toCharArray('ycy;'), $toCharArray('yen'), $toCharArray('yen;'), $toCharArray('yfr;'), $toCharArray('yicy;'), $toCharArray('yopf;'), $toCharArray('yscr;'), $toCharArray('yucy;'), $toCharArray('yuml'), $toCharArray('yuml;'), $toCharArray('zacute;'), $toCharArray('zcaron;'), $toCharArray('zcy;'), $toCharArray('zdot;'), $toCharArray('zeetrf;'), $toCharArray('zeta;'), $toCharArray('zfr;'), $toCharArray('zhcy;'), $toCharArray('zigrarr;'), $toCharArray('zopf;'), $toCharArray('zscr;'), $toCharArray('zwj;'), $toCharArray('zwnj;')]);
 21712   VALUES_0 = initValues(_3_3C_classLit, 52, 12, [initValues(_3C_classLit, 42, -1, [198]), initValues(_3C_classLit, 42, -1, [198]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [193]), initValues(_3C_classLit, 42, -1, [193]), initValues(_3C_classLit, 42, -1, [258]), initValues(_3C_classLit, 42, -1, [194]), initValues(_3C_classLit, 42, -1, [194]), initValues(_3C_classLit, 42, -1, [1040]), initValues(_3C_classLit, 42, -1, [55349, 56580]), initValues(_3C_classLit, 42, -1, [192]), initValues(_3C_classLit, 42, -1, [192]), initValues(_3C_classLit, 42, -1, [913]), initValues(_3C_classLit, 42, -1, [256]), initValues(_3C_classLit, 42, -1, [10835]), initValues(_3C_classLit, 42, -1, [260]), initValues(_3C_classLit, 42, -1, [55349, 56632]), initValues(_3C_classLit, 42, -1, [8289]), initValues(_3C_classLit, 42, -1, [197]), initValues(_3C_classLit, 42, -1, [197]), initValues(_3C_classLit, 42, -1, [55349, 56476]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [195]), initValues(_3C_classLit, 42, -1, [195]), initValues(_3C_classLit, 42, -1, [196]), initValues(_3C_classLit, 42, -1, [196]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10983]), initValues(_3C_classLit, 42, -1, [8966]), initValues(_3C_classLit, 42, -1, [1041]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [914]), initValues(_3C_classLit, 42, -1, [55349, 56581]), initValues(_3C_classLit, 42, -1, [55349, 56633]), initValues(_3C_classLit, 42, -1, [728]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [1063]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [262]), initValues(_3C_classLit, 42, -1, [8914]), initValues(_3C_classLit, 42, -1, [8517]), initValues(_3C_classLit, 42, -1, [8493]), initValues(_3C_classLit, 42, -1, [268]), initValues(_3C_classLit, 42, -1, [199]), initValues(_3C_classLit, 42, -1, [199]), initValues(_3C_classLit, 42, -1, [264]), initValues(_3C_classLit, 42, -1, [8752]), initValues(_3C_classLit, 42, -1, [266]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [8493]), initValues(_3C_classLit, 42, -1, [935]), initValues(_3C_classLit, 42, -1, [8857]), initValues(_3C_classLit, 42, -1, [8854]), initValues(_3C_classLit, 42, -1, [8853]), initValues(_3C_classLit, 42, -1, [8855]), initValues(_3C_classLit, 42, -1, [8754]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8759]), initValues(_3C_classLit, 42, -1, [10868]), initValues(_3C_classLit, 42, -1, [8801]), initValues(_3C_classLit, 42, -1, [8751]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [8450]), initValues(_3C_classLit, 42, -1, [8720]), initValues(_3C_classLit, 42, -1, [8755]), initValues(_3C_classLit, 42, -1, [10799]), initValues(_3C_classLit, 42, -1, [55349, 56478]), initValues(_3C_classLit, 42, -1, [8915]), initValues(_3C_classLit, 42, -1, [8781]), initValues(_3C_classLit, 42, -1, [8517]), initValues(_3C_classLit, 42, -1, [10513]), initValues(_3C_classLit, 42, -1, [1026]), initValues(_3C_classLit, 42, -1, [1029]), initValues(_3C_classLit, 42, -1, [1039]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [8609]), initValues(_3C_classLit, 42, -1, [10980]), initValues(_3C_classLit, 42, -1, [270]), initValues(_3C_classLit, 42, -1, [1044]), initValues(_3C_classLit, 42, -1, [8711]), initValues(_3C_classLit, 42, -1, [916]), initValues(_3C_classLit, 42, -1, [55349, 56583]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [729]), initValues(_3C_classLit, 42, -1, [733]), initValues(_3C_classLit, 42, -1, [96]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [8518]), initValues(_3C_classLit, 42, -1, [55349, 56635]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [8412]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8751]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [10980]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8872]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [10515]), initValues(_3C_classLit, 42, -1, [8693]), initValues(_3C_classLit, 42, -1, [785]), initValues(_3C_classLit, 42, -1, [10576]), initValues(_3C_classLit, 42, -1, [10590]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [10582]), initValues(_3C_classLit, 42, -1, [10591]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [10583]), initValues(_3C_classLit, 42, -1, [8868]), initValues(_3C_classLit, 42, -1, [8615]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [55349, 56479]), initValues(_3C_classLit, 42, -1, [272]), initValues(_3C_classLit, 42, -1, [330]), initValues(_3C_classLit, 42, -1, [208]), initValues(_3C_classLit, 42, -1, [208]), initValues(_3C_classLit, 42, -1, [201]), initValues(_3C_classLit, 42, -1, [201]), initValues(_3C_classLit, 42, -1, [282]), initValues(_3C_classLit, 42, -1, [202]), initValues(_3C_classLit, 42, -1, [202]), initValues(_3C_classLit, 42, -1, [1069]), initValues(_3C_classLit, 42, -1, [278]), initValues(_3C_classLit, 42, -1, [55349, 56584]), initValues(_3C_classLit, 42, -1, [200]), initValues(_3C_classLit, 42, -1, [200]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [274]), initValues(_3C_classLit, 42, -1, [9723]), initValues(_3C_classLit, 42, -1, [9643]), initValues(_3C_classLit, 42, -1, [280]), initValues(_3C_classLit, 42, -1, [55349, 56636]), initValues(_3C_classLit, 42, -1, [917]), initValues(_3C_classLit, 42, -1, [10869]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8496]), initValues(_3C_classLit, 42, -1, [10867]), initValues(_3C_classLit, 42, -1, [919]), initValues(_3C_classLit, 42, -1, [203]), initValues(_3C_classLit, 42, -1, [203]), initValues(_3C_classLit, 42, -1, [8707]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [1060]), initValues(_3C_classLit, 42, -1, [55349, 56585]), initValues(_3C_classLit, 42, -1, [9724]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [55349, 56637]), initValues(_3C_classLit, 42, -1, [8704]), initValues(_3C_classLit, 42, -1, [8497]), initValues(_3C_classLit, 42, -1, [8497]), initValues(_3C_classLit, 42, -1, [1027]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [915]), initValues(_3C_classLit, 42, -1, [988]), initValues(_3C_classLit, 42, -1, [286]), initValues(_3C_classLit, 42, -1, [290]), initValues(_3C_classLit, 42, -1, [284]), initValues(_3C_classLit, 42, -1, [1043]), initValues(_3C_classLit, 42, -1, [288]), initValues(_3C_classLit, 42, -1, [55349, 56586]), initValues(_3C_classLit, 42, -1, [8921]), initValues(_3C_classLit, 42, -1, [55349, 56638]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10914]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [55349, 56482]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [1066]), initValues(_3C_classLit, 42, -1, [711]), initValues(_3C_classLit, 42, -1, [94]), initValues(_3C_classLit, 42, -1, [292]), initValues(_3C_classLit, 42, -1, [8460]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [8461]), initValues(_3C_classLit, 42, -1, [9472]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [294]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [1045]), initValues(_3C_classLit, 42, -1, [306]), initValues(_3C_classLit, 42, -1, [1025]), initValues(_3C_classLit, 42, -1, [205]), initValues(_3C_classLit, 42, -1, [205]), initValues(_3C_classLit, 42, -1, [206]), initValues(_3C_classLit, 42, -1, [206]), initValues(_3C_classLit, 42, -1, [1048]), initValues(_3C_classLit, 42, -1, [304]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [204]), initValues(_3C_classLit, 42, -1, [204]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [298]), initValues(_3C_classLit, 42, -1, [8520]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8748]), initValues(_3C_classLit, 42, -1, [8747]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [8291]), initValues(_3C_classLit, 42, -1, [8290]), initValues(_3C_classLit, 42, -1, [302]), initValues(_3C_classLit, 42, -1, [55349, 56640]), initValues(_3C_classLit, 42, -1, [921]), initValues(_3C_classLit, 42, -1, [8464]), initValues(_3C_classLit, 42, -1, [296]), initValues(_3C_classLit, 42, -1, [1030]), initValues(_3C_classLit, 42, -1, [207]), initValues(_3C_classLit, 42, -1, [207]), initValues(_3C_classLit, 42, -1, [308]), initValues(_3C_classLit, 42, -1, [1049]), initValues(_3C_classLit, 42, -1, [55349, 56589]), initValues(_3C_classLit, 42, -1, [55349, 56641]), initValues(_3C_classLit, 42, -1, [55349, 56485]), initValues(_3C_classLit, 42, -1, [1032]), initValues(_3C_classLit, 42, -1, [1028]), initValues(_3C_classLit, 42, -1, [1061]), initValues(_3C_classLit, 42, -1, [1036]), initValues(_3C_classLit, 42, -1, [922]), initValues(_3C_classLit, 42, -1, [310]), initValues(_3C_classLit, 42, -1, [1050]), initValues(_3C_classLit, 42, -1, [55349, 56590]), initValues(_3C_classLit, 42, -1, [55349, 56642]), initValues(_3C_classLit, 42, -1, [55349, 56486]), initValues(_3C_classLit, 42, -1, [1033]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [313]), initValues(_3C_classLit, 42, -1, [923]), initValues(_3C_classLit, 42, -1, [10218]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [8606]), initValues(_3C_classLit, 42, -1, [317]), initValues(_3C_classLit, 42, -1, [315]), initValues(_3C_classLit, 42, -1, [1051]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8676]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8968]), initValues(_3C_classLit, 42, -1, [10214]), initValues(_3C_classLit, 42, -1, [10593]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [10585]), initValues(_3C_classLit, 42, -1, [8970]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [10574]), initValues(_3C_classLit, 42, -1, [8867]), initValues(_3C_classLit, 42, -1, [8612]), initValues(_3C_classLit, 42, -1, [10586]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [10703]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [10577]), initValues(_3C_classLit, 42, -1, [10592]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [10584]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [10578]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [10913]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [55349, 56591]), initValues(_3C_classLit, 42, -1, [8920]), initValues(_3C_classLit, 42, -1, [8666]), initValues(_3C_classLit, 42, -1, [319]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [55349, 56643]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [8624]), initValues(_3C_classLit, 42, -1, [321]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [10501]), initValues(_3C_classLit, 42, -1, [1052]), initValues(_3C_classLit, 42, -1, [8287]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [55349, 56592]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [55349, 56644]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [924]), initValues(_3C_classLit, 42, -1, [1034]), initValues(_3C_classLit, 42, -1, [323]), initValues(_3C_classLit, 42, -1, [327]), initValues(_3C_classLit, 42, -1, [325]), initValues(_3C_classLit, 42, -1, [1053]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [10]), initValues(_3C_classLit, 42, -1, [55349, 56593]), initValues(_3C_classLit, 42, -1, [8288]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [8469]), initValues(_3C_classLit, 42, -1, [10988]), initValues(_3C_classLit, 42, -1, [8802]), initValues(_3C_classLit, 42, -1, [8813]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8800]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8825]), initValues(_3C_classLit, 42, -1, [8821]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8824]), initValues(_3C_classLit, 42, -1, [8820]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8928]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [8930]), initValues(_3C_classLit, 42, -1, [8931]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8929]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8769]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8775]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [55349, 56489]), initValues(_3C_classLit, 42, -1, [209]), initValues(_3C_classLit, 42, -1, [209]), initValues(_3C_classLit, 42, -1, [925]), initValues(_3C_classLit, 42, -1, [338]), initValues(_3C_classLit, 42, -1, [211]), initValues(_3C_classLit, 42, -1, [211]), initValues(_3C_classLit, 42, -1, [212]), initValues(_3C_classLit, 42, -1, [212]), initValues(_3C_classLit, 42, -1, [1054]), initValues(_3C_classLit, 42, -1, [336]), initValues(_3C_classLit, 42, -1, [55349, 56594]), initValues(_3C_classLit, 42, -1, [210]), initValues(_3C_classLit, 42, -1, [210]), initValues(_3C_classLit, 42, -1, [332]), initValues(_3C_classLit, 42, -1, [937]), initValues(_3C_classLit, 42, -1, [927]), initValues(_3C_classLit, 42, -1, [55349, 56646]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [10836]), initValues(_3C_classLit, 42, -1, [55349, 56490]), initValues(_3C_classLit, 42, -1, [216]), initValues(_3C_classLit, 42, -1, [216]), initValues(_3C_classLit, 42, -1, [213]), initValues(_3C_classLit, 42, -1, [213]), initValues(_3C_classLit, 42, -1, [10807]), initValues(_3C_classLit, 42, -1, [214]), initValues(_3C_classLit, 42, -1, [214]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [9182]), initValues(_3C_classLit, 42, -1, [9140]), initValues(_3C_classLit, 42, -1, [9180]), initValues(_3C_classLit, 42, -1, [8706]), initValues(_3C_classLit, 42, -1, [1055]), initValues(_3C_classLit, 42, -1, [55349, 56595]), initValues(_3C_classLit, 42, -1, [934]), initValues(_3C_classLit, 42, -1, [928]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [8460]), initValues(_3C_classLit, 42, -1, [8473]), initValues(_3C_classLit, 42, -1, [10939]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8243]), initValues(_3C_classLit, 42, -1, [8719]), initValues(_3C_classLit, 42, -1, [8759]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [55349, 56491]), initValues(_3C_classLit, 42, -1, [936]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [55349, 56596]), initValues(_3C_classLit, 42, -1, [8474]), initValues(_3C_classLit, 42, -1, [55349, 56492]), initValues(_3C_classLit, 42, -1, [10512]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [340]), initValues(_3C_classLit, 42, -1, [10219]), initValues(_3C_classLit, 42, -1, [8608]), initValues(_3C_classLit, 42, -1, [10518]), initValues(_3C_classLit, 42, -1, [344]), initValues(_3C_classLit, 42, -1, [342]), initValues(_3C_classLit, 42, -1, [1056]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [10607]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [929]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8677]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8969]), initValues(_3C_classLit, 42, -1, [10215]), initValues(_3C_classLit, 42, -1, [10589]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [10581]), initValues(_3C_classLit, 42, -1, [8971]), initValues(_3C_classLit, 42, -1, [8866]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [10587]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [10704]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [10575]), initValues(_3C_classLit, 42, -1, [10588]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [10580]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [10579]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8477]), initValues(_3C_classLit, 42, -1, [10608]), initValues(_3C_classLit, 42, -1, [8667]), initValues(_3C_classLit, 42, -1, [8475]), initValues(_3C_classLit, 42, -1, [8625]), initValues(_3C_classLit, 42, -1, [10740]), initValues(_3C_classLit, 42, -1, [1065]), initValues(_3C_classLit, 42, -1, [1064]), initValues(_3C_classLit, 42, -1, [1068]), initValues(_3C_classLit, 42, -1, [346]), initValues(_3C_classLit, 42, -1, [10940]), initValues(_3C_classLit, 42, -1, [352]), initValues(_3C_classLit, 42, -1, [350]), initValues(_3C_classLit, 42, -1, [348]), initValues(_3C_classLit, 42, -1, [1057]), initValues(_3C_classLit, 42, -1, [55349, 56598]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [931]), initValues(_3C_classLit, 42, -1, [8728]), initValues(_3C_classLit, 42, -1, [55349, 56650]), initValues(_3C_classLit, 42, -1, [8730]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [8851]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [8852]), initValues(_3C_classLit, 42, -1, [55349, 56494]), initValues(_3C_classLit, 42, -1, [8902]), initValues(_3C_classLit, 42, -1, [8912]), initValues(_3C_classLit, 42, -1, [8912]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8721]), initValues(_3C_classLit, 42, -1, [8913]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [8913]), initValues(_3C_classLit, 42, -1, [222]), initValues(_3C_classLit, 42, -1, [222]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [1035]), initValues(_3C_classLit, 42, -1, [1062]), initValues(_3C_classLit, 42, -1, [9]), initValues(_3C_classLit, 42, -1, [932]), initValues(_3C_classLit, 42, -1, [356]), initValues(_3C_classLit, 42, -1, [354]), initValues(_3C_classLit, 42, -1, [1058]), initValues(_3C_classLit, 42, -1, [55349, 56599]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [920]), initValues(_3C_classLit, 42, -1, [8201]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [8773]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [55349, 56651]), initValues(_3C_classLit, 42, -1, [8411]), initValues(_3C_classLit, 42, -1, [55349, 56495]), initValues(_3C_classLit, 42, -1, [358]), initValues(_3C_classLit, 42, -1, [218]), initValues(_3C_classLit, 42, -1, [218]), initValues(_3C_classLit, 42, -1, [8607]), initValues(_3C_classLit, 42, -1, [10569]), initValues(_3C_classLit, 42, -1, [1038]), initValues(_3C_classLit, 42, -1, [364]), initValues(_3C_classLit, 42, -1, [219]), initValues(_3C_classLit, 42, -1, [219]), initValues(_3C_classLit, 42, -1, [1059]), initValues(_3C_classLit, 42, -1, [368]), initValues(_3C_classLit, 42, -1, [55349, 56600]), initValues(_3C_classLit, 42, -1, [217]), initValues(_3C_classLit, 42, -1, [217]), initValues(_3C_classLit, 42, -1, [362]), initValues(_3C_classLit, 42, -1, [818]), initValues(_3C_classLit, 42, -1, [9183]), initValues(_3C_classLit, 42, -1, [9141]), initValues(_3C_classLit, 42, -1, [9181]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [8846]), initValues(_3C_classLit, 42, -1, [370]), initValues(_3C_classLit, 42, -1, [55349, 56652]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [10514]), initValues(_3C_classLit, 42, -1, [8645]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [10606]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8613]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [978]), initValues(_3C_classLit, 42, -1, [933]), initValues(_3C_classLit, 42, -1, [366]), initValues(_3C_classLit, 42, -1, [55349, 56496]), initValues(_3C_classLit, 42, -1, [360]), initValues(_3C_classLit, 42, -1, [220]), initValues(_3C_classLit, 42, -1, [220]), initValues(_3C_classLit, 42, -1, [8875]), initValues(_3C_classLit, 42, -1, [10987]), initValues(_3C_classLit, 42, -1, [1042]), initValues(_3C_classLit, 42, -1, [8873]), initValues(_3C_classLit, 42, -1, [10982]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8214]), initValues(_3C_classLit, 42, -1, [8214]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [10072]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [8202]), initValues(_3C_classLit, 42, -1, [55349, 56601]), initValues(_3C_classLit, 42, -1, [55349, 56653]), initValues(_3C_classLit, 42, -1, [55349, 56497]), initValues(_3C_classLit, 42, -1, [8874]), initValues(_3C_classLit, 42, -1, [372]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [55349, 56602]), initValues(_3C_classLit, 42, -1, [55349, 56654]), initValues(_3C_classLit, 42, -1, [55349, 56498]), initValues(_3C_classLit, 42, -1, [55349, 56603]), initValues(_3C_classLit, 42, -1, [926]), initValues(_3C_classLit, 42, -1, [55349, 56655]), initValues(_3C_classLit, 42, -1, [55349, 56499]), initValues(_3C_classLit, 42, -1, [1071]), initValues(_3C_classLit, 42, -1, [1031]), initValues(_3C_classLit, 42, -1, [1070]), initValues(_3C_classLit, 42, -1, [221]), initValues(_3C_classLit, 42, -1, [221]), initValues(_3C_classLit, 42, -1, [374]), initValues(_3C_classLit, 42, -1, [1067]), initValues(_3C_classLit, 42, -1, [55349, 56604]), initValues(_3C_classLit, 42, -1, [55349, 56656]), initValues(_3C_classLit, 42, -1, [55349, 56500]), initValues(_3C_classLit, 42, -1, [376]), initValues(_3C_classLit, 42, -1, [1046]), initValues(_3C_classLit, 42, -1, [377]), initValues(_3C_classLit, 42, -1, [381]), initValues(_3C_classLit, 42, -1, [1047]), initValues(_3C_classLit, 42, -1, [379]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [918]), initValues(_3C_classLit, 42, -1, [8488]), initValues(_3C_classLit, 42, -1, [8484]), initValues(_3C_classLit, 42, -1, [55349, 56501]), initValues(_3C_classLit, 42, -1, [225]), initValues(_3C_classLit, 42, -1, [225]), initValues(_3C_classLit, 42, -1, [259]), initValues(_3C_classLit, 42, -1, [8766]), initValues(_3C_classLit, 42, -1, [8767]), initValues(_3C_classLit, 42, -1, [226]), initValues(_3C_classLit, 42, -1, [226]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [1072]), initValues(_3C_classLit, 42, -1, [230]), initValues(_3C_classLit, 42, -1, [230]), initValues(_3C_classLit, 42, -1, [8289]), initValues(_3C_classLit, 42, -1, [55349, 56606]), initValues(_3C_classLit, 42, -1, [224]), initValues(_3C_classLit, 42, -1, [224]), initValues(_3C_classLit, 42, -1, [8501]), initValues(_3C_classLit, 42, -1, [8501]), initValues(_3C_classLit, 42, -1, [945]), initValues(_3C_classLit, 42, -1, [257]), initValues(_3C_classLit, 42, -1, [10815]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [8743]), initValues(_3C_classLit, 42, -1, [10837]), initValues(_3C_classLit, 42, -1, [10844]), initValues(_3C_classLit, 42, -1, [10840]), initValues(_3C_classLit, 42, -1, [10842]), initValues(_3C_classLit, 42, -1, [8736]), initValues(_3C_classLit, 42, -1, [10660]), initValues(_3C_classLit, 42, -1, [8736]), initValues(_3C_classLit, 42, -1, [8737]), initValues(_3C_classLit, 42, -1, [10664]), initValues(_3C_classLit, 42, -1, [10665]), initValues(_3C_classLit, 42, -1, [10666]), initValues(_3C_classLit, 42, -1, [10667]), initValues(_3C_classLit, 42, -1, [10668]), initValues(_3C_classLit, 42, -1, [10669]), initValues(_3C_classLit, 42, -1, [10670]), initValues(_3C_classLit, 42, -1, [10671]), initValues(_3C_classLit, 42, -1, [8735]), initValues(_3C_classLit, 42, -1, [8894]), initValues(_3C_classLit, 42, -1, [10653]), initValues(_3C_classLit, 42, -1, [8738]), initValues(_3C_classLit, 42, -1, [8491]), initValues(_3C_classLit, 42, -1, [9084]), initValues(_3C_classLit, 42, -1, [261]), initValues(_3C_classLit, 42, -1, [55349, 56658]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [10864]), initValues(_3C_classLit, 42, -1, [10863]), initValues(_3C_classLit, 42, -1, [8778]), initValues(_3C_classLit, 42, -1, [8779]), initValues(_3C_classLit, 42, -1, [39]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8778]), initValues(_3C_classLit, 42, -1, [229]), initValues(_3C_classLit, 42, -1, [229]), initValues(_3C_classLit, 42, -1, [55349, 56502]), initValues(_3C_classLit, 42, -1, [42]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8781]), initValues(_3C_classLit, 42, -1, [227]), initValues(_3C_classLit, 42, -1, [227]), initValues(_3C_classLit, 42, -1, [228]), initValues(_3C_classLit, 42, -1, [228]), initValues(_3C_classLit, 42, -1, [8755]), initValues(_3C_classLit, 42, -1, [10769]), initValues(_3C_classLit, 42, -1, [10989]), initValues(_3C_classLit, 42, -1, [8780]), initValues(_3C_classLit, 42, -1, [1014]), initValues(_3C_classLit, 42, -1, [8245]), initValues(_3C_classLit, 42, -1, [8765]), initValues(_3C_classLit, 42, -1, [8909]), initValues(_3C_classLit, 42, -1, [8893]), initValues(_3C_classLit, 42, -1, [8965]), initValues(_3C_classLit, 42, -1, [8965]), initValues(_3C_classLit, 42, -1, [9141]), initValues(_3C_classLit, 42, -1, [9142]), initValues(_3C_classLit, 42, -1, [8780]), initValues(_3C_classLit, 42, -1, [1073]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [10672]), initValues(_3C_classLit, 42, -1, [1014]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [946]), initValues(_3C_classLit, 42, -1, [8502]), initValues(_3C_classLit, 42, -1, [8812]), initValues(_3C_classLit, 42, -1, [55349, 56607]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [9711]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [10752]), initValues(_3C_classLit, 42, -1, [10753]), initValues(_3C_classLit, 42, -1, [10754]), initValues(_3C_classLit, 42, -1, [10758]), initValues(_3C_classLit, 42, -1, [9733]), initValues(_3C_classLit, 42, -1, [9661]), initValues(_3C_classLit, 42, -1, [9651]), initValues(_3C_classLit, 42, -1, [10756]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [10509]), initValues(_3C_classLit, 42, -1, [10731]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [9652]), initValues(_3C_classLit, 42, -1, [9662]), initValues(_3C_classLit, 42, -1, [9666]), initValues(_3C_classLit, 42, -1, [9656]), initValues(_3C_classLit, 42, -1, [9251]), initValues(_3C_classLit, 42, -1, [9618]), initValues(_3C_classLit, 42, -1, [9617]), initValues(_3C_classLit, 42, -1, [9619]), initValues(_3C_classLit, 42, -1, [9608]), initValues(_3C_classLit, 42, -1, [8976]), initValues(_3C_classLit, 42, -1, [55349, 56659]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8904]), initValues(_3C_classLit, 42, -1, [9559]), initValues(_3C_classLit, 42, -1, [9556]), initValues(_3C_classLit, 42, -1, [9558]), initValues(_3C_classLit, 42, -1, [9555]), initValues(_3C_classLit, 42, -1, [9552]), initValues(_3C_classLit, 42, -1, [9574]), initValues(_3C_classLit, 42, -1, [9577]), initValues(_3C_classLit, 42, -1, [9572]), initValues(_3C_classLit, 42, -1, [9575]), initValues(_3C_classLit, 42, -1, [9565]), initValues(_3C_classLit, 42, -1, [9562]), initValues(_3C_classLit, 42, -1, [9564]), initValues(_3C_classLit, 42, -1, [9561]), initValues(_3C_classLit, 42, -1, [9553]), initValues(_3C_classLit, 42, -1, [9580]), initValues(_3C_classLit, 42, -1, [9571]), initValues(_3C_classLit, 42, -1, [9568]), initValues(_3C_classLit, 42, -1, [9579]), initValues(_3C_classLit, 42, -1, [9570]), initValues(_3C_classLit, 42, -1, [9567]), initValues(_3C_classLit, 42, -1, [10697]), initValues(_3C_classLit, 42, -1, [9557]), initValues(_3C_classLit, 42, -1, [9554]), initValues(_3C_classLit, 42, -1, [9488]), initValues(_3C_classLit, 42, -1, [9484]), initValues(_3C_classLit, 42, -1, [9472]), initValues(_3C_classLit, 42, -1, [9573]), initValues(_3C_classLit, 42, -1, [9576]), initValues(_3C_classLit, 42, -1, [9516]), initValues(_3C_classLit, 42, -1, [9524]), initValues(_3C_classLit, 42, -1, [8863]), initValues(_3C_classLit, 42, -1, [8862]), initValues(_3C_classLit, 42, -1, [8864]), initValues(_3C_classLit, 42, -1, [9563]), initValues(_3C_classLit, 42, -1, [9560]), initValues(_3C_classLit, 42, -1, [9496]), initValues(_3C_classLit, 42, -1, [9492]), initValues(_3C_classLit, 42, -1, [9474]), initValues(_3C_classLit, 42, -1, [9578]), initValues(_3C_classLit, 42, -1, [9569]), initValues(_3C_classLit, 42, -1, [9566]), initValues(_3C_classLit, 42, -1, [9532]), initValues(_3C_classLit, 42, -1, [9508]), initValues(_3C_classLit, 42, -1, [9500]), initValues(_3C_classLit, 42, -1, [8245]), initValues(_3C_classLit, 42, -1, [728]), initValues(_3C_classLit, 42, -1, [166]), initValues(_3C_classLit, 42, -1, [166]), initValues(_3C_classLit, 42, -1, [55349, 56503]), initValues(_3C_classLit, 42, -1, [8271]), initValues(_3C_classLit, 42, -1, [8765]), initValues(_3C_classLit, 42, -1, [8909]), initValues(_3C_classLit, 42, -1, [92]), initValues(_3C_classLit, 42, -1, [10693]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [10926]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [263]), initValues(_3C_classLit, 42, -1, [8745]), initValues(_3C_classLit, 42, -1, [10820]), initValues(_3C_classLit, 42, -1, [10825]), initValues(_3C_classLit, 42, -1, [10827]), initValues(_3C_classLit, 42, -1, [10823]), initValues(_3C_classLit, 42, -1, [10816]), initValues(_3C_classLit, 42, -1, [8257]), initValues(_3C_classLit, 42, -1, [711]), initValues(_3C_classLit, 42, -1, [10829]), initValues(_3C_classLit, 42, -1, [269]), initValues(_3C_classLit, 42, -1, [231]), initValues(_3C_classLit, 42, -1, [231]), initValues(_3C_classLit, 42, -1, [265]), initValues(_3C_classLit, 42, -1, [10828]), initValues(_3C_classLit, 42, -1, [10832]), initValues(_3C_classLit, 42, -1, [267]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [10674]), initValues(_3C_classLit, 42, -1, [162]), initValues(_3C_classLit, 42, -1, [162]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [55349, 56608]), initValues(_3C_classLit, 42, -1, [1095]), initValues(_3C_classLit, 42, -1, [10003]), initValues(_3C_classLit, 42, -1, [10003]), initValues(_3C_classLit, 42, -1, [967]), initValues(_3C_classLit, 42, -1, [9675]), initValues(_3C_classLit, 42, -1, [10691]), initValues(_3C_classLit, 42, -1, [710]), initValues(_3C_classLit, 42, -1, [8791]), initValues(_3C_classLit, 42, -1, [8634]), initValues(_3C_classLit, 42, -1, [8635]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [9416]), initValues(_3C_classLit, 42, -1, [8859]), initValues(_3C_classLit, 42, -1, [8858]), initValues(_3C_classLit, 42, -1, [8861]), initValues(_3C_classLit, 42, -1, [8791]), initValues(_3C_classLit, 42, -1, [10768]), initValues(_3C_classLit, 42, -1, [10991]), initValues(_3C_classLit, 42, -1, [10690]), initValues(_3C_classLit, 42, -1, [9827]), initValues(_3C_classLit, 42, -1, [9827]), initValues(_3C_classLit, 42, -1, [58]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [44]), initValues(_3C_classLit, 42, -1, [64]), initValues(_3C_classLit, 42, -1, [8705]), initValues(_3C_classLit, 42, -1, [8728]), initValues(_3C_classLit, 42, -1, [8705]), initValues(_3C_classLit, 42, -1, [8450]), initValues(_3C_classLit, 42, -1, [8773]), initValues(_3C_classLit, 42, -1, [10861]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [55349, 56660]), initValues(_3C_classLit, 42, -1, [8720]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [8471]), initValues(_3C_classLit, 42, -1, [8629]), initValues(_3C_classLit, 42, -1, [10007]), initValues(_3C_classLit, 42, -1, [55349, 56504]), initValues(_3C_classLit, 42, -1, [10959]), initValues(_3C_classLit, 42, -1, [10961]), initValues(_3C_classLit, 42, -1, [10960]), initValues(_3C_classLit, 42, -1, [10962]), initValues(_3C_classLit, 42, -1, [8943]), initValues(_3C_classLit, 42, -1, [10552]), initValues(_3C_classLit, 42, -1, [10549]), initValues(_3C_classLit, 42, -1, [8926]), initValues(_3C_classLit, 42, -1, [8927]), initValues(_3C_classLit, 42, -1, [8630]), initValues(_3C_classLit, 42, -1, [10557]), initValues(_3C_classLit, 42, -1, [8746]), initValues(_3C_classLit, 42, -1, [10824]), initValues(_3C_classLit, 42, -1, [10822]), initValues(_3C_classLit, 42, -1, [10826]), initValues(_3C_classLit, 42, -1, [8845]), initValues(_3C_classLit, 42, -1, [10821]), initValues(_3C_classLit, 42, -1, [8631]), initValues(_3C_classLit, 42, -1, [10556]), initValues(_3C_classLit, 42, -1, [8926]), initValues(_3C_classLit, 42, -1, [8927]), initValues(_3C_classLit, 42, -1, [8910]), initValues(_3C_classLit, 42, -1, [8911]), initValues(_3C_classLit, 42, -1, [164]), initValues(_3C_classLit, 42, -1, [164]), initValues(_3C_classLit, 42, -1, [8630]), initValues(_3C_classLit, 42, -1, [8631]), initValues(_3C_classLit, 42, -1, [8910]), initValues(_3C_classLit, 42, -1, [8911]), initValues(_3C_classLit, 42, -1, [8754]), initValues(_3C_classLit, 42, -1, [8753]), initValues(_3C_classLit, 42, -1, [9005]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [10597]), initValues(_3C_classLit, 42, -1, [8224]), initValues(_3C_classLit, 42, -1, [8504]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8208]), initValues(_3C_classLit, 42, -1, [8867]), initValues(_3C_classLit, 42, -1, [10511]), initValues(_3C_classLit, 42, -1, [733]), initValues(_3C_classLit, 42, -1, [271]), initValues(_3C_classLit, 42, -1, [1076]), initValues(_3C_classLit, 42, -1, [8518]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [8650]), initValues(_3C_classLit, 42, -1, [10871]), initValues(_3C_classLit, 42, -1, [176]), initValues(_3C_classLit, 42, -1, [176]), initValues(_3C_classLit, 42, -1, [948]), initValues(_3C_classLit, 42, -1, [10673]), initValues(_3C_classLit, 42, -1, [10623]), initValues(_3C_classLit, 42, -1, [55349, 56609]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [9830]), initValues(_3C_classLit, 42, -1, [9830]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [989]), initValues(_3C_classLit, 42, -1, [8946]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [8903]), initValues(_3C_classLit, 42, -1, [8903]), initValues(_3C_classLit, 42, -1, [1106]), initValues(_3C_classLit, 42, -1, [8990]), initValues(_3C_classLit, 42, -1, [8973]), initValues(_3C_classLit, 42, -1, [36]), initValues(_3C_classLit, 42, -1, [55349, 56661]), initValues(_3C_classLit, 42, -1, [729]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8785]), initValues(_3C_classLit, 42, -1, [8760]), initValues(_3C_classLit, 42, -1, [8724]), initValues(_3C_classLit, 42, -1, [8865]), initValues(_3C_classLit, 42, -1, [8966]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8650]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [10512]), initValues(_3C_classLit, 42, -1, [8991]), initValues(_3C_classLit, 42, -1, [8972]), initValues(_3C_classLit, 42, -1, [55349, 56505]), initValues(_3C_classLit, 42, -1, [1109]), initValues(_3C_classLit, 42, -1, [10742]), initValues(_3C_classLit, 42, -1, [273]), initValues(_3C_classLit, 42, -1, [8945]), initValues(_3C_classLit, 42, -1, [9663]), initValues(_3C_classLit, 42, -1, [9662]), initValues(_3C_classLit, 42, -1, [8693]), initValues(_3C_classLit, 42, -1, [10607]), initValues(_3C_classLit, 42, -1, [10662]), initValues(_3C_classLit, 42, -1, [1119]), initValues(_3C_classLit, 42, -1, [10239]), initValues(_3C_classLit, 42, -1, [10871]), initValues(_3C_classLit, 42, -1, [8785]), initValues(_3C_classLit, 42, -1, [233]), initValues(_3C_classLit, 42, -1, [233]), initValues(_3C_classLit, 42, -1, [10862]), initValues(_3C_classLit, 42, -1, [283]), initValues(_3C_classLit, 42, -1, [8790]), initValues(_3C_classLit, 42, -1, [234]), initValues(_3C_classLit, 42, -1, [234]), initValues(_3C_classLit, 42, -1, [8789]), initValues(_3C_classLit, 42, -1, [1101]), initValues(_3C_classLit, 42, -1, [279]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [8786]), initValues(_3C_classLit, 42, -1, [55349, 56610]), initValues(_3C_classLit, 42, -1, [10906]), initValues(_3C_classLit, 42, -1, [232]), initValues(_3C_classLit, 42, -1, [232]), initValues(_3C_classLit, 42, -1, [10902]), initValues(_3C_classLit, 42, -1, [10904]), initValues(_3C_classLit, 42, -1, [10905]), initValues(_3C_classLit, 42, -1, [9191]), initValues(_3C_classLit, 42, -1, [8467]), initValues(_3C_classLit, 42, -1, [10901]), initValues(_3C_classLit, 42, -1, [10903]), initValues(_3C_classLit, 42, -1, [275]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8196]), initValues(_3C_classLit, 42, -1, [8197]), initValues(_3C_classLit, 42, -1, [8195]), initValues(_3C_classLit, 42, -1, [331]), initValues(_3C_classLit, 42, -1, [8194]), initValues(_3C_classLit, 42, -1, [281]), initValues(_3C_classLit, 42, -1, [55349, 56662]), initValues(_3C_classLit, 42, -1, [8917]), initValues(_3C_classLit, 42, -1, [10723]), initValues(_3C_classLit, 42, -1, [10865]), initValues(_3C_classLit, 42, -1, [1013]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [8790]), initValues(_3C_classLit, 42, -1, [8789]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [10902]), initValues(_3C_classLit, 42, -1, [10901]), initValues(_3C_classLit, 42, -1, [61]), initValues(_3C_classLit, 42, -1, [8799]), initValues(_3C_classLit, 42, -1, [8801]), initValues(_3C_classLit, 42, -1, [10872]), initValues(_3C_classLit, 42, -1, [10725]), initValues(_3C_classLit, 42, -1, [8787]), initValues(_3C_classLit, 42, -1, [10609]), initValues(_3C_classLit, 42, -1, [8495]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [951]), initValues(_3C_classLit, 42, -1, [240]), initValues(_3C_classLit, 42, -1, [240]), initValues(_3C_classLit, 42, -1, [235]), initValues(_3C_classLit, 42, -1, [235]), initValues(_3C_classLit, 42, -1, [8364]), initValues(_3C_classLit, 42, -1, [33]), initValues(_3C_classLit, 42, -1, [8707]), initValues(_3C_classLit, 42, -1, [8496]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [8786]), initValues(_3C_classLit, 42, -1, [1092]), initValues(_3C_classLit, 42, -1, [9792]), initValues(_3C_classLit, 42, -1, [64259]), initValues(_3C_classLit, 42, -1, [64256]), initValues(_3C_classLit, 42, -1, [64260]), initValues(_3C_classLit, 42, -1, [55349, 56611]), initValues(_3C_classLit, 42, -1, [64257]), initValues(_3C_classLit, 42, -1, [9837]), initValues(_3C_classLit, 42, -1, [64258]), initValues(_3C_classLit, 42, -1, [9649]), initValues(_3C_classLit, 42, -1, [402]), initValues(_3C_classLit, 42, -1, [55349, 56663]), initValues(_3C_classLit, 42, -1, [8704]), initValues(_3C_classLit, 42, -1, [8916]), initValues(_3C_classLit, 42, -1, [10969]), initValues(_3C_classLit, 42, -1, [10765]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [8531]), initValues(_3C_classLit, 42, -1, [188]), initValues(_3C_classLit, 42, -1, [188]), initValues(_3C_classLit, 42, -1, [8533]), initValues(_3C_classLit, 42, -1, [8537]), initValues(_3C_classLit, 42, -1, [8539]), initValues(_3C_classLit, 42, -1, [8532]), initValues(_3C_classLit, 42, -1, [8534]), initValues(_3C_classLit, 42, -1, [190]), initValues(_3C_classLit, 42, -1, [190]), initValues(_3C_classLit, 42, -1, [8535]), initValues(_3C_classLit, 42, -1, [8540]), initValues(_3C_classLit, 42, -1, [8536]), initValues(_3C_classLit, 42, -1, [8538]), initValues(_3C_classLit, 42, -1, [8541]), initValues(_3C_classLit, 42, -1, [8542]), initValues(_3C_classLit, 42, -1, [8260]), initValues(_3C_classLit, 42, -1, [8994]), initValues(_3C_classLit, 42, -1, [55349, 56507]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10892]), initValues(_3C_classLit, 42, -1, [501]), initValues(_3C_classLit, 42, -1, [947]), initValues(_3C_classLit, 42, -1, [989]), initValues(_3C_classLit, 42, -1, [10886]), initValues(_3C_classLit, 42, -1, [287]), initValues(_3C_classLit, 42, -1, [285]), initValues(_3C_classLit, 42, -1, [1075]), initValues(_3C_classLit, 42, -1, [289]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [10921]), initValues(_3C_classLit, 42, -1, [10880]), initValues(_3C_classLit, 42, -1, [10882]), initValues(_3C_classLit, 42, -1, [10884]), initValues(_3C_classLit, 42, -1, [10900]), initValues(_3C_classLit, 42, -1, [55349, 56612]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [8921]), initValues(_3C_classLit, 42, -1, [8503]), initValues(_3C_classLit, 42, -1, [1107]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [10898]), initValues(_3C_classLit, 42, -1, [10917]), initValues(_3C_classLit, 42, -1, [10916]), initValues(_3C_classLit, 42, -1, [8809]), initValues(_3C_classLit, 42, -1, [10890]), initValues(_3C_classLit, 42, -1, [10890]), initValues(_3C_classLit, 42, -1, [10888]), initValues(_3C_classLit, 42, -1, [10888]), initValues(_3C_classLit, 42, -1, [8809]), initValues(_3C_classLit, 42, -1, [8935]), initValues(_3C_classLit, 42, -1, [55349, 56664]), initValues(_3C_classLit, 42, -1, [96]), initValues(_3C_classLit, 42, -1, [8458]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [10894]), initValues(_3C_classLit, 42, -1, [10896]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [10919]), initValues(_3C_classLit, 42, -1, [10874]), initValues(_3C_classLit, 42, -1, [8919]), initValues(_3C_classLit, 42, -1, [10645]), initValues(_3C_classLit, 42, -1, [10876]), initValues(_3C_classLit, 42, -1, [10886]), initValues(_3C_classLit, 42, -1, [10616]), initValues(_3C_classLit, 42, -1, [8919]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [10892]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [8202]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [1098]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [10568]), initValues(_3C_classLit, 42, -1, [8621]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [293]), initValues(_3C_classLit, 42, -1, [9829]), initValues(_3C_classLit, 42, -1, [9829]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8889]), initValues(_3C_classLit, 42, -1, [55349, 56613]), initValues(_3C_classLit, 42, -1, [10533]), initValues(_3C_classLit, 42, -1, [10534]), initValues(_3C_classLit, 42, -1, [8703]), initValues(_3C_classLit, 42, -1, [8763]), initValues(_3C_classLit, 42, -1, [8617]), initValues(_3C_classLit, 42, -1, [8618]), initValues(_3C_classLit, 42, -1, [55349, 56665]), initValues(_3C_classLit, 42, -1, [8213]), initValues(_3C_classLit, 42, -1, [55349, 56509]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [295]), initValues(_3C_classLit, 42, -1, [8259]), initValues(_3C_classLit, 42, -1, [8208]), initValues(_3C_classLit, 42, -1, [237]), initValues(_3C_classLit, 42, -1, [237]), initValues(_3C_classLit, 42, -1, [8291]), initValues(_3C_classLit, 42, -1, [238]), initValues(_3C_classLit, 42, -1, [238]), initValues(_3C_classLit, 42, -1, [1080]), initValues(_3C_classLit, 42, -1, [1077]), initValues(_3C_classLit, 42, -1, [161]), initValues(_3C_classLit, 42, -1, [161]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [55349, 56614]), initValues(_3C_classLit, 42, -1, [236]), initValues(_3C_classLit, 42, -1, [236]), initValues(_3C_classLit, 42, -1, [8520]), initValues(_3C_classLit, 42, -1, [10764]), initValues(_3C_classLit, 42, -1, [8749]), initValues(_3C_classLit, 42, -1, [10716]), initValues(_3C_classLit, 42, -1, [8489]), initValues(_3C_classLit, 42, -1, [307]), initValues(_3C_classLit, 42, -1, [299]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [8464]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [305]), initValues(_3C_classLit, 42, -1, [8887]), initValues(_3C_classLit, 42, -1, [437]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8453]), initValues(_3C_classLit, 42, -1, [8734]), initValues(_3C_classLit, 42, -1, [10717]), initValues(_3C_classLit, 42, -1, [305]), initValues(_3C_classLit, 42, -1, [8747]), initValues(_3C_classLit, 42, -1, [8890]), initValues(_3C_classLit, 42, -1, [8484]), initValues(_3C_classLit, 42, -1, [8890]), initValues(_3C_classLit, 42, -1, [10775]), initValues(_3C_classLit, 42, -1, [10812]), initValues(_3C_classLit, 42, -1, [1105]), initValues(_3C_classLit, 42, -1, [303]), initValues(_3C_classLit, 42, -1, [55349, 56666]), initValues(_3C_classLit, 42, -1, [953]), initValues(_3C_classLit, 42, -1, [10812]), initValues(_3C_classLit, 42, -1, [191]), initValues(_3C_classLit, 42, -1, [191]), initValues(_3C_classLit, 42, -1, [55349, 56510]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8953]), initValues(_3C_classLit, 42, -1, [8949]), initValues(_3C_classLit, 42, -1, [8948]), initValues(_3C_classLit, 42, -1, [8947]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8290]), initValues(_3C_classLit, 42, -1, [297]), initValues(_3C_classLit, 42, -1, [1110]), initValues(_3C_classLit, 42, -1, [239]), initValues(_3C_classLit, 42, -1, [239]), initValues(_3C_classLit, 42, -1, [309]), initValues(_3C_classLit, 42, -1, [1081]), initValues(_3C_classLit, 42, -1, [55349, 56615]), initValues(_3C_classLit, 42, -1, [567]), initValues(_3C_classLit, 42, -1, [55349, 56667]), initValues(_3C_classLit, 42, -1, [55349, 56511]), initValues(_3C_classLit, 42, -1, [1112]), initValues(_3C_classLit, 42, -1, [1108]), initValues(_3C_classLit, 42, -1, [954]), initValues(_3C_classLit, 42, -1, [1008]), initValues(_3C_classLit, 42, -1, [311]), initValues(_3C_classLit, 42, -1, [1082]), initValues(_3C_classLit, 42, -1, [55349, 56616]), initValues(_3C_classLit, 42, -1, [312]), initValues(_3C_classLit, 42, -1, [1093]), initValues(_3C_classLit, 42, -1, [1116]), initValues(_3C_classLit, 42, -1, [55349, 56668]), initValues(_3C_classLit, 42, -1, [55349, 56512]), initValues(_3C_classLit, 42, -1, [8666]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [10523]), initValues(_3C_classLit, 42, -1, [10510]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [10891]), initValues(_3C_classLit, 42, -1, [10594]), initValues(_3C_classLit, 42, -1, [314]), initValues(_3C_classLit, 42, -1, [10676]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [955]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [10641]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [10885]), initValues(_3C_classLit, 42, -1, [171]), initValues(_3C_classLit, 42, -1, [171]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8676]), initValues(_3C_classLit, 42, -1, [10527]), initValues(_3C_classLit, 42, -1, [10525]), initValues(_3C_classLit, 42, -1, [8617]), initValues(_3C_classLit, 42, -1, [8619]), initValues(_3C_classLit, 42, -1, [10553]), initValues(_3C_classLit, 42, -1, [10611]), initValues(_3C_classLit, 42, -1, [8610]), initValues(_3C_classLit, 42, -1, [10923]), initValues(_3C_classLit, 42, -1, [10521]), initValues(_3C_classLit, 42, -1, [10925]), initValues(_3C_classLit, 42, -1, [10508]), initValues(_3C_classLit, 42, -1, [10098]), initValues(_3C_classLit, 42, -1, [123]), initValues(_3C_classLit, 42, -1, [91]), initValues(_3C_classLit, 42, -1, [10635]), initValues(_3C_classLit, 42, -1, [10639]), initValues(_3C_classLit, 42, -1, [10637]), initValues(_3C_classLit, 42, -1, [318]), initValues(_3C_classLit, 42, -1, [316]), initValues(_3C_classLit, 42, -1, [8968]), initValues(_3C_classLit, 42, -1, [123]), initValues(_3C_classLit, 42, -1, [1083]), initValues(_3C_classLit, 42, -1, [10550]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [10599]), initValues(_3C_classLit, 42, -1, [10571]), initValues(_3C_classLit, 42, -1, [8626]), initValues(_3C_classLit, 42, -1, [8804]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8610]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [8647]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [8621]), initValues(_3C_classLit, 42, -1, [8907]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [8804]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [10920]), initValues(_3C_classLit, 42, -1, [10879]), initValues(_3C_classLit, 42, -1, [10881]), initValues(_3C_classLit, 42, -1, [10883]), initValues(_3C_classLit, 42, -1, [10899]), initValues(_3C_classLit, 42, -1, [10885]), initValues(_3C_classLit, 42, -1, [8918]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [10891]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [10620]), initValues(_3C_classLit, 42, -1, [8970]), initValues(_3C_classLit, 42, -1, [55349, 56617]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [10897]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [10602]), initValues(_3C_classLit, 42, -1, [9604]), initValues(_3C_classLit, 42, -1, [1113]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [8647]), initValues(_3C_classLit, 42, -1, [8990]), initValues(_3C_classLit, 42, -1, [10603]), initValues(_3C_classLit, 42, -1, [9722]), initValues(_3C_classLit, 42, -1, [320]), initValues(_3C_classLit, 42, -1, [9136]), initValues(_3C_classLit, 42, -1, [9136]), initValues(_3C_classLit, 42, -1, [8808]), initValues(_3C_classLit, 42, -1, [10889]), initValues(_3C_classLit, 42, -1, [10889]), initValues(_3C_classLit, 42, -1, [10887]), initValues(_3C_classLit, 42, -1, [10887]), initValues(_3C_classLit, 42, -1, [8808]), initValues(_3C_classLit, 42, -1, [8934]), initValues(_3C_classLit, 42, -1, [10220]), initValues(_3C_classLit, 42, -1, [8701]), initValues(_3C_classLit, 42, -1, [10214]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [10236]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [8619]), initValues(_3C_classLit, 42, -1, [8620]), initValues(_3C_classLit, 42, -1, [10629]), initValues(_3C_classLit, 42, -1, [55349, 56669]), initValues(_3C_classLit, 42, -1, [10797]), initValues(_3C_classLit, 42, -1, [10804]), initValues(_3C_classLit, 42, -1, [8727]), initValues(_3C_classLit, 42, -1, [95]), initValues(_3C_classLit, 42, -1, [9674]), initValues(_3C_classLit, 42, -1, [9674]), initValues(_3C_classLit, 42, -1, [10731]), initValues(_3C_classLit, 42, -1, [40]), initValues(_3C_classLit, 42, -1, [10643]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8991]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [10605]), initValues(_3C_classLit, 42, -1, [8206]), initValues(_3C_classLit, 42, -1, [8895]), initValues(_3C_classLit, 42, -1, [8249]), initValues(_3C_classLit, 42, -1, [55349, 56513]), initValues(_3C_classLit, 42, -1, [8624]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [10893]), initValues(_3C_classLit, 42, -1, [10895]), initValues(_3C_classLit, 42, -1, [91]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [322]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [10918]), initValues(_3C_classLit, 42, -1, [10873]), initValues(_3C_classLit, 42, -1, [8918]), initValues(_3C_classLit, 42, -1, [8907]), initValues(_3C_classLit, 42, -1, [8905]), initValues(_3C_classLit, 42, -1, [10614]), initValues(_3C_classLit, 42, -1, [10875]), initValues(_3C_classLit, 42, -1, [10646]), initValues(_3C_classLit, 42, -1, [9667]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [9666]), initValues(_3C_classLit, 42, -1, [10570]), initValues(_3C_classLit, 42, -1, [10598]), initValues(_3C_classLit, 42, -1, [8762]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [9794]), initValues(_3C_classLit, 42, -1, [10016]), initValues(_3C_classLit, 42, -1, [10016]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [8615]), initValues(_3C_classLit, 42, -1, [8612]), initValues(_3C_classLit, 42, -1, [8613]), initValues(_3C_classLit, 42, -1, [9646]), initValues(_3C_classLit, 42, -1, [10793]), initValues(_3C_classLit, 42, -1, [1084]), initValues(_3C_classLit, 42, -1, [8212]), initValues(_3C_classLit, 42, -1, [8737]), initValues(_3C_classLit, 42, -1, [55349, 56618]), initValues(_3C_classLit, 42, -1, [8487]), initValues(_3C_classLit, 42, -1, [181]), initValues(_3C_classLit, 42, -1, [181]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [42]), initValues(_3C_classLit, 42, -1, [10992]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [8722]), initValues(_3C_classLit, 42, -1, [8863]), initValues(_3C_classLit, 42, -1, [8760]), initValues(_3C_classLit, 42, -1, [10794]), initValues(_3C_classLit, 42, -1, [10971]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [8871]), initValues(_3C_classLit, 42, -1, [55349, 56670]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [55349, 56514]), initValues(_3C_classLit, 42, -1, [8766]), initValues(_3C_classLit, 42, -1, [956]), initValues(_3C_classLit, 42, -1, [8888]), initValues(_3C_classLit, 42, -1, [8888]), initValues(_3C_classLit, 42, -1, [8653]), initValues(_3C_classLit, 42, -1, [8654]), initValues(_3C_classLit, 42, -1, [8655]), initValues(_3C_classLit, 42, -1, [8879]), initValues(_3C_classLit, 42, -1, [8878]), initValues(_3C_classLit, 42, -1, [8711]), initValues(_3C_classLit, 42, -1, [324]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [329]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [9838]), initValues(_3C_classLit, 42, -1, [9838]), initValues(_3C_classLit, 42, -1, [8469]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [10819]), initValues(_3C_classLit, 42, -1, [328]), initValues(_3C_classLit, 42, -1, [326]), initValues(_3C_classLit, 42, -1, [8775]), initValues(_3C_classLit, 42, -1, [10818]), initValues(_3C_classLit, 42, -1, [1085]), initValues(_3C_classLit, 42, -1, [8211]), initValues(_3C_classLit, 42, -1, [8800]), initValues(_3C_classLit, 42, -1, [8663]), initValues(_3C_classLit, 42, -1, [10532]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [8802]), initValues(_3C_classLit, 42, -1, [10536]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [55349, 56619]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8821]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8654]), initValues(_3C_classLit, 42, -1, [8622]), initValues(_3C_classLit, 42, -1, [10994]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8956]), initValues(_3C_classLit, 42, -1, [8954]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [1114]), initValues(_3C_classLit, 42, -1, [8653]), initValues(_3C_classLit, 42, -1, [8602]), initValues(_3C_classLit, 42, -1, [8229]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8602]), initValues(_3C_classLit, 42, -1, [8622]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8820]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [55349, 56671]), initValues(_3C_classLit, 42, -1, [172]), initValues(_3C_classLit, 42, -1, [172]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8951]), initValues(_3C_classLit, 42, -1, [8950]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8958]), initValues(_3C_classLit, 42, -1, [8957]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [10772]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8928]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8655]), initValues(_3C_classLit, 42, -1, [8603]), initValues(_3C_classLit, 42, -1, [8603]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8929]), initValues(_3C_classLit, 42, -1, [55349, 56515]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8769]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8930]), initValues(_3C_classLit, 42, -1, [8931]), initValues(_3C_classLit, 42, -1, [8836]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8837]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8825]), initValues(_3C_classLit, 42, -1, [241]), initValues(_3C_classLit, 42, -1, [241]), initValues(_3C_classLit, 42, -1, [8824]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [957]), initValues(_3C_classLit, 42, -1, [35]), initValues(_3C_classLit, 42, -1, [8470]), initValues(_3C_classLit, 42, -1, [8199]), initValues(_3C_classLit, 42, -1, [8877]), initValues(_3C_classLit, 42, -1, [10500]), initValues(_3C_classLit, 42, -1, [8876]), initValues(_3C_classLit, 42, -1, [10718]), initValues(_3C_classLit, 42, -1, [10498]), initValues(_3C_classLit, 42, -1, [10499]), initValues(_3C_classLit, 42, -1, [8662]), initValues(_3C_classLit, 42, -1, [10531]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [10535]), initValues(_3C_classLit, 42, -1, [9416]), initValues(_3C_classLit, 42, -1, [243]), initValues(_3C_classLit, 42, -1, [243]), initValues(_3C_classLit, 42, -1, [8859]), initValues(_3C_classLit, 42, -1, [8858]), initValues(_3C_classLit, 42, -1, [244]), initValues(_3C_classLit, 42, -1, [244]), initValues(_3C_classLit, 42, -1, [1086]), initValues(_3C_classLit, 42, -1, [8861]), initValues(_3C_classLit, 42, -1, [337]), initValues(_3C_classLit, 42, -1, [10808]), initValues(_3C_classLit, 42, -1, [8857]), initValues(_3C_classLit, 42, -1, [10684]), initValues(_3C_classLit, 42, -1, [339]), initValues(_3C_classLit, 42, -1, [10687]), initValues(_3C_classLit, 42, -1, [55349, 56620]), initValues(_3C_classLit, 42, -1, [731]), initValues(_3C_classLit, 42, -1, [242]), initValues(_3C_classLit, 42, -1, [242]), initValues(_3C_classLit, 42, -1, [10689]), initValues(_3C_classLit, 42, -1, [10677]), initValues(_3C_classLit, 42, -1, [8486]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [8634]), initValues(_3C_classLit, 42, -1, [10686]), initValues(_3C_classLit, 42, -1, [10683]), initValues(_3C_classLit, 42, -1, [8254]), initValues(_3C_classLit, 42, -1, [10688]), initValues(_3C_classLit, 42, -1, [333]), initValues(_3C_classLit, 42, -1, [969]), initValues(_3C_classLit, 42, -1, [959]), initValues(_3C_classLit, 42, -1, [10678]), initValues(_3C_classLit, 42, -1, [8854]), initValues(_3C_classLit, 42, -1, [55349, 56672]), initValues(_3C_classLit, 42, -1, [10679]), initValues(_3C_classLit, 42, -1, [10681]), initValues(_3C_classLit, 42, -1, [8853]), initValues(_3C_classLit, 42, -1, [8744]), initValues(_3C_classLit, 42, -1, [8635]), initValues(_3C_classLit, 42, -1, [10845]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [170]), initValues(_3C_classLit, 42, -1, [170]), initValues(_3C_classLit, 42, -1, [186]), initValues(_3C_classLit, 42, -1, [186]), initValues(_3C_classLit, 42, -1, [8886]), initValues(_3C_classLit, 42, -1, [10838]), initValues(_3C_classLit, 42, -1, [10839]), initValues(_3C_classLit, 42, -1, [10843]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [248]), initValues(_3C_classLit, 42, -1, [248]), initValues(_3C_classLit, 42, -1, [8856]), initValues(_3C_classLit, 42, -1, [245]), initValues(_3C_classLit, 42, -1, [245]), initValues(_3C_classLit, 42, -1, [8855]), initValues(_3C_classLit, 42, -1, [10806]), initValues(_3C_classLit, 42, -1, [246]), initValues(_3C_classLit, 42, -1, [246]), initValues(_3C_classLit, 42, -1, [9021]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [182]), initValues(_3C_classLit, 42, -1, [182]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [10995]), initValues(_3C_classLit, 42, -1, [11005]), initValues(_3C_classLit, 42, -1, [8706]), initValues(_3C_classLit, 42, -1, [1087]), initValues(_3C_classLit, 42, -1, [37]), initValues(_3C_classLit, 42, -1, [46]), initValues(_3C_classLit, 42, -1, [8240]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8241]), initValues(_3C_classLit, 42, -1, [55349, 56621]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [9742]), initValues(_3C_classLit, 42, -1, [960]), initValues(_3C_classLit, 42, -1, [8916]), initValues(_3C_classLit, 42, -1, [982]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [8462]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [43]), initValues(_3C_classLit, 42, -1, [10787]), initValues(_3C_classLit, 42, -1, [8862]), initValues(_3C_classLit, 42, -1, [10786]), initValues(_3C_classLit, 42, -1, [8724]), initValues(_3C_classLit, 42, -1, [10789]), initValues(_3C_classLit, 42, -1, [10866]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [10790]), initValues(_3C_classLit, 42, -1, [10791]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [10773]), initValues(_3C_classLit, 42, -1, [55349, 56673]), initValues(_3C_classLit, 42, -1, [163]), initValues(_3C_classLit, 42, -1, [163]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10931]), initValues(_3C_classLit, 42, -1, [10935]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10935]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [10937]), initValues(_3C_classLit, 42, -1, [10933]), initValues(_3C_classLit, 42, -1, [8936]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8242]), initValues(_3C_classLit, 42, -1, [8473]), initValues(_3C_classLit, 42, -1, [10933]), initValues(_3C_classLit, 42, -1, [10937]), initValues(_3C_classLit, 42, -1, [8936]), initValues(_3C_classLit, 42, -1, [8719]), initValues(_3C_classLit, 42, -1, [9006]), initValues(_3C_classLit, 42, -1, [8978]), initValues(_3C_classLit, 42, -1, [8979]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8880]), initValues(_3C_classLit, 42, -1, [55349, 56517]), initValues(_3C_classLit, 42, -1, [968]), initValues(_3C_classLit, 42, -1, [8200]), initValues(_3C_classLit, 42, -1, [55349, 56622]), initValues(_3C_classLit, 42, -1, [10764]), initValues(_3C_classLit, 42, -1, [55349, 56674]), initValues(_3C_classLit, 42, -1, [8279]), initValues(_3C_classLit, 42, -1, [55349, 56518]), initValues(_3C_classLit, 42, -1, [8461]), initValues(_3C_classLit, 42, -1, [10774]), initValues(_3C_classLit, 42, -1, [63]), initValues(_3C_classLit, 42, -1, [8799]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [8667]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [10524]), initValues(_3C_classLit, 42, -1, [10511]), initValues(_3C_classLit, 42, -1, [10596]), initValues(_3C_classLit, 42, -1, [10714]), initValues(_3C_classLit, 42, -1, [341]), initValues(_3C_classLit, 42, -1, [8730]), initValues(_3C_classLit, 42, -1, [10675]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [10642]), initValues(_3C_classLit, 42, -1, [10661]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [187]), initValues(_3C_classLit, 42, -1, [187]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [10613]), initValues(_3C_classLit, 42, -1, [8677]), initValues(_3C_classLit, 42, -1, [10528]), initValues(_3C_classLit, 42, -1, [10547]), initValues(_3C_classLit, 42, -1, [10526]), initValues(_3C_classLit, 42, -1, [8618]), initValues(_3C_classLit, 42, -1, [8620]), initValues(_3C_classLit, 42, -1, [10565]), initValues(_3C_classLit, 42, -1, [10612]), initValues(_3C_classLit, 42, -1, [8611]), initValues(_3C_classLit, 42, -1, [8605]), initValues(_3C_classLit, 42, -1, [10522]), initValues(_3C_classLit, 42, -1, [8758]), initValues(_3C_classLit, 42, -1, [8474]), initValues(_3C_classLit, 42, -1, [10509]), initValues(_3C_classLit, 42, -1, [10099]), initValues(_3C_classLit, 42, -1, [125]), initValues(_3C_classLit, 42, -1, [93]), initValues(_3C_classLit, 42, -1, [10636]), initValues(_3C_classLit, 42, -1, [10638]), initValues(_3C_classLit, 42, -1, [10640]), initValues(_3C_classLit, 42, -1, [345]), initValues(_3C_classLit, 42, -1, [343]), initValues(_3C_classLit, 42, -1, [8969]), initValues(_3C_classLit, 42, -1, [125]), initValues(_3C_classLit, 42, -1, [1088]), initValues(_3C_classLit, 42, -1, [10551]), initValues(_3C_classLit, 42, -1, [10601]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8627]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8475]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8477]), initValues(_3C_classLit, 42, -1, [9645]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [10621]), initValues(_3C_classLit, 42, -1, [8971]), initValues(_3C_classLit, 42, -1, [55349, 56623]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [10604]), initValues(_3C_classLit, 42, -1, [961]), initValues(_3C_classLit, 42, -1, [1009]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8611]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8649]), initValues(_3C_classLit, 42, -1, [8605]), initValues(_3C_classLit, 42, -1, [8908]), initValues(_3C_classLit, 42, -1, [730]), initValues(_3C_classLit, 42, -1, [8787]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8207]), initValues(_3C_classLit, 42, -1, [9137]), initValues(_3C_classLit, 42, -1, [9137]), initValues(_3C_classLit, 42, -1, [10990]), initValues(_3C_classLit, 42, -1, [10221]), initValues(_3C_classLit, 42, -1, [8702]), initValues(_3C_classLit, 42, -1, [10215]), initValues(_3C_classLit, 42, -1, [10630]), initValues(_3C_classLit, 42, -1, [55349, 56675]), initValues(_3C_classLit, 42, -1, [10798]), initValues(_3C_classLit, 42, -1, [10805]), initValues(_3C_classLit, 42, -1, [41]), initValues(_3C_classLit, 42, -1, [10644]), initValues(_3C_classLit, 42, -1, [10770]), initValues(_3C_classLit, 42, -1, [8649]), initValues(_3C_classLit, 42, -1, [8250]), initValues(_3C_classLit, 42, -1, [55349, 56519]), initValues(_3C_classLit, 42, -1, [8625]), initValues(_3C_classLit, 42, -1, [93]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8908]), initValues(_3C_classLit, 42, -1, [8906]), initValues(_3C_classLit, 42, -1, [9657]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [9656]), initValues(_3C_classLit, 42, -1, [10702]), initValues(_3C_classLit, 42, -1, [10600]), initValues(_3C_classLit, 42, -1, [8478]), initValues(_3C_classLit, 42, -1, [347]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10932]), initValues(_3C_classLit, 42, -1, [10936]), initValues(_3C_classLit, 42, -1, [353]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [351]), initValues(_3C_classLit, 42, -1, [349]), initValues(_3C_classLit, 42, -1, [10934]), initValues(_3C_classLit, 42, -1, [10938]), initValues(_3C_classLit, 42, -1, [8937]), initValues(_3C_classLit, 42, -1, [10771]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [1089]), initValues(_3C_classLit, 42, -1, [8901]), initValues(_3C_classLit, 42, -1, [8865]), initValues(_3C_classLit, 42, -1, [10854]), initValues(_3C_classLit, 42, -1, [8664]), initValues(_3C_classLit, 42, -1, [10533]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [167]), initValues(_3C_classLit, 42, -1, [167]), initValues(_3C_classLit, 42, -1, [59]), initValues(_3C_classLit, 42, -1, [10537]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10038]), initValues(_3C_classLit, 42, -1, [55349, 56624]), initValues(_3C_classLit, 42, -1, [8994]), initValues(_3C_classLit, 42, -1, [9839]), initValues(_3C_classLit, 42, -1, [1097]), initValues(_3C_classLit, 42, -1, [1096]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [173]), initValues(_3C_classLit, 42, -1, [173]), initValues(_3C_classLit, 42, -1, [963]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [10858]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [10910]), initValues(_3C_classLit, 42, -1, [10912]), initValues(_3C_classLit, 42, -1, [10909]), initValues(_3C_classLit, 42, -1, [10911]), initValues(_3C_classLit, 42, -1, [8774]), initValues(_3C_classLit, 42, -1, [10788]), initValues(_3C_classLit, 42, -1, [10610]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10803]), initValues(_3C_classLit, 42, -1, [10724]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [8995]), initValues(_3C_classLit, 42, -1, [10922]), initValues(_3C_classLit, 42, -1, [10924]), initValues(_3C_classLit, 42, -1, [1100]), initValues(_3C_classLit, 42, -1, [47]), initValues(_3C_classLit, 42, -1, [10692]), initValues(_3C_classLit, 42, -1, [9023]), initValues(_3C_classLit, 42, -1, [55349, 56676]), initValues(_3C_classLit, 42, -1, [9824]), initValues(_3C_classLit, 42, -1, [9824]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [8851]), initValues(_3C_classLit, 42, -1, [8852]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [55349, 56520]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [8995]), initValues(_3C_classLit, 42, -1, [8902]), initValues(_3C_classLit, 42, -1, [9734]), initValues(_3C_classLit, 42, -1, [9733]), initValues(_3C_classLit, 42, -1, [1013]), initValues(_3C_classLit, 42, -1, [981]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [8834]), initValues(_3C_classLit, 42, -1, [10949]), initValues(_3C_classLit, 42, -1, [10941]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [10947]), initValues(_3C_classLit, 42, -1, [10945]), initValues(_3C_classLit, 42, -1, [10955]), initValues(_3C_classLit, 42, -1, [8842]), initValues(_3C_classLit, 42, -1, [10943]), initValues(_3C_classLit, 42, -1, [10617]), initValues(_3C_classLit, 42, -1, [8834]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [10949]), initValues(_3C_classLit, 42, -1, [8842]), initValues(_3C_classLit, 42, -1, [10955]), initValues(_3C_classLit, 42, -1, [10951]), initValues(_3C_classLit, 42, -1, [10965]), initValues(_3C_classLit, 42, -1, [10963]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10936]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [10938]), initValues(_3C_classLit, 42, -1, [10934]), initValues(_3C_classLit, 42, -1, [8937]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [8721]), initValues(_3C_classLit, 42, -1, [9834]), initValues(_3C_classLit, 42, -1, [185]), initValues(_3C_classLit, 42, -1, [185]), initValues(_3C_classLit, 42, -1, [178]), initValues(_3C_classLit, 42, -1, [178]), initValues(_3C_classLit, 42, -1, [179]), initValues(_3C_classLit, 42, -1, [179]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [10950]), initValues(_3C_classLit, 42, -1, [10942]), initValues(_3C_classLit, 42, -1, [10968]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [10948]), initValues(_3C_classLit, 42, -1, [10967]), initValues(_3C_classLit, 42, -1, [10619]), initValues(_3C_classLit, 42, -1, [10946]), initValues(_3C_classLit, 42, -1, [10956]), initValues(_3C_classLit, 42, -1, [8843]), initValues(_3C_classLit, 42, -1, [10944]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [10950]), initValues(_3C_classLit, 42, -1, [8843]), initValues(_3C_classLit, 42, -1, [10956]), initValues(_3C_classLit, 42, -1, [10952]), initValues(_3C_classLit, 42, -1, [10964]), initValues(_3C_classLit, 42, -1, [10966]), initValues(_3C_classLit, 42, -1, [8665]), initValues(_3C_classLit, 42, -1, [10534]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [10538]), initValues(_3C_classLit, 42, -1, [223]), initValues(_3C_classLit, 42, -1, [223]), initValues(_3C_classLit, 42, -1, [8982]), initValues(_3C_classLit, 42, -1, [964]), initValues(_3C_classLit, 42, -1, [9140]), initValues(_3C_classLit, 42, -1, [357]), initValues(_3C_classLit, 42, -1, [355]), initValues(_3C_classLit, 42, -1, [1090]), initValues(_3C_classLit, 42, -1, [8411]), initValues(_3C_classLit, 42, -1, [8981]), initValues(_3C_classLit, 42, -1, [55349, 56625]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [952]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [8201]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [254]), initValues(_3C_classLit, 42, -1, [254]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [215]), initValues(_3C_classLit, 42, -1, [215]), initValues(_3C_classLit, 42, -1, [8864]), initValues(_3C_classLit, 42, -1, [10801]), initValues(_3C_classLit, 42, -1, [10800]), initValues(_3C_classLit, 42, -1, [8749]), initValues(_3C_classLit, 42, -1, [10536]), initValues(_3C_classLit, 42, -1, [8868]), initValues(_3C_classLit, 42, -1, [9014]), initValues(_3C_classLit, 42, -1, [10993]), initValues(_3C_classLit, 42, -1, [55349, 56677]), initValues(_3C_classLit, 42, -1, [10970]), initValues(_3C_classLit, 42, -1, [10537]), initValues(_3C_classLit, 42, -1, [8244]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [9653]), initValues(_3C_classLit, 42, -1, [9663]), initValues(_3C_classLit, 42, -1, [9667]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [8796]), initValues(_3C_classLit, 42, -1, [9657]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [9708]), initValues(_3C_classLit, 42, -1, [8796]), initValues(_3C_classLit, 42, -1, [10810]), initValues(_3C_classLit, 42, -1, [10809]), initValues(_3C_classLit, 42, -1, [10701]), initValues(_3C_classLit, 42, -1, [10811]), initValues(_3C_classLit, 42, -1, [9186]), initValues(_3C_classLit, 42, -1, [55349, 56521]), initValues(_3C_classLit, 42, -1, [1094]), initValues(_3C_classLit, 42, -1, [1115]), initValues(_3C_classLit, 42, -1, [359]), initValues(_3C_classLit, 42, -1, [8812]), initValues(_3C_classLit, 42, -1, [8606]), initValues(_3C_classLit, 42, -1, [8608]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [10595]), initValues(_3C_classLit, 42, -1, [250]), initValues(_3C_classLit, 42, -1, [250]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [1118]), initValues(_3C_classLit, 42, -1, [365]), initValues(_3C_classLit, 42, -1, [251]), initValues(_3C_classLit, 42, -1, [251]), initValues(_3C_classLit, 42, -1, [1091]), initValues(_3C_classLit, 42, -1, [8645]), initValues(_3C_classLit, 42, -1, [369]), initValues(_3C_classLit, 42, -1, [10606]), initValues(_3C_classLit, 42, -1, [10622]), initValues(_3C_classLit, 42, -1, [55349, 56626]), initValues(_3C_classLit, 42, -1, [249]), initValues(_3C_classLit, 42, -1, [249]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [9600]), initValues(_3C_classLit, 42, -1, [8988]), initValues(_3C_classLit, 42, -1, [8988]), initValues(_3C_classLit, 42, -1, [8975]), initValues(_3C_classLit, 42, -1, [9720]), initValues(_3C_classLit, 42, -1, [363]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [371]), initValues(_3C_classLit, 42, -1, [55349, 56678]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [8846]), initValues(_3C_classLit, 42, -1, [965]), initValues(_3C_classLit, 42, -1, [978]), initValues(_3C_classLit, 42, -1, [965]), initValues(_3C_classLit, 42, -1, [8648]), initValues(_3C_classLit, 42, -1, [8989]), initValues(_3C_classLit, 42, -1, [8989]), initValues(_3C_classLit, 42, -1, [8974]), initValues(_3C_classLit, 42, -1, [367]), initValues(_3C_classLit, 42, -1, [9721]), initValues(_3C_classLit, 42, -1, [55349, 56522]), initValues(_3C_classLit, 42, -1, [8944]), initValues(_3C_classLit, 42, -1, [361]), initValues(_3C_classLit, 42, -1, [9653]), initValues(_3C_classLit, 42, -1, [9652]), initValues(_3C_classLit, 42, -1, [8648]), initValues(_3C_classLit, 42, -1, [252]), initValues(_3C_classLit, 42, -1, [252]), initValues(_3C_classLit, 42, -1, [10663]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [10984]), initValues(_3C_classLit, 42, -1, [10985]), initValues(_3C_classLit, 42, -1, [8872]), initValues(_3C_classLit, 42, -1, [10652]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [1008]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [982]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [1009]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [1074]), initValues(_3C_classLit, 42, -1, [8866]), initValues(_3C_classLit, 42, -1, [8744]), initValues(_3C_classLit, 42, -1, [8891]), initValues(_3C_classLit, 42, -1, [8794]), initValues(_3C_classLit, 42, -1, [8942]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [55349, 56627]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [55349, 56679]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [55349, 56523]), initValues(_3C_classLit, 42, -1, [10650]), initValues(_3C_classLit, 42, -1, [373]), initValues(_3C_classLit, 42, -1, [10847]), initValues(_3C_classLit, 42, -1, [8743]), initValues(_3C_classLit, 42, -1, [8793]), initValues(_3C_classLit, 42, -1, [8472]), initValues(_3C_classLit, 42, -1, [55349, 56628]), initValues(_3C_classLit, 42, -1, [55349, 56680]), initValues(_3C_classLit, 42, -1, [8472]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [55349, 56524]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [9711]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [9661]), initValues(_3C_classLit, 42, -1, [55349, 56629]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [958]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10236]), initValues(_3C_classLit, 42, -1, [8955]), initValues(_3C_classLit, 42, -1, [10752]), initValues(_3C_classLit, 42, -1, [55349, 56681]), initValues(_3C_classLit, 42, -1, [10753]), initValues(_3C_classLit, 42, -1, [10754]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [55349, 56525]), initValues(_3C_classLit, 42, -1, [10758]), initValues(_3C_classLit, 42, -1, [10756]), initValues(_3C_classLit, 42, -1, [9651]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [253]), initValues(_3C_classLit, 42, -1, [253]), initValues(_3C_classLit, 42, -1, [1103]), initValues(_3C_classLit, 42, -1, [375]), initValues(_3C_classLit, 42, -1, [1099]), initValues(_3C_classLit, 42, -1, [165]), initValues(_3C_classLit, 42, -1, [165]), initValues(_3C_classLit, 42, -1, [55349, 56630]), initValues(_3C_classLit, 42, -1, [1111]), initValues(_3C_classLit, 42, -1, [55349, 56682]), initValues(_3C_classLit, 42, -1, [55349, 56526]), initValues(_3C_classLit, 42, -1, [1102]), initValues(_3C_classLit, 42, -1, [255]), initValues(_3C_classLit, 42, -1, [255]), initValues(_3C_classLit, 42, -1, [378]), initValues(_3C_classLit, 42, -1, [382]), initValues(_3C_classLit, 42, -1, [1079]), initValues(_3C_classLit, 42, -1, [380]), initValues(_3C_classLit, 42, -1, [8488]), initValues(_3C_classLit, 42, -1, [950]), initValues(_3C_classLit, 42, -1, [55349, 56631]), initValues(_3C_classLit, 42, -1, [1078]), initValues(_3C_classLit, 42, -1, [8669]), initValues(_3C_classLit, 42, -1, [55349, 56683]), initValues(_3C_classLit, 42, -1, [55349, 56527]), initValues(_3C_classLit, 42, -1, [8205]), initValues(_3C_classLit, 42, -1, [8204])]);
 21713   WINDOWS_1252 = initValues(_3_3C_classLit, 52, 12, [initValues(_3C_classLit, 42, -1, [8364]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [402]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8224]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [710]), initValues(_3C_classLit, 42, -1, [8240]), initValues(_3C_classLit, 42, -1, [352]), initValues(_3C_classLit, 42, -1, [8249]), initValues(_3C_classLit, 42, -1, [338]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [381]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8211]), initValues(_3C_classLit, 42, -1, [8212]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [353]), initValues(_3C_classLit, 42, -1, [8250]), initValues(_3C_classLit, 42, -1, [339]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [382]), initValues(_3C_classLit, 42, -1, [376])]);
 21714 }
 21715 
 21716 var NAMES, VALUES_0, WINDOWS_1252;
 21717 function localEqualsBuffer(local, buf, offset, length){
 21718   var i;
 21719   if (local.length != length) {
 21720     return false;
 21721   }
 21722   for (i = 0; i < length; ++i) {
 21723     if (local.charCodeAt(i) != buf[offset + i]) {
 21724       return false;
 21725     }
 21726   }
 21727   return true;
 21728 }
 21729 
 21730 function lowerCaseLiteralEqualsIgnoreAsciiCaseString(lowerCaseLiteral, string){
 21731   var c0, c1, i;
 21732   if (string == null) {
 21733     return false;
 21734   }
 21735   if (lowerCaseLiteral.length != string.length) {
 21736     return false;
 21737   }
 21738   for (i = 0; i < lowerCaseLiteral.length; ++i) {
 21739     c0 = lowerCaseLiteral.charCodeAt(i);
 21740     c1 = string.charCodeAt(i);
 21741     if (c1 >= 65 && c1 <= 90) {
 21742       c1 += 32;
 21743     }
 21744     if (c0 != c1) {
 21745       return false;
 21746     }
 21747   }
 21748   return true;
 21749 }
 21750 
 21751 function lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(lowerCaseLiteral, string){
 21752   var c0, c1, i;
 21753   if (string == null) {
 21754     return false;
 21755   }
 21756   if (lowerCaseLiteral.length > string.length) {
 21757     return false;
 21758   }
 21759   for (i = 0; i < lowerCaseLiteral.length; ++i) {
 21760     c0 = lowerCaseLiteral.charCodeAt(i);
 21761     c1 = string.charCodeAt(i);
 21762     if (c1 >= 65 && c1 <= 90) {
 21763       c1 += 32;
 21764     }
 21765     if (c0 != c1) {
 21766       return false;
 21767     }
 21768   }
 21769   return true;
 21770 }
 21771 
 21772 function $StackNode(this$static, group, ns, name, node, scoping, special, fosterParenting, popName, attributes){
 21773   this$static.group = group;
 21774   this$static.name_0 = name;
 21775   this$static.popName = popName;
 21776   this$static.ns = ns;
 21777   this$static.node = node;
 21778   this$static.scoping = scoping;
 21779   this$static.special = special;
 21780   this$static.fosterParenting = fosterParenting;
 21781   this$static.attributes = attributes;
 21782   this$static.refcount = 1;
 21783   return this$static;
 21784 }
 21785 
 21786 function $StackNode_0(this$static, ns, elementName, node){
 21787   this$static.group = elementName.group;
 21788   this$static.name_0 = elementName.name_0;
 21789   this$static.popName = elementName.name_0;
 21790   this$static.ns = ns;
 21791   this$static.node = node;
 21792   this$static.scoping = elementName.scoping;
 21793   this$static.special = elementName.special;
 21794   this$static.fosterParenting = elementName.fosterParenting;
 21795   this$static.attributes = null;
 21796   this$static.refcount = 1;
 21797   return this$static;
 21798 }
 21799 
 21800 function $StackNode_3(this$static, ns, elementName, node, attributes){
 21801   this$static.group = elementName.group;
 21802   this$static.name_0 = elementName.name_0;
 21803   this$static.popName = elementName.name_0;
 21804   this$static.ns = ns;
 21805   this$static.node = node;
 21806   this$static.scoping = elementName.scoping;
 21807   this$static.special = elementName.special;
 21808   this$static.fosterParenting = elementName.fosterParenting;
 21809   this$static.attributes = attributes;
 21810   this$static.refcount = 1;
 21811   return this$static;
 21812 }
 21813 
 21814 function $StackNode_1(this$static, ns, elementName, node, popName){
 21815   this$static.group = elementName.group;
 21816   this$static.name_0 = elementName.name_0;
 21817   this$static.popName = popName;
 21818   this$static.ns = ns;
 21819   this$static.node = node;
 21820   this$static.scoping = elementName.scoping;
 21821   this$static.special = elementName.special;
 21822   this$static.fosterParenting = elementName.fosterParenting;
 21823   this$static.attributes = null;
 21824   this$static.refcount = 1;
 21825   return this$static;
 21826 }
 21827 
 21828 function $StackNode_2(this$static, ns, elementName, node, popName, scoping){
 21829   this$static.group = elementName.group;
 21830   this$static.name_0 = elementName.name_0;
 21831   this$static.popName = popName;
 21832   this$static.ns = ns;
 21833   this$static.node = node;
 21834   this$static.scoping = scoping;
 21835   this$static.special = false;
 21836   this$static.fosterParenting = false;
 21837   this$static.attributes = null;
 21838   this$static.refcount = 1;
 21839   return this$static;
 21840 }
 21841 
 21842 function getClass_55(){
 21843   return Lnu_validator_htmlparser_impl_StackNode_2_classLit;
 21844 }
 21845 
 21846 function toString_11(){
 21847   return this.name_0;
 21848 }
 21849 
 21850 function StackNode(){
 21851 }
 21852 
 21853 _ = StackNode.prototype = new Object_0();
 21854 _.getClass$ = getClass_55;
 21855 _.toString$ = toString_11;
 21856 _.typeId$ = 38;
 21857 _.attributes = null;
 21858 _.fosterParenting = false;
 21859 _.group = 0;
 21860 _.name_0 = null;
 21861 _.node = null;
 21862 _.ns = null;
 21863 _.popName = null;
 21864 _.refcount = 1;
 21865 _.scoping = false;
 21866 _.special = false;
 21867 function $UTF16Buffer(this$static, buffer, start, end){
 21868   this$static.buffer = buffer;
 21869   this$static.start = start;
 21870   this$static.end = end;
 21871   return this$static;
 21872 }
 21873 
 21874 function $adjust(this$static, lastWasCR){
 21875   if (lastWasCR && this$static.buffer[this$static.start] == 10) {
 21876     ++this$static.start;
 21877   }
 21878 }
 21879 
 21880 function getClass_58(){
 21881   return Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit;
 21882 }
 21883 
 21884 function UTF16Buffer(){
 21885 }
 21886 
 21887 _ = UTF16Buffer.prototype = new Object_0();
 21888 _.getClass$ = getClass_58;
 21889 _.typeId$ = 39;
 21890 _.buffer = null;
 21891 _.end = 0;
 21892 _.start = 0;
 21893 function $SAXException(this$static, message){
 21894   this$static.detailMessage = message;
 21895   this$static.exception = null;
 21896   return this$static;
 21897 }
 21898 
 21899 function $getMessage(this$static){
 21900   var message;
 21901   message = this$static.detailMessage;
 21902   if (message == null && !!this$static.exception) {
 21903     return this$static.exception.detailMessage;
 21904   }
 21905    else {
 21906     return message;
 21907   }
 21908 }
 21909 
 21910 function getClass_59(){
 21911   return Lorg_xml_sax_SAXException_2_classLit;
 21912 }
 21913 
 21914 function getMessage_0(){
 21915   return $getMessage(this);
 21916 }
 21917 
 21918 function toString_12(){
 21919   if (this.exception) {
 21920     return $toString_1(this.exception);
 21921   }
 21922    else {
 21923     return $toString_1(this);
 21924   }
 21925 }
 21926 
 21927 function SAXException(){
 21928 }
 21929 
 21930 _ = SAXException.prototype = new Exception();
 21931 _.getClass$ = getClass_59;
 21932 _.getMessage = getMessage_0;
 21933 _.toString$ = toString_12;
 21934 _.typeId$ = 40;
 21935 _.exception = null;
 21936 function $SAXParseException(this$static, message, locator){
 21937   this$static.detailMessage = message;
 21938   this$static.exception = null;
 21939   if (locator) {
 21940     $getLineNumber(locator);
 21941     $getColumnNumber(locator);
 21942   }
 21943    else {
 21944   }
 21945   return this$static;
 21946 }
 21947 
 21948 function $SAXParseException_0(this$static, message, locator, e){
 21949   this$static.detailMessage = message;
 21950   this$static.exception = e;
 21951   if (locator) {
 21952     $getLineNumber(locator);
 21953     $getColumnNumber(locator);
 21954   }
 21955    else {
 21956   }
 21957   return this$static;
 21958 }
 21959 
 21960 function getClass_60(){
 21961   return Lorg_xml_sax_SAXParseException_2_classLit;
 21962 }
 21963 
 21964 function SAXParseException(){
 21965 }
 21966 
 21967 _ = SAXParseException.prototype = new SAXException();
 21968 _.getClass$ = getClass_60;
 21969 _.typeId$ = 41;
 21970 function init_0(){
 21971   !!$stats && $stats({moduleName:$moduleName, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date()).getTime(), type:'onModuleLoadStart', className:'nu.validator.htmlparser.gwt.HtmlParserModule'});
 21972   Envjs.parseHtmlDocument = parseHtmlDocument;
 21973 }
 21974 
 21975 __defineParser__ = function gwtOnLoad(errFn, modName, modBase){
 21976   $moduleName = modName;
 21977   $moduleBase = modBase;
 21978   if (errFn)
 21979     try {
 21980       init_0();
 21981     }
 21982      catch (e) {
 21983       errFn(modName);
 21984     }
 21985    else {
 21986     init_0();
 21987   }
 21988 }
 21989 
 21990 function nullMethod(){
 21991 }
 21992 
 21993 var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object'), Lcom_google_gwt_user_client_Timer_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer'), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable'), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception'), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException'), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException'), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$'), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;'), Ljava_lang_Enum_2_classLit = createForClass('java.lang.', 'Enum'), _3_3D_classLit = createForArray('', '[[D'), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection'), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList'), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList'), Lcom_google_gwt_user_client_Timer$1_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer$1'), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException'), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException'), _3C_classLit = createForArray('', '[C'), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class'), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException'), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException'), _3I_classLit = createForArray('', '[I'), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException'), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String'), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer'), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder'), Ljava_lang_StringIndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'StringIndexOutOfBoundsException'), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException'), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;'), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap'), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap'), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet'), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet'), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator'), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry'), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull'), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString'), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl'), Ljava_util_AbstractList$ListIteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$ListIteratorImpl'), Ljava_util_AbstractSequentialList_2_classLit = createForClass('java.util.', 'AbstractSequentialList'), Ljava_util_Comparators$1_2_classLit = createForClass('java.util.', 'Comparators$1'), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap'), Ljava_util_LinkedList_2_classLit = createForClass('java.util.', 'LinkedList'), Ljava_util_LinkedList$ListIteratorImpl_2_classLit = createForClass('java.util.', 'LinkedList$ListIteratorImpl'), Ljava_util_LinkedList$Node_2_classLit = createForClass('java.util.', 'LinkedList$Node'), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException'), Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DoctypeExpectation'), Lnu_validator_htmlparser_common_DocumentMode_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DocumentMode'), Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'XmlViolationPolicy'), Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'TreeBuilder'), Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'CoalescingTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder$ScriptHolder'), Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser'), Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser$1'), Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'ParseEndListener'), _3Z_classLit = createForArray('', '[Z'), _3Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'AttributeName;'), Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'AttributeName'), _3Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'ElementName;'), Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ElementName'), Lnu_validator_htmlparser_impl_Tokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'Tokenizer'), Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ErrorReportingTokenizer'), Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'HtmlAttributes'), Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'LocatorImpl'), _3_3C_classLit = createForArray('', '[[C'), Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'StackNode'), _3Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'StackNode;'), Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'UTF16Buffer'), Lorg_xml_sax_SAXException_2_classLit = createForClass('org.xml.sax.', 'SAXException'), Lorg_xml_sax_SAXParseException_2_classLit = createForClass('org.xml.sax.', 'SAXParseException');
 21994 if (false) {  var __gwt_initHandlers = nu_validator_htmlparser_HtmlParser.__gwt_initHandlers;  nu_validator_htmlparser_HtmlParser.onScriptLoad(gwtOnLoad);}})();
 21995 
 21996 /**
 21997 * DOMParser
 21998 */
 21999 
 22000 __defineParser__(function(e){
 22001     console.log('Error loading html 5 parser implementation');
 22002 }, 'nu_validator_htmlparser_HtmlParser', '');
 22003 
 22004 /*DOMParser = function(principle, documentURI, baseURI){};
 22005 __extend__(DOMParser.prototype,{
 22006     parseFromString: function(xmlstring, mimetype){
 22007         //console.log('DOMParser.parseFromString %s', mimetype);
 22008         var xmldoc = new Document(new DOMImplementation());
 22009         return XMLParser.parseDocument(xmlstring, xmldoc, mimetype);
 22010     }
 22011 });*/
 22012 
 22013 XMLParser.parseDocument = function(xmlstring, xmldoc, mimetype){
 22014     //console.log('XMLParser.parseDocument');
 22015     var tmpdoc = new Document(new DOMImplementation()),
 22016         parent,
 22017         importedNode,
 22018         tmpNode;
 22019 
 22020     if(mimetype && mimetype == 'text/xml'){
 22021         //console.log('mimetype: text/xml');
 22022         tmpdoc.baseURI = 'http://envjs.com/xml';
 22023         xmlstring = '<html><head></head><body>'+
 22024             '<envjs_1234567890 xmlns="envjs_1234567890">'
 22025                 +xmlstring+
 22026             '</envjs_1234567890>'+
 22027         '</body></html>';
 22028         Envjs.parseHtmlDocument(xmlstring, tmpdoc, false, null, null);
 22029         parent = tmpdoc.getElementsByTagName('envjs_1234567890')[0];
 22030     }else{
 22031         Envjs.parseHtmlDocument(xmlstring, tmpdoc, false, null, null);
 22032         parent = tmpdoc.documentElement;
 22033     }
 22034 
 22035     while(xmldoc.firstChild != null){
 22036         xmldoc.removeChild( xmldoc.firstChild );
 22037     }
 22038     while(parent.firstChild != null){
 22039         tmpNode  = parent.removeChild( parent.firstChild );
 22040         importedNode = xmldoc.importNode( tmpNode, true);
 22041         xmldoc.appendChild( importedNode );
 22042     }
 22043     return xmldoc;
 22044 };
 22045 
 22046 var __fragmentCache__ = {length:0},
 22047     __cachable__ = 255;
 22048 
 22049 HTMLParser.parseDocument = function(htmlstring, htmldoc){
 22050     //console.log('HTMLParser.parseDocument %s', htmldoc.async);
 22051     htmldoc.parsing = true;
 22052     Envjs.parseHtmlDocument(htmlstring, htmldoc, htmldoc.async, null, null);
 22053     //Envjs.wait(-1);
 22054     return htmldoc;
 22055 };
 22056 HTMLParser.parseFragment = function(htmlstring, element){
 22057     //console.log('HTMLParser.parseFragment')
 22058     // fragment is allowed to be an element as well
 22059     var tmpdoc,
 22060         parent,
 22061         importedNode,
 22062         tmpNode,
 22063         length,
 22064         i,
 22065         docstring;
 22066     //console.log('parsing fragment: %s', htmlstring);
 22067     //console.log('__fragmentCache__.length %s', __fragmentCache__.length)
 22068     if( htmlstring.length > __cachable__ && htmlstring in __fragmentCache__){
 22069         tmpdoc = __fragmentCache__[htmlstring];
 22070     }else{
 22071         //console.log('parsing html fragment \n%s', htmlstring);
 22072         tmpdoc = new HTMLDocument(new DOMImplementation());
 22073 
 22074 
 22075         // Need some indicator that this document isn't THE document
 22076         // to fire off img.src change events and other items.
 22077         // Otherwise, what happens is the tmpdoc fires and img.src
 22078         // event, then when it's all imported to the original document
 22079         // it happens again.
 22080 
 22081         tmpdoc.fragment = true;
 22082 
 22083         //preserves leading white space
 22084         docstring = '<html><head></head><body>'+
 22085             '<envjs_1234567890 xmlns="envjs_1234567890">'
 22086                 +htmlstring+
 22087             '</envjs_1234567890>'+
 22088         '</body></html>';
 22089         Envjs.parseHtmlDocument(docstring,tmpdoc, false, null,null);
 22090         if(htmlstring.length > __cachable__ ){
 22091             tmpdoc.normalizeDocument();
 22092             __fragmentCache__[htmlstring] = tmpdoc;
 22093             __fragmentCache__.length += htmlstring.length;
 22094             tmpdoc.cached = true;
 22095         }else{
 22096             tmpdoc.cached = false;
 22097         }
 22098     }
 22099 
 22100     //parent is envjs_1234567890 element
 22101     parent = tmpdoc.body.childNodes[0];
 22102     while(element.firstChild != null){
 22103         //zap the elements children so we can import
 22104         element.removeChild( element.firstChild );
 22105     }
 22106 
 22107     if(tmpdoc.cached){
 22108         length = parent.childNodes.length;
 22109         for(i=0;i<length;i++){
 22110             importedNode = element.importNode( parent.childNodes[i], true );
 22111             element.appendChild( importedNode );
 22112         }
 22113     }else{
 22114         while(parent.firstChild != null){
 22115             tmpNode  = parent.removeChild( parent.firstChild );
 22116             importedNode = element.importNode( tmpNode, true);
 22117             element.appendChild( importedNode );
 22118         }
 22119     }
 22120 
 22121     // console.log('finished fragment: %s', element.outerHTML);
 22122     return element;
 22123 };
 22124 
 22125 var __clearFragmentCache__ = function(){
 22126     __fragmentCache__ = {};
 22127 }
 22128 
 22129 
 22130 /**
 22131  * @name Document
 22132  * @w3c:domlevel 2 
 22133  * @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
 22134  */
 22135 __extend__(Document.prototype, {
 22136     loadXML : function(xmlString) {
 22137         //console.log('Parser::Document.loadXML');
 22138         // create Document
 22139         if(this === document){
 22140             //$debug("Setting internal window.document");
 22141             document = this;
 22142         }
 22143         // populate Document
 22144         try {
 22145             // make sure this document object is empty before we try to load ...
 22146             this.attributes      = new NamedNodeMap(this, this);
 22147             this._namespaces     = new NamespaceNodeMap(this, this);
 22148             this._readonly = false;
 22149 
 22150             XMLParser.parseDocument(xmlString, this);
 22151             
 22152             Envjs.wait(-1);
 22153         } catch (e) {
 22154             //$error(e);
 22155         }
 22156         return this;
 22157     }
 22158 });
 22159 
 22160 
 22161 __extend__(HTMLDocument.prototype, {
 22162 
 22163     open : function() {
 22164         //console.log('opening doc for write.');
 22165         if (! this._writebuffer) {
 22166             this._writebuffer = [];
 22167         }
 22168     },
 22169     close : function() {
 22170         //console.log('closing doc.');
 22171         if (this._writebuffer) {
 22172             HTMLParser.parseDocument(this._writebuffer.join(''), this);
 22173             this._writebuffer = null;
 22174             //console.log('finished writing doc.');
 22175         }
 22176     },
 22177 
 22178     /**
 22179      * http://dev.w3.org/html5/spec/Overview.html#document.write
 22180      */
 22181     write: function(htmlstring) {
 22182         //console.log('writing doc.');
 22183         this.open();
 22184         this._writebuffer.push(htmlstring);
 22185     },
 22186 
 22187     /**
 22188      * http://dev.w3.org/html5/spec/Overview.html#dom-document-writeln
 22189      */
 22190     writeln: function(htmlstring) {
 22191         this.open();
 22192         this._writebuffer.push(htmlstring + '\n');
 22193     }
 22194 });
 22195 
 22196 /**
 22197  * elementPopped is called by the parser in two cases
 22198  *
 22199  * - an 'tag' is * complete (all children process and end tag, real or
 22200  *   implied is * processed)
 22201  * - a replaceElement happens (this happens by making placeholder
 22202  *   nodes and then the real one is swapped in.
 22203  *
 22204  */
 22205 var __elementPopped__ = function(ns, name, node){
 22206     //console.log('popped html element %s %s %s', ns, name, node);
 22207     var doc = node.ownerDocument,
 22208         okay,
 22209         event;
 22210     switch(doc.parsing){
 22211         case false:
 22212             //innerHTML so dont do loading patterns for parsing
 22213             //console.log('element popped (implies innerHTML) not in parsing mode %s', node.nodeName);
 22214             break;
 22215         case true:
 22216             switch(doc+''){
 22217                 case '[object XMLDocument]':
 22218                     break;
 22219                 case '[object HTMLDocument]':
 22220                     switch(node.namespaceURI){
 22221                         case "http://n.validator.nu/placeholder/":
 22222                             //console.log('got script during parsing %s', node.textContent);
 22223                             break;
 22224                         case null:
 22225                         case "":
 22226                         case "http://www.w3.org/1999/xhtml":
 22227                             switch(name.toLowerCase()){
 22228                                 case 'script':
 22229                                     try{
 22230                                         okay = Envjs.loadLocalScript(node, null);
 22231                                         // console.log('loaded script? %s %s', node.uuid, okay);
 22232                                         // only fire event if we actually had something to load
 22233                                         if (node.src && node.src.length > 0){
 22234                                             event = doc.createEvent('HTMLEvents');
 22235                                             event.initEvent( okay ? "load" : "error", false, false );
 22236                                             node.dispatchEvent( event, false );
 22237                                         }
 22238                                     }catch(e){
 22239                                         console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
 22240                                     }
 22241                                     break;
 22242                                 case 'frame':
 22243                                 case 'iframe':
 22244                                     node.contentWindow = { };
 22245                                     node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
 22246                                     node.contentWindow.document = node.contentDocument;
 22247                                     try{
 22248                                         Window;
 22249                                     }catch(e){
 22250                                         node.contentDocument.addEventListener('DOMContentLoaded', function(){
 22251                                             event = node.contentDocument.createEvent('HTMLEvents');
 22252                                             event.initEvent("load", false, false);
 22253                                             node.dispatchEvent( event, false );
 22254                                         });
 22255                                     }
 22256                                     try{
 22257                                         if (node.src && node.src.length > 0){
 22258                                             //console.log("getting content document for (i)frame from %s", node.src);
 22259                                             Envjs.loadFrame(node, Envjs.uri(node.src));
 22260                                             event = node.contentDocument.createEvent('HTMLEvents');
 22261                                             event.initEvent("load", false, false);
 22262                                             node.dispatchEvent( event, false );
 22263                                         }else{
 22264                                             //I dont like this being here:
 22265                                             //TODO: better  mix-in strategy so the try/catch isnt required
 22266                                             try{
 22267                                                 if(Window){
 22268                                                     Envjs.loadFrame(node);
 22269                                                     //console.log('src/html/document.js: triggering frame load');
 22270                                                     event = node.contentDocument.createEvent('HTMLEvents');
 22271                                                     event.initEvent("load", false, false);
 22272                                                     node.dispatchEvent( event, false );
 22273                                                 }
 22274                                             }catch(e){}
 22275                                         }
 22276                                     }catch(e){
 22277                                         console.log('error loading html element %s %e', node, e.toString());
 22278                                     }
 22279                                     /*try{
 22280                                         if (node.src && node.src.length > 0){
 22281                                             //console.log("getting content document for (i)frame from %s", node.src);
 22282                                             Envjs.loadFrame(node, Envjs.uri(node.src));
 22283                                             event = node.ownerDocument.createEvent('HTMLEvents');
 22284                                             event.initEvent("load", false, false);
 22285                                             node.dispatchEvent( event, false );
 22286                                         }else{
 22287                                             //console.log('src/parser/htmldocument: triggering frame load (no src)');
 22288                                         }
 22289                                     }catch(e){
 22290                                         console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
 22291                                     }*/
 22292                                     break;
 22293                                 case 'link':
 22294                                     if (node.href) {
 22295                                         __loadLink__(node, node.href);
 22296                                     }
 22297                                     break;
 22298                                 case 'option':
 22299                                     node._updateoptions();
 22300                                     break;
 22301                                 case 'img':
 22302                                     if (node.src){
 22303                                         __loadImage__(node, node.src);
 22304                                     }
 22305                                     break;
 22306                                 case 'html':
 22307                                     //console.log('html popped');
 22308                                     doc.parsing = false;
 22309                                     //DOMContentLoaded event
 22310                                     // try{
 22311                                         if(doc.createEvent){
 22312                                             event = doc.createEvent('Events');
 22313                                             event.initEvent("DOMContentLoaded", false, false);
 22314                                             doc.dispatchEvent( event, false );
 22315                                         }
 22316                                     /* }catch(e){
 22317                                         console.log('%s', e);
 22318                                     } */
 22319                                     try{
 22320                                         if(doc.createEvent){
 22321                                             event = doc.createEvent('HTMLEvents');
 22322                                             event.initEvent("load", false, false);
 22323                                             doc.dispatchEvent( event, false );
 22324                                         }
 22325                                     }catch(e){
 22326                                         console.log('%s', e);
 22327                                     }
 22328 
 22329                                     try{
 22330                                         if(doc.parentWindow){
 22331                                             event = doc.createEvent('HTMLEvents');
 22332                                             event.initEvent("load", false, false);
 22333                                             doc.parentWindow.dispatchEvent( event, false );
 22334                                         }
 22335                                     }catch(e){
 22336                                         console.log('%s', e);
 22337                                     }
 22338                                     try{
 22339                                         if(doc === window.document){
 22340                                             //console.log('triggering window.load')
 22341                                             event = doc.createEvent('HTMLEvents');
 22342                                             event.initEvent("load", false, false);
 22343                                             try{
 22344                                                 window.dispatchEvent( event, false );
 22345                                             }catch(e){
 22346                                                 console.log('%s', e);
 22347                                             }
 22348                                         }
 22349                                     }catch(e){
 22350                                         //console.log('%s', e);
 22351                                         //swallow
 22352                                     }
 22353                                 default:
 22354                                     if(node.getAttribute('onload')){
 22355                                         //console.log('%s onload', node);
 22356                                         node.onload();
 22357                                     }
 22358                                     break;
 22359                             }//switch on name
 22360                         default:
 22361                             break;
 22362                     }//switch on ns
 22363                     break;
 22364                 default:
 22365                     console.log('element popped: %s %s', ns, name, node.ownerDocument+'');
 22366             }//switch on doc type
 22367         default:
 22368             break;
 22369     }//switch on parsing
 22370 };
 22371 
 22372 __extend__(HTMLElement.prototype,{
 22373     set innerHTML(html){
 22374         HTMLParser.parseFragment(html, this);
 22375     }
 22376 });
 22377 
 22378 /**
 22379  * @author john resig & the envjs team
 22380  * @uri http://www.envjs.com/
 22381  * @copyright 2008-2010
 22382  * @license MIT
 22383  */
 22384 //CLOSURE_END
 22385 }());
 22386 /*
 22387  * Envjs xhr.1.2.13 
 22388  * Pure JavaScript Browser Environment
 22389  * By John Resig <http://ejohn.org/> and the Envjs Team
 22390  * Copyright 2008-2010 John Resig, under the MIT License
 22391  * 
 22392  * Parts of the implementation originally written by Yehuda Katz.
 22393  * 
 22394  * This file simply provides the global definitions we need to 
 22395  * be able to correctly implement to core browser (XML)HTTPRequest 
 22396  * interfaces.
 22397  */
 22398 var Location,
 22399     XMLHttpRequest;
 22400 
 22401 /*
 22402  * Envjs xhr.1.2.13 
 22403  * Pure JavaScript Browser Environment
 22404  * By John Resig <http://ejohn.org/> and the Envjs Team
 22405  * Copyright 2008-2010 John Resig, under the MIT License
 22406  */
 22407 
 22408 //CLOSURE_START
 22409 (function(){
 22410 
 22411 
 22412 
 22413 
 22414 
 22415 /**
 22416  * @author john resig
 22417  */
 22418 // Helper method for extending one object with another.
 22419 function __extend__(a,b) {
 22420     for ( var i in b ) {
 22421         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
 22422         if ( g || s ) {
 22423             if ( g ) { a.__defineGetter__(i, g); }
 22424             if ( s ) { a.__defineSetter__(i, s); }
 22425         } else {
 22426             a[i] = b[i];
 22427         }
 22428     } return a;
 22429 }
 22430 
 22431 /**
 22432  * @author john resig
 22433  */
 22434 //from jQuery
 22435 function __setArray__( target, array ) {
 22436     // Resetting the length to 0, then using the native Array push
 22437     // is a super-fast way to populate an object with array-like properties
 22438     target.length = 0;
 22439     Array.prototype.push.apply( target, array );
 22440 }
 22441 
 22442 /**
 22443  * @author ariel flesler
 22444  *    http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
 22445  * @param {Object} str
 22446  */
 22447 function __trim__( str ){
 22448     return (str || "").replace( /^\s+|\s+$/g, "" );
 22449 }
 22450 
 22451 
 22452 /**
 22453  * @todo: document
 22454  */
 22455 __extend__(Document.prototype,{
 22456     load: function(url){
 22457         if(this.documentURI == 'about:html'){
 22458             this.location.assign(url);
 22459         }else if(this.documentURI == url){
 22460             this.location.reload(false);
 22461         }else{
 22462             this.location.replace(url);
 22463         }
 22464     },
 22465     get location(){
 22466         return new Location(this.documentURI, this);
 22467     },
 22468     set location(url){
 22469         //very important or you will go into an infinite
 22470         //loop when creating a xml document
 22471         if(url) {
 22472             this.location.replace(url);
 22473         }
 22474     }
 22475 });
 22476 
 22477 
 22478 HTMLFormElement.prototype.submit = function(){
 22479     var event = __submit__(this),
 22480         serialized,
 22481         xhr,
 22482         method,
 22483         action;
 22484     if(!event.cancelled){
 22485         serialized = __formSerialize__(this);
 22486         xhr = new XMLHttpRequest();
 22487         method = this.method !== ""?this.method:"GET";
 22488         action = this.action !== ""?this.action:this.ownerDocument.baseURI;
 22489         xhr.open(method, action, false);
 22490         xhr.send(data, false);
 22491         if(xhr.readyState === 4){
 22492             __exchangeHTMLDocument__(this.ownerDocument, xhr.responseText, url);
 22493         }
 22494     }
 22495 };
 22496 
 22497 /**
 22498  * Form Submissions
 22499  *
 22500  * This code is borrow largely from jquery.params and jquery.form.js
 22501  *
 22502  * formToArray() gathers form element data into an array of objects that can
 22503  * be passed to any of the following ajax functions: $.get, $.post, or load.
 22504  * Each object in the array has both a 'name' and 'value' property.  An example of
 22505  * an array for a simple login form might be:
 22506  *
 22507  * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 22508  *
 22509  * It is this array that is passed to pre-submit callback functions provided to the
 22510  * ajaxSubmit() and ajaxForm() methods.
 22511  *
 22512  * The semantic argument can be used to force form serialization in semantic order.
 22513  * This is normally true anyway, unless the form contains input elements of type='image'.
 22514  * If your form must be submitted with name/value pairs in semantic order and your form
 22515  * contains an input of type='image" then pass true for this arg, otherwise pass false
 22516  * (or nothing) to avoid the overhead for this logic.
 22517  *
 22518  *
 22519  * @name formToArray
 22520  * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 22521  * @type Array<Object>
 22522  */
 22523 var __formToArray__ = function(form, semantic) {
 22524     var array = [],
 22525         elements = semantic ? form.getElementsByTagName('*') : form.elements,
 22526         element,
 22527         i,j,imax, jmax,
 22528         name,
 22529         value;
 22530 
 22531     if (!elements) {
 22532         return array;
 22533     }
 22534 
 22535     imax = elements.length;
 22536     for(i=0; i < imax; i++) {
 22537         element = elements[i];
 22538         name = element.name;
 22539         if (!name) {
 22540             continue;
 22541         }
 22542         if (semantic && form.clk && element.type === "image") {
 22543             // handle image inputs on the fly when semantic == true
 22544             if(!element.disabled && form.clk == element) {
 22545                 array.push({
 22546                     name: name+'.x',
 22547                     value: form.clk_x
 22548                 },{
 22549                     name: name+'.y',
 22550                     value: form.clk_y
 22551                 });
 22552             }
 22553             continue;
 22554         }
 22555 
 22556         value = __fieldValue__(element, true);
 22557         if (value && value.constructor == Array) {
 22558             jmax = value.length;
 22559             for(j=0; j < jmax; j++){
 22560                 array.push({name: name, value: value[j]});
 22561             }
 22562         } else if (value !== null && typeof value != 'undefined'){
 22563             array.push({name: name, value: value});
 22564         }
 22565     }
 22566 
 22567     if (!semantic && form.clk) {
 22568         // input type=='image' are not found in elements array! handle them here
 22569         elements = form.getElementsByTagName("input");
 22570         imax = imax=elements.length;
 22571         for(i=0; i < imax; i++) {
 22572             element = elements[i];
 22573             name = element.name;
 22574             if(name && !element.disabled && element.type == "image" && form.clk == input) {
 22575                 array.push(
 22576                     {name: name+'.x', value: form.clk_x},
 22577                     {name: name+'.y', value: form.clk_y});
 22578             }
 22579         }
 22580     }
 22581     return array;
 22582 };
 22583 
 22584 
 22585 /**
 22586  * Serializes form data into a 'submittable' string. This method will return a string
 22587  * in the format: name1=value1&amp;name2=value2
 22588  *
 22589  * The semantic argument can be used to force form serialization in semantic order.
 22590  * If your form must be submitted with name/value pairs in semantic order then pass
 22591  * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
 22592  * this logic (which can be significant for very large forms).
 22593  *
 22594  *
 22595  * @name formSerialize
 22596  * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 22597  * @type String
 22598  */
 22599 var __formSerialize__ = function(form, semantic) {
 22600     //hand off to param for proper encoding
 22601     return __param__(__formToArray__(form, semantic));
 22602 };
 22603 
 22604 
 22605 /**
 22606  * Serializes all field elements inputs Array into a query string.
 22607  * This method will return a string in the format: name1=value1&amp;name2=value2
 22608  *
 22609  * The successful argument controls whether or not serialization is limited to
 22610  * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 22611  * The default value of the successful argument is true.
 22612  *
 22613  *
 22614  * @name fieldSerialize
 22615  * @param successful true if only successful controls should be serialized (default is true)
 22616  * @type String
 22617  */
 22618 var __fieldSerialize__ = function(inputs, successful) {
 22619     var array = [],
 22620         input,
 22621         name,
 22622         value,
 22623         i,j, imax, jmax;
 22624 
 22625     imax = inputs.length;
 22626     for(i=0; i<imax; i++){
 22627         input = inputs[i];
 22628         name = input.name;
 22629         if (!name) {
 22630             return '';
 22631         }
 22632         value = __fieldValue__(input, successful);
 22633         if (value && value.constructor == Array) {
 22634             jmax = value.length;
 22635             for (j=0; j < jmax; j++){
 22636                 array.push({
 22637                     name: name,
 22638                     value: value[j]
 22639                 });
 22640             }
 22641         }else if (value !== null && typeof value != 'undefined'){
 22642             array.push({
 22643                 name: input.name,
 22644                 value: value
 22645             });
 22646         }
 22647     }
 22648 
 22649     //hand off  for proper encoding
 22650     return __param__(array);
 22651 };
 22652 
 22653 
 22654 /**
 22655  * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 22656  *
 22657  *
 22658  * The successful argument controls whether or not the field element must be 'successful'
 22659  * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 22660  * The default value of the successful argument is true.  If this value is false the value(s)
 22661  * for each element is returned.
 22662  *
 22663  * Note: This method *always* returns an array.  If no valid value can be determined the
 22664  *       array will be empty, otherwise it will contain one or more values.
 22665  *
 22666  *
 22667  * @name fieldValue
 22668  * @param Boolean successful true if only the values for successful controls
 22669  *        should be returned (default is true)
 22670  * @type Array<String>
 22671  */
 22672 var __fieldValues__ = function(inputs, successful) {
 22673     var i,
 22674         imax = inputs.length,
 22675         element,
 22676         values = [],
 22677         value;
 22678     for (i=0; i < imax; i++) {
 22679         element = inputs[i];
 22680         value = __fieldValue__(element, successful);
 22681         if (value === null || typeof value == 'undefined' ||
 22682             (value.constructor == Array && !value.length)) {
 22683             continue;
 22684         }
 22685         if (value.constructor == Array) {
 22686             Array.prototype.push(values, value);
 22687         } else {
 22688             values.push(value);
 22689         }
 22690     }
 22691     return values;
 22692 };
 22693 
 22694 /**
 22695  * Returns the value of the field element.
 22696  *
 22697  * The successful argument controls whether or not the field element must be 'successful'
 22698  * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 22699  * The default value of the successful argument is true.  If the given element is not
 22700  * successful and the successful arg is not false then the returned value will be null.
 22701  *
 22702  * Note: If the successful flag is true (default) but the element is not successful, the return will be null
 22703  * Note: The value returned for a successful select-multiple element will always be an array.
 22704  * Note: If the element has no value the return value will be undefined.
 22705  *
 22706  * @name fieldValue
 22707  * @param Element el The DOM element for which the value will be returned
 22708  * @param Boolean successful true if value returned must be for a successful controls (default is true)
 22709  * @type String or Array<String> or null or undefined
 22710  */
 22711 var __fieldValue__ = function(element, successful) {
 22712     var name = element.name,
 22713         type = element.type,
 22714         tag = element.tagName.toLowerCase(),
 22715         index,
 22716         array,
 22717         options,
 22718         option,
 22719         one,
 22720         i, imax,
 22721         value;
 22722 
 22723     if (typeof successful == 'undefined')  {
 22724         successful = true;
 22725     }
 22726 
 22727     if (successful && (!name || element.disabled || type == 'reset' || type == 'button' ||
 22728              (type == 'checkbox' || type == 'radio') &&  !element.checked ||
 22729              (type == 'submit' || type == 'image') &&
 22730              element.form && element.form.clk != element || tag === 'select' &&
 22731              element.selectedIndex === -1)) {
 22732             return null;
 22733     }
 22734 
 22735     if (tag === 'select') {
 22736         index = element.selectedIndex;
 22737         if (index < 0) {
 22738             return null;
 22739         }
 22740         array = [];
 22741         options = element.options;
 22742         one = (type == 'select-one');
 22743         imax = (one ? index+1 : options.length);
 22744         i = (one ? index : 0);
 22745         for( i; i < imax; i++) {
 22746             option = options[i];
 22747             if (option.selected) {
 22748                 value = option.value;
 22749                 if (one) {
 22750                     return value;
 22751                 }
 22752                 array.push(value);
 22753             }
 22754         }
 22755         return array;
 22756     }
 22757     return element.value;
 22758 };
 22759 
 22760 
 22761 /**
 22762  * Clears the form data.  Takes the following actions on the form's input fields:
 22763  *  - input text fields will have their 'value' property set to the empty string
 22764  *  - select elements will have their 'selectedIndex' property set to -1
 22765  *  - checkbox and radio inputs will have their 'checked' property set to false
 22766  *  - inputs of type submit, button, reset, and hidden will *not* be effected
 22767  *  - button elements will *not* be effected
 22768  *
 22769  *
 22770  * @name clearForm
 22771  */
 22772 var __clearForm__ = function(form) {
 22773     var i,
 22774         j, jmax,
 22775         elements,
 22776         resetable = ['input','select','textarea'];
 22777     for(i=0; i<resetable.length; i++){
 22778         elements = form.getElementsByTagName(resetable[i]);
 22779         jmax = elements.length;
 22780         for(j=0;j<jmax;j++){
 22781             __clearField__(elements[j]);
 22782         }
 22783     }
 22784 };
 22785 
 22786 /**
 22787  * Clears the selected form element.  Takes the following actions on the element:
 22788  *  - input text fields will have their 'value' property set to the empty string
 22789  *  - select elements will have their 'selectedIndex' property set to -1
 22790  *  - checkbox and radio inputs will have their 'checked' property set to false
 22791  *  - inputs of type submit, button, reset, and hidden will *not* be effected
 22792  *  - button elements will *not* be effected
 22793  *
 22794  * @name clearFields
 22795  */
 22796 var __clearField__ = function(element) {
 22797     var type = element.type,
 22798         tag = element.tagName.toLowerCase();
 22799     if (type == 'text' || type == 'password' || tag === 'textarea') {
 22800         element.value = '';
 22801     } else if (type == 'checkbox' || type == 'radio') {
 22802         element.checked = false;
 22803     } else if (tag === 'select') {
 22804         element.selectedIndex = -1;
 22805     }
 22806 };
 22807 
 22808 
 22809 // Serialize an array of key/values into a query string
 22810 var __param__= function( array ) {
 22811     var i, serialized = [];
 22812 
 22813     // Serialize the key/values
 22814     for(i=0; i<array.length; i++){
 22815         serialized[ serialized.length ] =
 22816             encodeURIComponent(array[i].name) + '=' +
 22817             encodeURIComponent(array[i].value);
 22818     }
 22819 
 22820     // Return the resulting serialization
 22821     return serialized.join("&").replace(/%20/g, "+");
 22822 };
 22823 
 22824 /**
 22825  * Location
 22826  *
 22827  * Mozilla MDC:
 22828  * https://developer.mozilla.org/En/DOM/Window.location
 22829  * https://developer.mozilla.org/en/DOM/document.location
 22830  *
 22831  * HTML5: 6.10.4 The Location interface
 22832  * http://dev.w3.org/html5/spec/Overview.html#location
 22833  *
 22834  * HTML5: 2.5.3 Interfaces for URL manipulation
 22835  * http://dev.w3.org/html5/spec/Overview.html#url-decomposition-idl-attributes
 22836  * All of section 2.5 is worth reading, but 2.5.3 contains very
 22837  * detailed information on how getters/setter should work
 22838  *
 22839  * NOT IMPLEMENTED:
 22840  *  HTML5: Section 6.10.4.1 Security -- prevents scripts from another domain
 22841  *   from accessing most of the 'Location'
 22842  *  Not sure if anyone implements this in HTML4
 22843  */
 22844 
 22845 Location = function(url, doc, history) {
 22846     //console.log('Location url %s', url);
 22847     var $url = url,
 22848     $document = doc ? doc : null,
 22849     $history = history ? history : null;
 22850 
 22851     var parts = Envjs.urlsplit($url);
 22852 
 22853     return {
 22854         get hash() {
 22855             return parts.fragment ? '#' + parts.fragment : parts.fragment;
 22856         },
 22857         set hash(s) {
 22858             if (s[0] === '#') {
 22859                 parts.fragment = s.substr(1);
 22860             } else {
 22861                 parts.fragment = s;
 22862             }
 22863             $url = Envjs.urlunsplit(parts);
 22864             if ($history) {
 22865                 $history.add($url, 'hash');
 22866             }
 22867         },
 22868 
 22869         get host() {
 22870             return parts.netloc;
 22871         },
 22872         set host(s) {
 22873             if (!s || s === '') {
 22874                 return;
 22875             }
 22876 
 22877             parts.netloc = s;
 22878             $url = Envjs.urlunsplit(parts);
 22879 
 22880             // this regenerates hostname & port
 22881             parts = Envjs.urlsplit($url);
 22882 
 22883             if ($history) {
 22884                 $history.add( $url, 'host');
 22885             }
 22886             this.assign($url);
 22887         },
 22888 
 22889         get hostname() {
 22890             return parts.hostname;
 22891         },
 22892         set hostname(s) {
 22893             if (!s || s === '') {
 22894                 return;
 22895             }
 22896 
 22897             parts.netloc = s;
 22898             if (parts.port != '') {
 22899                 parts.netloc += ':' + parts.port;
 22900             }
 22901             parts.hostname = s;
 22902             $url = Envjs.urlunsplit(parts);
 22903             if ($history) {
 22904                 $history.add( $url, 'hostname');
 22905             }
 22906             this.assign($url);
 22907         },
 22908 
 22909         get href() {
 22910             return $url;
 22911         },
 22912         set href(url) {
 22913             $url = url;
 22914             if ($history) {
 22915                 $history.add($url, 'href');
 22916             }
 22917             this.assign($url);
 22918         },
 22919 
 22920         get pathname() {
 22921             return parts.path;
 22922         },
 22923         set pathname(s) {
 22924             if (s[0] === '/') {
 22925                 parts.path = s;
 22926             } else {
 22927                 parts.path = '/' + s;
 22928             }
 22929             $url = Envjs.urlunsplit(parts);
 22930 
 22931             if ($history) {
 22932                 $history.add($url, 'pathname');
 22933             }
 22934             this.assign($url);
 22935         },
 22936 
 22937         get port() {
 22938             // make sure it's a string
 22939             return '' + parts.port;
 22940         },
 22941         set port(p) {
 22942             // make a string
 22943             var s = '' + p;
 22944             parts.port = s;
 22945             parts.netloc = parts.hostname + ':' + parts.port;
 22946             $url = Envjs.urlunsplit(parts);
 22947             if ($history) {
 22948                 $history.add( $url, 'port');
 22949             }
 22950             this.assign($url);
 22951         },
 22952 
 22953         get protocol() {
 22954             return parts.scheme + ':';
 22955         },
 22956         set protocol(s) {
 22957             var i = s.indexOf(':');
 22958             if (i != -1) {
 22959                 s = s.substr(0,i);
 22960             }
 22961             parts.scheme = s;
 22962             $url = Envjs.urlunsplit(parts);
 22963             if ($history) {
 22964                 $history.add($url, 'protocol');
 22965             }
 22966             this.assign($url);
 22967         },
 22968 
 22969         get search() {
 22970             return (parts.query) ? '?' + parts.query : parts.query;
 22971         },
 22972         set search(s) {
 22973             if (s[0] == '?') {
 22974                 s = s.substr(1);
 22975             }
 22976             parts.query = s;
 22977             $url = Envjs.urlunsplit(parts);
 22978             if ($history) {
 22979                 $history.add($url, 'search');
 22980             }
 22981             this.assign($url);
 22982         },
 22983 
 22984         toString: function() {
 22985             return $url;
 22986         },
 22987 
 22988         assign: function(url) {
 22989             var _this = this,
 22990                 xhr,
 22991                 event,
 22992                 cookie;
 22993 
 22994             //console.log('assigning %s',url);
 22995 
 22996             // update closure upvars
 22997             $url = url;
 22998             parts = Envjs.urlsplit($url);
 22999 
 23000             //we can only assign if this Location is associated with a document
 23001             if ($document) {
 23002                 //console.log('fetching %s (async? %s)', url, $document.async);
 23003                 xhr = new XMLHttpRequest();
 23004 
 23005                 // TODO: make async flag a Envjs paramter
 23006                 xhr.open('GET', url, false);//$document.async);
 23007 
 23008                 // TODO: is there a better way to test if a node is an HTMLDocument?
 23009                 if ($document.toString() === '[object HTMLDocument]') {
 23010                     //tell the xhr to not parse the document as XML
 23011                     //console.log('loading html document');
 23012                     xhr.onreadystatechange = function() {
 23013                         //console.log('readyState %s', xhr.readyState);
 23014                         if (xhr.readyState === 4) {
 23015                             $document.baseURI = new Location(url, $document);
 23016                             //console.log('new document baseURI %s', $document.baseURI);
 23017                             __exchangeHTMLDocument__($document, xhr.responseText, url);
 23018                         }
 23019                     };
 23020                     xhr.send(null, false);
 23021                 } else {
 23022                     //Treat as an XMLDocument
 23023                     xhr.onreadystatechange = function() {
 23024                         if (xhr.readyState === 4) {
 23025                             $document = xhr.responseXML;
 23026                             $document.baseURI = $url;
 23027                             if ($document.createEvent) {
 23028                                 event = $document.createEvent('Event');
 23029                                 event.initEvent('DOMContentLoaded');
 23030                                 $document.dispatchEvent( event, false );
 23031                             }
 23032                         }
 23033                     };
 23034                     xhr.send();
 23035                 }
 23036 
 23037             };
 23038 
 23039         },
 23040         reload: function(forceget) {
 23041             //for now we have no caching so just proxy to assign
 23042             //console.log('reloading %s',$url);
 23043             this.assign($url);
 23044         },
 23045         replace: function(url) {
 23046             this.assign(url);
 23047         }
 23048     };
 23049 };
 23050 
 23051 var __exchangeHTMLDocument__ = function(doc, text, url) {
 23052     var html, head, title, body, event, e;
 23053     // try {
 23054         doc.baseURI = url;
 23055         HTMLParser.parseDocument(text, doc);
 23056         Envjs.wait();
 23057     /* } catch (e) {
 23058         console.log('parsererror %s', e);
 23059         try {
 23060             console.log('document \n %s', doc.documentElement.outerHTML);
 23061         } catch (e) {
 23062             // swallow
 23063         }
 23064         doc = new HTMLDocument(new DOMImplementation(), doc.ownerWindow);
 23065         html =    doc.createElement('html');
 23066         head =    doc.createElement('head');
 23067         title =   doc.createElement('title');
 23068         body =    doc.createElement('body');
 23069         title.appendChild(doc.createTextNode('Error'));
 23070         body.appendChild(doc.createTextNode('' + e));
 23071         head.appendChild(title);
 23072         html.appendChild(head);
 23073         html.appendChild(body);
 23074         doc.appendChild(html);
 23075         //console.log('default error document \n %s', doc.documentElement.outerHTML);
 23076 
 23077         //DOMContentLoaded event
 23078         if (doc.createEvent) {
 23079             event = doc.createEvent('Event');
 23080             event.initEvent('DOMContentLoaded', false, false);
 23081             doc.dispatchEvent( event, false );
 23082 
 23083             event = doc.createEvent('HTMLEvents');
 23084             event.initEvent('load', false, false);
 23085             doc.dispatchEvent( event, false );
 23086         }
 23087 
 23088         //finally fire the window.onload event
 23089         //TODO: this belongs in window.js which is a event
 23090         //      event handler for DOMContentLoaded on document
 23091 
 23092         try {
 23093             if (doc === window.document) {
 23094                 console.log('triggering window.load');
 23095                 event = doc.createEvent('HTMLEvents');
 23096                 event.initEvent('load', false, false);
 23097                 window.dispatchEvent( event, false );
 23098             }
 23099         } catch (e) {
 23100             //console.log('window load event failed %s', e);
 23101             //swallow
 23102         }
 23103     }; */  /* closes return {... */
 23104 };
 23105 
 23106 /**
 23107  *
 23108  * @class XMLHttpRequest
 23109  * @author Originally implemented by Yehuda Katz
 23110  *
 23111  */
 23112 
 23113 // this implementation can be used without requiring a DOMParser
 23114 // assuming you dont try to use it to get xml/html documents
 23115 var domparser;
 23116 
 23117 XMLHttpRequest = function(){
 23118     this.headers = {};
 23119     this.responseHeaders = {};
 23120     this.aborted = false;//non-standard
 23121 };
 23122 
 23123 // defined by the standard: http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest
 23124 // but not provided by Firefox.  Safari and others do define it.
 23125 XMLHttpRequest.UNSENT = 0;
 23126 XMLHttpRequest.OPEN = 1;
 23127 XMLHttpRequest.HEADERS_RECEIVED = 2;
 23128 XMLHttpRequest.LOADING = 3;
 23129 XMLHttpRequest.DONE = 4;
 23130 
 23131 XMLHttpRequest.prototype = {
 23132     open: function(method, url, async, user, password){
 23133         //console.log('openning xhr %s %s %s', method, url, async);
 23134         this.readyState = 1;
 23135         this.async = (async === false)?false:true;
 23136         this.method = method || "GET";
 23137         this.url = Envjs.uri(url);
 23138         this.onreadystatechange();
 23139     },
 23140     setRequestHeader: function(header, value){
 23141         this.headers[header] = value;
 23142     },
 23143     send: function(data, parsedoc/*non-standard*/){
 23144         var _this = this;
 23145         parsedoc = (parsedoc === undefined)?true:!!parsedoc;
 23146         function makeRequest(){
 23147             var cookie = Envjs.getCookies(_this.url);
 23148             if(cookie){
 23149                 _this.setRequestHeader('COOKIE', cookie);
 23150             }
 23151             Envjs.connection(_this, function(){
 23152                 if (!_this.aborted){
 23153                     var doc = null,
 23154                         domparser,
 23155                         cookie;
 23156                     // try to parse the document if we havent explicitly set a
 23157                     // flag saying not to and if we can assure the text at least
 23158                     // starts with valid xml
 23159                     if ( parsedoc && _this.responseText.match(/^\s*</) ) {
 23160                         domparser = domparser||new DOMParser();
 23161                         try {
 23162                             //console.log("parsing response text into xml document");
 23163                             doc = domparser.parseFromString(_this.responseText+"", 'text/xml');
 23164                         } catch(e) {
 23165                             //Envjs.error('response XML does not appear to be well formed xml', e);
 23166                             console.warn('parseerror \n%s', e);
 23167                             doc = document.implementation.createDocument('','error',null);
 23168                             doc.appendChild(doc.createTextNode(e+''));
 23169                         }
 23170                     }else{
 23171                         //Envjs.warn('response XML does not appear to be xml');
 23172                     }
 23173                     
 23174                     try{
 23175                         cookie = _this.getResponseHeader('SET-COOKIE');
 23176                         if(cookie){
 23177                              Envjs.setCookie(_this.url, cookie);
 23178                         }
 23179                     }catch(e){
 23180                         console.warn("Failed to set cookie");
 23181                     }
 23182                     _this.__defineGetter__("responseXML", function(){
 23183                         return doc;
 23184                     });
 23185                 }
 23186             }, data);
 23187 
 23188             if (!_this.aborted){
 23189                 _this.onreadystatechange();
 23190             }
 23191         }
 23192 
 23193         if (this.async){
 23194             //TODO: what we really need to do here is rejoin the
 23195             //      current thread and call onreadystatechange via
 23196             //      setTimeout so the callback is essentially applied
 23197             //      at the end of the current callstack
 23198             //console.log('requesting async: %s', this.url);
 23199             Envjs.runAsync(makeRequest);
 23200         }else{
 23201             //console.log('requesting sync: %s', this.url);
 23202             makeRequest();
 23203         }
 23204     },
 23205     abort: function(){
 23206         this.aborted = true;
 23207     },
 23208     onreadystatechange: function(){
 23209         //Instance specific
 23210     },
 23211     getResponseHeader: function(header){
 23212         //$debug('GETTING RESPONSE HEADER '+header);
 23213         var rHeader, returnedHeaders;
 23214         if (this.readyState < 3){
 23215             throw new Error("INVALID_STATE_ERR");
 23216         } else {
 23217             returnedHeaders = [];
 23218             for (rHeader in this.responseHeaders) {
 23219                 if (rHeader.match(new RegExp(header, "i"))) {
 23220                     returnedHeaders.push(this.responseHeaders[rHeader]);
 23221                 }
 23222             }
 23223 
 23224             if (returnedHeaders.length){
 23225                 //$debug('GOT RESPONSE HEADER '+returnedHeaders.join(", "));
 23226                 return returnedHeaders.join(", ");
 23227             }
 23228         }
 23229         return null;
 23230     },
 23231     getAllResponseHeaders: function(){
 23232         var header, returnedHeaders = [];
 23233         if (this.readyState < 3){
 23234             throw new Error("INVALID_STATE_ERR");
 23235         } else {
 23236             for (header in this.responseHeaders) {
 23237                 returnedHeaders.push( header + ": " + this.responseHeaders[header] );
 23238             }
 23239         }
 23240         return returnedHeaders.join("\r\n");
 23241     },
 23242     async: true,
 23243     readyState: 0,
 23244     responseText: "",
 23245     status: 0,
 23246     statusText: ""
 23247 };
 23248 
 23249 /**
 23250  * @author john resig & the envjs team
 23251  * @uri http://www.envjs.com/
 23252  * @copyright 2008-2010
 23253  * @license MIT
 23254  */
 23255 //CLOSURE_END
 23256 }());
 23257 
 23258 /**
 23259  * @todo: document
 23260  */
 23261 var Window,
 23262     Screen,
 23263     History,
 23264     Navigator;
 23265 
 23266 
 23267 /*
 23268  * Envjs window.1.2.13 
 23269  * Pure JavaScript Browser Environment
 23270  * By John Resig <http://ejohn.org/> and the Envjs Team
 23271  * Copyright 2008-2010 John Resig, under the MIT License
 23272  */
 23273 
 23274 //CLOSURE_START
 23275 (function(){
 23276 
 23277 
 23278 
 23279 
 23280 
 23281 /**
 23282  * @author john resig
 23283  */
 23284 // Helper method for extending one object with another.
 23285 function __extend__(a,b) {
 23286     for ( var i in b ) {
 23287         var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
 23288         if ( g || s ) {
 23289             if ( g ) { a.__defineGetter__(i, g); }
 23290             if ( s ) { a.__defineSetter__(i, s); }
 23291         } else {
 23292             a[i] = b[i];
 23293         }
 23294     } return a;
 23295 }
 23296 
 23297 /**
 23298  * @todo: document
 23299  */
 23300 
 23301 __extend__(HTMLFrameElement.prototype,{
 23302 
 23303     get contentDocument(){
 23304         return this.contentWindow?
 23305             this.contentWindow.document:
 23306             null;
 23307     },
 23308     set src(value){
 23309         var event;
 23310         this.setAttribute('src', value);
 23311         if (this.parentNode && value && value.length > 0){
 23312             //console.log('loading frame %s', value);
 23313             Envjs.loadFrame(this, Envjs.uri(value));
 23314 
 23315             //console.log('event frame load %s', value);
 23316             event = this.ownerDocument.createEvent('HTMLEvents');
 23317             event.initEvent("load", false, false);
 23318             this.dispatchEvent( event, false );
 23319         }
 23320     }
 23321 
 23322 });
 23323 
 23324 /*
 23325  *       history.js
 23326  *
 23327  */
 23328 
 23329 History = function(owner) {
 23330     var $current = 0,
 23331         $history = [null],
 23332         $owner = owner;
 23333 
 23334     return {
 23335         go : function(target) {
 23336             if (typeof target === "number") {
 23337                 target = $current + target;
 23338                 if (target > -1 && target < $history.length){
 23339                     if ($history[target].type === "hash") {
 23340                         if ($owner.location) {
 23341                             $owner.location.hash = $history[target].value;
 23342                         }
 23343                     } else {
 23344                         if ($owner.location) {
 23345                             $owner.location = $history[target].value;
 23346                         }
 23347                     }
 23348                     $current = target;
 23349                 }
 23350             } else {
 23351                 //TODO: walk through the history and find the 'best match'?
 23352             }
 23353         },
 23354 
 23355         get length() {
 23356             return $history.length;
 23357         },
 23358 
 23359         back : function(count) {
 23360             if (count) {
 23361                 this.go(-count);
 23362             } else {
 23363                 this.go(-1);
 23364             }
 23365         },
 23366 
 23367         get current() {
 23368             return this.item($current);
 23369         },
 23370 
 23371         get previous() {
 23372             return this.item($current-1);
 23373         },
 23374 
 23375         forward : function(count) {
 23376             if (count) {
 23377                 this.go(count);
 23378             } else {
 23379                 this.go(1);
 23380             }
 23381         },
 23382 
 23383         item: function(idx) {
 23384             if (idx >= 0 && idx < $history.length) {
 23385                 return $history[idx];
 23386             } else {
 23387                 return null;
 23388             }
 23389         },
 23390 
 23391         add: function(newLocation, type) {
 23392             //not a standard interface, we expose it to simplify
 23393             //history state modifications
 23394             if (newLocation !== $history[$current]) {
 23395                 $history.slice(0, $current);
 23396                 $history.push({
 23397                     type: type || 'href',
 23398                     value: newLocation
 23399                 });
 23400             }
 23401         }
 23402     }; /* closes 'return {' */
 23403 };
 23404 
 23405 
 23406 /*
 23407  *      navigator.js
 23408  *  Browser Navigator
 23409  */
 23410 Navigator = function(){
 23411 
 23412     return {
 23413         get appCodeName(){
 23414             return Envjs.appCodeName;
 23415         },
 23416         get appName(){
 23417             return Envjs.appName;
 23418         },
 23419         get appVersion(){
 23420             return Envjs.version +" ("+
 23421                 this.platform +"; "+
 23422                 "U; "+//?
 23423                 Envjs.os_name+" "+Envjs.os_arch+" "+Envjs.os_version+"; "+
 23424                 (Envjs.lang?Envjs.lang:"en-US")+"; "+
 23425                 "rv:"+Envjs.revision+
 23426                 ")";
 23427         },
 23428         get cookieEnabled(){
 23429             return true;
 23430         },
 23431         get mimeTypes(){
 23432             return [];
 23433         },
 23434         get platform(){
 23435             return Envjs.platform;
 23436         },
 23437         get plugins(){
 23438             return [];
 23439         },
 23440         get userAgent(){
 23441             return this.appCodeName + "/" + this.appVersion + " " + this.appName;
 23442         },
 23443         javaEnabled : function(){
 23444             return Envjs.javaEnabled;
 23445         }
 23446     };
 23447 };
 23448 
 23449 
 23450 /**
 23451  * Screen
 23452  * @param {Object} __window__
 23453  */
 23454 
 23455 Screen = function(__window__){
 23456 
 23457     var $availHeight  = 600,
 23458         $availWidth   = 800,
 23459         $colorDepth   = 16,
 23460         $pixelDepth   = 24,
 23461         $height       = 600,
 23462         $width        = 800,
 23463         $top          = 0,
 23464         $left         = 0,
 23465         $availTop     = 0,
 23466         $availLeft    = 0;
 23467 
 23468     __extend__( __window__, {
 23469         moveBy : function(dx,dy){
 23470             //TODO - modify $locals to reflect change
 23471         },
 23472         moveTo : function(x,y) {
 23473             //TODO - modify $locals to reflect change
 23474         },
 23475         /*print : function(){
 23476             //TODO - good global to modify to ensure print is not misused
 23477         };*/
 23478         resizeBy : function(dw, dh){
 23479             __window__resizeTo($width + dw, $height + dh);
 23480         },
 23481         resizeTo : function(width, height){
 23482             $width = (width <= $availWidth) ? width : $availWidth;
 23483             $height = (height <= $availHeight) ? height : $availHeight;
 23484         },
 23485         scroll : function(x,y){
 23486             //TODO - modify $locals to reflect change
 23487         },
 23488         scrollBy : function(dx, dy){
 23489             //TODO - modify $locals to reflect change
 23490         },
 23491         scrollTo : function(x,y){
 23492             //TODO - modify $locals to reflect change
 23493         }
 23494     });
 23495 
 23496     return {
 23497         get top(){
 23498             return $top;
 23499         },
 23500         get left(){
 23501             return $left;
 23502         },
 23503         get availTop(){
 23504             return $availTop;
 23505         },
 23506         get availLeft(){
 23507             return $availLeft;
 23508         },
 23509         get availHeight(){
 23510             return $availHeight;
 23511         },
 23512         get availWidth(){
 23513             return $availWidth;
 23514         },
 23515         get colorDepth(){
 23516             return $colorDepth;
 23517         },
 23518         get pixelDepth(){
 23519             return $pixelDepth;
 23520         },
 23521         get height(){
 23522             return $height;
 23523         },
 23524         get width(){
 23525             return $width;
 23526         }
 23527     };
 23528 };
 23529 
 23530 /*
 23531  * Copyright (c) 2010 Nick Galbreath
 23532  * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
 23533  *
 23534  * Permission is hereby granted, free of charge, to any person
 23535  * obtaining a copy of this software and associated documentation
 23536  * files (the "Software"), to deal in the Software without
 23537  * restriction, including without limitation the rights to use,
 23538  * copy, modify, merge, publish, distribute, sublicense, and/or sell
 23539  * copies of the Software, and to permit persons to whom the
 23540  * Software is furnished to do so, subject to the following
 23541  * conditions:
 23542  *
 23543  * The above copyright notice and this permission notice shall be
 23544  * included in all copies or substantial portions of the Software.
 23545  *
 23546  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 23547  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 23548  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 23549  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 23550  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 23551  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 23552  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 23553  * OTHER DEALINGS IN THE SOFTWARE.
 23554  */
 23555 
 23556 /* base64 encode/decode compatible with window.btoa/atob
 23557  *
 23558  * window.atob/btoa is a Firefox extension to convert binary data (the "b")
 23559  * to base64 (ascii, the "a").
 23560  *
 23561  * It is also found in Safari and Chrome.  It is not available in IE.
 23562  *
 23563  * if (!window.btoa) window.btoa = base64.encode
 23564  * if (!window.atob) window.atob = base64.decode
 23565  *
 23566  * The original spec's for atob/btoa are a bit lacking
 23567  * https://developer.mozilla.org/en/DOM/window.atob
 23568  * https://developer.mozilla.org/en/DOM/window.btoa
 23569  *
 23570  * window.btoa and base64.encode takes a string where charCodeAt is [0,255]
 23571  * If any character is not [0,255], then an DOMException(5) is thrown.
 23572  *
 23573  * window.atob and base64.decode take a base64-encoded string
 23574  * If the input length is not a multiple of 4, or contains invalid characters
 23575  *   then an DOMException(5) is thrown.
 23576  */
 23577 var base64 = {};
 23578 base64.PADCHAR = '=';
 23579 base64.ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
 23580 
 23581 base64.makeDOMException = function() {
 23582     // sadly in FF,Safari,Chrome you can't make a DOMException
 23583     var e, tmp;
 23584 
 23585     try {
 23586         return new DOMException(DOMException.INVALID_CHARACTER_ERR);
 23587     } catch (tmp) {
 23588         // not available, just passback a duck-typed equiv
 23589         // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error
 23590         // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/prototype
 23591         var ex = new Error("DOM Exception 5");
 23592 
 23593         // ex.number and ex.description is IE-specific.
 23594         ex.code = ex.number = 5;
 23595         ex.name = ex.description = "INVALID_CHARACTER_ERR";
 23596 
 23597         // Safari/Chrome output format
 23598         ex.toString = function() { return 'Error: ' + ex.name + ': ' + ex.message; };
 23599         return ex;
 23600     }
 23601 };
 23602 
 23603 base64.getbyte64 = function(s,i) {
 23604     // This is oddly fast, except on Chrome/V8.
 23605     //  Minimal or no improvement in performance by using a
 23606     //   object with properties mapping chars to value (eg. 'A': 0)
 23607     var idx = base64.ALPHA.indexOf(s.charAt(i));
 23608     if (idx === -1) {
 23609         throw base64.makeDOMException();
 23610     }
 23611     return idx;
 23612 };
 23613 
 23614 base64.decode = function(s) {
 23615     // convert to string
 23616     s = '' + s;
 23617     var getbyte64 = base64.getbyte64;
 23618     var pads, i, b10;
 23619     var imax = s.length;
 23620     if (imax === 0) {
 23621         return s;
 23622     }
 23623 
 23624     if (imax % 4 !== 0) {
 23625         throw base64.makeDOMException();
 23626     }
 23627 
 23628     pads = 0;
 23629     if (s.charAt(imax - 1) === base64.PADCHAR) {
 23630         pads = 1;
 23631         if (s.charAt(imax - 2) === base64.PADCHAR) {
 23632             pads = 2;
 23633         }
 23634         // either way, we want to ignore this last block
 23635         imax -= 4;
 23636     }
 23637 
 23638     var x = [];
 23639     for (i = 0; i < imax; i += 4) {
 23640         b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) |
 23641             (getbyte64(s,i+2) << 6) | getbyte64(s,i+3);
 23642         x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff, b10 & 0xff));
 23643     }
 23644 
 23645     switch (pads) {
 23646     case 1:
 23647         b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) | (getbyte64(s,i+2) << 6);
 23648         x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff));
 23649         break;
 23650     case 2:
 23651         b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12);
 23652         x.push(String.fromCharCode(b10 >> 16));
 23653         break;
 23654     }
 23655     return x.join('');
 23656 };
 23657 
 23658 base64.getbyte = function(s,i) {
 23659     var x = s.charCodeAt(i);
 23660     if (x > 255) {
 23661         throw base64.makeDOMException();
 23662     }
 23663     return x;
 23664 };
 23665 
 23666 base64.encode = function(s) {
 23667     if (arguments.length !== 1) {
 23668         throw new SyntaxError("Not enough arguments");
 23669     }
 23670     var padchar = base64.PADCHAR;
 23671     var alpha   = base64.ALPHA;
 23672     var getbyte = base64.getbyte;
 23673 
 23674     var i, b10;
 23675     var x = [];
 23676 
 23677     // convert to string
 23678     s = '' + s;
 23679 
 23680     var imax = s.length - s.length % 3;
 23681 
 23682     if (s.length === 0) {
 23683         return s;
 23684     }
 23685     for (i = 0; i < imax; i += 3) {
 23686         b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8) | getbyte(s,i+2);
 23687         x.push(alpha.charAt(b10 >> 18));
 23688         x.push(alpha.charAt((b10 >> 12) & 0x3F));
 23689         x.push(alpha.charAt((b10 >> 6) & 0x3f));
 23690         x.push(alpha.charAt(b10 & 0x3f));
 23691     }
 23692     switch (s.length - imax) {
 23693     case 1:
 23694         b10 = getbyte(s,i) << 16;
 23695         x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
 23696                padchar + padchar);
 23697         break;
 23698     case 2:
 23699         b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8);
 23700         x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
 23701                alpha.charAt((b10 >> 6) & 0x3f) + padchar);
 23702         break;
 23703     }
 23704     return x.join('');
 23705 };
 23706 //These descriptions of window properties are taken loosely David Flanagan's
 23707 //'JavaScript - The Definitive Guide' (O'Reilly)
 23708 
 23709 var __windows__ = {};
 23710 
 23711 var __top__ = function(_scope){
 23712     var _parent = _scope.parent;
 23713     while (_scope && _parent && _scope !== _parent) {
 23714         if (_parent === _parent.parent) {
 23715             break;
 23716         }
 23717         _parent = _parent.parent;
 23718         //console.log('scope %s _parent %s', scope, _parent);
 23719     }
 23720     return _parent || null;
 23721 };
 23722 
 23723 /**
 23724  * Window
 23725  * @param {Object} scope
 23726  * @param {Object} parent
 23727  * @param {Object} opener
 23728  */
 23729 Window = function(scope, parent, opener){
 23730 
 23731     // the window property is identical to the self property and to this obj
 23732     //var proxy = new Envjs.proxy(scope, parent);
 23733     //scope.__proxy__ = proxy;
 23734     scope.__defineGetter__('window', function(){
 23735         return scope;
 23736     });
 23737 
 23738     var $uuid = new Date().getTime()+'-'+Math.floor(Math.random()*1000000000000000);
 23739     __windows__[$uuid] = scope;
 23740     //console.log('opening window %s', $uuid);
 23741 
 23742     // every window has one-and-only-one .document property which is always
 23743     // an [object HTMLDocument].  also, only window.document objects are
 23744     // html documents, all other documents created by the window.document are
 23745     // [object XMLDocument]
 23746     var $htmlImplementation =  new DOMImplementation();
 23747     $htmlImplementation.namespaceAware = true;
 23748     $htmlImplementation.errorChecking = false;
 23749 
 23750     // read only reference to the Document object
 23751     var $document = new HTMLDocument($htmlImplementation, scope);
 23752 
 23753     // A read-only reference to the Window object that contains this window
 23754     // or frame.  If the window is a top-level window, parent refers to
 23755     // the window itself.  If this window is a frame, this property refers
 23756     // to the window or frame that contains it.
 23757     var $parent = parent;
 23758 
 23759     /**> $cookies - see cookie.js <*/
 23760     // read only boolean specifies whether the window has been closed
 23761     var $closed = false;
 23762 
 23763     // a read/write string that specifies the default message that
 23764     // appears in the status line
 23765     var $defaultStatus = "Done";
 23766 
 23767     // IE only, refers to the most recent event object - this maybe be
 23768     // removed after review
 23769     var $event = null;
 23770 
 23771     // a read-only reference to the History object
 23772     var $history = new History();
 23773 
 23774     // a read-only reference to the Location object.  the location object does
 23775     // expose read/write properties
 23776     var $location = new Location('about:blank', $document, $history);
 23777 
 23778     // The name of window/frame. Set directly, when using open(), or in frameset.
 23779     // May be used when specifying the target attribute of links
 23780     var $name = null;
 23781 
 23782     // a read-only reference to the Navigator object
 23783     var $navigator = new Navigator();
 23784 
 23785     // a read/write reference to the Window object that contained the script
 23786     // that called open() to open this browser window.  This property is valid
 23787     // only for top-level window objects.
 23788     var $opener = opener?opener:null;
 23789 
 23790     // read-only properties that specify the height and width, in pixels
 23791     var $innerHeight = 600, $innerWidth = 800;
 23792 
 23793     // Read-only properties that specify the total height and width, in pixels,
 23794     // of the browser window. These dimensions include the height and width of
 23795     // the menu bar, toolbars, scrollbars, window borders and so on.  These
 23796     // properties are not supported by IE and IE offers no alternative
 23797     // properties;
 23798     var $outerHeight = $innerHeight,
 23799         $outerWidth = $innerWidth;
 23800 
 23801     // Read-only properties that specify the number of pixels that the current
 23802     // document has been scrolled to the right and down.  These are not
 23803     // supported by IE.
 23804     var $pageXOffset = 0, $pageYOffset = 0;
 23805 
 23806     // a read-only reference to the Screen object that specifies information
 23807     // about the screen: the number of available pixels and the number of
 23808     // available colors.
 23809     var $screen = new Screen(scope);
 23810 
 23811     // read only properties that specify the coordinates of the upper-left
 23812     // corner of the screen.
 23813     var $screenX = 1,
 23814         $screenY = 1;
 23815     var $screenLeft = $screenX,
 23816         $screenTop = $screenY;
 23817 
 23818     // a read/write string that specifies the current status line.
 23819     var $status = '';
 23820 
 23821     __extend__(scope, EventTarget.prototype);
 23822 
 23823     return __extend__( scope, {
 23824         get closed(){
 23825             return $closed;
 23826         },
 23827         get defaultStatus(){
 23828             return $defaultStatus;
 23829         },
 23830         set defaultStatus(defaultStatus){
 23831             $defaultStatus = defaultStatus;
 23832         },
 23833         get document(){
 23834             return $document;
 23835         },
 23836         set document(doc){
 23837             $document = doc;
 23838         },
 23839         /*
 23840         deprecated ie specific property probably not good to support
 23841         get event(){
 23842             return $event;
 23843         },
 23844         */
 23845         get frames(){
 23846         return new HTMLCollection($document.getElementsByTagName('frame'));
 23847         },
 23848         get length(){
 23849             // should be frames.length,
 23850             return this.frames.length;
 23851         },
 23852         get history(){
 23853             return $history;
 23854         },
 23855         get innerHeight(){
 23856             return $innerHeight;
 23857         },
 23858         get innerWidth(){
 23859             return $innerWidth;
 23860         },
 23861         get clientHeight(){
 23862             return $innerHeight;
 23863         },
 23864         get clientWidth(){
 23865             return $innerWidth;
 23866         },
 23867         get location(){
 23868             return $location;
 23869         },
 23870         set location(uri){
 23871             uri = Envjs.uri(uri);
 23872             //new Window(this, this.parent, this.opener);
 23873             if($location.href == uri){
 23874                 $location.reload();
 23875             }else if($location.href == 'about:blank'){
 23876                 $location.assign(uri);
 23877             }else{
 23878                 $location.replace(uri);
 23879             }
 23880         },
 23881         get name(){
 23882             return $name;
 23883         },
 23884         set name(newName){
 23885             $name = newName;
 23886         },
 23887         get navigator(){
 23888             return $navigator;
 23889         },
 23890         get opener(){
 23891             return $opener;
 23892         },
 23893         get outerHeight(){
 23894             return $outerHeight;
 23895         },
 23896         get outerWidth(){
 23897             return $outerWidth;
 23898         },
 23899         get pageXOffest(){
 23900             return $pageXOffset;
 23901         },
 23902         get pageYOffset(){
 23903             return $pageYOffset;
 23904         },
 23905         get parent(){
 23906             return $parent;
 23907         },
 23908         get screen(){
 23909             return $screen;
 23910         },
 23911         get screenLeft(){
 23912             return $screenLeft;
 23913         },
 23914         get screenTop(){
 23915             return $screenTop;
 23916         },
 23917         get screenX(){
 23918             return $screenX;
 23919         },
 23920         get screenY(){
 23921             return $screenY;
 23922         },
 23923         get self(){
 23924             return scope;
 23925         },
 23926         get status(){
 23927             return $status;
 23928         },
 23929         set status(status){
 23930             $status = status;
 23931         },
 23932         // a read-only reference to the top-level window that contains this window.
 23933         // If this window is a top-level window it is simply a reference to itself.
 23934         // If this window is a frame, the top property refers to the top-level
 23935         // window that contains the frame.
 23936         get top(){
 23937             return __top__(scope);
 23938         },
 23939         get window(){
 23940             return this;
 23941         },
 23942         toString : function(){
 23943             return '[Window]';
 23944         },
 23945 
 23946         /**
 23947          * getComputedStyle
 23948          *
 23949          * Firefox 3.6:
 23950          *  - Requires both elements to be present else an
 23951          *    exception is thrown.
 23952          *  - Returns a 'ComputedCSSStyleDeclaration' object.
 23953          *    while a raw element.style returns a 'CSSStyleDeclaration' object.
 23954          *  - Bogus input also throws exception
 23955          *
 23956          * Safari 4:
 23957          *  - Requires one argument (second can be MIA)
 23958          *  - Returns a CSSStyleDeclaration object
 23959          *  - if bad imput, returns null
 23960          *
 23961          * getComputedStyle should really be an "add on" from the css
 23962          * modules.  Unfortunately, 'window' comes way after the 'css'
 23963          * so css can't add it.
 23964          */
 23965         getComputedStyle: function(element, pseudoElement) {
 23966             return element.style;
 23967         },
 23968 
 23969         open: function(url, name, features, replace){
 23970             if (features) {
 23971                 console.log("'features argument not yet implemented");
 23972             }
 23973             var _window = Envjs.proxy({}),
 23974                 open;
 23975             if(replace && name){
 23976                 for(open in __windows__){
 23977                     if(open.name === name) {
 23978                         _window = open;
 23979                     }
 23980                 }
 23981             }
 23982             new Window(_window, _window, this);
 23983             if(name) {
 23984                 _window.name = name;
 23985             }
 23986             _window.document.async = false;
 23987             _window.location.assign(Envjs.uri(url));
 23988             return _window;
 23989         },
 23990         close: function(){
 23991             //console.log('closing window %s', __windows__[$uuid]);
 23992             try{
 23993                 delete __windows__[$uuid];
 23994             }catch(e){
 23995                 console.log('%s',e);
 23996             }
 23997         },
 23998         alert : function(message){
 23999             Envjs.alert(message);
 24000         },
 24001         confirm : function(question){
 24002             Envjs.confirm(question);
 24003         },
 24004         prompt : function(message, defaultMsg){
 24005             Envjs.prompt(message, defaultMsg);
 24006         },
 24007         btoa: function(binary){
 24008             return base64.encode(binary);
 24009         },
 24010         atob: function(ascii){
 24011             return base64.decode(ascii);
 24012         },
 24013         onload: function(){},
 24014         onunload: function(){},
 24015         get guid(){
 24016             return $uuid;
 24017         }
 24018     });
 24019 
 24020 };
 24021 
 24022 
 24023 //finally pre-supply the window with the window-like environment
 24024 //console.log('Default Window');
 24025 new Window(__this__, __this__);
 24026 console.log('[ %s ]',window.navigator.userAgent);
 24027 /**
 24028  *
 24029  * @param {Object} event
 24030  */
 24031 __extend__(Envjs.defaultEventBehaviors,{
 24032 
 24033     'submit': function(event) {
 24034         var target = event.target;
 24035         while (target && target.nodeName !== 'FORM') {
 24036             target = target.parentNode;
 24037         }
 24038         if (target && target.nodeName === 'FORM') {
 24039             target.submit();
 24040         }
 24041     },
 24042     'click': function(event) {
 24043         // console.log('handling event target default behavior for click');
 24044     }
 24045 
 24046 });
 24047 /**
 24048  * @author john resig & the envjs team
 24049  * @uri http://www.envjs.com/
 24050  * @copyright 2008-2010
 24051  * @license MIT
 24052  */
 24053 //CLOSURE_END
 24054 }());