diff --git a/about/index.html b/about/index.html index 23f22ee1..220a7ac3 100644 --- a/about/index.html +++ b/about/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/asm/index.html b/asm/index.html index 23f22ee1..220a7ac3 100644 --- a/asm/index.html +++ b/asm/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index 633265a3..113274e6 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/web-ide/static/css/main.9acd77f6.css", - "main.js": "/web-ide/static/js/main.144c663d.js", + "main.js": "/web-ide/static/js/main.a8a63237.js", "static/js/297.2c45dab0.chunk.js": "/web-ide/static/js/297.2c45dab0.chunk.js", "static/js/269.1e46835e.chunk.js": "/web-ide/static/js/269.1e46835e.chunk.js", "static/css/840.0d62533a.chunk.css": "/web-ide/static/css/840.0d62533a.chunk.css", "static/js/840.58587a41.chunk.js": "/web-ide/static/js/840.58587a41.chunk.js", "static/css/19.4fad62ac.chunk.css": "/web-ide/static/css/19.4fad62ac.chunk.css", "static/js/19.220ca71d.chunk.js": "/web-ide/static/js/19.220ca71d.chunk.js", - "static/css/71.ceb38a89.chunk.css": "/web-ide/static/css/71.ceb38a89.chunk.css", - "static/js/71.61087919.chunk.js": "/web-ide/static/js/71.61087919.chunk.js", + "static/css/71.9c75ebae.chunk.css": "/web-ide/static/css/71.9c75ebae.chunk.css", + "static/js/71.d0f0a1e6.chunk.js": "/web-ide/static/js/71.d0f0a1e6.chunk.js", "static/js/323.14a08baf.chunk.js": "/web-ide/static/js/323.14a08baf.chunk.js", "static/css/101.5d2339c2.chunk.css": "/web-ide/static/css/101.5d2339c2.chunk.css", "static/js/101.7c9e4ccc.chunk.js": "/web-ide/static/js/101.7c9e4ccc.chunk.js", @@ -29,6 +29,6 @@ }, "entrypoints": [ "static/css/main.9acd77f6.css", - "static/js/main.144c663d.js" + "static/js/main.a8a63237.js" ] } \ No newline at end of file diff --git a/bitmap/index.html b/bitmap/index.html index 23f22ee1..220a7ac3 100644 --- a/bitmap/index.html +++ b/bitmap/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/chip/index.html b/chip/index.html index 23f22ee1..220a7ac3 100644 --- a/chip/index.html +++ b/chip/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/compiler/index.html b/compiler/index.html index 23f22ee1..220a7ac3 100644 --- a/compiler/index.html +++ b/compiler/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/cpu/index.html b/cpu/index.html index 23f22ee1..220a7ac3 100644 --- a/cpu/index.html +++ b/cpu/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/guide/index.html b/guide/index.html index 23f22ee1..220a7ac3 100644 --- a/guide/index.html +++ b/guide/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/index.html b/index.html index 23f22ee1..220a7ac3 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -NAND2Tetris
\ No newline at end of file +NAND2Tetris
\ No newline at end of file diff --git a/static/css/71.ceb38a89.chunk.css b/static/css/71.9c75ebae.chunk.css similarity index 94% rename from static/css/71.ceb38a89.chunk.css rename to static/css/71.9c75ebae.chunk.css index d2f3d1c9..94d67db3 100644 --- a/static/css/71.ceb38a89.chunk.css +++ b/static/css/71.9c75ebae.chunk.css @@ -1 +1 @@ -.Editor{position:relative;width:100%}.Editor:not(.dynamic-height){height:100%}.Editor .monaco-editor{position:absolute}.Editor .highlight{background-color:var(--mark-background-color)}.Editor .error-highlight{background-color:var(--mark-error-color)}.Editor .red{color:#be1010}.Editor .green{color:green}.Editor textarea{flex:1 1}.Editor:has(.overlay){position:relative}.Editor .overlay{background-color:var(--form-element-disabled-background-color);inset:0;opacity:var(--form-element-disabled-opacity);position:absolute}[role=group]{display:flex;flex-direction:row;margin:0}[role=group] [role=button],[role=group] button,[role=group] input,[role=group] select{margin:0}[role=group] [role=button].colored,[role=group] button.colored,[role=group] input.colored,[role=group] select.colored{background-color:var(--primary);color:var(--primary-inverse)}[role=group] [role=button]:not(:first-child),[role=group] button:not(:first-child),[role=group] input:not(:first-child),[role=group] select:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}[role=group] [role=button]:not(:last-child),[role=group] button:not(:last-child),[role=group] input:not(:last-child),[role=group] select:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}[role=group] [role=button][aria-current=true],[role=group] button[aria-current=true],[role=group] input[aria-current=true],[role=group] select[aria-current=true]{background-color:var(--primary-inverse);color:var(--primary)}[role=group] [role=button] input[type=checkbox],[role=group] [role=button] input[type=radio],[role=group] button input[type=checkbox],[role=group] button input[type=radio],[role=group] input input[type=checkbox],[role=group] input input[type=radio],[role=group] select input[type=checkbox],[role=group] select input[type=radio]{display:none}[role=tablist]{--border-style:solid;--border:var(--border-width) var(--border-style) var(--card-border-color);--border-empty:var(--border-width) var(--border-style) var(--card-background-color);--tab-count:5;--spacing-tab-edge:calc(var(--block-spacing-horizontal)/2);display:grid;grid-template:min-content 1fr/var(--spacing-tab-edge) repeat(var(--tab-count),min-content) 1fr;height:100%}[role=tablist]:after,[role=tablist]:before{border-bottom:var(--border);content:"";display:block;grid-row:1;min-width:var(--spacing-tab-edge)}[role=tablist]:before{order:-1}[role=tablist]:after{grid-column-end:-1;order:1}[role=tab]{border:var(--border-empty);border-bottom:var(--border);grid-row:1;height:min-content;order:0;white-space:nowrap}[role=tab] label,label[role=tab]{padding:var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal) calc(var(--form-element-spacing-vertical)/2)}[role=tab]:hover{--border-color:var(--secondary-color);border:var(--border)}[role=tab]:has(:focus){--border-style:dotted}[role=tab]:has(:active){--border-style:dotted}[role=tab] [type=radio]{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}[role=tab][aria-selected=true]{border:var(--border);border-bottom:var(--border-empty)}[role=tab]:has(:checked){border:var(--border);border-bottom:var(--border-empty)}[role=tabpanel]{display:none;grid-area:2/1/span 1/-1}[role=tab][aria-selected=true]+[role=tabpanel]{display:block;flex-basis:100%}[role=tab]:has(:checked)+[role=tabpanel]{display:block;flex-basis:100%}.AsmPage{gap:0;grid-template-areas:"source result compare" "source sym compare";grid-template-columns:2.5fr 1fr 1fr;grid-template-rows:2fr 1fr;height:100%;margin:0}.AsmPage .source{grid-area:source}.AsmPage .result{grid-area:result}.AsmPage .compare{grid-area:compare}.AsmPage .sym{grid-area:sym} \ No newline at end of file +.Editor{position:relative;width:100%}.Editor:not(.dynamic-height){height:100%}.Editor .monaco-editor{position:absolute}.Editor .highlight{background-color:var(--mark-background-color)}.Editor .error-highlight{background-color:var(--mark-error-color)}.Editor .red{color:#be1010}.Editor .green{color:green}.Editor textarea{flex:1 1}.Editor:has(.overlay){position:relative}.Editor .overlay{background-color:var(--form-element-disabled-background-color);inset:0;opacity:var(--form-element-disabled-opacity);position:absolute}[role=group]{display:flex;flex-direction:row;margin:0}[role=group] [role=button],[role=group] button,[role=group] input,[role=group] select{margin:0}[role=group] [role=button].colored,[role=group] button.colored,[role=group] input.colored,[role=group] select.colored{background-color:var(--primary);color:var(--primary-inverse)}[role=group] [role=button]:not(:first-child),[role=group] button:not(:first-child),[role=group] input:not(:first-child),[role=group] select:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}[role=group] [role=button]:not(:last-child),[role=group] button:not(:last-child),[role=group] input:not(:last-child),[role=group] select:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}[role=group] [role=button][aria-current=true],[role=group] button[aria-current=true],[role=group] input[aria-current=true],[role=group] select[aria-current=true]{background-color:var(--primary-inverse);color:var(--primary)}[role=group] [role=button] input[type=checkbox],[role=group] [role=button] input[type=radio],[role=group] button input[type=checkbox],[role=group] button input[type=radio],[role=group] input input[type=checkbox],[role=group] input input[type=radio],[role=group] select input[type=checkbox],[role=group] select input[type=radio]{display:none}[role=tablist]{--border-style:solid;--border:var(--border-width) var(--border-style) var(--card-border-color);--border-empty:var(--border-width) var(--border-style) var(--card-background-color);--tab-count:5;--spacing-tab-edge:calc(var(--block-spacing-horizontal)/2);display:grid;grid-template:min-content 1fr/var(--spacing-tab-edge) repeat(var(--tab-count),min-content) 1fr;height:100%}[role=tablist]:after,[role=tablist]:before{border-bottom:var(--border);content:"";display:block;grid-row:1;min-width:var(--spacing-tab-edge)}[role=tablist]:before{order:-1}[role=tablist]:after{grid-column-end:-1;order:1}[role=tab]{border:var(--border-empty);border-bottom:var(--border);grid-row:1;height:min-content;order:0;white-space:nowrap}[role=tab] label,label[role=tab]{padding:var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal) calc(var(--form-element-spacing-vertical)/2)}[role=tab]:hover{--border-color:var(--secondary-color);border:var(--border)}[role=tab]:has(:focus){--border-style:dotted}[role=tab]:has(:active){--border-style:dotted}[role=tab] [type=radio]{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}[role=tab][aria-selected=true]{border:var(--border);border-bottom:var(--border-empty)}[role=tab]:has(:checked){border:var(--border);border-bottom:var(--border-empty)}[role=tabpanel]{display:none;grid-area:2/1/span 1/-1}[role=tab][aria-selected=true]+[role=tabpanel]{display:block;flex-basis:100%}[role=tab]:has(:checked)+[role=tabpanel]{display:block;flex-basis:100%}.AsmPage{gap:0;grid-template-areas:"source result compare" "source sym compare";grid-template-columns:2.5fr 1fr 1fr;grid-template-rows:2fr 1fr;height:100%;margin:0}.AsmPage.hide-sym{grid-template-rows:1fr auto}.AsmPage .source{grid-area:source}.AsmPage .result{grid-area:result}.AsmPage .compare{grid-area:compare}.AsmPage .sym{grid-area:sym} \ No newline at end of file diff --git a/static/js/71.61087919.chunk.js b/static/js/71.61087919.chunk.js deleted file mode 100644 index 640bbda4..00000000 --- a/static/js/71.61087919.chunk.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(globalThis.webpackChunk_nand2tetris_web=globalThis.webpackChunk_nand2tetris_web||[]).push([[71],{2745:(e,t,s)=>{s.r(t),s.d(t,{Asm:()=>S,default:()=>w});var r=s(4621),i=s(7022),n=s(5874),a=s(7076),l=s(4666),o=s(7844),c=s(8878),u=s(8177),h=s(3761);class d{asm={instructions:[]};current=-1;done=!1;symbols=[];variables=new Map;lines=[];lineNumbers=[];getResult(){return this.lines.join("\n")}load(e,t){this.symbols=[{name:"R0",value:"0"},{name:"R1",value:"1"},{name:"R2",value:"2"},{name:"...",value:""},{name:"R15",value:"15"},{name:"SCREEN",value:a.L7.toString()},{name:"KBD",value:a.ky.toString()}],this.variables.clear(),this.asm=e;const s=(0,l.EU)(e,((e,t,s)=>{s?this.variables.set(t,{name:e,isHidden:!0}):this.symbols.push({name:e,value:t.toString()})}));return(0,n.ys)(s)?s:(e.instructions=e.instructions.filter((({type:e})=>"L"!==e)),this.resolveLineNumbers(t),this.reset(),(0,n.Ok)())}resolveLineNumbers(e){this.lineNumbers=Array(e);let t=0;for(const s of this.asm.instructions)"A"!==s.type&&"C"!==s.type||void 0==s.span||(this.lineNumbers[s.span.line]=t,t+=1)}step(e){if(this.current>=this.asm.instructions.length-1)return;this.current+=1;const t=this.asm.instructions[this.current];if("A"===t.type||"C"===t.type){e.sourceHighlight=t.span;const s=(0,l.ld)(this.asm.instructions[this.current]);if(void 0===s)return;if(this.lines.push(`${(0,o.e5)(s)}`),e.resultHighlight={start:17*this.current,end:17*(this.current+1),line:-1},e.sourceHighlight&&e.highlightMap.set(e.sourceHighlight,e.resultHighlight),(0,l.J$)(t)){const e=this.variables.get(t.value);void 0!=e&&e.isHidden&&(this.symbols.push({name:e.name,value:t.value.toString()}),e.isHidden=!1)}this.current===this.asm.instructions.length-1&&(this.done=!0)}}resetSymbols(){for(const t of this.variables.values())t.isHidden=!0;const e=new Set(Array.from(this.variables.values()).map((e=>e.name)));this.symbols=this.symbols.filter((t=>!e.has(t.name)))}reset(){this.current=-1,this.lines=[],this.done=!1,this.resetSymbols()}}function m(){const{setStatus:e,fs:t}=(0,c.useContext)(h.L),s=(0,c.useRef)((()=>{})),{initialState:r,reducers:i,actions:a}=(0,c.useMemo)((()=>function(e,t,s){const r=new d,i={resultHighlight:void 0,sourceHighlight:void 0,highlightMap:new Map};let a,o=!0,c=!1,u=!1,h=!1;const m={setAsm(e,{asm:t,path:s}){e.asm=t,s&&(e.path=s)},setCmp(e,{cmp:s,name:r}){e.compare=s,e.compareName=r,t("Loaded compare file")},setError(e,s){s&&t(s.message),e.error=s},update(e){e.translating=u,e.current=r.current,e.result=r.getResult(),e.symbols=Array.from(r.symbols),e.lineNumbers=Array.from(r.lineNumbers),e.sourceHighlight=i.sourceHighlight,e.resultHighlight=i.resultHighlight,e.compareError=h},compare(e){const s=e.result.split("\n"),r=e.compare.split("\n").filter((e=>""!=e.trim()));if(s.length!=r.length)return h=!0,void t("Comparison failed - different lengths");for(let n=0;n{this.compileAsm(e)}))},saveAsm(t){a&&e.writeFile(a,t)},compileAsm(e){this.reset();const i=l.y0.parse(e);if((0,n.ys)(i))return s.current({action:"setError",payload:(0,n._)(i)}),void(c=!1);const a=r.load((0,n.Ok)(i),e.split("\n").length);if((0,n.ys)(a))return s.current({action:"setError",payload:(0,n._)(a)}),void(c=!1);c=r.asm.instructions.length>0,t(""),s.current({action:"setError"}),s.current({action:"update"})},setAnimate(e){o=e},step:()=>(c&&(u=!0),r.step(i),(o||r.done)&&s.current({action:"update"}),r.done&&t("Translation done."),r.done),compare(){s.current({action:"compare"}),this.updateHighlight(i.resultHighlight?.start??0,!1),s.current({action:"update"})},updateHighlight(e,t){if(!h){for(const[s,r]of i.highlightMap)(t&&s.start<=e&&e<=s.end||!t&&r.start<=e&&e<=r.end)&&(i.sourceHighlight=s,i.resultHighlight=r);s.current({action:"update"})}},resetHighlightInfo(){i.sourceHighlight=void 0,i.resultHighlight=void 0,i.highlightMap.clear()},reset(){h=!1,t("Reset"),r.reset(),this.resetHighlightInfo(),s.current({action:"update"})},overrideState(e){if(this.resetHighlightInfo(),this.setAsm(e.asm,e.path),s.current({action:"setCmp",payload:{cmp:e.compare,name:e.compareName}}),e.translating)for(let t=0;t<=e.current;t++)this.step();s.current({action:"update"})}};return{initialState:{asm:"",path:void 0,translating:!1,current:-1,resultHighlight:void 0,sourceHighlight:void 0,symbols:[],result:"",compare:"",compareName:void 0,lineNumbers:[],compareError:!1},reducers:m,actions:g}}(t,e,s)),[e,s]),[o,m]=(0,u.A)(i,r);return s.current=m,{state:o,dispatch:s,actions:a}}var g=s(782),p=s(135);const v=({values:e=[],highlight:t=-1,onClick:s})=>(0,g.jsx)("div",{children:e.map(((e,r)=>(0,g.jsx)(f,{identifier:e.name,value:e.value,highlight:r===t,onClick:()=>s?.(e.name,e.value)},r)))}),f=({identifier:e,value:t,highlight:s=!1,onClick:r})=>(0,g.jsxs)("div",{style:{display:"flex",alignItems:"center"},onClick:r,children:[e.length>0&&(0,g.jsx)("code",{style:{flex:"1",...(0,p.Wf)("none"),...s?{background:"var(--mark-background-color)"}:{},whiteSpace:"pre",padding:"3px"},children:e}),t.length>0&&(0,g.jsx)("code",{style:{flex:"1",textAlign:"right",color:"black",padding:"3px",...(0,p.Wf)("none"),...s?{background:"var(--mark-background-color)"}:{}},children:t})]});var b=s(9547),x=s(1091),y=s(2675),j=s(4280),C=s(2144),H=s(8330),k=s(8029),A=s(3499);const S=()=>{const{state:e,actions:t,dispatch:s}=m(),{toolStates:n,filePicker:o,setTitle:u}=(0,c.useContext)(k.BR),d=(0,c.useRef)(0),p=(0,c.useRef)(0),f=(0,c.useRef)(),[S,w]=(0,c.useState)(!1);(0,c.useEffect)((()=>{var e;n.asmState&&(t.overrideState(n.asmState),n.asmState.path&&u(null!==(e=n.asmState.path.split("/").pop())&&void 0!==e?e:""))}),[]),(0,c.useEffect)((()=>{n.setAsmState(e)}),[e,n.setAsmState]),(0,c.useEffect)((()=>(f.current=new class extends x.M{async tick(){return d.current=0,p.current=0,t.step()}reset(){t.reset()}toggle(){}},w(!0),()=>{var e;null===(e=f.current)||void 0===e||e.stop()})),[t,s]);const N=(0,c.useRef)(null),R=(0,c.useRef)(null),{setStatus:E}=(0,c.useContext)(h.L),L=(e,t)=>{const s=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(s);N.current&&(N.current.href=r,N.current.download=t,N.current.click(),URL.revokeObjectURL(r))};return(0,g.jsxs)("div",{className:"AsmPage grid",children:[(0,g.jsx)(j.Z,{className:"source",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(r.x6,{id:"Source"})}),(0,g.jsx)("div",{className:"flex-1",children:S&&f.current&&(0,g.jsx)(i.T,{runner:f.current,disabled:void 0!=e.error,prefix:(0,g.jsx)("button",{className:"flex-0",onClick:async()=>{const e=await o.select(".asm");E(C.F),requestAnimationFrame((async()=>{var s;await t.loadAsm(e),E(""),u(null!==(s=e.split("/").pop())&&void 0!==s?s:"")}))},"data-tooltip":"Load file","data-placement":"bottom",children:"\ud83d\udcc2"}),overrideTooltips:{step:"Translate",run:"Translate all"},onSpeedChange:e=>{t.setAnimate(e<=2)}})}),(0,g.jsx)("fieldset",{role:"group",children:(0,g.jsx)("button",{"data-tooltip":"Download file","data-placement":"left",onClick:()=>{var t,s;return L(e.asm,null!==(t=null===(s=e.path)||void 0===s?void 0:s.split("/").pop())&&void 0!==t?t:"source.asm")},children:"Download"})})]}),children:(0,g.jsx)(y.K,{value:e.asm,error:e.error,alwaysRecenter:!1,onChange:e=>{t.setAsm(e)},onCursorPositionChange:e=>{e!=d.current&&(d.current=e,setTimeout((()=>{t.updateHighlight(e,!0)}),100))},grammar:l.y0.parser,language:"asm",highlight:e.translating?e.sourceHighlight:void 0,lineNumberTransform:t=>{if(!e.translating)return"";const s=e.lineNumbers[t];return(void 0===s?"":s).toString()}})}),(0,g.jsx)(j.Z,{className:"result",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(r.x6,{id:"Binary Code"})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("a",{ref:N,style:{display:"none"}}),(0,g.jsx)(H.N_,{ref:R,style:{display:"none"},to:A.Ay.cpu.href}),(0,g.jsxs)("fieldset",{role:"group",children:[(0,g.jsx)("button",{"data-tooltip":"Load to the CPU Emulator","data-placement":"bottom",onClick:async()=>{var t,s;const r=await(0,b.aU)(e.result);n.setCpuState(null===(t=e.path)||void 0===t?void 0:t.replace(".asm",".hack"),new a.n9(new Int16Array(r)),"bin"),null===(s=R.current)||void 0===s||s.click()},children:"\u21a9\ufe0f"}),(0,g.jsx)("button",{"data-tooltip":"Download translated file","data-placement":"left",onClick:()=>{var t,s,r;return L(e.result,null!==(t=null===(s=e.path)||void 0===s||null===(r=s.split("/").pop())||void 0===r?void 0:r.replace(".asm",".hack"))&&void 0!==t?t:"result.hack")},children:"Download"})]})]})]}),children:(0,g.jsx)(y.K,{value:e.result,highlight:e.resultHighlight,disabled:!0,onChange:function(e){},onCursorPositionChange:e=>{e!=p.current&&(p.current=e,t.updateHighlight(e,!1))},grammar:void 0,language:"",alwaysRecenter:!1,lineNumberTransform:e=>(e-1).toString()})}),(0,g.jsx)(j.Z,{className:"sym",header:(0,g.jsx)(r.x6,{id:"Symbol Table"}),children:e.translating&&(0,g.jsx)(v,{values:e.symbols})}),(0,g.jsx)(j.Z,{className:"compare",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(r.x6,{id:"Compare Code"}),e.compareName&&`: ${e.compareName}`]}),(0,g.jsx)("div",{children:(0,g.jsx)("fieldset",{role:"group",children:(0,g.jsx)("button",{onClick:()=>{t.compare()},children:"Compare"})})})]}),children:(0,g.jsx)(y.K,{value:e.compare,highlight:e.translating?e.resultHighlight:void 0,highlightType:e.compareError?"error":"highlight",alwaysRecenter:!1,onChange:function(e){s.current({action:"setCmp",payload:{cmp:e}})},onCursorPositionChange:e=>{e!=p.current&&(p.current=e,t.updateHighlight(e,!1))},language:"",lineNumberTransform:e=>(e-1).toString()})})]})},w=S}}]); \ No newline at end of file diff --git a/static/js/71.d0f0a1e6.chunk.js b/static/js/71.d0f0a1e6.chunk.js new file mode 100644 index 00000000..1f62d1c0 --- /dev/null +++ b/static/js/71.d0f0a1e6.chunk.js @@ -0,0 +1 @@ +"use strict";(globalThis.webpackChunk_nand2tetris_web=globalThis.webpackChunk_nand2tetris_web||[]).push([[71],{2745:(e,t,s)=>{s.r(t),s.d(t,{Asm:()=>A,default:()=>w});var r=s(4621),i=s(7022),n=s(5874),a=s(7076),l=s(4666),o=s(7844),c=s(8878),h=s(8177),u=s(3761);class d{asm={instructions:[]};current=-1;done=!1;symbols=[];variables=new Map;lines=[];lineNumbers=[];getResult(){return this.lines.join("\n")}load(e,t){this.symbols=[{name:"R0",value:"0"},{name:"R1",value:"1"},{name:"R2",value:"2"},{name:"...",value:""},{name:"R15",value:"15"},{name:"SCREEN",value:a.L7.toString()},{name:"KBD",value:a.ky.toString()}],this.variables.clear(),this.asm=e,(0,l.EU)(e,((e,t,s)=>{s?this.variables.set(t,{name:e,isHidden:!0}):this.symbols.push({name:e,value:t.toString()})})),e.instructions=e.instructions.filter((({type:e})=>"L"!==e)),this.resolveLineNumbers(t),this.reset()}resolveLineNumbers(e){this.lineNumbers=Array(e);let t=0;for(const s of this.asm.instructions)"A"!==s.type&&"C"!==s.type||void 0==s.span||(this.lineNumbers[s.span.line]=t,t+=1)}step(e){if(this.current>=this.asm.instructions.length-1)return;this.current+=1;const t=this.asm.instructions[this.current];if("A"===t.type||"C"===t.type){e.sourceHighlight=t.span;const s=(0,l.ld)(this.asm.instructions[this.current]);if(void 0===s)return;if(this.lines.push(`${(0,o.e5)(s)}`),e.resultHighlight={start:17*this.current,end:17*(this.current+1),line:-1},e.sourceHighlight&&e.highlightMap.set(e.sourceHighlight,e.resultHighlight),(0,l.J$)(t)){const e=this.variables.get(t.value);void 0!=e&&e.isHidden&&(this.symbols.push({name:e.name,value:t.value.toString()}),e.isHidden=!1)}this.current===this.asm.instructions.length-1&&(this.done=!0)}}resetSymbols(){for(const t of this.variables.values())t.isHidden=!0;const e=new Set(Array.from(this.variables.values()).map((e=>e.name)));this.symbols=this.symbols.filter((t=>!e.has(t.name)))}reset(){this.current=-1,this.lines=[],this.done=!1,this.resetSymbols()}}function m(){const{setStatus:e,fs:t}=(0,c.useContext)(u.L),s=(0,c.useRef)((()=>{})),{initialState:r,reducers:i,actions:a}=(0,c.useMemo)((()=>function(e,t,s){const r=new d,i={resultHighlight:void 0,sourceHighlight:void 0,highlightMap:new Map};let a,o=!0,c=!1,h=!1,u=!1;const m={setAsm(e,{asm:t,path:s}){e.asm=t,s&&(e.path=s)},setCmp(e,{cmp:s,name:r}){e.compare=s,e.compareName=r,t("Loaded compare file")},setError(e,s){s&&t(s.message),e.error=s},update(e){e.translating=h,e.current=r.current,e.result=r.getResult(),e.symbols=Array.from(r.symbols),e.lineNumbers=Array.from(r.lineNumbers),e.sourceHighlight=i.sourceHighlight,e.resultHighlight=i.resultHighlight,e.compareError=u},compare(e){const s=e.result.split("\n"),r=e.compare.split("\n").filter((e=>""!=e.trim()));if(s.length!=r.length)return u=!0,void t("Comparison failed - different lengths");for(let n=0;n{this.compileAsm(e)}))},saveAsm(t){a&&e.writeFile(a,t)},compileAsm(e){this.reset();const i=l.y0.parse(e);if((0,n.ys)(i))return s.current({action:"setError",payload:(0,n._)(i)}),void(c=!1);r.load((0,n.Ok)(i),e.split("\n").length),c=r.asm.instructions.length>0,t(""),s.current({action:"setError"}),s.current({action:"update"})},setAnimate(e){o=e},step:()=>(c&&(h=!0),r.step(i),(o||r.done)&&s.current({action:"update"}),r.done&&t("Translation done."),r.done),compare(){s.current({action:"compare"}),this.updateHighlight(i.resultHighlight?.start??0,!1),s.current({action:"update"})},updateHighlight(e,t){if(!u){for(const[s,r]of i.highlightMap)(t&&s.start<=e&&e<=s.end||!t&&r.start<=e&&e<=r.end)&&(i.sourceHighlight=s,i.resultHighlight=r);s.current({action:"update"})}},resetHighlightInfo(){i.sourceHighlight=void 0,i.resultHighlight=void 0,i.highlightMap.clear()},reset(){u=!1,h=!1,t("Reset"),r.reset(),this.resetHighlightInfo(),s.current({action:"update"})},overrideState(e){if(this.resetHighlightInfo(),this.setAsm(e.asm,e.path),s.current({action:"setCmp",payload:{cmp:e.compare,name:e.compareName}}),e.translating)for(let t=0;t<=e.current;t++)this.step();s.current({action:"update"})}};return{initialState:{asm:"",path:void 0,translating:!1,current:-1,resultHighlight:void 0,sourceHighlight:void 0,symbols:[],result:"",compare:"",compareName:void 0,lineNumbers:[],compareError:!1},reducers:m,actions:g}}(t,e,s)),[e,s]),[o,m]=(0,h.A)(i,r);return s.current=m,{state:o,dispatch:s,actions:a}}var g=s(782),p=s(135);const v=({values:e=[],highlight:t=-1,onClick:s})=>(0,g.jsx)("div",{children:e.map(((e,r)=>(0,g.jsx)(f,{identifier:e.name,value:e.value,highlight:r===t,onClick:()=>s?.(e.name,e.value)},r)))}),f=({identifier:e,value:t,highlight:s=!1,onClick:r})=>(0,g.jsxs)("div",{style:{display:"flex",alignItems:"center"},onClick:r,children:[e.length>0&&(0,g.jsx)("code",{style:{flex:"1",...(0,p.Wf)("none"),...s?{background:"var(--mark-background-color)"}:{},whiteSpace:"pre",padding:"3px"},children:e}),t.length>0&&(0,g.jsx)("code",{style:{flex:"1",textAlign:"right",color:"black",padding:"3px",...(0,p.Wf)("none"),...s?{background:"var(--mark-background-color)"}:{}},children:t})]});var x=s(9547),b=s(1091),y=s(2675),j=s(4280),C=s(2144),H=s(8330),k=s(8029),S=s(3499);const A=()=>{const{state:e,actions:t,dispatch:s}=m(),{toolStates:n,filePicker:o,setTitle:h}=(0,c.useContext)(k.BR),d=(0,c.useRef)(0),p=(0,c.useRef)(0),f=(0,c.useRef)(),[A,w]=(0,c.useState)(!1),[N,R]=(0,c.useState)(!0);(0,c.useEffect)((()=>{var e;n.asmState&&(t.overrideState(n.asmState),n.asmState.path&&h(null!==(e=n.asmState.path.split("/").pop())&&void 0!==e?e:""))}),[]),(0,c.useEffect)((()=>{n.setAsmState(e)}),[e,n.setAsmState]),(0,c.useEffect)((()=>(f.current=new class extends b.M{async tick(){return d.current=0,p.current=0,t.step()}reset(){t.reset()}toggle(){}},w(!0),()=>{var e;null===(e=f.current)||void 0===e||e.stop()})),[t,s]);const L=(0,c.useRef)(null),T=(0,c.useRef)(null),{setStatus:E}=(0,c.useContext)(u.L),F=(e,t)=>{const s=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(s);L.current&&(L.current.href=r,L.current.download=t,L.current.click(),URL.revokeObjectURL(r))};return(0,g.jsxs)("div",{className:"AsmPage grid "+(N?"":"hide-sym"),children:[(0,g.jsx)(j.Z,{className:"source",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(r.x6,{id:"Source"})}),(0,g.jsx)("div",{className:"flex-1",children:A&&f.current&&(0,g.jsx)(i.T,{runner:f.current,disabled:void 0!=e.error,prefix:(0,g.jsx)("button",{className:"flex-0",onClick:async()=>{const e=await o.select(".asm");E(C.F),requestAnimationFrame((async()=>{var s;await t.loadAsm(e),E(""),h(null!==(s=e.split("/").pop())&&void 0!==s?s:"")}))},"data-tooltip":"Load file","data-placement":"bottom",children:"\ud83d\udcc2"}),overrideTooltips:{step:"Translate",run:"Translate all"},onSpeedChange:e=>{t.setAnimate(e<=2)}})}),(0,g.jsx)("fieldset",{role:"group",children:(0,g.jsx)("button",{"data-tooltip":"Download file","data-placement":"left",onClick:()=>{var t,s;return F(e.asm,null!==(t=null===(s=e.path)||void 0===s?void 0:s.split("/").pop())&&void 0!==t?t:"source.asm")},children:"Download"})})]}),children:(0,g.jsx)(y.K,{value:e.asm,error:e.error,alwaysRecenter:!1,onChange:e=>{t.setAsm(e)},onCursorPositionChange:e=>{e!=d.current&&(d.current=e,setTimeout((()=>{t.updateHighlight(e,!0)}),100))},grammar:l.y0.parser,language:"asm",highlight:e.translating?e.sourceHighlight:void 0,lineNumberTransform:t=>{if(!e.translating)return"";const s=e.lineNumbers[t];return(void 0===s?"":s).toString()}})}),(0,g.jsx)(j.Z,{className:"result",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:(0,g.jsx)(r.x6,{id:"Binary Code"})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("a",{ref:L,style:{display:"none"}}),(0,g.jsx)(H.N_,{ref:T,style:{display:"none"},to:S.Ay.cpu.href}),(0,g.jsxs)("fieldset",{role:"group",children:[(0,g.jsx)("button",{"data-tooltip":"Load to the CPU Emulator","data-placement":"bottom",onClick:async()=>{var t,s;const r=await(0,x.aU)(e.result);n.setCpuState(null===(t=e.path)||void 0===t?void 0:t.replace(".asm",".hack"),new a.n9(new Int16Array(r)),"bin"),null===(s=T.current)||void 0===s||s.click()},children:"\u21a9\ufe0f"}),(0,g.jsx)("button",{"data-tooltip":"Download translated file","data-placement":"left",onClick:()=>{var t,s,r;return F(e.result,null!==(t=null===(s=e.path)||void 0===s||null===(r=s.split("/").pop())||void 0===r?void 0:r.replace(".asm",".hack"))&&void 0!==t?t:"result.hack")},children:"Download"})]})]})]}),children:(0,g.jsx)(y.K,{value:e.result,highlight:e.resultHighlight,disabled:!0,onChange:function(e){},onCursorPositionChange:e=>{e!=p.current&&(p.current=e,t.updateHighlight(e,!1))},grammar:void 0,language:"",alwaysRecenter:!1,lineNumberTransform:e=>(e-1).toString()})}),(0,g.jsx)(j.Z,{className:"sym",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"flex-1",children:(0,g.jsx)(r.x6,{id:"Symbol Table"})}),(0,g.jsx)("input",{type:"checkbox",role:"switch",checked:N,onChange:()=>R(!N)})]}),children:e.translating&&N&&(0,g.jsx)(v,{values:e.symbols})}),(0,g.jsx)(j.Z,{className:"compare",header:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{children:[(0,g.jsx)(r.x6,{id:"Compare Code"}),e.compareName&&`: ${e.compareName}`]}),(0,g.jsx)("div",{children:(0,g.jsx)("fieldset",{role:"group",children:(0,g.jsx)("button",{onClick:()=>{t.compare()},children:"Compare"})})})]}),children:(0,g.jsx)(y.K,{value:e.compare,highlight:e.translating?e.resultHighlight:void 0,highlightType:e.compareError?"error":"highlight",alwaysRecenter:!1,onChange:function(e){s.current({action:"setCmp",payload:{cmp:e}})},onCursorPositionChange:e=>{e!=p.current&&(p.current=e,t.updateHighlight(e,!1))},language:"",lineNumberTransform:e=>(e-1).toString()})})]})},w=A}}]); \ No newline at end of file diff --git a/static/js/main.144c663d.js b/static/js/main.a8a63237.js similarity index 99% rename from static/js/main.144c663d.js rename to static/js/main.a8a63237.js index 0c7c1bf0..e6d922e7 100644 --- a/static/js/main.144c663d.js +++ b/static/js/main.a8a63237.js @@ -1,2 +1,2 @@ -/*! For license information please see main.144c663d.js.LICENSE.txt */ -(()=>{var n={8029:(n,e,t)=>{"use strict";t.d(e,{BR:()=>l,Us:()=>u});var s=t(4544),r=t(8878),a=t(3508),M=t(6073),o=t(5270);function i(){const n=!0,[e,t]=(0,r.useState)(n),s=(0,r.useCallback)((n=>{t(!!n)}),[n]);return{canUse:n,wants:e,toggle:s}}function A(){const[n,e]=(0,r.useState)(),[t,s]=(0,r.useState)(),[a,M]=(0,r.useState)("asm"),[o,i]=(0,r.useState)(),[A,u]=(0,r.useState)();return{cpuState:{rom:n,path:t,format:a},setCpuState:(n,t,r)=>{s(n),e(t),M(r)},asmState:o,setAsmState:i,vmState:A,setVmState:u}}function u(n=new s.Q2){const[e,t]=(0,r.useState)("system"),[u,l]=(0,r.useState)();return{monaco:i(),settings:(0,a.s)(),filePicker:(0,M.g3)(),tracking:(0,o.z1)(),theme:e,setTheme:t,toolStates:A(),title:u,setTitle:l}}const l=(0,r.createContext)({monaco:{canUse:!0,wants:!0,toggle(){}},filePicker:{close(){},open(){},select:()=>Promise.reject(""),isOpen:!1,suffix:void 0},settings:{close(){},open(){},isOpen:!1},tracking:{canTrack:!1,haveAsked:!1,accept(){},reject(){},trackEvent(){},trackPage(){}},theme:"system",setTheme(){},title:void 0,setTitle(){},toolStates:{cpuState:{rom:void 0,path:void 0,format:"asm"},setCpuState(){},asmState:{asm:"",path:void 0,translating:!1,current:-1,resultHighlight:void 0,sourceHighlight:void 0,symbols:[],result:"",compare:"",compareName:void 0,lineNumbers:[],compareError:!1},setAsmState(){},vmState:void 0,setVmState(){}}})},3015:(n,e,t)=>{"use strict";t.d(e,{I:()=>r});var s=t(782);const r=({name:n})=>(0,s.jsx)("span",{className:"material-symbols-outlined",children:n})},3508:(n,e,t)=>{"use strict";t.d(e,{s:()=>r});var s=t(8878);function r(){const[n,e]=(0,s.useState)(!1);return{isOpen:n,open(){e(!0)},close(){e(!1)}}}},6073:(n,e,t)=>{"use strict";t.d(e,{Nk:()=>f,g3:()=>c});var s=t(4621),r=t(3761),a=t(5608),M=t.n(a),o=t(8878),i=t(8029),A=t(3015),u=t(3508),l=t(782);const D="file selected";function c(){const n=(0,u.s)(),[e,t]=(0,o.useState)(),[s,r]=(0,o.useState)(!1),a=(0,o.useRef)(),M=(0,o.useCallback)((async(e,s=!1)=>("string"===typeof e&&(e=[e]),t(e),r(s),n.open(),new Promise((n=>{a.current=n})))),[n,a]);return{...n,select:M,[D]:a,suffix:e,allowFolders:s}}const d=({onClick:n,onDoubleClick:e,stats:t,highlighted:s=!1,disabled:r=!1})=>(0,l.jsx)("div",{children:(0,l.jsxs)("button",{className:"flex row justify-start outline "+(s?"":"secondary"),style:{textAlign:"left",color:r?"var(--light-grey)":void 0},onClick:t=>{1==t.detail?null===n||void 0===n||n():2==t.detail&&(null===e||void 0===e||e())},children:[(0,l.jsx)(A.I,{name:t.isDirectory()?"folder":"draft"}),t.name]})});async function p(n,e,t){for(const s of await e.scandir(t))if(s.isDirectory()){const r=n.folder(s.name);r&&await p(r,e,`${t}/${s.name}`)}else n.file(s.name,await e.readFile(`${t}/${s.name}`))}function S(n,e){return e.map((e=>n.endsWith(e))).reduce(((n,e)=>n||e),!1)}const f=()=>{const{fs:n,setStatus:e}=(0,o.useContext)(r.L),{filePicker:t}=(0,o.useContext)(i.BR),[a,A]=(0,o.useState)([]),[u,c]=(0,o.useState)(""),f=n.cwd();(0,o.useEffect)((()=>{"/"==n.cwd()&&h("projects")}),[n]),(0,o.useEffect)((()=>{n.scandir(n.cwd()).then((n=>{A(n)}))}),[n,f,A]);const h=(0,o.useCallback)((e=>{n.cd(e),n.scandir(n.cwd()).then((n=>{A(n)}))}),[n,c,A]),P=(0,o.useCallback)((e=>{c(`${"/"==n.cwd()?"":n.cwd()}/${e}`)}),[c]),m=(0,o.useCallback)((()=>{var n,e;t.close(),null===(n=(e=t[D]).current)||void 0===n||n.call(e,u)}),[u,t,e]),R=(0,o.useRef)(null);return(0,l.jsx)("dialog",{open:t.isOpen,children:(0,l.jsxs)("article",{className:"file-select flex",children:[(0,l.jsxs)("header",{children:[(0,l.jsx)("p",{children:(0,l.jsx)(s.x6,{id:"Choose file"})}),(0,l.jsx)("a",{style:{color:"rgba(0, 0, 0, 0)"},className:"close",href:"#root",onClick:n=>{n.preventDefault(),t.close()},children:"close"})]}),(0,l.jsxs)("main",{children:[(0,l.jsx)("a",{ref:R,style:{display:"none"}}),(0,l.jsx)("div",{children:(0,l.jsx)("b",{children:n.cwd()})}),"/"!==n.cwd()&&(0,l.jsx)(d,{stats:{isDirectory:()=>!0,isFile:()=>!1,name:".."},onDoubleClick:()=>h("..")}),a.map((n=>(0,l.jsx)(d,{stats:n,highlighted:n.name===u.split("/").pop(),onClick:()=>P(n.name),onDoubleClick:()=>{n.isDirectory()&&h(n.name)},disabled:n.name.includes(".")&&void 0!=t.suffix&&!S(n.name,t.suffix)},n.name)))]}),(0,l.jsxs)("footer",{children:[(0,l.jsx)("button",{disabled:!u||".."==u||void 0!=t.suffix&&u.includes(".")&&!S(u,t.suffix)||!t.allowFolders&&!u.includes("."),onClick:m,children:"Select"}),(0,l.jsx)("button",{onClick:async()=>{var e;if(!R.current)return;const t=new(M());await p(t,n,u);const s=await t.generateAsync({type:"blob"}),r=URL.createObjectURL(s);R.current.href=r,R.current.download=null!==(e=u.split("/").pop())&&void 0!==e?e:u,R.current.click(),URL.revokeObjectURL(r)},"data-tooltip":"Download all files in this folder into a zip",disabled:""==u||u.includes("."),children:"Download"})]})]})})}},5270:(n,e,t)=>{"use strict";t.d(e,{w:()=>S,dQ:()=>f,z1:()=>p});var s=t(1092),r=t(2469),a=t(8878),M=t(782);const o="/tracking/canTrack",i="yes",A="no",u="",l=[i,A];let D=!1;function c(n){s.Ay.send({hitType:"pageview",page:n})}function d(n,e,t,a){var M,o;if(D)return;const i="string"===typeof n?{category:n,action:(0,r.Z1)(e),label:t&&a?{label:t,value:a}:void 0}:n;s.Ay.event({category:i.category,action:i.action,nonInteraction:!i.interaction,label:null===(M=i.label)||void 0===M?void 0:M.label,value:null===(o=i.label)||void 0===o?void 0:o.value})}function p(){var n;const e=null!==(n=localStorage[o])&&void 0!==n?n:u,[t,r]=(0,a.useState)(e===i),[M,p]=(0,a.useState)(l.includes(e)||"1"===navigator.doNotTrack);return{canTrack:t,haveAsked:M,accept:(0,a.useCallback)((()=>{localStorage[o]=i,r(!0),p(!0),function(){var n;s.Ay.initialize(null!==(n={NODE_ENV:"production",PUBLIC_URL:"/web-ide",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.GA4_ID)&&void 0!==n?n:"G-0VTR5BJFQP"),s.Ay.send("pageview")}()}),[r,p]),reject:(0,a.useCallback)((()=>{localStorage[o]=A,r(!1),p(!0),D=!0}),[r,p]),trackEvent:d,trackPage:c}}function S(){const{accept:n,reject:e,haveAsked:t}=p(),[s,r]=(0,a.useState)(!t),o=(0,a.useCallback)((()=>{r(!1)}),[r]),i=(0,a.useCallback)((()=>{n(),o()}),[n,o]),A=(0,a.useCallback)((()=>{e(),o()}),[e,o]);return(0,M.jsx)(M.Fragment,{children:s&&(0,M.jsxs)("div",{id:"trackingBanner",className:"flex row",children:[(0,M.jsx)("div",{className:"flex-1",children:(0,M.jsx)(f,{})}),(0,M.jsxs)("div",{children:[(0,M.jsx)("a",{href:"#reject",role:"button",className:"reject",onClick:A,children:"Reject"}),(0,M.jsx)("a",{href:"#accept",role:"button",className:"accept",onClick:i,children:"Accept"}),(0,M.jsx)("a",{href:"#close",role:"button",className:"close secondary",onClick:o,children:"\ud835\uddb7"})]})]})})}function f(){return(0,M.jsxs)("p",{style:{margin:0},children:["This site uses Google Analytics to gather information that will improve the user experience. This only includes anonymous interaction data, and never shares your code."," ",(0,M.jsx)("a",{href:"www.google.com/policies/privacy/partners/",children:"How Google uses data."})]})}},3499:(n,e,t)=>{"use strict";t.d(e,{Ay:()=>S,It:()=>p,p3:()=>d});var s=t(8878),r=t(782);const a=(0,s.lazy)((()=>Promise.all([t.e(92),t.e(233),t.e(700),t.e(200),t.e(840)]).then(t.bind(t,2632)))),M=(0,s.lazy)((()=>Promise.all([t.e(92),t.e(233),t.e(700),t.e(200),t.e(19)]).then(t.bind(t,445)))),o=(0,s.lazy)((()=>Promise.all([t.e(92),t.e(233),t.e(700),t.e(71)]).then(t.bind(t,2745)))),i=(0,s.lazy)((()=>t.e(323).then(t.bind(t,1323)))),A=(0,s.lazy)((()=>Promise.all([t.e(92),t.e(233),t.e(700),t.e(200),t.e(101)]).then(t.bind(t,1155)))),u=(0,s.lazy)((()=>Promise.all([t.e(92),t.e(131)]).then(t.bind(t,5131)))),l=(0,s.lazy)((()=>t.e(408).then(t.bind(t,2408)))),D=(0,s.lazy)((()=>Promise.all([t.e(263),t.e(417)]).then(t.bind(t,2417)))),c=(0,s.lazy)((()=>Promise.all([t.e(263),t.e(539)]).then(t.bind(t,5539)))),d="lastRoute",p={chip:"Hardware Simulator",cpu:"CPU Emulator",asm:"Assembler",vm:"VM Emulator",bitmap:"Bitmap Editor",compiler:"Jack Compiler"},S={chip:{href:"/chip",tool:"chip",target:(0,r.jsx)(a,{})},cpu:{href:"/cpu",tool:"cpu",target:(0,r.jsx)(M,{})},asm:{href:"/asm",tool:"asm",target:(0,r.jsx)(o,{})},vm:{href:"/vm",tool:"vm",target:(0,r.jsx)(A,{})},compiler:{href:"/compiler",tool:"compiler",target:(0,r.jsx)(u,{})},bitmap:{href:"/bitmap",tool:"bitmap",target:(0,r.jsx)(i,{})},util:{href:"/util",target:(0,r.jsx)(l,{})},chipGuide:{href:"/chip_guide",target:(0,r.jsx)(D,{})},about:{href:"/about",target:(0,r.jsx)(c,{})},placeholder:{href:"/placeholder",target:(0,r.jsx)("span",{children:"To be added later"})}}},1642:(n,e,t)=>{"use strict";function s(){return s=Object.assign?Object.assign.bind():function(n){for(var e=1;el,Gh:()=>B,HS:()=>x,Oi:()=>o,Rr:()=>D,pX:()=>z,pb:()=>L,rc:()=>r,tH:()=>N,ue:()=>p,yD:()=>C,zR:()=>M}),function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"}(r||(r={}));const a="popstate";function M(n){return void 0===n&&(n={}),c((function(n,e){let{pathname:t,search:s,hash:r}=n.location;return u("",{pathname:t,search:s,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(n,e){return"string"===typeof e?e:l(e)}),null,n)}function o(n,e){if(!1===n||null===n||"undefined"===typeof n)throw new Error(e)}function i(n,e){if(!n){"undefined"!==typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function A(n,e){return{usr:n.state,key:n.key,idx:e}}function u(n,e,t,r){return void 0===t&&(t=null),s({pathname:"string"===typeof n?n:n.pathname,search:"",hash:""},"string"===typeof e?D(e):e,{state:t,key:e&&e.key||r||Math.random().toString(36).substr(2,8)})}function l(n){let{pathname:e="/",search:t="",hash:s=""}=n;return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),s&&"#"!==s&&(e+="#"===s.charAt(0)?s:"#"+s),e}function D(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let s=n.indexOf("?");s>=0&&(e.search=n.substr(s),n=n.substr(0,s)),n&&(e.pathname=n)}return e}function c(n,e,t,M){void 0===M&&(M={});let{window:i=document.defaultView,v5Compat:D=!1}=M,c=i.history,d=r.Pop,p=null,S=f();function f(){return(c.state||{idx:null}).idx}function h(){d=r.Pop;let n=f(),e=null==n?null:n-S;S=n,p&&p({action:d,location:m.location,delta:e})}function P(n){let e="null"!==i.location.origin?i.location.origin:i.location.href,t="string"===typeof n?n:l(n);return t=t.replace(/ $/,"%20"),o(e,"No window.location.(origin|href) available to create URL for href: "+t),new URL(t,e)}null==S&&(S=0,c.replaceState(s({},c.state,{idx:S}),""));let m={get action(){return d},get location(){return n(i,c)},listen(n){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(a,h),p=n,()=>{i.removeEventListener(a,h),p=null}},createHref:n=>e(i,n),createURL:P,encodeLocation(n){let e=P(n);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(n,e){d=r.Push;let s=u(m.location,n,e);t&&t(s,n),S=f()+1;let a=A(s,S),M=m.createHref(s);try{c.pushState(a,"",M)}catch(o){if(o instanceof DOMException&&"DataCloneError"===o.name)throw o;i.location.assign(M)}D&&p&&p({action:d,location:m.location,delta:1})},replace:function(n,e){d=r.Replace;let s=u(m.location,n,e);t&&t(s,n),S=f();let a=A(s,S),M=m.createHref(s);c.replaceState(a,"",M),D&&p&&p({action:d,location:m.location,delta:0})},go:n=>c.go(n)};return m}var d;!function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"}(d||(d={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function p(n,e,t){void 0===t&&(t="/");let s=L(("string"===typeof e?D(e):e).pathname||"/",t);if(null==s)return null;let r=S(n);!function(n){n.sort(((n,e)=>n.score!==e.score?e.score-n.score:function(n,e){let t=n.length===e.length&&n.slice(0,-1).every(((n,t)=>n===e[t]));return t?n[n.length-1]-e[e.length-1]:0}(n.routesMeta.map((n=>n.childrenIndex)),e.routesMeta.map((n=>n.childrenIndex)))))}(r);let a=null;for(let M=0;null==a&&M{let M={relativePath:void 0===a?n.path||"":a,caseSensitive:!0===n.caseSensitive,childrenIndex:r,route:n};M.relativePath.startsWith("/")&&(o(M.relativePath.startsWith(s),'Absolute route path "'+M.relativePath+'" nested under path "'+s+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),M.relativePath=M.relativePath.slice(s.length));let i=x([s,M.relativePath]),A=t.concat(M);n.children&&n.children.length>0&&(o(!0!==n.index,'Index routes must not have child routes. Please remove all child routes from route path "'+i+'".'),S(n.children,e,A,i)),(null!=n.path||n.index)&&e.push({path:i,score:y(i,n.index),routesMeta:A})};return n.forEach(((n,e)=>{var t;if(""!==n.path&&null!=(t=n.path)&&t.includes("?"))for(let s of f(n.path))r(n,e,s);else r(n,e)})),e}function f(n){let e=n.split("/");if(0===e.length)return[];let[t,...s]=e,r=t.endsWith("?"),a=t.replace(/\?$/,"");if(0===s.length)return r?[a,""]:[a];let M=f(s.join("/")),o=[];return o.push(...M.map((n=>""===n?a:[a,n].join("/")))),r&&o.push(...M),o.map((e=>n.startsWith("/")&&""===e?"/":e))}const h=/^:[\w-]+$/,P=3,m=2,R=1,_=10,v=-2,g=n=>"*"===n;function y(n,e){let t=n.split("/"),s=t.length;return t.some(g)&&(s+=v),e&&(s+=m),t.filter((n=>!g(n))).reduce(((n,e)=>n+(h.test(e)?P:""===e?R:_)),s)}function k(n,e){let{routesMeta:t}=n,s={},r="/",a=[];for(let M=0;M(s.push({paramName:e,isOptional:null!=t}),t?"/?([^\\/]+)?":"/([^\\/]+)")));n.endsWith("*")?(s.push({paramName:"*"}),r+="*"===n||"/*"===n?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":""!==n&&"/"!==n&&(r+="(?:(?=\\/|$))");let a=new RegExp(r,e?void 0:"i");return[a,s]}(n.path,n.caseSensitive,n.end),r=e.match(t);if(!r)return null;let a=r[0],M=a.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:s.reduce(((n,e,t)=>{let{paramName:s,isOptional:r}=e;if("*"===s){let n=o[t]||"";M=a.slice(0,a.length-n.length).replace(/(.)\/+$/,"$1")}const i=o[t];return n[s]=r&&!i?void 0:(i||"").replace(/%2F/g,"/"),n}),{}),pathname:a,pathnameBase:M,pattern:n}}function T(n){try{return n.split("/").map((n=>decodeURIComponent(n).replace(/\//g,"%2F"))).join("/")}catch(e){return i(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),n}}function L(n,e){if("/"===e)return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,s=n.charAt(t);return s&&"/"!==s?null:n.slice(t)||"/"}function b(n,e,t,s){return"Cannot include a '"+n+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(s)+"]. Please separate it out to the `to."+t+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function w(n){return n.filter(((n,e)=>0===e||n.route.path&&n.route.path.length>0))}function C(n,e){let t=w(n);return e?t.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):t.map((n=>n.pathnameBase))}function B(n,e,t,r){let a;void 0===r&&(r=!1),"string"===typeof n?a=D(n):(a=s({},n),o(!a.pathname||!a.pathname.includes("?"),b("?","pathname","search",a)),o(!a.pathname||!a.pathname.includes("#"),b("#","pathname","hash",a)),o(!a.search||!a.search.includes("#"),b("#","search","hash",a)));let M,i=""===n||""===a.pathname,A=i?"/":a.pathname;if(null==A)M=t;else{let n=e.length-1;if(!r&&A.startsWith("..")){let e=A.split("/");for(;".."===e[0];)e.shift(),n-=1;a.pathname=e.join("/")}M=n>=0?e[n]:"/"}let u=function(n,e){void 0===e&&(e="/");let{pathname:t,search:s="",hash:r=""}="string"===typeof n?D(n):n,a=t?t.startsWith("/")?t:function(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach((n=>{".."===n?t.length>1&&t.pop():"."!==n&&t.push(n)})),t.length>1?t.join("/"):"/"}(t,e):e;return{pathname:a,search:J(s),hash:O(r)}}(a,M),l=A&&"/"!==A&&A.endsWith("/"),c=(i||"."===A)&&t.endsWith("/");return u.pathname.endsWith("/")||!l&&!c||(u.pathname+="/"),u}const x=n=>n.join("/").replace(/\/\/+/g,"/"),I=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),J=n=>n&&"?"!==n?n.startsWith("?")?n:"?"+n:"",O=n=>n&&"#"!==n?n.startsWith("#")?n:"#"+n:"";class N extends Error{}function z(n){return null!=n&&"number"===typeof n.status&&"string"===typeof n.statusText&&"boolean"===typeof n.internal&&"data"in n}const $=["post","put","patch","delete"],H=(new Set($),["get",...$]);new Set(H),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},5608:(n,e,t)=>{n.exports=function n(e,t,s){function r(M,o){if(!t[M]){if(!e[M]){if(a)return a(M,!0);var i=new Error("Cannot find module '"+M+"'");throw i.code="MODULE_NOT_FOUND",i}var A=t[M]={exports:{}};e[M][0].call(A.exports,(function(n){return r(e[M][1][n]||n)}),A,A.exports,n,e,t,s)}return t[M].exports}for(var a=void 0,M=0;M>2,o=(3&e)<<4|t>>4,i=1>6:64,A=2>4,t=(15&M)<<4|(o=a.indexOf(n.charAt(A++)))>>2,s=(3&o)<<6|(i=a.indexOf(n.charAt(A++))),D[u++]=e,64!==o&&(D[u++]=t),64!==i&&(D[u++]=s);return D}},{"./support":30,"./utils":32}],2:[function(n,e,t){"use strict";var s=n("./external"),r=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),M=n("./stream/DataLengthProbe");function o(n,e,t,s,r){this.compressedSize=n,this.uncompressedSize=e,this.crc32=t,this.compression=s,this.compressedContent=r}o.prototype={getContentWorker:function(){var n=new r(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new M("data_length")),e=this;return n.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),n},getCompressedWorker:function(){return new r(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(n,e,t){return n.pipe(new a).pipe(new M("uncompressedSize")).pipe(e.compressWorker(t)).pipe(new M("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,e,t){"use strict";var s=n("./stream/GenericWorker");t.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},t.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,e,t){"use strict";var s=n("./utils"),r=function(){for(var n,e=[],t=0;t<256;t++){n=t;for(var s=0;s<8;s++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();e.exports=function(n,e){return void 0!==n&&n.length?"string"!==s.getTypeOf(n)?function(n,e,t,s){var a=r,M=s+t;n^=-1;for(var o=s;o>>8^a[255&(n^e[o])];return~n}(0|e,n,n.length,0):function(n,e,t,s){var a=r,M=s+t;n^=-1;for(var o=s;o>>8^a[255&(n^e.charCodeAt(o))];return~n}(0|e,n,n.length,0):0}},{"./utils":32}],5:[function(n,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(n,e,t){"use strict";var s=null;s="undefined"!=typeof Promise?Promise:n("lie"),e.exports={Promise:s}},{lie:37}],7:[function(n,e,t){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=n("pako"),a=n("./utils"),M=n("./stream/GenericWorker"),o=s?"uint8array":"array";function i(n,e){M.call(this,"FlateWorker/"+n),this._pako=null,this._pakoAction=n,this._pakoOptions=e,this.meta={}}t.magic="\b\0",a.inherits(i,M),i.prototype.processChunk=function(n){this.meta=n.meta,null===this._pako&&this._createPako(),this._pako.push(a.transformTo(o,n.data),!1)},i.prototype.flush=function(){M.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},i.prototype.cleanUp=function(){M.prototype.cleanUp.call(this),this._pako=null},i.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var n=this;this._pako.onData=function(e){n.push({data:e,meta:n.meta})}},t.compressWorker=function(n){return new i("Deflate",n)},t.uncompressWorker=function(){return new i("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,e,t){"use strict";function s(n,e){var t,s="";for(t=0;t>>=8;return s}function r(n,e,t,r,M,u){var l,D,c=n.file,d=n.compression,p=u!==o.utf8encode,S=a.transformTo("string",u(c.name)),f=a.transformTo("string",o.utf8encode(c.name)),h=c.comment,P=a.transformTo("string",u(h)),m=a.transformTo("string",o.utf8encode(h)),R=f.length!==c.name.length,_=m.length!==h.length,v="",g="",y="",k=c.dir,E=c.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!t||(T.crc32=n.crc32,T.compressedSize=n.compressedSize,T.uncompressedSize=n.uncompressedSize);var L=0;e&&(L|=8),p||!R&&!_||(L|=2048);var b=0,w=0;k&&(b|=16),"UNIX"===M?(w=798,b|=function(n,e){var t=n;return n||(t=e?16893:33204),(65535&t)<<16}(c.unixPermissions,k)):(w=20,b|=function(n){return 63&(n||0)}(c.dosPermissions)),l=E.getUTCHours(),l<<=6,l|=E.getUTCMinutes(),l<<=5,l|=E.getUTCSeconds()/2,D=E.getUTCFullYear()-1980,D<<=4,D|=E.getUTCMonth()+1,D<<=5,D|=E.getUTCDate(),R&&(g=s(1,1)+s(i(S),4)+f,v+="up"+s(g.length,2)+g),_&&(y=s(1,1)+s(i(P),4)+m,v+="uc"+s(y.length,2)+y);var C="";return C+="\n\0",C+=s(L,2),C+=d.magic,C+=s(l,2),C+=s(D,2),C+=s(T.crc32,4),C+=s(T.compressedSize,4),C+=s(T.uncompressedSize,4),C+=s(S.length,2),C+=s(v.length,2),{fileRecord:A.LOCAL_FILE_HEADER+C+S+v,dirRecord:A.CENTRAL_FILE_HEADER+s(w,2)+C+s(P.length,2)+"\0\0\0\0"+s(b,4)+s(r,4)+S+v+P}}var a=n("../utils"),M=n("../stream/GenericWorker"),o=n("../utf8"),i=n("../crc32"),A=n("../signature");function u(n,e,t,s){M.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=t,this.encodeFileName=s,this.streamFiles=n,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,M),u.prototype.push=function(n){var e=n.meta.percent||0,t=this.entriesCount,s=this._sources.length;this.accumulate?this.contentBuffer.push(n):(this.bytesWritten+=n.data.length,M.prototype.push.call(this,{data:n.data,meta:{currentFile:this.currentFile,percent:t?(e+100*(t-s-1))/t:100}}))},u.prototype.openedSource=function(n){this.currentSourceOffset=this.bytesWritten,this.currentFile=n.file.name;var e=this.streamFiles&&!n.file.dir;if(e){var t=r(n,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(n){this.accumulate=!1;var e=this.streamFiles&&!n.file.dir,t=r(n,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),e)this.push({data:function(n){return A.DATA_DESCRIPTOR+s(n.crc32,4)+s(n.compressedSize,4)+s(n.uncompressedSize,4)}(n),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var n=this.bytesWritten,e=0;e=this.index;e--)t=(t<<8)+this.byteAt(e);return this.index+=n,t},readString:function(n){return s.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},e.exports=r},{"../utils":32}],19:[function(n,e,t){"use strict";var s=n("./Uint8ArrayReader");function r(n){s.call(this,n)}n("../utils").inherits(r,s),r.prototype.readData=function(n){this.checkOffset(n);var e=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,e},e.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,e,t){"use strict";var s=n("./DataReader");function r(n){s.call(this,n)}n("../utils").inherits(r,s),r.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},r.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},r.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},r.prototype.readData=function(n){this.checkOffset(n);var e=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,e},e.exports=r},{"../utils":32,"./DataReader":18}],21:[function(n,e,t){"use strict";var s=n("./ArrayReader");function r(n){s.call(this,n)}n("../utils").inherits(r,s),r.prototype.readData=function(n){if(this.checkOffset(n),0===n)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,e},e.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(n,e,t){"use strict";var s=n("../utils"),r=n("../support"),a=n("./ArrayReader"),M=n("./StringReader"),o=n("./NodeBufferReader"),i=n("./Uint8ArrayReader");e.exports=function(n){var e=s.getTypeOf(n);return s.checkSupport(e),"string"!==e||r.uint8array?"nodebuffer"===e?new o(n):r.uint8array?new i(s.transformTo("uint8array",n)):new a(s.transformTo("array",n)):new M(n)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,e,t){"use strict";t.LOCAL_FILE_HEADER="PK\x03\x04",t.CENTRAL_FILE_HEADER="PK\x01\x02",t.CENTRAL_DIRECTORY_END="PK\x05\x06",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",t.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",t.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,e,t){"use strict";var s=n("./GenericWorker"),r=n("../utils");function a(n){s.call(this,"ConvertWorker to "+n),this.destType=n}r.inherits(a,s),a.prototype.processChunk=function(n){this.push({data:r.transformTo(this.destType,n.data),meta:n.meta})},e.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,e,t){"use strict";var s=n("./GenericWorker"),r=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(n){this.streamInfo.crc32=r(n.data,this.streamInfo.crc32||0),this.push(n)},e.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,e,t){"use strict";var s=n("../utils"),r=n("./GenericWorker");function a(n){r.call(this,"DataLengthProbe for "+n),this.propName=n,this.withStreamInfo(n,0)}s.inherits(a,r),a.prototype.processChunk=function(n){if(n){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+n.data.length}r.prototype.processChunk.call(this,n)},e.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,e,t){"use strict";var s=n("../utils"),r=n("./GenericWorker");function a(n){r.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,n.then((function(n){e.dataIsReady=!0,e.data=n,e.max=n&&n.length||0,e.type=s.getTypeOf(n),e.isPaused||e._tickAndRepeat()}),(function(n){e.error(n)}))}s.inherits(a,r),a.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var n=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":n=this.data.substring(this.index,e);break;case"uint8array":n=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":n=this.data.slice(this.index,e)}return this.index=e,this.push({data:n,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,e,t){"use strict";function s(n){this.name=n||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){return!this.isFinished&&(this.isPaused?this.generatedError=n:(this.isFinished=!0,this.emit("error",n),this.previous&&this.previous.error(n),this.cleanUp()),!0)},on:function(n,e){return this._listeners[n].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(n,e){if(this._listeners[n])for(var t=0;t "+n:n}},e.exports=s},{}],29:[function(n,e,t){"use strict";var s=n("../utils"),r=n("./ConvertWorker"),a=n("./GenericWorker"),M=n("../base64"),o=n("../support"),i=n("../external"),A=null;if(o.nodestream)try{A=n("../nodejs/NodejsStreamOutputAdapter")}catch(n){}function u(n,e){return new i.Promise((function(t,r){var a=[],o=n._internalType,i=n._outputType,A=n._mimeType;n.on("data",(function(n,t){a.push(n),e&&e(t)})).on("error",(function(n){a=[],r(n)})).on("end",(function(){try{var n=function(n,e,t){switch(n){case"blob":return s.newBlob(s.transformTo("arraybuffer",e),t);case"base64":return M.encode(e);default:return s.transformTo(n,e)}}(i,function(n,e){var t,s=0,r=null,a=0;for(t=0;t>>6:(t<65536?e[M++]=224|t>>>12:(e[M++]=240|t>>>18,e[M++]=128|t>>>12&63),e[M++]=128|t>>>6&63),e[M++]=128|63&t);return e}(n)},t.utf8decode=function(n){return r.nodebuffer?s.transformTo("nodebuffer",n).toString("utf-8"):function(n){var e,t,r,a,M=n.length,i=new Array(2*M);for(e=t=0;e>10&1023,i[t++]=56320|1023&r)}return i.length!==t&&(i.subarray?i=i.subarray(0,t):i.length=t),s.applyFromCharCode(i)}(n=s.transformTo(r.uint8array?"uint8array":"array",n))},s.inherits(A,M),A.prototype.processChunk=function(n){var e=s.transformTo(r.uint8array?"uint8array":"array",n.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var a=e;(e=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),e.set(a,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var M=function(n,e){var t;for((e=e||n.length)>n.length&&(e=n.length),t=e-1;0<=t&&128==(192&n[t]);)t--;return t<0||0===t?e:t+o[n[t]]>e?t:e}(e),i=e;M!==e.length&&(r.uint8array?(i=e.subarray(0,M),this.leftOver=e.subarray(M,e.length)):(i=e.slice(0,M),this.leftOver=e.slice(M,e.length))),this.push({data:t.utf8decode(i),meta:n.meta})},A.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=A,s.inherits(u,M),u.prototype.processChunk=function(n){this.push({data:t.utf8encode(n.data),meta:n.meta})},t.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,e,t){"use strict";var s=n("./support"),r=n("./base64"),a=n("./nodejsUtils"),M=n("./external");function o(n){return n}function i(n,e){for(var t=0;t>8;this.dir=!!(16&this.externalFileAttributes),0==n&&(this.dosPermissions=63&this.externalFileAttributes),3==n&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var n=s(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=n.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=n.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=n.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=n.readInt(4))}},readExtraFields:function(n){var e,t,s,r=n.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});n.index+4>>6:(t<65536?e[M++]=224|t>>>12:(e[M++]=240|t>>>18,e[M++]=128|t>>>12&63),e[M++]=128|t>>>6&63),e[M++]=128|63&t);return e},t.buf2binstring=function(n){return i(n,n.length)},t.binstring2buf=function(n){for(var e=new s.Buf8(n.length),t=0,r=e.length;t>10&1023,A[s++]=56320|1023&r)}return i(A,s)},t.utf8border=function(n,e){var t;for((e=e||n.length)>n.length&&(e=n.length),t=e-1;0<=t&&128==(192&n[t]);)t--;return t<0||0===t?e:t+M[n[t]]>e?t:e}},{"./common":41}],43:[function(n,e,t){"use strict";e.exports=function(n,e,t,s){for(var r=65535&n,a=n>>>16&65535,M=0;0!==t;){for(t-=M=2e3>>1:n>>>1;e[t]=n}return e}();e.exports=function(n,e,t,r){var a=s,M=r+t;n^=-1;for(var o=r;o>>8^a[255&(n^e[o])];return~n}},{}],46:[function(n,e,t){"use strict";var s,r=n("../utils/common"),a=n("./trees"),M=n("./adler32"),o=n("./crc32"),i=n("./messages"),A=0,u=4,l=0,D=-2,c=-1,d=4,p=2,S=8,f=9,h=286,P=30,m=19,R=2*h+1,_=15,v=3,g=258,y=g+v+1,k=42,E=113,T=1,L=2,b=3,w=4;function C(n,e){return n.msg=i[e],e}function B(n){return(n<<1)-(4n.avail_out&&(t=n.avail_out),0!==t&&(r.arraySet(n.output,e.pending_buf,e.pending_out,t,n.next_out),n.next_out+=t,e.pending_out+=t,n.total_out+=t,n.avail_out-=t,e.pending-=t,0===e.pending&&(e.pending_out=0))}function J(n,e){a._tr_flush_block(n,0<=n.block_start?n.block_start:-1,n.strstart-n.block_start,e),n.block_start=n.strstart,I(n.strm)}function O(n,e){n.pending_buf[n.pending++]=e}function N(n,e){n.pending_buf[n.pending++]=e>>>8&255,n.pending_buf[n.pending++]=255&e}function z(n,e){var t,s,r=n.max_chain_length,a=n.strstart,M=n.prev_length,o=n.nice_match,i=n.strstart>n.w_size-y?n.strstart-(n.w_size-y):0,A=n.window,u=n.w_mask,l=n.prev,D=n.strstart+g,c=A[a+M-1],d=A[a+M];n.prev_length>=n.good_match&&(r>>=2),o>n.lookahead&&(o=n.lookahead);do{if(A[(t=e)+M]===d&&A[t+M-1]===c&&A[t]===A[a]&&A[++t]===A[a+1]){a+=2,t++;do{}while(A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&A[++a]===A[++t]&&ai&&0!=--r);return M<=n.lookahead?M:n.lookahead}function $(n){var e,t,s,a,i,A,u,l,D,c,d=n.w_size;do{if(a=n.window_size-n.lookahead-n.strstart,n.strstart>=d+(d-y)){for(r.arraySet(n.window,n.window,d,d,0),n.match_start-=d,n.strstart-=d,n.block_start-=d,e=t=n.hash_size;s=n.head[--e],n.head[e]=d<=s?s-d:0,--t;);for(e=t=d;s=n.prev[--e],n.prev[e]=d<=s?s-d:0,--t;);a+=d}if(0===n.strm.avail_in)break;if(A=n.strm,u=n.window,l=n.strstart+n.lookahead,c=void 0,(D=a)<(c=A.avail_in)&&(c=D),t=0===c?0:(A.avail_in-=c,r.arraySet(u,A.input,A.next_in,c,l),1===A.state.wrap?A.adler=M(A.adler,u,c,l):2===A.state.wrap&&(A.adler=o(A.adler,u,c,l)),A.next_in+=c,A.total_in+=c,c),n.lookahead+=t,n.lookahead+n.insert>=v)for(i=n.strstart-n.insert,n.ins_h=n.window[i],n.ins_h=(n.ins_h<=v&&(n.ins_h=(n.ins_h<=v)if(s=a._tr_tally(n,n.strstart-n.match_start,n.match_length-v),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=v){for(n.match_length--;n.strstart++,n.ins_h=(n.ins_h<=v&&(n.ins_h=(n.ins_h<=v&&n.match_length<=n.prev_length){for(r=n.strstart+n.lookahead-v,s=a._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-v),n.lookahead-=n.prev_length-1,n.prev_length-=2;++n.strstart<=r&&(n.ins_h=(n.ins_h<n.pending_buf_size-5&&(t=n.pending_buf_size-5);;){if(n.lookahead<=1){if($(n),0===n.lookahead&&e===A)return T;if(0===n.lookahead)break}n.strstart+=n.lookahead,n.lookahead=0;var s=n.block_start+t;if((0===n.strstart||n.strstart>=s)&&(n.lookahead=n.strstart-s,n.strstart=s,J(n,!1),0===n.strm.avail_out))return T;if(n.strstart-n.block_start>=n.w_size-y&&(J(n,!1),0===n.strm.avail_out))return T}return n.insert=0,e===u?(J(n,!0),0===n.strm.avail_out?b:w):(n.strstart>n.block_start&&(J(n,!1),n.strm.avail_out),T)})),new F(4,4,8,4,H),new F(4,5,16,8,H),new F(4,6,32,32,H),new F(4,4,16,16,j),new F(8,16,32,32,j),new F(8,16,128,128,j),new F(8,32,128,256,j),new F(32,128,258,1024,j),new F(32,258,258,4096,j)],t.deflateInit=function(n,e){return V(n,e,S,15,8,0)},t.deflateInit2=V,t.deflateReset=W,t.deflateResetKeep=U,t.deflateSetHeader=function(n,e){return n&&n.state?2!==n.state.wrap?D:(n.state.gzhead=e,l):D},t.deflate=function(n,e){var t,r,M,i;if(!n||!n.state||5>8&255),O(r,r.gzhead.time>>16&255),O(r,r.gzhead.time>>24&255),O(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),O(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(O(r,255&r.gzhead.extra.length),O(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(n.adler=o(n.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(O(r,0),O(r,0),O(r,0),O(r,0),O(r,0),O(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),O(r,3),r.status=E);else{var c=S+(r.w_bits-8<<4)<<8;c|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(c|=32),c+=31-c%31,r.status=E,N(r,c),0!==r.strstart&&(N(r,n.adler>>>16),N(r,65535&n.adler)),n.adler=1}if(69===r.status)if(r.gzhead.extra){for(M=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>M&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),I(n),M=r.pending,r.pending!==r.pending_buf_size));)O(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>M&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){M=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>M&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),I(n),M=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindexM&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),0===i&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){M=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>M&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),I(n),M=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindexM&&(n.adler=o(n.adler,r.pending_buf,r.pending-M,M)),0===i&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&I(n),r.pending+2<=r.pending_buf_size&&(O(r,255&n.adler),O(r,n.adler>>8&255),n.adler=0,r.status=E)):r.status=E),0!==r.pending){if(I(n),0===n.avail_out)return r.last_flush=-1,l}else if(0===n.avail_in&&B(e)<=B(t)&&e!==u)return C(n,-5);if(666===r.status&&0!==n.avail_in)return C(n,-5);if(0!==n.avail_in||0!==r.lookahead||e!==A&&666!==r.status){var d=2===r.strategy?function(n,e){for(var t;;){if(0===n.lookahead&&($(n),0===n.lookahead)){if(e===A)return T;break}if(n.match_length=0,t=a._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(J(n,!1),0===n.strm.avail_out))return T}return n.insert=0,e===u?(J(n,!0),0===n.strm.avail_out?b:w):n.last_lit&&(J(n,!1),0===n.strm.avail_out)?T:L}(r,e):3===r.strategy?function(n,e){for(var t,s,r,M,o=n.window;;){if(n.lookahead<=g){if($(n),n.lookahead<=g&&e===A)return T;if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=v&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=v?(t=a._tr_tally(n,1,n.match_length-v),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=a._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(J(n,!1),0===n.strm.avail_out))return T}return n.insert=0,e===u?(J(n,!0),0===n.strm.avail_out?b:w):n.last_lit&&(J(n,!1),0===n.strm.avail_out)?T:L}(r,e):s[r.level].func(r,e);if(d!==b&&d!==w||(r.status=666),d===T||d===b)return 0===n.avail_out&&(r.last_flush=-1),l;if(d===L&&(1===e?a._tr_align(r):5!==e&&(a._tr_stored_block(r,0,0,!1),3===e&&(x(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),I(n),0===n.avail_out))return r.last_flush=-1,l}return e!==u?l:r.wrap<=0?1:(2===r.wrap?(O(r,255&n.adler),O(r,n.adler>>8&255),O(r,n.adler>>16&255),O(r,n.adler>>24&255),O(r,255&n.total_in),O(r,n.total_in>>8&255),O(r,n.total_in>>16&255),O(r,n.total_in>>24&255)):(N(r,n.adler>>>16),N(r,65535&n.adler)),I(n),0=t.w_size&&(0===o&&(x(t.head),t.strstart=0,t.block_start=0,t.insert=0),c=new r.Buf8(t.w_size),r.arraySet(c,e,d-t.w_size,t.w_size,0),e=c,d=t.w_size),i=n.avail_in,A=n.next_in,u=n.input,n.avail_in=d,n.next_in=0,n.input=e,$(t);t.lookahead>=v;){for(s=t.strstart,a=t.lookahead-(v-1);t.ins_h=(t.ins_h<>>=m=P>>>24,d-=m,0===(m=P>>>16&255))k[a++]=65535&P;else{if(!(16&m)){if(0==(64&m)){P=p[(65535&P)+(c&(1<>>=m,d-=m),d<15&&(c+=y[s++]<>>=m=P>>>24,d-=m,!(16&(m=P>>>16&255))){if(0==(64&m)){P=S[(65535&P)+(c&(1<>>=m,d-=m,(m=a-M)<_){if(u<(m=_-m)&&t.sane){n.msg="invalid distance too far back",t.mode=30;break n}if(g=D,(v=0)===l){if(v+=A-m,m>3,c&=(1<<(d-=R<<3))-1,n.next_in=s,n.next_out=a,n.avail_in=s>>24&255)+(n>>>8&65280)+((65280&n)<<8)+((255&n)<<24)}function S(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(n){var e;return n&&n.state?(e=n.state,n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=1&e.wrap),e.mode=D,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new s.Buf32(c),e.distcode=e.distdyn=new s.Buf32(d),e.sane=1,e.back=-1,u):l}function h(n){var e;return n&&n.state?((e=n.state).wsize=0,e.whave=0,e.wnext=0,f(n)):l}function P(n,e){var t,s;return n&&n.state?(s=n.state,e<0?(t=0,e=-e):(t=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=M.wsize?(s.arraySet(M.window,e,t-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):(r<(a=M.wsize-M.wnext)&&(a=r),s.arraySet(M.window,e,t-r,a,M.wnext),(r-=a)?(s.arraySet(M.window,e,t-r,r,0),M.wnext=r,M.whave=M.wsize):(M.wnext+=a,M.wnext===M.wsize&&(M.wnext=0),M.whave>>8&255,t.check=a(t.check,$,2,0),R=m=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&m)<<8)+(m>>8))%31){n.msg="incorrect header check",t.mode=30;break}if(8!=(15&m)){n.msg="unknown compression method",t.mode=30;break}if(R-=4,I=8+(15&(m>>>=4)),0===t.wbits)t.wbits=I;else if(I>t.wbits){n.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&($[0]=255&m,$[1]=m>>>8&255,t.check=a(t.check,$,2,0)),R=m=0,t.mode=3;case 3:for(;R<32;){if(0===h)break n;h--,m+=c[S++]<>>8&255,$[2]=m>>>16&255,$[3]=m>>>24&255,t.check=a(t.check,$,4,0)),R=m=0,t.mode=4;case 4:for(;R<16;){if(0===h)break n;h--,m+=c[S++]<>8),512&t.flags&&($[0]=255&m,$[1]=m>>>8&255,t.check=a(t.check,$,2,0)),R=m=0,t.mode=5;case 5:if(1024&t.flags){for(;R<16;){if(0===h)break n;h--,m+=c[S++]<>>8&255,t.check=a(t.check,$,2,0)),R=m=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(h<(k=t.length)&&(k=h),k&&(t.head&&(I=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),s.arraySet(t.head.extra,c,S,k,I)),512&t.flags&&(t.check=a(t.check,c,k,S)),h-=k,S+=k,t.length-=k),t.length))break n;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===h)break n;for(k=0;I=c[S+k++],t.head&&I&&t.length<65536&&(t.head.name+=String.fromCharCode(I)),I&&k>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=12;break;case 10:for(;R<32;){if(0===h)break n;h--,m+=c[S++]<>>=7&R,R-=7&R,t.mode=27;break}for(;R<3;){if(0===h)break n;h--,m+=c[S++]<>>=1)){case 0:t.mode=14;break;case 1:if(g(t),t.mode=20,6!==e)break;m>>>=2,R-=2;break n;case 2:t.mode=17;break;case 3:n.msg="invalid block type",t.mode=30}m>>>=2,R-=2;break;case 14:for(m>>>=7&R,R-=7&R;R<32;){if(0===h)break n;h--,m+=c[S++]<>>16^65535)){n.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&m,R=m=0,t.mode=15,6===e)break n;case 15:t.mode=16;case 16:if(k=t.length){if(h>>=5,R-=5,t.ndist=1+(31&m),m>>>=5,R-=5,t.ncode=4+(15&m),m>>>=4,R-=4,286>>=3,R-=3}for(;t.have<19;)t.lens[H[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,O={bits:t.lenbits},J=o(0,t.lens,0,19,t.lencode,0,t.work,O),t.lenbits=O.bits,J){n.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,w=65535&z,!((L=z>>>24)<=R);){if(0===h)break n;h--,m+=c[S++]<>>=L,R-=L,t.lens[t.have++]=w;else{if(16===w){for(N=L+2;R>>=L,R-=L,0===t.have){n.msg="invalid bit length repeat",t.mode=30;break}I=t.lens[t.have-1],k=3+(3&m),m>>>=2,R-=2}else if(17===w){for(N=L+3;R>>=L)),m>>>=3,R-=3}else{for(N=L+7;R>>=L)),m>>>=7,R-=7}if(t.have+k>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=30;break}for(;k--;)t.lens[t.have++]=I}}if(30===t.mode)break;if(0===t.lens[256]){n.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,O={bits:t.lenbits},J=o(i,t.lens,0,t.nlen,t.lencode,0,t.work,O),t.lenbits=O.bits,J){n.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,O={bits:t.distbits},J=o(A,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,O),t.distbits=O.bits,J){n.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===e)break n;case 20:t.mode=21;case 21:if(6<=h&&258<=P){n.next_out=f,n.avail_out=P,n.next_in=S,n.avail_in=h,t.hold=m,t.bits=R,M(n,v),f=n.next_out,d=n.output,P=n.avail_out,S=n.next_in,c=n.input,h=n.avail_in,m=t.hold,R=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;b=(z=t.lencode[m&(1<>>16&255,w=65535&z,!((L=z>>>24)<=R);){if(0===h)break n;h--,m+=c[S++]<>C)])>>>16&255,w=65535&z,!(C+(L=z>>>24)<=R);){if(0===h)break n;h--,m+=c[S++]<>>=C,R-=C,t.back+=C}if(m>>>=L,R-=L,t.back+=L,t.length=w,0===b){t.mode=26;break}if(32&b){t.back=-1,t.mode=12;break}if(64&b){n.msg="invalid literal/length code",t.mode=30;break}t.extra=15&b,t.mode=22;case 22:if(t.extra){for(N=t.extra;R>>=t.extra,R-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;b=(z=t.distcode[m&(1<>>16&255,w=65535&z,!((L=z>>>24)<=R);){if(0===h)break n;h--,m+=c[S++]<>C)])>>>16&255,w=65535&z,!(C+(L=z>>>24)<=R);){if(0===h)break n;h--,m+=c[S++]<>>=C,R-=C,t.back+=C}if(m>>>=L,R-=L,t.back+=L,64&b){n.msg="invalid distance code",t.mode=30;break}t.offset=w,t.extra=15&b,t.mode=24;case 24:if(t.extra){for(N=t.extra;R>>=t.extra,R-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===P)break n;if(k=v-P,t.offset>k){if((k=t.offset-k)>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=30;break}E=k>t.wnext?(k-=t.wnext,t.wsize-k):t.wnext-k,k>t.length&&(k=t.length),T=t.window}else T=d,E=f-t.offset,k=t.length;for(Ph?(m=O[N+l[g]],B[x+l[g]]):(m=96,0),c=1<>L)+(d-=c)]=P<<24|m<<16|R,0!==d;);for(c=1<>=1;if(0!==c?(C&=c-1,C+=c):C=0,g++,0==--I[v]){if(v===k)break;v=e[t+l[g]]}if(E>>7)]}function O(n,e){n.pending_buf[n.pending++]=255&e,n.pending_buf[n.pending++]=e>>>8&255}function N(n,e,t){n.bi_valid>p-t?(n.bi_buf|=e<>p-n.bi_valid,n.bi_valid+=t-p):(n.bi_buf|=e<>>=1,t<<=1,0<--e;);return t>>>1}function H(n,e,t){var s,r,a=new Array(d+1),M=0;for(s=1;s<=d;s++)a[s]=M=M+t[s-1]<<1;for(r=0;r<=e;r++){var o=n[2*r+1];0!==o&&(n[2*r]=$(a[o]++,o))}}function j(n){var e;for(e=0;e>1;1<=t;t--)U(n,a,t);for(r=i;t=n.heap[1],n.heap[1]=n.heap[n.heap_len--],U(n,a,1),s=n.heap[1],n.heap[--n.heap_max]=t,n.heap[--n.heap_max]=s,a[2*r]=a[2*t]+a[2*s],n.depth[r]=(n.depth[t]>=n.depth[s]?n.depth[t]:n.depth[s])+1,a[2*t+1]=a[2*s+1]=r,n.heap[1]=r++,U(n,a,1),2<=n.heap_len;);n.heap[--n.heap_max]=n.heap[1],function(n,e){var t,s,r,a,M,o,i=e.dyn_tree,A=e.max_code,u=e.stat_desc.static_tree,l=e.stat_desc.has_stree,D=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,S=e.stat_desc.max_length,f=0;for(a=0;a<=d;a++)n.bl_count[a]=0;for(i[2*n.heap[n.heap_max]+1]=0,t=n.heap_max+1;t>=7;s>>=1)if(1&t&&0!==n.dyn_ltree[2*e])return r;if(0!==n.dyn_ltree[18]||0!==n.dyn_ltree[20]||0!==n.dyn_ltree[26])return a;for(e=32;e>>3,(o=n.static_len+3+7>>>3)<=M&&(M=o)):M=o=t+5,t+4<=M&&-1!==e?X(n,e,t,s):4===n.strategy||o===M?(N(n,2+(s?1:0),3),W(n,y,k)):(N(n,4+(s?1:0),3),function(n,e,t,s){var r;for(N(n,e-257,5),N(n,t-1,5),N(n,s-4,4),r=0;r>>8&255,n.pending_buf[n.d_buf+2*n.last_lit+1]=255&e,n.pending_buf[n.l_buf+n.last_lit]=255&t,n.last_lit++,0===e?n.dyn_ltree[2*t]++:(n.matches++,e--,n.dyn_ltree[2*(T[t]+A+1)]++,n.dyn_dtree[2*J(e)]++),n.last_lit===n.lit_bufsize-1},t._tr_align=function(n){N(n,2,3),z(n,f,y),function(n){16===n.bi_valid?(O(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):8<=n.bi_valid&&(n.pending_buf[n.pending++]=255&n.bi_buf,n.bi_buf>>=8,n.bi_valid-=8)}(n)}},{"../utils/common":41}],53:[function(n,e,t){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,e,s){(function(n){!function(n,e){"use strict";if(!n.setImmediate){var t,s,r,a,M=1,o={},i=!1,A=n.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(n);u=u&&u.setTimeout?u:n,t="[object process]"==={}.toString.call(n.process)?function(n){process.nextTick((function(){D(n)}))}:function(){if(n.postMessage&&!n.importScripts){var e=!0,t=n.onmessage;return n.onmessage=function(){e=!1},n.postMessage("","*"),n.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",n.addEventListener?n.addEventListener("message",c,!1):n.attachEvent("onmessage",c),function(e){n.postMessage(a+e,"*")}):n.MessageChannel?((r=new MessageChannel).port1.onmessage=function(n){D(n.data)},function(n){r.port2.postMessage(n)}):A&&"onreadystatechange"in A.createElement("script")?(s=A.documentElement,function(n){var e=A.createElement("script");e.onreadystatechange=function(){D(n),e.onreadystatechange=null,s.removeChild(e),e=null},s.appendChild(e)}):function(n){setTimeout(D,0,n)},u.setImmediate=function(n){"function"!=typeof n&&(n=new Function(""+n));for(var e=new Array(arguments.length-1),s=0;se?n:Array(e-n.length+1).join(" ")+n}function l(n,e){for(var t=n.length,s=0;;){var r=n.lastIndexOf("\n",t-1);if(-1===r)break;if(t=r,++s===e)break;if(0===t)break}var a=s0)throw new Error("RegExp has capture groups: "+R+"\nUse (?: \u2026 ) instead");if(!p.lineBreaks&&R.test("\n"))throw new Error("Rule should declare lineBreaks: "+R);c.push(o(m))}}var _=r&&r.fallback,v=t&&!_?"ym":"gm",g=t||_?"":"|";return!0===l&&(v+="u"),{regexp:new RegExp(i(c)+g,v),groups:D,fast:a,error:r||S}}function h(n){var e=f(p(n));return new _({start:e},"start")}function P(n,e,t){var s=n&&(n.push||n.next);if(s&&!t[s])throw new Error("Missing state '"+s+"' (in token '"+n.defaultType+"' of state '"+e+"')");if(n&&n.pop&&1!==+n.pop)throw new Error("pop must be 1 (in token '"+n.defaultType+"' of state '"+e+"')")}function m(n,e){var t=n.$all?p(n.$all):[];delete n.$all;var s=Object.getOwnPropertyNames(n);e||(e=s[0]);for(var r=Object.create(null),a=0;a{"use strict";var s=t(8878),r=t(7116);function a(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t