UNPKG

smartdown

Version:

A library for translating, rendering and interacting with Smartdown documents. Smartdown is an extension of Markdown that provides richer media support and reactive programming capability.

2 lines 721 kB
/*! For license information please see smartdown.js.LICENSE.txt */ !function(e,f){"object"==typeof exports&&"object"==typeof module?module.exports=f():"function"==typeof define&&define.amd?define("smartdown",[],f):"object"==typeof exports?exports.smartdown=f():e.smartdown=f()}(self,(()=>(()=>{var e,f,t,n,r={21:e=>{e.exports=function(e){const f=e.regex,t=e.COMMENT("--","$"),n=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],r=n,o=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!n.includes(e))),a={match:f.concat(/\b/,f.either(...r),/\s*\(/),relevance:0,keywords:{built_in:r}};function i(e){return f.concat(/\b/,f.either(...e.map((e=>e.replace(/\s+/,"\\s+")))),/\b/)}const s={scope:"keyword",match:i(["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"]),relevance:0};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:f,when:t}={}){const n=t;return f=f||[],e.map((e=>e.match(/\|\d+$/)||f.includes(e)?e:n(e)?`${e}|0`:e))}(o,{when:e=>e.length<3}),literal:["true","false","unknown"],type:["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{scope:"type",match:i(["double precision","large object","with timezone","without timezone"])},s,a,{scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},{scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},{begin:/"/,end:/"/,contains:[{match:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}},41:e=>{e.exports=function(e){return function(f){return e(f)}}},149:e=>{e.exports=function(e,f){for(var t=-1,n=null==e?0:e.length;++t<n&&!1!==f(e[t],t,e););return e}},157:(e,f,t)=>{var n=t(9138)(t(1433),"Set");e.exports=n},195:e=>{e.exports=function(e){const f=e.regex,t={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:f.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,r]};r.contains.push(i);const s={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]},c=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[c,e.SHEBANG(),l,s,o,a,{match:/(\/[a-z._-]+)+/},i,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}}},247:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(5390),t(7255),t(7482),t(8382)],void 0===(o="function"==typeof(n=function(e,f,n,r,o){"use strict";var a=t(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){(0,f.default)(r.default.playablesRegisteredOrder,(function(f){e.id===f.rootDivId&&f.divId&&(document.getElementById(f.divId)?(0,n.default)(f.language,f.divId,t):console.log("resetAllPlayables PLAYABLE DIV NOT FOUND",e.id,f.divId,f))})),(0,o.default)(!1)},f=a(f),n=a(n),r=a(r),o=a(o)})?n.apply(f,r):n)||(e.exports=o)},296:(e,f,t)=>{"use strict";var n=t(2203),r=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,f){var t,a;if(f=f||{},Object.keys(f).forEach((function(f){if(-1===r.indexOf(f))throw new n('Unknown option "'+f+'" is met in definition of "'+e+'" YAML type.')})),this.options=f,this.tag=e,this.kind=f.kind||null,this.resolve=f.resolve||function(){return!0},this.construct=f.construct||function(e){return e},this.instanceOf=f.instanceOf||null,this.predicate=f.predicate||null,this.represent=f.represent||null,this.representName=f.representName||null,this.defaultStyle=f.defaultStyle||null,this.multi=f.multi||!1,this.styleAliases=(t=f.styleAliases||null,a={},null!==t&&Object.keys(t).forEach((function(e){t[e].forEach((function(f){a[String(f)]=e}))})),a),-1===o.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},352:e=>{e.exports=function(e){const f={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},t={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},n={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},r={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(n,{contains:[]}),a=e.inherit(r,{contains:[]});n.contains.push(a),r.contains.push(o);let i=[f,t];return[n,r,o,a].forEach((e=>{e.contains=e.contains.concat(i)})),i=i.concat(n,r),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:i},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:i}]}]},f,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},n,r,{className:"quote",begin:"^>\\s+",contains:i,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},t,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}},365:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},369:(e,f,t)=>{var n=t(2092),r=t(9626),o=t(9925),a=t(6809),i=t(4385);function s(e){var f=-1,t=null==e?0:e.length;for(this.clear();++f<t;){var n=e[f];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=a,s.prototype.set=i,e.exports=s},484:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(4883)],void 0===(o="function"==typeof(n=function(e,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){(0,f.registerExtension)("three",["https://unpkg.com/three@0.122/build/three.min.js",function(){window.smartdown.THREE=window.THREE}])}})?n.apply(f,r):n)||(e.exports=o)},488:e=>{e.exports="2"},492:(e,f,t)=>{e=t.nmd(e);var n=t(1433),r=t(659),o=f&&!f.nodeType&&f,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,s=(i?i.isBuffer:void 0)||r;e.exports=s},564:e=>{function f(t){return e.exports=f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,f(t)}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},659:e=>{e.exports=function(){return!1}},772:(e,f,t)=>{"use strict";e.exports=t(6795).extend({implicit:[t(9418),t(4059),t(5238),t(8745)]})},809:e=>{e.exports=function(e,f){return null!=e&&f in Object(e)}},827:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(5390),t(1660),t(7482)],void 0===(o="function"==typeof(n=function(e,f,n,r){"use strict";var o=t(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){e&&e.id&&(0,f.default)(r.default.playablesRegisteredOrder,(function(f){if(f.autoplay&&!f.playing){var t="#"+e.id+" #"+f.divId,r=document.querySelectorAll(t);r&&r.length>0&&(0,n.default)(f.language,f.divId)}}))},f=o(f),n=o(n),r=o(r)})?n.apply(f,r):n)||(e.exports=o)},846:(e,f,t)=>{"use strict";function n(e){var f=e;return 0===f.indexOf("smartdownBase:")&&(f=window.smartdown.baseURL+f.slice(14)),f}function r(e,f,t,r){var o=document.head||document.getElementsByTagName("head")[0],a=n(e),i=document.createElement("script");i.type=f?"module":"text/javascript",i.onerror=function(e){if(!r)throw new URIError("The script "+a+" is not accessible.");console.log("calling fOnerror"),r(e)},i.async=!0,i.src=a,t&&(i.onload=function(e){t(e)}),o.appendChild(i)}function o(e,f,t){r(e,!1,f,t)}function a(e,f,t){r(e,!0,f,t)}function i(e,f,t){var r=n(e),o=new XMLHttpRequest;o.onreadystatechange=function(){4===this.readyState&&(200===this.status?f(this.responseText):t(this.status))},o.open("GET",r),o.send()}function s(e){var f=document.createElement("style");f.type="text/css",f.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(f)}function c(e,f,t){var r=document.head||document.getElementsByTagName("head")[0],o=n(e),a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=function(e){if(!t)throw new URIError("The stylesheet "+o+" is not accessible.");console.log("calling fOnerror"),t(e)},a.href=o,r.appendChild(a),f&&(a.onload=function(e){f(e)})}t.r(f),t.d(f,{importCssCode:()=>s,importCssUrl:()=>c,importModuleUrl:()=>a,importScriptUrl:()=>o,importTextUrl:()=>i})},887:(e,f,t)=>{var n=t(2696),r=t(7410),o=t(8933),a=t(5694),i=t(4223),s=t(4495),c=t(3157),l=t(5516),d=t(9951),u=t(5006),p=t(8183);e.exports=function e(f,t){return f?(i(f)&&(f=f.render()),s(f)&&f.render&&(f=f.render()),o(f)?function(e){var f=e.properties,t="<"+e.tagName.toLowerCase();for(var n in f){var o=f[n];if(null!=o)if("attributes"!=n)if("dataset"!=n){if("style"==n){var a="";for(var i in o=r({},o))a+=d(i)+": "+o[i]+"; ";o=a.trim()}if(o instanceof c||o instanceof l)t+=" "+u(n,o.value,!0);else{var s=u(n,o);s&&(t+=" "+s)}}else for(var p in o=r({},o))t+=" "+u("data-"+d(p),o[p],!0);else for(var h in o=r({},o))t+=" "+u(h,o[h],!0)}return t+">"}(f)+function(f){var t=f.properties.innerHTML;if(null!=t)return t;var n="";if(f.children&&f.children.length)for(var r=0,o=f.children.length;r<o;r++)n+=e(f.children[r],f);return n}(f)+function(e){var f=e.tagName.toLowerCase();return p[f]?"":"</"+f+">"}(f):a(f)?!t||"script"!==t.tagName.toLowerCase()&&"style"!==t.tagName.toLowerCase()?n(String(f.text)):String(f.text):""):""}},897:e=>{var f="[0-9](_*[0-9])*",t=`\\.(${f})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",r={className:"number",variants:[{begin:`(\\b(${f})((${t})|\\.)?|(${t}))[eE][+-]?(${f})[fFdD]?\\b`},{begin:`\\b(${f})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${t})[fFdD]?\\b`},{begin:`\\b(${f})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${f})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function o(e,f,t){return-1===t?"":e.replace(f,(n=>o(e,f,t-1)))}e.exports=function(e){const f=e.regex,t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=t+o("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},i={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[f.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,i]}}},906:(e,f,t)=>{var n=t(1819),r=t(365),o=t(7744),a=t(8687);e.exports=function(e){return n(e)||r(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},953:e=>{e.exports=function(e){var f=-1,t=Array(e.size);return e.forEach((function(e,n){t[++f]=[n,e]})),t}},963:(e,f,t)=>{"use strict";var n=t(2203),r=t(296);function o(e,f){var t=[];return e[f].forEach((function(e){var f=t.length;t.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&t.multi===e.multi&&(f=n)})),t[f]=e})),t}function a(e){return this.extend(e)}a.prototype.extend=function(e){var f=[],t=[];if(e instanceof r)t.push(e);else if(Array.isArray(e))t=t.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new n("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(f=f.concat(e.implicit)),e.explicit&&(t=t.concat(e.explicit))}f.forEach((function(e){if(!(e instanceof r))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new n("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),t.forEach((function(e){if(!(e instanceof r))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(a.prototype);return i.implicit=(this.implicit||[]).concat(f),i.explicit=(this.explicit||[]).concat(t),i.compiledImplicit=o(i,"implicit"),i.compiledExplicit=o(i,"explicit"),i.compiledTypeMap=function(){var e,f,t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}for(e=0,f=arguments.length;e<f;e+=1)arguments[e].forEach(n);return t}(i.compiledImplicit,i.compiledExplicit),i},e.exports=a},966:(e,f,t)=>{var n=t(4403),r=t(8876),o=t(1178);e.exports=function(e){return n(e,o,r)}},989:(e,f,t)=>{var n=t(5498);function r(e,f){for(var t=0;t<f.length;t++){var r=f[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}e.exports=function(e,f,t){return f&&r(e.prototype,f),t&&r(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},1019:e=>{e.exports=function(e,f){return function(t){return e(f(t))}}},1067:e=>{function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(e.exports=f=function(){return!!t},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},1119:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(846)],void 0===(o="function"==typeof(n=function(e,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function e(t,n,r){if(n.length>0){var o=n.shift();(0,f.importTextUrl)(o,(function(f){e(t+f,n,r)}),(function(f){var a="\n//\n// Unable to include ".concat(o,": ").concat(f,"\n//\n");e(t+a,n,r)}))}else r&&r(t)}})?n.apply(f,r):n)||(e.exports=o)},1163:(e,f,t)=>{var n=t(6204),r=t(1256),o=t(6397),a=t(492),i=t(2845),s=t(7995),c=Object.prototype.hasOwnProperty;e.exports=function(e,f){var t=o(e),l=!t&&r(e),d=!t&&!l&&a(e),u=!t&&!l&&!d&&s(e),p=t||l||d||u,h=p?n(e.length,String):[],g=h.length;for(var b in e)!f&&!c.call(e,b)||p&&("length"==b||d&&("offset"==b||"parent"==b)||u&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||i(b,g))||h.push(b);return h}},1178:(e,f,t)=>{var n=t(1163),r=t(1452),o=t(8330);e.exports=function(e){return o(e)?n(e):r(e)}},1200:e=>{!function(){"use strict";e.exports={polyfill:function(){var e=window,f=document;if(!("scrollBehavior"in f.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var t,n=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||i,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(t=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(t)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==s(arguments[0])?p.call(e,f.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):r.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(s(arguments[0])?r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,f.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==s(arguments[0])){var e=arguments[0].left,f=arguments[0].top;p.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===f?this.scrollTop:~~f)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==s(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==s(arguments[0])){var t=function(e){for(;e!==f.body&&!1===d(e);)e=e.parentNode||e.host;return e}(this),n=t.getBoundingClientRect(),o=this.getBoundingClientRect();t!==f.body?(p.call(this,t,t.scrollLeft+o.left-n.left,t.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(t).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function i(e,f){this.scrollLeft=e,this.scrollTop=f}function s(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,f){return"Y"===f?e.clientHeight+a<e.scrollHeight:"X"===f?e.clientWidth+a<e.scrollWidth:void 0}function l(f,t){var n=e.getComputedStyle(f,null)["overflow"+t];return"auto"===n||"scroll"===n}function d(e){var f=c(e,"Y")&&l(e,"Y"),t=c(e,"X")&&l(e,"X");return f||t}function u(f){var t,n,r,a,i=(o()-f.startTime)/468;a=i=i>1?1:i,t=.5*(1-Math.cos(Math.PI*a)),n=f.startX+(f.x-f.startX)*t,r=f.startY+(f.y-f.startY)*t,f.method.call(f.scrollable,n,r),n===f.x&&r===f.y||e.requestAnimationFrame(u.bind(e,f))}function p(t,n,a){var s,c,l,d,p=o();t===f.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=r.scroll):(s=t,c=t.scrollLeft,l=t.scrollTop,d=i),u({scrollable:s,method:d,startTime:p,startX:c,startY:l,x:n,y:a})}}}}()},1201:(e,f,t)=>{var n=t(1416),r=t(1955),o=t(2616),a=t(157),i=t(8499),s=t(7148),c=t(1485),l="[object Map]",d="[object Promise]",u="[object Set]",p="[object WeakMap]",h="[object DataView]",g=c(n),b=c(r),m=c(o),y=c(a),v=c(i),_=s;(n&&_(new n(new ArrayBuffer(1)))!=h||r&&_(new r)!=l||o&&_(o.resolve())!=d||a&&_(new a)!=u||i&&_(new i)!=p)&&(_=function(e){var f=s(e),t="[object Object]"==f?e.constructor:void 0,n=t?c(t):"";if(n)switch(n){case g:return h;case b:return l;case m:return d;case y:return u;case v:return p}return f}),e.exports=_},1256:(e,f,t)=>{var n=t(9250),r=t(2934),o=Object.prototype,a=o.hasOwnProperty,i=o.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,"callee")&&!i.call(e,"callee")};e.exports=s},1257:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(4883)],void 0===(o="function"==typeof(n=function(e,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){(0,f.registerExtension)("leaflet",["https://unpkg.com/leaflet/dist/leaflet.js","https://unpkg.com/leaflet/dist/leaflet.css",function(){window.Leaflet=window.L}])}})?n.apply(f,r):n)||(e.exports=o)},1268:function(e,f){var t,n;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,void 0===(n="function"==typeof(t=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n,r,o){var a="",i=e.lastIndexOf("::::"),s=e.lastIndexOf("--");if(i>=0){var c=e.slice(i+4).trim();if(e=e.slice(0,i),f>0&&0===c.length){for(var l=0;l<t;l++)a+="</div>";t=0,f-=1,a+="</div></div>"}else f+=1,a+='\n <div\n id="'.concat(c,'"\n class="disclosable-wrapper"\n >\n <div\n id="').concat(c,'_header"\n class="disclosable-header"></div>\n <div\n class="disclosable-content">')}else if(s>=0){var d=(e=e.slice(s+2)).split(" "),u=d[0],p="";d.length>1&&(p=d[1]),t>0&&""===p?(t-=1,a+="</div>"):(t+=1,a+='\n <div\n id="'.concat(p,'"\n class="decoration-').concat(u,'"\n > '))}else{var h=o.slug(r),g=window.location.pathname,b='<a class="smartdown-h-anchor" href="'.concat(g,"##").concat(h,'">&#x1F517;</a>');a="<h".concat(n,' id="').concat(h,'">').concat(e).concat(b,"</h").concat(n,">")}return a};var f=0,t=0})?t.apply(f,[f]):t)||(e.exports=n)},1270:e=>{function f(t,n){return e.exports=f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,f){return e.__proto__=f,e},e.exports.__esModule=!0,e.exports.default=e.exports,f(t,n)}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},1327:(e,f,t)=>{var n=t(564).default;e.exports=function(e,f){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,f||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===f?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},1364:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t(1790),t(564),t(8155),t(4883)],n=function(f,n,r,o){"use strict";var a=t(6784);f=a(f),n=a(n),r=a(r);var i={};function s(){Filament.applyResult=function(){var e=(0,r.default)(f.default.mark((function e(t,r,o){var a,i;return f.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=1;break}smartdown.consoleWrite(r,["Filament.eval_code() returns undefined"]),e.next=6;break;case 1:if("object"!==(0,n.default)(t)){e.next=5;break}if("function"!=typeof t.cb){e.next=3;break}return a=o.div.id+"_canvas",o.div.innerHTML='\n <canvas\n id="'.concat(a,'"\n style="display: block; margin: auto;"\n xwidth="300"\n height="300"></canvas>\n '),i=document.getElementById(a),e.next=2,t.cb(i);case 2:e.next=4;break;case 3:smartdown.consoleWrite(r,[t]),t.toString&&smartdown.consoleWrite(r,[t.toString()]);case 4:e.next=6;break;case 5:smartdown.consoleWrite(r,["Filament.eval_code() returns ",(0,n.default)(t),t]);case 6:case"end":return e.stop()}}),e)})));return function(f,t,n){return e.apply(this,arguments)}}(),Filament.addSmartdownFunctionsToScope=function(e,t,n){e.install(new Filament.FilamentFunctionWithScope("print",{msg:Filament.REQUIRED},(function(e,f){smartdown.consoleWrite(t,[f])}))),e.install(new Filament.FilamentFunctionWithScope("sd_set",{name:Filament.REQUIRED,value:Filament.REQUIRED},(function(e,f,t){smartdown.setVariable(f.value,t.value)}))),e.install(new Filament.FilamentFunctionWithScope("sd_get",{name:Filament.REQUIRED},(function(e,f){return Filament.string(smartdown.smartdownVariables[f.value])}))),e.install(new Filament.FilamentFunctionWithScope("sd_watch",{name:Filament.REQUIRED,handler:Filament.REQUIRED},(function(e,o,a){n.dependOn[o.value]=(0,r.default)(f.default.mark((function e(){var r;return f.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,a.fun(Filament.string(smartdown.smartdownVariables[o.value]));case 1:return r=e.sent,e.next=2,Filament.applyResult(r,t,n);case 2:case"end":return e.stop()}}),e)})))})))}}i.register=function(){(0,o.registerExtension)("filament",["smartdownBase:lib/filament.js",s])},i.generateAugmentedPlayable=function(e,f){var t;return e?console.log("FilamentExtension.generateAugmentedPlayable isModule==true not yet implemented"):t="(async () => {\nconst filamentSource =\n`".concat(f,"`;\n\nif (typeof Filament === 'object') {\n const localScope = Filament.make_standard_scope();\n Filament.addSmartdownFunctionsToScope(localScope, playable, this);\n\n const ret = await Filament.parseAndEvalWithScope(filamentSource, localScope);\n await Filament.applyResult(ret, playable, this);\n}\nelse {\n const errorMsg = 'Filament is not defined.\\nProbably due to debugging or some failure to load the Filament library';\n this.log(errorMsg);\n}\n})();"),t},e.exports=i},void 0===(o=n.apply(f,r))||(e.exports=o)},1365:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(564)],void 0===(o="function"==typeof(n=function(e,f){"use strict";var n=t(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,f=n(f);var r=t(4753),o=t(4018),a=t(7514),i={Loader:{},VarDefs:null,UserFunctionDefs:null,SystemVarDecls:null,SystemVarUpdates:null,SystemVarDefs:null};"object"===("undefined"==typeof process?"undefined":(0,f.default)(process))&&process.env.TEST_RUN&&(document.hasFocus=document.hasFocus||function(){return!1}),window.smartdownJSModules.p5js={loader:function(e){window.smartdownJSModules.p5js.loaded?e():window.smartdownJSModules.p5js.loadedCallbacks.length>0?window.smartdownJSModules.p5js.loadedCallbacks.push(e):(window.smartdownJSModules.p5js.loadedCallbacks.push(e),t.e(847).then(t.t.bind(t,8773,23)).then((function(e){window.smartdownJSModules.p5js.loaded=e,i.Loader=e.default,window.p5js=e,window.P5=i.Loader,window.p5=i.Loader,t.e(87).then(t.t.bind(t,482,23)).then((function(){var e=window.smartdownJSModules.p5js.loadedCallbacks;window.smartdownJSModules.p5js.loadedCallbacks=[],e.forEach((function(e){e()}))})).catch((function(e){console.log("loadP5Sound error",e)}))})).catch((function(e){console.log("loadP5JSerror",e)})))},loaded:null,loadedCallbacks:[]};var s=[];Object.keys(a).forEach((function(e){if(0!==e.indexOf("_"))if(-1!==o.indexOf(e));else if("function"===a[e])if("loadFont"===e){s.push("\n function loadFontWrapper(p5, path, callback, onError) {\n return p5.loadFont(path, callback, onError);\n }\n const loadFont = loadFontWrapper.bind(p5, p5);\n ")}else if("createCanvas"===e){s.push("\n function createCanvasWrapper(p5, w, h, renderer) {\n //console.log('in createCanvasWrapper', w, h, renderer);\n p5.createCanvas(w, h, renderer);\n width = p5.width;\n height = p5.height;\n }\n const createCanvas = createCanvasWrapper.bind(p5, p5);\n ")}else s.push("const ".concat(e," = p5.").concat(e,".bind(p5);"));else s.push("const "+e+" = p5."+e+";")})),i.VarDefs=s.join("\n");var c=[],l=[],d=[];o.forEach((function(e){c.push("var ".concat(e,";")),l.push("".concat(e," = p5.").concat(e,";")),d.push("const ".concat(e," = p5.").concat(e,";"))})),i.SystemVarDecls=c.join("\n"),i.SystemVarUpdates=l.join(""),i.SystemVarDefs=d.join("");var u=[];r.forEach((function(e){var f="if (typeof ".concat(e," === 'function') {\n p5.").concat(e," = function(p5, ").concat(e,") {\n ").concat(i.SystemVarUpdates,"\n\n ").concat(e,"();\n };\n p5.").concat(e," = p5.").concat(e,".bind(this, p5, ").concat(e,");\n }");u.push(f)})),i.UserFunctionDefs=u.join("\n"),e.default=i})?n.apply(f,r):n)||(e.exports=o)},1375:function(e,f){var t,n;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,void 0===(n="function"==typeof(t=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){if(e.indexOf("`")>=0){for(var f="",t=e.split("`"),n=0;n<t.length;++n)if(f+=t[n],n<t.length-1){var r=t[++n],o=smartdown.smartdownVariables[r];f+=o?"".concat(o):"`".concat(r,"`")}e=f}return e}})?t.apply(f,[f]):t)||(e.exports=n)},1414:e=>{e.exports=function(e,f){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var a=e[t];f(a,t,e)&&(o[r++]=a)}return o}},1416:(e,f,t)=>{var n=t(9138)(t(1433),"DataView");e.exports=n},1433:(e,f,t)=>{var n=t(5380),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();e.exports=o},1452:(e,f,t)=>{var n=t(7499),r=t(9566),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var f=[];for(var t in Object(e))o.call(e,t)&&"constructor"!=t&&f.push(t);return f}},1454:(e,f,t)=>{var n=t(2316),r=t(6458),o=t(2149),a=t(4297),i=t(3121);function s(e){var f=-1,t=null==e?0:e.length;for(this.clear();++f<t;){var n=e[f];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=o,s.prototype.has=a,s.prototype.set=i,e.exports=s},1469:(e,f,t)=>{var n=t(5409)();e.exports=n},1485:e=>{var f=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return f.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1527:(e,f,t)=>{var n=t(369),r=t(9912),o=t(3767);function a(e){var f=-1,t=null==e?0:e.length;for(this.__data__=new n;++f<t;)this.add(e[f])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,e.exports=a},1660:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(1790),t(6060),t(906),t(8155),t(4898),t(1365),t(2539),t(4319),t(5806),t(4883),t(9932)],n=function(f,n,r,o,a,i,s,c,l,d,u,p){"use strict";var h=t(6784);function g(){return g=(0,a.default)(n.default.mark((function f(t,a){var h,g,b,m,y,v,_,w,x,E,k,A,D,C,S,O,T,R,N,j,M,I;return n.default.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:if(h=smartdown.playablesRegistered[a],g=document.getElementById(h.divId),b=document.getElementById(h.preId),m=document.getElementById(h.playId),y=document.getElementById(h.stopId),v=document.getElementById(h.progressId),m&&(m.style.display="none",y.style.display="inline-block"),b&&(b.style.display="none"),v&&(v.style.display=h.targetDivId?"inline-block":"block"),h.playing=!0,g.parentElement.classList.add("playable-playing"),g&&(g.style.display=h.targetDivId?"inline":"block"),!i.default[t].javascript){f.next=12;break}if(_=[h,smartdown.smartdownVariables,s.default.Loader,window.d3,window.d3fc,window.d3dc,window.topojson,window.Plotly,window.Leaflet,window.Stdlib,window.THREE,e.exports,{}],h.embedThis={env:smartdown.smartdownVariables,div:g,progress:v,dependOn:{},depend:null,log:function(){for(var e=arguments.length,f=new Array(e),t=0;t<e;t++)f[t]=arguments[t];smartdown.consoleWrite(h,f)},atExitHandlers:[],atExit:function(e){this.atExitHandlers.push(e)}},"p5js"===t.toLowerCase()){f.next=5;break}if(!h.isModule||"typescript"===h.language){f.next=2;break}return f.next=1,smartdown.runModule(h,_,t);case 1:f.next=4;break;case 2:return f.next=3,smartdown.runFunction(h.augmentedCode,h.embedThis,_,t,g);case 3:w=f.sent,"leaflet"!==t||h.embedThis.leafletMap||(h.embedThis.leafletMap=w);case 4:f.next=6;break;case 5:for(E=function(){for(var e=0;e<s.default.Loader.soundOut.soundArray.length;e++){var f=s.default.Loader.soundOut.soundArray[e];f.owner&&f.owner!==this||f.dispose()}},k=s.default.Loader.prototype._registeredMethods.remove,A=0;A<k.length;++A)k[A]===s.default.Loader.prototype.disposeSound&&(k[A]=E);s.default.Loader.prototype._ontouchend=function(e){e.clientX=e.pageX,e.clientY=e.pageY,this._updateTouchCoords(e),this._updateNextMouseCoords(e),0===this.touches.length&&this._setProperty("touchIsDown",!1);var f=this._isGlobal?window:this;"function"==typeof f.touchEnded?!1===f.touchEnded(e)&&e.preventDefault():"function"==typeof f.mouseReleased&&!1===f.mouseReleased(e)&&e.preventDefault()},D=(0,r.default)(Function,(0,o.default)(d.default).concat([h.augmentedCode])),h.embedThis.IAMP5="IAMP5",D=(x=D).bind.apply(x,[h.embedThis].concat((0,o.default)(_.slice(0,-1))));try{C=function(e){var f=[S.LEFT_ARROW,S.RIGHT_ARROW,S.UP_ARROW,S.DOWN_ARROW,32];"BODY"===e.target.tagName&&f.indexOf(e.keyCode)>=0&&e.preventDefault()},60===(S=new s.default.Loader(D,g))._targetFrameRate&&S.frameRate(16),S._onresize(),S.keydownHandler=C,window.addEventListener("keydown",C,!1),h.p5=S}catch(e){console.log("#### Error initializing P5JS",e),g.innerHTML='\n<pre><code style="color:tomato;">\n<b>Error Initializing P5JS</b>\n'.concat(e,"\n</code></pre>\n")}case 6:if(!h||!h.playing){f.next=11;break}if(O=h.embedThis,T=O.depend,R=O.dependOn,N=!1,!Array.isArray(R)){f.next=9;break}if(T){f.next=7;break}N=!0,f.next=8;break;case 7:if(j=!1,R.forEach((function(e){var f=smartdown.smartdownVariables[e];void 0===f&&(j=!0),h.dependLastValues[e]=f})),j){f.next=8;break}return N=!0,f.next=8,T.apply(h.embedThis);case 8:f.next=10;break;case 9:R&&(M=!1,Object.keys(R).forEach((function(e){M=!0;var f=smartdown.smartdownVariables[e];h.dependLastValues[e]=f,void 0!==f&&(N=!0,R[e].apply(h.embedThis))})),M||(N=!0));case 10:N&&v&&(v.style.display="none");case 11:f.next=13;break;case 12:"mermaid"===t?(c.default.mermaidRender(g,h.code),v&&(v.style.display="none")):"graphviz"===t?(g.innerHTML="",window.smartdownJSModules.graphviz.loader((function(){var e={images:l.default};(new window.Viz).renderString(h.code,e).then((function(e){v&&(v.style.display="none"),g.innerHTML=e}))}))):0===t.indexOf("abc")?(I=g.id,g.innerHTML='\n <div class="abc-wrapper">\n <div\n id="'.concat(I,'-sheet"\n class="smartdown-abcsheet">\n </div>\n <div\n id="').concat(I,'-midi"\n class="smartdown-abcmidi">\n </div>\n </div>\n'),(0,u.ensureExtension)("abc",(function(){(0,p.default)(I,t,h.code),v&&(v.style.display="none")}))):console.log("language: ",t);case 13:case"end":return f.stop()}}),f)}))),g.apply(this,arguments)}function b(e,f,t,n){if(t.length>0){var r=t.shift(),o=r[0],a=r[1];(0,u.isExtensionRegistered)(o)?(0,u.ensureExtension)(o,(function(){b(e,f,t,n)})):"p5js"===o.toLowerCase()?window.smartdownJSModules.p5js.loader((function(){b(e,f,t,n)})):"graphviz"===o?window.smartdownJSModules.graphviz.loader((function(){b(e,f,t,n)})):(0,u.loadExternal)(o,a,(function(){b(e,f,t,n)}))}else n&&n()}Object.defineProperty(f,"__esModule",{value:!0}),f.default=function(e,f){var t=smartdown.playablesRegistered[f];if(t){var n=t.imports.slice(0),r=document.getElementById(t.progressId);r.style.display=t.targetDivId?"inline-block":"block",b(e,f,n,(function(){r.style.display="none",function(e,f){g.apply(this,arguments)}(e,f)}))}else console.log("playPlayable... not found",e,f,smartdown.playablesRegistered,perPageState.playablesRegisteredOrder)},n=h(n),r=h(r),o=h(o),a=h(a),i=h(i),s=h(s),c=h(c),l=h(l),d=h(d),p=h(p)},void 0===(o=n.apply(f,r))||(e.exports=o)},1701:(e,f,t)=>{var n=t(1469),r=t(1178);e.exports=function(e,f){return e&&n(e,f,r)}},1715:function(e,f,t){var n,r,o;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[f,t(5390),t(8725),t(9793),t(7482)],void 0===(o="function"==typeof(n=function(e,f,n,r,o){"use strict";var a=t(6784);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e={},t=o.default.expressionsRegistered;Object.keys(t).forEach((function(f){var n=t[f];if(n){var r=document.getElementById(n.rootDivId),o=document.getElementById(n.labelId);r&&o&&(e[n.exprId]=n)}})),(0,r.default)(o.default.expressionsRegistered,e);var a=[],i={};(0,f.default)(o.default.playablesRegisteredOrder,(function(e){document.getElementById(e.divId)?(a.push(e),i[e.divId]=e):e.deleted=!0})),(0,r.default)(o.default.playablesRegistered,e),(0,n.default)(o.default.playablesRegisteredOrder,a)},f=a(f),n=a(n),r=a(r),o=a(o)})?n.apply(f,r):n)||(e.exports=o)},1738:e=>{var f=Object.prototype.toString;e.exports=function(e){return f.call(e)}},1790:(e,f,t)=>{var n=t(3051)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},1819:(e,f,t)=>{var n=t(8113);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},1842:(e,f,t)=>{"use strict";var n=t(296),r=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var f,t,n,o,a,i=e;for(a=new Array(i.length),f=0,t=i.length;f<t;f+=1){if(n=i[f],"[object Object]"!==r.call(n))return!1;if(1!==(o=Object.keys(n)).length)return!1;a[f]=[o[0],n[o[0]]]}return!0},construct:function(e){if(null===e)return[];var f,t,n,r,o,a=e;for(o=new Array(a.length),f=0,t=a.length;f<t;f+=1)n=a[f],r=Object.keys(n),o[f]=[r[0],n[r[0]]];return o}})},1848:(e,f,t)=>{var n=t(2707);e.exports=function(){this.__data__=new n,this.size=0}},1955:(e,f,t)=>{var n=t(9138)(t(1433),"Map");e.exports=n},1986:(e,f,t)=>{"use strict";var n=t(296),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var f,t,n=0,o=e.length,a=r;for(t=0;t<o;t++)if(!((f=a.indexOf(e.charAt(t)))>64)){if(f<0)return!1;n+=6}return n%8==0},construct:function(e){var f,t,n=e.replace(/[\r\n=]/g,""),o=n.length,a=r,i=0,s=[];for(f=0;f<o;f++)f%4==0&&f&&(s.push(i>>16&255),s.push(i>>8&255),s.push(255&i)),i=i<<6|a.indexOf(n.charAt(f));return 0==(t=o%4*6)?(s.push(i>>16&255),s.push(i>>8&255),s.push(255&i)):18===t?(s.push(i>>10&255),s.push(i>>2&255)):12===t&&s.push(i>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var f,t,n="",o=0,a=e.length,i=r;for(f=0;f<a;f++)f%3==0&&f&&(n+=i[o>>18&63],n+=i[o>>12&63],n+=i[o>>6&63],n+=i[63&o]),o=(o<<8)+e[f];return 0==(t=a%3)?(n+=i[o>>18&63],n+=i[o>>12&63],n+=i[o>>6&63],n+=i[63&o]):2===t?(n+=i[o>>10&63],n+=i[o>>4&63],n+=i[o<<2&63],n+=i[64]):1===t&&(n+=i[o>>2&63],n+=i[o<<4&63],n+=i[64],n+=i[64]),n}})},2032:(e,f,t)=>{var n=t(6469),r=t(4075),o=t(4622),a=t(2677),i=t(1201),s=t(6397),c=t(492),l=t(7995),d="[object Arguments]",u="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,f,t,g,b,m){var y=s(e),v=s(f),_=y?u:i(e),w=v?u:i(f),x=(_=_==d?p:_)==p,E=(w=w==d?p:w)==p,k=_==w;if(k&&c(e)){if(!c(f))return!1;y=!0,x=!1}if(k&&!x)return m||(m=new n),y||l(e)?r(e,f,t,g,b,m):o(e,f,_,t,g,b,m);if(!(1&t)){var A=x&&h.call(e,"__wrapped__"),D=E&&h.call(f,"__wrapped__");if(A||D){var C=A?e.value():e,S=D?f.value():f;return m||(m=new n),b(C,S,t,g,m)}}return!!k&&(m||(m=new n),a(e,f,t,g,b,m))}},2092:(e,f,t)=>{var n=t(1454),r=t(2707),o=t(1955);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||r),string:new n}}},2122:(e,f,t)=>{var n=t(2032),r=t(2934);e.exports=function e(f,t,o,a,i){return f===t||(null==f||null==t||!r(f)&&!r(t)?f!=f&&t!=t:n(f,t,o,a,e,i))}},2144:function(e,f,t){var n,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,void 0===(r="function"==typeof(n=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t,n){return f(t,n)};var f=t(8264)})?n.apply(f,[f]):n)||(e.exports=r)},2149:(e,f,t)=>{var n=t(4558),r=Object.prototype.hasOwnProperty;e.exports=function(e){var f=this.__data__;if(n){var t=f[e];return"__lodash_hash_undefined__"===t?void 0:t}return r.call(f,e)?f[e]:void 0}},2203:e=>{"use strict";function f(e,f){var t="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(t+='in "'+e.mark.name+'" '),t+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!f&&e.mark.snippet&&(t+="\n\n"+e.mark.snippet),n+" "+t):n}function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=f(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){return this.name+": "+f(this,e)},e.exports=t},2249:function(e,f,t){var n,r;void 0===(r="function"==typeof(n=function(){"use strict";function f(e,f,t){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){i(n.response,f,t)},n.onerror=function(){console.error("could not download fi