2024-04-21 23:36:26 +08:00

1 line
58 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){"use strict";var e={8338:function(e,t,n){var o=n(5130),r=(n(4114),n(6768)),l=n(144),a=(n(2162),n(595)),i=(n(7467),n(4732),n(9577),n(6280),n(7913),n(7801),n(5320)),s=n(5384),c=JSON.parse('{"module":"Modules","signal":"Signals","search-signal":"Search Signal","language-setting":"Language","horizontal-scaling-ratio":"Horizontal Scaling Level","horizontal-scaling-ratio-description":"There are a total of 5 gear, the higher the gear, <br/>the higher the magnification when ctrl + mouse wheel zoomin","horizontal-roll-ratio":"Horizontal Roll Level","horizontal-roll-ratio-description":"There are 5 gear positions in total. The higher the gear position, <br/>the larger the step length of the left and right sliding waveform timeline","vertical-roll-ratio":"Vertical Roll Level","vertical-roll-ratio-description":"There are 5 gear positions in total. The higher the gear position, <br/>the larger the step length of the up and down sliding waveform timeline","search-setting":"Search","search-case-sensitivity":"Case Sensitivity","search-mode":"search mode","search-scope":"Search Scope","search-display-parent-only":"Display Parent Module Only","search-nothing":"Find Nothing","signal-only":"Signal Only","module-only":"Module Only","signal-module":"Signal + Module","general-setting":"General","appearance-setting":"Appearance","display-wave-height":"Height of Wave Track","display-signal-info-scope":"Info displayed in sidebar","display-signal-info-scope.width":"width","display-signal-info-scope.parent":"parent","wavecolor":"color of wave","wavecolor.normal-bit":"wave of one width","wavecolor.normal-vec":"wave of more than one width","wavecolor.high-impedance":"wave of high impedance","wavecolor.unknown":"wave of unknown","operation-setting":"Operation","render-setting":"Render","prerender":"prerender","prerender-description":"Prerendering will make rendering faster, but will take up extra memory <br/> If your computer has more than 10 GB of memory, we recommend you turn it on.","render-animation":"enable rendering animation","usermanual":"User Manual","usermanual.left-right-scroll.title":"<span class=\\"iconfont icon-mouse\\"/> + <span class=\\"iconfont icon-up-down\\"/>","usermanual.left-right-scroll.caption":"move up and down","usermanual.up-down-scroll.title":"<span class=\\"iconfont icon-mouse\\"/> + <span class=\\"iconfont icon-left-right\\"/> / <span class=\\"iconfont icon-shift\\"/> + <span class=\\"iconfont icon-mouse\\"/> + <span class=\\"iconfont icon-up-down\\"/>","usermanual.up-down-scroll.caption":"move left and right","usermanual.xscale.title":"<span class=\\"iconfont icon-ctrl\\"/> + <span class=\\"iconfont icon-mouse\\"/> + <span class=\\"iconfont icon-up-down\\"/>","usermanual.xscale.caption":"scale along x axis","loading":"loading","current-version":"current version","copyright":"The copyright of this software belongs to <a href=\\"https://github.com/Digital-EDA\\" target=\\"_blank\\">Digital-IDE</a> project team. Welcome to <a href=\\"https://github.com/Digital-EDA/Digital-IDE\\">Star</a>."}'),u=JSON.parse('{"module":"模块","signal":"信号","search-signal":"搜索信号","language-setting":"语言","horizontal-scaling-ratio":"横向缩放速度","horizontal-scaling-ratio-description":"一共有5个挡位挡位越高<br/>ctrl + 鼠标滚轮缩放时的倍率越高","horizontal-roll-ratio":"横向滚动速度","horizontal-roll-ratio-description":"一共有5个挡位挡位越高<br/>左右滑动波形时间轴的步长越大","vertical-roll-ratio":"纵向滚动速度","vertical-roll-ratio-description":"一共有5个挡位挡位越高<br/>上下滑动波形时间轴的步长越大","search-setting":"搜索","search-case-sensitivity":"区分大小写","search-mode":"搜索模式","search-scope":"搜索范围","search-display-parent-only":"只展示父模块","search-nothing":"没有找到任何符号","signal-only":"信号","module-only":"模块","signal-module":"信号 + 模块","general-setting":"通用","appearance-setting":"外观","display-wave-height":"波形轨道的高度","display-signal-info-scope":"侧边栏展示信息","display-signal-info-scope.width":"位宽","display-signal-info-scope.parent":"所属模块名","wavecolor":"波形颜色","wavecolor.normal-bit":"单位宽波形","wavecolor.normal-vec":"多位宽波形","wavecolor.high-impedance":"高阻态波形","wavecolor.unknown":"未知态波形","operation-setting":"操作","render-setting":"渲染","prerender":"预渲染","prerender-description":"预渲染将使得渲染速度更快,但是会占用额外内存<br/>如果您的电脑内存大于10个G我们建议您开启。","render-animation":"开启渲染动画","usermanual":"使用说明","usermanual.left-right-scroll.title":"<span class=\\"iconfont icon-mouse\\"/><span class=\\"iconfont icon-up-down\\"/>","usermanual.left-right-scroll.caption":"上下移动","usermanual.up-down-scroll.title":"<span class=\\"iconfont icon-mouse\\"/><span class=\\"iconfont icon-left-right\\"/> / <span class=\\"iconfont icon-shift\\"/> + <span class=\\"iconfont icon-mouse\\"/><span class=\\"iconfont icon-up-down\\"/>","usermanual.up-down-scroll.caption":"左右移动","usermanual.xscale.title":"<span class=\\"iconfont icon-ctrl\\"/> + <span class=\\"iconfont icon-mouse\\"/><span class=\\"iconfont icon-up-down\\"/>","usermanual.xscale.caption":"横向缩放","loading":"加载中","current-version":"当前版本","copyright":"本软件版权归 <a href=\\"https://github.com/Digital-EDA\\" target=\\"_blank\\">Digital-IDE</a> 项目组所有,欢迎 <a href=\\"https://github.com/Digital-EDA/Digital-IDE\\">Star</a>。"}');const d=(0,s.hU)({legacy:!1,locale:"zh",warnHtmlMessage:!1,messages:{en:c,zh:u}});var p=d;function h(){var e=0,t=window.screen,n=navigator.userAgent.toLowerCase();return void 0!==window.devicePixelRatio?e=window.devicePixelRatio:~n.indexOf("msie")?t.deviceXDPI&&t.logicalXDPI&&(e=t.deviceXDPI/t.logicalXDPI):void 0!==window.outerWidth&&void 0!==window.innerWidth&&(e=window.outerWidth/window.innerWidth),e&&(e=Math.round(100*e)),e}window.screen.height,h();const f=window.screen.width*h()/100,g=new Float32Array([0,0,0,0,0,0,1,1,.2,.847,.1,1,.2,.847,.1,1,.9,.2,.2,1,.486,.302,1,1,1,1,0,1,1,0,1,1,0,1,0,.5,0,1,1,.5,1,0,0,.5,0,0,1,.1,.2,.847,.1,.1,.2,.847,.1,.1,.9,.2,.2,.1,.486,.302,1,.1]),v=new Float32Array([0,0,1,0,1,0,1,0,-1,0,-1,0,-1,0]),m=.005,y=new Float32Array([0,0,1,m,1,-m,1,0,-1,m,-1,-m,-1,0]),w=new Map;w.set(-1,4),w.set(0,0),w.set(1,1);const k=.004*3800/f,b=k/2,x=new Float32Array([0,b,-b,b,-b,0,-b,-b,0,-b,b,-b,b,0,b,b]);class L{constructor(e,t){this.type=e,this.source=t}make(e){const t=e.createShader(e[this.type]);e.shaderSource(t,this.source),e.compileShader(t);const n=e.getShaderParameter(t,e.COMPILE_STATUS);return n||console.log("创建类型为 "+type+" 的着色器失败!"),t}}const S=new L("VERTEX_SHADER","#version 300 es\nin uvec4 pos;\nout vec4 v_color;\nuniform vec2 scale;\nuniform vec2 offset;\nuniform vec4 colors[16];\nuniform vec2 shifts[7]; // 基础八位图偏移量为了性能pos 只传入整数,需要的坐标负数由该值提供\nuniform vec2 widthShifts[8]; // 用于构造线宽的偏移\n\nvoid main() {\n v_color = colors[pos.z];\n vec2 shift = shifts[pos.y];\n vec2 widthShift = widthShifts[pos.w];\n gl_Position = vec4(\n float(pos.x) * scale.x + offset.x + float(widthShift.x) + shift.y,\n float(shift.x) * scale.y + offset.y + float(widthShift.y),\n 1, 1\n );\n}"),R=new L("FRAGMENT_SHADER","#version 300 es\nprecision mediump float;\nin vec4 v_color;\nout vec4 outColor;\nvoid main() {\n outColor = v_color;\n}"),{t:V}=p.global;class M{constructor(e,t,n,o){const r=i.Ks.service({lock:!0,text:V("loading"),background:"rgba(0, 0, 0, 0.7)"}),l=document.createElement("canvas");e.view.replaceChildren(l),this.elements=e,this.globalLookup=t,this.canvas=l,this.pstate=n,this.plugins=o;const a=l.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0,antialias:!1,depth:!1});this.webglLocation=this.initProgram(a);const{lineVerticesMap:s,maskVerticesMap:c}=this.makeVertex();this.lineVerticesMap=s,this.maskVerticesMap=c,this.initData(),this.animationHandler=void 0,r.close()}initProgram(e){const t=e.createProgram();e.attachShader(t,S.make(e)),e.attachShader(t,R.make(e)),e.linkProgram(t),e.useProgram(t);const n={colors:e.getUniformLocation(t,"colors"),shifts:e.getUniformLocation(t,"shifts"),scale:e.getUniformLocation(t,"scale"),offset:e.getUniformLocation(t,"offset"),pos:e.getAttribLocation(t,"pos"),widthShifts:e.getUniformLocation(t,"widthShifts"),gl:e};return n}makeVertex(){const e=this.globalLookup,t=(e.time,new Map),n=new Map;if(E.prerender)for(const o of Reflect.ownKeys(e.chango)){const{lineVertices:e,maskVertices:r}=this.makeVertexByID(o);t.set(o,e),n.set(o,r)}return{lineVerticesMap:t,maskVerticesMap:n}}makeVertexByID(e){const t=this.globalLookup,n=t.time,o=t.chango[e],{kind:r,wave:l}=o;if("bit"===r){const{lineVertices:e,maskVertices:t}=this.makeBitVertex(l,n);return{lineVertices:e,maskVertices:t}}if("vec"===r){const{lineVertices:e,maskVertices:t}=this.makeVecVertex(l,n);return{lineVertices:e,maskVertices:t}}return{lineVertices:void 0,maskVertices:void 0}}translateValue2RenderParameter(e){switch(e){case 0:return{y:-1,color:2};case 1:return{y:1,color:3};case 2:case 3:return{y:-1,color:4};case 4:case 5:return{y:0,color:2};default:return{y:-1,color:7}}}makeWidthShiftIndexByPoints(e,t,n){if(void 0===e){if(t.y===n.y)return 0;if(t.x===n.x)return 6}else if(void 0===n){if(t.y===e.y)return 0;if(t.x===e.x)return 6}else{if(e.x!==t.x&&e.y===t.y&&t.x===n.x&&t.y!==n.y)return n.y>t.y?1:7;if(e.x===t.x&&e.y!==t.y&&t.x!==n.x&&t.y===n.y)return t.y>e.y?1:7}}makeRectangleVertices(e,t,n,o,r,l=0){const a=[e,w.get(o),r,l],i=[e,w.get(t),r,l],s=[n,w.get(t),r,l],c=[n,w.get(o),r,l];return this.makeQuadVertices(a,i,s,c)}makeQuadVertices(e,t,n,o){return[...e,...t,...n,...e,...n,...o]}makeBitVertex(e,t,n=!1){const o=e.length,r=[];for(let c=0;c<o;++c){const n=e[c],l=c===o-1?e[c]:e[c+1],a=n[0],i=c===o-1?t:e[c+1][0],s=n[1],u=l[1],d=this.translateValue2RenderParameter(s),p=this.translateValue2RenderParameter(u);if(0===c)r.push({x:a,y:d.y,color:d.color}),r.push({x:i,y:d.y,color:d.color});else{const e=r.at(-1);e.y===d.y&&e.color===d.color||r.push({x:a,y:d.y,color:d.color}),d.y===p.y&&d.color===p.color||r.push({x:i,y:d.y,color:d.color})}}const l=r.at(-1);l.x<t&&r.push({x:t,y:l.y,color:l.color});const a=r.length,i=[],s=[];for(let c=0;c<a;++c){const e=r[c-1],t=r[c],n=r[c+1],o=w.get(t.y),l=this.makeWidthShiftIndexByPoints(e,t,n);i.push(t.x,o,t.color,l,t.x,o,t.color,(l+4)%8),void 0!==n&&t.color!==n.color&&i.push(t.x,o,n.color,l,t.x,o,n.color,(l+4)%8)}for(let c=0;c<a;++c){const e=r[c];if(0===c&&1===e.y){while(r[++c]&&1===r[c].y);if(--c>0){const t=this.makeRectangleVertices(e.x,1,r[c].x,-1,e.color+10,4);s.push(...t);continue}}const t=r[c+1],n=r[c+2];if(void 0!==e&&void 0!==t&&void 0!==n&&t.y>e.y){const o=this.makeRectangleVertices(t.x,t.y,n.x,e.y,t.color+10,4);s.push(...o)}}return{lineVertices:new Uint32Array(i),maskVertices:new Uint32Array(s)}}makeVecVertex(e,t,n=!1){const o=[],r=[],l=e.length;for(let a=0;a<l;++a){const[n,i,s]=e[a],c=a===l-1?t:e[a+1][0],u={x:n,y:0},d={x:c,y:0},p={x:n,y:4},h={x:c,y:5},f={x:n,y:1},g={x:c,y:2},v=s?4:5,m=[h,d,g,f,u,p],y=[1,2,3,5,6,7];for(let e=0;e<6;++e){const t=m[e],n=m[(e+1)%6],r=y[e],l=y[(e+1)%6],a=this.makeQuadVertices([t.x,t.y,v,r],[t.x,t.y,v,(r+4)%8],[n.x,n.y,v,(l+4)%8],[n.x,n.y,v,l]);o.push(...a)}const w=[[3,4,5],[5,0,3],[0,3,2],[0,1,2]];for(const e of w){const[t,n,o]=e,l=m[t],a=m[n],i=m[o];r.push(l.x,l.y,v+10,y[t],a.x,a.y,v+10,y[n],i.x,i.y,v+10,y[o])}}return n&&console.log(o),{lineVertices:new Uint32Array(o),maskVertices:new Uint32Array(r)}}initVertice(e){const t=this.webglLocation,n=t.gl,o=this.globalLookup.chango[e];if(void 0===this.lineVerticesMap.get(e)){const{lineVertices:t,maskVertices:n}=this.makeVertexByID(e);this.lineVerticesMap.set(e,t),this.maskVerticesMap.set(e,n)}const r=this.lineVerticesMap.get(e),l=this.maskVerticesMap.get(e),a=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,a),n.bufferData(n.ARRAY_BUFFER,r,n.STATIC_DRAW),o.lineVao=n.createVertexArray(),n.bindVertexArray(o.lineVao),n.vertexAttribIPointer(t.pos,4,n.UNSIGNED_INT,0,0),n.enableVertexAttribArray(t.pos);const i=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,i),n.bufferData(n.ARRAY_BUFFER,l,n.STATIC_DRAW),o.maskVao=n.createVertexArray(),n.bindVertexArray(o.maskVao),n.vertexAttribIPointer(t.pos,4,n.UNSIGNED_INT,0,0),n.enableVertexAttribArray(t.pos)}initData(){if(E.prerender)for(const n of Reflect.ownKeys(this.globalLookup.chango))this.initVertice(n);const e=this.webglLocation,t=e.gl;t.uniform4fv(e.colors,g),t.uniform2fv(e.widthShifts,x),t.uniform2fv(e.shifts,v)}updateGLColor(e,t){const n=this.webglLocation,o=n.gl;for(const r of e){const e=4*r.index,n=r.rgba;if(g[e]=n.red,g[e+1]=n.green,g[e+2]=n.blue,g[e+3]=n.alpha,t.updateMask){const e=4*(r.index+10);g[e]=n.red,g[e+1]=n.green,g[e+2]=n.blue}}o.uniform4fv(n.colors,g),this.render()}render(){void 0!==this.animationHandler&&cancelAnimationFrame(this.animationHandler);const e=this.canvas,t=this.webglLocation,n=t.gl,o=this.globalLookup,r=this.lineVerticesMap,l=this.maskVerticesMap,a=this.elements,i=(A.sideBarItemMargin,this.pstate),s=this.plugins;i.yStep=E.displaySignalHeight+A.sideBarItemMargin,i.yDuty=.9*(1-2*A.sideBarItemMargin/this.pstate.yStep),document.body.style.setProperty("--vcd-render-padding",i.topBarHeight+"px");const c=i.height-i.topBarHeight-i.botBarHeight,u=i.width;let d;e.width=u,e.height=c;const p=300;let h=this.animationHandler=requestAnimationFrame(m);function f(e,t,n){return e=3*(1-e)*(1-e)*e+3*(1-e)*e*e+e*e*e,(1-e)*t+e*n}function g(e){const d=f(e,i.oldXScale,i.xScale),p=f(e,i.oldXOffset,i.xOffset),h=f(e,i.oldYOffset,i.yOffset),g=f(e,i.oldYStep,i.yStep),m=f(e,i.oldYDuty,i.yDuty),w=2*d/u,k=g*m/c;n.uniform2f(t.scale,w,k),n.viewport(0,0,u,c),n.clear(n.COLOR_BUFFER_BIT);let b=0;for(const a of o.currentWires){const e=a.link,i=(o.chango[e].wave,o.chango[e]);if(!i)return;const s=2*p/u-1,d=2*(h-g*b)/c+1;n.uniform2f(t.offset,s,d),void 0===r.get(e)&&this.initVertice(e);const f=r.get(e),m=l.get(e);1===a.size?(n.uniform2fv(t.shifts,v),n.bindVertexArray(i.lineVao),n.drawArrays(n.TRIANGLE_STRIP,0,f.length/4),n.bindVertexArray(i.maskVao),n.drawArrays(n.TRIANGLES,0,m.length/4)):(n.uniform2fv(t.shifts,y),n.bindVertexArray(i.lineVao),n.drawArrays(n.TRIANGLES,0,f.length/4),n.bindVertexArray(i.maskVao),n.drawArrays(n.TRIANGLES,0,m.length/4)),b++}s.map((e=>e(o,i,a)))}function m(e){if(void 0===d)d=e;else{const t=e-d,n=E.renderAnimation?Math.min(t/p,1):1;if(g(n),n>=1)return cancelAnimationFrame(h),i.oldXOffset=i.xOffset,i.oldYOffset=i.yOffset,i.oldXScale=i.xScale,i.oldYStep=i.yStep,void(i.oldYDuty=i.yDuty)}requestAnimationFrame(m)}}}var C=M;const I=(0,a.A)(),O=(0,l.Kh)({topModules:[],currentModule:void 0,currentWires:new Set,currentSignalValues:{},currentTime:0,version:"",date:"",status:"",timescale:"",t0:0,maxTime:0n,time:0,tgcd:null,chango:{},render:()=>{},waveRender:void 0,pstate:void 0,xScale:1,initcurrentModule(e){if(void 0===this.currentModule&&e&&(this.currentModule=e),e.body&&e.body instanceof Array)for(const t of e.body)t.parent=e},getWaveRender(){return this.waveRender}}),A=(0,l.Kh)({timeScaleHeight:30,sideBarPadding:10,sideBarItemMargin:5,vcdRenderPadding:24,yOffset:0}),E=(0,l.Kh)({language:"zh",caseSensitivity:!1,displayParentOnly:!1,displaySignalHeight:50,searchMode:"so",searchScope:["wire","reg","integer"],displaySignalInfoScope:["width"],HorizontalScalingRatio:1,HorizontalRollRatio:1,VerticalRollRario:1,minGridWidth:300,prerender:!0,renderAnimation:!1});function _(){const e=localStorage.getItem("setting");try{const t=JSON.parse(e);return t}catch(t){return}}const F=_();if(F)for(const or of Reflect.ownKeys(F)){const e=F[or];void 0!==e&&(E[or]=e)}const P={};async function W(){const e=await window.getVcdStream();return e}function T(e,t){let n;return function(){n&&clearTimeout(n),n=setTimeout((()=>{e()}),t)}}function H(e){switch(e.type){case"module":return"icon-memory-chip";case"begin":return"icon-brackets";case"fork":return"icon-fork";case"function":return"icon-function";case"task":return"icon-task";case"event":return"icon-prevent";case"integer":return"icon-integer";case"parameter":return"icon-parameter";case"real":return"icon-real";case"realtime":return"icon-wave-square";case"reg":return"icon-register";case"supply0":return"icon-wave-square";case"supply1":return"icon-wave-square";case"time":return"icon-wave-square";case"tri":return"icon-wave-square";case"triand":return"icon-wave-square";case"trior":return"icon-wave-square";case"trireg":return"icon-wave-square";case"tri0":return"icon-wave-square";case"tri1":return"icon-wave-square";case"wand":return"icon-wave-square";case"wire":return"icon-wave-square";case"wor":return"icon-wave-square";case"string":return"icon-string";default:break}}function B(e,t,n,o,r){if(n.has(t.type)){let n=t.name;if(o||(n=n.toLowerCase(),e=e.toLowerCase()),n.includes(e)){let e=t;const n=[];while(e)if(e.name&&e.type&&n.push(e),e=e.parent,r&&2==n.length)break;let o="";for(let t=n.length-1;t>=0;--t){const e=n[t],r=H(e),l=`<span class="iconfont ${r}"></span>&ensp;${e.name}`;o+=l,t>0&&(o+='<div class="dep-arrow"></div>')}return{htmlString:o,module:t}}}return null}function D(e,t,n){return"bit"===e?2===t?"x":t:"vec"===e?n?t?"?":"x":t:void 0}async function z(){const e=O.chango,t=O.currentTime,n=O.currentSignalValues;for(const o of O.currentWires){const r=e[o.link],{wave:l,kind:a}=r;void 0===l||0===l.length?n[o.link]="x":1===l.length?n[o.link]=D(a,l[0][1],l[0][2]):n[o.link]=X(a,l,t)}}function X(e,t,n){const o=t.map((e=>e[0]));let r=0,l=t.length-1;while(r<l){if(o[r]===n)break;if(o[l]<=n){r=l;break}if(l-r===1)break;const e=r+l>>1;o[e]>n?l=e:r=e}const a=D(e,t[r][1],t[r][2]);return a}const U=BigInt(Number.MAX_SAFE_INTEGER);function $(e){if("string"!==typeof e)return;const t=e.trim(),n=t.match(/^(\d+)\s*(\w+)$/),o={1:0,10:1,100:2}[n[1]],r={s:0,ms:-3,us:-6,ns:-9,ps:-12,fs:-15}[n[2]];return o+r}function N(e){return e<U?Number(e):"0x"+e.toString(16)}function K(e,t){if(void 0===e)return t;let n;while(0!==t)n=e%t,e=t,t=n;return e<0?-e:e}function G(e,t){const n=e.tgcd;e.t0/=n,e.time/=n;for(const r of Reflect.ownKeys(t))t[r].wave.map((e=>{e[0]/=n}));const o=0|Math.log10(n);if(o>0){const t=Math.pow(10,o),r=n/t;r===(0|r)&&(e.tgcd=r,e.timescale+=o)}}const j=new Set(["begin","fork","function","module","task"]),q=new Set(["event","integer","parameter","real","realtime","reg","supply0","supply1","time","tri","triand","trior","trireg","tri0","tri1","wand","wire","wor","string"]);function Y(e){return j.has(e.type)}function J(e){return q.has(e.type)}function Q(e,t,n,o){const r=Math.floor(255*e),l=Math.floor(255*t),a=Math.floor(255*n);return`rgba(${r},${l},${a},${o})`}function Z(e){const t=e.match(/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d+(\.\d+)?)\)$/);return t?{red:parseInt(t[1])/255,green:parseInt(t[2])/255,blue:parseInt(t[3])/255,alpha:parseFloat(t[4])}:void 0}const ee=["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577"];var te=n(8179),ne=n.n(te),oe=n(9727),re=n.n(oe);const le=(e,t)=>{const n=["T","G","M","k","","m","µ","n","p","f","a","z","y"],o=14-t,r=n[o/3|0],l=[100,10,1][o%3];return(e*l).toLocaleString()+" "+r+"s"};var ae=le;const ie=(e,t)=>{const{xmargin:n,fontWidth:o,fontHeight:r}=e,{height:l,xScale:a,xOffset:i,tgcd:s,timescale:c,xCursor:u}=t,d=Math.round((u-i)/a)*s;O.currentTime=d;const p=ae(d,c),h=(p.length+1)*o,f=[["line",{class:"wd-cursor-line",x1:n+.5,x2:n+.5,y1:0,y2:l}],["rect",{class:"wd-cursor-time",x:n-h/2,y:0,rx:9,ry:9,width:h,height:1.25*r}],["text",{class:"wd-cursor-time",x:n,y:r},p],["rect",{class:"wd-cursor-time",x:n-h/2,y:l-1.25*r,rx:9,ry:9,width:h,height:1.25*r}],["text",{class:"wd-cursor-time",x:n,y:l-.25*r},p]];return re()(ne()(2*n,l).concat(f))};var se=ie;const ce=(e,t)=>{let n=t();const{width:o,xOffset:r,xScale:l,time:a,sidebarWidth:i}=e,s=o+l*a*1;n=Math.min(n,s);const c=-o-l*a*1.2;return n=Math.max(n,c),n!==r&&(e.oldXOffset=e.xOffset,e.xOffset=n,!0)};var ue=ce;const de=e=>(t,n)=>{let{xOffset:o,yOffset:r,xScale:l,yStep:a,time:i,sidebarWidth:s,numLanes:c}=e;e.width=t,e.height=n;const u=2*(c+2)*a;u<0?r=0:r>u&&(r=u),e.yOffset=r;const d=e.xScaleMin=.001;e.xScale=l<d?d:l,ue(e,(()=>o))};var pe=de;const he={container:["div",{class:"vcd-container",id:"vcd-container"}],grid:["div",{class:"vcd-vline",id:"vcd-vline"}],view:["div",{class:"vcd-view",id:"vcd-view"}],values:["div",{class:"vcd-values",id:"vcd-values"}],cursor:["div",{class:"vcd-cursor",id:"vcd-cursor"}]},fe=["grid","view","values","cursor"],ge=e=>{const t=Object.keys(e);return t.reduce(((t,n)=>{const o=e[n],r=document.createElement(o[0]),l="object"===typeof o[1]?o[1]:{};return Object.keys(l).map((e=>{"class"===e?r.classList.add(l.class):r.setAttribute(e,l[e])})),t[n]=r,t}),{})};const ve=(e,t)=>(t.map((t=>e.container.appendChild(e[t]))),e.container);var me={defaultElemento:he,defaultLayers:fe,createElemento:ge,createContainer:ve};const ye=(e,t)=>{t.match(/(\d+)(\w+)/)},we=(e,t,n)=>{const o=160,r=20,l=r/2,a=t=>{const a=n.xCursor=t.clientX;e.style.left=a-o+"px",e.innerHTML=se({xmargin:o,fontWidth:l,fontHeight:r},n)};a({clientX:n.width/2}),t.addEventListener("mousemove",a)};const ke=e=>{const t=280,n=20,o=me.createElemento(e.elemento),r=me.createContainer(o,e.layers),l={fontHeight:n,width:1024,height:1024,xScaleMax:1e3,xScaleMin:.001,topBarHeight:1.5*n,botBarHeight:1.5*n,xOffset:t,yOffset:-40,yStep:54,yDuty:.6,oldXOffset:t,oldYOffset:-40,oldYStep:54,oldYDuty:.6,sidebarWidth:t,container:r};return O.pstate=l,{elo:o,pstate:l,start:t=>{t.t0=t.t0||0,Object.assign(l,{tgcd:t.tgcd,timescale:t.timescale,xScale:t.xScale||8,oldXScale:t.xScale||8,numLanes:t.currentWires.size,t0:t.t0,time:t.time});try{const e=localStorage.getItem("dide"),t=JSON.parse(e);Object.assign(l,t)}catch(i){console.error(i)}t.timeOpt&&ye(l,t.timeOpt.value);const n=new C(o,t,l,e.renderPlugins);t.render=n.render.bind(n),t.waveRender=n,O.waveRender=n;const r=pe(l),a=new ResizeObserver((e=>{for(let t of e){let{width:e,height:n}=t.contentRect;console.log(e,n),r(e,n)}t.render()}));a.observe(document.body),r(o.container.clientWidth,o.container.clientHeight),we(o.cursor,o.container,l,t.render),t.render()}}};var be=ke,xe=n(1256),Le=n.n(xe);const Se=(e,t)=>t*e.xScale+e.xOffset;var Re=Se;const Ve=(e,t)=>{const{xOffset:n,xScale:o,tgcd:r}=t;return Math.round(e/o-n/o)*r};var Me=Ve;function*Ce(e,t){const{sidebarWidth:n,width:o}=t,r=Me(n,t),l=Me(o,t);let a=0;for(a=0;a<e.length;a++)if(void 0===e[a]||e[a][0]>=r)break;for(;a<e.length;a++){if(void 0===e[a]||e[a][0]>l)break;yield a}}var Ie=Ce;function*Oe(e){let t,n,o;[t,o]=e[0];let r=0;for(let l=1;l<e.length;l++){n=o,[t,o]=e[l];while(1){if(r>=t)break;r=yield n}}while(1)yield o}const Ae=e=>{let t=599,n=173;for(let o=0;o<e.length;o++)t=t+e.charCodeAt(o)&255,n=n+t&255;return(n^t^n>>5^t>>5)%36};var Ee=Ae;const _e=(e,t,n,o,r,l)=>{let a=n,i=!1,s=e[a];void 0===s&&(a=n-2,s=e[a],i=!0),s&&(void 0===t[a]&&(t[a]={op:s.op,asm:s.asm,bricks:[]}),t[a].bricks.push({name:o,label:r,t:l,tail:i}))},Fe=(e,t,n)=>{const o={},{listing:r}=t,{clock:l,othero:a}=e;if(void 0===t.chango[l.ref])return o;const i=t.chango[l.ref].wave,s=Ie(i,n);for(const u of Object.keys(a))["pc","go"].map((e=>{const n=a[u][e];n.sampler=Oe(t.chango[n.ref].wave),n.sampler.next(0)}));let c=8e3;e:for(const u of s){const[e,t]=i[u];if(t)for(const n of Object.keys(a)){const t=a[n],l=t.go.sampler.next(e).value,i=t.pc.sampler.next(e).value,s=n.toUpperCase();if(l&&(_e(r,o,i,s,s,e),0===c--))break e}}for(const[u,d]of Object.keys(o).entries())void 0!==o[d]&&(o[d].idx=u);return o},Pe=(e,t,n)=>{const{width:o,yStep:r}=n,l=Re(n,2)-Re(n,0),a=Fe(e,t,n),i=Object.keys(a).map((e=>Number(e))).sort(),s=[];for(let c=0;c<e.len-2;c++){const e=i[c],t=a[e];if(void 0===e||void 0===t)break;const u=t.asm.replace(/<.+>/,"◆"),d=["g",Le()(0,Math.round(c*r))];1&c&&d.push(["rect",{width:o,height:r-1,class:"pc-odd"}]),c>0&&e-i[c-1]>4&&d.push(["line",{class:"gap",x1:0,y1:0,x2:o,y2:0}]),d.push(["text",{class:"pc","xml:space":"preserve",y:Math.round(r)},["tspan",{class:"pc-addr"},parseInt(e,10).toString(16).padStart(12," ")],["tspan",{class:"pc-opcode"},t.op.padStart(9," ")]," ",["tspan",{class:"pc-asm"},u]]),t.bricks.map((e=>{d.push(["g",Le()(Math.round(Re(n,e.t))),["rect",{class:""===e.label?e.name:"ct"+Ee(e.name).toString(36),width:l,height:(e.tail?r>>1:r)-3,y:e.tail?1+(r>>1):1,"data-stage":e.label}],...l>20?[["text",{class:e.name,width:l,x:l/2,y:16},e.label]]:[]])})),s.push(d)}return s};var We=Pe;const Te=(e,t,n)=>{let o=t,[r,l]=e[t];for(let a=t;a<e.length;a++){const[t,i]=e[a];if(t>=n)break;o=a,r=t,l=i}return[o,l,r]},He=(e,t,n)=>{const o=e.body,{yStep:r}=n;let{clock:l,valid:a,ready:i,up:s}=o;s=s||1;const c=[];let u=0;if(l&&l.ref){const e=t.chango[l.ref].wave,o=Ie(e,n);let d=0;if(a&&a.ref){const l=t.chango[a.ref].wave;let p,h=0;if(i&&i.ref){const a=t.chango[i.ref].wave;let f,g=0;for(const t of o){const[o,i]=e[t];if(i){[h,p]=Te(l,h,o),[g,f]=Te(a,g,o);const e=Re(n,o),t=Re(n,d),i=e-t,v=s*r;if(e>0&&t>0&&i>0&&p&&(i>=1?(f?c.push(["rect",{fill:"url('#valid&ready')",width:Math.round(i),height:v,x:Math.round(t),y:-v}]):c.push(["rect",{fill:"url('#valid&~ready')",width:Math.round(i),height:v,x:Math.round(t),y:-v}]),u++):u+=10),d=o,u>500)return c}}}else for(const t of o){const[o,a]=e[t];if(a){[h,p]=Te(l,h,o);const e=Re(n,o),t=Re(n,d),a=e-t,i=s*r;if(e>0&&t>0&&a>0&&p&&(a>=1?(c.push(["rect",{fill:"url('#valid')",width:Math.round(a),height:i,x:Math.round(t),y:-i}]),u++):u+=10),d=o,u>500)return c}}}}return c};var Be=He,De=n(5794);const ze={w:{h:0,l:100},r:{h:10,l:45},o:{h:33,l:65},y:{h:55,l:50},g:{h:120,l:75},c:{h:190,l:50},b:{h:215,l:70},v:{h:280,l:55}};var Xe=ze;const Ue=(e,t,n)=>{const{width:o,height:r,timescale:l,yStep:a,yOffset:i,topBarHeight:s,botBarHeight:c}=t,u=n*a-i,d=r-s-c;return e.vlines.map((e=>{const n=e.value*Math.pow(10,e.mult-l),a=Math.round(Re(t,n)),i=Xe[e.style]||Xe.w,c=`hsl(${i.h},100%,${i.l}%)`,p=["path",{style:"stroke-width: 1px; stroke: "+c}];if(a<0||a>o)return u<0||u>d?["g"]:a<0?(p[1].d=`M 0 ${u} l 8 -4 v 8 z`,p):(p[1].d=`M ${o-16} ${u} l -8 -4 v 8 z`,p);const h=["g",De.tt(a,0),["rect",{x:-1,width:3,height:r,fill:"#fff",filter:"url(#neonGlow-"+e.style+")"}],["rect",{width:1,height:r,fill:c}]];return u<0?(p[1].d=`M ${a} ${s} l 4 8 h -8 z`,["g",h,p]):u>d?(p[1].d=`M ${a} ${d} l -4 -8 h 8 z`,["g",h,p]):(p[1].d=`M ${a} ${u} m-4 0 l 4 -4 l 4 4 l -4 4 z`,["g",h,p])}))};var $e=Ue;const Ne="...",Ke=(e,t)=>{t=BigInt(t);{const n=e.match(/^%(?<sign>[s])?(?<radix>[bodh])(?<elen>\d+)?$/);if(n){const e={b:2,o:8,d:10,h:16,H:16}[n.groups.radix];if(n.groups.sign)return(n,o)=>{n>>t-1n&1n&&(n-=2n**t);let r=n.toString(e);if(r.length<=o)return r;const l=n<0?"-":"+";return 1===o?l:2===o?l+Ne:l+Ne+r.slice(2-o)};if(Number(n.groups.elen)>0){const o=BigInt(n.groups.elen);return(n,r)=>{let l=[];for(let a=0n;a<t;a+=o){const t=n>>a&2n**o-1n;l.unshift(t.toString(e))}return l="{"+l.join(", ")+"}",l.length<=r?l:1===r?Ne:Ne+l.slice(1-r)}}return(t,n)=>{let o=t.toString(e);return o.length<=n?o:1===n?Ne:Ne+o.slice(1-n)}}}{const n=e.match(/^%a$/);if(n)return(e,n)=>{let o="";for(let r=0n;r<t;r+=8n)o=String.fromCharCode(Number(e>>r&0xffn))+o;return o=o.trim(),o.length<=n||(o=o.slice(0,n-1)+Ne),o}}{const n=e.match(/^%(?<form>[fe])(?<elen>32|64)$/);if(n){const e=new ArrayBuffer(8),o=new BigInt64Array(e),r=BigInt(n.groups.elen),l=new(32n===r?Float32Array:Float64Array)(e),a=32n===r?0xffffffffn:0xffffffffffffffffn;return"f"===n.groups.form?t>r?(e,n)=>{let i=[];for(let s=0n;s<t;s+=r){o[0]=e>>s&a;const t=l[0];i.unshift(t.toString())}return i="{"+i.join(", ")+"}",i.length<=n?i:1===n?Ne:Ne+i.slice(1-n)}:(e,t)=>{o[0]=e&a;const n=l[0];let r;if(r=n.toString(),r.length<=t)return r;for(let o=t;o>=0;o--){if(r=n.toPrecision(o+1),r.length<=t)return r;if(r=n.toExponential(o),r.length<=t)return r}return e<0?"-":"+"}:(e,t)=>{o[0]=e&a;const n=l[0];let r;if(r=n.toExponential(),r.length<=t)return r;for(let o=4;o<=t;o++)if(r=n.toExponential(t-o),r.length<=t)return r;return e<0?"-":"+"}}}return()=>"?"};var Ge=Ke;const je=e=>{"object"!==typeof e&&(e={});const t=e.format||"%h",n=Number(e.width||1),o=Ge(t,n);return(e,t,r,l)=>{if(t)return e?["text",{x:r,class:"unknown"},"?"]:["text",{x:r,class:"high-impedance"},"x"];const a=l/8|0;e=BigInt(e);const i=o(e,a,n);return["text",{x:r,class:"common"},i]}};var qe=je;const Ye=["defs",["linearGradient",{id:"valid"},["stop",{offset:"30%","stop-color":"hsla(100, 100%, 100%, 0)"}],["stop",{offset:"90%","stop-color":"hsla(100, 100%, 100%, .3)"}]],["linearGradient",{id:"valid&ready"},["stop",{offset:"30%","stop-color":"hsla(100, 100%, 50%, 0)"}],["stop",{offset:"90%","stop-color":"hsla(100, 100%, 50%, .5)"}]],["linearGradient",{id:"valid&~ready"},["stop",{offset:"30%","stop-color":"hsla(50, 100%, 50%, 0)"}],["stop",{offset:"90%","stop-color":"hsla(50, 100%, 50%, .5)"}]],...Object.keys(Xe).map((e=>{const t=Xe[e];return["filter",{id:"neonGlow-"+e,width:7,x:-3},["feGaussianBlur",{stdDeviation:3,in:"SourceAlpha",result:"ablur"}],["feFlood",{"flood-color":`hsl(${t.h},100%,${t.l}%)`,result:"xf"}],["feComposite",{in:"xf",in2:"ablur",operator:"in"}]]}))];function*Je(e,t){const{width:n,height:o,sidebarWidth:r,yOffset:l,yStep:a,topBarHeight:i,botBarHeight:s}=t,c=e.currentWires,u=[];for(const v of c)u.push({kind:v.kind,name:v.name,ref:v.link});const d=o/a,p=l/a,h=ne()(n,o-i-s);let f=0;for(let v=0;v<d;++v){const e=u[v];if(e&&(e.name||e.kind)){if(v>p)break;f=v}}h.push(Ye),yield;const g=["g"];h.push(g);for(let v=0;v<p+d;v++){const o=u[v+(0|f)];if(o&&"DIZ"===o.kind)g.push(["g",Le()(0,Math.round((v-(p-f)+1.18)*a))].concat(We(o,e,t)));else if(o&&"brace"===o.kind)g.push(["g",Le()(0,Math.round((v-(p-f)+1.18)*a))].concat(Be(o,e,t)));else if(o&&o.ref){const l=e.chango[o.ref];if(l&&"vec"===l.kind){const i=["g",Le()(0,Math.round((v-(p-f)+.1)*a))],{wave:s}=l,c=s.length;e:{let[l,a,u]=s[0],d=Re(t,l);const p=qe(o);for(let o=1;o<=c;o++){const l=s[o],[c,h,f]=l||[e.time,0,0],g=Re(t,c);if(void 0!==a||void 0!==u){if(d>n&&g>n)break e;if(!(d<r&&g<r)){const e=0|(d>r?d:r),t=0|(g<n?g:n),o=t-e;if(o>8){const n=Math.round((e+t)/2);i.push(p(a,u,n,o))}}}d=g,a=h,u=f}}h.push(i)}yield}}for(let v=0;v<u.length;v++){const e=u[v];e&&e.vlines&&g.push(...$e(e,t,v))}return yield,re()(h)}var Qe=Je;function Ze(e,t,n){const o=Qe(e,t);for(let r=0;r<1e6;r++){const e=o.next();if(e.done){n.values.innerHTML=e.value;break}}}const et=e=>[0,1,2,4,4,5,5,5,10,10,10,10,10,15,15,15,15,20,20,20][Math.round(e)]||Math.round(e),tt=e=>{const{sidebarWidth:t,width:n,height:o,timescale:r,xScale:l,tgcd:a,xOffset:i,topBarHeight:s,botBarHeight:c}=e,u=16,d=["g",{}],p=Me(t,e),h=Me(n,e),f=1,g=Math.round(f*n/t),v=(h-p)/g,m=Math.pow(10,0|Math.log10(v)),y=et(v/m)*m,w=Math.ceil(p/y)*y,k=Math.floor(h/y)*y;for(let b=w;b<=k;b+=y){const e=Math.round(b/a*l+i);d.push(["g",{},["line",{class:"wd-grid-time",x1:e,x2:e,y2:o}],["text",{class:"wd-grid-time",x:e,y:(s+u)/2},ae(b,r)],["text",{class:"wd-grid-time",x:e,y:o-(c-u)/2},ae(b,r)]])}return d},nt=(e,t,n)=>{const{width:o,height:r}=t,l=ne()(o,r);l.push(tt(t)),n.grid.innerHTML=re()(l)};var ot=nt;const rt=(e,t)=>{let n=t();const{width:o,xOffset:r,xScale:l,time:a,sidebarWidth:i}=e,s=O.currentWires.size*e.yStep,c=e.height-e.topBarHeight-e.botBarHeight;console.log(s,c);const u=Math.max(-40,s-c);n=Math.min(n,u);const d=-40;return n=Math.max(n,d),n!==r&&(console.log("next offset y",n),e.oldYOffset=e.yOffset,e.yOffset=n,A.yOffset=n+40,!0)};var lt=rt;function at(e,t){let n=t();const{xOffset:o,xCursor:r,xScale:l,xScaleMin:a,xScaleMax:i}=e;return n=n>i?i:n,n=n<a?a:n,n!==l&&(e.oldXScale=e.xScale,e.xScale=n,ue(e,(()=>r-(r-o)*n/l)),!0)}var it=at;const st={1:10/9,2:10/7,3:10/6,4:2,5:2.5},ct={1:5,2:4,3:3,4:1,5:.5},ut={1:20,2:40,3:80,4:160,5:320},dt={desc:"Zoom in time",fn:e=>it(e,(()=>e.xScale*st[E.HorizontalScalingRatio]))},pt={desc:"Zoom out time",fn:e=>it(e,(()=>e.xScale/st[E.HorizontalScalingRatio]))},ht={left:{desc:"Scroll into the past",fn:e=>ue(e,(()=>e.xOffset+e.time/ct[E.HorizontalRollRatio]))},right:{desc:"Scroll into the future",fn:e=>ue(e,(()=>e.xOffset-e.time/ct[E.HorizontalRollRatio]))},up:{desc:"scroll up",fn:e=>lt(e,(()=>e.yOffset-ut[E.VerticalRollRario]))},down:{desc:"scroll down",fn:e=>lt(e,(()=>e.yOffset+ut[E.VerticalRollRario]))}};var ft={scrollLeft:ht.left,scrollRight:ht.right,scrollUp:ht.up,scrollDown:ht.down,"Shift+icon:scrollUp":ht.left,"Shift+icon:scrollDown":ht.right,"Ctrl+icon:scrollUp":dt,"Ctrl+icon:scrollDown":pt,nop:{fn:()=>!1}};const{keyName:gt}=n(6237);const vt=(e,t,n,o,r)=>e=>{const{deltaX:l,deltaY:a}=e;if(e.ctrlKey){const l=a<0?"Ctrl+icon:scrollUp":a>0?"Ctrl+icon:scrollDown":"nop";o[l].fn(t)&&(void 0!=r&&r.map((t=>t(l,e))),n.render()),e.preventDefault()}else if(e.shiftKey){const l=a<0?"Shift+icon:scrollUp":a>0?"Shift+icon:scrollDown":"nop";o[l].fn(t)&&(void 0!=r&&r.map((t=>t(l,e))),n.render()),e.preventDefault()}else if(0!==l&&0===a){const a=l<0?"scrollLeft":"scrollRight";o[a].fn(t)&&(void 0!=r&&r.map((t=>t(a,e))),n.render()),e.preventDefault()}else if(0===l&&0!==a){const l=a<0?"scrollUp":"scrollDown";o[l].fn(t)&&(void 0!=r&&r.map((t=>t(l,e))),n.render()),e.preventDefault()}};var mt=vt;let yt=null;new Map;function wt(){if(!yt){const e=document.querySelectorAll(".vcd-render-wrapper")[0];e&&(yt=e)}return yt}function kt(e,t){const n=JSON.stringify({xOffset:t.xOffset,xScale:t.xScale});localStorage.setItem("dide",n)}function bt(e){e||(e=wt());const t=be({elemento:me.defaultElemento,layers:me.defaultLayers,renderPlugins:[ot,Ze,kt]});e.appendChild(t.pstate.container),t.start(O),O.updater=()=>{console.log("updater")},t.elo.container.addEventListener("wheel",mt(e,t.pstate,O,ft))}function xt(e){if(O.currentWires.has(e))O.currentWires.delete(e),delete O.currentSignalValues[e.link],O.render();else{O.currentWires.add(e);const t=O.chango[e.link],{wave:n,kind:o}=t,r=O.currentTime;O.currentSignalValues[e.link]=X(o,n,r),O.render()}}var Lt=n(4232);const St={class:"vcd-sidebar-wrapper"},Rt={class:"signal-color-vendor"},Vt={class:"signal-info"},Mt={class:"signal-info"},Ct={class:"signal-info-name"},It={class:"signal-info-width"},Ot={class:"signal-info-current-value-wrapper"},At=(0,r.Lk)("span",null,null,-1),Et={class:"signal-info-current-value"},_t=(0,r.Lk)("span",{class:"iconfont icon-collections"},null,-1),Ft=[_t];var Pt={__name:"sidebar",setup(e){const{t:t}=(0,s.s9)();(0,r.pM)({name:"side-bar"});const n=(0,r.EW)((()=>E.displaySignalInfoScope.includes("width"))),a=(0,r.EW)((()=>E.displaySignalInfoScope.includes("parent"))),i=(0,r.EW)((()=>({height:`${A.timeScaleHeight}px`}))),c=(0,r.EW)((()=>({padding:`${A.sideBarPadding}px`}))),u=(0,r.EW)((()=>({transform:`translateY(${-A.yOffset}px)`,transition:E.renderAnimation?"var(--animation-3s)":"unset"}))),d=(0,r.EW)((()=>({margin:`${A.sideBarItemMargin}px`})));function p(){I.emit("right-nav",0)}function h(e){return"iconfont "+H(e)}function f(e){return 1===e.size?"":e.size-1+":0"}function g(e){const t=[];while(e)e.name&&e.type&&t.push(e),e=e.parent;let n="";for(let o=t.length-1;o>=0;--o){const e=t[o],r=H(e),l=`<span class="iconfont ${r}"></span>&ensp;${e.name}`;n+=l,o>0&&(n+='<div class="dep-arrow"></div>')}return n='<div class="signal-info-tooltip-wrapper">'+n+"</div>",n}return(e,t)=>{const s=(0,r.g2)("el-tooltip");return(0,r.uX)(),(0,r.CE)("div",St,[(0,r.Lk)("div",{class:"display-signal-wrapper",style:(0,Lt.Tr)(c.value)},[(0,r.Lk)("div",{class:"display-signal-container",style:(0,Lt.Tr)(u.value)},[(0,r.Lk)("div",{style:(0,Lt.Tr)(i.value)},null,4),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)((0,l.R1)(O).currentWires,((e,t)=>((0,r.uX)(),(0,r.CE)("div",{class:"display-signal-item",style:(0,Lt.Tr)(d.value),key:t},[(0,r.Lk)("div",Rt,[(0,r.Lk)("span",{class:(0,Lt.C4)(h(e))},null,2)]),(0,r.Lk)("div",Vt,[(0,r.Lk)("div",Mt,[(0,r.bF)(s,{effect:"dark",content:g(e),placement:"top","raw-content":""},{default:(0,r.k6)((()=>[(0,r.Lk)("div",Ct,[(0,r.bo)((0,r.Lk)("span",{class:"signal-parent-info"},(0,Lt.v_)(e.parent.name),513),[[o.aG,a.value]]),(0,r.Lk)("span",null,(0,Lt.v_)(e.name),1)])])),_:2},1032,["content"]),(0,r.bo)((0,r.Lk)("div",It,[(0,r.Lk)("div",{class:(0,Lt.C4)(e.size>1?"signal-info-caption":"")},(0,Lt.v_)(f(e)),3)],512),[[o.aG,n.value]])]),(0,r.Lk)("div",Ot,[At,(0,r.bF)(s,{effect:"dark",content:(0,l.R1)(O).currentSignalValues[e.link]+"",placement:"top","raw-content":""},{default:(0,r.k6)((()=>[(0,r.Lk)("div",Et,(0,Lt.v_)((0,l.R1)(O).currentSignalValues[e.link]),1)])),_:2},1032,["content"])])])],4)))),128))],4)],4),(0,r.Lk)("div",{class:"add-signal-button",onClick:p},Ft)])}}};const Wt=Pt;var Tt=Wt;const Ht={class:"vcd-right-nav"},Bt={class:"vcd-function-panel"},Dt={class:"vcd-function-option"},zt=(0,r.Lk)("div",{class:"vcd-control-panel-wrapper"},[(0,r.Lk)("div",{class:"vcd-control-panel-icon digital-ide-icon"})],-1),Xt=(0,r.Lk)("hr",null,null,-1),Ut=["onClick"];function $t(e,t,n,l,a,i){const s=(0,r.g2)("TreeView"),c=(0,r.g2)("Setting"),u=(0,r.g2)("About");return(0,r.uX)(),(0,r.CE)("div",Ht,[(0,r.Lk)("div",Bt,[(0,r.bo)((0,r.bF)(s,{topModules:l.props.topModules},null,8,["topModules"]),[[o.aG,0===l.controlPanel.currentIndex]]),(0,r.bo)((0,r.bF)(c,null,null,512),[[o.aG,1===l.controlPanel.currentIndex]]),(0,r.bo)((0,r.bF)(u,null,null,512),[[o.aG,2===l.controlPanel.currentIndex]])]),(0,r.Lk)("div",Dt,[zt,Xt,((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(l.controlPanel.sections,((e,t)=>((0,r.uX)(),(0,r.CE)("div",{class:"vcd-control-panel-wrapper",key:t,onClick:e=>l.controlPanel.click(t)},[(0,r.Lk)("div",{class:(0,Lt.C4)(l.controlPanel.currentIndex===t?"vcd-control-panel-active":"")},[(0,r.Lk)("span",{class:(0,Lt.C4)(["vcd-control-panel-icon",e.iconClass])},null,2)],2)],8,Ut)))),128))])])}const Nt={class:"vcd-treeview"},Kt=(0,r.Lk)("br",null,null,-1),Gt={class:"vcd-module-wrapper"},jt={class:"vcd-module-info"},qt=(0,r.Lk)("hr",null,null,-1),Yt={class:"vcd-module-display-wrapper"},Jt={class:"vcd-module-wires"};function Qt(e,t,n,o,l,a){const i=(0,r.g2)("TreeViewSearch"),s=(0,r.g2)("Modules"),c=(0,r.g2)("Signals");return(0,r.uX)(),(0,r.CE)("div",Nt,[(0,r.bF)(i),Kt,(0,r.Lk)("div",Gt,[(0,r.Lk)("div",jt,[(0,r.Lk)("div",null,(0,Lt.v_)(o.t("module")),1),qt,(0,r.Lk)("div",Yt,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.props.topModules,(e=>((0,r.uX)(),(0,r.Wv)(s,{key:e.name,module:e},null,8,["module"])))),128))])]),(0,r.Lk)("div",Jt,[(0,r.bF)(c)])])])}const Zt={class:"tree-view-search-wrapper"},en={key:0},tn=["onClick"],nn=["innerHTML"],on={key:1};var rn={__name:"search",setup(e){const{t:t}=(0,s.s9)();(0,r.pM)({name:"search-box"});const n=(0,r.EW)((()=>({right:"55px",transition:"var(--animation-3s)"}))),o=(0,l.Kh)({content:"",displayResult:!1,mouseOnResult:!1,searchResult:[],searchResultEl:void 0,searchResultLeft:-5});function a(){const e=o.content.trim();if(0===e.length)return void(o.displayResult=!1);o.displayResult=!0,o.searchResult=[];const t=[{name:"",body:O.topModules}],n=new Set(E.searchScope),l=E.caseSensitivity,a=E.displayParentOnly;while(t.length>0){const o=t.pop();o.body&&o.body.length&&o.body.forEach((e=>t.push(e)));const r=B(e,o,n,l,a);r&&I.emit("signal-search",r)}(0,r.dY)((()=>{o.searchResultEl=document.getElementById("search-result-wrapper"),o.searchResultEl&&(o.searchResultLeft=480-o.searchResultEl.offsetWidth)}))}I.on("signal-search",(e=>{o.searchResult.push(e)}));const i=T(a,500);return(e,a)=>{const s=(0,r.g2)("el-input");return(0,r.uX)(),(0,r.CE)("div",Zt,[(0,r.Lk)("div",null,[(0,r.bF)(s,{placeholder:(0,l.R1)(t)("search-signal"),size:"large",modelValue:o.content,"onUpdate:modelValue":a[0]||(a[0]=e=>o.content=e),"input-style":"font-size: 16px;",onInput:(0,l.R1)(i),onFocus:a[1]||(a[1]=e=>o.displayResult=!0),onBlur:a[2]||(a[2]=e=>o.displayResult=!1)},null,8,["placeholder","modelValue","onInput"])]),o.displayResult|o.mouseOnResult?((0,r.uX)(),(0,r.CE)("div",{key:0,style:(0,Lt.Tr)(n.value),class:"search-result-wrapper",id:"search-result-wrapper"},[(0,r.Lk)("div",{class:"search-result",onMouseenter:a[3]||(a[3]=e=>o.mouseOnResult=!0),onMouseleave:a[4]||(a[4]=e=>o.mouseOnResult=!1)},[o.searchResult.length>0?((0,r.uX)(),(0,r.CE)("div",en,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.searchResult,((e,t)=>((0,r.uX)(),(0,r.CE)("div",{key:t,class:(0,Lt.C4)((0,l.R1)(O).currentWires.has(e.module)?"vcd-treeview-selected":""),onClick:t=>(0,l.R1)(xt)(e.module)},[(0,r.Lk)("div",{innerHTML:e.htmlString,class:"search-result-item"},null,8,nn)],10,tn)))),128))])):((0,r.uX)(),(0,r.CE)("div",on,(0,Lt.v_)((0,l.R1)(t)("search-nothing")),1))],32)],4)):(0,r.Q3)("",!0)])}}};const ln=rn;var an=ln;const sn={class:"module"},cn={key:0,class:"vcd-subtree-wrapper"},un=(0,r.Lk)("div",{style:{width:"20px"}},null,-1),dn={style:{width:"100%"}};function pn(e,t,n,l,a,i){const s=(0,r.g2)("modules",!0);return(0,r.uX)(),(0,r.CE)("div",sn,[(0,r.Lk)("div",{onClick:t[1]||(t[1]=e=>l.clickItem()),class:(0,Lt.C4)(["vcd-treeview-item",l.module===l.globalLookup.currentModule?"vcd-treeview-selected":""])},[(0,r.Lk)("span",{class:"module-tag-status",onClick:t[0]||(t[0]=(0,o.D$)(((...e)=>l.expandManage.click&&l.expandManage.click(...e)),["stop"]))},[(0,r.Lk)("div",{class:(0,Lt.C4)(l.expandManage.expandTagClass)},null,2)]),(0,r.Lk)("span",{class:(0,Lt.C4)(`iconfont ${l.makeIconClass(l.module)}`)},null,2),(0,r.eW)(" "+(0,Lt.v_)(l.module.name),1)],2),l.mods.length>0?(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",cn,[un,(0,r.Lk)("div",dn,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(l.mods,((e,t)=>((0,r.uX)(),(0,r.Wv)(s,{module:e,key:t},null,8,["module"])))),128))])],512)),[[o.aG,l.expandManage.expanded]]):(0,r.Q3)("",!0)])}var hn={name:"modules",props:{module:Object},setup(e){const t=e.module;O.initcurrentModule(t);const n=[],o=[];for(const l of t.body)Y(l)?o.push(l):J(l)&&n.push(l);function r(){I.emit("tree-view",n),O.currentModule=t,console.log(t)}const a=(0,l.Kh)({expanded:!1,expandTagClass:0===o.length?"":"collapse-tag",click(){this.expanded=!this.expanded,this.expandTagClass&&(this.expandTagClass=this.expanded?"expand-tag":"collapse-tag")}});return{module:t,mods:o,clickItem:r,expandManage:a,globalLookup:O,makeIconClass:H}}},fn=n(1241);const gn=(0,fn.A)(hn,[["render",pn]]);var vn=gn;const mn={class:"vcd-signal-title"},yn=(0,r.Lk)("hr",null,null,-1),wn={class:"vcd-signal-signals-display"},kn=["onClick"];function bn(e,t,n,o,l,a){return(0,r.uX)(),(0,r.CE)("div",null,[(0,r.Lk)("div",mn,(0,Lt.v_)(o.t("signal"))+"("+(0,Lt.v_)(o.signals.content.length)+")",1),yn,(0,r.Lk)("div",wn,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.signals.content,((e,t)=>((0,r.uX)(),(0,r.CE)("div",{key:t,onClick:t=>o.toggleRender(e),class:(0,Lt.C4)(["vcd-signal-signal-item",o.globalLookup.currentWires.has(e)?"vcd-treeview-selected":""])},[(0,r.Lk)("div",null,[(0,r.Lk)("span",{class:(0,Lt.C4)(`iconfont ${o.makeIconClass(e)}`)},null,2),(0,r.eW)(""+(0,Lt.v_)(e.name),1)]),(0,r.Lk)("div",null,[(0,r.Lk)("div",{class:(0,Lt.C4)(e.size>1?"vcd-signal-signal-caption":"")},(0,Lt.v_)(o.makeSignalCaption(e)),3)])],10,kn)))),128))])])}var xn={name:"signals",props:{},setup(){const{t:e}=(0,s.s9)(),t=(0,l.Kh)({content:[]});function n(e){return 1===e.size?"":e.size-1+":0"}return I.on("tree-view",(e=>{t.content=[],t.content=e})),{signals:t,toggleRender:xt,globalLookup:O,makeSignalCaption:n,t:e,makeIconClass:H}}};const Ln=(0,fn.A)(xn,[["render",bn]]);var Sn=Ln,Rn={name:"tree-view",components:{Modules:vn,Signals:Sn,TreeViewSearch:an},props:{topModules:Array},setup(e){const{t:t}=(0,s.s9)();return{props:e,t:t}}};const Vn=(0,fn.A)(Rn,[["render",Qt]]);var Mn=Vn;const Cn=(0,r.Lk)("span",{class:"iconfont icon-help"},null,-1);var In={__name:"help-icon",props:{content:{type:String,required:!0},placement:{type:String,default:"right"}},setup(e){const t=e;return(e,n)=>{const o=(0,r.g2)("el-tooltip");return(0,r.uX)(),(0,r.Wv)(o,{effect:"dark",content:t.content,placement:t.placement,"raw-content":""},{default:(0,r.k6)((()=>[Cn])),_:1},8,["content","placement"])}}};const On=In;var An=On;const En={class:"setting-wrapper"},_n={class:"setting-container"},Fn={class:"setting-section"},Pn={class:"setting-option",style:{width:"300px"}},Wn={class:"option-title"},Tn=(0,r.Lk)("br",null,null,-1),Hn={class:"setting-option"},Bn={class:"option-title"},Dn=(0,r.Lk)("br",null,null,-1),zn={class:"setting-option"},Xn={class:"option-title"},Un=(0,r.Lk)("br",null,null,-1),$n={class:"setting-option",style:{width:"380px"}},Nn={class:"option-title",style:{width:"300px"}},Kn=(0,r.Lk)("br",null,null,-1),Gn={class:"setting-option",style:{width:"380px"}},jn={class:"option-title",style:{width:"300px"}},qn=(0,r.Lk)("br",null,null,-1),Yn={class:"setting-option",style:{width:"380px"}},Jn={class:"option-title",style:{width:"300px"}},Qn=(0,r.Lk)("hr",null,null,-1),Zn={class:"setting-section"},eo={class:"setting-option"},to={class:"option-title",style:{width:"150px"}},no=(0,r.Lk)("br",null,null,-1),oo={class:"setting-option"},ro={class:"option-title",style:{width:"150px"}},lo=(0,r.Lk)("br",null,null,-1),ao={class:"setting-option"},io={class:"option-title"},so=(0,r.Lk)("div",{style:{height:"20px",width:"20px"}},null,-1),co=(0,r.Lk)("hr",null,null,-1),uo={class:"setting-section"},po={class:"setting-option"},ho={class:"option-title"},fo=(0,r.Lk)("br",null,null,-1),go={class:"setting-option"},vo={class:"option-title"},mo=(0,r.Lk)("br",null,null,-1),yo={class:"setting-option"},wo={class:"option-title"};var ko={__name:"index",setup(e){(0,r.pM)({name:"dide-setting"});const{t:t,locale:n}=(0,s.s9)();n.value=E.language,(0,r.wB)((()=>n.value),(()=>{E.language=n.value,localStorage.setItem("setting",JSON.stringify(E))}));const o=(0,l.Kh)({options:[{value:0,label:t("wavecolor.normal-bit")},{value:1,label:t("wavecolor.normal-vec")},{value:2,label:t("wavecolor.high-impedance")},{value:3,label:t("wavecolor.unknown")}],glColorMap:[2,5,4,1],currentOptionIndex:0,colors:[Q(...g.slice(8,12)),Q(...g.slice(20,24)),Q(...g.slice(16,20)),Q(...g.slice(4,8))],reset(){}});(0,r.wB)((()=>o.currentOptionIndex),(()=>{console.log(o.currentOptionIndex)})),(0,r.wB)((()=>o.colors),(()=>{console.log("enter");const e=o.colors[o.currentOptionIndex],t=Z(e);if(void 0!==t){const e=o.options[o.currentOptionIndex],n=O.getWaveRender(),r=o.glColorMap[e.value],l=[{index:r,rgba:t}];2===r&&l.push({index:3,rgba:t}),n.updateGLColor(l,{updateMask:!0})}}),{deep:!0});const a=(0,l.Kh)({options:[{value:"en",text:"English"},{value:"zh",text:"中文"}]});function i(){document.body.style.setProperty("--display-signal-info-height",E.displaySignalHeight+"px");const e=O.getWaveRender();e.render()}const c=T(i,200);return(e,i)=>{const s=(0,r.g2)("el-option"),u=(0,r.g2)("el-select"),d=(0,r.g2)("el-switch"),p=(0,r.g2)("el-slider"),h=(0,r.g2)("el-input-number"),f=(0,r.g2)("el-checkbox-button"),g=(0,r.g2)("el-checkbox-group"),v=(0,r.g2)("el-color-picker");return(0,r.uX)(),(0,r.CE)("div",En,[(0,r.Lk)("div",_n,[(0,r.Lk)("div",Fn,[(0,r.Lk)("h2",null,(0,Lt.v_)((0,l.R1)(t)("general-setting")),1),(0,r.Lk)("div",Pn,[(0,r.Lk)("span",Wn,(0,Lt.v_)((0,l.R1)(t)("language-setting")),1),(0,r.bF)(u,{name:"language-setting",class:"language-setting",modelValue:(0,l.R1)(n),"onUpdate:modelValue":i[0]||(i[0]=e=>(0,l.i9)(n)?n.value=e:null)},{default:(0,r.k6)((()=>[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(a.options,(e=>((0,r.uX)(),(0,r.Wv)(s,{value:e.value,label:e.text,key:e.value},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])]),Tn,(0,r.Lk)("div",Hn,[(0,r.Lk)("span",Bn,[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("prerender"))+" ",1),(0,r.bF)(An,{placement:"left",content:(0,l.R1)(t)("prerender-description")},null,8,["content"])]),(0,r.bF)(d,{modelValue:(0,l.R1)(E).prerender,"onUpdate:modelValue":i[1]||(i[1]=e=>(0,l.R1)(E).prerender=e),size:"default"},null,8,["modelValue"])]),Dn,(0,r.Lk)("div",zn,[(0,r.Lk)("span",Xn,(0,Lt.v_)((0,l.R1)(t)("render-animation")),1),(0,r.bF)(d,{modelValue:(0,l.R1)(E).renderAnimation,"onUpdate:modelValue":i[2]||(i[2]=e=>(0,l.R1)(E).renderAnimation=e),size:"default"},null,8,["modelValue"])]),Un,(0,r.Lk)("div",$n,[(0,r.Lk)("span",Nn,[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("horizontal-scaling-ratio"))+" ",1),(0,r.bF)(An,{placement:"left",content:(0,l.R1)(t)("horizontal-scaling-ratio-description")},null,8,["content"])]),(0,r.bF)(p,{modelValue:(0,l.R1)(E).HorizontalScalingRatio,"onUpdate:modelValue":i[3]||(i[3]=e=>(0,l.R1)(E).HorizontalScalingRatio=e),"show-stops":"",min:1,max:5},null,8,["modelValue"])]),Kn,(0,r.Lk)("div",Gn,[(0,r.Lk)("span",jn,[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("horizontal-roll-ratio"))+" ",1),(0,r.bF)(An,{placement:"left",content:(0,l.R1)(t)("horizontal-roll-ratio-description")},null,8,["content"])]),(0,r.bF)(p,{modelValue:(0,l.R1)(E).HorizontalRollRatio,"onUpdate:modelValue":i[4]||(i[4]=e=>(0,l.R1)(E).HorizontalRollRatio=e),"show-stops":"",min:1,max:5},null,8,["modelValue"])]),qn,(0,r.Lk)("div",Yn,[(0,r.Lk)("span",Jn,[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("vertical-roll-ratio"))+" ",1),(0,r.bF)(An,{placement:"left",content:(0,l.R1)(t)("vertical-roll-ratio-description")},null,8,["content"])]),(0,r.bF)(p,{modelValue:(0,l.R1)(E).VerticalRollRario,"onUpdate:modelValue":i[5]||(i[5]=e=>(0,l.R1)(E).VerticalRollRario=e),"show-stops":"",min:1,max:5},null,8,["modelValue"])])]),Qn,(0,r.Lk)("div",Zn,[(0,r.Lk)("h2",null,(0,Lt.v_)((0,l.R1)(t)("appearance-setting")),1),(0,r.Lk)("div",eo,[(0,r.Lk)("span",to,(0,Lt.v_)((0,l.R1)(t)("display-wave-height")),1),(0,r.bF)(h,{modelValue:(0,l.R1)(E).displaySignalHeight,"onUpdate:modelValue":i[6]||(i[6]=e=>(0,l.R1)(E).displaySignalHeight=e),min:1,max:100,onChange:(0,l.R1)(c),size:"default"},null,8,["modelValue","onChange"])]),no,(0,r.Lk)("div",oo,[(0,r.Lk)("span",ro,(0,Lt.v_)((0,l.R1)(t)("display-signal-info-scope")),1),(0,r.bF)(g,{modelValue:(0,l.R1)(E).displaySignalInfoScope,"onUpdate:modelValue":i[7]||(i[7]=e=>(0,l.R1)(E).displaySignalInfoScope=e),size:"default"},{default:(0,r.k6)((()=>[(0,r.bF)(f,{label:"width",border:""},{default:(0,r.k6)((()=>[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("display-signal-info-scope.width")),1)])),_:1}),(0,r.bF)(f,{label:"parent",border:""},{default:(0,r.k6)((()=>[(0,r.eW)((0,Lt.v_)((0,l.R1)(t)("display-signal-info-scope.parent")),1)])),_:1})])),_:1},8,["modelValue"])]),lo,(0,r.Lk)("div",ao,[(0,r.Lk)("span",io,(0,Lt.v_)((0,l.R1)(t)("wavecolor")),1),(0,r.bF)(u,{modelValue:o.currentOptionIndex,"onUpdate:modelValue":i[8]||(i[8]=e=>o.currentOptionIndex=e),"collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select"},{default:(0,r.k6)((()=>[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(o.options,(e=>((0,r.uX)(),(0,r.Wv)(s,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),so,(0,r.bF)(v,{modelValue:o.colors[o.currentOptionIndex],"onUpdate:modelValue":i[9]||(i[9]=e=>o.colors[o.currentOptionIndex]=e),"show-alpha":"",predefine:(0,l.R1)(ee),size:"large"},null,8,["modelValue","predefine"])])]),co,(0,r.Lk)("div",uo,[(0,r.Lk)("h2",null,(0,Lt.v_)((0,l.R1)(t)("search-setting")),1),(0,r.Lk)("div",po,[(0,r.Lk)("span",ho,(0,Lt.v_)((0,l.R1)(t)("search-case-sensitivity")),1),(0,r.bF)(d,{modelValue:(0,l.R1)(E).caseSensitivity,"onUpdate:modelValue":i[10]||(i[10]=e=>(0,l.R1)(E).caseSensitivity=e),size:"default"},null,8,["modelValue"])]),fo,(0,r.Lk)("div",go,[(0,r.Lk)("span",vo,(0,Lt.v_)((0,l.R1)(t)("search-display-parent-only")),1),(0,r.bF)(d,{modelValue:(0,l.R1)(E).displayParentOnly,"onUpdate:modelValue":i[11]||(i[11]=e=>(0,l.R1)(E).displayParentOnly=e),size:"default"},null,8,["modelValue"])]),mo,(0,r.Lk)("div",yo,[(0,r.Lk)("span",wo,(0,Lt.v_)((0,l.R1)(t)("search-scope")),1),(0,r.bF)(u,{modelValue:(0,l.R1)(E).searchScope,"onUpdate:modelValue":i[12]||(i[12]=e=>(0,l.R1)(E).searchScope=e),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select"},{default:(0,r.k6)((()=>[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)((0,l.R1)(j),(e=>((0,r.uX)(),(0,r.Wv)(s,{key:e,label:e,value:e},null,8,["label","value"])))),128)),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)((0,l.R1)(q),(e=>((0,r.uX)(),(0,r.Wv)(s,{key:e,label:e,value:e},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])])])])}}};const bo=ko;var xo=bo;const Lo={class:"about-wrapper"},So={class:"usermanual"},Ro={class:"usermanual-item"},Vo=["innerHTML"],Mo={class:"usermanual-item"},Co=["innerHTML"],Io={class:"usermanual-item"},Oo=["innerHTML"],Ao=(0,r.Lk)("br",null,null,-1),Eo=(0,r.Lk)("hr",null,null,-1),_o=(0,r.Lk)("br",null,null,-1),Fo=(0,r.Lk)("div",{class:"digital-ide-icon big"},null,-1),Po=[Fo],Wo={class:"version-caption"},To=(0,r.Lk)("span",{class:"version-wrapper"},"0.3.3",-1),Ho=(0,r.Lk)("br",null,null,-1),Bo={style:{display:"flex","justify-content":"space-around"}},Do=["innerHTML"];function zo(e,t,n,o,l,a){return(0,r.uX)(),(0,r.CE)("div",Lo,[(0,r.Lk)("div",So,[(0,r.Lk)("h2",null,(0,Lt.v_)(o.t("usermanual")),1),(0,r.Lk)("div",Ro,[(0,r.Lk)("div",{innerHTML:o.t("usermanual.left-right-scroll.title")},null,8,Vo),(0,r.Lk)("div",null,(0,Lt.v_)(o.t("usermanual.left-right-scroll.caption")),1)]),(0,r.Lk)("div",Mo,[(0,r.Lk)("div",{innerHTML:o.t("usermanual.up-down-scroll.title")},null,8,Co),(0,r.Lk)("div",null,(0,Lt.v_)(o.t("usermanual.up-down-scroll.caption")),1)]),(0,r.Lk)("div",Io,[(0,r.Lk)("div",{innerHTML:o.t("usermanual.xscale.title")},null,8,Oo),(0,r.Lk)("div",null,(0,Lt.v_)(o.t("usermanual.xscale.caption")),1)])]),Ao,Eo,_o,(0,r.Lk)("div",{class:"icon-caption",onClick:t[0]||(t[0]=e=>o.goto("https://github.com/Digital-EDA"))},Po),(0,r.Lk)("div",Wo,[(0,r.Lk)("span",null,[(0,r.eW)((0,Lt.v_)(o.t("current-version"))+" ",1),To])]),Ho,(0,r.Lk)("div",Bo,[(0,r.Lk)("div",{class:"copyright-caption",innerHTML:o.t("copyright")},null,8,Do)])])}var Xo={name:"dide-about",setup(){function e(e){window.open(e,"_blank")}const{t:t}=(0,s.s9)();return{goto:e,t:t}}};const Uo=(0,fn.A)(Xo,[["render",zo]]);var $o=Uo,No={name:"right-nav",components:{TreeView:Mn,Setting:xo,About:$o},props:{topModules:Array},setup(e){const t=(0,l.Kh)({sections:[{iconClass:"iconfont icon-collections"},{iconClass:"iconfont icon-setting"},{iconClass:"iconfont icon-about"}],currentIndex:-1,click(e){this.currentIndex===e?this.currentIndex=-1:this.currentIndex=e}});return I.on("right-nav",(e=>{t.currentIndex===e?t.currentIndex=-1:t.currentIndex=e})),{props:e,controlPanel:t}}};const Ko=(0,fn.A)(No,[["render",$t]]);var Go=Ko;function jo(e,t,n,o,l,a){return(0,r.uX)(),(0,r.CE)("div",{class:"vcd-render-wrapper",onClick:t[0]||(t[0]=e=>o.updateWireCurrentValue())})}O.view;var qo={name:"main-render",components:{},setup(){return{globalLookup:O,updateWireCurrentValue:z}}};const Yo=(0,fn.A)(qo,[["render",jo]]);var Jo=Yo;const Qo=(0,r.Lk)("div",{class:"vcd-toolbar"},null,-1);var Zo={__name:"App",setup(e){(0,r.wB)((()=>E),(()=>{localStorage.setItem("setting",JSON.stringify(E))}),{deep:!0});const t=(0,l.Kh)({topModules:[],values:[]});return(0,r.sV)((async()=>{document.body.style.setProperty("--el-color-primary","var(--main-color)"),document.body.style.setProperty("--el-color-primary-light-9","var(--main-color)"),document.body.style.setProperty("--el-color-primary-light-3","var(--main-color)"),document.body.style.setProperty("--el-text-color-secondary","var(--foreground)"),document.body.style.setProperty("--el-text-color-regular","var(--foreground)"),document.body.style.setProperty("--el-border-color","var(--vscode-focusBorder)"),document.body.style.setProperty("--el-fill-color-blank","var(--sidebar)"),document.body.style.setProperty("--el-fill-color-light","var(--vscode-button-hoverBackground)"),document.body.style.setProperty("--el-switch-on-color","var(--main-color)"),document.body.style.setProperty("--el-border","var(--sidebar)"),document.body.style.setProperty("--el-border-color-light","var(--sidebar)"),document.body.style.setProperty("--el-border-color-lighter","var(--sidebar)"),document.body.style.setProperty("--el-bg-color-overlay","var(--sidebar)"),document.body.style.setProperty("--el-color-info-light-9","var(--vscode-focusBorder)"),document.body.style.setProperty("--el-color-info","var(--foreground)"),document.body.style.setProperty("--el-color-info-light-8","var(--vscode-focusBorder)"),document.body.style.setProperty("--time-scale-height","50px"),document.body.style.setProperty("--vcd-render-padding","30px"),document.body.style.setProperty("--sidebar-width","230px"),document.body.style.setProperty("--display-signal-info-height",E.displaySignalHeight+"px"),localStorage.getItem("setting")||localStorage.setItem("setting",JSON.stringify(E));const e=await window.readVcdFile(),n=await W();let o;n.change.any(((e,t,n,r,l)=>{const a=Number(t);if(o=K(o,a),P[e]=P[e]||{kind:"",wave:[]},n>=14&&n<=28)P[e].kind="bit",P[e].wave.push([a,n-14]);else{P[e].kind="vec";const t=[a,N(r)];0n!==l&&t.push(N(l)),P[e].wave.push(t)}})),n.on("$enddefinitions",(()=>{}));const r=1<<17;for(let t=0;t<e.length;t+=r){const o=e.slice(t,t+r);n.write(o)}for(const l of n.info.wires.body)t.topModules.push(l);if(O.status=n.info.status,O.version=n.info.version,O.timescale=$(n.info.timescale),O.date=n.info.date,O.t0=n.info.t0||0,O.tgcd=o,O.time=Number(n.getTime()),O.chango=P,G(O,P),bt(),I.emit("meta-ready",null),t.topModules.length>0){const e=t.topModules[0],n=e.body.filter((e=>e.link));I.emit("tree-view",n);for(const o of t.topModules)O.topModules.push(o)}})),(e,n)=>((0,r.uX)(),(0,r.CE)(r.FK,null,[(0,r.bF)((0,l.R1)(Jo)),(0,r.bF)(Tt),Qo,(0,r.bF)(Go,{topModules:t.topModules},null,8,["topModules"])],64))}};const er=Zo;var tr=er,nr=n(2354);n(4188);(0,o.Ef)(tr).use(p).use(nr.A).mount("#app")}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.m=e,function(){var e=[];n.O=function(t,o,r,l){if(!o){var a=1/0;for(u=0;u<e.length;u++){o=e[u][0],r=e[u][1],l=e[u][2];for(var i=!0,s=0;s<o.length;s++)(!1&l||a>=l)&&Object.keys(n.O).every((function(e){return n.O[e](o[s])}))?o.splice(s--,1):(i=!1,l<a&&(a=l));if(i){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[o,r,l]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={524:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var r,l,a=o[0],i=o[1],s=o[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in i)n.o(i,r)&&(n.m[r]=i[r]);if(s)var u=s(n)}for(t&&t(o);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(u)},o=self["webpackChunkdigital_wavetrace"]=self["webpackChunkdigital_wavetrace"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}();var o=n.O(void 0,[504],(function(){return n(8338)}));o=n.O(o)})();