CodePlayground/lib/brython.min.js

8 lines
588 KiB
JavaScript
Raw Normal View History

2021-04-02 22:04:53 +02:00
/**
* Minified by jsDelivr using Terser v5.3.5.
* Original file: /npm/brython@3.9.1/brython.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var __BRYTHON__=__BRYTHON__||{};try{eval("async function* f(){}")}catch(e){console.warn("Your browser is not fully supported. If you are using Microsoft Edge, please upgrade to the latest version")}!function(e){var t;e.isWebWorker="undefined"!=typeof WorkerGlobalScope&&"function"==typeof importScripts&&navigator instanceof WorkerNavigator,e.isNode="undefined"!=typeof process&&"node"===process.release.name;var r,n=(t=e.isNode?{location:{href:"",origin:"",pathname:""},navigator:{userLanguage:""}}:self).location.href;if(e.protocol=n.split(":")[0],e.BigInt=t.BigInt,e.indexedDB=t.indexedDB,void 0===e.brython_path){var o;if(e.isWebWorker)(o=t.location.href).startsWith("blob:")&&(o=o.substr(5));else{var a=document.getElementsByTagName("script");o=a[a.length-1].src}var s=o.split("/");s.pop(),r=e.brython_path=s.join("/")+"/"}else e.brython_path.endsWith("/")||(e.brython_path+="/"),r=e.brython_path;var i=(t.location.origin+t.location.pathname).split("/");i.pop();var _=e.script_dir=i.join("/");if(e.__ARGV=[],e.webworkers={},e.$py_module_path={},e.file_cache={},e.$py_src={},e.path=[r+"Lib",r+"libs",_,r+"Lib/site-packages"],e.async_enabled=!1,e.async_enabled&&(e.block={}),e.imported={},e.precompiled={},e.frames_stack=[],e.builtins={},e.builtins_scope={id:"__builtins__",module:"__builtins__",binding:{}},e.builtin_funcs={},e.builtin_classes=[],e.__getattr__=function(e){return this[e]},e.__setattr__=function(t,r){if(!(["debug","stdout","stderr"].indexOf(t)>-1))throw e.builtins.AttributeError.$factory("__BRYTHON__ object has no attribute "+t);e[t]=r},e.language=t.navigator.userLanguage||t.navigator.language,e.locale="C",e.isWebWorker?e.charset="utf-8":e.charset=document.characterSet||document.inputEncoding||"utf-8",e.max_int=Math.pow(2,53)-1,e.min_int=-e.max_int,e.$py_next_hash=Math.pow(2,53)-1,e.$py_UUID=0,e.lambda_magic=Math.random().toString(36).substr(2,8),e.set_func_names=function(t,r){if(t.$infos){var n=t.$infos.__name__;t.$infos.__module__=r,t.$infos.__qualname__=n}else{n=t.__name__;t.$infos={__name__:n,__module__:r,__qualname__:n}}for(var o in t.__module__=r,t)"function"==typeof t[o]&&(t[o].$infos={__doc__:t[o].__doc__||"",__module__:r,__qualname__:n+"."+o,__name__:o},"classmethod"==t[o].$type&&(t[o].__class__=e.method))},"undefined"!=typeof Storage){e.has_local_storage=!1;try{localStorage&&(e.local_storage=localStorage,e.has_local_storage=!0)}catch(e){}e.has_session_storage=!1;try{sessionStorage&&(e.session_storage=sessionStorage,e.has_session_storage=!0)}catch(e){}}else e.has_local_storage=!1,e.has_session_storage=!1;e.globals=function(){return e.frames_stack[e.frames_stack.length-1][3]},e.scripts={},e.$options={},e.update_VFS=function(t){e.VFS=e.VFS||{};var r=t.$timestamp;for(var n in void 0!==r&&delete t.$timestamp,t)e.VFS.hasOwnProperty(n)&&console.warn("Virtual File System: duplicate entry "+n),e.VFS[n]=t[n],e.VFS[n].timestamp=r},e.add_files=function(t){for(var r in e.files=e.files||{},t)e.files[r]=t[r]},e.python_to_js=function(t,r){e.meta_path=e.$meta_path.slice(),e.use_VFS||e.meta_path.shift(),void 0===r&&(r="__main__");var n=__BRYTHON__.py2js(t,r,r).to_js();return n="(function() {\n var $locals_"+r+" = {}\n"+n+"\n}())"},t.py=function(t){var r=e.py2js(t[0],"script","script").to_js();e.set_import_paths(),new Function("$locals_script",r)({})}}(__BRYTHON__),__BRYTHON__.implementation=[3,9,1,"final",0],__BRYTHON__.__MAGIC__="3.9.1",__BRYTHON__.version_info=[3,9,0,"final",0],__BRYTHON__.compiled_date="2021-01-04 17:16:14.255913",__BRYTHON__.timestamp=1609776974255,__BRYTHON__.builtin_module_names=["_aio","_ajax","_base64","_binascii","_cmath","_io_classes","_json","_jsre","_locale","_multiprocessing","_posixsubprocess","_profile","_sre_utils","_string","_strptime","_svg","_webcomponent","_webworker","_zlib_utils","array","bry_re","builtins","dis","encoding_cp932","hashlib","html_parser","long_int","marshal","math","math1","modulefinder","posix","python_re","random","unicodedata"],function($B){var js,$pos,res,$op;Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Number.isS
//# sourceMappingURL=/sm/e70a0b9f1741db691940077d46cbfbe928dcb7d65b5d01d9d156ad38e320576e.map