This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathhtml5lib.js
1 lines (1 loc) · 12.5 KB
/
html5lib.js
1
var Module=typeof pyodide._module!=="undefined"?pyodide._module:{};Module.checkABI(1);if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="html5lib.data";var REMOTE_PACKAGE_BASE="html5lib.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata.remote_package_size;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","lib",true,true);Module["FS_createPath"]("/lib","python3.7",true,true);Module["FS_createPath"]("/lib/python3.7","site-packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","html5lib",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treebuilders",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","filters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","_trie",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treewalkers",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treeadapters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","html5lib-1.0.1-py3.7.egg-info",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createPreloadedFile"](this.name,null,byteArray,true,true,function(){Module["removeRunDependency"]("fp "+that.name)},function(){if(that.audio){Module["removeRunDependency"]("fp "+that.name)}else{err("Preloading file "+that.name+" failed")}},false,true);this.requests[this.name]=null}};function processPackageData(arrayBuffer){Module.finishedDataFileDownloads++;assert(arrayBuffer,"Loading data file failed.");assert(arrayBuffer instanceof ArrayBuffer,"bad input to processPackageData");var byteArray=new Uint8Array(arrayBuffer);var curr;var compressedData={data:null,cachedOffset:233974,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,1219,2378,3546,4801,5944,7148,8361,9542,10443,11488,12520,13572,14574,15666,16502,17503,18947,20104,21428,22408,23554,24552,25596,26405,27063,27824,28507,29294,29928,30582,31126,31610,32285,32983,33432,34041,34809,35751,36451,37067,37771,38534,39436,39902,40419,41055,41647,42436,43252,43760,44366,44898,45421,45903,46740,47964,49212,50312,51344,52124,53138,54292,55396,56442,57148,57682,58431,59282,60123,61141,62049,62817,63663,64790,65777,66838,67742,68535,69269,70133,71018,71856,72694,73589,74402,75344,76267,77200,77973,78844,79848,80791,81612,82507,83364,84211,85033,86025,86810,87800,88613,89561,90438,91238,92046,92939,93677,94615,95651,96447,97320,97988,98823,100166,101456,102778,103968,105460,106997,108294,109270,110422,111681,112887,114056,115118,116057,116790,117751,118896,119642,120381,121182,121920,122552,123400,123940,124646,125787,126798,127922,129077,129974,130923,131841,132722,133567,134498,135411,136322,137268,138109,139050,139971,140904,141797,142721,143644,144526,145455,146263,147111,148042,148956,149887,150767,151634,152542,153418,154611,155828,156740,157685,158604,159692,160612,161400,162267,163244,164228,165202,166562,167413,168384,169350,170217,171361,172508,173648,174718,175803,176901,177954,178927,180076,181519,182777,183842,184712,185514,186357,187102,188155,188860,189892,190902,191773,192234,192756,193502,194213,194967,195724,196649,197693,198519,199696,200779,201966,203042,204078,205205,206417,207085,208154,209183,210245,211417,212672,213613,214556,215385,216664,217719,218666,219658,220923,221612,222079,222631,223688,224950,226223,227549,228896,230150,231481,232831,233767],sizes:[1219,1159,1168,1255,1143,1204,1213,1181,901,1045,1032,1052,1002,1092,836,1001,1444,1157,1324,980,1146,998,1044,809,658,761,683,787,634,654,544,484,675,698,449,609,768,942,700,616,704,763,902,466,517,636,592,789,816,508,606,532,523,482,837,1224,1248,1100,1032,780,1014,1154,1104,1046,706,534,749,851,841,1018,908,768,846,1127,987,1061,904,793,734,864,885,838,838,895,813,942,923,933,773,871,1004,943,821,895,857,847,822,992,785,990,813,948,877,800,808,893,738,938,1036,796,873,668,835,1343,1290,1322,1190,1492,1537,1297,976,1152,1259,1206,1169,1062,939,733,961,1145,746,739,801,738,632,848,540,706,1141,1011,1124,1155,897,949,918,881,845,931,913,911,946,841,941,921,933,893,924,923,882,929,808,848,931,914,931,880,867,908,876,1193,1217,912,945,919,1088,920,788,867,977,984,974,1360,851,971,966,867,1144,1147,1140,1070,1085,1098,1053,973,1149,1443,1258,1065,870,802,843,745,1053,705,1032,1010,871,461,522,746,711,754,757,925,1044,826,1177,1083,1187,1076,1036,1127,1212,668,1069,1029,1062,1172,1255,941,943,829,1279,1055,947,992,1265,689,467,552,1057,1262,1273,1326,1347,1254,1331,1350,936,207],successes:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]};compressedData.data=byteArray;assert(typeof Module.LZ4==="object","LZ4 not present - was your app build with -s LZ4=1 ?");Module.LZ4.loadPackage({metadata:metadata,compressedData:compressedData});Module["removeRunDependency"]("datafile_html5lib.data")}Module["addRunDependency"]("datafile_html5lib.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}};loadPackage({files:[{filename:"/lib/python3.7/site-packages/html5lib/_inputstream.py",start:0,end:32499,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_utils.py",start:32499,end:36502,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_tokenizer.py",start:36502,end:113070,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/html5parser.py",start:113070,end:232021,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_ihatexml.py",start:232021,end:248726,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/serializer.py",start:248726,end:264472,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/constants.py",start:264472,end:347990,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/__init__.py",start:347990,end:349135,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/dom.py",start:349135,end:357970,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree.py",start:357970,end:370722,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree_lxml.py",start:370722,end:384844,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/base.py",start:384844,end:399411,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/__init__.py",start:399411,end:403003,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/alphabeticalattributes.py",start:403003,end:403922,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/optionaltags.py",start:403922,end:414510,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/lint.py",start:414510,end:418141,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/inject_meta_charset.py",start:418141,end:421086,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/whitespace.py",start:421086,end:422300,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/base.py",start:422300,end:422586,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/sanitizer.py",start:422586,end:448822,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/__init__.py",start:448822,end:448822,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/py.py",start:448822,end:450585,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/datrie.py",start:450585,end:451751,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/_base.py",start:451751,end:452681,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/__init__.py",start:452681,end:452970,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/dom.py",start:452970,end:454383,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree.py",start:454383,end:458921,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree_lxml.py",start:458921,end:465218,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/genshi.py",start:465218,end:467527,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/base.py",start:467527,end:475003,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/__init__.py",start:475003,end:480717,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/sax.py",start:480717,end:482493,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/genshi.py",start:482493,end:484208,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/__init__.py",start:484208,end:484858,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/SOURCES.txt",start:484858,end:491269,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/PKG-INFO",start:491269,end:510038,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/dependency_links.txt",start:510038,end:510039,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/top_level.txt",start:510039,end:510048,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/requires.txt",start:510048,end:510319,audio:0}],remote_package_size:238070,package_uuid:"a12f676d-2fa8-4755-97dc-4b0be7f3cf32"})})();