Socket
Socket
Sign inDemoInstall

@webqit/subscript

Package Overview
Dependencies
2
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.36 to 2.1.37

20

dist/dev-elements.js
(()=>{function J(v,e=!1){let t=v.split(/\n/g);if(t.length>1){for(;!t[0].trim().length;)t.shift();let i=t[e?1:0].split(/[^\s]/)[0].length;if(i)return t.map((n,r)=>{let s=n.substring(0,i);return s.trim().length?s.trim()==="}"&&r===t.length-1?"}":n:n.substring(i)}).join(`
`)}return v}var $=(v,e)=>v instanceof Promise?v.then(e):e(v);var R=v=>class extends v{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach(t=>{if(t.includes("{")&&t.includes(":")&&t.includes(";")){let i=this.shadowRoot.appendChild(document.createElement("style"));i.textContent=t}else{let i=this.shadowRoot.appendChild(document.createElement("link"));i.setAttribute("rel","stylesheet"),i.setAttribute("href",t)}})}get css(){return[]}};var ge=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{},g=function(v){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,i={},n={manual:v.Prism&&v.Prism.manual,disableWorkerMessageHandler:v.Prism&&v.Prism.disableWorkerMessageHandler,util:{encode:function o(c){return c instanceof r?new r(c.type,o(c.content),c.alias):Array.isArray(c)?c.map(o):c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(o){return Object.prototype.toString.call(o).slice(8,-1)},objId:function(o){return o.__id||Object.defineProperty(o,"__id",{value:++t}),o.__id},clone:function o(c,p){var f,d;switch(p=p||{},n.util.type(c)){case"Object":if(d=n.util.objId(c),p[d])return p[d];for(var x in f={},p[d]=f,c)c.hasOwnProperty(x)&&(f[x]=o(c[x],p));return f;case"Array":return d=n.util.objId(c),p[d]?p[d]:(f=[],p[d]=f,c.forEach(function(y,w){f[w]=o(y,p)}),f);default:return c}},getLanguage:function(o){for(;o;){var c=e.exec(o.className);if(c)return c[1].toLowerCase();o=o.parentElement}return"none"},setLanguage:function(o,c){o.className=o.className.replace(RegExp(e,"gi"),""),o.classList.add("language-"+c)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(f){var o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(f.stack)||[])[1];if(o){var c=document.getElementsByTagName("script");for(var p in c)if(c[p].src==o)return c[p]}return null}},isActive:function(o,c,p){for(var f="no-"+c;o;){var d=o.classList;if(d.contains(c))return!0;if(d.contains(f))return!1;o=o.parentElement}return!!p}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(o,c){var p=n.util.clone(n.languages[o]);for(var f in c)p[f]=c[f];return p},insertBefore:function(o,c,p,f){var d=(f=f||n.languages)[o],x={};for(var y in d)if(d.hasOwnProperty(y)){if(y==c)for(var w in p)p.hasOwnProperty(w)&&(x[w]=p[w]);p.hasOwnProperty(y)||(x[y]=d[y])}var A=f[o];return f[o]=x,n.languages.DFS(n.languages,function(C,T){T===A&&C!=o&&(this[C]=x)}),x},DFS:function o(c,p,f,d){d=d||{};var x=n.util.objId;for(var y in c)if(c.hasOwnProperty(y)){p.call(c,y,c[y],f||y);var w=c[y],A=n.util.type(w);A!=="Object"||d[x(w)]?A!=="Array"||d[x(w)]||(d[x(w)]=!0,o(w,p,y,d)):(d[x(w)]=!0,o(w,p,null,d))}}},plugins:{},highlightAll:function(o,c){n.highlightAllUnder(document,o,c)},highlightAllUnder:function(o,c,p){var f={callback:p,container:o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",f),f.elements=Array.prototype.slice.apply(f.container.querySelectorAll(f.selector)),n.hooks.run("before-all-elements-highlight",f);for(var d,x=0;d=f.elements[x++];)n.highlightElement(d,c===!0,f.callback)},highlightElement:function(o,c,p){var f=n.util.getLanguage(o),d=n.languages[f];n.util.setLanguage(o,f);var x=o.parentElement;x&&x.nodeName.toLowerCase()==="pre"&&n.util.setLanguage(x,f);var y={element:o,language:f,grammar:d,code:o.textContent};function w(C){y.highlightedCode=C,n.hooks.run("before-insert",y),y.element.innerHTML=y.highlightedCode,n.hooks.run("after-highlight",y),n.hooks.run("complete",y),p&&p.call(y.element)}if(n.hooks.run("before-sanity-check",y),(x=y.element.parentElement)&&x.nodeName.toLowerCase()==="pre"&&!x.hasAttribute("tabindex")&&x.setAttribute("tabindex","0"),!y.code)return n.hooks.run("complete",y),void(p&&p.call(y.element));if(n.hooks.run("before-highlight",y),y.grammar)if(c&&v.Worker){var A=new Worker(n.filename);A.onmessage=function(C){w(C.data)},A.postMessage(JSON.stringify({language:y.language,code:y.code,immediateClose:!0}))}else w(n.highlight(y.code,y.grammar,y.language));else w(n.util.encode(y.code))},highlight:function(o,c,p){var f={code:o,grammar:c,language:p};if(n.hooks.run("before-tokenize",f),!f.grammar)throw new Error('The language "'+f.language+'" has no grammar.');return f.tokens=n.tokenize(f.code,f.grammar),n.hooks.run("after-tokenize",f),r.stringify(n.util.encode(f.tokens),f.language)},tokenize:function(o,c){var p=c.rest;if(p){for(var f in p)c[f]=p[f];delete c.rest}var d=new l;return u(d,d.head,o),function x(y,w,A,C,T,k){for(var F in A)if(A.hasOwnProperty(F)&&A[F]){var _=A[F];_=Array.isArray(_)?_:[_];for(var S=0;S<_.length;++S){if(k&&k.cause==F+","+S)return;var E=_[S],z=E.inside,I=!!E.lookbehind,D=!!E.greedy,ne=E.alias;if(D&&!E.pattern.global){var de=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,de+"g")}for(var le=E.pattern||E,L=C.next,N=T;L!==w.tail&&!(k&&N>=k.reach);N+=L.value.length,L=L.next){var M=L.value;if(w.length>y.length)return;if(!(M instanceof r)){var P,Z=1;if(D){if(!(P=s(le,N,y,I))||P.index>=y.length)break;var K=P.index,pe=P.index+P[0].length,O=N;for(O+=L.value.length;O<=K;)L=L.next,O+=L.value.length;if(O-=L.value.length,N=O,L.value instanceof r)continue;for(var H=L;H!==w.tail&&(O<pe||typeof H.value=="string");H=H.next)Z++,O+=H.value.length;Z--,M=y.slice(N,O),P.index-=N}else if(!(P=s(le,0,M,I)))continue;var K=P.index,U=P[0],ie=M.slice(0,K),ce=M.slice(K+U.length),re=N+M.length;k&&re>k.reach&&(k.reach=re);var G=L.prev;ie&&(G=u(w,G,ie),N+=ie.length),h(w,G,Z);var fe=new r(F,z?n.tokenize(U,z):U,ne,U);if(L=u(w,G,fe),ce&&u(w,L,ce),1<Z){var se={cause:F+","+S,reach:re};x(y,w,A,L.prev,N,se),k&&se.reach>k.reach&&(k.reach=se.reach)}}}}}}(o,d,c,d.head,0),function(x){for(var y=[],w=x.head.next;w!==x.tail;)y.push(w.value),w=w.next;return y}(d)},hooks:{all:{},add:function(o,c){var p=n.hooks.all;p[o]=p[o]||[],p[o].push(c)},run:function(o,c){var p=n.hooks.all[o];if(p&&p.length)for(var f,d=0;f=p[d++];)f(c)}},Token:r};function r(o,c,p,f){this.type=o,this.content=c,this.alias=p,this.length=0|(f||"").length}function s(o,c,p,f){o.lastIndex=c;var d=o.exec(p);if(d&&f&&d[1]){var x=d[1].length;d.index+=x,d[0]=d[0].slice(x)}return d}function l(){var o={value:null,prev:null,next:null},c={value:null,prev:o,next:null};o.next=c,this.head=o,this.tail=c,this.length=0}function u(o,c,p){var f=c.next,d={value:p,prev:c,next:f};return c.next=d,f.prev=d,o.length++,d}function h(o,c,p){for(var f=c.next,d=0;d<p&&f!==o.tail;d++)f=f.next;(c.next=f).prev=c,o.length-=d}if(v.Prism=n,r.stringify=function o(c,p){if(typeof c=="string")return c;if(Array.isArray(c)){var f="";return c.forEach(function(A){f+=o(A,p)}),f}var d={type:c.type,content:o(c.content,p),tag:"span",classes:["token",c.type],attributes:{},language:p},x=c.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(d.classes,x):d.classes.push(x)),n.hooks.run("wrap",d);var y="";for(var w in d.attributes)y+=" "+w+'="'+(d.attributes[w]||"").replace(/"/g,"&quot;")+'"';return"<"+d.tag+' class="'+d.classes.join(" ")+'"'+y+">"+d.content+"</"+d.tag+">"},!v.document)return v.addEventListener&&(n.disableWorkerMessageHandler||v.addEventListener("message",function(o){var c=JSON.parse(o.data),p=c.language,f=c.code,d=c.immediateClose;v.postMessage(n.highlight(f,n.languages[p],p)),d&&v.close()},!1)),n;var m=n.util.currentScript();function a(){n.manual||n.highlightAll()}if(m&&(n.filename=m.src,m.hasAttribute("data-manual")&&(n.manual=!0)),!n.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",a):window.requestAnimationFrame?window.requestAnimationFrame(a):window.setTimeout(a,16)}return n}(ge);typeof module<"u"&&module.exports&&(module.exports=g),typeof global<"u"&&(global.Prism=g);g.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},g.languages.markup.tag.inside["attr-value"].inside.entity=g.languages.markup.entity,g.languages.markup.doctype.inside["internal-subset"].inside=g.languages.markup,g.hooks.add("wrap",function(v){v.type==="entity"&&(v.attributes.title=v.content.replace(/&amp;/,"&"))}),Object.defineProperty(g.languages.markup.tag,"addInlined",{value:function(v,e){var t={};t["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:g.languages[e]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};i["language-"+e]={pattern:/[\s\S]+/,inside:g.languages[e]};var n={};n[v]={pattern:RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(/__/g,function(){return v}),"i"),lookbehind:!0,greedy:!0,inside:i},g.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(g.languages.markup.tag,"addAttribute",{value:function(v,e){g.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(`(^|["'\\s])(?:`+v+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:g.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),g.languages.html=g.languages.markup,g.languages.mathml=g.languages.markup,g.languages.svg=g.languages.markup,g.languages.xml=g.languages.extend("markup",{}),g.languages.ssml=g.languages.xml,g.languages.atom=g.languages.xml,g.languages.rss=g.languages.xml;(function(v){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;v.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+`|(?:[^\\\\\r
()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},v.languages.css.atrule.inside.rest=v.languages.css;var t=v.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(g);g.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};g.languages.javascript=g.languages.extend("clike",{"class-name":[g.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),g.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,g.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:g.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:g.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:g.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:g.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:g.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),g.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:g.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),g.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),g.languages.markup&&(g.languages.markup.tag.addInlined("script","javascript"),g.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),g.languages.js=g.languages.javascript;(function(){if(typeof g<"u"&&typeof document<"u"&&document.querySelector){var v,e="line-numbers",t="linkable-line-numbers",i=function(){if(v===void 0){var a=document.createElement("div");a.style.fontSize="13px",a.style.lineHeight="1.5",a.style.padding="0",a.style.border="0",a.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(a),v=a.offsetHeight===38,document.body.removeChild(a)}return v},n=!0;g.plugins.lineHighlight={highlightLines:function(a,b,o){var c=(b=typeof b=="string"?b:a.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),p=+a.getAttribute("data-line-offset")||0,f=(i()?parseInt:parseFloat)(getComputedStyle(a).lineHeight),d=g.util.isActive(a,e),x=a.querySelector("code"),y=d?a:x||a,w=[],A=x&&y!=x?function(k,F){var _=getComputedStyle(k),S=getComputedStyle(F);function E(z){return+z.substr(0,z.length-2)}return F.offsetTop+E(S.borderTopWidth)+E(S.paddingTop)-E(_.paddingTop)}(a,x):0;c.forEach(function(k){var F=k.split("-"),_=+F[0],S=+F[1]||_,E=a.querySelector('.line-highlight[data-range="'+k+'"]')||document.createElement("div");if(w.push(function(){E.setAttribute("aria-hidden","true"),E.setAttribute("data-range",k),E.className=(o||"")+" line-highlight"}),d&&g.plugins.lineNumbers){var z=g.plugins.lineNumbers.getLine(a,_),I=g.plugins.lineNumbers.getLine(a,S);if(z){var D=z.offsetTop+A+"px";w.push(function(){E.style.top=D})}if(I){var ne=I.offsetTop-z.offsetTop+I.offsetHeight+"px";w.push(function(){E.style.height=ne})}}else w.push(function(){E.setAttribute("data-start",String(_)),_<S&&E.setAttribute("data-end",String(S)),E.style.top=(_-p-1)*f+A+"px",E.textContent=new Array(S-_+2).join(`
`)});w.push(function(){E.style.width=a.scrollWidth+"px"}),w.push(function(){y.appendChild(E)})});var C=a.id;if(d&&g.util.isActive(a,t)&&C){l(a,t)||w.push(function(){a.classList.add(t)});var T=parseInt(a.getAttribute("data-start")||"1");s(".line-numbers-rows > span",a).forEach(function(k,F){var _=F+T;k.onclick=function(){var S=C+"."+_;n=!1,location.hash=S,setTimeout(function(){n=!0},1)}})}return function(){w.forEach(u)}}};var r=0;g.hooks.add("before-sanity-check",function(a){var b=a.element.parentElement;if(h(b)){var o=0;s(".line-highlight",b).forEach(function(c){o+=c.textContent.length,c.parentNode.removeChild(c)}),o&&/^(?: \n)+$/.test(a.code.slice(-o))&&(a.code=a.code.slice(0,-o))}}),g.hooks.add("complete",function a(b){var o=b.element.parentElement;if(h(o)){clearTimeout(r);var c=g.plugins.lineNumbers,p=b.plugins&&b.plugins.lineNumbers;l(o,e)&&c&&!p?g.hooks.add("line-numbers",a):(g.plugins.lineHighlight.highlightLines(o)(),r=setTimeout(m,1))}}),window.addEventListener("hashchange",m),window.addEventListener("resize",function(){s("pre").filter(h).map(function(a){return g.plugins.lineHighlight.highlightLines(a)}).forEach(u)})}function s(a,b){return Array.prototype.slice.call((b||document).querySelectorAll(a))}function l(a,b){return a.classList.contains(b)}function u(a){a()}function h(a){return!(!a||!/pre/i.test(a.nodeName))&&(!!a.hasAttribute("data-line")||!(!a.id||!g.util.isActive(a,t)))}function m(){var a=location.hash.slice(1);s(".temporary.line-highlight").forEach(function(p){p.parentNode.removeChild(p)});var b=(a.match(/\.([\d,-]+)$/)||[,""])[1];if(b&&!document.getElementById(a)){var o=a.slice(0,a.lastIndexOf(".")),c=document.getElementById(o);c&&(c.hasAttribute("data-line")||c.setAttribute("data-line",""),g.plugins.lineHighlight.highlightLines(c,b,"temporary ")(),n&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}})();(function(){if(typeof g<"u"&&typeof document<"u"){var v="line-numbers",e=/\n(?!$)/g,t=g.plugins.lineNumbers={getLine:function(r,s){if(r.tagName==="PRE"&&r.classList.contains(v)){var l=r.querySelector(".line-numbers-rows");if(l){var u=parseInt(r.getAttribute("data-start"),10)||1,h=u+(l.children.length-1);s<u&&(s=u),h<s&&(s=h);var m=s-u;return l.children[m]}}},resize:function(r){n([r])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+v))))}),g.hooks.add("complete",function(r){if(r.code){var s=r.element,l=s.parentNode;if(l&&/pre/i.test(l.nodeName)&&!s.querySelector(".line-numbers-rows")&&g.util.isActive(s,v)){s.classList.remove(v),l.classList.add(v);var u,h=r.code.match(e),m=h?h.length+1:1,a=new Array(m+1).join("<span></span>");(u=document.createElement("span")).setAttribute("aria-hidden","true"),u.className="line-numbers-rows",u.innerHTML=a,l.hasAttribute("data-start")&&(l.style.counterReset="linenumber "+(parseInt(l.getAttribute("data-start"),10)-1)),r.element.appendChild(u),n([l]),g.hooks.run("line-numbers",r)}}}),g.hooks.add("line-numbers",function(r){r.plugins=r.plugins||{},r.plugins.lineNumbers=!0})}function n(r){if((r=r.filter(function(l){var u=function(h){return h?window.getComputedStyle?getComputedStyle(h):h.currentStyle||null:null}(l)["white-space"];return u==="pre-wrap"||u==="pre-line"})).length!=0){var s=r.map(function(l){var u=l.querySelector("code"),h=l.querySelector(".line-numbers-rows");if(u&&h){var m=l.querySelector(".line-numbers-sizer"),a=u.textContent.split(e);m||((m=document.createElement("span")).className="line-numbers-sizer",u.appendChild(m)),m.innerHTML="0",m.style.display="block";var b=m.getBoundingClientRect().height;return m.innerHTML="",{element:l,lines:a,lineHeights:[],oneLinerHeight:b,sizer:m}}}).filter(Boolean);s.forEach(function(l){var u=l.sizer,h=l.lines,m=l.lineHeights,a=l.oneLinerHeight;m[h.length-1]=void 0,h.forEach(function(b,o){if(b&&1<b.length){var c=u.appendChild(document.createElement("span"));c.style.display="block",c.textContent=b}else m[o]=a})}),s.forEach(function(l){for(var u=l.sizer,h=l.lineHeights,m=0,a=0;a<h.length;a++)h[a]===void 0&&(h[a]=u.children[m++].getBoundingClientRect().height)}),s.forEach(function(l){var u=l.sizer,h=l.element.querySelector(".line-numbers-rows");u.style.display="none",u.innerHTML="",l.lineHeights.forEach(function(m,a){h.children[a].style.height=m+"px"})})}}})();(function(){if(typeof g<"u"&&typeof document<"u"){var v=[],e={},t=function(){};g.plugins.toolbar={};var i=g.plugins.toolbar.registerButton=function(r,s){var l;l=typeof s=="function"?s:function(u){var h;return typeof s.onClick=="function"?((h=document.createElement("button")).type="button",h.addEventListener("click",function(){s.onClick.call(this,u)})):typeof s.url=="string"?(h=document.createElement("a")).href=s.url:h=document.createElement("span"),s.className&&h.classList.add(s.className),h.textContent=s.text,h},r in e?console.warn('There is a button with the key "'+r+'" registered already.'):v.push(e[r]=l)},n=g.plugins.toolbar.hook=function(r){var s=r.element.parentNode;if(s&&/pre/i.test(s.nodeName)&&!s.parentNode.classList.contains("code-toolbar")){var l=document.createElement("div");l.classList.add("code-toolbar"),s.parentNode.insertBefore(l,s),l.appendChild(s);var u=document.createElement("div");u.classList.add("toolbar");var h=v,m=function(a){for(;a;){var b=a.getAttribute("data-toolbar-order");if(b!=null)return(b=b.trim()).length?b.split(/\s*,\s*/g):[];a=a.parentElement}}(r.element);m&&(h=m.map(function(a){return e[a]||t})),h.forEach(function(a){var b=a(r);if(b){var o=document.createElement("div");o.classList.add("toolbar-item"),o.appendChild(b),u.appendChild(o)}}),l.appendChild(u)}};i("label",function(r){var s=r.element.parentNode;if(s&&/pre/i.test(s.nodeName)&&s.hasAttribute("data-label")){var l,u,h=s.getAttribute("data-label");try{u=document.querySelector("template#"+h)}catch{}return u?l=u.content:(s.hasAttribute("data-url")?(l=document.createElement("a")).href=s.getAttribute("data-url"):l=document.createElement("span"),l.textContent=h),l}}),g.hooks.add("complete",n)}})();(function(){function v(t,i){t.addEventListener("click",function(){(function(n){navigator.clipboard?navigator.clipboard.writeText(n.getText()).then(n.success,function(){e(n)}):e(n)})(i)})}function e(t){var i=document.createElement("textarea");i.value=t.getText(),i.style.top="0",i.style.left="0",i.style.position="fixed",document.body.appendChild(i),i.focus(),i.select();try{var n=document.execCommand("copy");setTimeout(function(){n?t.success():t.error()},1)}catch(r){setTimeout(function(){t.error(r)},1)}document.body.removeChild(i)}typeof g<"u"&&typeof document<"u"&&(g.plugins.toolbar?g.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var i=t.element,n=function(h){var m={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var a in m){for(var b="data-prismjs-"+a,o=h;o&&!o.hasAttribute(b);)o=o.parentElement;o&&(m[a]=o.getAttribute(b))}return m}(i),r=document.createElement("button");r.className="copy-to-clipboard-button",r.setAttribute("type","button");var s=document.createElement("span");return r.appendChild(s),u("copy"),v(r,{getText:function(){return i.textContent},success:function(){u("copy-success"),l()},error:function(){u("copy-error"),setTimeout(function(){(function(h){window.getSelection().selectAllChildren(h)})(i)},1),l()}}),r;function l(){setTimeout(function(){u("copy")},n["copy-timeout"])}function u(h){s.textContent=n[h],r.setAttribute("data-copy-state",h)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))})();(function(){if(typeof g<"u"&&typeof document<"u"){var v={"(":")","[":"]","{":"}"},e={"(":"brace-round","[":"brace-square","{":"brace-curly"},t={"${":"{"},i=0,n=/^(pair-\d+-)(close|open)$/;g.hooks.add("complete",function(m){var a=m.element,b=a.parentElement;if(b&&b.tagName=="PRE"){var o=[];if(g.util.isActive(a,"match-braces")&&o.push("(","[","{"),o.length!=0){b.__listenerAdded||(b.addEventListener("mousedown",function(){var d=b.querySelector("code"),x=r("brace-selected");Array.prototype.slice.call(d.querySelectorAll("."+x)).forEach(function(y){y.classList.remove(x)})}),Object.defineProperty(b,"__listenerAdded",{value:!0}));var c=Array.prototype.slice.call(a.querySelectorAll("span."+r("token")+"."+r("punctuation"))),p=[];o.forEach(function(d){for(var x=v[d],y=r(e[d]),w=[],A=[],C=0;C<c.length;C++){var T=c[C];if(T.childElementCount==0){var k=T.textContent;(k=t[k]||k)===d?(p.push({index:C,open:!0,element:T}),T.classList.add(y),T.classList.add(r("brace-open")),A.push(C)):k===x&&(p.push({index:C,open:!1,element:T}),T.classList.add(y),T.classList.add(r("brace-close")),A.length&&w.push([C,A.pop()]))}}w.forEach(function(F){var _="pair-"+i+++"-",S=c[F[0]],E=c[F[1]];S.id=_+"open",E.id=_+"close",[S,E].forEach(function(z){z.addEventListener("mouseenter",l),z.addEventListener("mouseleave",u),z.addEventListener("click",h)})})});var f=0;p.sort(function(d,x){return d.index-x.index}),p.forEach(function(d){d.open?(d.element.classList.add(r("brace-level-"+(f%12+1))),f++):(f=Math.max(0,f-1),d.element.classList.add(r("brace-level-"+(f%12+1))))})}}})}function r(m){var a=g.plugins.customClass;return a?a.apply(m,"none"):m}function s(m){var a=n.exec(m.id);return document.querySelector("#"+a[1]+(a[2]=="open"?"close":"open"))}function l(){g.util.isActive(this,"brace-hover",!0)&&[this,s(this)].forEach(function(m){m.classList.add(r("brace-hover"))})}function u(){[this,s(this)].forEach(function(m){m.classList.remove(r("brace-hover"))})}function h(){g.util.isActive(this,"brace-select",!0)&&[this,s(this)].forEach(function(m){m.classList.add(r("brace-selected"))})}})();var ae=v=>class extends R(v||HTMLElement){static get observedAttributes(){return["name","editable","placeholder"]}connectedCallback(){let e=t=>t.replace(new RegExp("&","g"),"&amp;").replace(new RegExp("<","g"),"&lt;");this._lang="javascript",this._editable=this.getAttribute("editable"),this._styledBlock=this.getAttribute("styled-block")||"pre",this._div=document.createElement("div"),this._preBlock=this._div.appendChild(document.createElement("pre")),this._codeBlock=this._preBlock.appendChild(document.createElement("code")),this._div.classList.add("line-numbers"),this._div.classList.add("container"),this._lang&&(this._preBlock.classList.add("language-"+this._lang),this._codeBlock.classList.add("language-"+this._lang)),this._contentSlot=document.createElement("slot"),this._contentSlot.setAttribute("aria-hidden","true"),this._contentSlot.setAttribute("hidden","true"),this._initialSlotEvent=!1,this._contentSlot.addEventListener("slotchange",()=>{let t=this._contentSlot.assignedNodes().reduce((i,n)=>i+(n.outerHTML||n.nodeValue||""),"");this._initialSlotEvent||(t=J(t),this._initialSlotEvent=!0),this._textarea&&(this._textarea.value=t),this.source=e(t)}),this._editable==="true"&&this._addEditor(),this.shadowRoot.append(this._contentSlot,this._textarea||"",this._div),super.connectedCallback()}get source(){return this._codeBlock.textContent}set source(e){e.endsWith(`
`)&&(e+=" "),this._codeBlock.innerHTML="",this._codeBlock.innerHTML=e,this._highlightCodeBlock(),this._syncScrolling()}get name(){return this._name}set name(e){return this.setAttribute("name",e)}get placeholder(){return this._placeholder}set placeholder(e){return this.setAttribute("placeholder",e)}get editable(){return this._editable}set editable(e){return this.setAttribute("editable",e===!0?"true":e===!1?"false":e)}_addEditor(){this._placeholder=this.getAttribute("placeholder"),this._name=this.getAttribute("name"),this._textarea=this._div.appendChild(document.createElement("textarea")),this._textarea.placeholder=this._placeholder||this._lang,this._textarea.spellcheck=!1,this._textarea.name=this._name||"",this._textarea.value=this._codeBlock.textContent,this._preBlock.setAttribute("aria-hidden","true"),this._scrollBlock=this.getAttribute("scroll-block")==="code"?this._codeBlock:this._preBlock,this._textarea.addEventListener("input",e=>{this.source=e.target.value}),this._textarea.addEventListener("input",()=>this._syncScrolling()),this._textarea.addEventListener("scroll",()=>this._syncScrolling()),this._textarea.addEventListener("keydown",e=>this._handleTabKeyEvent(e))}_handleTabKeyEvent(e){if(!this._textarea||e.key!=="Tab")return;e.preventDefault();let t=this._textarea.value,i=this._textarea.selectionStart,n=this._textarea.selectionEnd;if(i===n){let r=t.slice(0,i),s=t.slice(n,t.length),l=n+1;this._textarea.value=r+" "+s,this._textarea.selectionStart=l,this._textarea.selectionEnd=l}else{let r=t.split(`
`),s=0,l=0,u=0;for(let h=0;h<r.length;h++)s+=r[h].length,i<s&&n>s-r[h].length&&(e.shiftKey?r[h][0]===" "&&(r[h]=r[h].slice(1),l===0&&u--,l--):(r[h]=" "+r[h],l===0&&u++,l++));this._textarea.value=r.join(`
`),this._textarea.selectionStart=i+u,this._textarea.selectionEnd=n+l}this.source=this._textarea.value}_syncScrolling(){!this._scrollBlock||(this._scrollBlock.scrollTop=this._textarea.scrollTop,this._scrollBlock.scrollLeft=this._textarea.scrollLeft)}_highlightCodeBlock(){Prism.highlightElement(this._codeBlock)}disconnectedCallback(){Array.from(this.shadowRoot.childNodes).forEach(e=>e.remove())}attributeChangedCallback(e,t,i){if(!!this.childNodes.length)switch(e){case"name":this._name=i,this._textarea.name=i;break;case"placeholder":this._placeholder=i,this._textarea.placeholder=i;break;case"editable":this._editable=i,this._textarea?this._textarea.disabled=i==="false":i==="true"&&this._addEditor(),i==="true"&&this._textarea.focus();break}}get css(){return["https://unpkg.com/@webqit/subscript/src/console/assets/prism.css","https://unpkg.com/@webqit/subscript/src/console/assets/vs-code-dark.css",`
`)}return v}var $=(v,e)=>v instanceof Promise?v.then(e):e(v);var R=v=>class extends v{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach(t=>{if(t.includes("{")&&t.includes(":")&&t.includes(";")){let i=this.shadowRoot.appendChild(document.createElement("style"));i.textContent=t}else{let i=this.shadowRoot.appendChild(document.createElement("link"));i.setAttribute("rel","stylesheet"),i.setAttribute("href",t)}})}get css(){return[]}};var fe=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{},g=function(v){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,i={},n={manual:v.Prism&&v.Prism.manual,disableWorkerMessageHandler:v.Prism&&v.Prism.disableWorkerMessageHandler,util:{encode:function l(c){return c instanceof r?new r(c.type,l(c.content),c.alias):Array.isArray(c)?c.map(l):c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(l){return Object.prototype.toString.call(l).slice(8,-1)},objId:function(l){return l.__id||Object.defineProperty(l,"__id",{value:++t}),l.__id},clone:function l(c,p){var f,d;switch(p=p||{},n.util.type(c)){case"Object":if(d=n.util.objId(c),p[d])return p[d];for(var x in f={},p[d]=f,c)c.hasOwnProperty(x)&&(f[x]=l(c[x],p));return f;case"Array":return d=n.util.objId(c),p[d]?p[d]:(f=[],p[d]=f,c.forEach(function(y,w){f[w]=l(y,p)}),f);default:return c}},getLanguage:function(l){for(;l;){var c=e.exec(l.className);if(c)return c[1].toLowerCase();l=l.parentElement}return"none"},setLanguage:function(l,c){l.className=l.className.replace(RegExp(e,"gi"),""),l.classList.add("language-"+c)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(f){var l=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(f.stack)||[])[1];if(l){var c=document.getElementsByTagName("script");for(var p in c)if(c[p].src==l)return c[p]}return null}},isActive:function(l,c,p){for(var f="no-"+c;l;){var d=l.classList;if(d.contains(c))return!0;if(d.contains(f))return!1;l=l.parentElement}return!!p}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(l,c){var p=n.util.clone(n.languages[l]);for(var f in c)p[f]=c[f];return p},insertBefore:function(l,c,p,f){var d=(f=f||n.languages)[l],x={};for(var y in d)if(d.hasOwnProperty(y)){if(y==c)for(var w in p)p.hasOwnProperty(w)&&(x[w]=p[w]);p.hasOwnProperty(y)||(x[y]=d[y])}var _=f[l];return f[l]=x,n.languages.DFS(n.languages,function(C,T){T===_&&C!=l&&(this[C]=x)}),x},DFS:function l(c,p,f,d){d=d||{};var x=n.util.objId;for(var y in c)if(c.hasOwnProperty(y)){p.call(c,y,c[y],f||y);var w=c[y],_=n.util.type(w);_!=="Object"||d[x(w)]?_!=="Array"||d[x(w)]||(d[x(w)]=!0,l(w,p,y,d)):(d[x(w)]=!0,l(w,p,null,d))}}},plugins:{},highlightAll:function(l,c){n.highlightAllUnder(document,l,c)},highlightAllUnder:function(l,c,p){var f={callback:p,container:l,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",f),f.elements=Array.prototype.slice.apply(f.container.querySelectorAll(f.selector)),n.hooks.run("before-all-elements-highlight",f);for(var d,x=0;d=f.elements[x++];)n.highlightElement(d,c===!0,f.callback)},highlightElement:function(l,c,p){var f=n.util.getLanguage(l),d=n.languages[f];n.util.setLanguage(l,f);var x=l.parentElement;x&&x.nodeName.toLowerCase()==="pre"&&n.util.setLanguage(x,f);var y={element:l,language:f,grammar:d,code:l.textContent};function w(C){y.highlightedCode=C,n.hooks.run("before-insert",y),y.element.innerHTML=y.highlightedCode,n.hooks.run("after-highlight",y),n.hooks.run("complete",y),p&&p.call(y.element)}if(n.hooks.run("before-sanity-check",y),(x=y.element.parentElement)&&x.nodeName.toLowerCase()==="pre"&&!x.hasAttribute("tabindex")&&x.setAttribute("tabindex","0"),!y.code)return n.hooks.run("complete",y),void(p&&p.call(y.element));if(n.hooks.run("before-highlight",y),y.grammar)if(c&&v.Worker){var _=new Worker(n.filename);_.onmessage=function(C){w(C.data)},_.postMessage(JSON.stringify({language:y.language,code:y.code,immediateClose:!0}))}else w(n.highlight(y.code,y.grammar,y.language));else w(n.util.encode(y.code))},highlight:function(l,c,p){var f={code:l,grammar:c,language:p};if(n.hooks.run("before-tokenize",f),!f.grammar)throw new Error('The language "'+f.language+'" has no grammar.');return f.tokens=n.tokenize(f.code,f.grammar),n.hooks.run("after-tokenize",f),r.stringify(n.util.encode(f.tokens),f.language)},tokenize:function(l,c){var p=c.rest;if(p){for(var f in p)c[f]=p[f];delete c.rest}var d=new o;return u(d,d.head,l),function x(y,w,_,C,T,k){for(var F in _)if(_.hasOwnProperty(F)&&_[F]){var A=_[F];A=Array.isArray(A)?A:[A];for(var S=0;S<A.length;++S){if(k&&k.cause==F+","+S)return;var E=A[S],z=E.inside,I=!!E.lookbehind,D=!!E.greedy,ne=E.alias;if(D&&!E.pattern.global){var he=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,he+"g")}for(var oe=E.pattern||E,L=C.next,N=T;L!==w.tail&&!(k&&N>=k.reach);N+=L.value.length,L=L.next){var M=L.value;if(w.length>y.length)return;if(!(M instanceof r)){var P,Z=1;if(D){if(!(P=s(oe,N,y,I))||P.index>=y.length)break;var K=P.index,de=P.index+P[0].length,O=N;for(O+=L.value.length;O<=K;)L=L.next,O+=L.value.length;if(O-=L.value.length,N=O,L.value instanceof r)continue;for(var H=L;H!==w.tail&&(O<de||typeof H.value=="string");H=H.next)Z++,O+=H.value.length;Z--,M=y.slice(N,O),P.index-=N}else if(!(P=s(oe,0,M,I)))continue;var K=P.index,U=P[0],ie=M.slice(0,K),le=M.slice(K+U.length),re=N+M.length;k&&re>k.reach&&(k.reach=re);var G=L.prev;ie&&(G=u(w,G,ie),N+=ie.length),h(w,G,Z);var pe=new r(F,z?n.tokenize(U,z):U,ne,U);if(L=u(w,G,pe),le&&u(w,L,le),1<Z){var se={cause:F+","+S,reach:re};x(y,w,_,L.prev,N,se),k&&se.reach>k.reach&&(k.reach=se.reach)}}}}}}(l,d,c,d.head,0),function(x){for(var y=[],w=x.head.next;w!==x.tail;)y.push(w.value),w=w.next;return y}(d)},hooks:{all:{},add:function(l,c){var p=n.hooks.all;p[l]=p[l]||[],p[l].push(c)},run:function(l,c){var p=n.hooks.all[l];if(p&&p.length)for(var f,d=0;f=p[d++];)f(c)}},Token:r};function r(l,c,p,f){this.type=l,this.content=c,this.alias=p,this.length=0|(f||"").length}function s(l,c,p,f){l.lastIndex=c;var d=l.exec(p);if(d&&f&&d[1]){var x=d[1].length;d.index+=x,d[0]=d[0].slice(x)}return d}function o(){var l={value:null,prev:null,next:null},c={value:null,prev:l,next:null};l.next=c,this.head=l,this.tail=c,this.length=0}function u(l,c,p){var f=c.next,d={value:p,prev:c,next:f};return c.next=d,f.prev=d,l.length++,d}function h(l,c,p){for(var f=c.next,d=0;d<p&&f!==l.tail;d++)f=f.next;(c.next=f).prev=c,l.length-=d}if(v.Prism=n,r.stringify=function l(c,p){if(typeof c=="string")return c;if(Array.isArray(c)){var f="";return c.forEach(function(_){f+=l(_,p)}),f}var d={type:c.type,content:l(c.content,p),tag:"span",classes:["token",c.type],attributes:{},language:p},x=c.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(d.classes,x):d.classes.push(x)),n.hooks.run("wrap",d);var y="";for(var w in d.attributes)y+=" "+w+'="'+(d.attributes[w]||"").replace(/"/g,"&quot;")+'"';return"<"+d.tag+' class="'+d.classes.join(" ")+'"'+y+">"+d.content+"</"+d.tag+">"},!v.document)return v.addEventListener&&(n.disableWorkerMessageHandler||v.addEventListener("message",function(l){var c=JSON.parse(l.data),p=c.language,f=c.code,d=c.immediateClose;v.postMessage(n.highlight(f,n.languages[p],p)),d&&v.close()},!1)),n;var m=n.util.currentScript();function a(){n.manual||n.highlightAll()}if(m&&(n.filename=m.src,m.hasAttribute("data-manual")&&(n.manual=!0)),!n.manual){var b=document.readyState;b==="loading"||b==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",a):window.requestAnimationFrame?window.requestAnimationFrame(a):window.setTimeout(a,16)}return n}(fe);typeof module<"u"&&module.exports&&(module.exports=g),typeof global<"u"&&(global.Prism=g);g.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},g.languages.markup.tag.inside["attr-value"].inside.entity=g.languages.markup.entity,g.languages.markup.doctype.inside["internal-subset"].inside=g.languages.markup,g.hooks.add("wrap",function(v){v.type==="entity"&&(v.attributes.title=v.content.replace(/&amp;/,"&"))}),Object.defineProperty(g.languages.markup.tag,"addInlined",{value:function(v,e){var t={};t["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:g.languages[e]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};i["language-"+e]={pattern:/[\s\S]+/,inside:g.languages[e]};var n={};n[v]={pattern:RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(/__/g,function(){return v}),"i"),lookbehind:!0,greedy:!0,inside:i},g.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(g.languages.markup.tag,"addAttribute",{value:function(v,e){g.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(`(^|["'\\s])(?:`+v+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:g.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),g.languages.html=g.languages.markup,g.languages.mathml=g.languages.markup,g.languages.svg=g.languages.markup,g.languages.xml=g.languages.extend("markup",{}),g.languages.ssml=g.languages.xml,g.languages.atom=g.languages.xml,g.languages.rss=g.languages.xml;(function(v){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;v.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+`|(?:[^\\\\\r
()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},v.languages.css.atrule.inside.rest=v.languages.css;var t=v.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(g);g.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};g.languages.javascript=g.languages.extend("clike",{"class-name":[g.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),g.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,g.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:g.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:g.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:g.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:g.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:g.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),g.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:g.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),g.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),g.languages.markup&&(g.languages.markup.tag.addInlined("script","javascript"),g.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),g.languages.js=g.languages.javascript;(function(){if(typeof g<"u"&&typeof document<"u"&&document.querySelector){var v,e="line-numbers",t="linkable-line-numbers",i=function(){if(v===void 0){var a=document.createElement("div");a.style.fontSize="13px",a.style.lineHeight="1.5",a.style.padding="0",a.style.border="0",a.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(a),v=a.offsetHeight===38,document.body.removeChild(a)}return v},n=!0;g.plugins.lineHighlight={highlightLines:function(a,b,l){var c=(b=typeof b=="string"?b:a.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),p=+a.getAttribute("data-line-offset")||0,f=(i()?parseInt:parseFloat)(getComputedStyle(a).lineHeight),d=g.util.isActive(a,e),x=a.querySelector("code"),y=d?a:x||a,w=[],_=x&&y!=x?function(k,F){var A=getComputedStyle(k),S=getComputedStyle(F);function E(z){return+z.substr(0,z.length-2)}return F.offsetTop+E(S.borderTopWidth)+E(S.paddingTop)-E(A.paddingTop)}(a,x):0;c.forEach(function(k){var F=k.split("-"),A=+F[0],S=+F[1]||A,E=a.querySelector('.line-highlight[data-range="'+k+'"]')||document.createElement("div");if(w.push(function(){E.setAttribute("aria-hidden","true"),E.setAttribute("data-range",k),E.className=(l||"")+" line-highlight"}),d&&g.plugins.lineNumbers){var z=g.plugins.lineNumbers.getLine(a,A),I=g.plugins.lineNumbers.getLine(a,S);if(z){var D=z.offsetTop+_+"px";w.push(function(){E.style.top=D})}if(I){var ne=I.offsetTop-z.offsetTop+I.offsetHeight+"px";w.push(function(){E.style.height=ne})}}else w.push(function(){E.setAttribute("data-start",String(A)),A<S&&E.setAttribute("data-end",String(S)),E.style.top=(A-p-1)*f+_+"px",E.textContent=new Array(S-A+2).join(`
`)});w.push(function(){E.style.width=a.scrollWidth+"px"}),w.push(function(){y.appendChild(E)})});var C=a.id;if(d&&g.util.isActive(a,t)&&C){o(a,t)||w.push(function(){a.classList.add(t)});var T=parseInt(a.getAttribute("data-start")||"1");s(".line-numbers-rows > span",a).forEach(function(k,F){var A=F+T;k.onclick=function(){var S=C+"."+A;n=!1,location.hash=S,setTimeout(function(){n=!0},1)}})}return function(){w.forEach(u)}}};var r=0;g.hooks.add("before-sanity-check",function(a){var b=a.element.parentElement;if(h(b)){var l=0;s(".line-highlight",b).forEach(function(c){l+=c.textContent.length,c.parentNode.removeChild(c)}),l&&/^(?: \n)+$/.test(a.code.slice(-l))&&(a.code=a.code.slice(0,-l))}}),g.hooks.add("complete",function a(b){var l=b.element.parentElement;if(h(l)){clearTimeout(r);var c=g.plugins.lineNumbers,p=b.plugins&&b.plugins.lineNumbers;o(l,e)&&c&&!p?g.hooks.add("line-numbers",a):(g.plugins.lineHighlight.highlightLines(l)(),r=setTimeout(m,1))}}),window.addEventListener("hashchange",m),window.addEventListener("resize",function(){s("pre").filter(h).map(function(a){return g.plugins.lineHighlight.highlightLines(a)}).forEach(u)})}function s(a,b){return Array.prototype.slice.call((b||document).querySelectorAll(a))}function o(a,b){return a.classList.contains(b)}function u(a){a()}function h(a){return!(!a||!/pre/i.test(a.nodeName))&&(!!a.hasAttribute("data-line")||!(!a.id||!g.util.isActive(a,t)))}function m(){var a=location.hash.slice(1);s(".temporary.line-highlight").forEach(function(p){p.parentNode.removeChild(p)});var b=(a.match(/\.([\d,-]+)$/)||[,""])[1];if(b&&!document.getElementById(a)){var l=a.slice(0,a.lastIndexOf(".")),c=document.getElementById(l);c&&(c.hasAttribute("data-line")||c.setAttribute("data-line",""),g.plugins.lineHighlight.highlightLines(c,b,"temporary ")(),n&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}})();(function(){if(typeof g<"u"&&typeof document<"u"){var v="line-numbers",e=/\n(?!$)/g,t=g.plugins.lineNumbers={getLine:function(r,s){if(r.tagName==="PRE"&&r.classList.contains(v)){var o=r.querySelector(".line-numbers-rows");if(o){var u=parseInt(r.getAttribute("data-start"),10)||1,h=u+(o.children.length-1);s<u&&(s=u),h<s&&(s=h);var m=s-u;return o.children[m]}}},resize:function(r){n([r])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,n(Array.prototype.slice.call(document.querySelectorAll("pre."+v))))}),g.hooks.add("complete",function(r){if(r.code){var s=r.element,o=s.parentNode;if(o&&/pre/i.test(o.nodeName)&&!s.querySelector(".line-numbers-rows")&&g.util.isActive(s,v)){s.classList.remove(v),o.classList.add(v);var u,h=r.code.match(e),m=h?h.length+1:1,a=new Array(m+1).join("<span></span>");(u=document.createElement("span")).setAttribute("aria-hidden","true"),u.className="line-numbers-rows",u.innerHTML=a,o.hasAttribute("data-start")&&(o.style.counterReset="linenumber "+(parseInt(o.getAttribute("data-start"),10)-1)),r.element.appendChild(u),n([o]),g.hooks.run("line-numbers",r)}}}),g.hooks.add("line-numbers",function(r){r.plugins=r.plugins||{},r.plugins.lineNumbers=!0})}function n(r){if((r=r.filter(function(o){var u=function(h){return h?window.getComputedStyle?getComputedStyle(h):h.currentStyle||null:null}(o)["white-space"];return u==="pre-wrap"||u==="pre-line"})).length!=0){var s=r.map(function(o){var u=o.querySelector("code"),h=o.querySelector(".line-numbers-rows");if(u&&h){var m=o.querySelector(".line-numbers-sizer"),a=u.textContent.split(e);m||((m=document.createElement("span")).className="line-numbers-sizer",u.appendChild(m)),m.innerHTML="0",m.style.display="block";var b=m.getBoundingClientRect().height;return m.innerHTML="",{element:o,lines:a,lineHeights:[],oneLinerHeight:b,sizer:m}}}).filter(Boolean);s.forEach(function(o){var u=o.sizer,h=o.lines,m=o.lineHeights,a=o.oneLinerHeight;m[h.length-1]=void 0,h.forEach(function(b,l){if(b&&1<b.length){var c=u.appendChild(document.createElement("span"));c.style.display="block",c.textContent=b}else m[l]=a})}),s.forEach(function(o){for(var u=o.sizer,h=o.lineHeights,m=0,a=0;a<h.length;a++)h[a]===void 0&&(h[a]=u.children[m++].getBoundingClientRect().height)}),s.forEach(function(o){var u=o.sizer,h=o.element.querySelector(".line-numbers-rows");u.style.display="none",u.innerHTML="",o.lineHeights.forEach(function(m,a){h.children[a].style.height=m+"px"})})}}})();(function(){if(typeof g<"u"&&typeof document<"u"){var v=[],e={},t=function(){};g.plugins.toolbar={};var i=g.plugins.toolbar.registerButton=function(r,s){var o;o=typeof s=="function"?s:function(u){var h;return typeof s.onClick=="function"?((h=document.createElement("button")).type="button",h.addEventListener("click",function(){s.onClick.call(this,u)})):typeof s.url=="string"?(h=document.createElement("a")).href=s.url:h=document.createElement("span"),s.className&&h.classList.add(s.className),h.textContent=s.text,h},r in e?console.warn('There is a button with the key "'+r+'" registered already.'):v.push(e[r]=o)},n=g.plugins.toolbar.hook=function(r){var s=r.element.parentNode;if(s&&/pre/i.test(s.nodeName)&&!s.parentNode.classList.contains("code-toolbar")){var o=document.createElement("div");o.classList.add("code-toolbar"),s.parentNode.insertBefore(o,s),o.appendChild(s);var u=document.createElement("div");u.classList.add("toolbar");var h=v,m=function(a){for(;a;){var b=a.getAttribute("data-toolbar-order");if(b!=null)return(b=b.trim()).length?b.split(/\s*,\s*/g):[];a=a.parentElement}}(r.element);m&&(h=m.map(function(a){return e[a]||t})),h.forEach(function(a){var b=a(r);if(b){var l=document.createElement("div");l.classList.add("toolbar-item"),l.appendChild(b),u.appendChild(l)}}),o.appendChild(u)}};i("label",function(r){var s=r.element.parentNode;if(s&&/pre/i.test(s.nodeName)&&s.hasAttribute("data-label")){var o,u,h=s.getAttribute("data-label");try{u=document.querySelector("template#"+h)}catch{}return u?o=u.content:(s.hasAttribute("data-url")?(o=document.createElement("a")).href=s.getAttribute("data-url"):o=document.createElement("span"),o.textContent=h),o}}),g.hooks.add("complete",n)}})();(function(){function v(t,i){t.addEventListener("click",function(){(function(n){navigator.clipboard?navigator.clipboard.writeText(n.getText()).then(n.success,function(){e(n)}):e(n)})(i)})}function e(t){var i=document.createElement("textarea");i.value=t.getText(),i.style.top="0",i.style.left="0",i.style.position="fixed",document.body.appendChild(i),i.focus(),i.select();try{var n=document.execCommand("copy");setTimeout(function(){n?t.success():t.error()},1)}catch(r){setTimeout(function(){t.error(r)},1)}document.body.removeChild(i)}typeof g<"u"&&typeof document<"u"&&(g.plugins.toolbar?g.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var i=t.element,n=function(h){var m={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var a in m){for(var b="data-prismjs-"+a,l=h;l&&!l.hasAttribute(b);)l=l.parentElement;l&&(m[a]=l.getAttribute(b))}return m}(i),r=document.createElement("button");r.className="copy-to-clipboard-button",r.setAttribute("type","button");var s=document.createElement("span");return r.appendChild(s),u("copy"),v(r,{getText:function(){return i.textContent},success:function(){u("copy-success"),o()},error:function(){u("copy-error"),setTimeout(function(){(function(h){window.getSelection().selectAllChildren(h)})(i)},1),o()}}),r;function o(){setTimeout(function(){u("copy")},n["copy-timeout"])}function u(h){s.textContent=n[h],r.setAttribute("data-copy-state",h)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))})();(function(){if(typeof g<"u"&&typeof document<"u"){var v={"(":")","[":"]","{":"}"},e={"(":"brace-round","[":"brace-square","{":"brace-curly"},t={"${":"{"},i=0,n=/^(pair-\d+-)(close|open)$/;g.hooks.add("complete",function(m){var a=m.element,b=a.parentElement;if(b&&b.tagName=="PRE"){var l=[];if(g.util.isActive(a,"match-braces")&&l.push("(","[","{"),l.length!=0){b.__listenerAdded||(b.addEventListener("mousedown",function(){var d=b.querySelector("code"),x=r("brace-selected");Array.prototype.slice.call(d.querySelectorAll("."+x)).forEach(function(y){y.classList.remove(x)})}),Object.defineProperty(b,"__listenerAdded",{value:!0}));var c=Array.prototype.slice.call(a.querySelectorAll("span."+r("token")+"."+r("punctuation"))),p=[];l.forEach(function(d){for(var x=v[d],y=r(e[d]),w=[],_=[],C=0;C<c.length;C++){var T=c[C];if(T.childElementCount==0){var k=T.textContent;(k=t[k]||k)===d?(p.push({index:C,open:!0,element:T}),T.classList.add(y),T.classList.add(r("brace-open")),_.push(C)):k===x&&(p.push({index:C,open:!1,element:T}),T.classList.add(y),T.classList.add(r("brace-close")),_.length&&w.push([C,_.pop()]))}}w.forEach(function(F){var A="pair-"+i+++"-",S=c[F[0]],E=c[F[1]];S.id=A+"open",E.id=A+"close",[S,E].forEach(function(z){z.addEventListener("mouseenter",o),z.addEventListener("mouseleave",u),z.addEventListener("click",h)})})});var f=0;p.sort(function(d,x){return d.index-x.index}),p.forEach(function(d){d.open?(d.element.classList.add(r("brace-level-"+(f%12+1))),f++):(f=Math.max(0,f-1),d.element.classList.add(r("brace-level-"+(f%12+1))))})}}})}function r(m){var a=g.plugins.customClass;return a?a.apply(m,"none"):m}function s(m){var a=n.exec(m.id);return document.querySelector("#"+a[1]+(a[2]=="open"?"close":"open"))}function o(){g.util.isActive(this,"brace-hover",!0)&&[this,s(this)].forEach(function(m){m.classList.add(r("brace-hover"))})}function u(){[this,s(this)].forEach(function(m){m.classList.remove(r("brace-hover"))})}function h(){g.util.isActive(this,"brace-select",!0)&&[this,s(this)].forEach(function(m){m.classList.add(r("brace-selected"))})}})();var ae=v=>class extends R(v||HTMLElement){static get observedAttributes(){return["name","editable","placeholder"]}connectedCallback(){let e=t=>t.replace(new RegExp("&","g"),"&amp;").replace(new RegExp("<","g"),"&lt;");this._lang="javascript",this._editable=this.getAttribute("editable"),this._styledBlock=this.getAttribute("styled-block")||"pre",this._div=document.createElement("div"),this._preBlock=this._div.appendChild(document.createElement("pre")),this._codeBlock=this._preBlock.appendChild(document.createElement("code")),this._div.classList.add("line-numbers"),this._div.classList.add("container"),this._lang&&(this._preBlock.classList.add("language-"+this._lang),this._codeBlock.classList.add("language-"+this._lang)),this._contentSlot=document.createElement("slot"),this._contentSlot.setAttribute("aria-hidden","true"),this._contentSlot.setAttribute("hidden","true"),this._initialSlotEvent=!1,this._contentSlot.addEventListener("slotchange",()=>{let t=this._contentSlot.assignedNodes().reduce((i,n)=>i+(n.outerHTML||n.nodeValue||""),"");this._initialSlotEvent||(t=J(t),this._initialSlotEvent=!0),this._textarea&&(this._textarea.value=t),this.source=e(t)}),this._editable==="true"&&this._addEditor(),this.shadowRoot.append(this._contentSlot,this._textarea||"",this._div),super.connectedCallback()}get source(){return this._codeBlock.textContent}set source(e){e.endsWith(`
`)&&(e+=" "),this._codeBlock.innerHTML="",this._codeBlock.innerHTML=e,this._highlightCodeBlock(),this._syncScrolling()}get name(){return this._name}set name(e){return this.setAttribute("name",e)}get placeholder(){return this._placeholder}set placeholder(e){return this.setAttribute("placeholder",e)}get editable(){return this._editable}set editable(e){return this.setAttribute("editable",e===!0?"true":e===!1?"false":e)}_addEditor(){this._placeholder=this.getAttribute("placeholder"),this._name=this.getAttribute("name"),this._textarea=this._div.appendChild(document.createElement("textarea")),this._textarea.placeholder=this._placeholder||this._lang,this._textarea.spellcheck=!1,this._textarea.name=this._name||"",this._textarea.value=this._codeBlock.textContent,this._preBlock.setAttribute("aria-hidden","true"),this._scrollBlock=this.getAttribute("scroll-block")==="code"?this._codeBlock:this._preBlock,this._textarea.addEventListener("input",e=>{this.source=e.target.value}),this._textarea.addEventListener("input",()=>this._syncScrolling()),this._textarea.addEventListener("scroll",()=>this._syncScrolling()),this._textarea.addEventListener("keydown",e=>this._handleTabKeyEvent(e))}_handleTabKeyEvent(e){if(!this._textarea||e.key!=="Tab")return;e.preventDefault();let t=this._textarea.value,i=this._textarea.selectionStart,n=this._textarea.selectionEnd;if(i===n){let r=t.slice(0,i),s=t.slice(n,t.length),o=n+1;this._textarea.value=r+" "+s,this._textarea.selectionStart=o,this._textarea.selectionEnd=o}else{let r=t.split(`
`),s=0,o=0,u=0;for(let h=0;h<r.length;h++)s+=r[h].length,i<s&&n>s-r[h].length&&(e.shiftKey?r[h][0]===" "&&(r[h]=r[h].slice(1),o===0&&u--,o--):(r[h]=" "+r[h],o===0&&u++,o++));this._textarea.value=r.join(`
`),this._textarea.selectionStart=i+u,this._textarea.selectionEnd=n+o}this.source=this._textarea.value}_syncScrolling(){!this._scrollBlock||(this._scrollBlock.scrollTop=this._textarea.scrollTop,this._scrollBlock.scrollLeft=this._textarea.scrollLeft)}_highlightCodeBlock(){Prism.highlightElement(this._codeBlock)}disconnectedCallback(){Array.from(this.shadowRoot.childNodes).forEach(e=>e.remove())}attributeChangedCallback(e,t,i){if(!!this.childNodes.length)switch(e){case"name":this._name=i,this._textarea.name=i;break;case"placeholder":this._placeholder=i,this._textarea.placeholder=i;break;case"editable":this._editable=i,this._textarea?this._textarea.disabled=i==="false":i==="true"&&this._addEditor(),i==="true"&&this._textarea.focus();break}}get css(){return["https://unpkg.com/@webqit/subscript/src/console/assets/prism.css","https://unpkg.com/@webqit/subscript/src/console/assets/vs-code-dark.css",`
* {

@@ -116,3 +116,3 @@ -webkit-box-sizing: border-box;

`]}};var X=v=>class extends(v||class{}){setStateCallback(e,t,i,n=100,r){this._timeouts||(this._timeouts={}),e in this._timeouts||(this._timeouts[e]=[]),i?(this._timeouts[e].length||r(),n?this._timeouts[e].unshift(setTimeout(()=>this.setState(e,t,!1),n)):this._timeouts[e].unshift(null),this._related&&this._related.setState(e,t,!0,n)):(this._timeouts[e].shift(),this._timeouts[e].length||(r(),this._related&&this._related.setState(e,t,!1)))}};var W=class extends X(){bind(e){Object.assign(this,e),this.fullPaths=[],this.$fullPaths=[],this.ownerReference.assignee&&this.ownerReference.assignee.refs.forEach(t=>{!t.depth||this.fullPaths.push([...this.path,...t.depth])}),this.fullPaths.length||(this.fullPaths=[this.path]),this.fullPaths.forEach((t,i)=>{this.$fullPaths.push(t.map(n=>"memoId"in n?"[[computed]]":n.name).join(".")),t.forEach(n=>{n.anchor.classList.add("ref-identifier"),n.anchor.classList.add(this.subscriptions?"effect":"signal");let r=n.anchor.getAttribute("title"),s="> "+this.$fullPaths[i]+(this.subscriptions?" (Effect Ref)":" (Signal Ref)");n.anchor.setAttribute("title",r?r+`
`+s:s)}),this._on(i,"mouseenter",()=>{this._setState(i,"path","hover",!0,0)})._on(i,"mouseleave",()=>{this._setState(i,"path","hover",!1)}),this.subscriptions&&this._on(i,"click",()=>{this.ownerReference.ownerContract.runThread(t)})})}_setState(e,t,i,n,r=100){this.setStateCallback(e+"|"+t,i,n,r,()=>{n?this.fullPaths[e].forEach(s=>s.anchor.classList.add(`${t}-${i}`)):this.fullPaths[e].forEach(s=>s.anchor.classList.remove(`${t}-${i}`))})}setState(e,t,i,n=100){let[r,s]=e.split("|");if(s!==void 0)return this._setState(r,s,t,i,n);this.fullPaths.forEach((l,u)=>{this._setState(u,e,t,i,n)})}_on(e,t,i){return this.fullPaths[e].forEach(n=>n.anchor.addEventListener(t,i.bind(this))),this}on(e,t){this.fullPaths.forEach((i,n)=>{this._on(n,e,t)})}};var B=class extends X(HTMLElement){visualize(e){if(Object.assign(this,e),!this.graph)return;this.subContracts&&this.subContracts.forEach(i=>{i.replaceWith(...i.childNodes)}),this.subContracts=new Map,this._textNodes=this.getTextNodes();for(let i in this.graph.subContracts){let n=this.graph.subContracts[i],r=this.createSubContract({ownerContract:this,graph:n});this.subContracts.set(n.id,r)}if(this.effects=new Map,this.signals=new Map,this.refAnchors)for(let i in this.refAnchors){let n=this.refAnchors[i];n.replaceWith(...n.childNodes)}this.refAnchors={},this._textNodes=this.getTextNodes();let t=i=>{for(let n in this.graph[i]){let r=this.createReference({ownerContract:this,...this.graph[i][n]});this[i].set(n,r)}};t("effects"),t("signals"),this.setAttribute("title",this.graph.type+" Contract"),this.on("mouseenter",()=>{this.setState("block","hover",!0,0)}).on("mouseleave",()=>{this.setState("block","hover",!1)}),this.observe((i,n)=>{this.setState("block","runtime-active",!0,100),n.forEach(r=>{let s=this.signals.get(r.referenceId+"");!s||s.refs.get(r.id).setState("path","runtime-active",!0,100)})})}get program(){return this.ownerContract?this.ownerContract.program:this.runtime}runThread(...e){let t=this.program.locate(this.graph.lineage);if(!!t)return t.thread(...e)}observe(e){return this.program.observe(this.graph.lineage,e)}createSubContract(e){let t=document.createElement("cfunctions-contract");return this.insertNode(t,e.graph.loc,"contract"),t.visualize(e),t}createReference(e){let t={...e,refs:new Map};"assignee"in e&&(t.assignee=this.effects.get(e.assignee+""));for(let i of e.refs){let n=this.createRef({ownerReference:t,...i});t.refs.set(i.id,n)}return t}createRef(e){let t=new W,i=n=>{let[r,s]=n.loc,l=r+"-"+s,u=this.refAnchors[l];return u||(u=document.createElement("span"),this.insertNode(u,[r,s],"ref"),this.refAnchors[l]=u),u};return e={...e,path:e.path.map(n=>({anchor:i(n),...n}))},e.depth&&(e.depth=e.depth.map(n=>({anchor:i(n),...n}))),t.bind(e),t}insertNode(e,t,i){let[n,r]=t,s=this.graph.loc?this.graph.loc[0]:0,[l,u]=this.resolveOffset(n-s),[h,m]=this.resolveOffset(r-s,!1),a=new Range;return i==="contract"?(u===0&&l.parentNode.nodeName==="SPAN"?a.setStartBefore(l.parentNode):a.setStart(l,u),m===(h.nodeValue||"").length&&h.parentNode.nodeName==="SPAN"?a.setEndAfter(h.parentNode):a.setEnd(h,m)):(a.setStart(l,u),a.setEnd(h,m)),a.surroundContents(e),e}resolveOffset(e,t=!0){return this._textNodes.reduce(([i,n,r],s)=>{if(n===null){let l=r+s.length;if(e<=l&&!s.isBlank){let u=e-r;if(!t&&u===0)return[i.node,i.length];if(!t||u<s.length)return[s.node,u]}[i,n,r]=[s,n,l]}return[i,n,r]},[null,null,0])}getTextNodes(e=this){let t={acceptNode:function(s){if(s.parentNode.nodeName!=="SCRIPT")return window.NodeFilter.FILTER_ACCEPT}},i=window.document.createTreeWalker(e||this,window.NodeFilter.SHOW_TEXT,t,!1),n=[],r;for(;r=i.nextNode();){let s=r.nodeValue||"";n.push({node:r,length:s.length,isBlank:s.trim().length===0})}return n}setState(e,t,i,n=100){i&&this.ownerContract&&this.ownerContract.setState(e,t,!1),this.setStateCallback(e,t,i,n,()=>{i?this.classList.add(`${e}-${t}`):this.classList.remove(`${e}-${t}`)})}on(e,t){return this.addEventListener(e,t.bind(this)),this}};var Y=class extends ae(B){Visualize(e,t=!0){t&&(this.innerHTML=e.originalSource),setTimeout(()=>{if(!this._codeBlock.textContent.length)return;let i=e.runtime;super.Visualize({runtime:i,graph:i.graph})},0)}createRef(e){}getTextNodes(e=null){return super.getTextNodes(e||this._codeBlock)}get css(){return super.css.concat([`
`+s:s)}),this._on(i,"mouseenter",()=>{this._setState(i,"path","hover",!0,0)})._on(i,"mouseleave",()=>{this._setState(i,"path","hover",!1)}),this.subscriptions&&this._on(i,"click",()=>{this.ownerReference.ownerContract.runThread(t)})})}_setState(e,t,i,n,r=100){this.setStateCallback(e+"|"+t,i,n,r,()=>{n?this.fullPaths[e].forEach(s=>s.anchor.classList.add(`${t}-${i}`)):this.fullPaths[e].forEach(s=>s.anchor.classList.remove(`${t}-${i}`))})}setState(e,t,i,n=100){let[r,s]=e.split("|");if(s!==void 0)return this._setState(r,s,t,i,n);this.fullPaths.forEach((o,u)=>{this._setState(u,e,t,i,n)})}_on(e,t,i){return this.fullPaths[e].forEach(n=>n.anchor.addEventListener(t,i.bind(this))),this}on(e,t){this.fullPaths.forEach((i,n)=>{this._on(n,e,t)})}};var B=class extends X(HTMLElement){visualize(e){if(Object.assign(this,e),!this.graph)return;this.subContracts&&this.subContracts.forEach(i=>{i.replaceWith(...i.childNodes)}),this.subContracts=new Map,this._textNodes=this.getTextNodes();for(let i in this.graph.subContracts){let n=this.graph.subContracts[i],r=this.createSubContract({ownerContract:this,graph:n});this.subContracts.set(n.id,r)}if(this.effects=new Map,this.signals=new Map,this.refAnchors)for(let i in this.refAnchors){let n=this.refAnchors[i];n.replaceWith(...n.childNodes)}this.refAnchors={},this._textNodes=this.getTextNodes();let t=i=>{for(let n in this.graph[i]){let r=this.createReference({ownerContract:this,...this.graph[i][n]});this[i].set(n,r)}};t("effects"),t("signals"),this.setAttribute("title",this.graph.type+" Contract"),this.on("mouseenter",()=>{this.setState("block","hover",!0,0)}).on("mouseleave",()=>{this.setState("block","hover",!1)}),this.observe((i,n)=>{this.setState("block","runtime-active",!0,100),n.forEach(r=>{let s=this.signals.get(r.referenceId+"");!s||s.refs.get(r.id).setState("path","runtime-active",!0,100)})})}get program(){return this.ownerContract?this.ownerContract.program:this.runtime}runThread(...e){let t=this.program.locate(this.graph.lineage);if(!!t)return t.thread(...e)}observe(e){return this.program.observe(this.graph.lineage,e)}createSubContract(e){let t=document.createElement("cfunctions-contract");return this.insertNode(t,e.graph.loc,"contract"),t.visualize(e),t}createReference(e){let t={...e,refs:new Map};"assignee"in e&&(t.assignee=this.effects.get(e.assignee+""));for(let i of e.refs){let n=this.createRef({ownerReference:t,...i});t.refs.set(i.id,n)}return t}createRef(e){let t=new W,i=n=>{let[r,s]=n.loc,o=r+"-"+s,u=this.refAnchors[o];return u||(u=document.createElement("span"),this.insertNode(u,[r,s],"ref"),this.refAnchors[o]=u),u};return e={...e,path:e.path.map(n=>({anchor:i(n),...n}))},e.depth&&(e.depth=e.depth.map(n=>({anchor:i(n),...n}))),t.bind(e),t}insertNode(e,t,i){let[n,r]=t,s=this.graph.loc?this.graph.loc[0]:0,[o,u]=this.resolveOffset(n-s),[h,m]=this.resolveOffset(r-s,!1),a=new Range;return i==="contract"?(u===0&&o.parentNode.nodeName==="SPAN"?a.setStartBefore(o.parentNode):a.setStart(o,u),m===(h.nodeValue||"").length&&h.parentNode.nodeName==="SPAN"?a.setEndAfter(h.parentNode):a.setEnd(h,m)):(a.setStart(o,u),a.setEnd(h,m)),a.surroundContents(e),e}resolveOffset(e,t=!0){return this._textNodes.reduce(([i,n,r],s)=>{if(n===null){let o=r+s.length;if(e<=o&&!s.isBlank){let u=e-r;if(!t&&u===0)return[i.node,i.length];if(!t||u<s.length)return[s.node,u]}[i,n,r]=[s,n,o]}return[i,n,r]},[null,null,0])}getTextNodes(e=this){let t={acceptNode:function(s){if(s.parentNode.nodeName!=="SCRIPT")return window.NodeFilter.FILTER_ACCEPT}},i=window.document.createTreeWalker(e||this,window.NodeFilter.SHOW_TEXT,t,!1),n=[],r;for(;r=i.nextNode();){let s=r.nodeValue||"";n.push({node:r,length:s.length,isBlank:s.trim().length===0})}return n}setState(e,t,i,n=100){i&&this.ownerContract&&this.ownerContract.setState(e,t,!1),this.setStateCallback(e,t,i,n,()=>{i?this.classList.add(`${e}-${t}`):this.classList.remove(`${e}-${t}`)})}on(e,t){return this.addEventListener(e,t.bind(this)),this}};var Y=class extends ae(B){Visualize(e,t=!0){t&&(this.innerHTML=e.originalSource),setTimeout(()=>{if(!this._codeBlock.textContent.length)return;let i=e.runtime;super.Visualize({runtime:i,graph:i.graph})},0)}createRef(e){}getTextNodes(e=null){return super.getTextNodes(e||this._codeBlock)}get css(){return super.css.concat([`
.ref-identifier.path-runtime-active {

@@ -190,6 +190,6 @@ text-decoration: underline;

}
`]}};customElements.define("cfunctions-inspector",Q);function ue(v={}){let{runtimeParams:e={},compilerParams:{globalsNoObserve:t=[],globalsOnlyPathsExcept:i=[],...n}={},parserParams:r={}}=v,s={runtimeParams:{...be,...e},compilerParams:{...oe,globalsNoObserve:[...oe.globalsNoObserve,...t],globalsOnlyPathsExcept:[...oe.globalsOnlyPathsExcept,...i],...n},parserParams:{...me,...r}};return v.devMode,s}var me={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},oe={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},be={apiVersion:1};var he=new Map;function q(v,e,t=void 0){let i=he.get(v);if(arguments.length>2){i||(i=new Map,he.set(v,i)),i.set(e,t);return}return i&&i.get(e)}var j=class{constructor(e,t,i,n={},r=null,s=null){this.ownerContract=e,this.graph=t,this.callee=i,this.params=e?n:{...n,isSubscriptFunction:!0},this.exits=s||new Map,this.$thread=r||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(l,u,h=null,m=null){if(!this.graph.subContracts[l])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${l}.`);let a=this.graph.subContracts[l],b={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&u,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&u,isSubscriptFunction:arguments.length===4&&h,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(b.isIterationContract){let f=h,d=new j(this,a,f,b,this.$thread,this.exits),x=this.subContracts.get(l);return x||(x=new Map,this.subContracts.set(l,x)),x.has(b.iterationId)&&x.get(b.iterationId).dispose(),x.set(b.iterationId,d),d.call()}let o,c,p;if(this.subContracts.has(l)&&this.subContracts.get(l).dispose(),b.isFunctionContract){o=m;let f=()=>new j(this,a,o,b);if(b.functionType!=="FunctionDeclaration")p=this.createFunction(f);else{let d=f();b.apiVersion>1?(p=function(...x){let y=d.call(this,...x);return y=$(y,w=>[y,d.thread.bind(d),d]),d=f(),y},p.target=d):p=d}}else o=u,c=new j(this,a,o,b,this.$thread,this.exits),this.subContracts.set(l,c),p=c.call();return p}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(l,u){if(!arguments.length)return this.exits.size;let h=this.exits.get(l)===u;return h&&this.exits.clear(),h}.bind(this),this.contract.exit=function(l,u){this.exits.set(l,u)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(l,u)=>{this.contract.functions.set(l,u),this.applyReflection(l,typeof u=="function"?u.target:u)}}fire(e,t,i){if(!this.ownerContract)return;let n=this.ownerContract.fire(e,t,i);return this.observers.forEach(r=>{r.contractUrl===e&&r.callback(t,i)}),n}observe(e,t){!this.params.isFunctionContract||this.observers.push({contractUrl:e,callback:t})}call(e,...t){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=t,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let i=this.callee.call(e,this.contract,...t);if(this.graph.$sideEffects)for(let n in this.graph.effects)for(let r of this.graph.effects[n].refs)this.buildThread([],r,[],0,!0);return $(i,()=>{if(!this.ownerContract||this.params.isFunctionContract){let n=this.exits.get("return");if(this.exits.clear(),n!==void 0)return n}return i})}iterate(e=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,t]]=this.subContracts,i;if(!e.length||e.includes("length")&&this.graph.type==="ForOfStatement")for(let[,n]of t)i=$(i,()=>n.call());else for(let n of e){let r=t.get(n)||t.get(parseInt(n));!r||(i=$(i,()=>r.call()))}return i}thread(...e){if(this.disposed)return!1;this.$thread.active=!0;for(let t in this.graph.effects)for(let i of this.graph.effects[t].refs)for(let n of e){let[r,s,l]=this.matchRefs(n,i);!r||this.buildThread(n,i,l,s)}return this.runThread()}runThread(){let e=(r,s)=>{if(["ForOfStatement","ForInStatement"].includes(r.graph.type)&&s.every(l=>l.executionPlan.isIterationContractTarget)){let l=s.map(u=>u.executionPlan.iterationTarget);return this.fire(r.graph.lineage,"iterating",s),r.iterate(l)}return this.fire(r.graph.lineage,"executing",s),r.call()},t,i,n;for(;(i=this.$thread.sequence.shift())&&(n=[...this.$thread.entries.get(i)])&&this.$thread.entries.delete(i);)t=$(t,()=>{if(i.disposed||!i.filterRefs(n).length)return;this.$thread.current=i;let r=e(i,n);return $(r,()=>{for(let s of n)[].concat(s.executionPlan.assigneeRef||s.executionPlan.assigneeRefs||[]).forEach(l=>{i.buildThread([],l,[],0)})}),r});return $(t,()=>{let r=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,r})}buildThread(e,t,i,n=0,r=!1){let s=n>0;if(this.ownerContract){if(!this.compute(i)||t.condition!==void 0&&!this.assert(t.condition))return}else s||(s=i.length||t.condition!==void 0);let l=r?t.$subscriptions:t.subscriptions;Object.keys(l).forEach(u=>{let[h,m]=u.split(":"),a=o=>{!o||o.selectRefs(m,l[u],s?e:null)},b=this.locate(h);Array.isArray(b)?b.forEach(a):a(b)})}selectRefs(e,t,i=null){let n=this.$thread,r=this.graph.signals[e],s=(u,h)=>u.graph.lineage.localeCompare(h.graph.lineage,void 0,{numeric:!0}),l=(u,h=[],m={})=>{if(!n.active||n.current&&s(this,n.current)<0)return;let a=n.entries.get(this);if(a||(a=new Set,n.entries.set(this,a),n.sequence.push(this),n.sequence.sort(s)),a.add({...u,computes:h,executionPlan:m}),!m.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){m.assigneeRefs=[];for(let b in this.graph.effects)m.assigneeRefs.push(...this.graph.effects[b].refs)}};for(let u of t){let h=r.refs[u];if(!i){l(h);continue}let[m,a,b]=this.matchRefs(i,h);if(!m)continue;if(a<=0){l(h,b);continue}let o=i.slice(-a),c="assignee"in r?this.graph.effects[r.assignee]:null;if(c){c.refs.forEach(p=>{if(p.depth.length){let[f,d,x]=this.matchRefs(o,p.depth),y=b.concat(x);if(f&&d>0){let w=p.path.concat(o.slice(-d));this.buildThread(w,p,y,d)}else f&&l(h,y,{assigneeRef:p})}else{let f=p.path.concat(o);this.buildThread(f,p,b,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){l(h,b,{isIterationContractTarget:!0,iterationTarget:o[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){l(h,b,{isIterationContractTarget:!0,iterationTarget:o[0]});continue}}}filterRefs(e){return e.filter(t=>{if(!!this.compute(t.computes)&&!(t.condition!==void 0&&!this.assert(t.condition)))return!0})}matchRefs(e,t){let i,n,r,s;Array.isArray(e)?(i=e,n=e.dotSafe?e.join("."):void 0):(i=e.path,n=e.$path),Array.isArray(t)?(r=t,s=t.dotSafe?t.join("."):void 0):(r=t.path,s=t.$path);let l=i.length-r.length;if(l>0&&([i,r,n,s]=[r,i,s,n]),n&&s)return[`${s}.`.startsWith(`${n}.`),l,[]];let u=[],h=a=>typeof a=="object"?a.name:a,m=(a,b)=>{if(!a||!b)return!1;let o=typeof a=="object"&&"memoId"in a,c=typeof b=="object"&&"memoId"in b;return o||c?(u.push(p=>(o?p[a.memoId]:h(a))===(c?p[b.memoId]:h(b))),!0):h(a)===h(b)};return[i.reduce((a,b,o)=>a&&m(b,r[o]),!0),l,u]}locate(e){let t=this.graph.lineage+"/",i=e+"/";if(i===t)return this;if(i.startsWith(t)){let n=e.slice(t.length).split("/"),r=this.subContracts.get(parseInt(n.shift()));if(n.length){if(r instanceof Map)return Array.from(r).reduce((s,[l,u])=>s.concat(u.locate(e)),[]);if(r)return r.locate(e)}return r}if(this.ownerContract)return this.ownerContract.locate(e)}compute(e){return!e.some(t=>t(this.contract.memo)===!1)}assert(e){if(typeof e=="string"&&e.includes(":")){let[n,r]=e.split(":");return this.locate(n).assert(r)}let t=this.graph.conditions[e],i=this.contract.memo;return typeof t.parent<"u"&&!this.assert(t.parent)?!1:typeof t.switch<"u"?t.cases.some(n=>i[n]===i[t.switch]):typeof t.whenNot<"u"?!i[t.whenNot]:typeof t.when<"u"?i[t.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((e,t)=>{e instanceof Map?(e.forEach(i=>i.dispose()),e.clear()):e.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(e,t=void 0){let i=e(),n=function(s,...l){let u=s.call(this===void 0?t:this,...l);return s.params.isSubscriptFunction&&s.params.apiVersion>1&&(u=$(u,h=>[h,s.thread.bind(s),s]),i=e(i)),u},r=i instanceof Promise||i.callee instanceof async function(){}.constructor?async function(){return $(i,s=>n.call(this,s,...arguments))}:function(){return n.call(this,i,...arguments)};return $(i,s=>{this.applyReflection(r,s)}),q(r,"properties",$(i,s=>{let l={type:s.params.functionType||"Program",apiVersion:s.params.apiVersion||1,isSubscriptFunction:s.params.isSubscriptFunction,sideEffects:s.graph.sideEffects||!1};if(s.params.isSubscriptFunction){l.dependencies=[];for(let[u,h]of Object.entries(s.graph.effects))l.dependencies.push(...h.refs.map(m=>m.path.map(a=>"name"in a?a.name:1/0)))}return l})),r}applyReflection(e,t){Object.defineProperty(t.callee,"length",{configurable:!0,value:t.callee.length-1});let i=t.callee.toString();Object.defineProperty(t.callee,"toString",{configurable:!0,value:(r=!1)=>!r&&t.graph.originalSource?t.graph.originalSource:i});let n={name:t.callee.name,length:t.callee.length,toString:t.callee.toString};t.params.isSubscriptFunction&&(t.params.apiVersion>1||(n={...n,thread:t.thread.bind(t),dispose:t.dispose.bind(t),runtime:t})),Object.keys(n).forEach(r=>{Object.defineProperty(e,r,{configurable:!0,value:n[r]})})}};var V=class extends j{static create(e,t=[],i={}){let r=i.async||e.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,s=i.compileFunction?i.compileFunction(e.source,[e.identifier+""].concat(t)):new r(e.identifier+"",...t,e.source);return new this(null,e.graph,s,i)}static createFunction(e,t,i=[],n={},r,s=null){n={...n,functionType:"Constructor"},t instanceof Promise&&(n={...n,async:!0});let l=m=>m?new this(null,m.graph,m.callee,n):$(t,a=>u(this.create(a,i,n))),u=m=>{if(m.graph.originalSource&&!m.graph.originalSourceModified){let a=`${n.async||m.graph.hoistedAwaitKeyword?"async ":""}function ${e||"anonymous"}`,b=m.graph.originalSource.split(/\n/g).map(o=>` ${o}`).join(`
`]}};customElements.define("cfunctions-inspector",Q);function ce(...v){let e={runtimeParams:be,compilerParams:me,parserParams:ge},t;for(;t=v.shift();){let{runtimeParams:i={},compilerParams:{globalsNoObserve:n=[],globalsOnlyPathsExcept:r=[],...s}={},parserParams:o={}}=t;e={runtimeParams:{...e.runtimeParams,...i},compilerParams:{...e.compilerParams,globalsNoObserve:[...e.compilerParams.globalsNoObserve,...n],globalsOnlyPathsExcept:[...e.compilerParams.globalsOnlyPathsExcept,...r],...s},parserParams:{...e.parserParams,...o}},v.devMode}return e}var ge={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},me={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},be={apiVersion:1};var ue=new Map;function q(v,e,t=void 0){let i=ue.get(v);if(arguments.length>2){i||(i=new Map,ue.set(v,i)),i.set(e,t);return}return i&&i.get(e)}var j=class{constructor(e,t,i,n={},r=null,s=null){this.ownerContract=e,this.graph=t,this.callee=i,this.params=e?n:{...n,isSubscriptFunction:!0},this.exits=s||new Map,this.$thread=r||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(o,u,h=null,m=null){if(!this.graph.subContracts[o])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${o}.`);let a=this.graph.subContracts[o],b={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&u,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&u,isSubscriptFunction:arguments.length===4&&h,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(b.isIterationContract){let f=h,d=new j(this,a,f,b,this.$thread,this.exits),x=this.subContracts.get(o);return x||(x=new Map,this.subContracts.set(o,x)),x.has(b.iterationId)&&x.get(b.iterationId).dispose(),x.set(b.iterationId,d),d.call()}let l,c,p;if(this.subContracts.has(o)&&this.subContracts.get(o).dispose(),b.isFunctionContract){l=m;let f=()=>new j(this,a,l,b);if(b.functionType!=="FunctionDeclaration")p=this.createFunction(f);else{let d=f();b.apiVersion>1?(p=function(...x){let y=d.call(this,...x);return y=$(y,w=>[y,d.thread.bind(d),d]),d=f(),y},p.target=d):p=d}}else l=u,c=new j(this,a,l,b,this.$thread,this.exits),this.subContracts.set(o,c),p=c.call();return p}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(o,u){if(!arguments.length)return this.exits.size;let h=this.exits.get(o)===u;return h&&this.exits.clear(),h}.bind(this),this.contract.exit=function(o,u){this.exits.set(o,u)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(o,u)=>{this.contract.functions.set(o,u),this.applyReflection(o,typeof u=="function"?u.target:u)}}fire(e,t,i){if(!this.ownerContract)return;let n=this.ownerContract.fire(e,t,i);return this.observers.forEach(r=>{r.contractUrl===e&&r.callback(t,i)}),n}observe(e,t){!this.params.isFunctionContract||this.observers.push({contractUrl:e,callback:t})}call(e,...t){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=t,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let i=this.callee.call(e,this.contract,...t);if(this.graph.$sideEffects)for(let n in this.graph.effects)for(let r of this.graph.effects[n].refs)this.buildThread([],r,[],0,!0);return $(i,()=>{if(!this.ownerContract||this.params.isFunctionContract){let n=this.exits.get("return");if(this.exits.clear(),n!==void 0)return n}return i})}iterate(e=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,t]]=this.subContracts,i;if(!e.length||e.includes("length")&&this.graph.type==="ForOfStatement")for(let[,n]of t)i=$(i,()=>n.call());else for(let n of e){let r=t.get(n)||t.get(parseInt(n));!r||(i=$(i,()=>r.call()))}return i}thread(...e){if(this.disposed)return!1;this.$thread.active=!0;for(let t in this.graph.effects)for(let i of this.graph.effects[t].refs)for(let n of e){let[r,s,o]=this.matchRefs(n,i);!r||this.buildThread(n,i,o,s)}return this.runThread()}runThread(){let e=(r,s)=>{if(["ForOfStatement","ForInStatement"].includes(r.graph.type)&&s.every(o=>o.executionPlan.isIterationContractTarget)){let o=s.map(u=>u.executionPlan.iterationTarget);return this.fire(r.graph.lineage,"iterating",s),r.iterate(o)}return this.fire(r.graph.lineage,"executing",s),r.call()},t,i,n;for(;(i=this.$thread.sequence.shift())&&(n=[...this.$thread.entries.get(i)])&&this.$thread.entries.delete(i);)t=$(t,()=>{if(i.disposed||!i.filterRefs(n).length)return;this.$thread.current=i;let r=e(i,n);return $(r,()=>{for(let s of n)[].concat(s.executionPlan.assigneeRef||s.executionPlan.assigneeRefs||[]).forEach(o=>{i.buildThread([],o,[],0)})}),r});return $(t,()=>{let r=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,r})}buildThread(e,t,i,n=0,r=!1){let s=n>0;if(this.ownerContract){if(!this.compute(i)||t.condition!==void 0&&!this.assert(t.condition))return}else s||(s=i.length||t.condition!==void 0);let o=r?t.$subscriptions:t.subscriptions;Object.keys(o).forEach(u=>{let[h,m]=u.split(":"),a=l=>{!l||l.selectRefs(m,o[u],s?e:null)},b=this.locate(h);Array.isArray(b)?b.forEach(a):a(b)})}selectRefs(e,t,i=null){let n=this.$thread,r=this.graph.signals[e],s=(u,h)=>u.graph.lineage.localeCompare(h.graph.lineage,void 0,{numeric:!0}),o=(u,h=[],m={})=>{if(!n.active||n.current&&s(this,n.current)<0)return;let a=n.entries.get(this);if(a||(a=new Set,n.entries.set(this,a),n.sequence.push(this),n.sequence.sort(s)),a.add({...u,computes:h,executionPlan:m}),!m.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){m.assigneeRefs=[];for(let b in this.graph.effects)m.assigneeRefs.push(...this.graph.effects[b].refs)}};for(let u of t){let h=r.refs[u];if(!i){o(h);continue}let[m,a,b]=this.matchRefs(i,h);if(!m)continue;if(a<=0){o(h,b);continue}let l=i.slice(-a),c="assignee"in r?this.graph.effects[r.assignee]:null;if(c){c.refs.forEach(p=>{if(p.depth.length){let[f,d,x]=this.matchRefs(l,p.depth),y=b.concat(x);if(f&&d>0){let w=p.path.concat(l.slice(-d));this.buildThread(w,p,y,d)}else f&&o(h,y,{assigneeRef:p})}else{let f=p.path.concat(l);this.buildThread(f,p,b,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){o(h,b,{isIterationContractTarget:!0,iterationTarget:l[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){o(h,b,{isIterationContractTarget:!0,iterationTarget:l[0]});continue}}}filterRefs(e){return e.filter(t=>{if(!!this.compute(t.computes)&&!(t.condition!==void 0&&!this.assert(t.condition)))return!0})}matchRefs(e,t){let i,n,r,s;Array.isArray(e)?(i=e,n=e.dotSafe?e.join("."):void 0):(i=e.path,n=e.$path),Array.isArray(t)?(r=t,s=t.dotSafe?t.join("."):void 0):(r=t.path,s=t.$path);let o=i.length-r.length;if(o>0&&([i,r,n,s]=[r,i,s,n]),n&&s)return[`${s}.`.startsWith(`${n}.`),o,[]];let u=[],h=a=>typeof a=="object"?a.name:a,m=(a,b)=>{if(!a||!b)return!1;let l=typeof a=="object"&&"memoId"in a,c=typeof b=="object"&&"memoId"in b;return l||c?(u.push(p=>(l?p[a.memoId]:h(a))===(c?p[b.memoId]:h(b))),!0):h(a)===h(b)};return[i.reduce((a,b,l)=>a&&m(b,r[l]),!0),o,u]}locate(e){let t=this.graph.lineage+"/",i=e+"/";if(i===t)return this;if(i.startsWith(t)){let n=e.slice(t.length).split("/"),r=this.subContracts.get(parseInt(n.shift()));if(n.length){if(r instanceof Map)return Array.from(r).reduce((s,[o,u])=>s.concat(u.locate(e)),[]);if(r)return r.locate(e)}return r}if(this.ownerContract)return this.ownerContract.locate(e)}compute(e){return!e.some(t=>t(this.contract.memo)===!1)}assert(e){if(typeof e=="string"&&e.includes(":")){let[n,r]=e.split(":");return this.locate(n).assert(r)}let t=this.graph.conditions[e],i=this.contract.memo;return typeof t.parent<"u"&&!this.assert(t.parent)?!1:typeof t.switch<"u"?t.cases.some(n=>i[n]===i[t.switch]):typeof t.whenNot<"u"?!i[t.whenNot]:typeof t.when<"u"?i[t.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((e,t)=>{e instanceof Map?(e.forEach(i=>i.dispose()),e.clear()):e.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(e,t=void 0){let i=e(),n=function(s,...o){let u=s.call(this===void 0?t:this,...o);return s.params.isSubscriptFunction&&s.params.apiVersion>1&&(u=$(u,h=>[h,s.thread.bind(s),s]),i=e(i)),u},r=i instanceof Promise||i.callee instanceof async function(){}.constructor?async function(){return $(i,s=>n.call(this,s,...arguments))}:function(){return n.call(this,i,...arguments)};return $(i,s=>{this.applyReflection(r,s)}),q(r,"properties",$(i,s=>{let o={type:s.params.functionType||"Program",apiVersion:s.params.apiVersion||1,isSubscriptFunction:s.params.isSubscriptFunction,sideEffects:s.graph.sideEffects||!1};if(s.params.isSubscriptFunction){o.dependencies=[];for(let[u,h]of Object.entries(s.graph.effects))o.dependencies.push(...h.refs.map(m=>m.path.map(a=>"name"in a?a.name:1/0)))}return o})),r}applyReflection(e,t){Object.defineProperty(t.callee,"length",{configurable:!0,value:t.callee.length-1});let i=t.callee.toString();Object.defineProperty(t.callee,"toString",{configurable:!0,value:(r=!1)=>!r&&t.graph.originalSource?t.graph.originalSource:i});let n={name:t.callee.name,length:t.callee.length,toString:t.callee.toString};t.params.isSubscriptFunction&&(t.params.apiVersion>1||(n={...n,thread:t.thread.bind(t),dispose:t.dispose.bind(t),runtime:t})),Object.keys(n).forEach(r=>{Object.defineProperty(e,r,{configurable:!0,value:n[r]})})}};var V=class extends j{static create(e,t=[],i={}){let r=i.async||e.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,s=i.compileFunction?i.compileFunction(e.source,[e.identifier+""].concat(t)):new r(e.identifier+"",...t,e.source);return new this(null,e.graph,s,i)}static createFunction(e,t,i=[],n={},r,s=null){n={...n,functionType:"Constructor"},t instanceof Promise&&(n={...n,async:!0});let o=m=>m?new this(null,m.graph,m.callee,n):$(t,a=>u(this.create(a,i,n))),u=m=>{if(m.graph.originalSource&&!m.graph.originalSourceModified){let a=`${n.async||m.graph.hoistedAwaitKeyword?"async ":""}function ${e||"anonymous"}`,b=m.graph.originalSource.split(/\n/g).map(l=>` ${l}`).join(`
`);m.graph.originalSource=`${a}(${i.join(", ")}) {
${b}
}`,m.graph.originalSourceModified=!0}return e&&Object.defineProperty(m.callee,"name",{configurable:!0,value:e}),m},h=this.prototype.createFunction(l,r);return q(h,"locations",$(t,m=>({locations:m.locations}))),h}};function ee(...v){if(typeof window!="object")throw new Error("No window in context.");let e=ue(typeof v[v.length-1]=="object"?v.pop():{}),t=J(v.pop()||""),i=v,n=r=>V.createFunction(void 0,r,i,e.runtimeParams,this,t);if(window.wq?.SubscriptCompiler&&!e.runtimeParams.async){let{parse:r,compile:s}=window.wq.SubscriptCompiler,l=r(t,e.parserParams);return n(s(l,e.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let l=`
}`,m.graph.originalSourceModified=!0}return e&&Object.defineProperty(m.callee,"name",{configurable:!0,value:e}),m},h=this.prototype.createFunction(o,r);return q(h,"locations",$(t,m=>({locations:m.locations}))),h}};function ee(...v){if(typeof window!="object")throw new Error("No window in context.");let e=ce(typeof v[v.length-1]=="object"?v.pop():{}),t=J(v.pop()||""),i=v,n=r=>V.createFunction(void 0,r,i,e.runtimeParams,this,t);if(window.wq?.SubscriptCompiler&&!e.runtimeParams.async){let{parse:r,compile:s}=window.wq.SubscriptCompiler,o=r(t,e.parserParams);return n(s(o,e.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let o=`
importScripts( '${document.querySelector('meta[name="subscript-compiler-url"]')?.content||"https://unpkg.com/@webqit/subscript/dist/compiler.js"}' );

@@ -203,3 +203,3 @@ const { parse, compile } = self.wq.SubscriptCompiler;

e.ports[ 0 ]?.postMessage( compilation );
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(l)}`)}return n(new Promise(r=>{let s=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:t,params:e},[s.port2]),s.port1.onmessage=l=>r(l.data)}))}Object.defineProperty(ee,"inspect",{value:q});var te=class extends R(HTMLElement){connectedCallback(){this.autoMode=this.getAttribute("auto-mode"),this.visualizerElement=document.createElement("cfunctions-visualizer"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.buttons={},["edit","play"].forEach(e=>{let t=e.substring(0,1).toUpperCase()+e.substring(1);this.buttons[e]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[e].classList.add(e),this.buttons[e].setAttribute("title",t);let i=this.buttons[e].appendChild(document.createElement("i"));(this.getAttribute(`data-${e}-icon`)||`bi bi-${e==="edit"?"pencil":e}`).split(" ").map(s=>s.trim()).forEach(s=>i.classList.add(s)),this.buttons[e].appendChild(document.createElement("span")).append(" ",t),this.buttons[e].addEventListener("click",s=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[e],this.active.classList.add("active")})}),this.buttons.edit.addEventListener("click",e=>this.switchEditable(!0)),this.buttons.play.addEventListener("click",e=>this.switchEditable(!1)),this.shadowRoot.append(this.controlsElement,this.visualizerElement),super.connectedCallback(),setTimeout(()=>{this.visualizerElement.innerHTML=this.innerHTML,setTimeout(()=>{this.loadConsole(),this.autoMode&&this.buttons[this.autoMode].dispatchEvent(new MouseEvent("click"))},0)},0)}loadConsole(){this.fn=ee(this.visualizerElement.source,{devMode:!0}),this.visualizerElement.visualize(this.fn,!1)}switchEditable(e){this.visualizerElement.editable=e,e?this.fn&&(this.fn.dispose(),this.fn=null):(this.fn||this.loadConsole(),this.fn())}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",`
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(o)}`)}return n(new Promise(r=>{let s=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:t,params:e},[s.port2]),s.port1.onmessage=o=>r(o.data)}))}Object.defineProperty(ee,"inspect",{value:q});var te=class extends R(HTMLElement){connectedCallback(){this.autoMode=this.getAttribute("auto-mode"),this.visualizerElement=document.createElement("cfunctions-visualizer"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.buttons={},["edit","play"].forEach(e=>{let t=e.substring(0,1).toUpperCase()+e.substring(1);this.buttons[e]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[e].classList.add(e),this.buttons[e].setAttribute("title",t);let i=this.buttons[e].appendChild(document.createElement("i"));(this.getAttribute(`data-${e}-icon`)||`bi bi-${e==="edit"?"pencil":e}`).split(" ").map(s=>s.trim()).forEach(s=>i.classList.add(s)),this.buttons[e].appendChild(document.createElement("span")).append(" ",t),this.buttons[e].addEventListener("click",s=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[e],this.active.classList.add("active")})}),this.buttons.edit.addEventListener("click",e=>this.switchEditable(!0)),this.buttons.play.addEventListener("click",e=>this.switchEditable(!1)),this.shadowRoot.append(this.controlsElement,this.visualizerElement),super.connectedCallback(),setTimeout(()=>{this.visualizerElement.innerHTML=this.innerHTML,setTimeout(()=>{this.loadConsole(),this.autoMode&&this.buttons[this.autoMode].dispatchEvent(new MouseEvent("click"))},0)},0)}loadConsole(){this.fn=ee(this.visualizerElement.source,{devMode:!0}),this.visualizerElement.visualize(this.fn,!1)}switchEditable(e){this.visualizerElement.editable=e,e?this.fn&&(this.fn.dispose(),this.fn=null):(this.fn||this.loadConsole(),this.fn())}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",`
* {

@@ -206,0 +206,0 @@ -webkit-box-sizing: border-box;

@@ -1,6 +0,6 @@

(()=>{function O(f={}){let{runtimeParams:r={},compilerParams:{globalsNoObserve:e=[],globalsOnlyPathsExcept:t=[],...i}={},parserParams:n={}}=f,s={runtimeParams:{...A,...r},compilerParams:{...v,globalsNoObserve:[...v.globalsNoObserve,...e],globalsOnlyPathsExcept:[...v.globalsOnlyPathsExcept,...t],...i},parserParams:{...E,...n}};return f.devMode,s}var E={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},v={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},A={apiVersion:1};function j(f,r=!1){let e=f.split(/\n/g);if(e.length>1){for(;!e[0].trim().length;)e.shift();let t=e[r?1:0].split(/[^\s]/)[0].length;if(t)return e.map((i,n)=>{let s=i.substring(0,t);return s.trim().length?s.trim()==="}"&&n===e.length-1?"}":i:i.substring(t)}).join(`
`)}return f}var g=(f,r)=>f instanceof Promise?f.then(r):r(f);var I=new Map;function x(f,r,e=void 0){let t=I.get(f);if(arguments.length>2){t||(t=new Map,I.set(f,t)),t.set(r,e);return}return t&&t.get(r)}var S=class{constructor(r,e,t,i={},n=null,s=null){this.ownerContract=r,this.graph=e,this.callee=t,this.params=r?i:{...i,isSubscriptFunction:!0},this.exits=s||new Map,this.$thread=n||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(o,c,u=null,h=null){if(!this.graph.subContracts[o])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${o}.`);let a=this.graph.subContracts[o],l={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&c,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&c,isSubscriptFunction:arguments.length===4&&u,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(l.isIterationContract){let b=u,m=new S(this,a,b,l,this.$thread,this.exits),w=this.subContracts.get(o);return w||(w=new Map,this.subContracts.set(o,w)),w.has(l.iterationId)&&w.get(l.iterationId).dispose(),w.set(l.iterationId,m),m.call()}let p,y,d;if(this.subContracts.has(o)&&this.subContracts.get(o).dispose(),l.isFunctionContract){p=h;let b=()=>new S(this,a,p,l);if(l.functionType!=="FunctionDeclaration")d=this.createFunction(b);else{let m=b();l.apiVersion>1?(d=function(...w){let C=m.call(this,...w);return C=g(C,P=>[C,m.thread.bind(m),m]),m=b(),C},d.target=m):d=m}}else p=c,y=new S(this,a,p,l,this.$thread,this.exits),this.subContracts.set(o,y),d=y.call();return d}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(o,c){if(!arguments.length)return this.exits.size;let u=this.exits.get(o)===c;return u&&this.exits.clear(),u}.bind(this),this.contract.exit=function(o,c){this.exits.set(o,c)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(o,c)=>{this.contract.functions.set(o,c),this.applyReflection(o,typeof c=="function"?c.target:c)}}fire(r,e,t){if(!this.ownerContract)return;let i=this.ownerContract.fire(r,e,t);return this.observers.forEach(n=>{n.contractUrl===r&&n.callback(e,t)}),i}observe(r,e){!this.params.isFunctionContract||this.observers.push({contractUrl:r,callback:e})}call(r,...e){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=e,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let t=this.callee.call(r,this.contract,...e);if(this.graph.$sideEffects)for(let i in this.graph.effects)for(let n of this.graph.effects[i].refs)this.buildThread([],n,[],0,!0);return g(t,()=>{if(!this.ownerContract||this.params.isFunctionContract){let i=this.exits.get("return");if(this.exits.clear(),i!==void 0)return i}return t})}iterate(r=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,e]]=this.subContracts,t;if(!r.length||r.includes("length")&&this.graph.type==="ForOfStatement")for(let[,i]of e)t=g(t,()=>i.call());else for(let i of r){let n=e.get(i)||e.get(parseInt(i));!n||(t=g(t,()=>n.call()))}return t}thread(...r){if(this.disposed)return!1;this.$thread.active=!0;for(let e in this.graph.effects)for(let t of this.graph.effects[e].refs)for(let i of r){let[n,s,o]=this.matchRefs(i,t);!n||this.buildThread(i,t,o,s)}return this.runThread()}runThread(){let r=(n,s)=>{if(["ForOfStatement","ForInStatement"].includes(n.graph.type)&&s.every(o=>o.executionPlan.isIterationContractTarget)){let o=s.map(c=>c.executionPlan.iterationTarget);return this.fire(n.graph.lineage,"iterating",s),n.iterate(o)}return this.fire(n.graph.lineage,"executing",s),n.call()},e,t,i;for(;(t=this.$thread.sequence.shift())&&(i=[...this.$thread.entries.get(t)])&&this.$thread.entries.delete(t);)e=g(e,()=>{if(t.disposed||!t.filterRefs(i).length)return;this.$thread.current=t;let n=r(t,i);return g(n,()=>{for(let s of i)[].concat(s.executionPlan.assigneeRef||s.executionPlan.assigneeRefs||[]).forEach(o=>{t.buildThread([],o,[],0)})}),n});return g(e,()=>{let n=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,n})}buildThread(r,e,t,i=0,n=!1){let s=i>0;if(this.ownerContract){if(!this.compute(t)||e.condition!==void 0&&!this.assert(e.condition))return}else s||(s=t.length||e.condition!==void 0);let o=n?e.$subscriptions:e.subscriptions;Object.keys(o).forEach(c=>{let[u,h]=c.split(":"),a=p=>{!p||p.selectRefs(h,o[c],s?r:null)},l=this.locate(u);Array.isArray(l)?l.forEach(a):a(l)})}selectRefs(r,e,t=null){let i=this.$thread,n=this.graph.signals[r],s=(c,u)=>c.graph.lineage.localeCompare(u.graph.lineage,void 0,{numeric:!0}),o=(c,u=[],h={})=>{if(!i.active||i.current&&s(this,i.current)<0)return;let a=i.entries.get(this);if(a||(a=new Set,i.entries.set(this,a),i.sequence.push(this),i.sequence.sort(s)),a.add({...c,computes:u,executionPlan:h}),!h.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){h.assigneeRefs=[];for(let l in this.graph.effects)h.assigneeRefs.push(...this.graph.effects[l].refs)}};for(let c of e){let u=n.refs[c];if(!t){o(u);continue}let[h,a,l]=this.matchRefs(t,u);if(!h)continue;if(a<=0){o(u,l);continue}let p=t.slice(-a),y="assignee"in n?this.graph.effects[n.assignee]:null;if(y){y.refs.forEach(d=>{if(d.depth.length){let[b,m,w]=this.matchRefs(p,d.depth),C=l.concat(w);if(b&&m>0){let P=d.path.concat(p.slice(-m));this.buildThread(P,d,C,m)}else b&&o(u,C,{assigneeRef:d})}else{let b=d.path.concat(p);this.buildThread(b,d,l,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){o(u,l,{isIterationContractTarget:!0,iterationTarget:p[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){o(u,l,{isIterationContractTarget:!0,iterationTarget:p[0]});continue}}}filterRefs(r){return r.filter(e=>{if(!!this.compute(e.computes)&&!(e.condition!==void 0&&!this.assert(e.condition)))return!0})}matchRefs(r,e){let t,i,n,s;Array.isArray(r)?(t=r,i=r.dotSafe?r.join("."):void 0):(t=r.path,i=r.$path),Array.isArray(e)?(n=e,s=e.dotSafe?e.join("."):void 0):(n=e.path,s=e.$path);let o=t.length-n.length;if(o>0&&([t,n,i,s]=[n,t,s,i]),i&&s)return[`${s}.`.startsWith(`${i}.`),o,[]];let c=[],u=a=>typeof a=="object"?a.name:a,h=(a,l)=>{if(!a||!l)return!1;let p=typeof a=="object"&&"memoId"in a,y=typeof l=="object"&&"memoId"in l;return p||y?(c.push(d=>(p?d[a.memoId]:u(a))===(y?d[l.memoId]:u(l))),!0):u(a)===u(l)};return[t.reduce((a,l,p)=>a&&h(l,n[p]),!0),o,c]}locate(r){let e=this.graph.lineage+"/",t=r+"/";if(t===e)return this;if(t.startsWith(e)){let i=r.slice(e.length).split("/"),n=this.subContracts.get(parseInt(i.shift()));if(i.length){if(n instanceof Map)return Array.from(n).reduce((s,[o,c])=>s.concat(c.locate(r)),[]);if(n)return n.locate(r)}return n}if(this.ownerContract)return this.ownerContract.locate(r)}compute(r){return!r.some(e=>e(this.contract.memo)===!1)}assert(r){if(typeof r=="string"&&r.includes(":")){let[i,n]=r.split(":");return this.locate(i).assert(n)}let e=this.graph.conditions[r],t=this.contract.memo;return typeof e.parent<"u"&&!this.assert(e.parent)?!1:typeof e.switch<"u"?e.cases.some(i=>t[i]===t[e.switch]):typeof e.whenNot<"u"?!t[e.whenNot]:typeof e.when<"u"?t[e.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((r,e)=>{r instanceof Map?(r.forEach(t=>t.dispose()),r.clear()):r.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(r,e=void 0){let t=r(),i=function(s,...o){let c=s.call(this===void 0?e:this,...o);return s.params.isSubscriptFunction&&s.params.apiVersion>1&&(c=g(c,u=>[u,s.thread.bind(s),s]),t=r(t)),c},n=t instanceof Promise||t.callee instanceof async function(){}.constructor?async function(){return g(t,s=>i.call(this,s,...arguments))}:function(){return i.call(this,t,...arguments)};return g(t,s=>{this.applyReflection(n,s)}),x(n,"properties",g(t,s=>{let o={type:s.params.functionType||"Program",apiVersion:s.params.apiVersion||1,isSubscriptFunction:s.params.isSubscriptFunction,sideEffects:s.graph.sideEffects||!1};if(s.params.isSubscriptFunction){o.dependencies=[];for(let[c,u]of Object.entries(s.graph.effects))o.dependencies.push(...u.refs.map(h=>h.path.map(a=>"name"in a?a.name:1/0)))}return o})),n}applyReflection(r,e){Object.defineProperty(e.callee,"length",{configurable:!0,value:e.callee.length-1});let t=e.callee.toString();Object.defineProperty(e.callee,"toString",{configurable:!0,value:(n=!1)=>!n&&e.graph.originalSource?e.graph.originalSource:t});let i={name:e.callee.name,length:e.callee.length,toString:e.callee.toString};e.params.isSubscriptFunction&&(e.params.apiVersion>1||(i={...i,thread:e.thread.bind(e),dispose:e.dispose.bind(e),runtime:e})),Object.keys(i).forEach(n=>{Object.defineProperty(r,n,{configurable:!0,value:i[n]})})}};var F=class extends S{static create(r,e=[],t={}){let n=t.async||r.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,s=t.compileFunction?t.compileFunction(r.source,[r.identifier+""].concat(e)):new n(r.identifier+"",...e,r.source);return new this(null,r.graph,s,t)}static createFunction(r,e,t=[],i={},n,s=null){i={...i,functionType:"Constructor"},e instanceof Promise&&(i={...i,async:!0});let o=h=>h?new this(null,h.graph,h.callee,i):g(e,a=>c(this.create(a,t,i))),c=h=>{if(h.graph.originalSource&&!h.graph.originalSourceModified){let a=`${i.async||h.graph.hoistedAwaitKeyword?"async ":""}function ${r||"anonymous"}`,l=h.graph.originalSource.split(/\n/g).map(p=>` ${p}`).join(`
`);h.graph.originalSource=`${a}(${t.join(", ")}) {
${l}
}`,h.graph.originalSourceModified=!0}return r&&Object.defineProperty(h.callee,"name",{configurable:!0,value:r}),h},u=this.prototype.createFunction(o,n);return x(u,"locations",g(e,h=>({locations:h.locations}))),u}};function $(...f){if(typeof window!="object")throw new Error("No window in context.");let r=O(typeof f[f.length-1]=="object"?f.pop():{}),e=j(f.pop()||""),t=f,i=n=>F.createFunction(void 0,n,t,r.runtimeParams,this,e);if(window.wq?.SubscriptCompiler&&!r.runtimeParams.async){let{parse:n,compile:s}=window.wq.SubscriptCompiler,o=n(e,r.parserParams);return i(s(o,r.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let o=`
(()=>{function v(...f){let t={runtimeParams:A,compilerParams:I,parserParams:E},e;for(;e=f.shift();){let{runtimeParams:r={},compilerParams:{globalsNoObserve:i=[],globalsOnlyPathsExcept:n=[],...s}={},parserParams:o={}}=e;t={runtimeParams:{...t.runtimeParams,...r},compilerParams:{...t.compilerParams,globalsNoObserve:[...t.compilerParams.globalsNoObserve,...i],globalsOnlyPathsExcept:[...t.compilerParams.globalsOnlyPathsExcept,...n],...s},parserParams:{...t.parserParams,...o}},f.devMode}return t}var E={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},I={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},A={apiVersion:1};function O(f,t=!1){let e=f.split(/\n/g);if(e.length>1){for(;!e[0].trim().length;)e.shift();let r=e[t?1:0].split(/[^\s]/)[0].length;if(r)return e.map((i,n)=>{let s=i.substring(0,r);return s.trim().length?s.trim()==="}"&&n===e.length-1?"}":i:i.substring(r)}).join(`
`)}return f}var g=(f,t)=>f instanceof Promise?f.then(t):t(f);var j=new Map;function x(f,t,e=void 0){let r=j.get(f);if(arguments.length>2){r||(r=new Map,j.set(f,r)),r.set(t,e);return}return r&&r.get(t)}var S=class{constructor(t,e,r,i={},n=null,s=null){this.ownerContract=t,this.graph=e,this.callee=r,this.params=t?i:{...i,isSubscriptFunction:!0},this.exits=s||new Map,this.$thread=n||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(o,l,u=null,h=null){if(!this.graph.subContracts[o])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${o}.`);let a=this.graph.subContracts[o],c={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&l,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&l,isSubscriptFunction:arguments.length===4&&u,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(c.isIterationContract){let b=u,m=new S(this,a,b,c,this.$thread,this.exits),w=this.subContracts.get(o);return w||(w=new Map,this.subContracts.set(o,w)),w.has(c.iterationId)&&w.get(c.iterationId).dispose(),w.set(c.iterationId,m),m.call()}let p,y,d;if(this.subContracts.has(o)&&this.subContracts.get(o).dispose(),c.isFunctionContract){p=h;let b=()=>new S(this,a,p,c);if(c.functionType!=="FunctionDeclaration")d=this.createFunction(b);else{let m=b();c.apiVersion>1?(d=function(...w){let C=m.call(this,...w);return C=g(C,$=>[C,m.thread.bind(m),m]),m=b(),C},d.target=m):d=m}}else p=l,y=new S(this,a,p,c,this.$thread,this.exits),this.subContracts.set(o,y),d=y.call();return d}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(o,l){if(!arguments.length)return this.exits.size;let u=this.exits.get(o)===l;return u&&this.exits.clear(),u}.bind(this),this.contract.exit=function(o,l){this.exits.set(o,l)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(o,l)=>{this.contract.functions.set(o,l),this.applyReflection(o,typeof l=="function"?l.target:l)}}fire(t,e,r){if(!this.ownerContract)return;let i=this.ownerContract.fire(t,e,r);return this.observers.forEach(n=>{n.contractUrl===t&&n.callback(e,r)}),i}observe(t,e){!this.params.isFunctionContract||this.observers.push({contractUrl:t,callback:e})}call(t,...e){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=e,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let r=this.callee.call(t,this.contract,...e);if(this.graph.$sideEffects)for(let i in this.graph.effects)for(let n of this.graph.effects[i].refs)this.buildThread([],n,[],0,!0);return g(r,()=>{if(!this.ownerContract||this.params.isFunctionContract){let i=this.exits.get("return");if(this.exits.clear(),i!==void 0)return i}return r})}iterate(t=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,e]]=this.subContracts,r;if(!t.length||t.includes("length")&&this.graph.type==="ForOfStatement")for(let[,i]of e)r=g(r,()=>i.call());else for(let i of t){let n=e.get(i)||e.get(parseInt(i));!n||(r=g(r,()=>n.call()))}return r}thread(...t){if(this.disposed)return!1;this.$thread.active=!0;for(let e in this.graph.effects)for(let r of this.graph.effects[e].refs)for(let i of t){let[n,s,o]=this.matchRefs(i,r);!n||this.buildThread(i,r,o,s)}return this.runThread()}runThread(){let t=(n,s)=>{if(["ForOfStatement","ForInStatement"].includes(n.graph.type)&&s.every(o=>o.executionPlan.isIterationContractTarget)){let o=s.map(l=>l.executionPlan.iterationTarget);return this.fire(n.graph.lineage,"iterating",s),n.iterate(o)}return this.fire(n.graph.lineage,"executing",s),n.call()},e,r,i;for(;(r=this.$thread.sequence.shift())&&(i=[...this.$thread.entries.get(r)])&&this.$thread.entries.delete(r);)e=g(e,()=>{if(r.disposed||!r.filterRefs(i).length)return;this.$thread.current=r;let n=t(r,i);return g(n,()=>{for(let s of i)[].concat(s.executionPlan.assigneeRef||s.executionPlan.assigneeRefs||[]).forEach(o=>{r.buildThread([],o,[],0)})}),n});return g(e,()=>{let n=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,n})}buildThread(t,e,r,i=0,n=!1){let s=i>0;if(this.ownerContract){if(!this.compute(r)||e.condition!==void 0&&!this.assert(e.condition))return}else s||(s=r.length||e.condition!==void 0);let o=n?e.$subscriptions:e.subscriptions;Object.keys(o).forEach(l=>{let[u,h]=l.split(":"),a=p=>{!p||p.selectRefs(h,o[l],s?t:null)},c=this.locate(u);Array.isArray(c)?c.forEach(a):a(c)})}selectRefs(t,e,r=null){let i=this.$thread,n=this.graph.signals[t],s=(l,u)=>l.graph.lineage.localeCompare(u.graph.lineage,void 0,{numeric:!0}),o=(l,u=[],h={})=>{if(!i.active||i.current&&s(this,i.current)<0)return;let a=i.entries.get(this);if(a||(a=new Set,i.entries.set(this,a),i.sequence.push(this),i.sequence.sort(s)),a.add({...l,computes:u,executionPlan:h}),!h.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){h.assigneeRefs=[];for(let c in this.graph.effects)h.assigneeRefs.push(...this.graph.effects[c].refs)}};for(let l of e){let u=n.refs[l];if(!r){o(u);continue}let[h,a,c]=this.matchRefs(r,u);if(!h)continue;if(a<=0){o(u,c);continue}let p=r.slice(-a),y="assignee"in n?this.graph.effects[n.assignee]:null;if(y){y.refs.forEach(d=>{if(d.depth.length){let[b,m,w]=this.matchRefs(p,d.depth),C=c.concat(w);if(b&&m>0){let $=d.path.concat(p.slice(-m));this.buildThread($,d,C,m)}else b&&o(u,C,{assigneeRef:d})}else{let b=d.path.concat(p);this.buildThread(b,d,c,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:p[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:p[0]});continue}}}filterRefs(t){return t.filter(e=>{if(!!this.compute(e.computes)&&!(e.condition!==void 0&&!this.assert(e.condition)))return!0})}matchRefs(t,e){let r,i,n,s;Array.isArray(t)?(r=t,i=t.dotSafe?t.join("."):void 0):(r=t.path,i=t.$path),Array.isArray(e)?(n=e,s=e.dotSafe?e.join("."):void 0):(n=e.path,s=e.$path);let o=r.length-n.length;if(o>0&&([r,n,i,s]=[n,r,s,i]),i&&s)return[`${s}.`.startsWith(`${i}.`),o,[]];let l=[],u=a=>typeof a=="object"?a.name:a,h=(a,c)=>{if(!a||!c)return!1;let p=typeof a=="object"&&"memoId"in a,y=typeof c=="object"&&"memoId"in c;return p||y?(l.push(d=>(p?d[a.memoId]:u(a))===(y?d[c.memoId]:u(c))),!0):u(a)===u(c)};return[r.reduce((a,c,p)=>a&&h(c,n[p]),!0),o,l]}locate(t){let e=this.graph.lineage+"/",r=t+"/";if(r===e)return this;if(r.startsWith(e)){let i=t.slice(e.length).split("/"),n=this.subContracts.get(parseInt(i.shift()));if(i.length){if(n instanceof Map)return Array.from(n).reduce((s,[o,l])=>s.concat(l.locate(t)),[]);if(n)return n.locate(t)}return n}if(this.ownerContract)return this.ownerContract.locate(t)}compute(t){return!t.some(e=>e(this.contract.memo)===!1)}assert(t){if(typeof t=="string"&&t.includes(":")){let[i,n]=t.split(":");return this.locate(i).assert(n)}let e=this.graph.conditions[t],r=this.contract.memo;return typeof e.parent<"u"&&!this.assert(e.parent)?!1:typeof e.switch<"u"?e.cases.some(i=>r[i]===r[e.switch]):typeof e.whenNot<"u"?!r[e.whenNot]:typeof e.when<"u"?r[e.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((t,e)=>{t instanceof Map?(t.forEach(r=>r.dispose()),t.clear()):t.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(t,e=void 0){let r=t(),i=function(s,...o){let l=s.call(this===void 0?e:this,...o);return s.params.isSubscriptFunction&&s.params.apiVersion>1&&(l=g(l,u=>[u,s.thread.bind(s),s]),r=t(r)),l},n=r instanceof Promise||r.callee instanceof async function(){}.constructor?async function(){return g(r,s=>i.call(this,s,...arguments))}:function(){return i.call(this,r,...arguments)};return g(r,s=>{this.applyReflection(n,s)}),x(n,"properties",g(r,s=>{let o={type:s.params.functionType||"Program",apiVersion:s.params.apiVersion||1,isSubscriptFunction:s.params.isSubscriptFunction,sideEffects:s.graph.sideEffects||!1};if(s.params.isSubscriptFunction){o.dependencies=[];for(let[l,u]of Object.entries(s.graph.effects))o.dependencies.push(...u.refs.map(h=>h.path.map(a=>"name"in a?a.name:1/0)))}return o})),n}applyReflection(t,e){Object.defineProperty(e.callee,"length",{configurable:!0,value:e.callee.length-1});let r=e.callee.toString();Object.defineProperty(e.callee,"toString",{configurable:!0,value:(n=!1)=>!n&&e.graph.originalSource?e.graph.originalSource:r});let i={name:e.callee.name,length:e.callee.length,toString:e.callee.toString};e.params.isSubscriptFunction&&(e.params.apiVersion>1||(i={...i,thread:e.thread.bind(e),dispose:e.dispose.bind(e),runtime:e})),Object.keys(i).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,value:i[n]})})}};var F=class extends S{static create(t,e=[],r={}){let n=r.async||t.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,s=r.compileFunction?r.compileFunction(t.source,[t.identifier+""].concat(e)):new n(t.identifier+"",...e,t.source);return new this(null,t.graph,s,r)}static createFunction(t,e,r=[],i={},n,s=null){i={...i,functionType:"Constructor"},e instanceof Promise&&(i={...i,async:!0});let o=h=>h?new this(null,h.graph,h.callee,i):g(e,a=>l(this.create(a,r,i))),l=h=>{if(h.graph.originalSource&&!h.graph.originalSourceModified){let a=`${i.async||h.graph.hoistedAwaitKeyword?"async ":""}function ${t||"anonymous"}`,c=h.graph.originalSource.split(/\n/g).map(p=>` ${p}`).join(`
`);h.graph.originalSource=`${a}(${r.join(", ")}) {
${c}
}`,h.graph.originalSourceModified=!0}return t&&Object.defineProperty(h.callee,"name",{configurable:!0,value:t}),h},u=this.prototype.createFunction(o,n);return x(u,"locations",g(e,h=>({locations:h.locations}))),u}};function P(...f){if(typeof window!="object")throw new Error("No window in context.");let t=v(typeof f[f.length-1]=="object"?f.pop():{}),e=O(f.pop()||""),r=f,i=n=>F.createFunction(void 0,n,r,t.runtimeParams,this,e);if(window.wq?.SubscriptCompiler&&!t.runtimeParams.async){let{parse:n,compile:s}=window.wq.SubscriptCompiler,o=n(e,t.parserParams);return i(s(o,t.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let o=`
importScripts( '${document.querySelector('meta[name="subscript-compiler-url"]')?.content||"https://unpkg.com/@webqit/subscript/dist/compiler.js"}' );

@@ -14,3 +14,3 @@ const { parse, compile } = self.wq.SubscriptCompiler;

e.ports[ 0 ]?.postMessage( compilation );
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(o)}`)}return i(new Promise(n=>{let s=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:e,params:r},[s.port2]),s.port1.onmessage=o=>n(o.data)}))}Object.defineProperty($,"inspect",{value:x});self.wq||(self.wq={});self.wq.SubscriptFunction=$;})();
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(o)}`)}return i(new Promise(n=>{let s=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:e,params:t},[s.port2]),s.port1.onmessage=o=>n(o.data)}))}Object.defineProperty(P,"inspect",{value:x});self.wq||(self.wq={});self.wq.SubscriptFunction=P;})();
//# sourceMappingURL=lite.js.map

@@ -1,6 +0,6 @@

(()=>{function P(p={}){let{runtimeParams:t={},compilerParams:{globalsNoObserve:e=[],globalsOnlyPathsExcept:i=[],...s}={},parserParams:r={}}=p,n={runtimeParams:{...k,...t},compilerParams:{...$,globalsNoObserve:[...$.globalsNoObserve,...e],globalsOnlyPathsExcept:[...$.globalsOnlyPathsExcept,...i],...s},parserParams:{...I,...r}};return p.devMode,n}var I={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},$={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},k={apiVersion:1};function O(p,t=!1){let e=p.split(/\n/g);if(e.length>1){for(;!e[0].trim().length;)e.shift();let i=e[t?1:0].split(/[^\s]/)[0].length;if(i)return e.map((s,r)=>{let n=s.substring(0,i);return n.trim().length?n.trim()==="}"&&r===e.length-1?"}":s:s.substring(i)}).join(`
`)}return p}var m=(p,t)=>p instanceof Promise?p.then(t):t(p);var j=new Map;function x(p,t,e=void 0){let i=j.get(p);if(arguments.length>2){i||(i=new Map,j.set(p,i)),i.set(t,e);return}return i&&i.get(t)}var C=class{constructor(t,e,i,s={},r=null,n=null){this.ownerContract=t,this.graph=e,this.callee=i,this.params=t?s:{...s,isSubscriptFunction:!0},this.exits=n||new Map,this.$thread=r||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(o,l,u=null,h=null){if(!this.graph.subContracts[o])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${o}.`);let a=this.graph.subContracts[o],c={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&l,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&l,isSubscriptFunction:arguments.length===4&&u,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(c.isIterationContract){let b=u,g=new C(this,a,b,c,this.$thread,this.exits),w=this.subContracts.get(o);return w||(w=new Map,this.subContracts.set(o,w)),w.has(c.iterationId)&&w.get(c.iterationId).dispose(),w.set(c.iterationId,g),g.call()}let f,y,d;if(this.subContracts.has(o)&&this.subContracts.get(o).dispose(),c.isFunctionContract){f=h;let b=()=>new C(this,a,f,c);if(c.functionType!=="FunctionDeclaration")d=this.createFunction(b);else{let g=b();c.apiVersion>1?(d=function(...w){let v=g.call(this,...w);return v=m(v,M=>[v,g.thread.bind(g),g]),g=b(),v},d.target=g):d=g}}else f=l,y=new C(this,a,f,c,this.$thread,this.exits),this.subContracts.set(o,y),d=y.call();return d}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(o,l){if(!arguments.length)return this.exits.size;let u=this.exits.get(o)===l;return u&&this.exits.clear(),u}.bind(this),this.contract.exit=function(o,l){this.exits.set(o,l)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(o,l)=>{this.contract.functions.set(o,l),this.applyReflection(o,typeof l=="function"?l.target:l)}}fire(t,e,i){if(!this.ownerContract)return;let s=this.ownerContract.fire(t,e,i);return this.observers.forEach(r=>{r.contractUrl===t&&r.callback(e,i)}),s}observe(t,e){!this.params.isFunctionContract||this.observers.push({contractUrl:t,callback:e})}call(t,...e){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=e,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let i=this.callee.call(t,this.contract,...e);if(this.graph.$sideEffects)for(let s in this.graph.effects)for(let r of this.graph.effects[s].refs)this.buildThread([],r,[],0,!0);return m(i,()=>{if(!this.ownerContract||this.params.isFunctionContract){let s=this.exits.get("return");if(this.exits.clear(),s!==void 0)return s}return i})}iterate(t=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,e]]=this.subContracts,i;if(!t.length||t.includes("length")&&this.graph.type==="ForOfStatement")for(let[,s]of e)i=m(i,()=>s.call());else for(let s of t){let r=e.get(s)||e.get(parseInt(s));!r||(i=m(i,()=>r.call()))}return i}thread(...t){if(this.disposed)return!1;this.$thread.active=!0;for(let e in this.graph.effects)for(let i of this.graph.effects[e].refs)for(let s of t){let[r,n,o]=this.matchRefs(s,i);!r||this.buildThread(s,i,o,n)}return this.runThread()}runThread(){let t=(r,n)=>{if(["ForOfStatement","ForInStatement"].includes(r.graph.type)&&n.every(o=>o.executionPlan.isIterationContractTarget)){let o=n.map(l=>l.executionPlan.iterationTarget);return this.fire(r.graph.lineage,"iterating",n),r.iterate(o)}return this.fire(r.graph.lineage,"executing",n),r.call()},e,i,s;for(;(i=this.$thread.sequence.shift())&&(s=[...this.$thread.entries.get(i)])&&this.$thread.entries.delete(i);)e=m(e,()=>{if(i.disposed||!i.filterRefs(s).length)return;this.$thread.current=i;let r=t(i,s);return m(r,()=>{for(let n of s)[].concat(n.executionPlan.assigneeRef||n.executionPlan.assigneeRefs||[]).forEach(o=>{i.buildThread([],o,[],0)})}),r});return m(e,()=>{let r=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,r})}buildThread(t,e,i,s=0,r=!1){let n=s>0;if(this.ownerContract){if(!this.compute(i)||e.condition!==void 0&&!this.assert(e.condition))return}else n||(n=i.length||e.condition!==void 0);let o=r?e.$subscriptions:e.subscriptions;Object.keys(o).forEach(l=>{let[u,h]=l.split(":"),a=f=>{!f||f.selectRefs(h,o[l],n?t:null)},c=this.locate(u);Array.isArray(c)?c.forEach(a):a(c)})}selectRefs(t,e,i=null){let s=this.$thread,r=this.graph.signals[t],n=(l,u)=>l.graph.lineage.localeCompare(u.graph.lineage,void 0,{numeric:!0}),o=(l,u=[],h={})=>{if(!s.active||s.current&&n(this,s.current)<0)return;let a=s.entries.get(this);if(a||(a=new Set,s.entries.set(this,a),s.sequence.push(this),s.sequence.sort(n)),a.add({...l,computes:u,executionPlan:h}),!h.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){h.assigneeRefs=[];for(let c in this.graph.effects)h.assigneeRefs.push(...this.graph.effects[c].refs)}};for(let l of e){let u=r.refs[l];if(!i){o(u);continue}let[h,a,c]=this.matchRefs(i,u);if(!h)continue;if(a<=0){o(u,c);continue}let f=i.slice(-a),y="assignee"in r?this.graph.effects[r.assignee]:null;if(y){y.refs.forEach(d=>{if(d.depth.length){let[b,g,w]=this.matchRefs(f,d.depth),v=c.concat(w);if(b&&g>0){let M=d.path.concat(f.slice(-g));this.buildThread(M,d,v,g)}else b&&o(u,v,{assigneeRef:d})}else{let b=d.path.concat(f);this.buildThread(b,d,c,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:f[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:f[0]});continue}}}filterRefs(t){return t.filter(e=>{if(!!this.compute(e.computes)&&!(e.condition!==void 0&&!this.assert(e.condition)))return!0})}matchRefs(t,e){let i,s,r,n;Array.isArray(t)?(i=t,s=t.dotSafe?t.join("."):void 0):(i=t.path,s=t.$path),Array.isArray(e)?(r=e,n=e.dotSafe?e.join("."):void 0):(r=e.path,n=e.$path);let o=i.length-r.length;if(o>0&&([i,r,s,n]=[r,i,n,s]),s&&n)return[`${n}.`.startsWith(`${s}.`),o,[]];let l=[],u=a=>typeof a=="object"?a.name:a,h=(a,c)=>{if(!a||!c)return!1;let f=typeof a=="object"&&"memoId"in a,y=typeof c=="object"&&"memoId"in c;return f||y?(l.push(d=>(f?d[a.memoId]:u(a))===(y?d[c.memoId]:u(c))),!0):u(a)===u(c)};return[i.reduce((a,c,f)=>a&&h(c,r[f]),!0),o,l]}locate(t){let e=this.graph.lineage+"/",i=t+"/";if(i===e)return this;if(i.startsWith(e)){let s=t.slice(e.length).split("/"),r=this.subContracts.get(parseInt(s.shift()));if(s.length){if(r instanceof Map)return Array.from(r).reduce((n,[o,l])=>n.concat(l.locate(t)),[]);if(r)return r.locate(t)}return r}if(this.ownerContract)return this.ownerContract.locate(t)}compute(t){return!t.some(e=>e(this.contract.memo)===!1)}assert(t){if(typeof t=="string"&&t.includes(":")){let[s,r]=t.split(":");return this.locate(s).assert(r)}let e=this.graph.conditions[t],i=this.contract.memo;return typeof e.parent<"u"&&!this.assert(e.parent)?!1:typeof e.switch<"u"?e.cases.some(s=>i[s]===i[e.switch]):typeof e.whenNot<"u"?!i[e.whenNot]:typeof e.when<"u"?i[e.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((t,e)=>{t instanceof Map?(t.forEach(i=>i.dispose()),t.clear()):t.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(t,e=void 0){let i=t(),s=function(n,...o){let l=n.call(this===void 0?e:this,...o);return n.params.isSubscriptFunction&&n.params.apiVersion>1&&(l=m(l,u=>[u,n.thread.bind(n),n]),i=t(i)),l},r=i instanceof Promise||i.callee instanceof async function(){}.constructor?async function(){return m(i,n=>s.call(this,n,...arguments))}:function(){return s.call(this,i,...arguments)};return m(i,n=>{this.applyReflection(r,n)}),x(r,"properties",m(i,n=>{let o={type:n.params.functionType||"Program",apiVersion:n.params.apiVersion||1,isSubscriptFunction:n.params.isSubscriptFunction,sideEffects:n.graph.sideEffects||!1};if(n.params.isSubscriptFunction){o.dependencies=[];for(let[l,u]of Object.entries(n.graph.effects))o.dependencies.push(...u.refs.map(h=>h.path.map(a=>"name"in a?a.name:1/0)))}return o})),r}applyReflection(t,e){Object.defineProperty(e.callee,"length",{configurable:!0,value:e.callee.length-1});let i=e.callee.toString();Object.defineProperty(e.callee,"toString",{configurable:!0,value:(r=!1)=>!r&&e.graph.originalSource?e.graph.originalSource:i});let s={name:e.callee.name,length:e.callee.length,toString:e.callee.toString};e.params.isSubscriptFunction&&(e.params.apiVersion>1||(s={...s,thread:e.thread.bind(e),dispose:e.dispose.bind(e),runtime:e})),Object.keys(s).forEach(r=>{Object.defineProperty(t,r,{configurable:!0,value:s[r]})})}};var E=class extends C{static create(t,e=[],i={}){let r=i.async||t.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,n=i.compileFunction?i.compileFunction(t.source,[t.identifier+""].concat(e)):new r(t.identifier+"",...e,t.source);return new this(null,t.graph,n,i)}static createFunction(t,e,i=[],s={},r,n=null){s={...s,functionType:"Constructor"},e instanceof Promise&&(s={...s,async:!0});let o=h=>h?new this(null,h.graph,h.callee,s):m(e,a=>l(this.create(a,i,s))),l=h=>{if(h.graph.originalSource&&!h.graph.originalSourceModified){let a=`${s.async||h.graph.hoistedAwaitKeyword?"async ":""}function ${t||"anonymous"}`,c=h.graph.originalSource.split(/\n/g).map(f=>` ${f}`).join(`
(()=>{function $(...p){let e={runtimeParams:k,compilerParams:I,parserParams:A},t;for(;t=p.shift();){let{runtimeParams:i={},compilerParams:{globalsNoObserve:s=[],globalsOnlyPathsExcept:r=[],...n}={},parserParams:o={}}=t;e={runtimeParams:{...e.runtimeParams,...i},compilerParams:{...e.compilerParams,globalsNoObserve:[...e.compilerParams.globalsNoObserve,...s],globalsOnlyPathsExcept:[...e.compilerParams.globalsOnlyPathsExcept,...r],...n},parserParams:{...e.parserParams,...o}},p.devMode}return e}var A={ecmaVersion:"2020",allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveParens:!1,locations:!1},I={globalsNoObserve:["globalThis","arguments","console","debugger"],globalsOnlyPathsExcept:[],originalSource:!0,locations:!0,compact:2},k={apiVersion:1};function O(p,e=!1){let t=p.split(/\n/g);if(t.length>1){for(;!t[0].trim().length;)t.shift();let i=t[e?1:0].split(/[^\s]/)[0].length;if(i)return t.map((s,r)=>{let n=s.substring(0,i);return n.trim().length?n.trim()==="}"&&r===t.length-1?"}":s:s.substring(i)}).join(`
`)}return p}var m=(p,e)=>p instanceof Promise?p.then(e):e(p);var M=new Map;function C(p,e,t=void 0){let i=M.get(p);if(arguments.length>2){i||(i=new Map,M.set(p,i)),i.set(e,t);return}return i&&i.get(e)}var v=class{constructor(e,t,i,s={},r=null,n=null){this.ownerContract=e,this.graph=t,this.callee=i,this.params=e?s:{...s,isSubscriptFunction:!0},this.exits=n||new Map,this.$thread=r||{entries:new Map,sequence:[],ownerContract:this},this.subContracts=new Map,this.observers=[],this.contract=function(o,l,u=null,h=null){if(!this.graph.subContracts[o])throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Graph not found for child contract ${o}.`);let a=this.graph.subContracts[o],c={...this.params,isIterationContract:arguments.length===3,iterationId:arguments.length===3&&l,isFunctionContract:arguments.length===4,functionType:arguments.length===4&&l,isSubscriptFunction:arguments.length===4&&u,functionScope:this.params.isFunctionContract&&this.graph.lineage||this.params.functionScope};if(c.isIterationContract){let b=u,g=new v(this,a,b,c,this.$thread,this.exits),w=this.subContracts.get(o);return w||(w=new Map,this.subContracts.set(o,w)),w.has(c.iterationId)&&w.get(c.iterationId).dispose(),w.set(c.iterationId,g),g.call()}let f,y,d;if(this.subContracts.has(o)&&this.subContracts.get(o).dispose(),c.isFunctionContract){f=h;let b=()=>new v(this,a,f,c);if(c.functionType!=="FunctionDeclaration")d=this.createFunction(b);else{let g=b();c.apiVersion>1?(d=function(...w){let x=g.call(this,...w);return x=m(x,P=>[x,g.thread.bind(g),g]),g=b(),x},d.target=g):d=g}}else f=l,y=new v(this,a,f,c,this.$thread,this.exits),this.subContracts.set(o,y),d=y.call();return d}.bind(this),this.contract.memo=Object.create(null),this.ownerContract&&!["FunctionDeclaration","FunctionExpression"].includes(this.graph.type)&&(this.contract.args=this.ownerContract.contract.args),this.contract.exiting=function(o,l){if(!arguments.length)return this.exits.size;let u=this.exits.get(o)===l;return u&&this.exits.clear(),u}.bind(this),this.contract.exit=function(o,l){this.exits.set(o,l)}.bind(this),this.contract.functions=new Map,this.contract.functions.declaration=(o,l)=>{this.contract.functions.set(o,l),this.applyReflection(o,typeof l=="function"?l.target:l)}}fire(e,t,i){if(!this.ownerContract)return;let s=this.ownerContract.fire(e,t,i);return this.observers.forEach(r=>{r.contractUrl===e&&r.callback(t,i)}),s}observe(e,t){!this.params.isFunctionContract||this.observers.push({contractUrl:e,callback:t})}call(e,...t){if(this.disposed)throw new Error(`[${this.graph.type}:${this.graph.lineage}]: Instance not runable after having been disposed.`);this.ownerContract||(this.contract.args=t,Object.defineProperty(this.contract.args,Symbol.toStringTag,{value:"Arguments"}));let i=this.callee.call(e,this.contract,...t);if(this.graph.$sideEffects)for(let s in this.graph.effects)for(let r of this.graph.effects[s].refs)this.buildThread([],r,[],0,!0);return m(i,()=>{if(!this.ownerContract||this.params.isFunctionContract){let s=this.exits.get("return");if(this.exits.clear(),s!==void 0)return s}return i})}iterate(e=[]){if(this.disposed)return!1;if(!["ForOfStatement","ForInStatement"].includes(this.graph.type)||this.subContracts.size!==1)throw new Error(`Contract ${this.graph.lineage} is not an iterator.`);let[[,t]]=this.subContracts,i;if(!e.length||e.includes("length")&&this.graph.type==="ForOfStatement")for(let[,s]of t)i=m(i,()=>s.call());else for(let s of e){let r=t.get(s)||t.get(parseInt(s));!r||(i=m(i,()=>r.call()))}return i}thread(...e){if(this.disposed)return!1;this.$thread.active=!0;for(let t in this.graph.effects)for(let i of this.graph.effects[t].refs)for(let s of e){let[r,n,o]=this.matchRefs(s,i);!r||this.buildThread(s,i,o,n)}return this.runThread()}runThread(){let e=(r,n)=>{if(["ForOfStatement","ForInStatement"].includes(r.graph.type)&&n.every(o=>o.executionPlan.isIterationContractTarget)){let o=n.map(l=>l.executionPlan.iterationTarget);return this.fire(r.graph.lineage,"iterating",n),r.iterate(o)}return this.fire(r.graph.lineage,"executing",n),r.call()},t,i,s;for(;(i=this.$thread.sequence.shift())&&(s=[...this.$thread.entries.get(i)])&&this.$thread.entries.delete(i);)t=m(t,()=>{if(i.disposed||!i.filterRefs(s).length)return;this.$thread.current=i;let r=e(i,s);return m(r,()=>{for(let n of s)[].concat(n.executionPlan.assigneeRef||n.executionPlan.assigneeRefs||[]).forEach(o=>{i.buildThread([],o,[],0)})}),r});return m(t,()=>{let r=this.exits.get("return");return this.exits.clear(),this.$thread.current=null,this.$thread.active=!1,r})}buildThread(e,t,i,s=0,r=!1){let n=s>0;if(this.ownerContract){if(!this.compute(i)||t.condition!==void 0&&!this.assert(t.condition))return}else n||(n=i.length||t.condition!==void 0);let o=r?t.$subscriptions:t.subscriptions;Object.keys(o).forEach(l=>{let[u,h]=l.split(":"),a=f=>{!f||f.selectRefs(h,o[l],n?e:null)},c=this.locate(u);Array.isArray(c)?c.forEach(a):a(c)})}selectRefs(e,t,i=null){let s=this.$thread,r=this.graph.signals[e],n=(l,u)=>l.graph.lineage.localeCompare(u.graph.lineage,void 0,{numeric:!0}),o=(l,u=[],h={})=>{if(!s.active||s.current&&n(this,s.current)<0)return;let a=s.entries.get(this);if(a||(a=new Set,s.entries.set(this,a),s.sequence.push(this),s.sequence.sort(n)),a.add({...l,computes:u,executionPlan:h}),!h.assigneeRef&&["VariableDeclaration","AssignmentExpression"].includes(this.graph.type)){h.assigneeRefs=[];for(let c in this.graph.effects)h.assigneeRefs.push(...this.graph.effects[c].refs)}};for(let l of t){let u=r.refs[l];if(!i){o(u);continue}let[h,a,c]=this.matchRefs(i,u);if(!h)continue;if(a<=0){o(u,c);continue}let f=i.slice(-a),y="assignee"in r?this.graph.effects[r.assignee]:null;if(y){y.refs.forEach(d=>{if(d.depth.length){let[b,g,w]=this.matchRefs(f,d.depth),x=c.concat(w);if(b&&g>0){let P=d.path.concat(f.slice(-g));this.buildThread(P,d,x,g)}else b&&o(u,x,{assigneeRef:d})}else{let b=d.path.concat(f);this.buildThread(b,d,c,a)}});continue}if(a===1&&this.graph.type==="ForOfStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:f[0]});continue}if(a===1&&this.graph.type==="ForInStatement"){o(u,c,{isIterationContractTarget:!0,iterationTarget:f[0]});continue}}}filterRefs(e){return e.filter(t=>{if(!!this.compute(t.computes)&&!(t.condition!==void 0&&!this.assert(t.condition)))return!0})}matchRefs(e,t){let i,s,r,n;Array.isArray(e)?(i=e,s=e.dotSafe?e.join("."):void 0):(i=e.path,s=e.$path),Array.isArray(t)?(r=t,n=t.dotSafe?t.join("."):void 0):(r=t.path,n=t.$path);let o=i.length-r.length;if(o>0&&([i,r,s,n]=[r,i,n,s]),s&&n)return[`${n}.`.startsWith(`${s}.`),o,[]];let l=[],u=a=>typeof a=="object"?a.name:a,h=(a,c)=>{if(!a||!c)return!1;let f=typeof a=="object"&&"memoId"in a,y=typeof c=="object"&&"memoId"in c;return f||y?(l.push(d=>(f?d[a.memoId]:u(a))===(y?d[c.memoId]:u(c))),!0):u(a)===u(c)};return[i.reduce((a,c,f)=>a&&h(c,r[f]),!0),o,l]}locate(e){let t=this.graph.lineage+"/",i=e+"/";if(i===t)return this;if(i.startsWith(t)){let s=e.slice(t.length).split("/"),r=this.subContracts.get(parseInt(s.shift()));if(s.length){if(r instanceof Map)return Array.from(r).reduce((n,[o,l])=>n.concat(l.locate(e)),[]);if(r)return r.locate(e)}return r}if(this.ownerContract)return this.ownerContract.locate(e)}compute(e){return!e.some(t=>t(this.contract.memo)===!1)}assert(e){if(typeof e=="string"&&e.includes(":")){let[s,r]=e.split(":");return this.locate(s).assert(r)}let t=this.graph.conditions[e],i=this.contract.memo;return typeof t.parent<"u"&&!this.assert(t.parent)?!1:typeof t.switch<"u"?t.cases.some(s=>i[s]===i[t.switch]):typeof t.whenNot<"u"?!i[t.whenNot]:typeof t.when<"u"?i[t.when]:!0}dispose(){this.params.isFunctionContract||(this.subContracts.forEach((e,t)=>{e instanceof Map?(e.forEach(i=>i.dispose()),e.clear()):e.dispose()}),this.subContracts.clear(),delete this.ownerContract,delete this.callee,delete this.params,delete this.contract.memo,this.disposed=!0)}createFunction(e,t=void 0){let i=e(),s=function(n,...o){let l=n.call(this===void 0?t:this,...o);return n.params.isSubscriptFunction&&n.params.apiVersion>1&&(l=m(l,u=>[u,n.thread.bind(n),n]),i=e(i)),l},r=i instanceof Promise||i.callee instanceof async function(){}.constructor?async function(){return m(i,n=>s.call(this,n,...arguments))}:function(){return s.call(this,i,...arguments)};return m(i,n=>{this.applyReflection(r,n)}),C(r,"properties",m(i,n=>{let o={type:n.params.functionType||"Program",apiVersion:n.params.apiVersion||1,isSubscriptFunction:n.params.isSubscriptFunction,sideEffects:n.graph.sideEffects||!1};if(n.params.isSubscriptFunction){o.dependencies=[];for(let[l,u]of Object.entries(n.graph.effects))o.dependencies.push(...u.refs.map(h=>h.path.map(a=>"name"in a?a.name:1/0)))}return o})),r}applyReflection(e,t){Object.defineProperty(t.callee,"length",{configurable:!0,value:t.callee.length-1});let i=t.callee.toString();Object.defineProperty(t.callee,"toString",{configurable:!0,value:(r=!1)=>!r&&t.graph.originalSource?t.graph.originalSource:i});let s={name:t.callee.name,length:t.callee.length,toString:t.callee.toString};t.params.isSubscriptFunction&&(t.params.apiVersion>1||(s={...s,thread:t.thread.bind(t),dispose:t.dispose.bind(t),runtime:t})),Object.keys(s).forEach(r=>{Object.defineProperty(e,r,{configurable:!0,value:s[r]})})}};var E=class extends v{static create(e,t=[],i={}){let r=i.async||e.graph.hoistedAwaitKeyword?Object.getPrototypeOf(async function(){}).constructor:Function,n=i.compileFunction?i.compileFunction(e.source,[e.identifier+""].concat(t)):new r(e.identifier+"",...t,e.source);return new this(null,e.graph,n,i)}static createFunction(e,t,i=[],s={},r,n=null){s={...s,functionType:"Constructor"},t instanceof Promise&&(s={...s,async:!0});let o=h=>h?new this(null,h.graph,h.callee,s):m(t,a=>l(this.create(a,i,s))),l=h=>{if(h.graph.originalSource&&!h.graph.originalSourceModified){let a=`${s.async||h.graph.hoistedAwaitKeyword?"async ":""}function ${e||"anonymous"}`,c=h.graph.originalSource.split(/\n/g).map(f=>` ${f}`).join(`
`);h.graph.originalSource=`${a}(${i.join(", ")}) {
${c}
}`,h.graph.originalSourceModified=!0}return t&&Object.defineProperty(h.callee,"name",{configurable:!0,value:t}),h},u=this.prototype.createFunction(o,r);return x(u,"locations",m(e,h=>({locations:h.locations}))),u}};function S(...p){if(typeof window!="object")throw new Error("No window in context.");let t=P(typeof p[p.length-1]=="object"?p.pop():{}),e=O(p.pop()||""),i=p,s=r=>E.createFunction(void 0,r,i,t.runtimeParams,this,e);if(window.wq?.SubscriptCompiler&&!t.runtimeParams.async){let{parse:r,compile:n}=window.wq.SubscriptCompiler,o=r(e,t.parserParams);return s(n(o,t.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let o=`
}`,h.graph.originalSourceModified=!0}return e&&Object.defineProperty(h.callee,"name",{configurable:!0,value:e}),h},u=this.prototype.createFunction(o,r);return C(u,"locations",m(t,h=>({locations:h.locations}))),u}};function S(...p){if(typeof window!="object")throw new Error("No window in context.");let e=$(typeof p[p.length-1]=="object"?p.pop():{}),t=O(p.pop()||""),i=p,s=r=>E.createFunction(void 0,r,i,e.runtimeParams,this,t);if(window.wq?.SubscriptCompiler&&!e.runtimeParams.async){let{parse:r,compile:n}=window.wq.SubscriptCompiler,o=r(t,e.parserParams);return s(n(o,e.compilerParams))}if(!window.wq?.SubscriptCompilerWorker){let o=`
importScripts( '${document.querySelector('meta[name="subscript-compiler-url"]')?.content||"https://unpkg.com/@webqit/subscript/dist/compiler.js"}' );

@@ -14,3 +14,3 @@ const { parse, compile } = self.wq.SubscriptCompiler;

e.ports[ 0 ]?.postMessage( compilation );
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(o)}`)}return s(new Promise(r=>{let n=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:e,params:t},[n.port2]),n.port1.onmessage=o=>r(o.data)}))}Object.defineProperty(S,"inspect",{value:x});var A=p=>class extends p{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach(e=>{if(e.includes("{")&&e.includes(":")&&e.includes(";")){let i=this.shadowRoot.appendChild(document.createElement("style"));i.textContent=e}else{let i=this.shadowRoot.appendChild(document.createElement("link"));i.setAttribute("rel","stylesheet"),i.setAttribute("href",e)}})}get css(){return[]}};var F=class extends A(HTMLElement){connectedCallback(){this.autoMode=this.getAttribute("auto-mode"),this.visualizerElement=document.createElement("cfunctions-visualizer"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.buttons={},["edit","play"].forEach(t=>{let e=t.substring(0,1).toUpperCase()+t.substring(1);this.buttons[t]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[t].classList.add(t),this.buttons[t].setAttribute("title",e);let i=this.buttons[t].appendChild(document.createElement("i"));(this.getAttribute(`data-${t}-icon`)||`bi bi-${t==="edit"?"pencil":t}`).split(" ").map(n=>n.trim()).forEach(n=>i.classList.add(n)),this.buttons[t].appendChild(document.createElement("span")).append(" ",e),this.buttons[t].addEventListener("click",n=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[t],this.active.classList.add("active")})}),this.buttons.edit.addEventListener("click",t=>this.switchEditable(!0)),this.buttons.play.addEventListener("click",t=>this.switchEditable(!1)),this.shadowRoot.append(this.controlsElement,this.visualizerElement),super.connectedCallback(),setTimeout(()=>{this.visualizerElement.innerHTML=this.innerHTML,setTimeout(()=>{this.loadConsole(),this.autoMode&&this.buttons[this.autoMode].dispatchEvent(new MouseEvent("click"))},0)},0)}loadConsole(){this.fn=S(this.visualizerElement.source,{devMode:!0}),this.visualizerElement.visualize(this.fn,!1)}switchEditable(t){this.visualizerElement.editable=t,t?this.fn&&(this.fn.dispose(),this.fn=null):(this.fn||this.loadConsole(),this.fn())}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",`
};`;window.wq=window.wq||{},window.wq.SubscriptCompilerWorker=new Worker(`data:text/javascript;base64,${btoa(o)}`)}return s(new Promise(r=>{let n=new MessageChannel;wq.SubscriptCompilerWorker.postMessage({source:t,params:e},[n.port2]),n.port1.onmessage=o=>r(o.data)}))}Object.defineProperty(S,"inspect",{value:C});var j=p=>class extends p{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach(t=>{if(t.includes("{")&&t.includes(":")&&t.includes(";")){let i=this.shadowRoot.appendChild(document.createElement("style"));i.textContent=t}else{let i=this.shadowRoot.appendChild(document.createElement("link"));i.setAttribute("rel","stylesheet"),i.setAttribute("href",t)}})}get css(){return[]}};var F=class extends j(HTMLElement){connectedCallback(){this.autoMode=this.getAttribute("auto-mode"),this.visualizerElement=document.createElement("cfunctions-visualizer"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.buttons={},["edit","play"].forEach(e=>{let t=e.substring(0,1).toUpperCase()+e.substring(1);this.buttons[e]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[e].classList.add(e),this.buttons[e].setAttribute("title",t);let i=this.buttons[e].appendChild(document.createElement("i"));(this.getAttribute(`data-${e}-icon`)||`bi bi-${e==="edit"?"pencil":e}`).split(" ").map(n=>n.trim()).forEach(n=>i.classList.add(n)),this.buttons[e].appendChild(document.createElement("span")).append(" ",t),this.buttons[e].addEventListener("click",n=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[e],this.active.classList.add("active")})}),this.buttons.edit.addEventListener("click",e=>this.switchEditable(!0)),this.buttons.play.addEventListener("click",e=>this.switchEditable(!1)),this.shadowRoot.append(this.controlsElement,this.visualizerElement),super.connectedCallback(),setTimeout(()=>{this.visualizerElement.innerHTML=this.innerHTML,setTimeout(()=>{this.loadConsole(),this.autoMode&&this.buttons[this.autoMode].dispatchEvent(new MouseEvent("click"))},0)},0)}loadConsole(){this.fn=S(this.visualizerElement.source,{devMode:!0}),this.visualizerElement.visualize(this.fn,!1)}switchEditable(e){this.visualizerElement.editable=e,e?this.fn&&(this.fn.dispose(),this.fn=null):(this.fn||this.loadConsole(),this.fn())}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css",`
* {

@@ -17,0 +17,0 @@ -webkit-box-sizing: border-box;

@@ -11,3 +11,3 @@ {

"homepage": "https://webqit.io/tooling/subscript",
"version": "2.1.36",
"version": "2.1.37",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": {

@@ -5,14 +5,17 @@

*/
export function resolveParams( extensions = {} ) {
const {
runtimeParams: _runtimeParams = {},
compilerParams: { globalsNoObserve = [], globalsOnlyPathsExcept = [], ..._compilerParams } = {},
parserParams: _parserParams = {},
} = extensions;
const params = {
runtimeParams: { ...runtimeParams, ..._runtimeParams },
compilerParams: { ...compilerParams, globalsNoObserve: [ ...compilerParams.globalsNoObserve, ...globalsNoObserve ], globalsOnlyPathsExcept: [ ...compilerParams.globalsOnlyPathsExcept, ...globalsOnlyPathsExcept ], ..._compilerParams },
parserParams: { ...parserParams, ..._parserParams },
};
if ( extensions.devMode ) { /* shortcut for devMode configs */ }
export function resolveParams( ...extensions ) {
let params = { runtimeParams, compilerParams, parserParams }, extension;
while( extension = extensions.shift() ) {
const {
runtimeParams: _runtimeParams = {},
compilerParams: { globalsNoObserve: _globalsNoObserve = [], globalsOnlyPathsExcept: _globalsOnlyPathsExcept = [], ..._compilerParams } = {},
parserParams: _parserParams = {},
} = extension;
params = {
runtimeParams: { ...params.runtimeParams, ..._runtimeParams },
compilerParams: { ...params.compilerParams, globalsNoObserve: [ ...params.compilerParams.globalsNoObserve, ..._globalsNoObserve ], globalsOnlyPathsExcept: [ ...params.compilerParams.globalsOnlyPathsExcept, ..._globalsOnlyPathsExcept ], ..._compilerParams },
parserParams: { ...params.parserParams, ..._parserParams },
};
if ( extensions.devMode ) { /* shortcut for devMode configs */ }
}
return params;

@@ -19,0 +22,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc