)),o=this.uniquePort(t,new RegExp(`^${n} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit ));if(a\u0026\u0026o\u0026\u0026a!==o\u0026\u0026!wi(a,new RegExp(`^${n} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit ))\u0026\u0026!wi(o,new RegExp(`^${i} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit )))return[a,o]}}hasGroundedDriver(t,e){return(this.index.portsByNet.get(t)??[]).some((r)=\u003e{let i=r.source_component_id,n=this.index.components.get(i);if(n?.ftype!==\"simple_chip\"\u0026\u0026!(n?.ftype===\"simple_transistor\"\u0026\u0026n.transistor_type===\"npn\"))return!1;if(this.index.portsByComponent.get(i)?.length!==3)return!1;let a=this.uniquePort(i,/^(?:C|COLLECTOR)$/),o=this.uniquePort(i,/^(?:E|EMITTER)$/),c=this.uniquePort(i,/^(?:B|BASE)$/);if(!a||!o||!c||new Set([a,o,c]).size!==3||[a,o,c].some((p)=\u003ep.do_not_connect)||a.source_port_id!==r.source_port_id)return!1;let l=this.index.connected(o.source_port_id),s=this.index.connected(c.source_port_id);return this.index.groundNets.has(l)\u0026\u0026!this.index.powerNets.has(l)\u0026\u0026new Set([t,e,l,s]).size===4})}static issueToString(t){let e=[];return S(e,\"relayName\",t.relaySchematicBox.sourceComponentName),S(e,\"diodeName\",t.diodeSchematicBox.sourceComponentName),S(e,\"distanceFromCoilPins\",t.distanceFromCoilPins),S(e,\"message\",t.message),`\u003cFlybackDiodeSeparatedFromRelayCoil ${e.join(\" \")} /\u003e`}}function wi(t,e){return[t.name,...t.port_hints??[]].some((r)=\u003ee.test(r.toUpperCase().replace(/[\\s_]/g,\"\")))}var We=0.01;class wr extends at{params;index;hostIds;traces;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=\u003ee.ftype===\"simple_chip\").map((e)=\u003ee.source_component_id),this.traces=t.ctx.circuitJson.filter((e)=\u003ee.type===\"schematic_trace\"),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.hostIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.portsByComponent.get(t)??[],n=i.filter((k)=\u003eDs(k)===\"positive\"),a=i.filter((k)=\u003eDs(k)===\"negative\"),o=i.filter((k)=\u003eAi(k,/^(?:OUT|VOUT|OUTPUT)$/));if(!r||n.length!==1||a.length!==1||o.length!==1||!i.some((k)=\u003eAi(k,/^(?:VS|VCC|VDD)$/))||!i.some((k)=\u003eAi(k,/^(?:GND|GROUND|VSS)$/)))return;let c=[n[0],a[0]],l=c.map((k)=\u003ee.connected(k.source_port_id));if(c.some((k)=\u003ek.do_not_connect)||l[0]===l[1]||l.includes(e.connected(o[0].source_port_id)))return;let s=c.map((k)=\u003ee.port(k)),[p,d]=s;if(!p||!d||!p.facing_direction||p.facing_direction!==d.facing_direction||s.some((k)=\u003ek.schematic_sheet_id!==r.schematicSheetId))return;let m=new Set((e.portsByNet.get(l[0])??[]).filter((k)=\u003ee.components.get(k.source_component_id)?.ftype===\"simple_resistor\").map((k)=\u003ek.source_component_id).filter((k)=\u003ee.twoTerminalNets(k)?.includes(l[1])));if(m.size!==1)return;let u=[...m][0],y=e.components.get(u);if(y?.ftype!==\"simple_resistor\"||!Number.isFinite(y.resistance)||y.resistance\u003c=0||y.resistance\u003e1)return;if(l.some((k)=\u003e(e.portsByNet.get(k)??[]).some((st)=\u003est.source_component_id!==t\u0026\u0026Ds(st)!==void 0\u0026\u0026e.components.get(st.source_component_id)?.ftype===\"simple_chip\")))return;let f=e.placement(u);if(!f||!e.sameLocalScope(r,f))return;let _=e.portsByComponent.get(u);if(_.some((k)=\u003ek.do_not_connect))return;let x=l.map((k)=\u003ee.port(_.find((st)=\u003ee.connected(st.source_port_id)===k)));if(x.some((k)=\u003e!k||k.schematic_sheet_id!==r.schematicSheetId))return;let Y=p.facing_direction===\"left\"||p.facing_direction===\"right\",b=(k)=\u003eY?k.y:k.x,M=b(p.center),O=b(d.center),X=Math.abs(M-O);if(X\u003cWe)return;let E=Y?f.schY:f.schX,I=(Y?f.height:f.width)/2,U=Math.max(Math.min(M,O)-(E+I),E-I-Math.max(M,O));if(U\u003c=Math.max(1.5,2*X)||Math.hypot(f.schX-r.schX,f.schY-r.schY)\u003eMath.max(8,4*Math.max(r.width,r.height)))return;let q=s.map((k,st)=\u003ethis.hasVisibleConnection(x[st],k,l[st]));if(q[0]===q[1])return;let ct=q[0]?1:0,Q=l[ct];if(!this.params.ctx.circuitJson.some((k)=\u003e{if(k.type!==\"schematic_net_label\"||k.schematic_sheet_id!==r.schematicSheetId)return!1;if(k.source_net_id\u0026\u0026(e.connected(k.source_net_id)===Q||e.connected(`connectivity:${k.source_net_id}`)===Q))return!0;let st=x[ct].center;if(k.anchor_position\u0026\u0026Math.hypot(k.anchor_position.x-st.x,k.anchor_position.y-st.y)\u003cWe)return!0;return k.source_trace_id!==void 0\u0026\u0026this.sourceTraceTouchesNet(k.source_trace_id,Q)}))return;this.params.issues.push({lineItemType:\"CurrentSenseShuntSeparatedFromInputs\",amplifierSchematicBox:r,shuntSchematicBox:f,positiveInputSourcePortId:c[0].source_port_id,negativeInputSourcePortId:c[1].source_port_id,inputBandGap:U,message:`Place ${f.sourceComponentName||\"component\"} near ${r.sourceComponentName||\"component\"}.${c[0].name}/${c[1].name}, so both sense connections can be read together. Move or rotate the shunt as needed; preserve all pin connections and leave room for labels.`})}hasVisibleConnection(t,e,r){let i=this.traces.filter((o)=\u003e{if(o.schematic_sheet_id!==t.schematic_sheet_id)return!1;if(o.subcircuit_connectivity_map_key)return this.index.connected(`connectivity:${o.subcircuit_connectivity_map_key}`)===r;if(this.sourceTraceTouchesNet(o.source_trace_id,r))return!0;let c=[o.edges[0]?.from,o.edges.at(-1)?.to],l=new Set(this.params.ctx.circuitJson.flatMap((s)=\u003es.type===\"schematic_port\"\u0026\u0026s.source_port_id\u0026\u0026s.schematic_sheet_id===o.schematic_sheet_id\u0026\u0026c.some((p)=\u003ep\u0026\u0026Math.hypot(p.x-s.center.x,p.y-s.center.y)\u003cWe)?[this.index.connected(s.source_port_id)]:[]));return l.size===1\u0026\u0026l.has(r)}).flatMap((o)=\u003eo.edges),n=i.filter((o)=\u003exn(t.center,o.from,o.to)),a=new Set;for(let o=0;o\u003cn.length;o++){let c=n[o];if(xn(e.center,c.from,c.to))return!0;for(let[l,s]of i.entries()){if(a.has(l)||![c.from,c.to].some((p)=\u003exn(p,s.from,s.to))\u0026\u0026![s.from,s.to].some((p)=\u003exn(p,c.from,c.to)))continue;a.add(l),n.push(s)}}return!1}sourceTraceTouchesNet(t,e){if(!t)return!1;let r=this.params.ctx.circuitJson.find((i)=\u003ei.type===\"source_trace\"\u0026\u0026i.source_trace_id===t);return r?.type===\"source_trace\"\u0026\u0026r.connected_source_port_ids.some((i)=\u003ethis.index.connected(i)===e)}static issueToString(t){let e=[];return S(e,\"amplifierName\",t.amplifierSchematicBox.sourceComponentName),S(e,\"shuntName\",t.shuntSchematicBox.sourceComponentName),S(e,\"inputBandGap\",t.inputBandGap),S(e,\"message\",t.message),`\u003cCurrentSenseShuntSeparatedFromInputs ${e.join(\" \")} /\u003e`}}function Ai(t,e){return[t.name,...t.port_hints??[]].some((r)=\u003ee.test(r.toUpperCase().replace(/[\\s_]/g,\"\")))}function Ds(t){let e=Ai(t,/^(?:IN\\+|VIN\\+|INPOS|VINPOS)$/),r=Ai(t,/^(?:IN-|VIN-|INNEG|VINNEG)$/);return e===r?void 0:e?\"positive\":\"negative\"}function xn(t,e,r){let i=r.x-e.x,n=r.y-e.y,a=Math.hypot(i,n);if(a\u003cWe)return Math.hypot(t.x-e.x,t.y-e.y)\u003cWe;let o=((t.x-e.x)*i+(t.y-e.y)*n)/a;return o\u003e=-We\u0026\u0026o\u003c=a+We\u0026\u0026Math.abs((t.x-e.x)*n-(t.y-e.y)*i)/a\u003cWe}class Ar extends at{params;index;positiveNets=new Set;resistorIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.resistorIds=[...this.index.components.values()].filter((e)=\u003ee.ftype===\"simple_resistor\").map((e)=\u003ee.source_component_id);for(let e of t.ctx.circuitJson)if(e.type===\"source_net\"\u0026\u0026e.is_positive_voltage_source)this.positiveNets.add(this.index.connected(e.source_net_id));this.solved=this.resistorIds.length===0}_step(){let t=this.resistorIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.resistorIds.length,!t||!this.isResistor(t))return;let e=this.index,r=e.twoTerminalNets(t);if(!r)return;let i=r.filter((_)=\u003ee.isRail(_));if(i.length!==1)return;let n=i[0];if(!this.positiveNets.has(n)||e.groundNets.has(n))return;let a=r.find((_)=\u003e_!==n),o=e.portsByNet.get(a)??[],c=new Set(o.filter((_)=\u003ee.components.get(_.source_component_id)?.ftype===\"simple_resistor\").map((_)=\u003e_.source_component_id));if(c.size!==2)return;let l=[...c].find((_)=\u003e_!==t);if(!this.isResistor(l))return;let s=e.twoTerminalNets(l),p=s?.find((_)=\u003e_!==a);if(!s?.includes(a)||!p||!e.groundNets.has(p)||e.powerNets.has(p)||!o.some((_)=\u003e!c.has(_.source_component_id)))return;let d=e.placement(t),m=e.placement(l);if(!d||!m||!e.sameLocalScope(d,m))return;let u=this.getDownwardResistorPorts(t,n,a),y=this.getDownwardResistorPorts(l,a,p);if(!u||!y)return;let f=m.schY-m.height/2-(d.schY+d.height/2);if(f\u003c=1.5)return;this.params.issues.push({lineItemType:\"VoltageDividerSupplyResistorBelowGroundResistor\",supplyResistorSchematicBox:d,groundResistorSchematicBox:m,supplyTapSourcePortId:u.bottom.source_port_id,groundTapSourcePortId:y.top.source_port_id,reversedBodyGap:f,message:`Place ${d.sourceComponentName||\"component\"} above ${m.sourceComponentName||\"component\"}, close enough to read their shared divider tap. Preserve all connections and leave room for labels; exact alignment is not required.`})}isResistor(t){let e=this.index.components.get(t);return e?.ftype===\"simple_resistor\"\u0026\u0026Number.isFinite(e.resistance)\u0026\u0026e.resistance\u003e0}getDownwardResistorPorts(t,e,r){let i=this.index,n=i.placement(t),a=i.portsByComponent.get(t);if(a.some((p)=\u003ep.do_not_connect))return;let o=a.find((p)=\u003ei.connected(p.source_port_id)===e),c=a.find((p)=\u003ei.connected(p.source_port_id)===r);if(!o||!c)return;let l=i.port(o),s=i.port(c);if(!l||!s||l.schematic_sheet_id!==n.schematicSheetId||s.schematic_sheet_id!==n.schematicSheetId||l.facing_direction!==\"up\"||s.facing_direction!==\"down\"||l.center.y\u003c=s.center.y)return;return{top:o,bottom:c}}static issueToString(t){let e=[];return S(e,\"supplyResistorName\",t.supplyResistorSchematicBox.sourceComponentName),S(e,\"groundResistorName\",t.groundResistorSchematicBox.sourceComponentName),S(e,\"reversedBodyGap\",t.reversedBodyGap),S(e,\"message\",t.message),`\u003cVoltageDividerSupplyResistorBelowGroundResistor ${e.join(\" \")} /\u003e`}}class Br extends at{params;index;hostIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=\u003ee.ftype===\"simple_chip\").map((e)=\u003ee.source_component_id),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.hostIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.portsByComponent.get(t)??[];if(!r||i.some((E)=\u003e!bn(E)))return;let n=i.filter((E)=\u003ebn(E)===\"input\"),a=i.filter((E)=\u003ebn(E)===\"output\"),o=i.filter((E)=\u003ebn(E)===\"ground\");if(n.length!==1||a.length!==1||!o.length)return;let c=n[0],l=a[0];if([c,l,...o].some((E)=\u003eE.do_not_connect))return;let s=e.connected(c.source_port_id),p=e.connected(l.source_port_id),d=new Set(o.map((E)=\u003ee.connected(E.source_port_id)));if(d.size!==1)return;let m=[...d][0];if(new Set([s,p,m]).size!==3||!(e.groundNets.has(m)||o.some((E)=\u003eE.requires_ground||E.provides_ground))||!(e.powerNets.has(s)||c.requires_power)||!(e.powerNets.has(p)||l.provides_power))return;let u=e.port(c),y=e.port(l);if(!u||!y||u.schematic_sheet_id!==r.schematicSheetId||y.schematic_sheet_id!==r.schematicSheetId)return;let f=u.facing_direction===\"left\"\u0026\u0026y.facing_direction===\"right\"||u.facing_direction===\"right\"\u0026\u0026y.facing_direction===\"left\",_=u.facing_direction===\"up\"\u0026\u0026y.facing_direction===\"down\"||u.facing_direction===\"down\"\u0026\u0026y.facing_direction===\"up\";if(!f\u0026\u0026!_)return;let x=y.facing_direction===\"right\"||y.facing_direction===\"up\"?1:-1;if(x*(f?y.center.x-u.center.x:y.center.y-u.center.y)\u003c=0.01)return;let b=this.localCapacitor(r,s,m),M=this.localCapacitor(r,p,m);if(!b||!M)return;let O=(E,I)=\u003e{let U=I*x*(f?E.schX-r.schX:E.schY-r.schY),q=f?(r.width+E.width)/2:(r.height+E.height)/2;return U\u003eq+0.2};if(!O(b,1)||!O(M,-1))return;let X=r.sourceComponentName||\"component\";this.params.issues.push({lineItemType:\"RegulatorCapacitorsOnWrongSides\",regulatorSchematicBox:r,inputCapacitorSchematicBox:b,outputCapacitorSchematicBox:M,inputSourcePortId:c.source_port_id,outputSourcePortId:l.source_port_id,message:`Place ${b.sourceComponentName} near ${X}.${c.name} on the ${u.facing_direction} side and ${M.sourceComponentName} near ${X}.${l.name} on the ${y.facing_direction} side. Preserve all connections and leave room for labels; exact alignment is not required.`})}localCapacitor(t,e,r){let i=this.index,n=[],a=Math.max(6,4*Math.max(t.width,t.height)),o=new Set((i.portsByNet.get(e)??[]).map((c)=\u003ec.source_component_id));for(let c of o){if(i.components.get(c)?.ftype!==\"simple_capacitor\")continue;let l=i.twoTerminalNets(c),s=i.placement(c);if(!l?.includes(r)||!s||!i.sameLocalScope(t,s))continue;if(Math.hypot(s.schX-t.schX,s.schY-t.schY)\u003ea)continue;if(i.portsByComponent.get(c).some((d)=\u003ed.do_not_connect||!i.port(d)||i.port(d).schematic_sheet_id!==t.schematicSheetId))continue;n.push(s)}return n.length===1?n[0]:void 0}static issueToString(t){let e=[];return S(e,\"regulatorName\",t.regulatorSchematicBox.sourceComponentName),S(e,\"inputCapacitorName\",t.inputCapacitorSchematicBox.sourceComponentName),S(e,\"outputCapacitorName\",t.outputCapacitorSchematicBox.sourceComponentName),S(e,\"message\",t.message),`\u003cRegulatorCapacitorsOnWrongSides ${e.join(\" \")} /\u003e`}}function bn(t){let e=new Set;for(let r of[t.name,...t.port_hints??[]]){let i=r.toUpperCase().replace(/[ _-]/g,\"\");if(/^(?:VIN|IN|INPUT)$/.test(i))e.add(\"input\");else if(/^(?:VOUT|OUT|OUTPUT)$/.test(i))e.add(\"output\");else if(/^(?:GND\\d*|VSS)$/.test(i))e.add(\"ground\");else if(/^(?:EN|ENABLE|CE|SHDN|NC\\d*|EP|PAD|ADJ|FB|BYP|BYPASS|NR|PG|PGOOD)$/.test(i))e.add(\"control\")}return e.size===1?[...e][0]:void 0}function Ut(t,e,r,i){return{left:t-r/2,right:t+r/2,top:e+i/2,bottom:e-i/2}}function Je(t,e){let r=Math.min(t.right,e.right)-Math.max(t.left,e.left),i=Math.min(t.top,e.top)-Math.max(t.bottom,e.bottom);return r\u003e0\u0026\u0026i\u003e0?{ow:r,oh:i}:null}var Fi=0.01,Sm={right:{x:1,y:0},left:{x:-1,y:0},up:{x:0,y:1},down:{x:0,y:-1}},Xt=(t,e)=\u003et.x*e.x+t.y*e.y,Bi=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),Re=(t,e)=\u003eBi(t,e)\u003c=Fi,Fr=(t)=\u003eMath.round(t*100)/100;class Pr extends at{params;constructor(t){super();this.params=t}_step(){let{ctx:t,issues:e}=this.params,r=new At(t);for(let n of r.portsByComponent.values())for(let a of n){let o=r.connected(a.source_port_id);if(a.requires_ground||a.provides_ground)r.groundNets.add(o);if(a.requires_power||a.provides_power)r.powerNets.add(o)}let i=t.circuitJson.filter((n)=\u003en.type===\"schematic_trace\");for(let[n,a]of r.components){if(a.ftype!==\"simple_pin_header\"\u0026\u0026a.ftype!==\"simple_connector\")continue;let o=r.placement(n),c=r.portsByComponent.get(n)??[];if(!o||c.length\u003c2)continue;let l=c.map((N)=\u003er.port(N)),s=l[0]?.facing_direction;if(!s||l.some((N)=\u003e!N||N.facing_direction!==s))continue;let p=Sm[s],d={x:-p.y,y:p.x},m=i.filter((N)=\u003eN.schematic_sheet_id===o.schematicSheetId),u=t.circuitJson.filter((N)=\u003eN.type===\"schematic_net_label\"\u0026\u0026N.schematic_sheet_id===o.schematicSheetId),y=[],f=!1;for(let N of c){let tt=r.port(N),J=r.connected(N.source_port_id),W=(r.portsByNet.get(J)??[]).filter((et)=\u003eet.source_port_id!==N.source_port_id),j=m.filter((et)=\u003eet.edges.some((mt)=\u003eRe(mt.from,tt.center)||Re(mt.to,tt.center)));if(r.isRail(J)){if(j.some((et)=\u003e!u.some((mt)=\u003emt.anchor_position\u0026\u0026wm(et,tt.center,mt.anchor_position))))f=!0;continue}if(W.length===0){if(j.length\u003e0)f=!0;continue}let G=W.length===1?r.port(W[0]):void 0,D=W.length===1?r.placement(W[0].source_component_id):void 0;if(!G?.facing_direction||!D||!r.sameLocalScope(o,D)||Xt(Sm[G.facing_direction],p)!==-1){f=!0;break}y.push({pin:tt,peer:G,component:D})}if(f||y.length\u003c2)continue;if(y.some((N)=\u003eXt(N.peer.center,p)\u003e=Xt(N.pin.center,p)-2))continue;let _=y.map((N)=\u003em.filter((tt)=\u003ewm(tt,N.pin.center,N.peer.center)\u0026\u0026v2(tt)\u003e=3)).filter((N)=\u003eN.length\u003e0);if(_.length\u003c2)continue;let x=_.flat(),Y=[...y].sort((N,tt)=\u003eXt(N.pin.center,d)-Xt(tt.pin.center,d));if(Y.some((N,tt)=\u003ett\u003e0\u0026\u0026Xt(N.peer.center,d)\u003c=Xt(Y[tt-1].peer.center,d)+Fi))continue;let b={x:o.schX,y:o.schY},M=Math.max(...y.map((N)=\u003eXt(N.pin.center,p)-Xt(b,p))),O=Math.min(...y.map((N)=\u003eXt(N.peer.center,p)))-2-M,X=y.map((N)=\u003eXt(N.peer.center,d)-Xt(N.pin.center,d)+Xt(b,d)).sort((N,tt)=\u003eN-tt),E=X[Math.floor(X.length/2)],I={x:Fr(p.x*O+d.x*E),y:Fr(p.y*O+d.y*E)},U={x:I.x-b.x,y:I.y-b.y},q=(N)=\u003e({x:N.center.x+U.x,y:N.center.y+U.y});if(y.some((N)=\u003eBi(q(N.pin),N.peer.center)\u003eBi(N.pin.center,N.peer.center)+Fi))continue;let ct=y.reduce((N,tt)=\u003eN+Bi(tt.pin.center,tt.peer.center),0),Q=y.reduce((N,tt)=\u003eN+Bi(q(tt.pin),tt.peer.center),0);if(ct-Q\u003c4||Q\u003ect*0.75)continue;let k=t.componentPlacements.filter((N)=\u003eN.schematicSheetId===o.schematicSheetId\u0026\u0026N.schematicComponentId!==o.schematicComponentId),st=Ut(I.x,I.y,o.width+0.4,o.height+0.4);if(k.some((N)=\u003eJe(st,Ut(N.schX,N.schY,N.width,N.height))))continue;if(y.some((N)=\u003e{let tt=q(N.pin),J=N.peer.center,W=(Xt(tt,p)+Xt(J,p))/2,j=[tt,{x:p.x*W+d.x*Xt(tt,d),y:p.y*W+d.y*Xt(tt,d)},{x:p.x*W+d.x*Xt(J,d),y:p.y*W+d.y*Xt(J,d)},J];return k.some((G)=\u003eG.schematicComponentId!==N.component.schematicComponentId\u0026\u0026j.slice(1).some((D,et)=\u003eS2(j[et],D,G)))}))continue;let ot=[...new Map(y.map((N)=\u003e[N.component.schematicComponentId,N.component])).values()],Z=o.sourceComponentName||\"component\";e.push({lineItemType:\"ConnectorPositionCausesTraceDetours\",connectorSchematicBox:o,connectedComponents:ot,schematicTraceIds:[...new Set(x.map((N)=\u003eN.schematic_trace_id))],evaluatedSignalCount:y.length,newSchX:I.x,newSchY:I.y,deltaSchX:Fr(U.x),deltaSchY:Fr(U.y),currentTotalSignalDistance:Fr(ct),suggestedTotalSignalDistance:Fr(Q),message:`Move ${Z} to schX=${I.x}, schY=${I.y} so its signal pins face ${ot.map((N)=\u003eN.sourceComponentName||\"component\").join(\", \")}. Preserve rotation and pin assignments; reroute the connections and attached rail labels.`})}this.solved=!0}static issueToString(t){let e=[];S(e,\"connectorComponentName\",t.connectorSchematicBox.sourceComponentName),S(e,\"connectedComponents\",t.connectedComponents.map((r)=\u003er.sourceComponentName||\"component\").join(\",\"));for(let r of[\"evaluatedSignalCount\",\"newSchX\",\"newSchY\",\"deltaSchX\",\"deltaSchY\",\"currentTotalSignalDistance\",\"suggestedTotalSignalDistance\"])S(e,r,t[r]);return S(e,\"message\",t.message),`\u003cConnectorPositionCausesTraceDetours ${e.join(\" \")} /\u003e`}}function wm(t,e,r){let i=t.edges[0]?.from,n=t.edges.at(-1)?.to;return!!i\u0026\u0026!!n\u0026\u0026(Re(i,e)\u0026\u0026Re(n,r)||Re(i,r)\u0026\u0026Re(n,e))}function v2(t){let e,r=0;for(let i=0;i\u003ct.edges.length;i++){let n=t.edges[i];if(i\u003e0\u0026\u0026!Re(t.edges[i-1].to,n.from))return 0;if(Re(n.from,n.to))continue;let a=Math.abs(n.from.y-n.to.y)\u003cFi?\"x\":Math.abs(n.from.x-n.to.x)\u003cFi?\"y\":void 0;if(!a)return 0;if(e\u0026\u0026e!==a)r++;e=a}return r}function S2(t,e,r){let i=Ut(r.schX,r.schY,r.width+0.2,r.height+0.2);return Math.max(t.x,e.x)\u003ei.left\u0026\u0026Math.min(t.x,e.x)\u003ci.right\u0026\u0026Math.max(t.y,e.y)\u003ei.bottom\u0026\u0026Math.min(t.y,e.y)\u003ci.top}class Ir extends at{index;positiveNets=new Set;transistorIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t);for(let r of t.circuitJson)if(r.type===\"source_net\"\u0026\u0026r.is_positive_voltage_source)this.positiveNets.add(this.index.connected(r.source_net_id));this.transistorIds=[...this.index.components.values()].filter((r)=\u003er.ftype===\"simple_transistor\"\u0026\u0026r.transistor_type===\"npn\").map((r)=\u003er.source_component_id),this.solved=this.transistorIds.length===0}_step(){let t=this.transistorIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.transistorIds.length,!t)return;let e=this.index,r=e.placement(t);if(!r||e.portsByComponent.get(t)?.length!==3)return;let i=e.namedPort(t,\"base\"),n=e.namedPort(t,\"collector\"),a=e.namedPort(t,\"emitter\");if(!i||!n||!a)return;let o=e.connected(i.source_port_id),c=e.connected(n.source_port_id),l=e.connected(a.source_port_id);if(new Set([o,c,l]).size!==3||!e.groundNets.has(l)||e.powerNets.has(l)||e.isRail(o)||e.isRail(c))return;let s=(e.portsByNet.get(o)??[]).filter((tt)=\u003ett.source_component_id!==t);if(s.length!==1)return;let p=s[0].source_component_id,d=e.components.get(p),m=e.placement(p),y=e.twoTerminalNets(p)?.find((tt)=\u003ett!==o);if(d?.ftype!==\"simple_resistor\"||d.resistance\u003c=0||!m||!e.sameLocalScope(r,m)||!y||e.isRail(y)||y===c)return;let f=(e.portsByNet.get(c)??[]).filter((tt)=\u003ett.source_component_id!==t),_=f.filter((tt)=\u003ee.components.get(tt.source_component_id)?.ftype===\"simple_chip\");if(_.length!==1)return;let x=_[0].source_component_id,Y=e.placement(x),M=e.twoTerminalNets(x)?.find((tt)=\u003ett!==c);if(!Y||!e.sameLocalScope(r,Y)||!M||!this.positiveNets.has(M)||e.groundNets.has(M))return;let O=f.filter((tt)=\u003ett.source_component_id!==x);if(O.length!==1)return;let X=O[0].source_component_id,E=e.placement(X),I=e.namedPort(X,\"anode\"),U=e.namedPort(X,\"cathode\");if(e.components.get(X)?.ftype!==\"simple_diode\"||!e.twoTerminalNets(X)||!I||!U||e.connected(I.source_port_id)!==c||e.connected(U.source_port_id)!==M||!E||!e.sameLocalScope(r,E))return;let q=e.port(n),ct=e.port(a),Q=e.port(i);if(!q||!ct||!Q)return;let k=q.facing_direction,st=ct.facing_direction;if(!k||!st)return;let ot=[];if(r.schY\u003e=Y.schY)ot.push(\"transistor_not_below_load\");if(k!==\"up\")ot.push(\"collector_not_up\");if(st!==\"down\")ot.push(\"emitter_not_down\");if(ot.length===0)return;let Z=r.sourceComponentName||\"component\",N=Y.sourceComponentName||\"component\";this.issues.push({lineItemType:\"LowSideTransistorNotAlignedWithLoad\",transistorSchematicBox:r,loadSchematicBox:Y,baseResistorSchematicBox:m,clampDiodeSchematicBox:E,collectorSourcePortId:n.source_port_id,emitterSourcePortId:a.source_port_id,collectorFacingDirection:k,emitterFacingDirection:st,placementProblems:ot,message:`Arrange ${Z} below ${N}, with its collector facing up toward the load and emitter facing down toward ground; place ${m.sourceComponentName||\"component\"} beside the base. Preserve all pin connections and reroute affected traces.`})}static issueToString(t){let e=[];return S(e,\"transistorName\",t.transistorSchematicBox.sourceComponentName),S(e,\"loadName\",t.loadSchematicBox.sourceComponentName),S(e,\"baseResistorName\",t.baseResistorSchematicBox.sourceComponentName),S(e,\"clampDiodeName\",t.clampDiodeSchematicBox.sourceComponentName),S(e,\"placementProblems\",t.placementProblems.join(\",\")),S(e,\"collectorFacingDirection\",t.collectorFacingDirection),S(e,\"emitterFacingDirection\",t.emitterFacingDirection),S(e,\"message\",t.message),`\u003cLowSideTransistorNotAlignedWithLoad ${e.join(\" \")} /\u003e`}}class Mr extends at{params;index;hostIds;reportedPairs=new Set;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=\u003ee.ftype===\"simple_chip\").map((e)=\u003ee.source_component_id),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.hostIds.length,!t)return;let e=this.index.portsByComponent.get(t)??[],r=e.filter((O)=\u003eAm(O)===\"positive\"),i=e.filter((O)=\u003eAm(O)===\"negative\");if(r.length!==1||i.length!==1)return;let n=r[0],a=i[0],o=this.seriesResistor(n),c=this.seriesResistor(a);if(!o||!c||o.axis!==c.axis||!this.index.sameLocalScope(o.placement,c.placement)||new Set([o.hostNet,c.hostNet,o.interfaceNet,c.interfaceNet]).size!==4||!this.shareInterface(o,c,t))return;let l=[o.id,c.id].sort().join(\"\\x00\");if(this.reportedPairs.has(l))return;let s=o.placement,p=c.placement,d=o.axis===\"horizontal\",m=Math.abs(d?s.schX-p.schX:s.schY-p.schY),u=Math.abs(d?s.schY-p.schY:s.schX-p.schX),y=d?s.width:s.height,f=d?p.width:p.height,_=d?s.height:s.width,x=d?p.height:p.width;if(m-(y+f)/2\u003cMath.max(y,f)||u\u003e=(_+x)/2-0.01)return;this.reportedPairs.add(l);let b=s.sourceComponentName||\"component\",M=p.sourceComponentName||\"component\";this.params.issues.push({lineItemType:\"UsbSeriesResistorsNotAligned\",positiveResistorSchematicBox:s,negativeResistorSchematicBox:p,hostSourceComponentId:t,positiveSourcePortId:n.source_port_id,negativeSourcePortId:a.source_port_id,signalAxis:o.axis,message:`Place ${b} (D+) and ${M} (D−) near each other and draw clear traces to their corresponding USB ports. Exact alignment is not required; preserve pin assignments and leave space for labels.`})}seriesResistor(t){let e=this.index,r=e.connected(t.source_port_id);if(e.isRail(r))return;let i=new Set((e.portsByNet.get(r)??[]).filter((u)=\u003ee.components.get(u.source_component_id)?.ftype===\"simple_resistor\").map((u)=\u003eu.source_component_id));if(i.size!==1)return;let n=[...i][0],o=e.twoTerminalNets(n)?.find((u)=\u003eu!==r),c=e.placement(n);if(!o||e.isRail(o)||!c)return;if((e.portsByNet.get(o)??[]).some((u)=\u003eu.source_component_id!==n\u0026\u0026e.components.get(u.source_component_id)?.ftype===\"simple_resistor\"))return;let l=e.portsByComponent.get(n).map((u)=\u003ee.port(u)),[s,p]=l;if(!s||!p)return;let d=new Set([s.facing_direction,p.facing_direction]),m;if(d.has(\"left\")\u0026\u0026d.has(\"right\")\u0026\u0026Math.abs(s.center.y-p.center.y)\u003c0.01)m=\"horizontal\";else if(d.has(\"up\")\u0026\u0026d.has(\"down\")\u0026\u0026Math.abs(s.center.x-p.center.x)\u003c0.01)m=\"vertical\";else return;return{id:n,placement:c,hostNet:r,interfaceNet:o,axis:m}}shareInterface(t,e,r){let i=(a)=\u003enew Set((this.index.portsByNet.get(a)??[]).map((o)=\u003eo.source_component_id).filter((o)=\u003eo!==r\u0026\u0026o!==t.id\u0026\u0026o!==e.id\u0026\u0026(this.index.portsByComponent.get(o)?.length??0)\u003e2)),n=i(t.interfaceNet);return[...i(e.interfaceNet)].some((a)=\u003en.has(a))}static issueToString(t){let e=[];return S(e,\"positiveResistorName\",t.positiveResistorSchematicBox.sourceComponentName),S(e,\"negativeResistorName\",t.negativeResistorSchematicBox.sourceComponentName),S(e,\"signalAxis\",t.signalAxis),S(e,\"message\",t.message),`\u003cUsbSeriesResistorsNotAligned ${e.join(\" \")} /\u003e`}}function Am(t){let e=new Set;for(let r of[t.name,...t.port_hints??[]]){let i=r.toUpperCase();if(/^(?:USB_?)?D(?:P|\\+|_POS)$/.test(i))e.add(\"positive\");if(/^(?:USB_?)?D(?:M|N|-|_NEG)$/.test(i))e.add(\"negative\")}return e.size===1?[...e][0]:void 0}function Bm(t){return t.filter((e)=\u003ee!==void 0).reduce((e,r)=\u003efn(e,r),{})}function Fm(t,e,r){return{rects:[{center:{x:t.schX,y:t.schY},width:t.width,height:t.height,stroke:e,fill:e.replace(\"0.95\",\"0.15\"),label:r}]}}function Pm(t){return{rects:t.filter((r)=\u003er.type===\"schematic_box\").map((r)=\u003e{let i=r;return{center:{x:i.x,y:i.y},width:i.width,height:i.height,stroke:\"hsl(0,0%,60%)\"}})}}class re extends at{static EPSILON=0.01;static ORIENTATION_MESSAGE='Use schOrientation=\"vertical\" on this capacitor to fix the symbol orientation';ctx;out;schematicComponentById;sourceComponentById;capacitorPlacements;feedbackCapacitorIds;currentPlacementIndex=0;horizontalSymbolNames=new Set([\"capacitor_left\",\"capacitor_right\"]);constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e,this.schematicComponentById=this.buildSchematicComponentById(t.circuitJson),this.sourceComponentById=this.buildSourceComponentById(t.circuitJson),this.capacitorPlacements=this.getCapacitorPlacements();let r=new At(t);this.feedbackCapacitorIds=new Set(this.capacitorPlacements.flatMap((i)=\u003ei.sourceComponentId\u0026\u0026r.isDirectOpAmpFeedback(i.sourceComponentId)?[i.sourceComponentId]:[])),this.solved=this.capacitorPlacements.length===0}getCapacitorPlacements(){return this.ctx.componentPlacements.filter((t)=\u003et.sourceComponentId!==void 0\u0026\u0026this.sourceComponentById.get(t.sourceComponentId)?.ftype===\"simple_capacitor\").map((t)=\u003e({schX:t.schX,schY:t.schY,width:t.width,height:t.height,sourceComponentId:t.sourceComponentId,sourceComponentName:t.sourceComponentName,schematicComponentId:t.schematicComponentId,schematicSheetId:t.schematicSheetId,schematicSheetName:t.schematicSheetName}))}_step(){let t=this.capacitorPlacements[this.currentPlacementIndex];if(!t){this.solved=!0;return}this.currentPlacementIndex+=1,this.solved=this.currentPlacementIndex\u003e=this.capacitorPlacements.length;let e=this.getIssueForPlacement(t);if(e)this.out.push(e)}visualize(){let t=this.getFocusedPlacement();return Bm([Pm(this.ctx.circuitJson),t?Fm(t,\"hsl(210, 100%, 50%, 0.95)\",\"capacitorOrientation\"):void 0])}getFocusedPlacement(){if(this.capacitorPlacements.length===0)return;let t=this.iterations===0?this.currentPlacementIndex:Math.max(0,this.currentPlacementIndex-1);return this.capacitorPlacements[t]}buildSchematicComponentById(t){return new Map(t.filter((e)=\u003ee.type===\"schematic_component\").map((e)=\u003e[e.schematic_component_id,e]))}buildSourceComponentById(t){return new Map(t.flatMap((e)=\u003e{if(e.type!==\"source_component\"||!(\"source_component_id\"in e)||typeof e.source_component_id!==\"string\")return[];return[{type:\"source_component\",source_component_id:e.source_component_id,ftype:\"ftype\"in e\u0026\u0026typeof e.ftype===\"string\"?e.ftype:void 0}]}).map((e)=\u003e[e.source_component_id,e]))}createIssuePlacement(t){return{positionAnchor:\"center\",schX:t.schX,schY:t.schY,width:t.width,height:t.height,sourceComponentId:t.sourceComponentId,sourceComponentName:t.sourceComponentName,schematicComponentId:t.schematicComponentId,schematicSheetId:t.schematicSheetId,schematicSheetName:t.schematicSheetName}}getIssueForPlacement(t){if(!t.schematicComponentId||!t.sourceComponentId)return;let e=this.schematicComponentById.get(t.schematicComponentId);if(!e)return;if(!this.horizontalSymbolNames.has(e.symbol_name??\"\"))return;if(this.feedbackCapacitorIds.has(t.sourceComponentId))return;if(this.isInlineWithHorizontalTraces(t.schematicComponentId))return;return{lineItemType:\"CapacitorSymbolHorizontal\",schematicBox:this.createIssuePlacement(t),message:re.ORIENTATION_MESSAGE}}isInlineWithHorizontalTraces(t){let e=this.ctx.circuitJson.filter((i)=\u003ei.type===\"schematic_port\"\u0026\u0026i.schematic_component_id===t);if(e.length!==2)return!1;let r=e.map((i)=\u003ethis.getOutwardHorizontalTrace(i));return r.every((i)=\u003ei!==void 0)\u0026\u0026r.some((i)=\u003ei!==void 0\u0026\u0026i.edges.every((n)=\u003eMath.abs(n.from.y-n.to.y)\u003c=re.EPSILON))}getOutwardHorizontalTrace(t){if(t.facing_direction!==\"left\"\u0026\u0026t.facing_direction!==\"right\")return;return this.ctx.circuitJson.find((e)=\u003ee.type===\"schematic_trace\"\u0026\u0026e.schematic_sheet_id===t.schematic_sheet_id\u0026\u0026e.edges.some((r)=\u003e{let i=this.pointsEqual(r.from,t.center)?r.to:this.pointsEqual(r.to,t.center)?r.from:void 0;return i!==void 0\u0026\u0026Math.abs(i.y-t.center.y)\u003c=re.EPSILON\u0026\u0026(t.facing_direction===\"left\"?i.x\u003ct.center.x-re.EPSILON:i.x\u003et.center.x+re.EPSILON)}))}pointsEqual(t,e){return Math.abs(t.x-e.x)\u003c=re.EPSILON\u0026\u0026Math.abs(t.y-e.y)\u003c=re.EPSILON}static issueToString(t){let e=[];return S(e,\"componentName\",t.schematicBox.sourceComponentName),S(e,\"schX\",t.schematicBox.schX),S(e,\"schY\",t.schematicBox.schY),S(e,\"width\",t.schematicBox.width),S(e,\"height\",t.schematicBox.height),S(e,\"message\",t.message),`\u003cCapacitorSymbolHorizontal ${e.join(\" \")} /\u003e`}}class Se extends at{params;static MIN_BODY_GAP=1;banks=[];netNames=new Map;bankIndex=0;constructor(t){super();this.params=t;let e=new At(t.ctx),r=new Set(e.powerNets),i=new Set(e.groundNets);for(let n of t.ctx.circuitJson)if(n.type===\"source_net\"){let a=e.connected(n.source_net_id);if(!this.netNames.has(a))this.netNames.set(a,n.name)}for(let n of e.portsByComponent.values())for(let a of n){if(a.do_not_connect)continue;let o=e.connected(a.source_port_id);if(a.provides_power||a.requires_power)r.add(o);if(a.provides_ground||a.requires_ground)i.add(o);if((r.has(o)||i.has(o))\u0026\u0026!this.netNames.has(o))this.netNames.set(o,a.name)}for(let n of e.components.values()){if(n.ftype!==\"simple_capacitor\")continue;let a=n.source_component_id,o=e.placement(a),c=e.twoTerminalNets(a),l=e.portsByComponent.get(a);if(!o||!c||!l||l.some((m)=\u003e{let u=e.port(m);return m.do_not_connect||!u||u.schematic_sheet_id!==o.schematicSheetId}))continue;let s=c.find((m)=\u003er.has(m)\u0026\u0026!i.has(m)),p=c.find((m)=\u003ei.has(m)\u0026\u0026!r.has(m));if(!s||!p)continue;let d=this.banks.find((m)=\u003em.power===s\u0026\u0026m.ground===p\u0026\u0026e.sameLocalScope(m.capacitors[0],o));if(d)d.capacitors.push(o);else this.banks.push({power:s,ground:p,capacitors:[o]})}this.solved=this.banks.length===0}_step(){let t=this.banks[this.bankIndex++];if(this.solved=this.bankIndex\u003e=this.banks.length,t.capacitors.length\u003c2)return;let e=Math.max(Se.MIN_BODY_GAP,...t.capacitors.map((o)=\u003eMath.max(o.width,o.height))),r=0,i=t.capacitors.slice(1).map((o)=\u003e({box:o,gap:Se.bodyGap(t.capacitors[0],o)}));while(i.length\u003e0){let o=0;for(let l=1;l\u003ci.length;l++)if(i[l].gap\u003ci[o].gap)o=l;let c=i.splice(o,1)[0];r=Math.max(r,c.gap);for(let l of i)l.gap=Math.min(l.gap,Se.bodyGap(c.box,l.box))}if(r\u003c=e+0.000001)return;let n=this.netNames.get(t.power)??\"power\",a=this.netNames.get(t.ground)??\"ground\";this.params.issues.push({lineItemType:\"DecouplingCapacitorsNotCloseTogether\",railName:n,groundName:a,capacitorSchematicBoxes:t.capacitors,maxBodyGap:r,maxRecommendedBodyGap:e,message:`Group the decoupling capacitors between ${n} and ${a} closer together in this schematic block. Preserve their net connections.`})}static bodyGap(t,e){return Math.hypot(Math.max(0,Math.abs(t.schX-e.schX)-(t.width+e.width)/2),Math.max(0,Math.abs(t.schY-e.schY)-(t.height+e.height)/2))}static issueToString(t){let e=[];return S(e,\"rail\",t.railName),S(e,\"ground\",t.groundName),S(e,\"capacitorNames\",t.capacitorSchematicBoxes.map((r)=\u003er.sourceComponentName||\"component\").join(\", \")),S(e,\"maxBodyGap\",t.maxBodyGap),S(e,\"maxRecommendedBodyGap\",t.maxRecommendedBodyGap),S(e,\"message\",t.message),`\u003cDecouplingCapacitorsNotCloseTogether ${e.join(\" \")} /\u003e`}}function kr(t){let e=t.anchor_side;if(e===\"top\"||e===\"bottom\"){let l=t.anchor_position?.y??t.center.y,s=(t.text?.length??8)*0.13/2+0.1,p=t.center.x-0.1,d=t.center.x+0.1;if(e===\"top\")return{left:p,right:d,top:l,bottom:l-s*2};return{left:p,right:d,top:l+s*2,bottom:l}}let i=t.anchor_position?.x??t.center.x,a=Math.abs(t.center.x-i)+0.1,o=t.center.y+0.1,c=t.center.y-0.1;if(t.center.x\u003e=i)return{left:i,right:t.center.x+a,top:o,bottom:c};return{left:t.center.x-a,right:i,top:o,bottom:c}}class Oe extends at{params;placements;netLabelsByComponentId;rawCollisions=[];firstIndex=0;secondIndex=1;constructor(t){super();this.params=t;this.placements=t.ctx.componentPlacements,this.netLabelsByComponentId=this.buildNetLabelsByComponentId(t.ctx.circuitJson),this.solved=this.placements.length\u003c2}_step(){if(this.firstIndex\u003e=this.placements.length-1){this.buildAndPushIssues(),this.solved=!0;return}let t=this.placements[this.firstIndex],e=this.placements[this.secondIndex];if(this.detectPair(t,e),this.secondIndex++,this.secondIndex\u003e=this.placements.length)this.firstIndex++,this.secondIndex=this.firstIndex+1}detectPair(t,e){if(t.schematicSheetId!==e.schematicSheetId)return;this.rawCollisions.push(...this.detectLabelLabel(t,e)),this.rawCollisions.push(...this.detectBoxLabel(t,e)),this.rawCollisions.push(...this.detectBoxLabel(e,t))}detectLabelLabel(t,e){let r=t,i=e;if(t.schX\u003ee.schX)r=e,i=t;let n=r.schematicComponentId,a=i.schematicComponentId;if(!n||!a)return[];let o=this.netLabelsByComponentId.get(n)??[],c=this.netLabelsByComponentId.get(a)??[];if(o.length===0||c.length===0)return[];let l=[];for(let s of o)for(let p of c){let d=kr(s),m=kr(p);if(Je(d,m))l.push({type:\"label-label\",bounds:{left:Math.max(d.left,m.left),right:Math.min(d.right,m.right),top:Math.min(d.top,m.top),bottom:Math.max(d.bottom,m.bottom)},leftComp:r,rightComp:i,leftId:n,rightId:a,xSeparation:d.right-m.left+0.1})}return l}detectBoxLabel(t,e){let r=t.schematicComponentId,i=e.schematicComponentId;if(!r||!i)return[];let n=this.netLabelsByComponentId.get(i)??[];if(n.length===0)return[];let a=Ut(t.schX,t.schY,t.width,t.height),o=t.schX\u003c=e.schX,c=[];for(let l of n){let s=kr(l);if(!Je(a,s))continue;let p;if(o)p=a.right-s.left+0.1;else p=s.right-a.left+0.1;c.push({type:\"box-label\",bounds:{left:Math.max(a.left,s.left),right:Math.min(a.right,s.right),top:Math.min(a.top,s.top),bottom:Math.max(a.bottom,s.bottom)},boxComp:t,labelComp:e,boxId:r,labelId:i,xSeparation:p})}return c}buildAndPushIssues(){if(this.rawCollisions.length===0)return;let t=new Map;for(let e of this.rawCollisions){let i=(e.type===\"label-label\"?e.leftComp:e.boxComp).schematicSheetId??\"\",n=t.get(i);if(n)n.push(e);else t.set(i,[e])}for(let e of t.values())this.buildAndPushIssueForSheet(e)}buildAndPushIssueForSheet(t){let e=this.computeGlobalFixes(t);if(e.size===0)return;let r=new Set,i=[];for(let o of t){let c,l;if(o.type===\"label-label\")c=o.leftComp.sourceComponentName??\"\",l=o.rightComp.sourceComponentName??\"\";else c=o.boxComp.sourceComponentName??\"\",l=o.labelComp.sourceComponentName??\"\";let s=`${c}/${l}`;if(!r.has(s))r.add(s),i.push({comp1Name:c,comp2Name:l})}let n=t[0],a=n.type===\"label-label\"?n.leftComp:n.boxComp;this.params.issues.push({lineItemType:\"NetLabelCollision\",schematicSheetId:a.schematicSheetId,schematicSheetName:a.schematicSheetName,pairs:i,collisionBounds:t.map((o)=\u003eo.bounds),moves:Array.from(e.values())})}computeGlobalFixes(t){let e=new Map;for(let s of this.placements)if(s.schematicComponentId)e.set(s.schematicComponentId,s);let r=new Map,i=(s,p,d)=\u003e{let m=e.get(s),u=e.get(p);if(!m||!u)return;let y=u.schX-m.schX+d,f=`${s}|${p}`;r.set(f,Math.max(r.get(f)??0,y))};for(let s of t)if(s.type===\"label-label\")i(s.leftId,s.rightId,s.xSeparation);else if(s.boxComp.schX\u003c=s.labelComp.schX)i(s.boxId,s.labelId,s.xSeparation);else i(s.labelId,s.boxId,s.xSeparation);let n=[...r.entries()].map(([s,p])=\u003e{let d=s.indexOf(\"|\");return{leftId:s.slice(0,d),rightId:s.slice(d+1),minSep:p}}),a=new Set,o=new Map;for(let{leftId:s,rightId:p}of n){if(a.add(s),a.add(p),!o.has(s))o.set(s,new Set);if(!o.has(p))o.set(p,new Set);o.get(s).add(p),o.get(p).add(s)}let c=new Set,l=new Map;for(let s of a){if(c.has(s))continue;let p=[],d=[s];c.add(s);while(d.length){let _=d.shift();p.push(_);for(let x of o.get(_)??[])if(!c.has(x))c.add(x),d.push(x)}p.sort((_,x)=\u003e(e.get(_)?.schX??0)-(e.get(x)?.schX??0));let m=new Set(p),u=n.filter((_)=\u003em.has(_.leftId)\u0026\u0026m.has(_.rightId)),y=new Map;for(let _ of p){let x=e.get(_)?.schX??0;for(let{leftId:Y,rightId:b,minSep:M}of u)if(b===_\u0026\u0026y.has(Y))x=Math.max(x,y.get(Y)+M);y.set(_,x)}let f=[...y.entries()].reduce((_,[x,Y])=\u003e_+(Y-(e.get(x)?.schX??0)),0);if(f\u003e0.000000001){let _=f/p.length,x=new Map;for(let b of p){let M=(e.get(b)?.schX??0)-_;for(let{leftId:O,rightId:X,minSep:E}of u)if(X===b\u0026\u0026x.has(O))M=Math.max(M,x.get(O)+E);x.set(b,M)}let Y=(b)=\u003e[...b.entries()].reduce((M,[O,X])=\u003eMath.max(M,Math.abs(X-(e.get(O)?.schX??0))),0);if(Y(x)\u003cY(y))for(let[b,M]of x)y.set(b,M)}for(let[_,x]of y){let Y=e.get(_);if(!Y||Math.abs(x-Y.schX)\u003c0.000000001)continue;l.set(_,{componentName:Y.sourceComponentName||\"component\",newSchX:Math.round(x*100)/100,newSchY:Math.round(Y.schY*100)/100})}}return l}buildNetLabelsByComponentId(t){let r=[];for(let n of t){if(n.type!==\"schematic_port\")continue;let a=n;if(!a.schematic_component_id)continue;r.push({componentId:a.schematic_component_id,cx:a.center.x,cy:a.center.y,schematicSheetId:a.schematic_sheet_id})}let i=new Map;for(let n of t){if(n.type!==\"schematic_net_label\")continue;let a=n;if(!a.anchor_position)continue;let{x:o,y:c}=a.anchor_position,l=r.filter((m)=\u003em.schematicSheetId===a.schematic_sheet_id\u0026\u0026Math.hypot(m.cx-o,m.cy-c)\u003c0.0001);if(l.length===0)continue;if(new Set(l.map((m)=\u003em.componentId)).size!==1)continue;let p=l[0].componentId,d=i.get(p)??[];d.push(a),i.set(p,d)}return i}static netLabelCollisionToString(t){let e=t.pairs.map((i,n)=\u003e`pair${n+1}=\"${i.comp1Name}/${i.comp2Name}\"`).join(\" \"),r=t.moves.map((i)=\u003e` \u003cMove componentName=\"${i.componentName}\" newSchX=\"${i.newSchX}\" newSchY=\"${i.newSchY}\" /\u003e`);return[`\u003cComponentNetLabelCollision ${e}\u003e`,' \u003cSuggestedFix note=\"Apply all moves simultaneously. Set schAutoLayoutEnabled on your circuit.\"\u003e',...r,\" \u003c/SuggestedFix\u003e\",\"\u003c/ComponentNetLabelCollision\u003e\"].join(`\n`)}}class je extends at{static ALIGNMENT_EPSILON=0.01;ctx;out;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e}_step(){let t=new Map(this.ctx.circuitJson.filter((i)=\u003ei.type===\"schematic_port\").map((i)=\u003e[i.schematic_port_id,i])),e=new Map(this.ctx.componentPlacements.flatMap((i)=\u003ei.schematicComponentId?[[i.schematicComponentId,i]]:[])),r=new Map;for(let i of this.ctx.circuitJson.filter((n)=\u003en.type===\"schematic_trace\")){let n=this.getTracePinPair(i,t);if(!n)continue;let a=n.firstPort.schematic_component_id,o=n.secondPort.schematic_component_id;if(!a||!o||a===o)continue;let c=a\u003co?n:{firstPort:n.secondPort,secondPort:n.firstPort},l=[a,o].sort().join(\"\\x00\"),s=r.get(l)??[];if(!s.some((d)=\u003ed.firstPort.schematic_port_id===c.firstPort.schematic_port_id\u0026\u0026d.secondPort.schematic_port_id===c.secondPort.schematic_port_id))s.push(c);r.set(l,s)}for(let i of r.values()){let n=this.findVerticalShiftIssue(i,e);if(n)this.out.push(n)}this.solved=!0}getTracePinPair(t,e){let r=t.edges?.[0],i=t.edges?.at(-1);if(!r||!i)return;let n=r.from_schematic_port_id??r.to_schematic_port_id,a=i.to_schematic_port_id??i.from_schematic_port_id,o=[...e.values()],c=n?e.get(n):this.findPortAtPoint(o,r.from,t.schematic_sheet_id),l=a?e.get(a):this.findPortAtPoint(o,i.to,t.schematic_sheet_id);if(!c||!l)return;if(c.schematic_port_id===l.schematic_port_id)return;if(c.schematic_sheet_id!==l.schematic_sheet_id)return;return{firstPort:c,secondPort:l}}findPortAtPoint(t,e,r){let{ALIGNMENT_EPSILON:i}=je;return t.find((n)=\u003en.schematic_sheet_id===r\u0026\u0026Math.abs(n.center.x-e.x)\u003c=i\u0026\u0026Math.abs(n.center.y-e.y)\u003c=i)}findVerticalShiftIssue(t,e){let r=t[0];if(!r)return;let i=e.get(r.firstPort.schematic_component_id),n=e.get(r.secondPort.schematic_component_id);if(!i||!n)return;let[a,o]=i.schX\u003c=n.schX?[i,n]:[n,i],c=t.flatMap((f)=\u003e{let[_,x]=f.firstPort.center.x\u003c=f.secondPort.center.x?[f.firstPort,f.secondPort]:[f.secondPort,f.firstPort];return _.facing_direction===\"right\"\u0026\u0026x.facing_direction===\"left\"?[{leftPort:_,rightPort:x}]:[]});if(c.length\u003c2)return;let{ALIGNMENT_EPSILON:l}=je,s=c.filter(({leftPort:f,rightPort:_})=\u003eMath.abs(f.center.y-_.center.y)\u003c=l).length,p=[];for(let f of c){let _=f.leftPort.center.y-f.rightPort.center.y;if(Math.abs(_)\u003c=l)continue;let x=p.find((Y)=\u003eMath.abs(Y.deltaSchY-_)\u003c=l);if(x)x.pairs.push(f);else p.push({deltaSchY:_,pairs:[f]})}let d=p.sort((f,_)=\u003e_.pairs.length-f.pairs.length||Math.abs(f.deltaSchY)-Math.abs(_.deltaSchY))[0];if(!d||d.pairs.length\u003c2||d.pairs.length\u003c=s)return;let m=o.sourceComponentName||\"component\",u=d.deltaSchY,y=o.schY+u;return{lineItemType:\"ComponentPinsWouldAlignWithVerticalShift\",firstComponent:a,secondComponent:o,targetComponent:o,deltaSchY:u,newSchY:y,currentlyAlignedPinCount:s,alignedPinCount:d.pairs.length,alignedPinPairs:d.pairs.map(({leftPort:f,rightPort:_})=\u003e({firstPin:this.getPinLabel(f),secondPin:this.getPinLabel(_)})),message:`shift ${m} vertically by ${$s(u)} to align ${d.pairs.length} connected pin pairs`}}getPinLabel(t){return t.display_pin_label??t.pin_number?.toString()}static issueToString(t){let e=[];return S(e,\"firstComponentName\",t.firstComponent.sourceComponentName),S(e,\"secondComponentName\",t.secondComponent.sourceComponentName),S(e,\"targetComponentName\",t.targetComponent.sourceComponentName),S(e,\"deltaSchY\",t.deltaSchY),S(e,\"newSchY\",t.newSchY),S(e,\"currentlyAlignedPinCount\",t.currentlyAlignedPinCount),S(e,\"alignedPinCount\",t.alignedPinCount),S(e,\"message\",t.message),`\u003cComponentPinsWouldAlignWithVerticalShift ${e.join(\" \")} /\u003e`}}class $e extends at{static ALIGNMENT_TOLERANCE=0.1;issues;networks;currentNetworkIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.networks=this.findCrystalLoadNetworks(t),this.solved=this.networks.length===0}_step(){let t=this.networks[this.currentNetworkIndex];if(!t){this.solved=!0;return}this.currentNetworkIndex+=1,this.solved=this.currentNetworkIndex\u003e=this.networks.length;let e=vn(t.newSchX-t.crystal.schX),r=vn(t.newSchY-t.crystal.schY);if(Math.abs(e)\u003c=$e.ALIGNMENT_TOLERANCE\u0026\u0026Math.abs(r)\u003c=$e.ALIGNMENT_TOLERANCE)return;let i=t.crystal.sourceComponentName??\"the crystal\",n=t.firstLoadCapacitor.sourceComponentName??\"the first load capacitor\",a=t.secondLoadCapacitor.sourceComponentName??\"the second load capacitor\";this.issues.push({lineItemType:\"CrystalNotCenteredOverLoadCapacitors\",crystalSchematicBox:t.crystal,firstLoadCapacitorSchematicBox:t.firstLoadCapacitor,secondLoadCapacitorSchematicBox:t.secondLoadCapacitor,deltaSchX:e,deltaSchY:r,newSchX:t.newSchX,newSchY:t.newSchY,message:`move ${i} to schX=${t.newSchX}, schY=${t.newSchY} so it is centered between ${n} and ${a} and aligned with their load-side pins`})}findCrystalLoadNetworks(t){let e=new Map,r=new Map,i=new Map,n=new Map(t.componentPlacements.flatMap((c)=\u003ec.sourceComponentId?[[c.sourceComponentId,c]]:[]));for(let c of t.circuitJson){if(c.type===\"source_component\")e.set(c.source_component_id,{sourceComponentId:c.source_component_id,ftype:\"ftype\"in c\u0026\u0026typeof c.ftype===\"string\"?c.ftype:void 0});if(c.type===\"source_port\"\u0026\u0026typeof c.source_component_id===\"string\"\u0026\u0026typeof c.subcircuit_connectivity_map_key===\"string\"){let l={sourcePortId:c.source_port_id,sourceComponentId:c.source_component_id,connectivityKey:c.subcircuit_connectivity_map_key},s=r.get(c.source_component_id)??[];s.push(l),r.set(c.source_component_id,s)}if(c.type===\"schematic_port\"\u0026\u0026c.source_port_id)i.set(c.source_port_id,c)}let a=new Map;for(let c of e.values()){if(c.ftype!==\"simple_capacitor\")continue;let l=r.get(c.sourceComponentId)??[];if(l.length!==2)continue;let s=l[0],p=l[1],d=n.get(c.sourceComponentId);if(!d)continue;for(let[m,u]of[[s,p],[p,s]]){let y=i.get(m.sourcePortId);if(!y)continue;let f=a.get(m.connectivityKey)??[];f.push({capacitor:d,loadPort:y,returnConnectivityKey:u.connectivityKey}),a.set(m.connectivityKey,f)}}let o=[];for(let c of e.values()){if(c.ftype!==\"simple_crystal\"\u0026\u0026c.ftype!==\"simple_chip\")continue;let l=r.get(c.sourceComponentId)??[];if(l.length!==2||l[0].connectivityKey===l[1].connectivityKey)continue;let s=l[0].connectivityKey,p=l[1].connectivityKey;if(![...r.entries()].some(([b,M])=\u003eb!==c.sourceComponentId\u0026\u0026M.length\u003e2\u0026\u0026M.some((O)=\u003eO.connectivityKey===s)\u0026\u0026M.some((O)=\u003eO.connectivityKey===p)))continue;let m=n.get(c.sourceComponentId);if(!m)continue;let u=a.get(l[0].connectivityKey)??[],y=a.get(l[1].connectivityKey)??[],f=u.flatMap((b)=\u003ey.flatMap((M)=\u003e{if(b.capacitor.sourceComponentId===M.capacitor.sourceComponentId||b.returnConnectivityKey!==M.returnConnectivityKey||b.returnConnectivityKey===s||b.returnConnectivityKey===p||b.capacitor.schematicSheetId!==m.schematicSheetId||M.capacitor.schematicSheetId!==m.schematicSheetId)return[];return[{firstConnection:b,secondConnection:M}]}));if(f.length===0)continue;let _=f.toSorted((b,M)=\u003eIm(b,m)-Im(M,m))[0],x=[_.firstConnection.loadPort,_.secondConnection.loadPort],Y=[_.firstConnection.capacitor,_.secondConnection.capacitor].toSorted((b,M)=\u003eb.schX-M.schX);o.push({crystal:m,firstLoadCapacitor:Y[0],secondLoadCapacitor:Y[1],newSchX:vn((x[0].center.x+x[1].center.x)/2),newSchY:vn((x[0].center.y+x[1].center.y)/2)})}return o}static issueToString(t){let e=[];return S(e,\"crystalName\",t.crystalSchematicBox.sourceComponentName),S(e,\"firstLoadCapacitorName\",t.firstLoadCapacitorSchematicBox.sourceComponentName),S(e,\"secondLoadCapacitorName\",t.secondLoadCapacitorSchematicBox.sourceComponentName),S(e,\"newSchX\",t.newSchX),S(e,\"newSchY\",t.newSchY),S(e,\"deltaSchX\",t.deltaSchX,{formatDelta:!0}),S(e,\"deltaSchY\",t.deltaSchY,{formatDelta:!0}),S(e,\"message\",t.message),`\u003cCrystalNotCenteredOverLoadCapacitors ${e.join(\" \")} /\u003e`}}var Im=(t,e)=\u003eMm(t.firstConnection.capacitor,e)+Mm(t.secondConnection.capacitor,e),Mm=(t,e)=\u003eMath.hypot(t.schX-e.schX,t.schY-e.schY),vn=(t)=\u003eMath.round(t*100)/100;function Us(t){let e=new Map,r=0;function i(n){for(let[,o]of e)if(o.has(n))return o;let a=new Set;return e.set(`connectivity_net${r++}`,a),a}for(let n of t){let a=null;for(let o of n){if(!a)a=i(o);else if(!a.has(o)){let c=i(o);if(c!==a){for(let l of c)a.add(l);e.delete(Array.from(e.entries()).find(([,l])=\u003el===c)[0])}}a.add(o)}}return Object.fromEntries(Array.from(e.entries()).map(([n,a])=\u003e[n,Array.from(a)]))}var A2=class{netMap;idToNetMap;constructor(t){this.netMap=t,this.idToNetMap={};for(let[e,r]of Object.entries(t))for(let i of r)this.idToNetMap[i]=e}addConnections(t){for(let e of t){let r=new Set;for(let n of e){let a=this.idToNetMap[n];if(a)r.add(a)}let i;if(r.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(r.size===1)i=r.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=r.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(let n of r)if(n!==i){this.netMap[i].push(...this.netMap[n]),this.netMap[n]=this.netMap[i];for(let a of this.netMap[i])this.idToNetMap[a]=i}}for(let n of e){if(!this.netMap[i].includes(n))this.netMap[i].push(n);this.idToNetMap[n]=i}}}getIdsConnectedToNet(t){return this.netMap[t]||[]}getNetConnectedToId(t){return this.idToNetMap[t]}areIdsConnected(t,e){if(t===e)return!0;let r=this.getNetConnectedToId(t);if(!r)return!1;let i=this.getNetConnectedToId(e);if(!i)return!1;return r===i||i===t||i===t}areAllIdsConnected(t){let e=this.getNetConnectedToId(t[0]);for(let r of t){let i=this.getNetConnectedToId(r);if(i===void 0)return!1;if(i!==e)return!1}return!0}},Sn=(t)=\u003e{let e=[];for(let i of t)if(i.type===\"source_trace\")e.push([...i.connected_source_port_ids??[],...i.connected_source_net_ids??[]]);else if(i.type===\"source_component\"){if(i.internally_connected_source_port_ids)for(let n of i.internally_connected_source_port_ids)e.push(n)}else if(i.type===\"source_component_internal_connection\")e.push(i.source_port_ids);let r=Us(e);return new A2(r)};class he extends at{static DIODE_FTYPES=new Set([\"simple_led\",\"simple_diode\"]);ctx;out;schematicTraces;currentIndex=0;sourceConnectivity;sourceComponentFtypeById;sourceComponentIdBySourcePortId;schematicPorts;schematicBoxBySourceComponentId;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e;let{circuitJson:r}=t;this.sourceConnectivity=Sn(r),this.sourceComponentFtypeById=this.buildSourceComponentFtypeById(r),this.sourceComponentIdBySourcePortId=this.buildSourceComponentIdBySourcePortId(r),this.schematicPorts=r.filter((i)=\u003ei.type===\"schematic_port\"),this.schematicBoxBySourceComponentId=this.buildSchematicBoxBySourceComponentId(),this.schematicTraces=r.filter((i)=\u003ei.type===\"schematic_trace\"),this.solved=this.schematicTraces.length===0}_step(){let t=this.schematicTraces[this.currentIndex];if(!t){this.solved=!0;return}if(this.currentIndex++,this.solved=this.currentIndex\u003e=this.schematicTraces.length,!t.edges||t.edges.length===0)return;let e=t.edges[0],r=t.edges[t.edges.length-1];if(!e||!r)return;let i=e.from,n=r.to,a=t.schematic_sheet_id,o=this.findSourceComponentIdNearPoint(i,a),c=this.findSourceComponentIdNearPoint(n,a);if(!o||!c)return;let l=this.sourceComponentFtypeById.get(o),s=this.sourceComponentFtypeById.get(c),{DIODE_FTYPES:p}=he;if(!(p.has(l)\u0026\u0026s===\"simple_resistor\"||l===\"simple_resistor\"\u0026\u0026p.has(s)))return;let m=p.has(l)?o:c,u=l===\"simple_resistor\"?o:c,y=this.schematicBoxBySourceComponentId.get(m),f=this.schematicBoxBySourceComponentId.get(u);if(!y||!f)return;let _=this.findNearestPort(p.has(l)?i:n,a),x=this.findNearestPort(l===\"simple_resistor\"?i:n,a);if(!_?.center||!x?.center)return;if(!this.sourceConnectivity.areIdsConnected(_.source_port_id,x.source_port_id))return;let Y=y.sourceComponentName||\"component\",b=f.sourceComponentName||\"component\",M=_?.display_pin_label??_?.pin_number?.toString(),O=x?.display_pin_label??x?.pin_number?.toString(),X=_?.facing_direction,E=x?.facing_direction,I=M?`${Y}.${M}`:Y,U=O?`${b}.${O}`:b,q=(ct)=\u003e({lineItemType:\"DiodeResistorNotAligned\",diodeSchematicBox:y,resistorSchematicBox:f,diodePin:M,resistorPin:O,diodePinFacingDirection:X,resistorPinFacingDirection:E,message:ct});if(!he.isCoLinear(_.center,x.center)){this.out.push(q(`trace has corners — align ${Y} and ${b} on same axis and rotate so ${I} faces ${U}`));return}if(X\u0026\u0026E\u0026\u0026!he.pinsFacingEachOther(_.center,X,x.center,E))this.out.push(q(`${I} and ${U} face away from each other — rotate ${Y} so ${I} faces ${U}`))}static isCoLinear(t,e,r=0.01){return Math.abs(t.x-e.x)\u003cr||Math.abs(t.y-e.y)\u003cr}static pinsFacingEachOther(t,e,r,i){let n=r.x-t.x,a=r.y-t.y,o=e===\"right\"\u0026\u0026n\u003e0||e===\"left\"\u0026\u0026n\u003c0||e===\"up\"\u0026\u0026a\u003e0||e===\"down\"\u0026\u0026a\u003c0,c=i===\"right\"\u0026\u0026n\u003c0||i===\"left\"\u0026\u0026n\u003e0||i===\"up\"\u0026\u0026a\u003c0||i===\"down\"\u0026\u0026a\u003e0;return o\u0026\u0026c}static dist(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}findNearestPort(t,e){let r,i=1/0;for(let n of this.schematicPorts){if(n.schematic_sheet_id!==e)continue;if(!n.center)continue;let a=he.dist(t,n.center);if(a\u003ci)i=a,r=n}return r}findSourceComponentIdNearPoint(t,e){let r=this.findNearestPort(t,e);if(!r||!r.source_port_id)return;return this.sourceComponentIdBySourcePortId.get(r.source_port_id)}buildSourceComponentFtypeById(t){let e=new Map;for(let r of t)if(r.type===\"source_component\"\u0026\u0026\"source_component_id\"in r\u0026\u0026\"ftype\"in r\u0026\u0026typeof r.ftype===\"string\")e.set(r.source_component_id,r.ftype);return e}buildSourceComponentIdBySourcePortId(t){let e=new Map;for(let r of t)if(r.type===\"source_port\"\u0026\u0026\"source_port_id\"in r\u0026\u0026\"source_component_id\"in r\u0026\u0026typeof r.source_port_id===\"string\"\u0026\u0026typeof r.source_component_id===\"string\")e.set(r.source_port_id,r.source_component_id);return e}buildSchematicBoxBySourceComponentId(){let t=new Map;for(let e of this.ctx.componentPlacements)if(e.sourceComponentId)t.set(e.sourceComponentId,e);return t}static issueToString(t){let e=[];return S(e,\"diodeComponentName\",t.diodeSchematicBox.sourceComponentName),S(e,\"diodePin\",t.diodePin),S(e,\"resistorComponentName\",t.resistorSchematicBox.sourceComponentName),S(e,\"resistorPin\",t.resistorPin),S(e,\"message\",t.message),`\u003cDiodeResistorNotAligned ${e.join(\" \")} /\u003e`}}class qe extends at{static MIN_BODY_GAP=4;index;amplifierIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.amplifierIds=[...this.index.components.values()].filter((r)=\u003er.ftype===\"simple_op_amp\").map((r)=\u003er.source_component_id),this.solved=this.amplifierIds.length===0}_step(){let t=this.amplifierIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.amplifierIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.namedPort(t,\"output\"),n=e.namedPort(t,\"inverting_input\");if(!r||!i||!n||!e.port(i)||!e.port(n))return;let a=e.connected(i.source_port_id),o=e.connected(n.source_port_id);if(a===o||e.isRail(a)||e.isRail(o))return;if((e.portsByNet.get(o)??[]).some((d)=\u003ed.source_component_id!==t\u0026\u0026e.components.get(d.source_component_id)?.ftype===\"simple_op_amp\"))return;let c=[],l=new Set;for(let d of e.portsByNet.get(a)??[]){let m=d.source_component_id;if(l.has(m))continue;l.add(m);let u=e.components.get(m);if(u?.ftype!==\"simple_resistor\"\u0026\u0026u?.ftype!==\"simple_capacitor\")continue;if(u.ftype===\"simple_resistor\"\u0026\u0026!(u.resistance\u003e0))continue;let y=e.twoTerminalNets(m);if(!y?.includes(o)||!y.includes(a))continue;let f=e.placement(m);if(!f||!e.sameLocalScope(r,f))return;c.push(f)}let s=c.flatMap((d)=\u003e{let m=B2(r,d),u=Math.max(qe.MIN_BODY_GAP,3*Math.max(d.width,d.height));return m\u003eu?[{schematicBox:d,bodyGap:m,maxRecommendedBodyGap:u}]:[]});if(s.length===0)return;let p=s.map(({schematicBox:d})=\u003ed.sourceComponentName||\"component\").join(\", \");this.issues.push({lineItemType:\"FeedbackNetworkNotCompact\",amplifierSchematicBox:r,feedbackComponents:c,distantComponents:s,outputSourcePortId:i.source_port_id,invertingInputSourcePortId:n.source_port_id,message:`consider grouping ${p} closer to ${r.sourceComponentName||\"component\"}, with a compact feedback return path above or below the amplifier`})}static issueToString(t){let e=[];return S(e,\"amplifierName\",t.amplifierSchematicBox.sourceComponentName),S(e,\"feedbackComponentNames\",t.feedbackComponents.map((r)=\u003er.sourceComponentName||\"component\").join(\", \")),S(e,\"distantComponentNames\",t.distantComponents.map(({schematicBox:r})=\u003er.sourceComponentName||\"component\").join(\", \")),S(e,\"message\",t.message),`\u003cFeedbackNetworkNotCompact ${e.join(\" \")} /\u003e`}}function B2(t,e){return Math.hypot(Math.max(0,Math.abs(t.schX-e.schX)-(t.width+e.width)/2),Math.max(0,Math.abs(t.schY-e.schY)-(t.height+e.height)/2))}function Gs(t){let e=[],r=(i)=\u003e{let n=t.portsByComponent.get(i);if(n?.length!==2)return!1;let a=t.port(n[0]),o=t.port(n[1]);return!!a\u0026\u0026!!o\u0026\u0026Math.abs(a.center.y-o.center.y)\u003c0.01\u0026\u0026Math.abs(a.center.x-o.center.x)\u003e0.01};for(let i of t.components.values()){if(i.ftype!==\"simple_resistor\"||i.resistance\u003c=0)continue;let n=i.source_component_id,a=t.twoTerminalNets(n);if(!a||a.filter((b)=\u003et.isRail(b)).length!==1)continue;let o=a.find((b)=\u003et.isRail(b));if(t.powerNets.has(o)\u0026\u0026t.groundNets.has(o))continue;let c=a.find((b)=\u003eb!==o),l=t.portsByNet.get(c)??[],s=l.filter((b)=\u003e{let M=t.components.get(b.source_component_id)?.ftype;return M===\"simple_switch\"||M===\"simple_push_button\"});if(s.length!==1||l.filter((b)=\u003et.components.get(b.source_component_id)?.ftype===\"simple_resistor\").length!==1)continue;let p=s[0],d=p.source_component_id,m=t.components.get(d)?.ftype,y=t.twoTerminalNets(d)?.find((b)=\u003eb!==c);if(!y)continue;let f=t.powerNets.has(o)?\"up\":\"down\";if(f===\"up\"?!t.groundNets.has(y)||t.powerNets.has(y):!t.powerNets.has(y)||t.groundNets.has(y))continue;if([n,d].some((b)=\u003et.portsByComponent.get(b)?.some((M)=\u003eM.do_not_connect)))continue;let _=t.placement(n),x=t.placement(d),Y=t.port(p);if(!_||!x||!Y||!t.sameLocalScope(_,x))continue;e.push({resistor:_,switchBox:x,signalPort:p,signalSchY:Y.center.y,pullDirection:f,horizontalPushbutton:m===\"simple_push_button\"\u0026\u0026r(n)\u0026\u0026r(d)})}return e}function wn(t){return new Set(Gs(t).flatMap((e)=\u003ee.horizontalPushbutton?[e.resistor.sourceComponentId,e.switchBox.sourceComponentId]:[]))}class Xe extends at{static MIN_WRONG_SIDE_GAP=1.5;index;resistorIds;horizontalPushbuttonComponentIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.horizontalPushbuttonComponentIds=wn(this.index),this.resistorIds=[...this.index.components.values()].filter((r)=\u003er.ftype===\"simple_resistor\"\u0026\u0026r.resistance\u003e0).map((r)=\u003er.source_component_id),this.solved=this.resistorIds.length===0}_step(){let t=this.resistorIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.resistorIds.length,!t)return;if(this.horizontalPushbuttonComponentIds.has(t))return;let e=this.index,r=e.placement(t),i=e.twoTerminalNets(t);if(!r||!i)return;let n=i.filter((_)=\u003ee.isRail(_));if(n.length!==1)return;let a=n[0];if(e.powerNets.has(a)\u0026\u0026e.groundNets.has(a))return;let o=e.groundNets.has(a)?\"down\":\"up\",c=i.find((_)=\u003e_!==a),l=e.portsByNet.get(c)??[],s=l.filter((_)=\u003e_.needs_external_pullup||_.needs_external_pulldown);if(s.length!==1)return;let p=s[0];if(p.needs_external_pullup\u0026\u0026p.needs_external_pulldown)return;if(o===\"up\"?!p.needs_external_pullup:!p.needs_external_pulldown)return;let d=e.placement(p.source_component_id),m=e.port(p);if(!d||!m||!e.sameLocalScope(d,r))return;if(l.some((_)=\u003e{let x=_.source_component_id;if(x===t||x===p.source_component_id)return!1;if(e.components.get(x)?.ftype!==\"simple_capacitor\")return!0;let M=e.twoTerminalNets(x)?.find((X)=\u003eX!==c);if(!M||!e.groundNets.has(M)||e.powerNets.has(M))return!0;let O=e.placement(x);return!O||!e.sameLocalScope(d,O)}))return;let u=m.center.y,y=o===\"up\"?u-(r.schY+r.height/2):r.schY-r.height/2-u;if(y\u003c=Xe.MIN_WRONG_SIDE_GAP)return;let f=o===\"up\"?\"above\":\"below\";this.issues.push({lineItemType:\"PullResistorOnWrongSide\",resistorSchematicBox:r,hostSchematicBox:d,signalSourcePortId:p.source_port_id,signalPinName:p.name,signalSchY:u,pullDirection:o,preferredSide:f,wrongSideGap:y,maxRecommendedWrongSideGap:Xe.MIN_WRONG_SIDE_GAP,message:`consider placing ${r.sourceComponentName||\"component\"} ${f} ${d.sourceComponentName||\"component\"}.${p.name} so the pull-${o} branch reads toward ${o===\"up\"?\"power\":\"ground\"}`})}static issueToString(t){let e=[];return S(e,\"resistorName\",t.resistorSchematicBox.sourceComponentName),S(e,\"hostName\",t.hostSchematicBox.sourceComponentName),S(e,\"signalPin\",t.signalPinName),S(e,\"pullDirection\",t.pullDirection),S(e,\"preferredSide\",t.preferredSide),S(e,\"signalSchY\",t.signalSchY),S(e,\"wrongSideGap\",t.wrongSideGap),S(e,\"message\",t.message),`\u003cPullResistorOnWrongSide ${e.join(\" \")} /\u003e`}}class le extends at{static EPSILON=0.01;index;powerNets;groundNets;positiveVoltageNets=new Set;componentIds;horizontalPushbuttonComponentIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.horizontalPushbuttonComponentIds=wn(this.index),this.powerNets=new Set(this.index.powerNets),this.groundNets=new Set(this.index.groundNets);for(let r of t.circuitJson){if(r.type===\"source_net\"\u0026\u0026r.is_positive_voltage_source)this.positiveVoltageNets.add(this.index.connected(r.source_net_id));if(r.type!==\"source_port\")continue;let i=this.index.connected(r.source_port_id);if(r.provides_power||r.requires_power)this.powerNets.add(i);if(r.provides_ground||r.requires_ground)this.groundNets.add(i)}this.componentIds=[...this.index.components.keys()].filter((r)=\u003ethis.index.portsByComponent.get(r)?.length===2),this.solved=this.componentIds.length===0}_step(){let t=this.componentIds[this.currentIndex++];if(this.solved=this.currentIndex\u003e=this.componentIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.components.get(t),n=e.twoTerminalNets(t);if(!r||!n)return;if(i?.ftype===\"simple_inductor\"\u0026\u0026!n.some((X)=\u003ethis.groundNets.has(X)))return;if(i?.ftype===\"simple_diode\"\u0026\u0026n.every((X)=\u003ethis.powerNets.has(X)))return;if(n.some((X)=\u003ethis.powerNets.has(X)\u0026\u0026this.groundNets.has(X)))return;let a=n.map((X)=\u003ethis.powerNets.has(X)?\"power\":this.groundNets.has(X)?\"ground\":void 0);if(a.every((X)=\u003eX===void 0))return;let o=a.includes(\"power\")?\"power\":\"ground\",c=n.flatMap((X,E)=\u003ea[E]===o?[{net:X,index:E}]:[]),l=(c.find(({net:X})=\u003ee.portsByNet.get(X)?.some((E)=\u003eo===\"power\"?E.provides_power:E.provides_ground))??c.find(({net:X})=\u003e(o===\"power\"?e.powerNets:e.groundNets).has(X))??c[0]).index,s=n[l],p=e.portsByComponent.get(t),d=p.find((X)=\u003ee.connected(X.source_port_id)===s),m=p.find((X)=\u003eX!==d),u=e.port(d),y=e.port(m);if(!u||!y)return;let f=e.connected(m.source_port_id),_=this.groundNets.has(f),x=i?.ftype===\"simple_resistor\"\u0026\u0026!this.powerNets.has(f)\u0026\u0026!_;if(this.positiveVoltageNets.has(s)\u0026\u0026(_||x)\u0026\u0026Math.abs(u.center.x-y.center.x)\u003c=le.EPSILON\u0026\u0026u.center.y\u003cy.center.y-le.EPSILON\u0026\u0026u.facing_direction===\"down\"\u0026\u0026y.facing_direction===\"up\"){this.issues.push({lineItemType:\"TwoPinComponentHasInvertedRails\",schematicBox:r,railSourcePortId:d.source_port_id,railPinName:d.name,railType:\"power\",deltaSchRotation:180,suggestedRailFacingDirection:\"up\",message:`rotate ${r.sourceComponentName||\"component\"} by 180° so its positive-supply pin faces up and its ${_?\"ground\":\"signal\"} pin faces down; preserve pin connections and reroute attached traces`});return}if(!(Math.abs(u.center.y-y.center.y)\u003c=le.EPSILON\u0026\u0026Math.abs(u.center.x-y.center.x)\u003ele.EPSILON\u0026\u0026(u.facing_direction===\"left\"\u0026\u0026y.facing_direction===\"right\"||u.facing_direction===\"right\"\u0026\u0026y.facing_direction===\"left\")))return;if(this.horizontalPushbuttonComponentIds.has(t))return;let M=o===\"power\"?\"up\":\"down\",O=u.facing_direction===\"left\"===(o===\"power\")?-90:90;this.issues.push({lineItemType:\"TwoPinComponentShouldBeVertical\",schematicBox:r,railSourcePortId:d.source_port_id,railPinName:d.name,railType:o,deltaSchRotation:O,suggestedRailFacingDirection:M,message:`rotate ${r.sourceComponentName||\"component\"} by ${O}° so its ${o}-connected pin faces ${M} and the component is vertical`})}static issueToString(t){let e=[];return S(e,\"componentName\",t.schematicBox.sourceComponentName),S(e,\"railPin\",t.railPinName),S(e,\"railType\",t.railType),S(e,\"deltaSchRotation\",t.deltaSchRotation),S(e,\"suggestedRailFacingDirection\",t.suggestedRailFacingDirection),S(e,\"message\",t.message),`\u003c${t.lineItemType} ${e.join(\" \")} /\u003e`}}var Pi=0.02;function Ii(t,e,r){let i={left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2},n=[];for(let a of e){if(!a.side_of_component)continue;if(!a.display_pin_label)continue;let o=r(a),c=0.075;switch(a.side_of_component){case\"left\":{let l=i.left+0.1;n.push({side:a.side_of_component,xMin:l,xMax:l+o,yMin:a.center.y-c,yMax:a.center.y+c});break}case\"right\":{let l=i.right-0.1;n.push({side:a.side_of_component,xMin:l-o,xMax:l,yMin:a.center.y-c,yMax:a.center.y+c});break}case\"top\":{let l=i.top-0.1;n.push({side:a.side_of_component,xMin:a.center.x-c,xMax:a.center.x+c,yMin:l-o,yMax:l});break}case\"bottom\":{let l=i.bottom+0.1;n.push({side:a.side_of_component,xMin:a.center.x-c,xMax:a.center.x+c,yMin:l,yMax:l+o});break}}}return n}function Bn(t,e,r=0.02){return An(t.xMin,t.xMax,e.xMin,e.xMax,r)\u0026\u0026An(t.yMin,t.yMax,e.yMin,e.yMax,r)}function An(t,e,r,i,n=0.02){return Math.min(e,i)-Math.max(t,r)+n\u003e0.000000001}function Cr(t){return new Set(t.flatMap((e)=\u003ee.type===\"schematic_component\"\u0026\u0026e.is_box_with_pins!==!1\u0026\u0026!e.symbol_name\u0026\u0026!e.schematic_symbol_id?[e.schematic_component_id]:[]))}var Ve=(t)=\u003e[{x:t.left,y:t.bottom},{x:t.right,y:t.bottom},{x:t.right,y:t.top},{x:t.left,y:t.top}],F2=(t)=\u003e{if(/\\s/.test(t))return 0.28;if(/[ilI.,:;!'|]/.test(t))return 0.25;if(/[MW@%]/.test(t))return 0.9;if(/[mw]/.test(t))return 0.8;if(/[A-Z]/.test(t))return 0.67;return 0.56},Fn=(t)=\u003eArray.from(t).reduce((e,r)=\u003ee+F2(r),0),km=(t,e)=\u003eFn(t)*e;function Mi(t){let e=t.font_size;if(!Number.isFinite(e)||e\u003c=0||!Number.isFinite(t.rotation)||!Number.isFinite(t.position.x)||!Number.isFinite(t.position.y))return[];let r=t.anchor,i=r.includes(\"left\")?0:r.includes(\"right\")?1:0.5,n=r.includes(\"top\")?0:r.includes(\"bottom\")?e:e/2,a=-t.rotation*Math.PI/180,o=Math.cos(a),c=Math.sin(a);return t.text.split(`\n`).flatMap((l,s)=\u003e{let p=l.trim();if(!p)return[];let d=l.length-l.trimStart().length,m=(Fn(l.slice(0,d))-Fn(l)*i)*e;return[Ve({left:m,right:m+Fn(p)*e,top:n-s*e-e*0.05,bottom:n-(s+1)*e+e*0.05}).map(({x:y,y:f})=\u003e({x:t.position.x+y*o-f*c,y:t.position.y+y*c+f*o}))]})}function ki(t,e){for(let r of[t,e])for(let i=0;i\u003cr.length;i++){let n=r[i],a=r[(i+1)%r.length],o=Math.hypot(a.x-n.x,a.y-n.y);if(o\u003c0.000000001)continue;let c=-(a.y-n.y)/o,l=(a.x-n.x)/o,s=(m)=\u003em.map(({x:u,y})=\u003eu*c+y*l),p=s(t),d=s(e);if(Math.min(Math.max(...p),Math.max(...d))-Math.max(Math.min(...p),Math.min(...d))\u003c=0.000001)return!1}return!0}function Ci(t,e){let r=Math.hypot(e.x-t.x,e.y-t.y);if(r\u003c0.000000001)return;let i=-(e.y-t.y)/r*0.01,n=(e.x-t.x)/r*0.01;return[{x:t.x+i,y:t.y+n},{x:e.x+i,y:e.y+n},{x:e.x-i,y:e.y-n},{x:t.x-i,y:t.y-n}]}function Yr(t,e,r){if(Math.hypot(e.x-t.x,e.y-t.y)\u003c0.000000001)return!1;let i=0,n=1;for(let a=0;a\u003cr.length;a++){let o=r[a],c=r[(a+1)%r.length],l=Math.hypot(c.x-o.x,c.y-o.y);if(l\u003c0.000000001)continue;let s=-(c.y-o.y)/l,p=(c.x-o.x)/l,d=(t.x-o.x)*s+(t.y-o.y)*p-0.000001,m=(e.x-o.x)*s+(e.y-o.y)*p-0.000001;if(d\u003c=0\u0026\u0026m\u003c=0)return!1;if(d\u003c=0)i=Math.max(i,-d/(m-d));if(m\u003c=0)n=Math.min(n,-d/(m-d));if(n\u003c=i)return!1}return n\u003ei}var Qs=(t)=\u003e{let e=t.flat();return{left:Math.min(...e.map((r)=\u003er.x)),right:Math.max(...e.map((r)=\u003er.x)),top:Math.max(...e.map((r)=\u003er.y)),bottom:Math.min(...e.map((r)=\u003er.y))}};class Lr extends at{params;entries;placementById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=\u003ei.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex\u003e=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=Ii(i,r,(o)=\u003ekm(o.display_pin_label,0.15));if(n.length===0)return;let a=this.getCollisionSummary(n);if(a.overlappingSides.length===0)return;this.params.issues.push({lineItemType:\"SchematicBoxInnerLabelCollision\",schematicBox:i,overlappingSides:a.overlappingSides,message:this.getMessage(a.overlappingSides)})}static issueToString(t){let e=[];return S(e,\"message\",t.message),S(e,\"componentName\",t.schematicBox.sourceComponentName),S(e,\"currentSchWidth\",t.schematicBox.width),S(e,\"currentSchHeight\",t.schematicBox.height),S(e,\"overlappingSides\",t.overlappingSides.join(\",\")),`\u003cSchematicBoxInnerLabelCollision ${e.join(\" \")} /\u003e`}getMessage(t){return`Inner labels are colliding. Increase the ${t.every((r)=\u003er===\"left\"||r===\"right\")?\"schWidth\":t.every((r)=\u003er===\"top\"||r===\"bottom\")?\"schHeight\":\"schWidth or schHeight\"}.`}isSchematicPort(t){return t.type===\"schematic_port\"}isSchematicSide(t){return t===\"left\"||t===\"right\"||t===\"top\"||t===\"bottom\"}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=\u003ee.schematicComponentId).map((e)=\u003e[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=\u003ethis.isSchematicPort(i))){if(!r.schematic_component_id)continue;if(!this.isSchematicSide(r.side_of_component))continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getCollisionSummary(t){let e=new Set;for(let r=0;r\u003ct.length;r++)for(let i=r+1;i\u003ct.length;i++){let n=t[r],a=t[i];if(n.side===a.side)continue;if(!Bn(n,a))continue;e.add(n.side),e.add(a.side)}return{overlappingSides:this.sortSides(Array.from(e))}}sortSides(t){let e={left:0,right:1,top:2,bottom:3};return t.sort((r,i)=\u003ee[r]-e[i])}}class tr extends at{params;placements;firstIndex=0;secondIndex=1;constructor(t){super();this.params=t;this.placements=t.ctx.componentPlacements,this.solved=this.placements.length\u003c2}_step(){if(this.firstIndex\u003e=this.placements.length-1){this.solved=!0;return}let t=this.getComponentOverlap(this.placements[this.firstIndex],this.placements[this.secondIndex]);if(t)this.params.issues.push(t);if(this.secondIndex++,this.secondIndex\u003e=this.placements.length)this.firstIndex++,this.secondIndex=this.firstIndex+1;this.solved=this.firstIndex\u003e=this.placements.length-1}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY-t.height/2,bottom:t.schY+t.height/2}}getOverlapCorrectionSuggestions({firstComponent:t,secondComponent:e,overlapWidth:r,overlapHeight:i}){let n=t.width*t.height,a=e.width*e.height,o=n\u003c=a?t:e,c=o===t?e:t,l=o.schX\u003c=c.schX?-r:r,s=o.schY\u003c=c.schY?-i:i;return[{targetComponentName:o.sourceComponentName,deltaSchX:l,deltaSchY:0,newSchX:o.schX+l,newSchY:o.schY},{targetComponentName:o.sourceComponentName,deltaSchX:0,deltaSchY:s,newSchX:o.schX,newSchY:o.schY+s}]}static issueToString(t){let e=[];return S(e,\"component1Name\",t.firstComponent.sourceComponentName),S(e,\"component2Name\",t.secondComponent.sourceComponentName),S(e,\"component1SchX\",t.firstComponent.schX),S(e,\"component1SchY\",t.firstComponent.schY),S(e,\"component2SchX\",t.secondComponent.schX),S(e,\"component2SchY\",t.secondComponent.schY),S(e,\"overlapWidth\",t.overlapWidth),S(e,\"overlapHeight\",t.overlapHeight),[`\u003cComponentOverlap ${e.join(\" \")}\u003e`,...t.correctionSuggestions.map(tr.correctionSuggestionToString),\"\u003c/ComponentOverlap\u003e\"].join(`\n`)}static correctionSuggestionToString(t){let e=[];if(S(e,\"target\",t.targetComponentName),t.deltaSchX!==0)S(e,\"newSchX\",t.newSchX),S(e,\"deltaSchX\",t.deltaSchX,{formatDelta:!0});if(t.deltaSchY!==0)S(e,\"newSchY\",t.newSchY),S(e,\"deltaSchY\",t.deltaSchY,{formatDelta:!0});return`\u003cOverlapCorrectionSuggestion ${e.join(\" \")} /\u003e`}getComponentOverlap(t,e){if(t.schematicSheetId!==e.schematicSheetId)return null;let r=this.getCenteredRectBounds(t),i=this.getCenteredRectBounds(e),n=Math.min(r.right,i.right)-Math.max(r.left,i.left),a=Math.min(r.bottom,i.bottom)-Math.max(r.top,i.top);if(n\u003c=0||a\u003c=0)return null;return{lineItemType:\"ComponentOverlap\",firstComponent:t,secondComponent:e,overlapWidth:n,overlapHeight:a,correctionSuggestions:this.getOverlapCorrectionSuggestions({firstComponent:t,secondComponent:e,overlapWidth:n,overlapHeight:a})}}}function Pn(t,e){let r;for(let i of t){if(i.type!==\"schematic_path\"\u0026\u0026i.type!==\"schematic_circle\"\u0026\u0026i.type!==\"schematic_rect\"||i.schematic_component_id!==e)continue;let n=(i.stroke_width??0.02)/2,a;if(i.type===\"schematic_path\"){if(!i.points.length)continue;a={xMin:Math.min(...i.points.map((o)=\u003eo.x)),xMax:Math.max(...i.points.map((o)=\u003eo.x)),yMin:Math.min(...i.points.map((o)=\u003eo.y)),yMax:Math.max(...i.points.map((o)=\u003eo.y))}}else{let o=i.type===\"schematic_rect\"?(i.rotation??0)*Math.PI/180:0,c=i.type===\"schematic_circle\"?2*i.radius:i.width,l=i.type===\"schematic_circle\"?2*i.radius:i.height,s=(Math.abs(c*Math.cos(o))+Math.abs(l*Math.sin(o)))/2,p=(Math.abs(c*Math.sin(o))+Math.abs(l*Math.cos(o)))/2;a={xMin:i.center.x-s,xMax:i.center.x+s,yMin:i.center.y-p,yMax:i.center.y+p}}a.xMin-=n,a.xMax+=n,a.yMin-=n,a.yMax+=n,r=r?{xMin:Math.min(r.xMin,a.xMin),xMax:Math.max(r.xMax,a.xMax),yMin:Math.min(r.yMin,a.yMin),yMax:Math.max(r.yMax,a.yMax)}:a}return r}var Lm=0.2,Er=(t)=\u003eArray.from(t.display_pin_label??\"\").length*0.095;function In(t,e,r,i,n=0,a){if(!Number.isFinite(r)||r\u003c=0)return;if(e.some((f)=\u003e!f.side_of_component))return;if(!Ym(t,e,Pi,a))return;let o=0,c=0;for(let f of e)if(f.side_of_component===\"left\"||f.side_of_component===\"right\")c=Math.max(c,2*(Math.abs(f.center.y-t.schY)+r));else o=Math.max(o,2*(Math.abs(f.center.x-t.schX)+r));let l=i.width===void 0?t.width:Math.max(i.width,o,Cm(t,e,\"width\",a)),s=i.height===void 0?t.height:Math.max(i.height,c,Cm(t,e,\"height\",a)),p=(f)=\u003ef\u003e0.000000001\u0026\u0026f\u003e=n-0.000000001,d=p(t.width-l)?l:void 0,m=p(t.height-s)?s:void 0;if(d===void 0\u0026\u0026m===void 0)return;let u=[{width:d,height:m}];if(d!==void 0\u0026\u0026m!==void 0)u.push({width:d},{height:m});let y=(f)=\u003e(f.width??t.width)*(f.height??t.height);return u.sort((f,_)=\u003ey(f)-y(_)),u.find((f)=\u003eYm({...t,width:f.width??t.width,height:f.height??t.height},e,Lm,a))}function Cm(t,e,r,i){let n=t[r],a=r===\"width\"?t.schX:t.schY,o=r===\"width\"?\"xMin\":\"yMin\",c=r===\"width\"?\"xMax\":\"yMax\",l=r===\"width\"?\"yMin\":\"xMin\",s=r===\"width\"?\"yMax\":\"xMax\",p=(y)=\u003e{if(r===\"width\")return y.side===\"left\"?-0.5:y.side===\"right\"?0.5:0;return y.side===\"bottom\"?-0.5:y.side===\"top\"?0.5:0},d=0,m=(y,f,_=0)=\u003e{if(f\u003e0)d=Math.max(d,n+(_-y)/f)},u=Ii(t,e,Er);if(i)u.push(i);for(let y=0;y\u003cu.length;y++){let f=u[y];m(f[o]-(a-n/2),p(f)+0.5),m(a+n/2-f[c],0.5-p(f));for(let _=y+1;_\u003cu.length;_++){let x=u[_],Y=f.side\u0026\u0026x.side\u0026\u0026f.side!==x.side?Lm:Pi;if(!An(f[l],f[s],x[l],x[s],Y))continue;let[b,M]=f[c]\u003c=x[o]?[f,x]:[x,f];m(M[o]-b[c],p(M)-p(b),Y)}}return d}function Ym(t,e,r=Pi,i){if(!Number.isFinite(t.width)||!Number.isFinite(t.height))return!1;let n=Ii(t,e,Er);if(i)n.push(i);for(let a=0;a\u003cn.length;a++){let o=n[a];if(o.xMin\u003ct.schX-t.width/2-0.000000001||o.xMax\u003et.schX+t.width/2+0.000000001||o.yMin\u003ct.schY-t.height/2-0.000000001||o.yMax\u003et.schY+t.height/2+0.000000001)return!1;for(let c=a+1;c\u003cn.length;c++){let l=n[c],s=o.side\u0026\u0026l.side\u0026\u0026o.side!==l.side?r:Pi;if(Bn(o,l,s))return!1}}return!0}class er extends at{params;SCHEMATIC_BOX_TOO_WIDE_MESSAGE=\"Shrink schematic box width\";PIN_HEADER_MAX_ALLOWED_GAP=0.1;GENERIC_MAX_ALLOWED_GAP=1;PIN_LABEL_EDGE_PADDING=0.1;GAP_COMPARISON_EPSILON=0.000000001;entries;placementById;schematicComponentById;sourceComponentById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r),this.schematicComponentById=new Map(e.filter((n)=\u003en.type===\"schematic_component\").map((n)=\u003e[n.schematic_component_id,n])),this.sourceComponentById=this.getSourceComponentById(e);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=\u003ei.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex\u003e=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=this.getCenteredRectBounds(i),a=this.getLabelColumn(\"left\",r),o=this.getLabelColumn(\"right\",r),c=this.getSourceComponentFtype(i,this.sourceComponentById),l;if(a\u0026\u0026o)l=this.getInnerLabelEdge(n,o)-this.getInnerLabelEdge(n,a);else if(a\u0026\u0026a.labelCount\u003e=4)l=n.right-this.getInnerLabelEdge(n,a);else if(o\u0026\u0026o.labelCount\u003e=4)l=this.getInnerLabelEdge(n,o)-n.left;if(l===void 0)return;let s=c===\"simple_pin_header\"?this.PIN_HEADER_MAX_ALLOWED_GAP:this.GENERIC_MAX_ALLOWED_GAP;if(!this.exceedsMaxAllowedGap(l,s))return;let p=this.getSuggestedWidth({measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,currentWidth:i.width}),d=this.schematicComponentById.get(e)?.pin_spacing;if(d===void 0)return;let m=In(i,r,d,{width:p},0,Pn(this.params.ctx.circuitJson,e));if(m?.width===void 0)return;let u=m.width;if(c===\"simple_pin_header\")this.params.issues.push({lineItemType:\"PinHeaderSchematicBoxTooWide\",schematicBox:i,measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,suggestedSchWidth:u,message:this.SCHEMATIC_BOX_TOO_WIDE_MESSAGE});else this.params.issues.push({lineItemType:\"GenericSchematicBoxTooWide\",schematicBox:i,measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,suggestedSchWidth:u,message:this.SCHEMATIC_BOX_TOO_WIDE_MESSAGE})}static issueToString(t){let e=[];return S(e,\"message\",t.message),S(e,\"componentName\",t.schematicBox.sourceComponentName),S(e,\"currentSchWidth\",t.schematicBox.width),S(e,\"measuredInnerLabelHorizontalEmptySpace\",t.measuredInnerLabelHorizontalEmptySpace),S(e,\"maxAllowedInnerLabelHorizontalEmptySpace\",t.maxAllowedInnerLabelHorizontalEmptySpace),S(e,\"suggestedSchWidth\",t.suggestedSchWidth),`\u003c${t.lineItemType} ${e.join(\" \")} /\u003e`}isSchematicPort(t){return t.type===\"schematic_port\"}getSourceComponentWithFtype(t){if(t.type!==\"source_component\"||!(\"source_component_id\"in t)||typeof t.source_component_id!==\"string\")return null;return{type:\"source_component\",source_component_id:t.source_component_id,ftype:\"ftype\"in t\u0026\u0026typeof t.ftype===\"string\"?t.ftype:void 0}}exceedsMaxAllowedGap(t,e){return t-e\u003ethis.GAP_COMPARISON_EPSILON}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2}}getSourceComponentById(t){return new Map(t.flatMap((e)=\u003e{let r=this.getSourceComponentWithFtype(e);return r?[r]:[]}).map((e)=\u003e[e.source_component_id,e]))}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=\u003ee.schematicComponentId).map((e)=\u003e[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=\u003ethis.isSchematicPort(i))){if(!r.schematic_component_id)continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getSourceComponentFtype(t,e){return t.sourceComponentId?e.get(t.sourceComponentId)?.ftype:void 0}getLabelColumn(t,e){let r=e.filter((i)=\u003ei.side_of_component===t).flatMap((i)=\u003ei.display_pin_label?[Er(i)]:[]);if(r.length===0)return null;return{side:t,labelCount:r.length,maxLabelWidth:Math.max(...r)}}getInnerLabelEdge(t,e){return e.side===\"left\"?t.left+this.PIN_LABEL_EDGE_PADDING+e.maxLabelWidth:t.right-this.PIN_LABEL_EDGE_PADDING-e.maxLabelWidth}getSuggestedWidth(t){return t.currentWidth-t.measuredInnerLabelHorizontalEmptySpace+t.maxAllowedInnerLabelHorizontalEmptySpace}}class Tr extends at{params;MESSAGE=\"Move schematic pins closer to the box edge or change the schematic box\";GAP_COMPARISON_EPSILON=0.000000001;entries;placementById;schematicComponentById;sourcePortById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r),this.schematicComponentById=this.getSchematicComponentById(e),this.sourcePortById=this.getSourcePortById(e);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=\u003ei.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex\u003e=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=this.getPinSpacing(i,this.schematicComponentById);if(n===null)return;let a=this.getMaxLabelLengthBySide(r),o=new Map;for(let f of r){if(!this.isSchematicSide(f.side_of_component))continue;let _=o.get(f.side_of_component)??[];_.push(f),o.set(f.side_of_component,_)}let c=[];for(let[f,_]of o){if(_.length===1)continue;for(let x of this.getBoxEdgeSidesForPinSide(f)){let Y=this.getOuterPinBySide(x,_);if(!Y)continue;let b=this.getPinPaddingToEdge(i,Y,x),M=Math.max(n,this.getMaxAllowedPinPadding(n,x,a));if(!this.exceedsMaxAllowedGap(b,M+n))continue;c.push({schematicBox:i,pinSide:f,edgeSide:x,pinName:this.getPinName(Y,this.sourcePortById),measuredPadding:b,maxAllowedPadding:M})}}if(!c.length)return;let l=c.map((f)=\u003ethis.createIssue(f)),s=l.flatMap((f)=\u003ef.suggestedSchWidth===void 0?[]:[f.suggestedSchWidth]),p=l.flatMap((f)=\u003ef.suggestedSchHeight===void 0?[]:[f.suggestedSchHeight]),d=In(i,r,n,{width:s.length?Math.max(...s):void 0,height:p.length?Math.max(...p):void 0},2*n,Pn(this.params.ctx.circuitJson,e));if(!d)return;let m=l.filter((f)=\u003ed.width!==void 0\u0026\u0026f.suggestedSchWidth!==void 0||d.height!==void 0\u0026\u0026f.suggestedSchHeight!==void 0),u=m.reduce((f,_)=\u003e_.excessPadding\u003ef.excessPadding?_:f),y=[d.width===void 0?\"\":\"width\",d.height===void 0?\"\":\"height\"].filter(Boolean).join(\" and \");this.params.issues.push({...u,paddingDetails:m.map(({pinSide:f,edgeSide:_,pinName:x,measuredPadding:Y,maxAllowedPadding:b,excessPadding:M})=\u003e({pinSide:f,edgeSide:_,pinName:x,measuredPadding:Y,maxAllowedPadding:b,excessPadding:M})),suggestedSchWidth:d.width,suggestedSchHeight:d.height,message:`${this.MESSAGE} ${y}`})}static issueToString(t){let e=[];if(S(e,\"message\",t.message),S(e,\"componentName\",t.schematicBox.sourceComponentName),t.paddingDetails)S(e,\"pinSides\",[...new Set(t.paddingDetails.map((r)=\u003er.pinSide))].join(\",\")),S(e,\"edgeSides\",[...new Set(t.paddingDetails.map((r)=\u003er.edgeSide))].join(\",\"));else S(e,\"pinSide\",t.pinSide),S(e,\"edgeSide\",t.edgeSide),S(e,\"pinName\",t.pinName),S(e,\"measuredPadding\",t.measuredPadding),S(e,\"maxAllowedPadding\",t.maxAllowedPadding),S(e,\"excessPadding\",t.excessPadding);return S(e,\"suggestedSchWidth\",t.suggestedSchWidth),S(e,\"suggestedSchHeight\",t.suggestedSchHeight),`\u003cSchematicPinPaddingToEdgeTooLarge ${e.join(\" \")} /\u003e`}isSchematicPort(t){return t.type===\"schematic_port\"}isSourcePort(t){return t.type===\"source_port\"}isSchematicComponent(t){return t.type===\"schematic_component\"}isHorizontalSide(t){return t===\"left\"||t===\"right\"}isVerticalSide(t){return t===\"top\"||t===\"bottom\"}isSchematicSide(t){return this.isHorizontalSide(t)||this.isVerticalSide(t)}exceedsMaxAllowedGap(t,e){return t-e\u003ethis.GAP_COMPARISON_EPSILON}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2}}getSourcePortById(t){return new Map(t.filter((e)=\u003ethis.isSourcePort(e)).map((e)=\u003e[e.source_port_id,e]))}getSchematicComponentById(t){return new Map(t.filter((e)=\u003ethis.isSchematicComponent(e)).map((e)=\u003e[e.schematic_component_id,e]))}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=\u003ee.schematicComponentId).map((e)=\u003e[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=\u003ethis.isSchematicPort(i))){if(!r.schematic_component_id)continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getPinSpacing(t,e){if(!t.schematicComponentId)return null;let r=e.get(t.schematicComponentId);return typeof r?.pin_spacing===\"number\"?r.pin_spacing:null}getPinName(t,e){let r=e.get(t.source_port_id);if(r?.name)return r.name;if(t.display_pin_label)return t.display_pin_label;if(r?.pin_number!==void 0)return String(r.pin_number);return}getMaxLabelLengthBySide(t){let e={left:0,right:0,top:0,bottom:0};for(let r of t){if(!this.isSchematicSide(r.side_of_component))continue;if(!r.display_pin_label)continue;e[r.side_of_component]=Math.max(e[r.side_of_component],Er(r))}return e}getOuterPinBySide(t,e){if(e.length===0)return null;switch(t){case\"top\":return e.reduce((r,i)=\u003ei.center.y\u003er.center.y?i:r);case\"bottom\":return e.reduce((r,i)=\u003ei.center.y\u003cr.center.y?i:r);case\"left\":return e.reduce((r,i)=\u003ei.center.x\u003cr.center.x?i:r);case\"right\":return e.reduce((r,i)=\u003ei.center.x\u003er.center.x?i:r)}}getPinPaddingToEdge(t,e,r){let i=this.getCenteredRectBounds(t);switch(r){case\"top\":return Math.max(0,i.top-e.center.y);case\"bottom\":return Math.max(0,e.center.y-i.bottom);case\"left\":return Math.max(0,e.center.x-i.left);case\"right\":return Math.max(0,i.right-e.center.x)}}getBoxEdgeSidesForPinSide(t){return this.isHorizontalSide(t)?[\"top\",\"bottom\"]:[\"left\",\"right\"]}getMaxAllowedPinPadding(t,e,r){let i=this.isHorizontalSide(e)?[\"left\",\"right\"]:[\"top\",\"bottom\"];return(r[i[0]]+r[i[1]]+t)/2}createIssue(t){let e=Math.max(0,t.measuredPadding-t.maxAllowedPadding),r=e*2;return{lineItemType:\"SchematicPinPaddingToEdgeTooLarge\",pinSide:t.pinSide,edgeSide:t.edgeSide,pinName:t.pinName,schematicBox:t.schematicBox,measuredPadding:t.measuredPadding,maxAllowedPadding:t.maxAllowedPadding,excessPadding:e,suggestedSchWidth:this.isHorizontalSide(t.pinSide)?void 0:Math.max(0,t.schematicBox.width-r),suggestedSchHeight:this.isHorizontalSide(t.pinSide)?Math.max(0,t.schematicBox.height-r):void 0,message:this.isHorizontalSide(t.pinSide)?`${this.MESSAGE} height`:`${this.MESSAGE} width`}}}var Dr={};z1(Dr,{all_layers:()=\u003eMu,any_circuit_element:()=\u003eu0,any_soup_element:()=\u003ezr,any_source_component:()=\u003ebu,asset:()=\u003eac,base_circuit_json_error:()=\u003ekt,battery_capacity:()=\u003eHm,brep_shape:()=\u003eLc,cadModelDefaultDirectionMap:()=\u003eE9,cad_component:()=\u003eHf,cad_model_axis_directions:()=\u003eQf,cad_model_formats:()=\u003eL9,capacitance:()=\u003enc,circuit_json_footprint_load_error:()=\u003eSf,current:()=\u003eXr,distance:()=\u003eC,duration_ms:()=\u003eVr,experiment_type:()=\u003er0,external_footprint_load_error:()=\u003evf,frequency:()=\u003eor,getZodPrefixedIdWithDefault:()=\u003eT,inductance:()=\u003eGm,kicadAt:()=\u003ejn,kicadEffects:()=\u003eZm,kicadFont:()=\u003esc,kicadFootprintAttributes:()=\u003eJm,kicadFootprintMetadata:()=\u003eeu,kicadFootprintModel:()=\u003etu,kicadFootprintPad:()=\u003eqm,kicadFootprintProperties:()=\u003eKm,kicadProperty:()=\u003eGi,kicadSymbolEffects:()=\u003enu,kicadSymbolMetadata:()=\u003eau,kicadSymbolPinNames:()=\u003eiu,kicadSymbolPinNumbers:()=\u003eru,kicadSymbolProperties:()=\u003eou,kicadSymbolProperty:()=\u003eUe,layer_ref:()=\u003eSt,layer_string:()=\u003erc,length:()=\u003eK,manufacturing_drc_properties:()=\u003euy,ms:()=\u003eVt,ninePointAnchor:()=\u003eke,parseAndConvertSiUnit:()=\u003eqt,pcbRenderLayer:()=\u003eo9,pcb_autorouting_error:()=\u003eAf,pcb_board:()=\u003e$y,pcb_breakout_point:()=\u003eIf,pcb_component:()=\u003eyy,pcb_component_invalid_layer_error:()=\u003eRf,pcb_component_not_on_board_edge_error:()=\u003eWf,pcb_component_outside_board_error:()=\u003eNf,pcb_connector_not_in_accessible_orientation_warning:()=\u003eFf,pcb_copper_pour:()=\u003eTf,pcb_copper_pour_brep:()=\u003eLf,pcb_copper_pour_polygon:()=\u003eEf,pcb_copper_pour_rect:()=\u003eYf,pcb_copper_text:()=\u003eHy,pcb_courtyard_circle:()=\u003eUf,pcb_courtyard_outline:()=\u003ezf,pcb_courtyard_overlap_error:()=\u003emf,pcb_courtyard_pill:()=\u003eGf,pcb_courtyard_polygon:()=\u003eDf,pcb_courtyard_rect:()=\u003eVf,pcb_cutout:()=\u003exf,pcb_cutout_circle:()=\u003eff,pcb_cutout_path:()=\u003egf,pcb_cutout_polygon:()=\u003e_f,pcb_cutout_rect:()=\u003eyf,pcb_fabrication_note_dimension:()=\u003eaf,pcb_fabrication_note_path:()=\u003enf,pcb_fabrication_note_rect:()=\u003eof,pcb_fabrication_note_text:()=\u003erf,pcb_footprint_overlap_error:()=\u003edf,pcb_ground_plane:()=\u003eMf,pcb_ground_plane_region:()=\u003ekf,pcb_group:()=\u003ewf,pcb_hole:()=\u003eSy,pcb_hole_circle_or_square_shape:()=\u003ed9,pcb_hole_circle_shape:()=\u003ep9,pcb_hole_oval_shape:()=\u003em9,pcb_hole_pill_shape:()=\u003eu9,pcb_hole_rect_shape:()=\u003eh9,pcb_hole_rotated_pill_shape:()=\u003ey9,pcb_keepout:()=\u003euf,pcb_manual_edit_conflict_warning:()=\u003eBf,pcb_missing_footprint_error:()=\u003ebf,pcb_net:()=\u003eOy,pcb_note_dimension:()=\u003ehf,pcb_note_line:()=\u003epf,pcb_note_path:()=\u003elf,pcb_note_rect:()=\u003ecf,pcb_note_text:()=\u003esf,pcb_pad_pad_clearance_error:()=\u003e$f,pcb_pad_trace_clearance_error:()=\u003eXf,pcb_panel:()=\u003eXy,pcb_panelization_placement_error:()=\u003ezy,pcb_placement_error:()=\u003eVy,pcb_plated_hole:()=\u003ewy,pcb_port:()=\u003eAy,pcb_port_not_connected_error:()=\u003eRy,pcb_port_not_matched_error:()=\u003eWy,pcb_route_hint:()=\u003edy,pcb_route_hints:()=\u003el9,pcb_silkscreen_circle:()=\u003eKy,pcb_silkscreen_graphic:()=\u003etf,pcb_silkscreen_graphic_brep:()=\u003eqy,pcb_silkscreen_line:()=\u003eUy,pcb_silkscreen_oval:()=\u003eJy,pcb_silkscreen_path:()=\u003eGy,pcb_silkscreen_pill:()=\u003eef,pcb_silkscreen_rect:()=\u003eZy,pcb_silkscreen_text:()=\u003eQy,pcb_smtpad:()=\u003eFy,pcb_smtpad_pill:()=\u003eBy,pcb_solder_paste:()=\u003ePy,pcb_text:()=\u003eIy,pcb_thermal_spoke:()=\u003eCf,pcb_trace:()=\u003eLy,pcb_trace_error:()=\u003eTy,pcb_trace_hint:()=\u003eDy,pcb_trace_missing_error:()=\u003eNy,pcb_trace_route_point:()=\u003eYy,pcb_trace_route_point_through_pad:()=\u003eCy,pcb_trace_route_point_via:()=\u003eky,pcb_trace_route_point_wire:()=\u003eMy,pcb_trace_warning:()=\u003eEy,pcb_via:()=\u003ejy,pcb_via_clearance_error:()=\u003eOf,pcb_via_trace_clearance_error:()=\u003ejf,point:()=\u003eit,point3:()=\u003eIe,point_with_bulge:()=\u003ehy,port_arrangement:()=\u003eXu,position:()=\u003er9,position3:()=\u003ei9,resistance:()=\u003eOn,ring:()=\u003eic,rotation:()=\u003ejt,route_hint_point:()=\u003emy,schematic_arc:()=\u003eQu,schematic_box:()=\u003eWu,schematic_circle:()=\u003eGu,schematic_component:()=\u003eVu,schematic_component_port_arrangement_by_sides:()=\u003e$u,schematic_component_port_arrangement_by_size:()=\u003eju,schematic_debug_line:()=\u003ery,schematic_debug_object:()=\u003eny,schematic_debug_object_base:()=\u003eXn,schematic_debug_point:()=\u003eiy,schematic_debug_rect:()=\u003eey,schematic_error:()=\u003equ,schematic_group:()=\u003esy,schematic_layout_error:()=\u003ety,schematic_line:()=\u003eDu,schematic_manual_edit_conflict_warning:()=\u003eay,schematic_net_label:()=\u003eJu,schematic_path:()=\u003eRu,schematic_pin_styles:()=\u003eOu,schematic_port:()=\u003eKu,schematic_rect:()=\u003eUu,schematic_sheet:()=\u003epy,schematic_symbol:()=\u003ezu,schematic_table:()=\u003ecy,schematic_table_cell:()=\u003ely,schematic_text:()=\u003eZu,schematic_trace:()=\u003eHu,schematic_voltage_probe:()=\u003eoy,simulation_ac_current_source:()=\u003et0,simulation_ac_voltage_source:()=\u003eKf,simulation_current_probe:()=\u003el0,simulation_current_source:()=\u003ee0,simulation_dc_current_source:()=\u003eqf,simulation_dc_voltage_source:()=\u003eZf,simulation_experiment:()=\u003en0,simulation_op_amp:()=\u003eh0,simulation_oscilloscope_trace:()=\u003em0,simulation_spice_subcircuit:()=\u003ed0,simulation_switch:()=\u003es0,simulation_transient_current_graph:()=\u003ea0,simulation_transient_voltage_graph:()=\u003eo0,simulation_unknown_experiment_error:()=\u003ep0,simulation_voltage_probe:()=\u003ec0,simulation_voltage_source:()=\u003eJf,size:()=\u003eoc,source_ambiguous_port_reference:()=\u003ePu,source_board:()=\u003eFu,source_component_base:()=\u003eYt,source_component_internal_connection:()=\u003eSu,source_component_misconfigured_error:()=\u003eYc,source_component_pins_underspecified_warning:()=\u003eEu,source_failed_to_create_component_error:()=\u003eyu,source_group:()=\u003eAu,source_i2c_misconfigured_error:()=\u003eCc,source_interconnect:()=\u003egu,source_invalid_component_property_error:()=\u003ePc,source_manually_placed_via:()=\u003eku,source_missing_manufacturer_part_number_warning:()=\u003ekc,source_missing_property_error:()=\u003euu,source_net:()=\u003eBu,source_no_ground_pin_defined_warning:()=\u003eLu,source_no_power_pin_defined_warning:()=\u003eYu,source_pcb_ground_plane:()=\u003eIu,source_pin_attributes:()=\u003ehu,source_pin_missing_trace_warning:()=\u003eMc,source_pin_must_be_connected_error:()=\u003eTu,source_port:()=\u003evu,source_project_metadata:()=\u003eFc,source_property_ignored_warning:()=\u003efu,source_simple_ammeter:()=\u003epu,source_simple_battery:()=\u003euc,source_simple_capacitor:()=\u003elc,source_simple_chip:()=\u003edc,source_simple_connector:()=\u003emu,source_simple_crystal:()=\u003edu,source_simple_current_source:()=\u003elu,source_simple_diode:()=\u003e$n,source_simple_fiducial:()=\u003esu,source_simple_ground:()=\u003ecu,source_simple_inductor:()=\u003eyc,source_simple_led:()=\u003ehc,source_simple_mosfet:()=\u003ewc,source_simple_op_amp:()=\u003eAc,source_simple_pin_header:()=\u003egc,source_simple_pinout:()=\u003exc,source_simple_potentiometer:()=\u003e_c,source_simple_power_source:()=\u003emc,source_simple_push_button:()=\u003efc,source_simple_resistor:()=\u003epc,source_simple_resonator:()=\u003ebc,source_simple_switch:()=\u003eBc,source_simple_test_point:()=\u003eSc,source_simple_transistor:()=\u003evc,source_simple_voltage_probe:()=\u003e_u,source_simple_voltage_source:()=\u003exu,source_trace:()=\u003ewu,source_trace_not_connected_error:()=\u003eIc,source_unnamed_trace_warning:()=\u003eCu,spice_simulation_options:()=\u003ei0,supplier_footprint_mismatch_warning:()=\u003ePf,supplier_name:()=\u003ecc,time:()=\u003ee9,timestamp:()=\u003eQm,unknown_error_finding_part:()=\u003eNu,visible_layer:()=\u003ezt,voltage:()=\u003eMe,wave_shape:()=\u003eTc});var Tm=new Map([[\"T\",1000000000000],[\"G\",1e9],[\"M\",1e6],[\"K\",1000],[\"k\",1000],[\"\",1],[\"m\",0.001],[\"µ\",0.000001],[\"u\",0.000001],[\"n\",0.000000001],[\"p\",0.000000000001],[\"f\",0.000000000000001]]),P2=[...Tm.keys()];function Nm(t){return Tm.get(t)}var Wm={Hz:{baseUnit:\"Hz\",variants:{MHz:1e6,kHz:1000,Hz:1}},g:{baseUnit:\"g\",variants:{kg:1000,g:1}},Ω:{baseUnit:\"Ω\",variants:{mΩ:0.001,mohm:0.001,mOhm:0.001,milliohm:0.001,Ω:1,ohm:1,Ohm:1,kΩ:1000,KΩ:1000,kohm:1000,kOhm:1000,KOhm:1000,Kohm:1000,MΩ:1e6,Mohm:1e6,MOhm:1e6,megohm:1e6,Megohm:1e6,GΩ:1e9,Gohm:1e9,GOhm:1e9,TΩ:1000000000000,Tohm:1000000000000,TOhm:1000000000000}},V:{baseUnit:\"V\",variants:{mV:0.001,V:1,kV:1000,KV:1000,MV:1e6,GV:1e9,TV:1000000000000}},A:{baseUnit:\"A\",variants:{µA:0.000001,mA:0.001,ma:0.001,A:1,kA:1000,MA:1e6}},F:{baseUnit:\"F\",variants:{pF:0.000000000001,nF:0.000000001,µF:0.000001,uF:0.000001,mF:0.001,F:1,kF:1000,KF:1000,MF:1e6}},H:{baseUnit:\"H\",variants:{pH:0.000000000001,nH:0.000000001,µH:0.000001,uH:0.000001,mH:0.001,H:1,kH:1000,KH:1000,MH:1e6}},ml:{baseUnit:\"ml\",variants:{ml:1,mL:1,l:1000,L:1000}},deg:{baseUnit:\"deg\",variants:{rad:180/Math.PI}},ms:{baseUnit:\"ms\",variants:{fs:0.000000000001,ps:0.000000001,ns:0.000001,us:0.001,µs:0.001,ms:1,s:1000}},mm:{baseUnit:\"mm\",variants:{nm:0.000001,µm:0.001,um:0.001,mm:1,cm:10,dm:100,m:1000,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:0.0254}}},Hs=new Set;for(let[t,e]of Object.entries(Wm)){Hs.add(t);for(let r of Object.keys(e.variants))Hs.add(r)}function I2(t){for(let e of Object.values(Wm)){if(t in e.variants)return{baseUnit:e.baseUnit,conversionFactor:e.variants[t]};for(let[r,i]of Object.entries(e.variants)){if(!t.endsWith(r))continue;let n=t.slice(0,-r.length),a=Nm(n);if(a==null)continue;return{baseUnit:e.baseUnit,conversionFactor:a*i}}}return{baseUnit:t,conversionFactor:1}}function qt(t,e){if(t===void 0||t===null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t===\"string\"\u0026\u0026t.match(/^-?[\\d.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t===\"number\")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t===\"object\"\u0026\u0026\"x\"in t\u0026\u0026\"y\"in t){let s=qt(t.x,e),p=qt(t.x,e),d=qt(t.y,e);if(p.value===null||d.value===null)return{parsedUnit:null,unitOfValue:null,value:null};return{parsedUnit:s.parsedUnit,unitOfValue:s.unitOfValue,value:{x:p.value,y:d.value}}}let i=t.toString().split(\"\").reverse().join(\"\").match(/[^\\d\\s]+/)?.[0];if(!i)throw Error(`Could not determine unit: \"${t}\"`);let n=i.split(\"\").reverse().join(\"\"),a=t.slice(0,-n.length),o=Nm(n);if(e\u0026\u0026o!=null)return{parsedUnit:null,unitOfValue:e,value:Number.parseFloat(a)*o};if(o!=null\u0026\u0026!Hs.has(n))return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(a)*o};let{baseUnit:c,conversionFactor:l}=I2(n);return{parsedUnit:n,unitOfValue:c,value:l*Number.parseFloat(a)}}var M2=P2.filter((t)=\u003et!==\"\").sort((t,e)=\u003ee.length-t.length).map((t)=\u003et.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$\u0026\")).join(\"|\"),wT=new RegExp(`^([+-]?(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)(?:[eE][+-]?\\\\d+)?)(?:(${M2}))? checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit );var Em=[{value:1000000000000,symbol:\"T\"},{value:1e9,symbol:\"G\"},{value:1e6,symbol:\"M\"},{value:1000,symbol:\"k\"},{value:1,symbol:\"\"},{value:0.001,symbol:\"m\"},{value:0.000001,symbol:\"µ\"},{value:0.000000001,symbol:\"n\"},{value:0.000000000001,symbol:\"p\"}],AT=Em[Em.length-1];var Bt;(function(t){t.assertEqual=(n)=\u003e{};function e(n){}t.assertIs=e;function r(n){throw Error()}t.assertNever=r,t.arrayToEnum=(n)=\u003e{let a={};for(let o of n)a[o]=o;return a},t.getValidEnumValues=(n)=\u003e{let a=t.objectKeys(n).filter((c)=\u003etypeof n[n[c]]!==\"number\"),o={};for(let c of a)o[c]=n[c];return t.objectValues(o)},t.objectValues=(n)=\u003et.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys===\"function\"?(n)=\u003eObject.keys(n):(n)=\u003e{let a=[];for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o))a.push(o);return a},t.find=(n,a)=\u003e{for(let o of n)if(a(o))return o;return},t.isInteger=typeof Number.isInteger===\"function\"?(n)=\u003eNumber.isInteger(n):(n)=\u003etypeof n===\"number\"\u0026\u0026Number.isFinite(n)\u0026\u0026Math.floor(n)===n;function i(n,a=\" | \"){return n.map((o)=\u003etypeof o===\"string\"?`'${o}'`:o).join(a)}t.joinValues=i,t.jsonStringifyReplacer=(n,a)=\u003e{if(typeof a===\"bigint\")return a.toString();return a}})(Bt||(Bt={}));var Rm;(function(t){t.mergeShapes=(e,r)=\u003e({...e,...r})})(Rm||(Rm={}));var nt=Bt.arrayToEnum([\"string\",\"nan\",\"number\",\"integer\",\"float\",\"boolean\",\"date\",\"bigint\",\"symbol\",\"function\",\"undefined\",\"null\",\"array\",\"object\",\"unknown\",\"promise\",\"void\",\"never\",\"map\",\"set\"]),we=(t)=\u003e{switch(typeof t){case\"undefined\":return nt.undefined;case\"string\":return nt.string;case\"number\":return Number.isNaN(t)?nt.nan:nt.number;case\"boolean\":return nt.boolean;case\"function\":return nt.function;case\"bigint\":return nt.bigint;case\"symbol\":return nt.symbol;case\"object\":if(Array.isArray(t))return nt.array;if(t===null)return nt.null;if(t.then\u0026\u0026typeof t.then===\"function\"\u0026\u0026t.catch\u0026\u0026typeof t.catch===\"function\")return nt.promise;if(typeof Map\u003c\"u\"\u0026\u0026t instanceof Map)return nt.map;if(typeof Set\u003c\"u\"\u0026\u0026t instanceof Set)return nt.set;if(typeof Date\u003c\"u\"\u0026\u0026t instanceof Date)return nt.date;return nt.object;default:return nt.unknown}};var V=Bt.arrayToEnum([\"invalid_type\",\"invalid_literal\",\"custom\",\"invalid_union\",\"invalid_union_discriminator\",\"invalid_enum_value\",\"unrecognized_keys\",\"invalid_arguments\",\"invalid_return_type\",\"invalid_date\",\"invalid_string\",\"too_small\",\"too_big\",\"invalid_intersection_types\",\"not_multiple_of\",\"not_finite\"]);class ie extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(r)=\u003e{this.issues=[...this.issues,r]},this.addIssues=(r=[])=\u003e{this.issues=[...this.issues,...r]};let e=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,e);else this.__proto__=e;this.name=\"ZodError\",this.issues=t}format(t){let e=t||function(n){return n.message},r={_errors:[]},i=(n)=\u003e{for(let a of n.issues)if(a.code===\"invalid_union\")a.unionErrors.map(i);else if(a.code===\"invalid_return_type\")i(a.returnTypeError);else if(a.code===\"invalid_arguments\")i(a.argumentsError);else if(a.path.length===0)r._errors.push(e(a));else{let o=r,c=0;while(c\u003ca.path.length){let l=a.path[c];if(c!==a.path.length-1)o[l]=o[l]||{_errors:[]};else o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(a));o=o[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof ie))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(e)=\u003ee.message){let e={},r=[];for(let i of this.issues)if(i.path.length\u003e0){let n=i.path[0];e[n]=e[n]||[],e[n].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:e}}get formErrors(){return this.flatten()}}ie.create=(t)=\u003enew ie(t);var k2=(t,e)=\u003e{let r;switch(t.code){case V.invalid_type:if(t.received===nt.undefined)r=\"Required\";else r=`Expected ${t.expected}, received ${t.received}`;break;case V.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Bt.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:r=`Unrecognized key(s) in object: ${Bt.joinValues(t.keys,\", \")}`;break;case V.invalid_union:r=\"Invalid input\";break;case V.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Bt.joinValues(t.options)}`;break;case V.invalid_enum_value:r=`Invalid enum value. Expected ${Bt.joinValues(t.options)}, received '${t.received}'`;break;case V.invalid_arguments:r=\"Invalid function arguments\";break;case V.invalid_return_type:r=\"Invalid function return type\";break;case V.invalid_date:r=\"Invalid date\";break;case V.invalid_string:if(typeof t.validation===\"object\")if(\"includes\"in t.validation){if(r=`Invalid input: must include \"${t.validation.includes}\"`,typeof t.validation.position===\"number\")r=`${r} at one or more positions greater than or equal to ${t.validation.position}`}else if(\"startsWith\"in t.validation)r=`Invalid input: must start with \"${t.validation.startsWith}\"`;else if(\"endsWith\"in t.validation)r=`Invalid input: must end with \"${t.validation.endsWith}\"`;else Bt.assertNever(t.validation);else if(t.validation!==\"regex\")r=`Invalid ${t.validation}`;else r=\"Invalid\";break;case V.too_small:if(t.type===\"array\")r=`Array must contain ${t.exact?\"exactly\":t.inclusive?\"at least\":\"more than\"} ${t.minimum} element(s)`;else if(t.type===\"string\")r=`String must contain ${t.exact?\"exactly\":t.inclusive?\"at least\":\"over\"} ${t.minimum} character(s)`;else if(t.type===\"number\")r=`Number must be ${t.exact?\"exactly equal to \":t.inclusive?\"greater than or equal to \":\"greater than \"}${t.minimum}`;else if(t.type===\"bigint\")r=`Number must be ${t.exact?\"exactly equal to \":t.inclusive?\"greater than or equal to \":\"greater than \"}${t.minimum}`;else if(t.type===\"date\")r=`Date must be ${t.exact?\"exactly equal to \":t.inclusive?\"greater than or equal to \":\"greater than \"}${new Date(Number(t.minimum))}`;else r=\"Invalid input\";break;case V.too_big:if(t.type===\"array\")r=`Array must contain ${t.exact?\"exactly\":t.inclusive?\"at most\":\"less than\"} ${t.maximum} element(s)`;else if(t.type===\"string\")r=`String must contain ${t.exact?\"exactly\":t.inclusive?\"at most\":\"under\"} ${t.maximum} character(s)`;else if(t.type===\"number\")r=`Number must be ${t.exact?\"exactly\":t.inclusive?\"less than or equal to\":\"less than\"} ${t.maximum}`;else if(t.type===\"bigint\")r=`BigInt must be ${t.exact?\"exactly\":t.inclusive?\"less than or equal to\":\"less than\"} ${t.maximum}`;else if(t.type===\"date\")r=`Date must be ${t.exact?\"exactly\":t.inclusive?\"smaller than or equal to\":\"smaller than\"} ${new Date(Number(t.maximum))}`;else r=\"Invalid input\";break;case V.custom:r=\"Invalid input\";break;case V.invalid_intersection_types:r=\"Intersection results could not be merged\";break;case V.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case V.not_finite:r=\"Number must be finite\";break;default:r=e.defaultError,Bt.assertNever(t)}return{message:r}},ze=k2;var C2=ze;function Yi(){return C2}var Mn=(t)=\u003e{let{data:e,path:r,errorMaps:i,issueData:n}=t,a=[...r,...n.path||[]],o={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let c=\"\",l=i.filter((s)=\u003e!!s).slice().reverse();for(let s of l)c=s(o,{data:e,defaultError:c}).message;return{...n,path:a,message:c}};function rt(t,e){let r=Yi(),i=Mn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ze?void 0:ze].filter((n)=\u003e!!n)});t.common.issues.push(i)}class Ht{constructor(){this.value=\"valid\"}dirty(){if(this.value===\"valid\")this.value=\"dirty\"}abort(){if(this.value!==\"aborted\")this.value=\"aborted\"}static mergeArray(t,e){let r=[];for(let i of e){if(i.status===\"aborted\")return ut;if(i.status===\"dirty\")t.dirty();r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,e){let r=[];for(let i of e){let n=await i.key,a=await i.value;r.push({key:n,value:a})}return Ht.mergeObjectSync(t,r)}static mergeObjectSync(t,e){let r={};for(let i of e){let{key:n,value:a}=i;if(n.status===\"aborted\")return ut;if(a.status===\"aborted\")return ut;if(n.status===\"dirty\")t.dirty();if(a.status===\"dirty\")t.dirty();if(n.value!==\"__proto__\"\u0026\u0026(typeof a.value\u003c\"u\"||i.alwaysSet))r[n.value]=a.value}return{status:t.value,value:r}}}var ut=Object.freeze({status:\"aborted\"}),Nr=(t)=\u003e({status:\"dirty\",value:t}),Kt=(t)=\u003e({status:\"valid\",value:t}),Zs=(t)=\u003et.status===\"aborted\",Ks=(t)=\u003et.status===\"dirty\",rr=(t)=\u003et.status===\"valid\",Li=(t)=\u003etypeof Promise\u003c\"u\"\u0026\u0026t instanceof Promise;var lt;(function(t){t.errToObj=(e)=\u003etypeof e===\"string\"?{message:e}:e||{},t.toString=(e)=\u003etypeof e===\"string\"?e:e?.message})(lt||(lt={}));class pe{constructor(t,e,r,i){this._cachedPath=[],this.parent=t,this.data=e,this._path=r,this._key=i}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Om=(t,e)=\u003e{if(rr(e))return{success:!0,data:e.value};else{if(!t.common.issues.length)throw Error(\"Validation failed but no issues detected.\");return{success:!1,get error(){if(this._error)return this._error;let r=new ie(t.common.issues);return this._error=r,this._error}}}};function vt(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e\u0026\u0026(r||i))throw Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);if(e)return{errorMap:e,description:n};return{errorMap:(o,c)=\u003e{let{message:l}=t;if(o.code===\"invalid_enum_value\")return{message:l??c.defaultError};if(typeof c.data\u003e\"u\")return{message:l??i??c.defaultError};if(o.code!==\"invalid_type\")return{message:c.defaultError};return{message:l??r??c.defaultError}},description:n}}class wt{get description(){return this._def.description}_getType(t){return we(t.data)}_getOrReturnCtx(t,e){return e||{common:t.parent.common,data:t.data,parsedType:we(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:we(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let e=this._parse(t);if(Li(e))throw Error(\"Synchronous parse encountered promise.\");return e}_parseAsync(t){let e=this._parse(t);return Promise.resolve(e)}parse(t,e){let r=this.safeParse(t,e);if(r.success)return r.data;throw r.error}safeParse(t,e){let r={common:{issues:[],async:e?.async??!1,contextualErrorMap:e?.errorMap},path:e?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Om(r,i)}\"~validate\"(t){let e={common:{issues:[],async:!!this[\"~standard\"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)};if(!this[\"~standard\"].async)try{let r=this._parseSync({data:t,path:[],parent:e});return rr(r)?{value:r.value}:{issues:e.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes(\"encountered\"))this[\"~standard\"].async=!0;e.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:e}).then((r)=\u003err(r)?{value:r.value}:{issues:e.common.issues})}async parseAsync(t,e){let r=await this.safeParseAsync(t,e);if(r.success)return r.data;throw r.error}async safeParseAsync(t,e){let r={common:{issues:[],contextualErrorMap:e?.errorMap,async:!0},path:e?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)},i=this._parse({data:t,path:r.path,parent:r}),n=await(Li(i)?i:Promise.resolve(i));return Om(r,n)}refine(t,e){let r=(i)=\u003e{if(typeof e===\"string\"||typeof e\u003e\"u\")return{message:e};else if(typeof e===\"function\")return e(i);else return e};return this._refinement((i,n)=\u003e{let a=t(i),o=()=\u003en.addIssue({code:V.custom,...r(i)});if(typeof Promise\u003c\"u\"\u0026\u0026a instanceof Promise)return a.then((c)=\u003e{if(!c)return o(),!1;else return!0});if(!a)return o(),!1;else return!0})}refinement(t,e){return this._refinement((r,i)=\u003e{if(!t(r))return i.addIssue(typeof e===\"function\"?e(r,i):e),!1;else return!0})}_refinement(t){return new ue({schema:this,typeName:ft.ZodEffects,effect:{type:\"refinement\",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[\"~standard\"]={version:1,vendor:\"zod\",validate:(e)=\u003ethis[\"~validate\"](e)}}optional(){return me.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return $r.create(this,this._def)}or(t){return Ri.create([this,t],this._def)}and(t){return Oi.create(this,t,this._def)}transform(t){return new ue({...vt(this._def),schema:this,typeName:ft.ZodEffects,effect:{type:\"transform\",transform:t}})}default(t){let e=typeof t===\"function\"?t:()=\u003et;return new Vi({...vt(this._def),innerType:this,defaultValue:e,typeName:ft.ZodDefault})}brand(){return new ec({typeName:ft.ZodBranded,type:this,...vt(this._def)})}catch(t){let e=typeof t===\"function\"?t:()=\u003et;return new zi({...vt(this._def),innerType:this,catchValue:e,typeName:ft.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Wn.create(this,t)}readonly(){return Di.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var Y2=/^c[^\\s-]{8,}$/i,L2=/^[0-9a-z]+$/,E2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T2=/^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i,N2=/^[a-z0-9_-]{21}$/i,W2=/^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/,R2=/^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/,O2=/^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i,j2=\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\",Js,$2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,X2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/,V2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,D2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,jm=\"((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))\",G2=new RegExp(`^${jm} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit );function $m(t){let e=\"[0-5]\\\\d\";if(t.precision)e=`${e}\\\\.\\\\d{${t.precision}}`;else if(t.precision==null)e=`${e}(\\\\.\\\\d+)?`;let r=t.precision?\"+\":\"?\";return`([01]\\\\d|2[0-3]):[0-5]\\\\d(:${e})${r}`}function Q2(t){return new RegExp(`^${$m(t)} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit )}function H2(t){let e=`${jm}T${$m(t)}`,r=[];if(r.push(t.local?\"Z?\":\"Z\"),t.offset)r.push(\"([+-]\\\\d{2}:?\\\\d{2})\");return e=`${e}(${r.join(\"|\")})`,new RegExp(`^${e} checks/vendor/circuit-json-schematic-placement-analysis.browser.js - techmannih/nema34-mounted-stepper-controller - tscircuit )}function Z2(t,e){if((e===\"v4\"||!e)\u0026\u0026$2.test(t))return!0;if((e===\"v6\"||!e)\u0026\u0026V2.test(t))return!0;return!1}function K2(t,e){if(!W2.test(t))return!1;try{let[r]=t.split(\".\");if(!r)return!1;let i=r.replace(/-/g,\"+\").replace(/_/g,\"/\").padEnd(r.length+(4-r.length%4)%4,\"=\"),n=JSON.parse(atob(i));if(typeof n!==\"object\"||n===null)return!1;if(\"typ\"in n\u0026\u0026n?.typ!==\"JWT\")return!1;if(!n.alg)return!1;if(e\u0026\u0026n.alg!==e)return!1;return!0}catch{return!1}}function J2(t,e){if((e===\"v4\"||!e)\u0026\u0026X2.test(t))return!0;if((e===\"v6\"||!e)\u0026\u0026z2.test(t))return!0;return!1}class Be extends wt{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==nt.string){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.string,received:n.parsedType}),ut}let r=new Ht,i=void 0;for(let n of this._def.checks)if(n.kind===\"min\"){if(t.data.length\u003cn.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_small,minimum:n.value,type:\"string\",inclusive:!0,exact:!1,message:n.message}),r.dirty()}else if(n.kind===\"max\"){if(t.data.length\u003en.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_big,maximum:n.value,type:\"string\",inclusive:!0,exact:!1,message:n.message}),r.dirty()}else if(n.kind===\"length\"){let a=t.data.length\u003en.value,o=t.data.length\u003cn.value;if(a||o){if(i=this._getOrReturnCtx(t,i),a)rt(i,{code:V.too_big,maximum:n.value,type:\"string\",inclusive:!0,exact:!0,message:n.message});else if(o)rt(i,{code:V.too_small,minimum:n.value,type:\"string\",inclusive:!0,exact:!0,message:n.message});r.dirty()}}else if(n.kind===\"email\"){if(!O2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"email\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"emoji\"){if(!Js)Js=new RegExp(j2,\"u\");if(!Js.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"emoji\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"uuid\"){if(!T2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"uuid\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"nanoid\"){if(!N2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"nanoid\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"cuid\"){if(!Y2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"cuid\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"cuid2\"){if(!L2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"cuid2\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"ulid\"){if(!E2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"ulid\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"url\")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),rt(i,{validation:\"url\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"regex\"){if(n.regex.lastIndex=0,!n.regex.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"regex\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"trim\")t.data=t.data.trim();else if(n.kind===\"includes\"){if(!t.data.includes(n.value,n.position))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()}else if(n.kind===\"toLowerCase\")t.data=t.data.toLowerCase();else if(n.kind===\"toUpperCase\")t.data=t.data.toUpperCase();else if(n.kind===\"startsWith\"){if(!t.data.startsWith(n.value))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()}else if(n.kind===\"endsWith\"){if(!t.data.endsWith(n.value))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()}else if(n.kind===\"datetime\"){if(!H2(n).test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:\"datetime\",message:n.message}),r.dirty()}else if(n.kind===\"date\"){if(!G2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:\"date\",message:n.message}),r.dirty()}else if(n.kind===\"time\"){if(!Q2(n).test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:\"time\",message:n.message}),r.dirty()}else if(n.kind===\"duration\"){if(!R2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"duration\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"ip\"){if(!Z2(t.data,n.version))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"ip\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"jwt\"){if(!K2(t.data,n.alg))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"jwt\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"cidr\"){if(!J2(t.data,n.version))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"cidr\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"base64\"){if(!D2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"base64\",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind===\"base64url\"){if(!U2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:\"base64url\",code:V.invalid_string,message:n.message}),r.dirty()}else Bt.assertNever(n);return{status:r.value,value:t.data}}_regex(t,e,r){return this.refinement((i)=\u003et.test(i),{validation:e,code:V.invalid_string,...lt.errToObj(r)})}_addCheck(t){return new Be({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:\"email\",...lt.errToObj(t)})}url(t){return this._addCheck({kind:\"url\",...lt.errToObj(t)})}emoji(t){return this._addCheck({kind:\"emoji\",...lt.errToObj(t)})}uuid(t){return this._addCheck({kind:\"uuid\",...lt.errToObj(t)})}nanoid(t){return this._addCheck({kind:\"nanoid\",...lt.errToObj(t)})}cuid(t){return this._addCheck({kind:\"cuid\",...lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:\"cuid2\",...lt.errToObj(t)})}ulid(t){return this._addCheck({kind:\"ulid\",...lt.errToObj(t)})}base64(t){return this._addCheck({kind:\"base64\",...lt.errToObj(t)})}base64url(t){return this._addCheck({kind:\"base64url\",...lt.errToObj(t)})}jwt(t){return this._addCheck({kind:\"jwt\",...lt.errToObj(t)})}ip(t){return this._addCheck({kind:\"ip\",...lt.errToObj(t)})}cidr(t){return this._addCheck({kind:\"cidr\",...lt.errToObj(t)})}datetime(t){if(typeof t===\"string\")return this._addCheck({kind:\"datetime\",precision:null,offset:!1,local:!1,message:t});return this._addCheck({kind:\"datetime\",precision:typeof t?.precision\u003e\"u\"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...lt.errToObj(t?.message)})}date(t){return this._addCheck({kind:\"date\",message:t})}time(t){if(typeof t===\"string\")return this._addCheck({kind:\"time\",precision:null,message:t});return this._addCheck({kind:\"time\",precision:typeof t?.precision\u003e\"u\"?null:t?.precision,...lt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:\"duration\",...lt.errToObj(t)})}regex(t,e){return this._addCheck({kind:\"regex\",regex:t,...lt.errToObj(e)})}includes(t,e){return this._addCheck({kind:\"includes\",value:t,position:e?.position,...lt.errToObj(e?.message)})}startsWith(t,e){return this._addCheck({kind:\"startsWith\",value:t,...lt.errToObj(e)})}endsWith(t,e){return this._addCheck({kind:\"endsWith\",value:t,...lt.errToObj(e)})}min(t,e){return this._addCheck({kind:\"min\",value:t,...lt.errToObj(e)})}max(t,e){return this._addCheck({kind:\"max\",value:t,...lt.errToObj(e)})}length(t,e){return this._addCheck({kind:\"length\",value:t,...lt.errToObj(e)})}nonempty(t){return this.min(1,lt.errToObj(t))}trim(){return new Be({...this._def,checks:[...this._def.checks,{kind:\"trim\"}]})}toLowerCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:\"toLowerCase\"}]})}toUpperCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:\"toUpperCase\"}]})}get isDatetime(){return!!this._def.checks.find((t)=\u003et.kind===\"datetime\")}get isDate(){return!!this._def.checks.find((t)=\u003et.kind===\"date\")}get isTime(){return!!this._def.checks.find((t)=\u003et.kind===\"time\")}get isDuration(){return!!this._def.checks.find((t)=\u003et.kind===\"duration\")}get isEmail(){return!!this._def.checks.find((t)=\u003et.kind===\"email\")}get isURL(){return!!this._def.checks.find((t)=\u003et.kind===\"url\")}get isEmoji(){return!!this._def.checks.find((t)=\u003et.kind===\"emoji\")}get isUUID(){return!!this._def.checks.find((t)=\u003et.kind===\"uuid\")}get isNANOID(){return!!this._def.checks.find((t)=\u003et.kind===\"nanoid\")}get isCUID(){return!!this._def.checks.find((t)=\u003et.kind===\"cuid\")}get isCUID2(){return!!this._def.checks.find((t)=\u003et.kind===\"cuid2\")}get isULID(){return!!this._def.checks.find((t)=\u003et.kind===\"ulid\")}get isIP(){return!!this._def.checks.find((t)=\u003et.kind===\"ip\")}get isCIDR(){return!!this._def.checks.find((t)=\u003et.kind===\"cidr\")}get isBase64(){return!!this._def.checks.find((t)=\u003et.kind===\"base64\")}get isBase64url(){return!!this._def.checks.find((t)=\u003et.kind===\"base64url\")}get minLength(){let t=null;for(let e of this._def.checks)if(e.kind===\"min\"){if(t===null||e.value\u003et)t=e.value}return t}get maxLength(){let t=null;for(let e of this._def.checks)if(e.kind===\"max\"){if(t===null||e.value\u003ct)t=e.value}return t}}Be.create=(t)=\u003enew Be({checks:[],typeName:ft.ZodString,coerce:t?.coerce??!1,...vt(t)});function q2(t,e){let r=(t.toString().split(\".\")[1]||\"\").length,i=(e.toString().split(\".\")[1]||\"\").length,n=r\u003ei?r:i,a=Number.parseInt(t.toFixed(n).replace(\".\",\"\")),o=Number.parseInt(e.toFixed(n).replace(\".\",\"\"));return a%o/10**n}class Rr extends wt{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce)t.data=Number(t.data);if(this._getType(t)!==nt.number){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.number,received:n.parsedType}),ut}let r=void 0,i=new Ht;for(let n of this._def.checks)if(n.kind===\"int\"){if(!Bt.isInteger(t.data))r=this._getOrReturnCtx(t,r),rt(r,{code:V.invalid_type,expected:\"integer\",received:\"float\",message:n.message}),i.dirty()}else if(n.kind===\"min\"){if(n.inclusive?t.data\u003cn.value:t.data\u003c=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_small,minimum:n.value,type:\"number\",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()}else if(n.kind===\"max\"){if(n.inclusive?t.data\u003en.value:t.data\u003e=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_big,maximum:n.value,type:\"number\",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()}else if(n.kind===\"multipleOf\"){if(q2(t.data,n.value)!==0)r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()}else if(n.kind===\"finite\"){if(!Number.isFinite(t.data))r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_finite,message:n.message}),i.dirty()}else Bt.assertNever(n);return{status:i.value,value:t.data}}gte(t,e){return this.setLimit(\"min\",t,!0,lt.toString(e))}gt(t,e){return this.setLimit(\"min\",t,!1,lt.toString(e))}lte(t,e){return this.setLimit(\"max\",t,!0,lt.toString(e))}lt(t,e){return this.setLimit(\"max\",t,!1,lt.toString(e))}setLimit(t,e,r,i){return new Rr({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:lt.toString(i)}]})}_addCheck(t){return new Rr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:\"int\",message:lt.toString(t)})}positive(t){return this._addCheck({kind:\"min\",value:0,inclusive:!1,message:lt.toString(t)})}negative(t){return this._addCheck({kind:\"max\",value:0,inclusive:!1,message:lt.toString(t)})}nonpositive(t){return this._addCheck({kind:\"max\",value:0,inclusive:!0,message:lt.toString(t)})}nonnegative(t){return this._addCheck({kind:\"min\",value:0,inclusive:!0,message:lt.toString(t)})}multipleOf(t,e){return this._addCheck({kind:\"multipleOf\",value:t,message:lt.toString(e)})}finite(t){return this._addCheck({kind:\"finite\",message:lt.toString(t)})}safe(t){return this._addCheck({kind:\"min\",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:lt.toString(t)})._addCheck({kind:\"max\",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:lt.toString(t)})}get minValue(){let t=null;for(let e of this._def.checks)if(e.kind===\"min\"){if(t===null||e.value\u003et)t=e.value}return t}get maxValue(){let t=null;for(let e of this._def.checks)if(e.kind===\"max\"){if(t===null||e.value\u003ct)t=e.value}return t}get isInt(){return!!this._def.checks.find((t)=\u003et.kind===\"int\"||t.kind===\"multipleOf\"\u0026\u0026Bt.isInteger(t.value))}get isFinite(){let t=null,e=null;for(let r of this._def.checks)if(r.kind===\"finite\"||r.kind===\"int\"||r.kind===\"multipleOf\")return!0;else if(r.kind===\"min\"){if(e===null||r.value\u003ee)e=r.value}else if(r.kind===\"max\"){if(t===null||r.value\u003ct)t=r.value}return Number.isFinite(e)\u0026\u0026Number.isFinite(t)}}Rr.create=(t)=\u003enew Rr({checks:[],typeName:ft.ZodNumber,coerce:t?.coerce||!1,...vt(t)});class Or extends wt{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==nt.bigint)return this._getInvalidInput(t);let r=void 0,i=new Ht;for(let n of this._def.checks)if(n.kind===\"min\"){if(n.inclusive?t.data\u003cn.value:t.data\u003c=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_small,type:\"bigint\",minimum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()}else if(n.kind===\"max\"){if(n.inclusive?t.data\u003en.value:t.data\u003e=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_big,type:\"bigint\",maximum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()}else if(n.kind===\"multipleOf\"){if(t.data%n.value!==BigInt(0))r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()}else Bt.assertNever(n);return{status:i.value,value:t.data}}_getInvalidInput(t){let e=this._getOrReturnCtx(t);return rt(e,{code:V.invalid_type,expected:nt.bigint,received:e.parsedType}),ut}gte(t,e){return this.setLimit(\"min\",t,!0,lt.toString(e))}gt(t,e){return this.setLimit(\"min\",t,!1,lt.toString(e))}lte(t,e){return this.setLimit(\"max\",t,!0,lt.toString(e))}lt(t,e){return this.setLimit(\"max\",t,!1,lt.toString(e))}setLimit(t,e,r,i){return new Or({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:lt.toString(i)}]})}_addCheck(t){return new Or({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!1,message:lt.toString(t)})}negative(t){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!1,message:lt.toString(t)})}nonpositive(t){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!0,message:lt.toString(t)})}nonnegative(t){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!0,message:lt.toString(t)})}multipleOf(t,e){return this._addCheck({kind:\"multipleOf\",value:t,message:lt.toString(e)})}get minValue(){let t=null;for(let e of this._def.checks)if(e.kind===\"min\"){if(t===null||e.value\u003et)t=e.value}return t}get maxValue(){let t=null;for(let e of this._def.checks)if(e.kind===\"max\"){if(t===null||e.value\u003ct)t=e.value}return t}}Or.create=(t)=\u003enew Or({checks:[],typeName:ft.ZodBigInt,coerce:t?.coerce??!1,...vt(t)});class kn extends wt{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==nt.boolean){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.boolean,received:r.parsedType}),ut}return Kt(t.data)}}kn.create=(t)=\u003enew kn({typeName:ft.ZodBoolean,coerce:t?.coerce||!1,...vt(t)});class Ti extends wt{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==nt.date){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.date,received:n.parsedType}),ut}if(Number.isNaN(t.data.getTime())){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_date}),ut}let r=new Ht,i=void 0;for(let n of this._def.checks)if(n.kind===\"min\"){if(t.data.getTime()\u003cn.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:\"date\"}),r.dirty()}else if(n.kind===\"max\"){if(t.data.getTime()\u003en.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:\"date\"}),r.dirty()}else Bt.assertNever(n);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ti({...this._def,checks:[...this._def.checks,t]})}min(t,e){return this._addCheck({kind:\"min\",value:t.getTime(),message:lt.toString(e)})}max(t,e){return this._addCheck({kind:\"max\",value:t.getTime(),message:lt.toString(e)})}get minDate(){let t=null;for(let e of this._def.checks)if(e.kind===\"min\"){if(t===null||e.value\u003et)t=e.value}return t!=null?new Date(t):null}get maxDate(){let t=null;for(let e of this._def.checks)if(e.kind===\"max\"){if(t===null||e.value\u003ct)t=e.value}return t!=null?new Date(t):null}}Ti.create=(t)=\u003enew Ti({checks:[],coerce:t?.coerce||!1,typeName:ft.ZodDate,...vt(t)});class Cn extends wt{_parse(t){if(this._getType(t)!==nt.symbol){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.symbol,received:r.parsedType}),ut}return Kt(t.data)}}Cn.create=(t)=\u003enew Cn({typeName:ft.ZodSymbol,...vt(t)});class Ni extends wt{_parse(t){if(this._getType(t)!==nt.undefined){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.undefined,received:r.parsedType}),ut}return Kt(t.data)}}Ni.create=(t)=\u003enew Ni({typeName:ft.ZodUndefined,...vt(t)});class Wi extends wt{_parse(t){if(this._getType(t)!==nt.null){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.null,received:r.parsedType}),ut}return Kt(t.data)}}Wi.create=(t)=\u003enew Wi({typeName:ft.ZodNull,...vt(t)});class Yn extends wt{constructor(){super(...arguments);this._any=!0}_parse(t){return Kt(t.data)}}Yn.create=(t)=\u003enew Yn({typeName:ft.ZodAny,...vt(t)});class ir extends wt{constructor(){super(...arguments);this._unknown=!0}_parse(t){return Kt(t.data)}}ir.create=(t)=\u003enew ir({typeName:ft.ZodUnknown,...vt(t)});class Fe extends wt{_parse(t){let e=this._getOrReturnCtx(t);return rt(e,{code:V.invalid_type,expected:nt.never,received:e.parsedType}),ut}}Fe.create=(t)=\u003enew Fe({typeName:ft.ZodNever,...vt(t)});class Ln extends wt{_parse(t){if(this._getType(t)!==nt.undefined){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.void,received:r.parsedType}),ut}return Kt(t.data)}}Ln.create=(t)=\u003enew Ln({typeName:ft.ZodVoid,...vt(t)});class de extends wt{_parse(t){let{ctx:e,status:r}=this._processInputParams(t),i=this._def;if(e.parsedType!==nt.array)return rt(e,{code:V.invalid_type,expected:nt.array,received:e.parsedType}),ut;if(i.exactLength!==null){let a=e.data.length\u003ei.exactLength.value,o=e.data.length\u003ci.exactLength.value;if(a||o)rt(e,{code:a?V.too_big:V.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:\"array\",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty()}if(i.minLength!==null){if(e.data.length\u003ci.minLength.value)rt(e,{code:V.too_small,minimum:i.minLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()}if(i.maxLength!==null){if(e.data.length\u003ei.maxLength.value)rt(e,{code:V.too_big,maximum:i.maxLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()}if(e.common.async)return Promise.all([...e.data].map((a,o)=\u003ei.type._parseAsync(new pe(e,a,e.path,o)))).then((a)=\u003eHt.mergeArray(r,a));let n=[...e.data].map((a,o)=\u003ei.type._parseSync(new pe(e,a,e.path,o)));return Ht.mergeArray(r,n)}get element(){return this._def.type}min(t,e){return new de({...this._def,minLength:{value:t,message:lt.toString(e)}})}max(t,e){return new de({...this._def,maxLength:{value:t,message:lt.toString(e)}})}length(t,e){return new de({...this._def,exactLength:{value:t,message:lt.toString(e)}})}nonempty(t){return this.min(1,t)}}de.create=(t,e)=\u003enew de({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ft.ZodArray,...vt(e)});function Wr(t){if(t instanceof Ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=me.create(Wr(i))}return new Ot({...t._def,shape:()=\u003ee})}else if(t instanceof de)return new de({...t._def,type:Wr(t.element)});else if(t instanceof me)return me.create(Wr(t.unwrap()));else if(t instanceof De)return De.create(Wr(t.unwrap()));else if(t instanceof Pe)return Pe.create(t.items.map((e)=\u003eWr(e)));else return t}class Ot extends wt{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),e=Bt.objectKeys(t);return this._cached={shape:t,keys:e},this._cached}_parse(t){if(this._getType(t)!==nt.object){let l=this._getOrReturnCtx(t);return rt(l,{code:V.invalid_type,expected:nt.object,received:l.parsedType}),ut}let{status:r,ctx:i}=this._processInputParams(t),{shape:n,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Fe\u0026\u0026this._def.unknownKeys===\"strip\")){for(let l in i.data)if(!a.includes(l))o.push(l)}let c=[];for(let l of a){let s=n[l],p=i.data[l];c.push({key:{status:\"valid\",value:l},value:s._parse(new pe(i,p,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Fe){let l=this._def.unknownKeys;if(l===\"passthrough\")for(let s of o)c.push({key:{status:\"valid\",value:s},value:{status:\"valid\",value:i.data[s]}});else if(l===\"strict\"){if(o.length\u003e0)rt(i,{code:V.unrecognized_keys,keys:o}),r.dirty()}else if(l===\"strip\");else throw Error(\"Internal ZodObject error: invalid unknownKeys value.\")}else{let l=this._def.catchall;for(let s of o){let p=i.data[s];c.push({key:{status:\"valid\",value:s},value:l._parse(new pe(i,p,i.path,s)),alwaysSet:s in i.data})}}if(i.common.async)return Promise.resolve().then(async()=\u003e{let l=[];for(let s of c){let p=await s.key,d=await s.value;l.push({key:p,value:d,alwaysSet:s.alwaysSet})}return l}).then((l)=\u003eHt.mergeObjectSync(r,l));else return Ht.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return lt.errToObj,new Ot({...this._def,unknownKeys:\"strict\",...t!==void 0?{errorMap:(e,r)=\u003e{let i=this._def.errorMap?.(e,r).message??r.defaultError;if(e.code===\"unrecognized_keys\")return{message:lt.errToObj(t).message??i};return{message:i}}}:{}})}strip(){return new Ot({...this._def,unknownKeys:\"strip\"})}passthrough(){return new Ot({...this._def,unknownKeys:\"passthrough\"})}extend(t){return new Ot({...this._def,shape:()=\u003e({...this._def.shape(),...t})})}merge(t){return new Ot({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=\u003e({...this._def.shape(),...t._def.shape()}),typeName:ft.ZodObject})}setKey(t,e){return this.augment({[t]:e})}catchall(t){return new Ot({...this._def,catchall:t})}pick(t){let e={};for(let r of Bt.objectKeys(t))if(t[r]\u0026\u0026this.shape[r])e[r]=this.shape[r];return new Ot({...this._def,shape:()=\u003ee})}omit(t){let e={};for(let r of Bt.objectKeys(this.shape))if(!t[r])e[r]=this.shape[r];return new Ot({...this._def,shape:()=\u003ee})}deepPartial(){return Wr(this)}partial(t){let e={};for(let r of Bt.objectKeys(this.shape)){let i=this.shape[r];if(t\u0026\u0026!t[r])e[r]=i;else e[r]=i.optional()}return new Ot({...this._def,shape:()=\u003ee})}required(t){let e={};for(let r of Bt.objectKeys(this.shape))if(t\u0026\u0026!t[r])e[r]=this.shape[r];else{let n=this.shape[r];while(n instanceof me)n=n._def.innerType;e[r]=n}return new Ot({...this._def,shape:()=\u003ee})}keyof(){return Xm(Bt.objectKeys(this.shape))}}Ot.create=(t,e)=\u003enew Ot({shape:()=\u003et,unknownKeys:\"strip\",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});Ot.strictCreate=(t,e)=\u003enew Ot({shape:()=\u003et,unknownKeys:\"strict\",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});Ot.lazycreate=(t,e)=\u003enew Ot({shape:t,unknownKeys:\"strip\",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});class Ri extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=this._def.options;function i(n){for(let o of n)if(o.result.status===\"valid\")return o.result;for(let o of n)if(o.result.status===\"dirty\")return e.common.issues.push(...o.ctx.common.issues),o.result;let a=n.map((o)=\u003enew ie(o.ctx.common.issues));return rt(e,{code:V.invalid_union,unionErrors:a}),ut}if(e.common.async)return Promise.all(r.map(async(n)=\u003e{let a={...e,common:{...e.common,issues:[]},parent:null};return{result:await n._parseAsync({data:e.data,path:e.path,parent:a}),ctx:a}})).then(i);else{let n=void 0,a=[];for(let c of r){let l={...e,common:{...e.common,issues:[]},parent:null},s=c._parseSync({data:e.data,path:e.path,parent:l});if(s.status===\"valid\")return s;else if(s.status===\"dirty\"\u0026\u0026!n)n={result:s,ctx:l};if(l.common.issues.length)a.push(l.common.issues)}if(n)return e.common.issues.push(...n.ctx.common.issues),n.result;let o=a.map((c)=\u003enew ie(c));return rt(e,{code:V.invalid_union,unionErrors:o}),ut}}get options(){return this._def.options}}Ri.create=(t,e)=\u003enew Ri({options:t,typeName:ft.ZodUnion,...vt(e)});var Ae=(t)=\u003e{if(t instanceof ji)return Ae(t.schema);else if(t instanceof ue)return Ae(t.innerType());else if(t instanceof $i)return[t.value];else if(t instanceof nr)return t.options;else if(t instanceof Xi)return Bt.objectValues(t.enum);else if(t instanceof Vi)return Ae(t._def.innerType);else if(t instanceof Ni)return[void 0];else if(t instanceof Wi)return[null];else if(t instanceof me)return[void 0,...Ae(t.unwrap())];else if(t instanceof De)return[null,...Ae(t.unwrap())];else if(t instanceof ec)return Ae(t.unwrap());else if(t instanceof Di)return Ae(t.unwrap());else if(t instanceof zi)return Ae(t._def.innerType);else return[]};class tc extends wt{_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.object)return rt(e,{code:V.invalid_type,expected:nt.object,received:e.parsedType}),ut;let r=this.discriminator,i=e.data[r],n=this.optionsMap.get(i);if(!n)return rt(e,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ut;if(e.common.async)return n._parseAsync({data:e.data,path:e.path,parent:e});else return n._parseSync({data:e.data,path:e.path,parent:e})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,e,r){let i=new Map;for(let n of e){let a=Ae(n.shape[t]);if(!a.length)throw Error(`A discriminator value for key \\`${t}\\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,n)}}return new tc({typeName:ft.ZodDiscriminatedUnion,discriminator:t,options:e,optionsMap:i,...vt(r)})}}function qs(t,e){let r=we(t),i=we(e);if(t===e)return{valid:!0,data:t};else if(r===nt.object\u0026\u0026i===nt.object){let n=Bt.objectKeys(e),a=Bt.objectKeys(t).filter((c)=\u003en.indexOf(c)!==-1),o={...t,...e};for(let c of a){let l=qs(t[c],e[c]);if(!l.valid)return{valid:!1};o[c]=l.data}return{valid:!0,data:o}}else if(r===nt.array\u0026\u0026i===nt.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a\u003ct.length;a++){let o=t[a],c=e[a],l=qs(o,c);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else if(r===nt.date\u0026\u0026i===nt.date\u0026\u0026+t===+e)return{valid:!0,data:t};else return{valid:!1}}class Oi extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t),i=(n,a)=\u003e{if(Zs(n)||Zs(a))return ut;let o=qs(n.value,a.value);if(!o.valid)return rt(r,{code:V.invalid_intersection_types}),ut;if(Ks(n)||Ks(a))e.dirty();return{status:e.value,value:o.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,a])=\u003ei(n,a));else return i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Oi.create=(t,e,r)=\u003enew Oi({left:t,right:e,typeName:ft.ZodIntersection,...vt(r)});class Pe extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.array)return rt(r,{code:V.invalid_type,expected:nt.array,received:r.parsedType}),ut;if(r.data.length\u003cthis._def.items.length)return rt(r,{code:V.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),ut;if(!this._def.rest\u0026\u0026r.data.length\u003ethis._def.items.length)rt(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),e.dirty();let n=[...r.data].map((a,o)=\u003e{let c=this._def.items[o]||this._def.rest;if(!c)return null;return c._parse(new pe(r,a,r.path,o))}).filter((a)=\u003e!!a);if(r.common.async)return Promise.all(n).then((a)=\u003eHt.mergeArray(e,a));else return Ht.mergeArray(e,n)}get items(){return this._def.items}rest(t){return new Pe({...this._def,rest:t})}}Pe.create=(t,e)=\u003e{if(!Array.isArray(t))throw Error(\"You must pass an array of schemas to z.tuple([ ... ])\");return new Pe({items:t,typeName:ft.ZodTuple,rest:null,...vt(e)})};class En extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.object)return rt(r,{code:V.invalid_type,expected:nt.object,received:r.parsedType}),ut;let i=[],n=this._def.keyType,a=this._def.valueType;for(let o in r.data)i.push({key:n._parse(new pe(r,o,r.path,o)),value:a._parse(new pe(r,r.data[o],r.path,o)),alwaysSet:o in r.data});if(r.common.async)return Ht.mergeObjectAsync(e,i);else return Ht.mergeObjectSync(e,i)}get element(){return this._def.valueType}static create(t,e,r){if(e instanceof wt)return new En({keyType:t,valueType:e,typeName:ft.ZodRecord,...vt(r)});return new En({keyType:Be.create(),valueType:t,typeName:ft.ZodRecord,...vt(e)})}}class Tn extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.map)return rt(r,{code:V.invalid_type,expected:nt.map,received:r.parsedType}),ut;let i=this._def.keyType,n=this._def.valueType,a=[...r.data.entries()].map(([o,c],l)=\u003e({key:i._parse(new pe(r,o,r.path,[l,\"key\"])),value:n._parse(new pe(r,c,r.path,[l,\"value\"]))}));if(r.common.async){let o=new Map;return Promise.resolve().then(async()=\u003e{for(let c of a){let l=await c.key,s=await c.value;if(l.status===\"aborted\"||s.status===\"aborted\")return ut;if(l.status===\"dirty\"||s.status===\"dirty\")e.dirty();o.set(l.value,s.value)}return{status:e.value,value:o}})}else{let o=new Map;for(let c of a){let{key:l,value:s}=c;if(l.status===\"aborted\"||s.status===\"aborted\")return ut;if(l.status===\"dirty\"||s.status===\"dirty\")e.dirty();o.set(l.value,s.value)}return{status:e.value,value:o}}}}Tn.create=(t,e,r)=\u003enew Tn({valueType:e,keyType:t,typeName:ft.ZodMap,...vt(r)});class jr extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.set)return rt(r,{code:V.invalid_type,expected:nt.set,received:r.parsedType}),ut;let i=this._def;if(i.minSize!==null){if(r.data.size\u003ci.minSize.value)rt(r,{code:V.too_small,minimum:i.minSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.minSize.message}),e.dirty()}if(i.maxSize!==null){if(r.data.size\u003ei.maxSize.value)rt(r,{code:V.too_big,maximum:i.maxSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.maxSize.message}),e.dirty()}let n=this._def.valueType;function a(c){let l=new Set;for(let s of c){if(s.status===\"aborted\")return ut;if(s.status===\"dirty\")e.dirty();l.add(s.value)}return{status:e.value,value:l}}let o=[...r.data.values()].map((c,l)=\u003en._parse(new pe(r,c,r.path,l)));if(r.common.async)return Promise.all(o).then((c)=\u003ea(c));else return a(o)}min(t,e){return new jr({...this._def,minSize:{value:t,message:lt.toString(e)}})}max(t,e){return new jr({...this._def,maxSize:{value:t,message:lt.toString(e)}})}size(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}jr.create=(t,e)=\u003enew jr({valueType:t,minSize:null,maxSize:null,typeName:ft.ZodSet,...vt(e)});class Ei extends wt{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.function)return rt(e,{code:V.invalid_type,expected:nt.function,received:e.parsedType}),ut;function r(o,c){return Mn({data:o,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Yi(),ze].filter((l)=\u003e!!l),issueData:{code:V.invalid_arguments,argumentsError:c}})}function i(o,c){return Mn({data:o,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Yi(),ze].filter((l)=\u003e!!l),issueData:{code:V.invalid_return_type,returnTypeError:c}})}let n={errorMap:e.common.contextualErrorMap},a=e.data;if(this._def.returns instanceof $r){let o=this;return Kt(async function(...c){let l=new ie([]),s=await o._def.args.parseAsync(c,n).catch((m)=\u003e{throw l.addIssue(r(c,m)),l}),p=await Reflect.apply(a,this,s);return await o._def.returns._def.type.parseAsync(p,n).catch((m)=\u003e{throw l.addIssue(i(p,m)),l})})}else{let o=this;return Kt(function(...c){let l=o._def.args.safeParse(c,n);if(!l.success)throw new ie([r(c,l.error)]);let s=Reflect.apply(a,this,l.data),p=o._def.returns.safeParse(s,n);if(!p.success)throw new ie([i(s,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ei({...this._def,args:Pe.create(t).rest(ir.create())})}returns(t){return new Ei({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,e,r){return new Ei({args:t?t:Pe.create([]).rest(ir.create()),returns:e||ir.create(),typeName:ft.ZodFunction,...vt(r)})}}class ji extends wt{get schema(){return this._def.getter()}_parse(t){let{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}ji.create=(t,e)=\u003enew ji({getter:t,typeName:ft.ZodLazy,...vt(e)});class $i extends wt{_parse(t){if(t.data!==this._def.value){let e=this._getOrReturnCtx(t);return rt(e,{received:e.data,code:V.invalid_literal,expected:this._def.value}),ut}return{status:\"valid\",value:t.data}}get value(){return this._def.value}}$i.create=(t,e)=\u003enew $i({value:t,typeName:ft.ZodLiteral,...vt(e)});function Xm(t,e){return new nr({values:t,typeName:ft.ZodEnum,...vt(e)})}class nr extends wt{_parse(t){if(typeof t.data!==\"string\"){let e=this._getOrReturnCtx(t),r=this._def.values;return rt(e,{expected:Bt.joinValues(r),received:e.parsedType,code:V.invalid_type}),ut}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let e=this._getOrReturnCtx(t),r=this._def.values;return rt(e,{received:e.data,code:V.invalid_enum_value,options:r}),ut}return Kt(t.data)}get options(){return this._def.values}get enum(){let t={};for(let e of this._def.values)t[e]=e;return t}get Values(){let t={};for(let e of this._def.values)t[e]=e;return t}get Enum(){let t={};for(let e of this._def.values)t[e]=e;return t}extract(t,e=this._def){return nr.create(t,{...this._def,...e})}exclude(t,e=this._def){return nr.create(this.options.filter((r)=\u003e!t.includes(r)),{...this._def,...e})}}nr.create=Xm;class Xi extends wt{_parse(t){let e=Bt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==nt.string\u0026\u0026r.parsedType!==nt.number){let i=Bt.objectValues(e);return rt(r,{expected:Bt.joinValues(i),received:r.parsedType,code:V.invalid_type}),ut}if(!this._cache)this._cache=new Set(Bt.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let i=Bt.objectValues(e);return rt(r,{received:r.data,code:V.invalid_enum_value,options:i}),ut}return Kt(t.data)}get enum(){return this._def.values}}Xi.create=(t,e)=\u003enew Xi({values:t,typeName:ft.ZodNativeEnum,...vt(e)});class $r extends wt{unwrap(){return this._def.type}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.promise\u0026\u0026e.common.async===!1)return rt(e,{code:V.invalid_type,expected:nt.promise,received:e.parsedType}),ut;let r=e.parsedType===nt.promise?e.data:Promise.resolve(e.data);return Kt(r.then((i)=\u003ethis._def.type.parseAsync(i,{path:e.path,errorMap:e.common.contextualErrorMap})))}}$r.create=(t,e)=\u003enew $r({type:t,typeName:ft.ZodPromise,...vt(e)});class ue extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ft.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:e,ctx:r}=this._processInputParams(t),i=this._def.effect||null,n={addIssue:(a)=\u003e{if(rt(r,a),a.fatal)e.abort();else e.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),i.type===\"preprocess\"){let a=i.transform(r.data,n);if(r.common.async)return Promise.resolve(a).then(async(o)=\u003e{if(e.value===\"aborted\")return ut;let c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});if(c.status===\"aborted\")return ut;if(c.status===\"dirty\")return Nr(c.value);if(e.value===\"dirty\")return Nr(c.value);return c});else{if(e.value===\"aborted\")return ut;let o=this._def.schema._parseSync({data:a,path:r.path,parent:r});if(o.status===\"aborted\")return ut;if(o.status===\"dirty\")return Nr(o.value);if(e.value===\"dirty\")return Nr(o.value);return o}}if(i.type===\"refinement\"){let a=(o)=\u003e{let c=i.refinement(o,n);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");return o};if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(o.status===\"aborted\")return ut;if(o.status===\"dirty\")e.dirty();return a(o.value),{status:e.value,value:o.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=\u003e{if(o.status===\"aborted\")return ut;if(o.status===\"dirty\")e.dirty();return a(o.value).then(()=\u003e({status:e.value,value:o.value}))})}if(i.type===\"transform\")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!rr(a))return ut;let o=i.transform(a.value,n);if(o instanceof Promise)throw Error(\"Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.\");return{status:e.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((a)=\u003e{if(!rr(a))return ut;return Promise.resolve(i.transform(a.value,n)).then((o)=\u003e({status:e.value,value:o}))});Bt.assertNever(i)}}ue.create=(t,e,r)=\u003enew ue({schema:t,typeName:ft.ZodEffects,effect:e,...vt(r)});ue.createWithPreprocess=(t,e,r)=\u003enew ue({schema:e,effect:{type:\"preprocess\",transform:t},typeName:ft.ZodEffects,...vt(r)});class me extends wt{_parse(t){if(this._getType(t)===nt.undefined)return Kt(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}me.create=(t,e)=\u003enew me({innerType:t,typeName:ft.ZodOptional,...vt(e)});class De extends wt{_parse(t){if(this._getType(t)===nt.null)return Kt(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}De.create=(t,e)=\u003enew De({innerType:t,typeName:ft.ZodNullable,...vt(e)});class Vi extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;if(e.parsedType===nt.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}Vi.create=(t,e)=\u003enew Vi({innerType:t,typeName:ft.ZodDefault,defaultValue:typeof e.default===\"function\"?e.default:()=\u003ee.default,...vt(e)});class zi extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r={...e,common:{...e.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(Li(i))return i.then((n)=\u003e({status:\"valid\",value:n.status===\"valid\"?n.value:this._def.catchValue({get error(){return new ie(r.common.issues)},input:r.data})}));else return{status:\"valid\",value:i.status===\"valid\"?i.value:this._def.catchValue({get error(){return new ie(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}zi.create=(t,e)=\u003enew zi({innerType:t,typeName:ft.ZodCatch,catchValue:typeof e.catch===\"function\"?e.catch:()=\u003ee.catch,...vt(e)});class Nn extends wt{_parse(t){if(this._getType(t)!==nt.nan){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.nan,received:r.parsedType}),ut}return{status:\"valid\",value:t.data}}}Nn.create=(t)=\u003enew Nn({typeName:ft.ZodNaN,...vt(t)});var VT=Symbol(\"zod_brand\");class ec extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;return this._def.type._parse({data:r,path:e.path,parent:e})}unwrap(){return this._def.type}}class Wn extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=\u003e{let n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(n.status===\"aborted\")return ut;if(n.status===\"dirty\")return e.dirty(),Nr(n.value);else return this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();else{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(i.status===\"aborted\")return ut;if(i.status===\"dirty\")return e.dirty(),{status:\"dirty\",value:i.value};else return this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,e){return new Wn({in:t,out:e,typeName:ft.ZodPipeline})}}class Di extends wt{_parse(t){let e=this._def.innerType._parse(t),r=(i)=\u003e{if(rr(i))i.value=Object.freeze(i.value);return i};return Li(e)?e.then((i)=\u003er(i)):r(e)}unwrap(){return this._def.innerType}}Di.create=(t,e)=\u003enew Di({innerType:t,typeName:ft.ZodReadonly,...vt(e)});var zT={object:Ot.lazycreate},ft;(function(t){t.ZodString=\"ZodString\",t.ZodNumber=\"ZodNumber\",t.ZodNaN=\"ZodNaN\",t.ZodBigInt=\"ZodBigInt\",t.ZodBoolean=\"ZodBoolean\",t.ZodDate=\"ZodDate\",t.ZodSymbol=\"ZodSymbol\",t.ZodUndefined=\"ZodUndefined\",t.ZodNull=\"ZodNull\",t.ZodAny=\"ZodAny\",t.ZodUnknown=\"ZodUnknown\",t.ZodNever=\"ZodNever\",t.ZodVoid=\"ZodVoid\",t.ZodArray=\"ZodArray\",t.ZodObject=\"ZodObject\",t.ZodUnion=\"ZodUnion\",t.ZodDiscriminatedUnion=\"ZodDiscriminatedUnion\",t.ZodIntersection=\"ZodIntersection\",t.ZodTuple=\"ZodTuple\",t.ZodRecord=\"ZodRecord\",t.ZodMap=\"ZodMap\",t.ZodSet=\"ZodSet\",t.ZodFunction=\"ZodFunction\",t.ZodLazy=\"ZodLazy\",t.ZodLiteral=\"ZodLiteral\",t.ZodEnum=\"ZodEnum\",t.ZodEffects=\"ZodEffects\",t.ZodNativeEnum=\"ZodNativeEnum\",t.ZodOptional=\"ZodOptional\",t.ZodNullable=\"ZodNullable\",t.ZodDefault=\"ZodDefault\",t.ZodCatch=\"ZodCatch\",t.ZodPromise=\"ZodPromise\",t.ZodBranded=\"ZodBranded\",t.ZodPipeline=\"ZodPipeline\",t.ZodReadonly=\"ZodReadonly\"})(ft||(ft={}));var h=Be.create,w=Rr.create,DT=Nn.create,UT=Or.create,L=kn.create,GT=Ti.create,QT=Cn.create,HT=Ni.create,ZT=Wi.create,Vm=Yn.create,zm=ir.create,KT=Fe.create,JT=Ln.create,H=de.create,{create:A,strictCreate:qT}=Ot,Et=Ri.create,Ui=tc.create,tN=Oi.create,t9=Pe.create,Rn=En.create,eN=Tn.create,rN=jr.create,iN=Ei.create,nN=ji.create,g=$i.create,gt=nr.create,oN=Xi.create,aN=$r.create,sN=ue.create,cN=me.create,lN=De.create,pN=ue.createWithPreprocess,hN=Wn.create;var On=h().or(w()).transform((t)=\u003eqt(t,\"Ω\").value),nc=h().or(w()).transform((t)=\u003eqt(t,\"F\").value).transform((t)=\u003eNumber.parseFloat(t.toPrecision(12))),Gm=h().or(w()).transform((t)=\u003eqt(t,\"H\").value),Me=h().or(w()).transform((t)=\u003eqt(t,\"V\").value),K=h().or(w()).transform((t)=\u003eqt(t).value),or=h().or(w()).transform((t)=\u003eqt(t,\"Hz\").value),C=K,Xr=h().or(w()).transform((t)=\u003eqt(t,\"A\").value),Vr=h().or(w()).transform((t)=\u003eqt(t).value),e9=Vr,Vt=Vr,Qm=h().datetime(),jt=h().or(w()).transform((t)=\u003e{if(typeof t===\"number\")return t;if(t.endsWith(\"deg\"))return Number.parseFloat(t.split(\"deg\")[0]);if(t.endsWith(\"rad\"))return Number.parseFloat(t.split(\"rad\")[0])*180/Math.PI;return Number.parseFloat(t)}),Hm=w().or(h().endsWith(\"mAh\")).transform((t)=\u003e{if(typeof t===\"string\"){let e=t.replace(\"mAh\",\"\"),r=Number.parseFloat(e);if(Number.isNaN(r))throw Error(\"Invalid capacity\");return r}return t}).describe(\"Battery capacity in mAh\"),v=(t)=\u003e{};v(\"extra props b\");v(\"missing props b\");v(!0);v(\"mismatched prop types: a\");var ar=(t)=\u003e{};ar(!0);ar('T1 has extra: \"c\", T2 has extra: \"d\"');ar('T1 has extra: \"c\"');ar('T2 has extra: \"c\"');ar('T1 has extra: \"d\", T2 has extra: \"c\"');ar(!0);var it=A({x:C,y:C}),r9=it;v(!0);v(!0);var Ie=A({x:C,y:C,z:C}),i9=Ie;v(!0);var oc=A({width:w(),height:w()});v(!0);var n9=(t)=\u003eArray.from({length:t},()=\u003e\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"[Math.floor(Math.random()*62)]).join(\"\"),T=(t)=\u003eh().optional().default(()=\u003e`${t}_${n9(10)}`),ke=gt([\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]);v(!0);var o9=gt([\"top_silkscreen\",\"bottom_silkscreen\",\"top_copper\",\"bottom_copper\",\"top_soldermask\",\"bottom_soldermask\",\"top_fabrication_note\",\"bottom_fabrication_note\",\"top_user_note\",\"bottom_user_note\",\"top_courtyard\",\"bottom_courtyard\",\"inner1_copper\",\"inner2_copper\",\"inner3_copper\",\"inner4_copper\",\"inner5_copper\",\"inner6_copper\",\"edge_cuts\",\"drill\"]);v(!0);var ac=A({project_relative_path:h(),url:h(),mimetype:h()});v(!0);var jn=it.extend({rotation:jt.optional()});v(!0);var sc=A({size:it.optional(),thickness:C.optional()});v(!0);var Zm=A({font:sc.optional()});v(!0);var Gi=A({value:h(),at:jn.optional(),layer:h().optional(),uuid:h().optional(),hide:L().optional(),effects:Zm.optional()});v(!0);var Km=A({Reference:Gi.optional(),Value:Gi.optional(),Datasheet:Gi.optional(),Description:Gi.optional()});v(!0);var Jm=A({through_hole:L().optional(),smd:L().optional(),exclude_from_pos_files:L().optional(),exclude_from_bom:L().optional()});v(!0);var qm=A({name:h(),type:h(),shape:h().optional(),at:jn.optional(),size:it.optional(),drill:C.optional(),layers:H(h()).optional(),removeUnusedLayers:L().optional(),uuid:h().optional()});v(!0);var tu=A({path:h(),offset:Ie.optional(),scale:Ie.optional(),rotate:Ie.optional()});v(!0);var eu=A({footprintName:h().optional(),version:Et([w(),h()]).optional(),generator:h().optional(),generatorVersion:Et([w(),h()]).optional(),layer:h().optional(),properties:Km.optional(),attributes:Jm.optional(),pads:H(qm).optional(),embeddedFonts:L().optional(),model:tu.optional()});v(!0);var ru=A({hide:L().optional()});v(!0);var iu=A({offset:C.optional(),hide:L().optional()});v(!0);var nu=A({font:sc.optional(),justify:Et([h(),H(h())]).optional(),hide:L().optional()});v(!0);var Ue=A({value:h(),id:Et([w(),h()]).optional(),at:jn.optional(),effects:nu.optional()});v(!0);var ou=A({Reference:Ue.optional(),Value:Ue.optional(),Footprint:Ue.optional(),Datasheet:Ue.optional(),Description:Ue.optional(),ki_keywords:Ue.optional(),ki_fp_filters:Ue.optional()});v(!0);var au=A({symbolName:h().optional(),extends:h().optional(),pinNumbers:ru.optional(),pinNames:iu.optional(),excludeFromSim:L().optional(),inBom:L().optional(),onBoard:L().optional(),properties:ou.optional(),embeddedFonts:L().optional()});v(!0);var kt=A({error_type:h(),message:h(),is_fatal:L().optional()});v(!0);var cc=gt([\"jlcpcb\",\"macrofab\",\"pcbway\",\"digikey\",\"mouser\",\"lcsc\"]);v(!0);var Yt=A({type:g(\"source_component\"),ftype:h().optional(),source_component_id:h(),name:h(),manufacturer_part_number:h().optional(),supplier_part_numbers:Rn(cc,H(h())).optional(),display_value:h().optional(),display_name:h().optional(),are_pins_interchangeable:L().optional(),internally_connected_source_port_ids:H(H(h())).optional(),source_group_id:h().optional(),subcircuit_id:h().optional()});v(!0);var lc=Yt.extend({ftype:g(\"simple_capacitor\"),capacitance:nc,max_voltage_rating:Me.optional(),display_capacitance:h().optional(),max_decoupling_trace_length:C.optional()});v(!0);var pc=Yt.extend({ftype:g(\"simple_resistor\"),resistance:On,display_resistance:h().optional()});v(!0);var $n=Yt.extend({ftype:g(\"simple_diode\")});v(!0);var su=Yt.extend({ftype:g(\"simple_fiducial\")});v(!0);var hc=$n.extend({ftype:g(\"simple_led\"),color:h().optional(),wavelength:h().optional()});v(!0);var cu=Yt.extend({ftype:g(\"simple_ground\")});v(!0);var dc=Yt.extend({ftype:g(\"simple_chip\")});v(!0);var mc=Yt.extend({ftype:g(\"simple_power_source\"),voltage:Me});v(!0);var lu=Yt.extend({ftype:g(\"simple_current_source\"),current:Xr,frequency:or.optional(),peak_to_peak_current:Xr.optional(),wave_shape:gt([\"sine\",\"square\",\"triangle\",\"sawtooth\",\"dc\"]).optional().default(\"dc\"),phase:w().optional(),duty_cycle:w().min(0).max(1).optional()});v(!0);var pu=Yt.extend({ftype:g(\"simple_ammeter\")});v(!0);var hu=A({must_be_connected:L().optional(),provides_power:L().optional(),requires_power:L().optional(),provides_ground:L().optional(),requires_ground:L().optional(),provides_voltage:Et([h(),w()]).optional(),requires_voltage:Et([h(),w()]).optional(),do_not_connect:L().optional(),include_in_board_pinout:L().optional(),can_use_internal_pullup:L().optional(),is_using_internal_pullup:L().optional(),needs_external_pullup:L().optional(),can_use_internal_pulldown:L().optional(),is_using_internal_pulldown:L().optional(),needs_external_pulldown:L().optional(),can_use_open_drain:L().optional(),is_using_open_drain:L().optional(),can_use_push_pull:L().optional(),is_using_push_pull:L().optional(),should_have_decoupling_capacitor:L().optional(),recommended_decoupling_capacitor_capacitance:Et([h(),w()]).optional(),is_configured_for_i2c_sda:L().optional(),is_configured_for_i2c_scl:L().optional(),is_configured_for_spi_mosi:L().optional(),is_configured_for_spi_miso:L().optional(),is_configured_for_spi_sck:L().optional(),is_configured_for_spi_cs:L().optional(),is_configured_for_uart_tx:L().optional(),is_configured_for_uart_rx:L().optional(),supports_i2c_sda:L().optional(),supports_i2c_scl:L().optional(),supports_spi_mosi:L().optional(),supports_spi_miso:L().optional(),supports_spi_sck:L().optional(),supports_spi_cs:L().optional(),supports_uart_tx:L().optional(),supports_uart_rx:L().optional()});v(!0);var a9=Yt.extend({ftype:g(\"simple_fuse\"),current_rating_amps:w().describe(\"Nominal current in amps the fuse is rated for\"),voltage_rating_volts:w().describe(\"Voltage rating in volts, e.g. ±5V would be 5\")});v(!0);var uc=Yt.extend({ftype:g(\"simple_battery\"),capacity:Hm});v(!0);var yc=Yt.extend({ftype:g(\"simple_inductor\"),inductance:Gm,display_inductance:h().optional(),max_current_rating:w().optional()});v(!0);var fc=Yt.extend({ftype:g(\"simple_push_button\")});v(!0);var _c=Yt.extend({ftype:g(\"simple_potentiometer\"),max_resistance:On,display_max_resistance:h().optional()});v(!0);var du=Yt.extend({ftype:g(\"simple_crystal\"),frequency:w().describe(\"Frequency in Hz\"),load_capacitance:w().optional().describe(\"Load capacitance in pF\"),pin_variant:gt([\"two_pin\",\"four_pin\"]).optional()});v(!0);var gc=Yt.extend({ftype:g(\"simple_pin_header\"),pin_count:w(),gender:gt([\"male\",\"female\"]).optional().default(\"male\")});v(!0);var mu=Yt.extend({ftype:g(\"simple_connector\"),standard:gt([\"usb_c\",\"m2\"]).optional()});v(!0);var xc=Yt.extend({ftype:g(\"simple_pinout\")});v(!0);var bc=Yt.extend({ftype:g(\"simple_resonator\"),load_capacitance:nc,equivalent_series_resistance:On.optional(),frequency:or});v(!0);var vc=Yt.extend({ftype:g(\"simple_transistor\"),transistor_type:gt([\"npn\",\"pnp\"])});v(!0);var Sc=Yt.extend({ftype:g(\"simple_test_point\"),footprint_variant:gt([\"pad\",\"through_hole\"]).optional(),pad_shape:gt([\"rect\",\"circle\"]).optional(),pad_diameter:Et([w(),h()]).optional(),hole_diameter:Et([w(),h()]).optional(),width:Et([w(),h()]).optional(),height:Et([w(),h()]).optional()});v(!0);var wc=Yt.extend({ftype:g(\"simple_mosfet\"),channel_type:gt([\"n\",\"p\"]),mosfet_mode:gt([\"enhancement\",\"depletion\"])});v(!0);var Ac=Yt.extend({ftype:g(\"simple_op_amp\")});v(!0);var Bc=Yt.extend({ftype:g(\"simple_switch\")});v(!0);var Fc=A({type:g(\"source_project_metadata\"),name:h().optional(),software_used_string:h().optional(),project_url:h().optional(),created_at:Qm.optional()});v(!0);var uu=kt.extend({type:g(\"source_missing_property_error\"),source_missing_property_error_id:T(\"source_missing_property_error\"),source_component_id:h(),property_name:h(),subcircuit_id:h().optional(),error_type:g(\"source_missing_property_error\").default(\"source_missing_property_error\")}).describe(\"The source code is missing a property\");v(!0);var yu=kt.extend({type:g(\"source_failed_to_create_component_error\"),source_failed_to_create_component_error_id:T(\"source_failed_to_create_component_error\"),error_type:g(\"source_failed_to_create_component_error\").default(\"source_failed_to_create_component_error\"),component_name:h().optional(),subcircuit_id:h().optional(),parent_source_component_id:h().optional(),pcb_center:A({x:w().optional(),y:w().optional()}).optional(),schematic_center:A({x:w().optional(),y:w().optional()}).optional()}).describe(\"Error emitted when a component fails to be constructed\");v(!0);var Pc=kt.extend({type:g(\"source_invalid_component_property_error\"),source_invalid_component_property_error_id:T(\"source_invalid_component_property_error\"),source_component_id:h(),property_name:h(),property_value:zm().optional(),expected_format:h().optional(),subcircuit_id:h().optional(),error_type:g(\"source_invalid_component_property_error\").default(\"source_invalid_component_property_error\")}).describe(\"The source component property is invalid\");v(!0);var Ic=kt.extend({type:g(\"source_trace_not_connected_error\"),source_trace_not_connected_error_id:T(\"source_trace_not_connected_error\"),error_type:g(\"source_trace_not_connected_error\").default(\"source_trace_not_connected_error\"),subcircuit_id:h().optional(),source_group_id:h().optional(),source_trace_id:h().optional(),connected_source_port_ids:H(h()).optional(),selectors_not_found:H(h()).optional()}).describe(\"Occurs when a source trace selector does not match any ports\");v(!0);var fu=A({type:g(\"source_property_ignored_warning\"),source_property_ignored_warning_id:T(\"source_property_ignored_warning\"),source_component_id:h(),property_name:h(),subcircuit_id:h().optional(),error_type:g(\"source_property_ignored_warning\").default(\"source_property_ignored_warning\"),message:h()}).describe(\"The source property was ignored\");v(!0);var Mc=A({type:g(\"source_pin_missing_trace_warning\"),source_pin_missing_trace_warning_id:T(\"source_pin_missing_trace_warning\"),warning_type:g(\"source_pin_missing_trace_warning\").default(\"source_pin_missing_trace_warning\"),message:h(),source_component_id:h(),source_port_id:h(),subcircuit_id:h().optional()}).describe(\"Warning emitted when a source component pin is missing a trace connection\");v(!0);var kc=A({type:g(\"source_missing_manufacturer_part_number_warning\"),source_missing_manufacturer_part_number_warning_id:T(\"source_missing_manufacturer_part_number_warning\"),warning_type:g(\"source_missing_manufacturer_part_number_warning\").default(\"source_missing_manufacturer_part_number_warning\"),message:h(),source_component_id:h(),standard:h(),subcircuit_id:h().optional()}).describe(\"Warning emitted when a standard connector is missing manufacturer part number\");v(!0);var _u=Yt.extend({ftype:g(\"simple_voltage_probe\")});v(!0);var gu=Yt.extend({ftype:g(\"interconnect\")});v(!0);var Cc=kt.extend({type:g(\"source_i2c_misconfigured_error\"),source_i2c_misconfigured_error_id:T(\"source_i2c_misconfigured_error\"),error_type:g(\"source_i2c_misconfigured_error\").default(\"source_i2c_misconfigured_error\"),source_port_ids:H(h())}).describe(\"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net\");v(!0);var Yc=kt.extend({type:g(\"source_component_misconfigured_error\"),source_component_misconfigured_error_id:T(\"source_component_misconfigured_error\"),error_type:g(\"source_component_misconfigured_error\").default(\"source_component_misconfigured_error\"),source_component_ids:H(h()),source_port_ids:H(h()).optional()}).describe(\"Error emitted when one or more source components have an invalid or conflicting configuration\");v(!0);var xu=Yt.extend({ftype:g(\"simple_voltage_source\"),voltage:Me,frequency:or.optional(),peak_to_peak_voltage:Me.optional(),wave_shape:gt([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:jt.optional(),duty_cycle:w().optional().describe(\"Duty cycle as a fraction (0 to 1)\"),pulse_delay:Vt.optional(),rise_time:Vt.optional(),fall_time:Vt.optional(),pulse_width:Vt.optional(),period:Vt.optional()});v(!0);var bu=Et([pc,lc,$n,su,hc,cu,dc,mc,lu,pu,uc,yc,fc,_c,du,gc,mu,xc,bc,Bc,vc,Sc,wc,Ac,a9,_u,gu,xu,Fc,uu,Pc,yu,Ic,fu,Mc,kc,Cc,Yc]);v(!0);var vu=A({type:g(\"source_port\"),pin_number:w().optional(),port_hints:H(h()).optional(),name:h(),source_port_id:h(),source_component_id:h().optional(),source_group_id:h().optional(),most_frequently_referenced_by_name:h().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()}).merge(hu);v(!0);var Su=A({type:g(\"source_component_internal_connection\"),source_component_internal_connection_id:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()});v(!0);var wu=A({type:g(\"source_trace\"),source_trace_id:h(),connected_source_port_ids:H(h()),connected_source_net_ids:H(h()),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),max_length:w().optional(),name:h().optional(),min_trace_thickness:w().optional(),display_name:h().optional()});v(!0);var Au=A({type:g(\"source_group\"),source_group_id:h(),subcircuit_id:h().optional(),parent_subcircuit_id:h().optional(),parent_source_group_id:h().optional(),is_subcircuit:L().optional(),show_as_schematic_box:L().optional(),name:h().optional(),was_automatically_named:L().optional()});v(!0);var Bu=A({type:g(\"source_net\"),source_net_id:h(),name:h(),member_source_group_ids:H(h()),is_power:L().optional(),is_ground:L().optional(),is_digital_signal:L().optional(),is_analog_signal:L().optional(),is_positive_voltage_source:L().optional(),trace_width:w().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()});v(!0);var Fu=A({type:g(\"source_board\"),source_board_id:h(),source_group_id:h(),title:h().optional()}).describe(\"Defines a board in the source domain\");v(!0);var Pu=kt.extend({type:g(\"source_ambiguous_port_reference\"),source_ambiguous_port_reference_id:T(\"source_ambiguous_port_reference\"),error_type:g(\"source_ambiguous_port_reference\").default(\"source_ambiguous_port_reference\"),source_port_id:h().optional(),source_component_id:h().optional()}).describe(\"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous\");v(!0);var Iu=A({type:g(\"source_pcb_ground_plane\"),source_pcb_ground_plane_id:h(),source_group_id:h(),source_net_id:h(),subcircuit_id:h().optional()}).describe(\"Defines a ground plane in the source domain\");v(!0);var Mu=[\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\"],rc=gt(Mu),St=rc.or(A({name:rc})).transform((t)=\u003e{if(typeof t===\"string\")return t;return t.name});v(!0);var zt=gt([\"top\",\"bottom\"]),ku=A({type:g(\"source_manually_placed_via\"),source_manually_placed_via_id:h(),source_group_id:h(),source_net_id:h(),subcircuit_id:h().optional(),source_trace_id:h().optional()}).describe(\"Defines a via that is manually placed in the source domain\");v(!0);var Cu=A({type:g(\"source_unnamed_trace_warning\"),source_unnamed_trace_warning_id:T(\"source_unnamed_trace_warning\"),warning_type:g(\"source_unnamed_trace_warning\").default(\"source_unnamed_trace_warning\"),message:h(),source_trace_id:h(),subcircuit_id:h().optional()}).describe(\"Warning emitted when a source trace is missing a name\");v(!0);var Yu=A({type:g(\"source_no_power_pin_defined_warning\"),source_no_power_pin_defined_warning_id:T(\"source_no_power_pin_defined_warning\"),warning_type:g(\"source_no_power_pin_defined_warning\").default(\"source_no_power_pin_defined_warning\"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Warning emitted when a chip has no source ports with requires_power=true\");v(!0);var Lu=A({type:g(\"source_no_ground_pin_defined_warning\"),source_no_ground_pin_defined_warning_id:T(\"source_no_ground_pin_defined_warning\"),warning_type:g(\"source_no_ground_pin_defined_warning\").default(\"source_no_ground_pin_defined_warning\"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Warning emitted when a chip has no source ports marked as ground pins\");v(!0);var Eu=A({type:g(\"source_component_pins_underspecified_warning\"),source_component_pins_underspecified_warning_id:T(\"source_component_pins_underspecified_warning\"),warning_type:g(\"source_component_pins_underspecified_warning\").default(\"source_component_pins_underspecified_warning\"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Warning emitted when all ports on a source component are underspecified\");v(!0);var Tu=kt.extend({type:g(\"source_pin_must_be_connected_error\"),source_pin_must_be_connected_error_id:T(\"source_pin_must_be_connected_error\"),error_type:g(\"source_pin_must_be_connected_error\").default(\"source_pin_must_be_connected_error\"),source_component_id:h(),source_port_id:h(),subcircuit_id:h().optional()}).describe(\"Error emitted when a pin with mustBeConnected attribute is not connected to any trace\");v(!0);var Nu=kt.extend({type:g(\"unknown_error_finding_part\"),unknown_error_finding_part_id:T(\"unknown_error_finding_part\"),error_type:g(\"unknown_error_finding_part\").default(\"unknown_error_finding_part\"),source_component_id:h().optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when an unexpected error occurs while finding a part\");v(!0);var Wu=A({type:g(\"schematic_box\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),width:C,height:C,is_dashed:L().default(!1),x:C,y:C,subcircuit_id:h().optional()}).describe(\"Draws a box on the schematic\");v(!0);var Ru=A({type:g(\"schematic_path\"),schematic_path_id:T(\"schematic_path\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),fill_color:h().optional(),is_filled:L().optional(),is_dashed:L().default(!1),stroke_width:C.nullable().optional(),stroke_color:h().optional(),dash_length:C.optional(),dash_gap:C.optional(),points:H(it),subcircuit_id:h().optional()});v(!0);var Ou=Rn(A({left_margin:K.optional(),right_margin:K.optional(),top_margin:K.optional(),bottom_margin:K.optional()})),ju=A({left_size:w(),right_size:w(),top_size:w().optional(),bottom_size:w().optional()});v(!0);var $u=A({left_side:A({pins:H(w()),direction:gt([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),right_side:A({pins:H(w()),direction:gt([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),top_side:A({pins:H(w()),direction:gt([\"left-to-right\",\"right-to-left\"]).optional()}).optional(),bottom_side:A({pins:H(w()),direction:gt([\"left-to-right\",\"right-to-left\"]).optional()}).optional()});v(!0);var Xu=Et([ju,$u]),Vu=A({type:g(\"schematic_component\"),size:oc,center:it,source_component_id:h().optional(),schematic_component_id:h(),schematic_sheet_id:h().optional(),schematic_symbol_id:h().optional(),pin_spacing:K.optional(),pin_styles:Ou.optional(),box_width:K.optional(),symbol_name:h().optional(),port_arrangement:Xu.optional(),port_labels:Rn(h()).optional(),symbol_display_value:h().optional(),subcircuit_id:h().optional(),schematic_group_id:h().optional(),is_schematic_group:L().optional(),source_group_id:h().optional(),is_box_with_pins:L().optional().default(!0)});v(!0);var s9=A({kicad_symbol:au.optional()}).catchall(zm()),zu=A({type:g(\"schematic_symbol\"),schematic_symbol_id:h(),name:h().optional(),metadata:s9.optional()}).describe(\"Defines a named schematic symbol that can be referenced by components.\");v(!0);var Du=A({type:g(\"schematic_line\"),schematic_line_id:T(\"schematic_line\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),x1:C,y1:C,x2:C,y2:C,stroke_width:C.nullable().optional(),color:h().default(\"#000000\"),is_dashed:L().default(!1),dash_length:C.optional(),dash_gap:C.optional(),subcircuit_id:h().optional()}).describe(\"Draws a styled line on the schematic\");v(!0);var Uu=A({type:g(\"schematic_rect\"),schematic_rect_id:T(\"schematic_rect\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,width:C,height:C,rotation:jt.default(0),stroke_width:C.nullable().optional(),color:h().default(\"#000000\"),is_filled:L().default(!1),fill_color:h().optional(),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe(\"Draws a styled rectangle on the schematic\");v(!0);var Gu=A({type:g(\"schematic_circle\"),schematic_circle_id:T(\"schematic_circle\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,radius:C,stroke_width:C.nullable().optional(),color:h().default(\"#000000\"),is_filled:L().default(!1),fill_color:h().optional(),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe(\"Draws a styled circle on the schematic\");v(!0);var Qu=A({type:g(\"schematic_arc\"),schematic_arc_id:T(\"schematic_arc\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,radius:C,start_angle_degrees:jt,end_angle_degrees:jt,direction:gt([\"clockwise\",\"counterclockwise\"]).default(\"counterclockwise\"),stroke_width:C.nullable().optional(),color:h().default(\"#000000\"),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe(\"Draws a styled arc on the schematic\");v(!0);var Hu=A({type:g(\"schematic_trace\"),schematic_trace_id:h(),schematic_sheet_id:h().optional(),source_trace_id:h().optional(),junctions:H(A({x:w(),y:w()})),edges:H(A({from:A({x:w(),y:w()}),to:A({x:w(),y:w()}),is_crossing:L().optional(),from_schematic_port_id:h().optional(),to_schematic_port_id:h().optional()})),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()});v(!0);var c9=gt([\"center\",\"left\",\"right\",\"top\",\"bottom\"]);v(!0);var Zu=A({type:g(\"schematic_text\"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),schematic_text_id:h(),text:h(),font_size:w().default(0.18),position:A({x:C,y:C}),rotation:w().default(0),anchor:Et([c9.describe(\"legacy\"),ke]).default(\"center\"),color:h().default(\"#000000\"),subcircuit_id:h().optional()});v(!0);var Ku=A({type:g(\"schematic_port\"),schematic_port_id:h(),source_port_id:h(),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),center:it,facing_direction:gt([\"up\",\"down\",\"left\",\"right\"]).optional(),distance_from_component_edge:w().optional(),side_of_component:gt([\"top\",\"bottom\",\"left\",\"right\"]).optional(),true_ccw_index:w().optional(),pin_number:w().optional(),display_pin_label:h().optional(),subcircuit_id:h().optional(),is_connected:L().optional(),has_input_arrow:L().optional(),has_output_arrow:L().optional(),is_drawn_with_inversion_circle:L().optional()}).describe(\"Defines a port on a schematic component\");v(!0);var Ju=A({type:g(\"schematic_net_label\"),schematic_net_label_id:T(\"schematic_net_label\"),schematic_sheet_id:h().optional(),schematic_trace_id:h().optional(),source_trace_id:h().optional(),source_net_id:h(),center:it,anchor_position:it.optional(),anchor_side:gt([\"top\",\"bottom\",\"left\",\"right\"]),text:h(),symbol_name:h().optional(),is_movable:L().optional(),subcircuit_id:h().optional()});v(!0);var qu=kt.extend({type:g(\"schematic_error\"),schematic_error_id:h(),error_type:g(\"schematic_port_not_found\").default(\"schematic_port_not_found\"),subcircuit_id:h().optional()}).describe(\"Defines a schematic error on the schematic\");v(!0);var ty=kt.extend({type:g(\"schematic_layout_error\"),schematic_layout_error_id:T(\"schematic_layout_error\"),error_type:g(\"schematic_layout_error\").default(\"schematic_layout_error\"),source_group_id:h(),schematic_group_id:h(),subcircuit_id:h().optional()}).describe(\"Error emitted when schematic layout fails for a group\");v(!0);var Xn=A({type:g(\"schematic_debug_object\"),label:h().optional(),subcircuit_id:h().optional()}),ey=Xn.extend({shape:g(\"rect\"),center:it,size:oc}),ry=Xn.extend({shape:g(\"line\"),start:it,end:it}),iy=Xn.extend({shape:g(\"point\"),center:it}),ny=Ui(\"shape\",[ey,ry,iy]);v(!0);var oy=A({type:g(\"schematic_voltage_probe\"),schematic_voltage_probe_id:h(),schematic_sheet_id:h().optional(),source_component_id:h().optional(),name:h().optional(),position:it,schematic_trace_id:h(),voltage:Me.optional(),subcircuit_id:h().optional(),color:h().optional(),label_alignment:ke.optional()}).describe(\"Defines a voltage probe measurement point on a schematic trace\");v(!0);var ay=A({type:g(\"schematic_manual_edit_conflict_warning\"),schematic_manual_edit_conflict_warning_id:T(\"schematic_manual_edit_conflict_warning\"),warning_type:g(\"schematic_manual_edit_conflict_warning\").default(\"schematic_manual_edit_conflict_warning\"),message:h(),schematic_component_id:h(),schematic_group_id:h().optional(),subcircuit_id:h().optional(),source_component_id:h()}).describe(\"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\");v(!0);var sy=A({type:g(\"schematic_group\"),schematic_group_id:T(\"schematic_group\"),schematic_sheet_id:h().optional(),source_group_id:h(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),width:K,height:K,center:it,schematic_component_ids:H(h()),show_as_schematic_box:L().optional(),name:h().optional(),description:h().optional()}).describe(\"Defines a group of components on the schematic\");v(!0);var cy=A({type:g(\"schematic_table\"),schematic_table_id:T(\"schematic_table\"),schematic_sheet_id:h().optional(),anchor_position:it,column_widths:H(C),row_heights:H(C),cell_padding:C.optional(),border_width:C.optional(),subcircuit_id:h().optional(),schematic_component_id:h().optional(),anchor:ke.optional()}).describe(\"Defines a table on the schematic\");v(!0);var ly=A({type:g(\"schematic_table_cell\"),schematic_table_cell_id:T(\"schematic_table_cell\"),schematic_sheet_id:h().optional(),schematic_table_id:h(),start_row_index:w(),end_row_index:w(),start_column_index:w(),end_column_index:w(),text:h().optional(),center:it,width:C,height:C,horizontal_align:gt([\"left\",\"center\",\"right\"]).optional(),vertical_align:gt([\"top\",\"middle\",\"bottom\"]).optional(),font_size:C.optional(),subcircuit_id:h().optional()}).describe(\"Defines a cell within a schematic_table\");v(!0);var py=A({type:g(\"schematic_sheet\"),schematic_sheet_id:T(\"schematic_sheet\"),name:h().optional(),sheet_index:w().optional(),subcircuit_id:h().optional(),outline_color:h().optional()}).describe(\"Defines a schematic sheet or page that components can be placed on\");v(!0);var hy=A({x:C,y:C,bulge:w().optional()});v(!0);var ic=A({vertices:H(hy)});v(!0);var Lc=A({outer_ring:ic,inner_rings:H(ic).default([])});v(!0);var dy=A({x:C,y:C,via:L().optional(),via_to_layer:St.optional()}),l9=H(dy);v(!0);v(!0);var my=A({x:C,y:C,via:L().optional(),to_layer:St.optional(),trace_width:C.optional()});v(!0);var uy=A({min_trace_width:K.optional(),min_board_edge_clearance:K.optional(),min_via_hole_edge_to_via_hole_edge_clearance:K.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:K.optional(),min_trace_to_pad_edge_clearance:K.optional(),min_pad_edge_to_pad_edge_clearance:K.optional(),min_same_net_trace_edge_to_trace_edge_clearance:K.optional(),min_different_net_trace_edge_to_trace_edge_clearance:K.optional(),min_via_edge_to_pad_edge_clearance:K.optional(),min_via_hole_diameter:K.optional(),min_via_pad_diameter:K.optional()}),yy=A({type:g(\"pcb_component\"),pcb_component_id:T(\"pcb_component\"),source_component_id:h(),center:it,layer:St,rotation:jt,display_offset_x:h().optional().describe(\"How to display the x offset for this part, usually corresponding with how the user specified it\"),display_offset_y:h().optional().describe(\"How to display the y offset for this part, usually corresponding with how the user specified it\"),width:K,height:K,do_not_place:L().optional(),is_allowed_to_be_off_board:L().optional(),subcircuit_id:h().optional(),pcb_group_id:h().optional(),position_mode:gt([\"packed\",\"relative_to_group_anchor\",\"relative_to_another_component\",\"none\"]).optional(),anchor_position:it.optional(),anchor_alignment:ke.optional(),positioned_relative_to_pcb_group_id:h().optional(),positioned_relative_to_pcb_board_id:h().optional(),cable_insertion_center:it.optional(),insertion_direction:gt([\"from_above\",\"from_left\",\"from_right\",\"from_front\",\"from_back\"]).optional(),metadata:A({kicad_footprint:eu.optional()}).optional(),obstructs_within_bounds:L().default(!0).describe(\"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath\")}).describe(\"Defines a component on the PCB\");v(!0);var fy=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g(\"circle\"),hole_diameter:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),p9=fy.describe(\"Defines a circular hole on the PCB\");v(!0);var _y=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g(\"rect\"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),h9=_y.describe(\"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square.\");v(!0);var gy=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:gt([\"circle\",\"square\"]),hole_diameter:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),d9=gy.describe(\"Defines a circular or square hole on the PCB\");v(!0);var xy=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g(\"oval\"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),m9=xy.describe(\"Defines an oval hole on the PCB\");v(!0);var by=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g(\"pill\"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),u9=by.describe(\"Defines a pill-shaped hole on the PCB\");v(!0);var vy=A({type:g(\"pcb_hole\"),pcb_hole_id:T(\"pcb_hole\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g(\"rotated_pill\"),hole_width:w(),hole_height:w(),x:C,y:C,ccw_rotation:jt,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),y9=vy.describe(\"Defines a rotated pill-shaped hole on the PCB\");v(!0);var Sy=gy.or(xy).or(by).or(vy).or(fy).or(_y),f9=A({type:g(\"pcb_plated_hole\"),shape:g(\"circle\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),outer_diameter:w(),hole_diameter:w(),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional()}),_9=A({type:g(\"pcb_plated_hole\"),shape:gt([\"oval\",\"pill\"]),pcb_group_id:h().optional(),subcircuit_id:h().optional(),outer_width:w(),outer_height:w(),hole_width:w(),hole_height:w(),is_covered_with_solder_mask:L().optional(),x:C,y:C,ccw_rotation:jt,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional()}),g9=A({type:g(\"pcb_plated_hole\"),shape:g(\"circular_hole_with_rect_pad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g(\"circle\"),pad_shape:g(\"rect\"),hole_diameter:w(),rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional(),rect_ccw_rotation:jt.optional()}),x9=A({type:g(\"pcb_plated_hole\"),shape:g(\"pill_hole_with_rect_pad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g(\"pill\"),pad_shape:g(\"rect\"),hole_width:w(),hole_height:w(),rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional()}),b9=A({type:g(\"pcb_plated_hole\"),shape:g(\"rotated_pill_hole_with_rect_pad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g(\"rotated_pill\"),pad_shape:g(\"rect\"),hole_width:w(),hole_height:w(),hole_ccw_rotation:jt,rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),rect_ccw_rotation:jt,hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional()}),v9=A({type:g(\"pcb_plated_hole\"),shape:g(\"hole_with_polygon_pad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:gt([\"circle\",\"oval\",\"pill\",\"rotated_pill\"]),hole_diameter:w().optional(),hole_width:w().optional(),hole_height:w().optional(),pad_outline:H(A({x:C,y:C})).min(3),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T(\"pcb_plated_hole\"),soldermask_margin:w().optional(),ccw_rotation:jt.optional()}),wy=Et([f9,_9,g9,x9,b9,v9]);v(!0);v(!0);v(!0);v(!0);v(!0);v(!0);var Ay=A({type:g(\"pcb_port\"),pcb_port_id:T(\"pcb_port\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),source_port_id:h(),pcb_component_id:h().optional(),x:C,y:C,layers:H(St),is_board_pinout:L().optional()}).describe(\"Defines a port on the PCB\");v(!0);var S9=A({type:g(\"pcb_smtpad\"),shape:g(\"circle\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,radius:w(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),w9=A({type:g(\"pcb_smtpad\"),shape:g(\"rect\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),rect_border_radius:w().optional(),corner_radius:w().optional(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional(),soldermask_margin_left:w().optional(),soldermask_margin_top:w().optional(),soldermask_margin_right:w().optional(),soldermask_margin_bottom:w().optional()}),A9=A({type:g(\"pcb_smtpad\"),shape:g(\"rotated_rect\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),rect_border_radius:w().optional(),corner_radius:w().optional(),ccw_rotation:jt,layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional(),soldermask_margin_left:w().optional(),soldermask_margin_top:w().optional(),soldermask_margin_right:w().optional(),soldermask_margin_bottom:w().optional()}),By=A({type:g(\"pcb_smtpad\"),shape:g(\"pill\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),B9=A({type:g(\"pcb_smtpad\"),shape:g(\"rotated_pill\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),ccw_rotation:jt,layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),F9=A({type:g(\"pcb_smtpad\"),shape:g(\"polygon\"),pcb_smtpad_id:T(\"pcb_smtpad\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),points:H(it),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),Fy=Ui(\"shape\",[S9,w9,A9,B9,By,F9]).describe(\"Defines an SMT pad on the PCB\");v(!0);v(!0);v(!0);v(!0);v(!0);v(!0);var P9=A({type:g(\"pcb_solder_paste\"),shape:g(\"circle\"),pcb_solder_paste_id:T(\"pcb_solder_paste\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,radius:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),I9=A({type:g(\"pcb_solder_paste\"),shape:g(\"rect\"),pcb_solder_paste_id:T(\"pcb_solder_paste\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),M9=A({type:g(\"pcb_solder_paste\"),shape:g(\"pill\"),pcb_solder_paste_id:T(\"pcb_solder_paste\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),k9=A({type:g(\"pcb_solder_paste\"),shape:g(\"rotated_rect\"),pcb_solder_paste_id:T(\"pcb_solder_paste\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),ccw_rotation:C,layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),C9=A({type:g(\"pcb_solder_paste\"),shape:g(\"oval\"),pcb_solder_paste_id:T(\"pcb_solder_paste\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),Py=Et([P9,I9,M9,k9,C9]).describe(\"Defines solderpaste on the PCB\");v(!0);v(!0);v(!0);v(!0);v(!0);var Iy=A({type:g(\"pcb_text\"),pcb_text_id:T(\"pcb_text\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),text:h(),center:it,layer:St,width:K,height:K,lines:w(),align:gt([\"bottom-left\"])}).describe(\"Defines text on the PCB\");v(!0);var My=A({route_type:g(\"wire\"),x:C,y:C,width:C,copper_pour_id:h().optional(),is_inside_copper_pour:L().optional(),start_pcb_port_id:h().optional(),end_pcb_port_id:h().optional(),layer:St}),ky=A({route_type:g(\"via\"),x:C,y:C,copper_pour_id:h().optional(),is_inside_copper_pour:L().optional(),hole_diameter:C.optional(),outer_diameter:C.optional(),from_layer:St,to_layer:St}),Cy=A({route_type:g(\"through_pad\"),start:it,end:it,width:C,start_layer:St,end_layer:St,pcb_smtpad_id:h().optional(),pcb_plated_hole_id:h().optional()}),Yy=Et([My,ky,Cy]),Ly=A({type:g(\"pcb_trace\"),source_trace_id:h().optional(),pcb_component_id:h().optional(),pcb_trace_id:T(\"pcb_trace\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),route_thickness_mode:gt([\"constant\",\"interpolated\"]).default(\"constant\").optional(),route_order_index:w().optional(),should_round_corners:L().optional(),trace_length:w().optional(),highlight_color:h().optional(),route:H(Yy)}).describe(\"Defines a trace on the PCB\");v(!0);v(!0);var Ey=A({type:g(\"pcb_trace_warning\"),pcb_trace_warning_id:T(\"pcb_trace_warning\"),warning_type:g(\"pcb_trace_warning\").default(\"pcb_trace_warning\"),message:h(),center:it.optional(),pcb_trace_id:h(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Defines a trace warning on the PCB\");v(!0);var Ty=kt.extend({type:g(\"pcb_trace_error\"),pcb_trace_error_id:T(\"pcb_trace_error\"),error_type:g(\"pcb_trace_error\").default(\"pcb_trace_error\"),center:it.optional(),pcb_trace_id:h(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Defines a trace error on the PCB\");v(!0);var Ny=kt.extend({type:g(\"pcb_trace_missing_error\"),pcb_trace_missing_error_id:T(\"pcb_trace_missing_error\"),error_type:g(\"pcb_trace_missing_error\").default(\"pcb_trace_missing_error\"),center:it.optional(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Defines an error when a source trace has no corresponding PCB trace\");v(!0);var Wy=kt.extend({type:g(\"pcb_port_not_matched_error\"),pcb_error_id:T(\"pcb_error\"),error_type:g(\"pcb_port_not_matched_error\").default(\"pcb_port_not_matched_error\"),pcb_component_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Defines a trace error on the PCB where a port is not matched\");v(!0);var Ry=kt.extend({type:g(\"pcb_port_not_connected_error\"),pcb_port_not_connected_error_id:T(\"pcb_port_not_connected_error\"),error_type:g(\"pcb_port_not_connected_error\").default(\"pcb_port_not_connected_error\"),pcb_port_ids:H(h()),pcb_component_ids:H(h()),subcircuit_id:h().optional()}).describe(\"Defines an error when a pcb port is not connected to any trace\");v(!0);var Oy=A({type:g(\"pcb_net\"),pcb_net_id:T(\"pcb_net\"),source_net_id:h().optional(),highlight_color:h().optional()}).describe(\"Defines a net on the PCB\");v(!0);var jy=A({type:g(\"pcb_via\"),pcb_via_id:T(\"pcb_via\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),x:C,y:C,outer_diameter:C.default(\"0.6mm\"),hole_diameter:C.default(\"0.25mm\"),from_layer:St.optional(),to_layer:St.optional(),layers:H(St),pcb_trace_id:h().optional(),net_is_assignable:L().optional(),net_assigned:L().optional(),is_tented:L().optional()}).describe(\"Defines a via on the PCB\");v(!0);var $y=A({type:g(\"pcb_board\"),pcb_board_id:T(\"pcb_board\"),pcb_panel_id:h().optional(),carrier_pcb_board_id:h().optional(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),is_mounted_to_carrier_board:L().optional(),width:K.optional(),height:K.optional(),center:it,display_offset_x:h().optional().describe(\"How to display the x offset for this board, usually corresponding with how the user specified it\"),display_offset_y:h().optional().describe(\"How to display the y offset for this board, usually corresponding with how the user specified it\"),thickness:K.optional().default(1.4),num_layers:w().optional().default(4),outline:H(it).optional(),shape:gt([\"rect\",\"polygon\"]).optional(),material:gt([\"fr4\",\"fr1\"]).default(\"fr4\"),solder_mask_color:h().optional(),silkscreen_color:h().optional(),anchor_position:it.optional(),anchor_alignment:ke.optional(),position_mode:gt([\"relative_to_panel_anchor\",\"none\"]).optional()}).merge(uy).describe(\"Defines the board outline of the PCB\");v(!0);var Xy=A({type:g(\"pcb_panel\"),pcb_panel_id:T(\"pcb_panel\"),width:K,height:K,center:it,thickness:K.optional().default(1.4),covered_with_solder_mask:L().optional().default(!0)}).describe(\"Defines a PCB panel that can contain multiple boards\");v(!0);var Vy=kt.extend({type:g(\"pcb_placement_error\"),pcb_placement_error_id:T(\"pcb_placement_error\"),error_type:g(\"pcb_placement_error\").default(\"pcb_placement_error\"),subcircuit_id:h().optional()}).describe(\"Defines a placement error on the PCB\");v(!0);var zy=kt.extend({type:g(\"pcb_panelization_placement_error\"),pcb_panelization_placement_error_id:T(\"pcb_panelization_placement_error\"),error_type:g(\"pcb_panelization_placement_error\").default(\"pcb_panelization_placement_error\"),pcb_panel_id:h().optional(),pcb_board_id:h().optional(),subcircuit_id:h().optional()}).describe(\"Defines a panelization placement error on the PCB\");v(!0);var Dy=A({type:g(\"pcb_trace_hint\"),pcb_trace_hint_id:T(\"pcb_trace_hint\"),pcb_port_id:h(),pcb_component_id:h(),route:H(my),subcircuit_id:h().optional()}).describe(\"A hint that can be used during generation of a PCB trace\");v(!0);var Uy=A({type:g(\"pcb_silkscreen_line\"),pcb_silkscreen_line_id:T(\"pcb_silkscreen_line\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),stroke_width:C.default(\"0.1mm\"),x1:C,y1:C,x2:C,y2:C,layer:zt}).describe(\"Defines a silkscreen line on the PCB\");v(!0);var Gy=A({type:g(\"pcb_silkscreen_path\"),pcb_silkscreen_path_id:T(\"pcb_silkscreen_path\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,route:H(it),stroke_width:K}).describe(\"Defines a silkscreen path on the PCB\");v(!0);var Qy=A({type:g(\"pcb_silkscreen_text\"),pcb_silkscreen_text_id:T(\"pcb_silkscreen_text\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:C.default(\"0.2mm\"),pcb_component_id:h(),text:h(),is_knockout:L().default(!1).optional(),knockout_padding:A({left:K,top:K,bottom:K,right:K}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:w().optional(),layer:St,is_mirrored:L().default(!1).optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:ke.default(\"center\")}).describe(\"Defines silkscreen text on the PCB\");v(!0);var Hy=A({type:g(\"pcb_copper_text\"),pcb_copper_text_id:T(\"pcb_copper_text\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:C.default(\"0.2mm\"),pcb_component_id:h(),text:h(),is_knockout:L().default(!1).optional(),knockout_padding:A({left:K,top:K,bottom:K,right:K}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:w().optional(),layer:St,is_mirrored:L().default(!1).optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:ke.default(\"center\")}).describe(\"Defines copper text on the PCB\");v(!0);var Zy=A({type:g(\"pcb_silkscreen_rect\"),pcb_silkscreen_rect_id:T(\"pcb_silkscreen_rect\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:St,stroke_width:K.default(\"1mm\"),corner_radius:K.optional(),is_filled:L().default(!0).optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),ccw_rotation:w().optional()}).describe(\"Defines a silkscreen rect on the PCB\");v(!0);var Ky=A({type:g(\"pcb_silkscreen_circle\"),pcb_silkscreen_circle_id:T(\"pcb_silkscreen_circle\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:K,layer:zt,stroke_width:K.default(\"1mm\"),is_filled:L().optional()}).describe(\"Defines a silkscreen circle on the PCB\");v(!0);var Jy=A({type:g(\"pcb_silkscreen_oval\"),pcb_silkscreen_oval_id:T(\"pcb_silkscreen_oval\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius_x:C,radius_y:C,layer:zt,ccw_rotation:jt.optional()}).describe(\"Defines a silkscreen oval on the PCB\");v(!0);var Y9=A({type:g(\"pcb_silkscreen_graphic\"),pcb_silkscreen_graphic_id:T(\"pcb_silkscreen_graphic\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,image_asset:ac.optional()}),qy=Y9.extend({shape:g(\"brep\"),brep_shape:Lc}).describe(\"Defines a BRep silkscreen graphic on the PCB\");v(!0);var tf=Ui(\"shape\",[qy]).describe(\"Defines a silkscreen graphic on the PCB\");v(!0);var ef=A({type:g(\"pcb_silkscreen_pill\"),pcb_silkscreen_pill_id:T(\"pcb_silkscreen_pill\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:St,ccw_rotation:w().optional()}).describe(\"Defines a silkscreen pill on the PCB\");v(!0);var rf=A({type:g(\"pcb_fabrication_note_text\"),pcb_fabrication_note_text_id:T(\"pcb_fabrication_note_text\"),subcircuit_id:h().optional(),pcb_group_id:h().optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:C.default(\"1mm\"),pcb_component_id:h(),text:h(),ccw_rotation:w().optional(),layer:zt,anchor_position:it.default({x:0,y:0}),anchor_alignment:gt([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),color:h().optional()}).describe(\"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\");v(!0);var nf=A({type:g(\"pcb_fabrication_note_path\"),pcb_fabrication_note_path_id:T(\"pcb_fabrication_note_path\"),pcb_component_id:h(),subcircuit_id:h().optional(),layer:St,route:H(it),stroke_width:K,color:h().optional()}).describe(\"Defines a fabrication path on the PCB for fabricators or assemblers\");v(!0);var of=A({type:g(\"pcb_fabrication_note_rect\"),pcb_fabrication_note_rect_id:T(\"pcb_fabrication_note_rect\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:zt,stroke_width:K.default(\"0.1mm\"),corner_radius:K.optional(),is_filled:L().optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),color:h().optional()}).describe(\"Defines a fabrication note rectangle on the PCB\");v(!0);var af=A({type:g(\"pcb_fabrication_note_dimension\"),pcb_fabrication_note_dimension_id:T(\"pcb_fabrication_note_dimension\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,from:it,to:it,text:h().optional(),text_ccw_rotation:w().optional(),offset:K.optional(),offset_distance:K.optional(),offset_direction:A({x:w(),y:w()}).optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:K.default(\"1mm\"),color:h().optional(),arrow_size:K.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB fabrication notes\");v(!0);var sf=A({type:g(\"pcb_note_text\"),pcb_note_text_id:T(\"pcb_note_text\"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:C.default(\"1mm\"),text:h().optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:gt([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),layer:zt.default(\"top\"),is_mirrored_from_top_view:L().optional(),color:h().optional()}).describe(\"Defines a documentation note in text on the PCB\");v(!0);var cf=A({type:g(\"pcb_note_rect\"),pcb_note_rect_id:T(\"pcb_note_rect\"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),center:it,width:K,height:K,layer:zt.default(\"top\"),stroke_width:K.default(\"0.1mm\"),corner_radius:K.optional(),is_filled:L().optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),color:h().optional()}).describe(\"Defines a rectangular documentation note on the PCB\");v(!0);var lf=A({type:g(\"pcb_note_path\"),pcb_note_path_id:T(\"pcb_note_path\"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),route:H(it),layer:zt.default(\"top\"),stroke_width:K.default(\"0.1mm\"),color:h().optional()}).describe(\"Defines a polyline documentation note on the PCB\");v(!0);var pf=A({type:g(\"pcb_note_line\"),pcb_note_line_id:T(\"pcb_note_line\"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),x1:C,y1:C,x2:C,y2:C,layer:zt.default(\"top\"),stroke_width:C.default(\"0.1mm\"),color:h().optional(),is_dashed:L().optional()}).describe(\"Defines a straight documentation note line on the PCB\");v(!0);var hf=A({type:g(\"pcb_note_dimension\"),pcb_note_dimension_id:T(\"pcb_note_dimension\"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),from:it,to:it,text:h().optional(),text_ccw_rotation:w().optional(),offset_distance:K.optional(),offset_direction:A({x:w(),y:w()}).optional(),font:g(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:K.default(\"1mm\"),layer:zt.default(\"top\"),color:h().optional(),arrow_size:K.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB documentation notes\");v(!0);var df=kt.extend({type:g(\"pcb_footprint_overlap_error\"),pcb_error_id:T(\"pcb_error\"),error_type:g(\"pcb_footprint_overlap_error\").default(\"pcb_footprint_overlap_error\"),pcb_smtpad_ids:H(h()).optional(),pcb_plated_hole_ids:H(h()).optional(),pcb_hole_ids:H(h()).optional(),pcb_keepout_ids:H(h()).optional()}).describe(\"Error emitted when a pcb footprint overlaps with another element\");v(!0);var mf=kt.extend({type:g(\"pcb_courtyard_overlap_error\"),pcb_error_id:T(\"pcb_error\"),error_type:g(\"pcb_courtyard_overlap_error\").default(\"pcb_courtyard_overlap_error\"),pcb_component_ids:t9([h(),h()])}).describe(\"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another\");v(!0);var uf=A({type:g(\"pcb_keepout\"),shape:g(\"rect\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:C,height:C,pcb_keepout_id:h(),layers:H(h()),description:h().optional()}).or(A({type:g(\"pcb_keepout\"),shape:g(\"circle\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:C,pcb_keepout_id:h(),layers:H(h()),description:h().optional()}));v(!0);var Vn=A({type:g(\"pcb_cutout\"),pcb_cutout_id:T(\"pcb_cutout\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_board_id:h().optional(),pcb_panel_id:h().optional()}),yf=Vn.extend({shape:g(\"rect\"),center:it,width:K,height:K,rotation:jt.optional(),corner_radius:K.optional()});v(!0);var ff=Vn.extend({shape:g(\"circle\"),center:it,radius:K});v(!0);var _f=Vn.extend({shape:g(\"polygon\"),points:H(it)});v(!0);var gf=Vn.extend({shape:g(\"path\"),route:H(it),slot_width:K,slot_length:K.optional(),space_between_slots:K.optional(),slot_corner_radius:K.optional()});v(!0);var xf=Ui(\"shape\",[yf,ff,_f,gf]).describe(\"Defines a cutout on the PCB, removing board material.\");v(!0);var bf=kt.extend({type:g(\"pcb_missing_footprint_error\"),pcb_missing_footprint_error_id:T(\"pcb_missing_footprint_error\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),error_type:g(\"pcb_missing_footprint_error\").default(\"pcb_missing_footprint_error\"),source_component_id:h()}).describe(\"Defines a missing footprint error on the PCB\");v(!0);var vf=kt.extend({type:g(\"external_footprint_load_error\"),external_footprint_load_error_id:T(\"external_footprint_load_error\"),pcb_component_id:h(),source_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),footprinter_string:h().optional(),error_type:g(\"external_footprint_load_error\").default(\"external_footprint_load_error\")}).describe(\"Defines an error when an external footprint fails to load\");v(!0);var Sf=kt.extend({type:g(\"circuit_json_footprint_load_error\"),circuit_json_footprint_load_error_id:T(\"circuit_json_footprint_load_error\"),pcb_component_id:h(),source_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),error_type:g(\"circuit_json_footprint_load_error\").default(\"circuit_json_footprint_load_error\"),circuit_json:H(Vm()).optional()}).describe(\"Defines an error when a circuit JSON footprint fails to load\");v(!0);var wf=A({type:g(\"pcb_group\"),pcb_group_id:T(\"pcb_group\"),source_group_id:h(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),width:K.optional(),height:K.optional(),center:it,display_offset_x:h().optional().describe(\"How to display the x offset for this group, usually corresponding with how the user specified it\"),display_offset_y:h().optional().describe(\"How to display the y offset for this group, usually corresponding with how the user specified it\"),outline:H(it).optional(),anchor_position:it.optional(),anchor_alignment:ke.default(\"center\"),position_mode:gt([\"packed\",\"relative_to_group_anchor\",\"none\"]).optional(),positioned_relative_to_pcb_group_id:h().optional(),positioned_relative_to_pcb_board_id:h().optional(),pcb_component_ids:H(h()),child_layout_mode:gt([\"packed\",\"none\"]).optional(),name:h().optional(),description:h().optional(),layout_mode:h().optional(),autorouter_configuration:A({trace_clearance:K}).optional(),autorouter_used_string:h().optional()}).describe(\"Defines a group of components on the PCB\");v(!0);var Af=kt.extend({type:g(\"pcb_autorouting_error\"),pcb_error_id:T(\"pcb_autorouting_error\"),error_type:g(\"pcb_autorouting_error\").default(\"pcb_autorouting_error\"),subcircuit_id:h().optional()}).describe(\"The autorouting has failed to route a portion of the board\");v(!0);var Bf=A({type:g(\"pcb_manual_edit_conflict_warning\"),pcb_manual_edit_conflict_warning_id:T(\"pcb_manual_edit_conflict_warning\"),warning_type:g(\"pcb_manual_edit_conflict_warning\").default(\"pcb_manual_edit_conflict_warning\"),message:h(),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),source_component_id:h()}).describe(\"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\");v(!0);var Dm=gt([\"x-\",\"x+\",\"y+\",\"y-\"]),Ff=A({type:g(\"pcb_connector_not_in_accessible_orientation_warning\"),pcb_connector_not_in_accessible_orientation_warning_id:T(\"pcb_connector_not_in_accessible_orientation_warning\"),warning_type:g(\"pcb_connector_not_in_accessible_orientation_warning\").default(\"pcb_connector_not_in_accessible_orientation_warning\"),message:h(),pcb_component_id:h(),source_component_id:h().optional(),pcb_board_id:h().optional(),facing_direction:Dm,recommended_facing_direction:Dm,subcircuit_id:h().optional()}).describe(\"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction\");v(!0);var Pf=A({type:g(\"supplier_footprint_mismatch_warning\"),supplier_footprint_mismatch_warning_id:T(\"supplier_footprint_mismatch_warning\"),warning_type:g(\"supplier_footprint_mismatch_warning\").default(\"supplier_footprint_mismatch_warning\"),message:h(),source_component_id:h(),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),supplier_name:cc.optional(),supplier_part_number:h().optional(),supplier_footprint_url:h().optional(),footprint_copper_intersection_over_union:w()}).describe(\"Warning emitted when a supplier part footprint does not match the expected footprint\");v(!0);var If=A({type:g(\"pcb_breakout_point\"),pcb_breakout_point_id:T(\"pcb_breakout_point\"),pcb_group_id:h(),subcircuit_id:h().optional(),source_trace_id:h().optional(),source_port_id:h().optional(),source_net_id:h().optional(),x:C,y:C}).describe(\"Defines a routing target within a pcb_group for a source_trace or source_net\");v(!0);var Mf=A({type:g(\"pcb_ground_plane\"),pcb_ground_plane_id:T(\"pcb_ground_plane\"),source_pcb_ground_plane_id:h(),source_net_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional()}).describe(\"Defines a ground plane on the PCB\");v(!0);var kf=A({type:g(\"pcb_ground_plane_region\"),pcb_ground_plane_region_id:T(\"pcb_ground_plane_region\"),pcb_ground_plane_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:St,points:H(it)}).describe(\"Defines a polygon region of a ground plane\");v(!0);var Cf=A({type:g(\"pcb_thermal_spoke\"),pcb_thermal_spoke_id:T(\"pcb_thermal_spoke\"),pcb_ground_plane_id:h(),shape:h(),spoke_count:w(),spoke_thickness:C,spoke_inner_diameter:C,spoke_outer_diameter:C,pcb_plated_hole_id:h().optional(),subcircuit_id:h().optional()}).describe(\"Pattern for connecting a ground plane to a plated hole\");v(!0);var Ec=A({type:g(\"pcb_copper_pour\"),pcb_copper_pour_id:T(\"pcb_copper_pour\"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:St,source_net_id:h().optional(),covered_with_solder_mask:L().optional().default(!0)}),Yf=Ec.extend({shape:g(\"rect\"),center:it,width:K,height:K,rotation:jt.optional()});v(!0);var Lf=Ec.extend({shape:g(\"brep\"),brep_shape:Lc});v(!0);var Ef=Ec.extend({shape:g(\"polygon\"),points:H(it)});v(!0);var Tf=Ui(\"shape\",[Yf,Lf,Ef]).describe(\"Defines a copper pour on the PCB.\");v(!0);var Nf=kt.extend({type:g(\"pcb_component_outside_board_error\"),pcb_component_outside_board_error_id:T(\"pcb_component_outside_board_error\"),error_type:g(\"pcb_component_outside_board_error\").default(\"pcb_component_outside_board_error\"),pcb_component_id:h(),pcb_board_id:h(),component_center:it,component_bounds:A({min_x:w(),max_x:w(),min_y:w(),max_y:w()}),subcircuit_id:h().optional(),source_component_id:h().optional()}).describe(\"Error emitted when a PCB component is placed outside the board boundaries\");v(!0);var Wf=kt.extend({type:g(\"pcb_component_not_on_board_edge_error\"),pcb_component_not_on_board_edge_error_id:T(\"pcb_component_not_on_board_edge_error\"),error_type:g(\"pcb_component_not_on_board_edge_error\").default(\"pcb_component_not_on_board_edge_error\"),pcb_component_id:h(),pcb_board_id:h(),component_center:it,pad_to_nearest_board_edge_distance:w(),source_component_id:h().optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when a component that must be placed on the board edge is centered away from the edge\");v(!0);var Rf=kt.extend({type:g(\"pcb_component_invalid_layer_error\"),pcb_component_invalid_layer_error_id:T(\"pcb_component_invalid_layer_error\"),error_type:g(\"pcb_component_invalid_layer_error\").default(\"pcb_component_invalid_layer_error\"),pcb_component_id:h().optional(),source_component_id:h(),layer:St,subcircuit_id:h().optional()}).describe(\"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)\");v(!0);var Of=kt.extend({type:g(\"pcb_via_clearance_error\"),pcb_error_id:T(\"pcb_error\"),error_type:g(\"pcb_via_clearance_error\").default(\"pcb_via_clearance_error\"),pcb_via_ids:H(h()).min(2),minimum_clearance:C.optional(),actual_clearance:C.optional(),pcb_center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when vias are closer than the allowed clearance\");v(!0);var jf=kt.extend({type:g(\"pcb_via_trace_clearance_error\"),pcb_via_trace_clearance_error_id:T(\"pcb_via_trace_clearance_error\"),error_type:g(\"pcb_via_trace_clearance_error\").default(\"pcb_via_trace_clearance_error\"),pcb_via_id:h(),pcb_trace_id:h(),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when a via and trace are closer than the allowed clearance\");v(!0);var $f=kt.extend({type:g(\"pcb_pad_pad_clearance_error\"),pcb_pad_pad_clearance_error_id:T(\"pcb_pad_pad_clearance_error\"),error_type:g(\"pcb_pad_pad_clearance_error\").default(\"pcb_pad_pad_clearance_error\"),pcb_pad_ids:H(h()).min(2),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when pads are closer than the allowed clearance\");v(!0);var Xf=kt.extend({type:g(\"pcb_pad_trace_clearance_error\"),pcb_pad_trace_clearance_error_id:T(\"pcb_pad_trace_clearance_error\"),error_type:g(\"pcb_pad_trace_clearance_error\").default(\"pcb_pad_trace_clearance_error\"),pcb_pad_id:h(),pcb_trace_id:h(),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe(\"Error emitted when a pad and trace are closer than allowed clearance\");v(!0);var Vf=A({type:g(\"pcb_courtyard_rect\"),pcb_courtyard_rect_id:T(\"pcb_courtyard_rect\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:zt,ccw_rotation:jt.optional(),color:h().optional()}).describe(\"Defines a courtyard rectangle on the PCB\");v(!0);var zf=A({type:g(\"pcb_courtyard_outline\"),pcb_courtyard_outline_id:T(\"pcb_courtyard_outline\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,outline:H(it).min(2)}).describe(\"Defines a courtyard outline on the PCB\");v(!0);var Df=A({type:g(\"pcb_courtyard_polygon\"),pcb_courtyard_polygon_id:T(\"pcb_courtyard_polygon\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,points:H(it).min(3),color:h().optional()}).describe(\"Defines a courtyard polygon on the PCB\");v(!0);var Uf=A({type:g(\"pcb_courtyard_circle\"),pcb_courtyard_circle_id:T(\"pcb_courtyard_circle\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:K,layer:zt,color:h().optional()}).describe(\"Defines a courtyard circle on the PCB\");v(!0);var Gf=A({type:g(\"pcb_courtyard_pill\"),pcb_courtyard_pill_id:T(\"pcb_courtyard_pill\"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,radius:K,layer:zt,color:h().optional()}).describe(\"Defines a courtyard pill on the PCB\");v(!0);var L9=[\"obj\",\"stl\",\"3mf\",\"gltf\",\"glb\",\"step\",\"wrl\"],Qf=[\"x+\",\"x-\",\"y+\",\"y-\",\"z+\",\"z-\"],E9={obj:\"z+\",stl:\"z+\",\"3mf\":\"z+\",gltf:\"y+\",glb:\"y+\",step:\"z+\",wrl:\"y+\"},Hf=A({type:g(\"cad_component\"),cad_component_id:h(),pcb_component_id:h(),source_component_id:h(),position:Ie,rotation:Ie.optional(),size:Ie.optional(),layer:St.optional(),subcircuit_id:h().optional(),footprinter_string:h().optional(),model_obj_url:h().optional(),model_stl_url:h().optional(),model_3mf_url:h().optional(),model_gltf_url:h().optional(),model_glb_url:h().optional(),model_step_url:h().optional(),model_wrl_url:h().optional(),model_asset:ac.optional(),model_unit_to_mm_scale_factor:w().optional(),model_board_normal_direction:gt(Qf).optional().describe(`The direction in the model's coordinate space that is considered \"up\" or \"coming out of the board surface\"`),model_origin_position:Ie.optional(),model_origin_alignment:gt([\"unknown\",\"center\",\"center_of_component_on_board_surface\",\"bottom_center_of_component\"]).optional(),model_object_fit:gt([\"contain_within_bounds\",\"fill_bounds\"]).optional().default(\"contain_within_bounds\"),model_jscad:Vm().optional(),show_as_translucent_model:L().optional(),show_as_bounding_box:L().optional(),anchor_alignment:gt([\"center\",\"center_of_component_on_board_surface\"]).optional().default(\"center\")}).describe(\"Defines a component on the PCB\");v(!0);var Tc=gt([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]),T9=Et([h(),w()]).transform((t)=\u003e{if(typeof t===\"string\"){if(t.endsWith(\"%\"))return parseFloat(t.slice(0,-1))/100;return parseFloat(t)}return t}).pipe(w().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),Zf=A({type:g(\"simulation_voltage_source\"),simulation_voltage_source_id:T(\"simulation_voltage_source\"),is_dc_source:g(!0).optional().default(!0),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),voltage:Me}).describe(\"Defines a DC voltage source for simulation\"),Kf=A({type:g(\"simulation_voltage_source\"),simulation_voltage_source_id:T(\"simulation_voltage_source\"),is_dc_source:g(!1),terminal1_source_port_id:h().optional(),terminal2_source_port_id:h().optional(),terminal1_source_net_id:h().optional(),terminal2_source_net_id:h().optional(),voltage:Me.optional(),frequency:or.optional(),peak_to_peak_voltage:Me.optional(),wave_shape:Tc.optional(),phase:jt.optional(),duty_cycle:T9.optional(),pulse_delay:Vt.optional(),rise_time:Vt.optional(),fall_time:Vt.optional(),pulse_width:Vt.optional(),period:Vt.optional()}).describe(\"Defines an AC voltage source for simulation\"),Jf=Et([Zf,Kf]).describe(\"Defines a voltage source for simulation\");v(!0);v(!0);v(!0);var N9=Et([h(),w()]).transform((t)=\u003e{if(typeof t===\"string\"){if(t.endsWith(\"%\"))return parseFloat(t.slice(0,-1))/100;return parseFloat(t)}return t}).pipe(w().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),qf=A({type:g(\"simulation_current_source\"),simulation_current_source_id:T(\"simulation_current_source\"),is_dc_source:g(!0).optional().default(!0),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),current:Xr}).describe(\"Defines a DC current source for simulation\"),t0=A({type:g(\"simulation_current_source\"),simulation_current_source_id:T(\"simulation_current_source\"),is_dc_source:g(!1),terminal1_source_port_id:h().optional(),terminal2_source_port_id:h().optional(),terminal1_source_net_id:h().optional(),terminal2_source_net_id:h().optional(),current:Xr.optional(),frequency:or.optional(),peak_to_peak_current:Xr.optional(),wave_shape:Tc.optional(),phase:jt.optional(),duty_cycle:N9.optional()}).describe(\"Defines an AC current source for simulation\"),e0=Et([qf,t0]).describe(\"Defines a current source for simulation\");v(!0);v(!0);v(!0);var r0=Et([g(\"spice_dc_sweep\"),g(\"spice_dc_operating_point\"),g(\"spice_transient_analysis\"),g(\"spice_ac_analysis\")]),i0=A({method:gt([\"trap\",\"gear\"]).optional(),reltol:Et([w(),h()]).optional(),abstol:Et([w(),h()]).optional(),vntol:Et([w(),h()]).optional()}).describe(\"SPICE solver options for a simulation experiment\"),n0=A({type:g(\"simulation_experiment\"),simulation_experiment_id:T(\"simulation_experiment\"),name:h(),experiment_type:r0,time_per_step:Vr.optional(),start_time_ms:Vt.optional(),end_time_ms:Vt.optional(),spice_options:i0.optional()}).describe(\"Defines a simulation experiment configuration\");v(!0);var o0=A({type:g(\"simulation_transient_voltage_graph\"),simulation_transient_voltage_graph_id:T(\"simulation_transient_voltage_graph\"),simulation_experiment_id:h(),timestamps_ms:H(w()).optional(),voltage_levels:H(w()),source_component_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),time_per_step:Vr,start_time_ms:Vt,end_time_ms:Vt,name:h().optional(),color:h().optional()}).describe(\"Stores voltage measurements over time for a simulation\");v(!0);var a0=A({type:g(\"simulation_transient_current_graph\"),simulation_transient_current_graph_id:T(\"simulation_transient_current_graph\"),simulation_experiment_id:h(),timestamps_ms:H(w()).optional(),current_levels:H(w()),source_component_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),time_per_step:Vr,start_time_ms:Vt,end_time_ms:Vt,name:h().optional(),color:h().optional()}).describe(\"Stores current measurements over time for a simulation\");v(!0);var s0=A({type:g(\"simulation_switch\"),simulation_switch_id:T(\"simulation_switch\"),source_component_id:h().optional(),closes_at:Vt.optional(),opens_at:Vt.optional(),starts_closed:L().optional(),switching_frequency:or.optional()}).describe(\"Defines a switch for simulation timing control\");v(!0);var c0=A({type:g(\"simulation_voltage_probe\"),simulation_voltage_probe_id:T(\"simulation_voltage_probe\"),source_component_id:h().optional(),name:h().optional(),signal_input_source_port_id:h().optional(),signal_input_source_net_id:h().optional(),reference_input_source_port_id:h().optional(),reference_input_source_net_id:h().optional(),subcircuit_id:h().optional(),color:h().optional()}).describe(\"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.\").superRefine((t,e)=\u003e{if(t.reference_input_source_port_id||t.reference_input_source_net_id){let i=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,n=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;if(i\u0026\u0026n)e.addIssue({code:V.custom,message:\"Cannot mix port and net connections in a differential probe.\"});else if(i){if(!t.signal_input_source_port_id||!t.reference_input_source_port_id)e.addIssue({code:V.custom,message:\"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id.\"})}else if(n){if(!t.signal_input_source_net_id||!t.reference_input_source_net_id)e.addIssue({code:V.custom,message:\"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id.\"})}}else if(!!t.signal_input_source_port_id===!!t.signal_input_source_net_id)e.addIssue({code:V.custom,message:\"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id.\"})});v(!0);var l0=A({type:g(\"simulation_current_probe\"),simulation_current_probe_id:T(\"simulation_current_probe\"),source_component_id:h().optional(),name:h().optional(),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),subcircuit_id:h().optional(),color:h().optional()}).describe(\"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.\").superRefine((t,e)=\u003e{let r=!!t.positive_source_port_id,i=!!t.negative_source_port_id,n=!!t.positive_source_net_id,a=!!t.negative_source_net_id,o=r||i,c=n||a;if(o\u0026\u0026c){e.addIssue({code:V.custom,message:\"Cannot mix port and net connections in a current probe.\"});return}if(o){if(!r||!i)e.addIssue({code:V.custom,message:\"Current probe using source ports requires both positive_source_port_id and negative_source_port_id.\"});return}if(c){if(!n||!a)e.addIssue({code:V.custom,message:\"Current probe using source nets requires both positive_source_net_id and negative_source_net_id.\"});return}e.addIssue({code:V.custom,message:\"A current probe must have either positive/negative source port ids or positive/negative source net ids.\"})});v(!0);var p0=kt.extend({type:g(\"simulation_unknown_experiment_error\"),simulation_unknown_experiment_error_id:T(\"simulation_unknown_experiment_error\"),error_type:g(\"simulation_unknown_experiment_error\").default(\"simulation_unknown_experiment_error\"),simulation_experiment_id:h().optional(),subcircuit_id:h().optional()}).describe(\"An unknown error occurred during the simulation experiment.\");v(!0);var h0=A({type:g(\"simulation_op_amp\"),simulation_op_amp_id:T(\"simulation_op_amp\"),source_component_id:h().optional(),inverting_input_source_port_id:h(),non_inverting_input_source_port_id:h(),output_source_port_id:h(),positive_supply_source_port_id:h(),negative_supply_source_port_id:h()}).describe(\"Defines a simple ideal operational amplifier for simulation\");v(!0);var d0=A({type:g(\"simulation_spice_subcircuit\"),simulation_spice_subcircuit_id:T(\"simulation_spice_subcircuit\"),source_component_id:h(),spice_pin_to_source_port_map:Rn(h(),h()),subcircuit_source:h()}).describe(\"Defines a custom SPICE subcircuit model for simulation\");v(!0);var Um=(t)=\u003et!==void 0,m0=A({type:g(\"simulation_oscilloscope_trace\"),simulation_oscilloscope_trace_id:T(\"simulation_oscilloscope_trace\"),simulation_transient_voltage_graph_id:h().optional(),simulation_transient_current_graph_id:h().optional(),simulation_voltage_probe_id:h().optional(),simulation_current_probe_id:h().optional(),display_name:h().optional(),color:h().optional(),display_center_value:w().optional(),display_center_offset_divs:w().optional(),volts_per_div:w().positive().optional(),amps_per_div:w().positive().optional()}).describe(\"Defines how a simulation measurement is rendered as an oscilloscope-style trace.\").superRefine((t,e)=\u003e{let r=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(Um).length,i=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(Um).length;if(r+i!==1)e.addIssue({code:V.custom,message:\"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe.\"});if(r\u003e0\u0026\u0026t.amps_per_div!==void 0)e.addIssue({code:V.custom,message:\"Voltage oscilloscope traces must use volts_per_div, not amps_per_div.\"});if(i\u003e0\u0026\u0026t.volts_per_div!==void 0)e.addIssue({code:V.custom,message:\"Current oscilloscope traces must use amps_per_div, not volts_per_div.\"})});v(!0);var u0=Et([wu,vu,Su,bu,Bu,Au,dc,lc,$n,hc,pc,mc,uc,yc,gc,xc,bc,Bc,vc,Sc,wc,Ac,_c,fc,Iu,ku,Fu,Fc,Pc,Ic,Mc,Cu,kc,Yu,Lu,Eu,Tu,Nu,Cc,Yc,Pu,yy,Sy,bf,vf,Sf,Bf,Ff,Pf,wy,uf,Ay,Oy,Iy,Ly,Ey,jy,Fy,Py,$y,Xy,wf,Dy,Uy,Gy,Qy,ef,Hy,Zy,Ky,Jy,tf,Ty,Ny,Vy,zy,Wy,Ry,Of,jf,$f,Xf,nf,rf,of,af,sf,cf,lf,pf,hf,Af,df,mf,If,xf,Mf,kf,Cf,Tf,Nf,Wf,Rf,Vf,zf,Df,Uf,Gf,Wu,Zu,Du,Uu,Gu,Qu,Vu,zu,Ku,Hu,Ru,qu,ty,Ju,ny,oy,ay,sy,py,cy,ly,Hf,Jf,e0,n0,o0,a0,s0,c0,l0,m0,p0,h0,d0]),zr=u0;v(!0);ar(!0);function P(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function y0(t){let{a:e,b:r,c:i,d:n,e:a,f:o}=t,c=e*n-r*i;return{a:n/c,b:r/-c,c:i/-c,d:e/c,e:(n*a-i*o)/-c,f:(r*a-e*o)/c}}function sr(t){return typeof t\u003e\"u\"}function Lt(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Ge(...t){t=Array.isArray(t[0])?t[0]:t;let e=(r,i)=\u003e({a:r.a*i.a+r.c*i.b,c:r.a*i.c+r.c*i.d,e:r.a*i.e+r.c*i.f+r.e,b:r.b*i.a+r.d*i.b,d:r.b*i.c+r.d*i.d,f:r.b*i.e+r.d*i.f+r.f});switch(t.length){case 0:throw Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[r,i,...n]=t,a=e(r,i);return Ge(a,...n)}}}function Ft(...t){return Ge(...t)}var{cos:W9,sin:R9,PI:UO}=Math;function ye(t,e,r){let i=W9(t),n=R9(t),a={a:i,c:-n,e:0,b:n,d:i,f:0};if(sr(e)||sr(r))return a;return Ge([Lt(e,r),a,Lt(-e,-r)])}function Jt(t,e=void 0,r=void 0,i=void 0){if(sr(e))e=t;let n={a:t,c:0,e:0,b:0,d:e,f:0};if(sr(r)||sr(i))return n;return Ge([Lt(r,i),n,Lt(-r,-i)])}var{tan:qO}=Math;function f0(t){return cr(t)}function cr(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function _0(t,e=10000000000){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function g0(t,e){let r=t[0].x!=null?t[0].x:t[0][0],i=t[0].y!=null?t[0].y:t[0][1],n=e[0].x!=null?e[0].x:e[0][0],a=e[0].y!=null?e[0].y:e[0][1],o=t[1].x!=null?t[1].x:t[1][0],c=t[1].y!=null?t[1].y:t[1][1],l=e[1].x!=null?e[1].x:e[1][0],s=e[1].y!=null?e[1].y:e[1][1],p=t[2].x!=null?t[2].x:t[2][0],d=t[2].y!=null?t[2].y:t[2][1],m=e[2].x!=null?e[2].x:e[2][0],u=e[2].y!=null?e[2].y:e[2][1],y={a:r-p,b:i-d,c:o-p,d:c-d,e:p,f:d},f={a:n-m,b:a-u,c:l-m,d:s-u,e:m,f:u},_=y0(y),x=Ge([f,_]);return _0(x)}function O9(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function zn(t,e,r,i){var n=Error.call(this,t);if(Object.setPrototypeOf)Object.setPrototypeOf(n,zn.prototype);return n.expected=e,n.found=r,n.location=i,n.name=\"SyntaxError\",n}O9(zn,Error);function Nc(t,e,r){if(r=r||\" \",t.length\u003ee)return t;return e-=t.length,r+=r.repeat(e),t+r.slice(0,e)}zn.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var r=null,i;for(i=0;i\u003ct.length;i++)if(t[i].source===this.location.source){r=t[i].text.split(/\\r\\n|\\n|\\r/g);break}var n=this.location.start,a=this.location.source\u0026\u0026typeof this.location.source.offset===\"function\"?this.location.source.offset(n):n,o=this.location.source+\":\"+a.line+\":\"+a.column;if(r){var c=this.location.end,l=Nc(\"\",a.line.toString().length,\" \"),s=r[n.line-1],p=n.line===c.line?c.column:s.length+1,d=p-n.column||1;e+=`\n --\u003e `+o+`\n`+l+` |\n`+a.line+\" | \"+s+`\n`+l+\" | \"+Nc(\"\",n.column-1,\" \")+Nc(\"\",d,\"^\")}else e+=`\n at `+o}return e};zn.buildMessage=function(t,e){var r={literal:function(s){return'\"'+n(s.text)+'\"'},class:function(s){var p=s.parts.map(function(d){return Array.isArray(d)?a(d[0])+\"-\"+a(d[1]):a(d)});return\"[\"+(s.inverted?\"^\":\"\")+p.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(s){return s.description}};function i(s){return s.charCodeAt(0).toString(16).toUpperCase()}function n(s){return s.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(p){return\"\\\\x0\"+i(p)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(p){return\"\\\\x\"+i(p)})}function a(s){return s.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(p){return\"\\\\x0\"+i(p)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(p){return\"\\\\x\"+i(p)})}function o(s){return r[s.type](s)}function c(s){var p=s.map(o),d,m;if(p.sort(),p.length\u003e0){for(d=1,m=1;d\u003cp.length;d++)if(p[d-1]!==p[d])p[m]=p[d],m++;p.length=m}switch(p.length){case 1:return p[0];case 2:return p[0]+\" or \"+p[1];default:return p.slice(0,-1).join(\", \")+\", or \"+p[p.length-1]}}function l(s){return s?'\"'+n(s)+'\"':\"end of input\"}return\"Expected \"+c(t)+\" but \"+l(e)+\" found.\"};function x0(t,e,r){if(!e||!r)return;let i=t.get(e);if(!i)i=new Set,t.set(e,i);i.add(r);let n=t.get(r);if(!n)n=new Set,t.set(r,n);n.add(e)}function $9(t,e){if(!e.subcircuit_id\u0026\u0026!e.source_group_id)return[...t];let r=e;if(e.subcircuit_id){let c=new Set([e.subcircuit_id]),l=new Map,s=new Map;for(let d of t)if(d.type===\"source_group\"){let{source_group_id:m,subcircuit_id:u}=d;if(u)s.set(m,u);let y=d.parent_source_group_id;if(y){if(!l.has(y))l.set(y,[]);l.get(y).push(m)}}let p;for(let[d,m]of s)if(m===e.subcircuit_id){p=d;break}if(p){let d=(m)=\u003e{let u=l.get(m)||[];for(let y of u){let f=s.get(y);if(f)c.add(f);d(y)}};d(p),r={...e,subcircuit_ids:Array.from(c)}}}let i=new Map;for(let c of t){let l=`${c.type}_id`,s=c[l];if(typeof s===\"string\")i.set(s,c)}let n=new Map;for(let c of t){let l=Object.entries(c);for(let[s,p]of l){if(s===\"parent_source_group_id\")continue;if(s.endsWith(\"_id\")\u0026\u0026typeof p===\"string\"){let d=i.get(p);x0(n,c,d)}else if(s.endsWith(\"_ids\")\u0026\u0026Array.isArray(p)){for(let d of p)if(typeof d===\"string\"){let m=i.get(d);x0(n,c,m)}}}}let a=[],o=new Set;for(let c of t){let l=!1;if(r.subcircuit_id\u0026\u0026\"subcircuit_id\"in c\u0026\u0026c.subcircuit_id===r.subcircuit_id)l=!0;else if(r.subcircuit_ids\u0026\u0026\"subcircuit_id\"in c\u0026\u0026c.subcircuit_id\u0026\u0026r.subcircuit_ids.includes(c.subcircuit_id))l=!0;else if(r.source_group_id\u0026\u0026\"source_group_id\"in c\u0026\u0026c.source_group_id===r.source_group_id)l=!0;else if(r.source_group_id\u0026\u0026\"member_source_group_ids\"in c\u0026\u0026Array.isArray(c.member_source_group_ids)\u0026\u0026c.member_source_group_ids.includes(r.source_group_id))l=!0;if(l)a.push(c),o.add(c)}while(a.length\u003e0){let c=a.shift(),l=n.get(c);if(!l)continue;for(let s of l)if(!o.has(s))o.add(s),a.push(s)}return t.filter((c)=\u003eo.has(c))}var Qi=(t,e={})=\u003e{let r=t,i=r._internal_store;if(!i){i={counts:{},editCount:0},r._internal_store=i;for(let a of r){let o=a.type,c=a[`${o}_id`];if(!c)continue;let l=Number.parseInt(c.split(\"_\").pop());if(!Number.isNaN(l))i.counts[o]=Math.max(i.counts[o]??0,l)}}let n=new Proxy({},{get:(a,o)=\u003e{if(o===\"toArray\")return()=\u003e(r.editCount=i.editCount,r);if(o===\"editCount\")return i.editCount;if(o===\"subtree\")return(l)=\u003eQi($9(r,l),e);if(o===\"insert\")return(l)=\u003e{let s=l.type;if(!s)throw Error(\"insert requires an element with a type\");i.counts[s]??=-1,i.counts[s]++;let p=i.counts[s],d={...l,type:s,[`${s}_id`]:`${s}_${p}`};if(e.validateInserts)(Dr[s]??zr).parse(d);return r.push(d),i.editCount++,d};if(o===\"insertAll\")return(l)=\u003el.map((s)=\u003en.insert(s));let c=o;return{get:(l)=\u003er.find((s)=\u003es.type===c\u0026\u0026s[`${c}_id`]===l),getUsing:(l)=\u003e{let s=Object.keys(l);if(s.length!==1)throw Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");let p=s[0],d=p.replace(\"_id\",\"\"),m=r.find((u)=\u003eu.type===d\u0026\u0026u[p]===l[p]);if(!m)return null;return r.find((u)=\u003eu.type===c\u0026\u0026u[`${c}_id`]===m[`${c}_id`])},getWhere:(l)=\u003e{let s=Object.keys(l);return r.find((p)=\u003ep.type===c\u0026\u0026s.every((d)=\u003ep[d]===l[d]))},list:(l)=\u003e{let s=!l?[]:Object.keys(l);return r.filter((p)=\u003ep.type===c\u0026\u0026s.every((d)=\u003ep[d]===l[d]))},insert:(l)=\u003e{i.counts[c]??=-1,i.counts[c]++;let s=i.counts[c],p={type:c,[`${c}_id`]:`${c}_${s}`,...l};if(e.validateInserts)(Dr[c]??zr).parse(p);return r.push(p),i.editCount++,p},delete:(l)=\u003e{let s=r.find((p)=\u003ep[`${c}_id`]===l);if(!s)return;r.splice(r.indexOf(s),1),i.editCount++},update:(l,s)=\u003e{let p=r.find((d)=\u003ed.type===c\u0026\u0026d[`${c}_id`]===l);if(!p)return null;return Object.assign(p,s),i.editCount++,p},select:(l)=\u003e{if(c===\"source_component\")return r.find((s)=\u003es.type===\"source_component\"\u0026\u0026s.name===l.replace(/\\./g,\"\"));else if(c===\"pcb_port\"||c===\"source_port\"||c===\"schematic_port\"){let[s,p]=l.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),d=r.find((u)=\u003eu.type===\"source_component\"\u0026\u0026u.name===s);if(!d)return null;let m=r.find((u)=\u003eu.type===\"source_port\"\u0026\u0026u.source_component_id===d.source_component_id\u0026\u0026(u.name===p||(u.port_hints??[]).includes(p)));if(!m)return null;if(c===\"source_port\")return m;if(c===\"pcb_port\")return r.find((u)=\u003eu.type===\"pcb_port\"\u0026\u0026u.source_port_id===m.source_port_id);else if(c===\"schematic_port\")return r.find((u)=\u003eu.type===\"schematic_port\"\u0026\u0026u.source_port_id===m.source_port_id)}}}}});return n};Qi.unparsed=Qi;var Gt=Qi,Rc=Qi;function Wc(t){let e=t.type;return`${e}:${t[`${e}_id`]}`}var b0=(t,e={})=\u003e{let r=t._internal_store_indexed;if(!r){r={counts:{},editCount:0,indexes:{}};for(let o of t){let c=o.type,l=o[`${c}_id`];if(!l)continue;let s=Number.parseInt(l.split(\"_\").pop()||\"\");if(!Number.isNaN(s))r.counts[c]=Math.max(r.counts[c]??0,s)}let n=e.indexConfig||{},a=r.indexes;if(n.byId)a.byId=new Map;if(n.byType)a.byType=new Map;if(n.byRelation)a.byRelation=new Map;if(n.bySubcircuit)a.bySubcircuit=new Map;if(n.byCustomField\u0026\u0026n.byCustomField.length\u003e0){a.byCustomField=new Map;for(let o of n.byCustomField)a.byCustomField.set(o,new Map)}for(let o of t){if(n.byId){let c=Wc(o);a.byId.set(c,o)}if(n.byType){let c=a.byType.get(o.type)||[];c.push(o),a.byType.set(o.type,c)}if(n.byRelation){let c=Object.entries(o);for(let[l,s]of c)if(l.endsWith(\"_id\")\u0026\u0026l!==`${o.type}_id`\u0026\u0026typeof s===\"string\"){let p=a.byRelation.get(l)||new Map,d=p.get(s)||[];d.push(o),p.set(s,d),a.byRelation.set(l,p)}}if(n.bySubcircuit\u0026\u0026\"subcircuit_id\"in o){let c=o.subcircuit_id;if(c\u0026\u0026typeof c===\"string\"){let l=a.bySubcircuit.get(c)||[];l.push(o),a.bySubcircuit.set(c,l)}}if(n.byCustomField\u0026\u0026a.byCustomField){for(let c of n.byCustomField)if(c in o){let l=o[c];if(l!==void 0\u0026\u0026(typeof l===\"string\"||typeof l===\"number\")){let s=String(l),p=a.byCustomField.get(c),d=p.get(s)||[];d.push(o),p.set(s,d)}}}}t._internal_store_indexed=r}return new Proxy({},{get:(n,a)=\u003e{if(a===\"toArray\")return()=\u003e(t.editCount=r.editCount,t);if(a===\"editCount\")return r.editCount;let o=a;return{get:(c)=\u003e{let l=e.indexConfig||{};if(l.byId\u0026\u0026r.indexes.byId)return r.indexes.byId.get(`${o}:${c}`)||null;if(l.byType\u0026\u0026r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((p)=\u003ep[`${o}_id`]===c)||null;return t.find((s)=\u003es.type===o\u0026\u0026s[`${o}_id`]===c)||null},getUsing:(c)=\u003e{let l=e.indexConfig||{},s=Object.keys(c);if(s.length!==1)throw Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");let p=s[0],d=p.replace(\"_id\",\"\");if(l.byRelation\u0026\u0026r.indexes.byRelation){let u=r.indexes.byRelation.get(p);if(u){let f=(u.get(c[p])||[]).find((x)=\u003ex.type===d);if(!f)return null;let _=f[`${o}_id`];if(l.byId\u0026\u0026r.indexes.byId)return r.indexes.byId.get(`${o}:${_}`)||null;if(l.byType\u0026\u0026r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((Y)=\u003eY[`${o}_id`]===_)||null;return t.find((x)=\u003ex.type===o\u0026\u0026x[`${o}_id`]===_)||null}}let m=t.find((u)=\u003eu.type===d\u0026\u0026u[p]===c[p]);if(!m)return null;return t.find((u)=\u003eu.type===o\u0026\u0026u[`${o}_id`]===m[`${o}_id`])||null},getWhere:(c)=\u003e{let l=e.indexConfig||{},s=Object.keys(c);if(s.length===1\u0026\u0026l.byCustomField\u0026\u0026r.indexes.byCustomField){let p=s[0],d=r.indexes.byCustomField.get(p);if(d){let m=String(c[p]);return(d.get(m)||[]).find((y)=\u003ey.type===o)||null}}if(\"subcircuit_id\"in c\u0026\u0026l.bySubcircuit\u0026\u0026r.indexes.bySubcircuit){let p=c.subcircuit_id;return(r.indexes.bySubcircuit.get(p)||[]).find((m)=\u003em.type===o\u0026\u0026s.every((u)=\u003em[u]===c[u]))||null}if(l.byType\u0026\u0026r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((d)=\u003es.every((m)=\u003ed[m]===c[m]))||null;return t.find((p)=\u003ep.type===o\u0026\u0026s.every((d)=\u003ep[d]===c[d]))||null},list:(c)=\u003e{let l=e.indexConfig||{},s=!c?[]:Object.keys(c);if(s.length===0\u0026\u0026l.byType\u0026\u0026r.indexes.byType)return r.indexes.byType.get(o)||[];if(s.length===1\u0026\u0026s[0]===\"subcircuit_id\"\u0026\u0026l.bySubcircuit\u0026\u0026r.indexes.bySubcircuit){let d=c.subcircuit_id;return(r.indexes.bySubcircuit.get(d)||[]).filter((u)=\u003eu.type===o)}let p;if(l.byType\u0026\u0026r.indexes.byType)p=r.indexes.byType.get(o)||[];else p=t.filter((d)=\u003ed.type===o);if(s.length\u003e0)return p.filter((d)=\u003es.every((m)=\u003ed[m]===c[m]));return p},insert:(c)=\u003e{r.counts[o]??=-1,r.counts[o]++;let l=r.counts[o],s={type:o,[`${o}_id`]:`${o}_${l}`,...c};if(e.validateInserts)(Dr[o]??zr).parse(s);t.push(s),r.editCount++;let p=e.indexConfig||{};if(p.byId\u0026\u0026r.indexes.byId){let d=Wc(s);r.indexes.byId.set(d,s)}if(p.byType\u0026\u0026r.indexes.byType){let d=r.indexes.byType.get(o)||[];d.push(s),r.indexes.byType.set(o,d)}if(p.byRelation\u0026\u0026r.indexes.byRelation){let d=Object.entries(s);for(let[m,u]of d)if(m.endsWith(\"_id\")\u0026\u0026m!==`${s.type}_id`\u0026\u0026typeof u===\"string\"){let y=r.indexes.byRelation.get(m)||new Map,f=y.get(u)||[];f.push(s),y.set(u,f),r.indexes.byRelation.set(m,y)}}if(p.bySubcircuit\u0026\u0026r.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in s){let d=s.subcircuit_id;if(d\u0026\u0026typeof d===\"string\"){let m=r.indexes.bySubcircuit.get(d)||[];m.push(s),r.indexes.bySubcircuit.set(d,m)}}if(p.byCustomField\u0026\u0026r.indexes.byCustomField){for(let d of p.byCustomField)if(d in s){let m=s[d];if(m!==void 0\u0026\u0026(typeof m===\"string\"||typeof m===\"number\")){let u=String(m),y=r.indexes.byCustomField.get(d),f=y.get(u)||[];f.push(s),y.set(u,f)}}}return s},delete:(c)=\u003e{let l=e.indexConfig||{},s;if(l.byId\u0026\u0026r.indexes.byId)s=r.indexes.byId.get(`${o}:${c}`);else if(l.byType\u0026\u0026r.indexes.byType)s=(r.indexes.byType.get(o)||[]).find((m)=\u003em[`${o}_id`]===c);else s=t.find((d)=\u003ed[`${o}_id`]===c);if(!s)return;let p=t.indexOf(s);if(p\u003e=0)t.splice(p,1),r.editCount++;if(l.byId\u0026\u0026r.indexes.byId){let d=Wc(s);r.indexes.byId.delete(d)}if(l.byType\u0026\u0026r.indexes.byType){let m=(r.indexes.byType.get(o)||[]).filter((u)=\u003eu[`${o}_id`]!==c);r.indexes.byType.set(o,m)}if(l.byRelation\u0026\u0026r.indexes.byRelation)for(let[d,m]of r.indexes.byRelation.entries())for(let[u,y]of m.entries()){let f=y.filter((_)=\u003e_!==s);if(f.length===0)m.delete(u);else m.set(u,f)}if(l.bySubcircuit\u0026\u0026r.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in s){let d=s.subcircuit_id;if(d){let u=(r.indexes.bySubcircuit.get(d)||[]).filter((y)=\u003ey!==s);if(u.length===0)r.indexes.bySubcircuit.delete(d);else r.indexes.bySubcircuit.set(d,u)}}if(l.byCustomField\u0026\u0026r.indexes.byCustomField)for(let d of r.indexes.byCustomField.values())for(let[m,u]of d.entries()){let y=u.filter((f)=\u003ef!==s);if(y.length===0)d.delete(m);else d.set(m,y)}},update:(c,l)=\u003e{let s=e.indexConfig||{},p;if(s.byId\u0026\u0026r.indexes.byId)p=r.indexes.byId.get(`${o}:${c}`);else if(s.byType\u0026\u0026r.indexes.byType)p=(r.indexes.byType.get(o)||[]).find((m)=\u003em[`${o}_id`]===c);else p=t.find((d)=\u003ed.type===o\u0026\u0026d[`${o}_id`]===c);if(!p)return null;if(s.byRelation\u0026\u0026r.indexes.byRelation){let d=Object.entries(p);for(let[m,u]of d)if(m.endsWith(\"_id\")\u0026\u0026m!==`${p.type}_id`\u0026\u0026typeof u===\"string\"){if(m in l\u0026\u0026l[m]!==u){let y=r.indexes.byRelation.get(m);if(y){let _=(y.get(u)||[]).filter((x)=\u003ex!==p);if(_.length===0)y.delete(u);else y.set(u,_)}}}}if(s.bySubcircuit\u0026\u0026r.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in p\u0026\u0026\"subcircuit_id\"in l){let d=p.subcircuit_id,m=l.subcircuit_id;if(d!==m){let y=(r.indexes.bySubcircuit.get(d)||[]).filter((f)=\u003ef!==p);if(y.length===0)r.indexes.bySubcircuit.delete(d);else r.indexes.bySubcircuit.set(d,y)}}if(s.byCustomField\u0026\u0026r.indexes.byCustomField){for(let d of s.byCustomField)if(d in p\u0026\u0026d in l\u0026\u0026p[d]!==l[d]){let m=r.indexes.byCustomField.get(d);if(m){let u=String(p[d]),f=(m.get(u)||[]).filter((_)=\u003e_!==p);if(f.length===0)m.delete(u);else m.set(u,f)}}}if(Object.assign(p,l),r.editCount++,s.byRelation\u0026\u0026r.indexes.byRelation){let d=Object.entries(p);for(let[m,u]of d)if(m.endsWith(\"_id\")\u0026\u0026m!==`${p.type}_id`\u0026\u0026typeof u===\"string\"){if(m in l){let y=r.indexes.byRelation.get(m)||new Map,f=y.get(u)||[];if(!f.includes(p))f.push(p),y.set(u,f),r.indexes.byRelation.set(m,y)}}}if(s.bySubcircuit\u0026\u0026r.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in p\u0026\u0026\"subcircuit_id\"in l){let d=p.subcircuit_id;if(d\u0026\u0026typeof d===\"string\"){let m=r.indexes.bySubcircuit.get(d)||[];if(!m.includes(p))m.push(p),r.indexes.bySubcircuit.set(d,m)}}if(s.byCustomField\u0026\u0026r.indexes.byCustomField){for(let d of s.byCustomField)if(d in p\u0026\u0026d in l){let m=p[d];if(m!==void 0\u0026\u0026(typeof m===\"string\"||typeof m===\"number\")){let u=String(m),y=r.indexes.byCustomField.get(d),f=y.get(u)||[];if(!f.includes(p))f.push(p),y.set(u,f)}}}return p},select:(c)=\u003e{if(o===\"source_component\")return t.find((l)=\u003el.type===\"source_component\"\u0026\u0026l.name===c.replace(/\\./g,\"\"))||null;else if(o===\"pcb_port\"||o===\"source_port\"||o===\"schematic_port\"){let[l,s]=c.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),p=t.find((m)=\u003em.type===\"source_component\"\u0026\u0026m.name===l);if(!p)return null;let d=t.find((m)=\u003em.type===\"source_port\"\u0026\u0026m.source_component_id===p.source_component_id\u0026\u0026(m.name===s||(m.port_hints??[]).includes(s)));if(!d)return null;if(o===\"source_port\")return d;if(o===\"pcb_port\")return t.find((m)=\u003em.type===\"pcb_port\"\u0026\u0026m.source_port_id===d.source_port_id)||null;else if(o===\"schematic_port\")return t.find((m)=\u003em.type===\"schematic_port\"\u0026\u0026m.source_port_id===d.source_port_id)||null}return null}}}})};b0.unparsed=b0;var Ur=(t)=\u003e{let e=new Map;for(let r of t)if(r.type===\"schematic_sheet\"\u0026\u0026r.name)e.set(r.schematic_sheet_id,r.name);return e};var X9=(t)=\u003et.type===\"schematic_box\",v0=(t)=\u003et.type===\"schematic_component\",Oc=(t)=\u003et.schematic_sheet_id,V9=(t,e)=\u003e{if(!e)return;return Rc(t).source_component.get(e)?.name},z9=(t,e)=\u003e{if(!t.schematic_component_id)return{};let r=Rc(e),i=r.schematic_component.get(t.schematic_component_id);if(!i?.source_component_id)return{};let n=r.source_component.get(i.source_component_id);return{sourceComponentId:i.source_component_id,sourceComponentName:n?.name}},D9=(t,e,r,i)=\u003e{let n=Oc(t);if(n===void 0\u0026\u0026i)n=Oc(i);let a;if(n)a=r.get(n);let o={lineItemType:\"SchematicBoxPlacement\",positionAnchor:\"center\",schX:t.center.x,schY:t.center.y,width:i?.width??t.size.width,height:i?.height??t.size.height,sourceComponentId:t.source_component_id,sourceComponentName:V9(e,t.source_component_id),schematicComponentId:t.schematic_component_id,schematicSymbolId:i?.schematic_symbol_id??t.schematic_symbol_id,subcircuitId:t.subcircuit_id??i?.subcircuit_id};if(n)o.schematicSheetId=n;if(a)o.schematicSheetName=a;return o},U9=(t,e,r)=\u003e{let i=Oc(t),n;if(i)n=r.get(i);let a={lineItemType:\"SchematicBoxPlacement\",positionAnchor:\"center\",schX:t.x+t.width/2,schY:t.y+t.height/2,width:t.width,height:t.height,...z9(t,e),schematicComponentId:t.schematic_component_id,schematicSymbolId:t.schematic_symbol_id,subcircuitId:t.subcircuit_id};if(i)a.schematicSheetId=i;if(n)a.schematicSheetName=n;return a},S0=(t)=\u003e{let e=t.filter(X9).filter((a)=\u003ea.schematic_component_id||a.schematic_symbol_id),r=Ur(t),i=new Set(t.filter(v0).map((a)=\u003ea.schematic_component_id)),n=[...t.filter(v0).map((a)=\u003eD9(a,t,r,e.find((o)=\u003eo.schematic_component_id===a.schematic_component_id))),...e.filter((a)=\u003e!a.schematic_component_id||!i.has(a.schematic_component_id)).map((a)=\u003eU9(a,t,r))];return{circuitJson:t,componentPlacements:n}};class Dn extends at{params;constructor(t){super();this.params=t}_step(){let t=new At(this.params.ctx);for(let e of Gs(t)){let{resistor:r,switchBox:i,signalPort:n,signalSchY:a,pullDirection:o}=e;if(e.horizontalPushbutton)continue;let c=t.connected(n.source_port_id);if(t.portsByNet.get(c)?.length!==2)continue;if(n.needs_external_pullup||n.needs_external_pulldown)continue;let l=o===\"up\"?a-(r.schY+r.height/2):r.schY-r.height/2-a;if(l\u003c=1.5)continue;let s=o===\"up\"?\"above\":\"below\";this.params.issues.push({lineItemType:\"PullResistorOnWrongSide\",resistorSchematicBox:r,hostSchematicBox:i,signalSourcePortId:n.source_port_id,signalPinName:n.name,signalSchY:a,pullDirection:o,preferredSide:s,wrongSideGap:l,maxRecommendedWrongSideGap:1.5,message:`place ${r.sourceComponentName} ${s} ${i.sourceComponentName} so the pull-${o} branch reads toward ${o===\"up\"?\"power\":\"ground\"}`})}this.solved=!0}}function Un(t,e){let r=t.find((l)=\u003el.type===\"source_trace\"\u0026\u0026l.source_trace_id===e.source_trace_id);if(r?.type===\"source_trace\"\u0026\u0026r.name)return r.name;let i=e.edges[0],n=e.edges.at(-1),a=(l,s)=\u003e{let p=t.filter((x)=\u003ex.type===\"schematic_port\"\u0026\u0026x.schematic_sheet_id===e.schematic_sheet_id\u0026\u0026(s?x.schematic_port_id===s:Math.hypot(x.center.x-l.x,x.center.y-l.y)\u003c=0.01));if(p.length!==1||p[0]?.type!==\"schematic_port\")return;let d=p[0],m=t.find((x)=\u003ex.type===\"source_port\"\u0026\u0026x.source_port_id===d.source_port_id),u=t.find((x)=\u003ex.type===\"schematic_component\"\u0026\u0026x.schematic_component_id===d.schematic_component_id),y=m?.type===\"source_port\"?m.source_component_id:u?.type===\"schematic_component\"?u.source_component_id:void 0,f=t.find((x)=\u003ex.type===\"source_component\"\u0026\u0026x.source_component_id===y);if(f?.type!==\"source_component\"||!f.name)return;let _=m?.type===\"source_port\"\u0026\u0026m.name?m.name:d.pin_number!==void 0?`pin${d.pin_number}`:d.display_pin_label;return _?`${f.name}.${_}`:f.name},o=i\u0026\u0026a(i.from,i.from_schematic_port_id),c=n\u0026\u0026a(n.to,n.to_schematic_port_id);if(o\u0026\u0026c)return`${o} to ${c}`;return r?.type===\"source_trace\"\u0026\u0026r.display_name||o||c||\"trace\"}var w0=(t,e,r)=\u003e{let i=[{x:t.x,y:t.y}],n=(t.x+e.x)/2,a=(t.y+e.y)/2,o={x:e.x,y:e.y};switch(e.facingDirection){case\"x+\":o.x+=r;break;case\"x-\":o.x-=r;break;case\"y+\":o.y+=r;break;case\"y-\":o.y-=r;break}let c=t.facingDirection??\"none\",l=e.facingDirection??\"none\",s=(m)=\u003e{let u=i[i.length-1];if(u.x!==m.x||u.y!==m.y)i.push(m)},p=Math.abs(t.y-e.y)\u003c=Math.max(0.000001,r*0.1),d=Math.abs(t.x-e.x)\u003c=Math.max(0.000001,r*0.1);if(c===\"none\"\u0026\u0026l===\"none\")globalThis.__DEBUG_CALCULATE_ELBOW_CASE=1,s({x:n,y:t.y}),s({x:n,y:e.y});else if(c===\"x+\"\u0026\u0026l===\"y+\")if(globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2,t.x\u003ee.x\u0026\u0026t.y\u003ce.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.1,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y+r}),s({x:e.x,y:e.y+r});else if(!d\u0026\u0026!p\u0026\u0026t.x\u003ce.x\u0026\u0026t.y\u003ee.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.2,s({x:e.x,y:t.y});else if(d)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.3,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y+r}),s({x:e.x,y:e.y+r});else if(t.x\u003ce.x)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.4,s({x:n,y:t.y}),s({x:n,y:o.y}),s({x:e.x,y:o.y});else if(t.y\u003c=e.y+r)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.5,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x,y:t.y+r}),s({x:e.x,y:e.y});else globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.6,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:(t.y+e.y)/2}),s({x:e.x,y:(t.y+e.y)/2});else if(c===\"x+\"\u0026\u0026l===\"x+\"\u0026\u0026!p){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=3;let m=Math.max(t.x+r,o.x);s({x:m,y:t.y}),s({x:m,y:e.y})}else if(c===\"x+\"\u0026\u0026l===\"x+\"\u0026\u0026p)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=3.1,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x+r,y:t.y+r}),s({x:e.x+r,y:e.y});else if(c===\"x+\"\u0026\u0026l===\"y-\")if(d\u0026\u0026t.y\u003c=e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.11,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:a}),s({x:e.x,y:a});else if(d\u0026\u0026t.y\u003ee.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.12,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y-r}),s({x:e.x,y:e.y-r});else if(t.x\u003ce.x\u0026\u0026t.y\u003ce.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.2,s({x:e.x,y:t.y});else if(t.x\u003ee.x\u0026\u0026t.y\u003ce.y){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.3;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:a}),s({x:e.x,y:a})}else if(t.x\u003ee.x\u0026\u0026t.y\u003ee.y){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.4;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:o.y}),s({x:e.x,y:o.y})}else if(t.y===e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.5,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y-r}),s({x:e.x,y:t.y-r});else globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.6,s({x:n,y:t.y}),s({x:n,y:o.y}),s({x:e.x,y:o.y});else if(c===\"x+\"\u0026\u0026l===\"x-\"\u0026\u0026t.x+r\u003e=e.x-r\u0026\u0026!p){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=5;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:a}),s({x:o.x,y:a}),s({x:o.x,y:o.y})}else if(c===\"x+\"\u0026\u0026l===\"x-\"\u0026\u0026p\u0026\u0026e.x\u003et.x);else if(c===\"x+\"\u0026\u0026l===\"x-\"\u0026\u0026p)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=7,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x-r,y:t.y+r}),s({x:e.x-r,y:t.y});else{if(globalThis.__DEBUG_CALCULATE_ELBOW_CASE=8,c===\"x+\")s({x:t.x+r,y:t.y});s({x:n,y:i[i.length-1].y}),s({x:n,y:o.y}),s({x:o.x,y:o.y})}return s({x:e.x,y:e.y}),i};var jc=(t,e,r={})=\u003e{let i=t,n=e,a=!1;if(i.x\u003en.x||i.x===n.x\u0026\u0026i.y\u003en.y)a=!0,[i,n]=[n,i];let o=i.facingDirection===\"x-\",c=i.facingDirection===\"y-\",l=(Y)=\u003e{let b=o?i.x-(Y.x-i.x):Y.x,M=c?i.y-(Y.y-i.y):Y.y,O=Y.facingDirection;if(o){if(O===\"x+\")O=\"x-\";else if(O===\"x-\")O=\"x+\"}if(c){if(O===\"y+\")O=\"y-\";else if(O===\"y-\")O=\"y+\"}return{x:b,y:M,facingDirection:O}},s=(Y,b)=\u003e{let M=Y.x-b.x,O=Y.y-b.y,X=b.x+O,E=b.y-M,I=Y.facingDirection;switch(I){case\"x+\":I=\"y-\";break;case\"y-\":I=\"x-\";break;case\"x-\":I=\"y+\";break;case\"y+\":I=\"x+\";break}return{x:X,y:E,facingDirection:I}},p=(Y,b)=\u003e{let M=Y.x-b.x,O=Y.y-b.y;return{x:b.x-O,y:b.y+M}},d=o||c?l(i):i,m=o||c?l(n):n,u=d,y=m,f=!1;if(d.facingDirection===\"y+\")f=!0,u={...d,facingDirection:\"x+\"},y=s(m,d);let _=r?.overshoot??0.1*Math.max(Math.abs(u.x-y.x),Math.abs(u.y-y.y)),x=w0(u,y,_);if(f)x=x.map((Y)=\u003ep(Y,u));if(o||c)x=x.map(({x:Y,y:b})=\u003e({x:o?i.x-(Y-i.x):Y,y:c?i.y-(b-i.y):b}));return a?x.reverse():x};class ne extends at{static EPSILON=0.01;ctx;out;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e}_step(){let t=this.ctx.circuitJson.filter((n)=\u003en.type===\"schematic_port\"),e=new Map(t.map((n)=\u003e[n.schematic_port_id,n])),r=new Map(this.ctx.componentPlacements.flatMap((n)=\u003en.schematicComponentId?[[n.schematicComponentId,n]]:[])),i=new Set;for(let n of this.ctx.circuitJson.filter((a)=\u003ea.type===\"schematic_trace\")){let a=this.getTracePoints(n),o=this.countTurns(a);if(o!==3)continue;let c=[this.getCandidate({trace:n,points:a,atStart:!0,currentTurnCount:o,ports:t,portsById:e,placementsByComponentId:r}),this.getCandidate({trace:n,points:a,atStart:!1,currentTurnCount:o,ports:t,portsById:e,placementsByComponentId:r})].filter((s)=\u003eBoolean(s));for(let s of[...c]){if(!s.target.sourceComponentName?.startsWith(\"U\"))continue;for(let p of[a[0],a.at(-1)]){let d=this.findPortAtPoint(t,p,n.schematic_sheet_id),m=d?.schematic_component_id?r.get(d.schematic_component_id):void 0;if(!m||!/^[CR]/.test(m.sourceComponentName??\"\"))continue;c.push({target:m,deltaSchX:-s.deltaSchX,deltaSchY:-s.deltaSchY,currentTurnCount:o,suggestedTurnCount:s.suggestedTurnCount})}}let l=(s)=\u003e/^[CR]/.test(s.target.sourceComponentName??\"\")?0:s.target.sourceComponentName?.startsWith(\"U\")?2:1;c.sort((s,p)=\u003el(s)-l(p));for(let s of c){if(this.wouldOverlapAnotherComponent(s))continue;if(!this.validateMove(n,s,t))continue;let p=[s.target.schematicComponentId,s.deltaSchX.toFixed(3),s.deltaSchY.toFixed(3)].join(\"\\x00\");if(i.has(p))break;i.add(p),this.out.push(this.makeIssue(n,s));break}}this.solved=!0}getCandidate({trace:t,points:e,atStart:r,currentTurnCount:i,ports:n,portsById:a,placementsByComponentId:o}){if(e.length\u003c4)return;let c=r?0:e.length-1,l=r?1:e.length-2,s=r?2:e.length-3,p=r?3:e.length-4,d=e[c],m=e[l],u=e[s],y=e[p],f=r?t.edges[0]:t.edges.at(-1);if(!f)return;let _=r?f.from_schematic_port_id:f.to_schematic_port_id,x=_?a.get(_):this.findPortAtPoint(n,d,t.schematic_sheet_id);if(!x?.schematic_component_id||!x.facing_direction)return;let Y=this.getAxis(d,m),b=this.getAxis(m,u),M=this.getAxis(u,y),O=x.facing_direction===\"left\"||x.facing_direction===\"right\"?\"horizontal\":\"vertical\";if(!Y||!b||!M)return;if(Y!==O||b===O||M!==O)return;if(!this.isPointInFacingDirection(d,m,x.facing_direction)||!this.isPointInFacingDirection(u,y,x.facing_direction))return;let X=o.get(x.schematic_component_id);if(!X)return;let E=u.x-m.x,I=u.y-m.y;if(Math.abs(E)\u003c=ne.EPSILON\u0026\u0026Math.abs(I)\u003c=ne.EPSILON)return;let U={x:d.x+E,y:d.y+I},q=r?[U,...e.slice(2)]:[...e.slice(0,-2),U],ct=this.countTurns(q);if(ct===void 0||ct!==1||ct\u003e=i)return;return{target:X,deltaSchX:E,deltaSchY:I,currentTurnCount:i,suggestedTurnCount:ct}}validateMove(t,e,r){let i=e.target.schematicComponentId,n=e.target.schematicSheetId,a=r.filter((b)=\u003eb.schematic_sheet_id===n),o=a.filter((b)=\u003eb.schematic_component_id===i),c=this.ctx.circuitJson.filter((b)=\u003eb.type===\"schematic_trace\"\u0026\u0026b.schematic_sheet_id===n),l=(b,M)=\u003eb.edges.some((O)=\u003eO.from_schematic_port_id===M.schematic_port_id||O.to_schematic_port_id===M.schematic_port_id||this.pointsEqual(O.from,M.center)||this.pointsEqual(O.to,M.center)),s=c.filter((b)=\u003eo.some((M)=\u003el(b,M)));if(!s.includes(t))return!1;if(this.ctx.circuitJson.some((b)=\u003eb.type===\"schematic_net_label\"\u0026\u0026b.schematic_sheet_id===n\u0026\u0026o.some((M)=\u003ethis.pointsEqual(b.anchor_position??b.center,M.center))))return!1;let p=(b)=\u003e({x:b.x+e.deltaSchX,y:b.y+e.deltaSchY}),d={left:\"x-\",right:\"x+\",up:\"y+\",down:\"y-\"},m=(b,M)=\u003e({...M\u0026\u0026b.schematic_component_id===i?p(b.center):b.center,facingDirection:d[b.facing_direction]}),u=(b)=\u003eb.slice(1).reduce((M,O,X)=\u003eM+Math.abs(O.x-b[X].x)+Math.abs(O.y-b[X].y),0),y=(b)=\u003eb.slice(1).map((M,O)=\u003e({from:b[O],to:M})),f=Ut(e.target.schX+e.deltaSchX,e.target.schY+e.deltaSchY,e.target.width,e.target.height),_=c.filter((b)=\u003e!s.includes(b));if(_.some((b)=\u003eb.edges.some((M)=\u003eYr(M.from,M.to,Ve(f)))))return!1;let x=this.ctx.circuitJson.flatMap((b)=\u003e{if(b.type===\"schematic_net_label\"\u0026\u0026b.schematic_sheet_id===n)return[Ve(kr(b))];if(b.type!==\"schematic_text\"||b.schematic_sheet_id!==n)return[];return Mi(b.schematic_component_id===i?{...b,position:p(b.position)}:b)});if(x.some((b)=\u003eki(b,Ve(f))))return!1;let Y=[];for(let b of s){let M=this.getTracePoints(b);if(M.length\u003c2||b.junctions?.length)return!1;let O=(Q,k)=\u003e{let st=a.filter((ot)=\u003ek?ot.schematic_port_id===k:this.pointsEqual(ot.center,Q));return st.length===1\u0026\u0026this.pointsEqual(st[0].center,Q)?st[0]:void 0},X=O(M[0],b.edges[0].from_schematic_port_id),E=O(M.at(-1),b.edges.at(-1).to_schematic_port_id);if(!X?.facing_direction||!E?.facing_direction)return!1;if(o.some((Q)=\u003el(b,Q)\u0026\u0026Q!==X\u0026\u0026Q!==E))return!1;let I=(Q)=\u003e!this.pointsEqual(Q,X.center)\u0026\u0026!this.pointsEqual(Q,E.center)\u0026\u0026y(M).some(({from:k,to:st})=\u003eMath.abs(Math.hypot(Q.x-k.x,Q.y-k.y)+Math.hypot(Q.x-st.x,Q.y-st.y)-Math.hypot(st.x-k.x,st.y-k.y))\u003c0.000001);if(c.some((Q)=\u003eQ!==b\u0026\u0026Q.edges.some((k)=\u003eI(k.from)||I(k.to))))return!1;if(this.ctx.circuitJson.some((Q)=\u003eQ.type===\"schematic_net_label\"\u0026\u0026Q.schematic_sheet_id===n\u0026\u0026I(Q.anchor_position??Q.center)))return!1;let U=jc(m(X,!0),m(E,!0)).filter((Q,k,st)=\u003ek===0||!this.pointsEqual(Q,st[k-1])),q=this.countTurns(U),ct=this.countTurns(M);if(U.length\u003c2||q===void 0||ct===void 0||q\u003ect||u(U)\u003eu(M)+0.000001)return!1;if(!this.isPointInFacingDirection(U[0],U[1],X.facing_direction)||!this.isPointInFacingDirection(U.at(-1),U.at(-2),E.facing_direction))return!1;if(b===t){let Q=this.countTurns(jc(m(X,!1),m(E,!1)));if(q\u003e=ct||Q===void 0||q\u003e=Q)return!1;e.suggestedTurnCount=q}for(let Q of y(U)){if(x.some((ot)=\u003eYr(Q.from,Q.to,ot)))return!1;if(this.ctx.componentPlacements.some((ot)=\u003e{if(ot.schematicSheetId!==n)return!1;let Z=ot.schematicComponentId===i?f:Ut(ot.schX,ot.schY,ot.width,ot.height);return Yr(Q.from,Q.to,Ve(Z))}))return!1;let k=Ci(Q.from,Q.to);if(!k)continue;if([..._.flatMap((ot)=\u003eot.edges),...Y.flatMap((ot)=\u003ey(ot.points))].some((ot)=\u003e{if([X,E].some((N)=\u003eN.schematic_component_id!==i\u0026\u0026[Q.from,Q.to].some((tt)=\u003ethis.pointsEqual(tt,N.center))\u0026\u0026[ot.from,ot.to].some((tt)=\u003ethis.pointsEqual(tt,N.center)))\u0026\u0026this.getAxis(Q.from,Q.to)!==this.getAxis(ot.from,ot.to))return!1;let Z=Ci(ot.from,ot.to);return Z\u0026\u0026ki(k,Z)}))return!1}Y.push({schematicTraceId:b.schematic_trace_id,points:U})}return e.suggestedTraces=Y,!0}getTracePoints(t){let e=t.edges[0];if(!e)return[];let r=[e.from];for(let i of t.edges){let n=r.at(-1);if(!this.pointsEqual(n,i.from))return[];r.push(i.to)}return r}countTurns(t){let e=[];for(let[r,i]of t.slice(1).entries()){let n=t[r];if(this.pointsEqual(n,i))continue;let a=this.getAxis(n,i);if(!a)return;e.push(a)}return e.slice(1).filter((r,i)=\u003er!==e[i]).length}pointsEqual(t,e){let{EPSILON:r}=ne;return Math.abs(t.x-e.x)\u003c=r\u0026\u0026Math.abs(t.y-e.y)\u003c=r}getAxis(t,e){let r=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y),{EPSILON:n}=ne;if(r\u003c=n\u0026\u0026i\u003en)return\"vertical\";if(i\u003c=n\u0026\u0026r\u003en)return\"horizontal\";return}isPointInFacingDirection(t,e,r){let{EPSILON:i}=ne;switch(r){case\"left\":return e.x\u003ct.x-i;case\"right\":return e.x\u003et.x+i;case\"up\":return e.y\u003et.y+i;case\"down\":return e.y\u003ct.y-i}}findPortAtPoint(t,e,r){let{EPSILON:i}=ne;return t.find((n)=\u003en.schematic_sheet_id===r\u0026\u0026Math.abs(n.center.x-e.x)\u003c=i\u0026\u0026Math.abs(n.center.y-e.y)\u003c=i)}wouldOverlapAnotherComponent(t){let e=Ut(t.target.schX+t.deltaSchX,t.target.schY+t.deltaSchY,t.target.width,t.target.height);return this.ctx.componentPlacements.some((r)=\u003e{if(r===t.target)return!1;if(r.schematicSheetId!==t.target.schematicSheetId)return!1;return Boolean(Je(e,Ut(r.schX,r.schY,r.width,r.height)))})}makeIssue(t,e){let r=e.target.sourceComponentName||\"component\",i=this.getMoveDirection(e.deltaSchX,e.deltaSchY),n=Math.abs(e.deltaSchX||e.deltaSchY),a=e.target.schX+e.deltaSchX,o=e.target.schY+e.deltaSchY;return{lineItemType:\"TraceCanBeSimplifiedByMovingComponent\",schematicTraceId:t.schematic_trace_id,traceName:Un(this.ctx.circuitJson,t),targetComponent:e.target,deltaSchX:e.deltaSchX,deltaSchY:e.deltaSchY,newSchX:a,newSchY:o,currentTurnCount:e.currentTurnCount,suggestedTurnCount:e.suggestedTurnCount,suggestedTraces:e.suggestedTraces,message:`move ${r} ${i} by ${yr(n)} (to schX=${yr(a)}, schY=${yr(o)}) to reduce this trace from ${e.currentTurnCount} turns to ${e.suggestedTurnCount}`}}getMoveDirection(t,e){if(Math.abs(t)\u003ene.EPSILON)return t\u003e0?\"right\":\"left\";return e\u003e0?\"up\":\"down\"}static issueToString(t){let e=[];return S(e,\"traceName\",t.traceName),S(e,\"targetComponentName\",t.targetComponent.sourceComponentName),S(e,\"deltaSchX\",t.deltaSchX,{formatDelta:!0}),S(e,\"deltaSchY\",t.deltaSchY,{formatDelta:!0}),S(e,\"newSchX\",t.newSchX),S(e,\"newSchY\",t.newSchY),S(e,\"currentTurnCount\",t.currentTurnCount),S(e,\"suggestedTurnCount\",t.suggestedTurnCount),S(e,\"message\",t.message),`\u003cTraceCanBeSimplifiedByMovingComponent ${e.join(\" \")} /\u003e`}}function A0(t){let e=new Set,r=new Map;for(let a of t){if(a.type!==\"source_net\"\u0026\u0026a.type!==\"source_port\")continue;let o=a.type===\"source_net\"?a.source_net_id:a.source_port_id;if(a.type===\"source_net\"?a.is_power||a.is_ground||a.is_positive_voltage_source:a.provides_power||a.requires_power||a.provides_ground||a.requires_ground)e.add(o);let l=a.subcircuit_connectivity_map_key;if(l!==void 0){let s=r.get(l)??[];s.push(o),r.set(l,s)}}let i=Sn(t),n=Us([...Object.values(i.netMap),...r.values()]);for(let a of Object.values(n))if(a.some((o)=\u003ee.has(o)))for(let o of a)e.add(o);return e}class oe extends at{static EPSILON=0.01;ctx;out;powerOrGroundConnectionIds;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e,this.powerOrGroundConnectionIds=A0(t.circuitJson)}_step(){let t=this.ctx.circuitJson.filter((a)=\u003ea.type===\"schematic_port\"),e=new Map(t.map((a)=\u003e[a.schematic_port_id,a])),r=new Map;for(let a of t){if(!a.schematic_component_id)continue;let o=r.get(a.schematic_component_id)??[];o.push(a),r.set(a.schematic_component_id,o)}let i=new Map(this.ctx.componentPlacements.flatMap((a)=\u003ea.schematicComponentId?[[a.schematicComponentId,a]]:[])),n=new Map;for(let a of this.ctx.circuitJson.filter((o)=\u003eo.type===\"schematic_trace\")){let o=this.getTracePoints(a),c=this.countTurns(o);if(c===void 0||c\u003c2)continue;let l=this.getTraceEndpoints(a,o,t,e);if(!l)continue;for(let[s,p]of[l,[l[1],l[0]]]){let d=this.getFlipCandidate({trace:a,targetEndpoint:s,connectedEndpoint:p,currentTurnCount:c,portsByComponentId:r,placementsByComponentId:i});if(!d)continue;let m=d.targetPort.schematic_component_id,u=n.get(m);if(!u||this.isBetterCandidate(d,u))n.set(m,d)}}for(let a of n.values())this.out.push(this.makeIssue(a));this.solved=!0}getFlipCandidate({trace:t,targetEndpoint:e,connectedEndpoint:r,currentTurnCount:i,portsByComponentId:n,placementsByComponentId:a}){let o=e.port,c=r.port,l=o.schematic_component_id,s=c.schematic_component_id;if(!l||!s||l===s||o.schematic_sheet_id!==c.schematic_sheet_id)return;let p=n.get(l);if(p?.length!==2)return;if(p.some((b)=\u003eb.source_port_id\u0026\u0026this.powerOrGroundConnectionIds.has(b.source_port_id)))return;if((n.get(s)??[]).length\u003c=2)return;let m=p.find((b)=\u003eb.schematic_port_id!==o.schematic_port_id);if(!m||!this.areOppositePorts(o,m))return;let u=o.facing_direction,y=m.facing_direction;if(!u||!y)return;if(!this.traceLeavesPortInFacingDirection(e))return;let f=c.center;if(this.isPointInFacingDirection(o.center,f,u)||!this.isPointInFacingDirection(m.center,f,y)||!c.facing_direction||!this.isPointInFacingDirection(f,m.center,c.facing_direction))return;let _=this.getMinimumTurnCount(m.center,f,y);if(_\u003e=i)return;let x=a.get(l),Y=a.get(s);if(!x||!Y)return;return{trace:t,targetPort:o,targetPlacement:x,connectedPlacement:Y,suggestedFacingDirection:y,currentTurnCount:i,suggestedTurnCount:_,traceLength:this.getTraceLength(e.pointsFromEndpoint)}}getTraceEndpoints(t,e,r,i){let n=t.edges[0],a=t.edges.at(-1);if(!n||!a||e.length\u003c2)return;let o=n.from_schematic_port_id?i.get(n.from_schematic_port_id):this.findPortAtPoint(r,e[0],t.schematic_sheet_id),c=a.to_schematic_port_id?i.get(a.to_schematic_port_id):this.findPortAtPoint(r,e.at(-1),t.schematic_sheet_id);if(!o||!c)return;return[{port:o,pointsFromEndpoint:e},{port:c,pointsFromEndpoint:[...e].reverse()}]}getTracePoints(t){let e=t.edges[0];if(!e)return[];let r=[e.from];for(let i of t.edges){if(!this.pointsEqual(r.at(-1),i.from))return[];r.push(i.to)}return r}countTurns(t){let e=[];for(let[r,i]of t.slice(1).entries()){let n=t[r];if(this.pointsEqual(n,i))continue;let a=this.getAxis(n,i);if(!a)return;if(e.at(-1)!==a)e.push(a)}return Math.max(0,e.length-1)}traceLeavesPortInFacingDirection(t){let e=t.pointsFromEndpoint.find((r)=\u003e!this.pointsEqual(r,t.port.center));return Boolean(e\u0026\u0026t.port.facing_direction\u0026\u0026this.isPointInFacingDirection(t.port.center,e,t.port.facing_direction))}areOppositePorts(t,e){let r=(t.facing_direction===\"left\"\u0026\u0026e.facing_direction===\"right\"||t.facing_direction===\"right\"\u0026\u0026e.facing_direction===\"left\")\u0026\u0026Math.abs(t.center.y-e.center.y)\u003c=oe.EPSILON,i=(t.facing_direction===\"up\"\u0026\u0026e.facing_direction===\"down\"||t.facing_direction===\"down\"\u0026\u0026e.facing_direction===\"up\")\u0026\u0026Math.abs(t.center.x-e.center.x)\u003c=oe.EPSILON;return r||i}getMinimumTurnCount(t,e,r){return(r===\"left\"||r===\"right\"?Math.abs(t.y-e.y)\u003c=oe.EPSILON:Math.abs(t.x-e.x)\u003c=oe.EPSILON)?0:1}isPointInFacingDirection(t,e,r){let{EPSILON:i}=oe;switch(r){case\"left\":return e.x\u003ct.x-i;case\"right\":return e.x\u003et.x+i;case\"up\":return e.y\u003et.y+i;case\"down\":return e.y\u003ct.y-i}}getAxis(t,e){let r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),{EPSILON:n}=oe;if(r\u003c=n\u0026\u0026i\u003en)return\"vertical\";if(i\u003c=n\u0026\u0026r\u003en)return\"horizontal\";return}pointsEqual(t,e){let{EPSILON:r}=oe;return Math.abs(t.x-e.x)\u003c=r\u0026\u0026Math.abs(t.y-e.y)\u003c=r}findPortAtPoint(t,e,r){return t.find((i)=\u003ei.schematic_sheet_id===r\u0026\u0026this.pointsEqual(i.center,e))}getTraceLength(t){return t.slice(1).reduce((e,r,i)=\u003e{let n=t[i];return e+Math.abs(r.x-n.x)+Math.abs(r.y-n.y)},0)}isBetterCandidate(t,e){let r=t.currentTurnCount-t.suggestedTurnCount,i=e.currentTurnCount-e.suggestedTurnCount;return r\u003ei||r===i\u0026\u0026t.traceLength\u003ee.traceLength}makeIssue(t){let e=t.targetPlacement.sourceComponentName||\"component\",r=t.connectedPlacement.sourceComponentName||\"component\",i=t.targetPort.pin_number?`pin${t.targetPort.pin_number}`:t.targetPort.display_pin_label;return{lineItemType:\"TwoPinComponentCouldBeFlipped\",schematicTraceId:t.trace.schematic_trace_id,traceName:Un(this.ctx.circuitJson,t.trace),targetComponent:t.targetPlacement,connectedComponent:t.connectedPlacement,targetPin:i,currentFacingDirection:t.targetPort.facing_direction,suggestedFacingDirection:t.suggestedFacingDirection,deltaSchRotation:180,currentTurnCount:t.currentTurnCount,suggestedTurnCount:t.suggestedTurnCount,message:`rotate ${e} by 180° so ${i??\"its connected pin\"} faces ${r} and reduce this trace from ${t.currentTurnCount} turns to ${t.suggestedTurnCount}`}}static issueToString(t){let e=[];return S(e,\"traceName\",t.traceName),S(e,\"targetComponentName\",t.targetComponent.sourceComponentName),S(e,\"connectedComponentName\",t.connectedComponent.sourceComponentName),S(e,\"targetPin\",t.targetPin),S(e,\"currentFacingDirection\",t.currentFacingDirection),S(e,\"suggestedFacingDirection\",t.suggestedFacingDirection),S(e,\"deltaSchRotation\",t.deltaSchRotation),S(e,\"currentTurnCount\",t.currentTurnCount),S(e,\"suggestedTurnCount\",t.suggestedTurnCount),S(e,\"message\",t.message),`\u003cTwoPinComponentCouldBeFlipped ${e.join(\" \")} /\u003e`}}class Gr extends at{params;VERBOSE_NET_LABEL_MESSAGE=\"Create trace with schDisplayLabel\";netLabels;tokenToInvolvedPin;schematicSheetNameById;currentIndex=0;seen=new Set;constructor(t){super();this.params=t;let{circuitJson:e}=t.ctx;this.netLabels=e.filter((r)=\u003ethis.isSchematicNetLabel(r)),this.tokenToInvolvedPin=this.buildTokenToInvolvedPinMap(e),this.schematicSheetNameById=Ur(e),this.solved=this.netLabels.length===0}_step(){let t=this.netLabels[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex\u003e=this.netLabels.length;let e=`${t.schematic_sheet_id??\"\"}:${t.text}`;if(!t.text.includes(\"/\")||this.seen.has(e))return;this.seen.add(e);let r;if(t.schematic_sheet_id)r=this.schematicSheetNameById.get(t.schematic_sheet_id);let i={lineItemType:\"VerboseSchematicNetLabel\",schematicNetLabelId:t.schematic_net_label_id,sourceNetId:t.source_net_id,schematicSheetId:t.schematic_sheet_id,schematicSheetName:r,text:t.text,involvedPins:this.getInvolvedPins(t.text,this.tokenToInvolvedPin),schX:t.center.x,schY:t.center.y,message:this.VERBOSE_NET_LABEL_MESSAGE};this.params.issues.push(i)}static issueToString(t){let e=[];return S(e,\"message\",t.message),S(e,\"text\",t.text),S(e,\"involvedPins\",t.involvedPins.join(\",\")),S(e,\"schSheetName\",t.schematicSheetName),S(e,\"schX\",t.schX),S(e,\"schY\",t.schY),`\u003cVerboseSchematicNetLabel ${e.join(\" \")} /\u003e`}isSchematicNetLabel(t){return t.type===\"schematic_net_label\"}isSourcePort(t){return t.type===\"source_port\"}getSourceComponentWithName(t){if(t.type!==\"source_component\"||!(\"source_component_id\"in t)||!(\"name\"in t)||typeof t.source_component_id!==\"string\"||typeof t.name!==\"string\")return null;return{source_component_id:t.source_component_id,name:t.name}}getSourcePortNameCandidates(t){return[t.most_frequently_referenced_by_name,t.name,...t.port_hints??[],t.pin_number===void 0?void 0:String(t.pin_number)].filter((e)=\u003eBoolean(e))}getBestSourcePortName(t){return t.most_frequently_referenced_by_name??t.name??(t.pin_number===void 0?\"\":`pin${t.pin_number}`)}buildTokenToInvolvedPinMap(t){let e=new Map(t.flatMap((i)=\u003e{let n=this.getSourceComponentWithName(i);return n?[n]:[]}).map((i)=\u003e[i.source_component_id,i])),r=new Map;for(let i of t.filter((n)=\u003ethis.isSourcePort(n))){if(!i.source_component_id)continue;let n=e.get(i.source_component_id);if(!n?.name)continue;let a=`${n.name}.${this.getBestSourcePortName(i)}`;for(let o of this.getSourcePortNameCandidates(i))r.set(`${n.name}_${o}`,a)}return r}getInvolvedPins(t,e){let r=new Set;for(let i of t.split(\"/\")){let n=e.get(i);if(n)r.add(n)}return Array.from(r)}}class Qr extends at{params;texts;obstacles;sheetNames;index=0;constructor(t){super();this.params=t;let{ctx:e}=t;this.sheetNames=Ur(e.circuitJson);let r=new Set(e.circuitJson.flatMap((n)=\u003en.type===\"schematic_component\"\u0026\u0026n.is_box_with_pins===!1\u0026\u0026!n.symbol_name?[n.schematic_component_id]:[])),i=new Set;this.texts=e.circuitJson.flatMap((n)=\u003e{if(n.type!==\"schematic_text\")return[];if(n.schematic_component_id||n.schematic_symbol_id)return[];let a=Mi(n);if(!a.length)return[];let o=n.schematic_sheet_id,c=JSON.stringify([o,n.text,n.position.x,n.position.y,n.font_size,n.anchor,n.rotation,n.color]);if(i.has(c))return[];return i.add(c),[{text:n,isTraceLabel:Boolean(\"source_trace_id\"in n\u0026\u0026n.source_trace_id),polygons:a,sheetId:o,object:{type:\"text\",id:n.schematic_text_id,text:n.text}}]}),this.obstacles=[...e.componentPlacements.flatMap((n)=\u003en.schematicComponentId\u0026\u0026!r.has(n.schematicComponentId)?[{object:{type:\"component\",id:n.schematicComponentId,componentName:n.sourceComponentName,schematicComponentId:n.schematicComponentId},polygons:[Ve(Ut(n.schX,n.schY,n.width,n.height))],sheetId:n.schematicSheetId}]:[]),...e.circuitJson.flatMap((n)=\u003en.type===\"schematic_trace\"?[{object:{type:\"trace\",id:n.schematic_trace_id},sheetId:n.schematic_sheet_id,segments:n.edges,polygons:n.edges.flatMap((a)=\u003e{let o=Ci(a.from,a.to);return o?[o]:[]})}]:[])],this.solved=this.texts.length===0}_step(){let t=this.texts[this.index],r=[...this.obstacles,...this.texts.slice(this.index+1)].filter((i)=\u003ethis.collides(t,i));if(r.length){let i=t.isTraceLabel?void 0:this.findClearPosition(t);for(let n of r){let a=n.object.componentName??n.object.text;this.params.issues.push({lineItemType:\"SchematicTextCollision\",schematicSheetId:t.sheetId,schematicSheetName:t.sheetId?this.sheetNames.get(t.sheetId):void 0,schematicTextId:t.text.schematic_text_id,text:t.text.text,collidingObject:n.object,textBounds:Qs(t.polygons),collidingObjectBounds:Qs(n.polygons),suggestedMove:i,message:`Text \"${t.text.text}\" overlaps ${n.object.type}${a?` ${a}`:\"\"}; ${t.isTraceLabel?\"adjust the owning trace's label placement or remove stale duplicates to leave the visible text area clear.\":\"reposition the text to leave its visible area clear.\"}`})}}this.index++,this.solved=this.index\u003e=this.texts.length}collides(t,e){if(t.sheetId!==e.sheetId)return!1;return t.polygons.some((r)=\u003ee.segments?e.segments.some((i)=\u003eYr(i.from,i.to,r)):e.polygons.some((i)=\u003eki(r,i)))}findClearPosition(t){let e=[...this.obstacles,...this.texts.filter((i)=\u003ei!==t)],r=Math.max(0.1,t.text.font_size/2);for(let i=r;i\u003c=Math.max(4,t.text.font_size*8);i+=r)for(let[n,a]of[[0,i],[0,-i],[-i,0],[i,0]]){let o=Math.round((t.text.position.x+n)*1000)/1000,c=Math.round((t.text.position.y+a)*1000)/1000,l={...t,polygons:Mi({...t.text,position:{x:o,y:c}})};if(e.every((s)=\u003e!this.collides(l,s)))return{newSchX:o,newSchY:c}}return}static issueToString(t){let e=[];return S(e,\"text\",t.text),S(e,\"collidingObjectType\",t.collidingObject.type),S(e,\"collidingText\",t.collidingObject.text),S(e,\"newSchX\",t.suggestedMove?.newSchX),S(e,\"newSchY\",t.suggestedMove?.newSchY),S(e,\"message\",t.message),`\u003cSchematicTextCollision ${e.join(\" \")} /\u003e`}}class lr extends at{params;static MIN_DISTANCE=6;networks;index=0;constructor(t){super();this.params=t;this.networks=this.findNetworks(t.ctx),this.solved=this.networks.length===0}_step(){let t=this.networks[this.index],e=t.members.slice(0,2),r=Math.max(lr.MIN_DISTANCE,...e.map((n)=\u003e3*Math.max(n.width,n.height))),i=e.map((n)=\u003eMath.hypot(Math.max(0,Math.abs(n.schX-t.pinPosition.x)-n.width/2),Math.max(0,Math.abs(n.schY-t.pinPosition.y)-n.height/2)));if(i.some((n)=\u003en\u003er)){let n=t.host.sourceComponentName||\"component\",a=B0(t.pin),o=e.map((c)=\u003ec.sourceComponentName||\"component\").join(\", \");this.params.issues.push({lineItemType:\"ResetNetworkNotGrouped\",hostSchematicBox:t.host,resetSourcePortId:t.pin.source_port_id,resetPinName:a,supportNetworkComponents:t.members,maxDistanceFromResetPin:Math.round(Math.max(...i)*100)/100,maxRecommendedDistance:r,message:`Group ${o} near ${n}.${a} so the reset pull-up and capacitor can be read together. Preserve all net connections; associated test points may remain in a debug area.`})}this.index++,this.solved=this.index\u003e=this.networks.length}findNetworks(t){let e=_n(t.circuitJson),r=t.circuitJson.filter((y)=\u003ey.type===\"source_component\"),i=new Map(r.map((y)=\u003e[y.source_component_id,y])),n=t.circuitJson.filter((y)=\u003ey.type===\"source_port\"),a=new Map,o=new Map,c=new Set,l=new Set;for(let y of n){if(!y.source_component_id)continue;let f=a.get(y.source_component_id)??[];f.push(y),a.set(y.source_component_id,f);let _=e(y.source_port_id),x=o.get(_)??[];if(x.push(y),o.set(_,x),y.provides_power||y.requires_power)c.add(_);if(y.provides_ground||y.requires_ground)l.add(_)}for(let y of t.circuitJson){if(y.type!==\"source_net\")continue;if(y.is_power||y.is_positive_voltage_source)c.add(e(y.source_net_id));if(y.is_ground)l.add(e(y.source_net_id))}let s=new Map(t.componentPlacements.flatMap((y)=\u003ey.sourceComponentId?[[y.sourceComponentId,y]]:[])),p=t.circuitJson.filter((y)=\u003ey.type===\"schematic_port\"),d=new Map(t.circuitJson.filter((y)=\u003ey.type===\"schematic_component\").map((y)=\u003e[y.schematic_component_id,y])),m=[],u=new Set;for(let y of n){if(!y.source_component_id||!B0(y)||y.do_not_connect)continue;if(i.get(y.source_component_id)?.ftype!==\"simple_chip\")continue;let f=e(y.source_port_id);if(u.has(f)||c.has(f)||l.has(f))continue;u.add(f);let _=o.get(f)??[];if(new Set(_.filter((q)=\u003eq.source_component_id\u0026\u0026i.get(q.source_component_id)?.ftype===\"simple_chip\").map((q)=\u003eq.source_component_id)).size!==1)continue;let Y=s.get(y.source_component_id),b=p.find((q)=\u003eq.source_port_id===y.source_port_id\u0026\u0026q.schematic_component_id===Y?.schematicComponentId);if(!Y||!b||b.schematic_sheet_id!==Y.schematicSheetId)continue;let M=[],O=[],X=[],E=!1;for(let q of new Set(_.map((ct)=\u003ect.source_component_id))){if(!q||q===y.source_component_id)continue;let ct=i.get(q)?.ftype,Q=a.get(q)??[],k=s.get(q);if(ct===\"simple_connector\"||ct===\"simple_pin_header\")continue;if(!k){E=!0;break}if(ct===\"simple_test_point\"\u0026\u0026Q.length===1){X.push(k);continue}if(Q.length!==2){E=!0;break}let st=Q.find((Z)=\u003ee(Z.source_port_id)!==f);if(!st){E=!0;break}let ot=e(st.source_port_id);if(ct===\"simple_resistor\"\u0026\u0026c.has(ot)\u0026\u0026!l.has(ot))M.push(k);else if(ct===\"simple_capacitor\"\u0026\u0026l.has(ot)\u0026\u0026!c.has(ot))O.push(k);else{E=!0;break}}if(E||M.length!==1||O.length!==1)continue;let I=[...M,...O,...X],U=Y.schematicComponentId?d.get(Y.schematicComponentId)?.schematic_group_id:void 0;if(I.some((q)=\u003e{let ct=q.schematicComponentId?d.get(q.schematicComponentId)?.schematic_group_id:void 0;return q.schematicSheetId!==Y.schematicSheetId||q.subcircuitId!==Y.subcircuitId||ct!==U}))continue;m.push({host:Y,pin:y,pinPosition:b.center,members:I})}return m}static issueToString(t){let e=[];return S(e,\"hostComponentName\",t.hostSchematicBox.sourceComponentName),S(e,\"resetPin\",t.resetPinName),S(e,\"supportNetworkComponents\",t.supportNetworkComponents.map((r)=\u003er.sourceComponentName||\"component\").join(\",\")),S(e,\"maxDistanceFromResetPin\",t.maxDistanceFromResetPin),S(e,\"maxRecommendedDistance\",t.maxRecommendedDistance),S(e,\"message\",t.message),`\u003cResetNetworkNotGrouped ${e.join(\" \")} /\u003e`}}var B0=(t)=\u003e[t.name,...t.port_hints??[]].find((e)=\u003e/^N?(RESET|RST)(N|B)?$/.test(e.toUpperCase().replace(/[_\\-!~#/]/g,\"\")));var G9={RailPathTooSpreadOut:[gr],CapacitorSeparatedFromChipPins:[xr],PiFilterComponentsNotGrouped:[br],MosfetGateNetworkNotGrouped:[vr],FlybackDiodeSeparatedFromRelayCoil:[Sr],ComponentOverlap:[tr],SchematicBoxHasALotOfSurroundingWhitespace:[],CapacitorSymbolHorizontal:[re,le],VerboseSchematicNetLabel:[Gr],PinHeaderSchematicBoxTooWide:[er],GenericSchematicBoxTooWide:[er],SchematicBoxInnerLabelCollision:[Lr],SchematicPinPaddingToEdgeTooLarge:[Tr],DiodeResistorNotAligned:[he],ParallelDiodeResistorNotAligned:[fr],ComponentPinsWouldAlignWithVerticalShift:[je],TraceCanBeSimplifiedByMovingComponent:[ne],CrystalNotCenteredOverLoadCapacitors:[$e],ComponentNetLabelCollision:[Oe],ComponentBoxNetLabelCollision:[Oe],NetLabelCollision:[Oe],FeedbackNetworkNotCompact:[qe],PullResistorOnWrongSide:[Xe,Dn],SchematicTextCollision:[Qr],ResetNetworkNotGrouped:[lr],TwoPinComponentCouldBeFlipped:[oe],TwoPinComponentShouldBeVertical:[le],TwoPinComponentHasInvertedRails:[le],DecouplingCapacitorsNotCloseTogether:[Se],ConnectorPositionCausesTraceDetours:[Pr],LowSideTransistorNotAlignedWithLoad:[Ir],UsbSeriesResistorsNotAligned:[Mr],CurrentSenseShuntSeparatedFromInputs:[wr],VoltageDividerSupplyResistorBelowGroundResistor:[Ar],RegulatorCapacitorsOnWrongSides:[Br]};class $c extends bm{ctx;issues=[];pipelineDef=[Mt(\"ParallelDiodeResistorPlacementSolver\",fr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SchematicTextClearanceSolver\",Qr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"ResetNetworkGroupingSolver\",lr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SchematicBoxOverlapSolver\",tr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"CapacitorOrientationSolver\",re,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"VerboseNetLabelSolver\",Gr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SchematicBoxTooWideSolver\",er,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SchematicPinPaddingToEdgeSolver\",Tr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SchematicBoxInnerLabelCollisionSolver\",Lr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"DiodeResistorAlignmentSolver\",he,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"ComponentPinAlignmentSolver\",je,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"TraceSimplificationSolver\",ne,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"CrystalLoadCapacitorPlacementSolver\",$e,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"TwoPinComponentOrientationSolver\",oe,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"FeedbackNetworkPlacementSolver\",qe,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"TwoPinComponentRailOrientationSolver\",le,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"PullResistorPlacementSolver\",Xe,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"SwitchPullResistorPlacementSolver\",Dn,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"ComponentNetLabelCollisionSolver\",Oe,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"DecouplingCapacitorGroupingSolver\",Se,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"ConnectorPlacementSolver\",Pr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"LowSideTransistorPlacementSolver\",Ir,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"UsbSeriesResistorPlacementSolver\",Mr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"RegulatorInputOutputCapacitorPlacementSolver\",Br,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"VoltageDividerPlacementSolver\",Ar,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"CurrentSenseShuntPlacementSolver\",wr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"RelayFlybackDiodePlacementSolver\",Sr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"PiFilterPlacementSolver\",br,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"MosfetGateNetworkPlacementSolver\",vr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"ChipPinPairCapacitorPlacementSolver\",xr,(t)=\u003e[{ctx:t.ctx,issues:t.issues}]),Mt(\"RailPathVisibilitySolver\",gr,(t)=\u003e[{ctx:t.ctx,issues:t.issues,maxSpan:t.railPathVisibility?.maxSpan,maxLength:t.railPathVisibility?.maxPathLength}])];selectedIssueTypes;railPathVisibility;constructor(t,e={}){super(t);if(this.railPathVisibility=e.railPathVisibility,e.issueTypes!==void 0){this.selectedIssueTypes=new Set(e.issueTypes);let r=new Set(e.issueTypes.flatMap((i)=\u003eG9[i]));this.pipelineDef=this.pipelineDef.filter((i)=\u003er.has(i.solverClass))}}_setup(){this.ctx=S0(this.inputProblem)}getOutput(){let t=new Set(this.issues.flatMap((e)=\u003ee.lineItemType===\"TwoPinComponentShouldBeVertical\"\u0026\u0026e.schematicBox.schematicComponentId?[e.schematicBox.schematicComponentId]:[]));return{issues:this.issues.filter((e)=\u003ee.lineItemType!==\"CapacitorSymbolHorizontal\"||!t.has(e.schematicBox.schematicComponentId??\"\")).filter((e)=\u003ethis.selectedIssueTypes===void 0||this.selectedIssueTypes.has(e.lineItemType)),componentPlacements:this.ctx.componentPlacements}}}var Gn=({issues:t,componentPlacements:e,circuitJson:r})=\u003e{let i=new Set,n=new Map(e.flatMap((l)=\u003el.schematicComponentId?[[l.schematicComponentId,l]]:[])),a=new Map;for(let l of e){if(!l.sourceComponentName)continue;let s=a.get(l.sourceComponentName);if(s)s.push(l);else a.set(l.sourceComponentName,[l])}let o=(l)=\u003e{if(!l)return;let s=l.schematicComponentId?n.get(l.schematicComponentId):e.find((p)=\u003ep.sourceComponentId===l.sourceComponentId\u0026\u0026p.schX===l.schX\u0026\u0026p.schY===l.schY);if(s)i.add(s)},c=(l,s)=\u003e{if(!l)return;for(let p of a.get(l)??[])if(s===void 0||p.schematicSheetId===s)i.add(p)};for(let l of t)switch(l.lineItemType){case\"CapacitorSeparatedFromChipPins\":o(l.hostSchematicBox),o(l.capacitorSchematicBox);break;case\"PiFilterComponentsNotGrouped\":o(l.inductorSchematicBox),o(l.firstCapacitorSchematicBox),o(l.secondCapacitorSchematicBox);break;case\"MosfetGateNetworkNotGrouped\":o(l.mosfetSchematicBox),o(l.seriesGateResistorSchematicBox),o(l.gateSourceResistorSchematicBox);break;case\"FlybackDiodeSeparatedFromRelayCoil\":o(l.relaySchematicBox),o(l.diodeSchematicBox);break;case\"CurrentSenseShuntSeparatedFromInputs\":o(l.amplifierSchematicBox),o(l.shuntSchematicBox);break;case\"VoltageDividerSupplyResistorBelowGroundResistor\":o(l.supplyResistorSchematicBox),o(l.groundResistorSchematicBox);break;case\"RegulatorCapacitorsOnWrongSides\":o(l.regulatorSchematicBox),o(l.inputCapacitorSchematicBox),o(l.outputCapacitorSchematicBox);break;case\"UsbSeriesResistorsNotAligned\":o(l.positiveResistorSchematicBox),o(l.negativeResistorSchematicBox);break;case\"LowSideTransistorNotAlignedWithLoad\":o(l.transistorSchematicBox),o(l.loadSchematicBox),o(l.baseResistorSchematicBox),o(l.clampDiodeSchematicBox);break;case\"DecouplingCapacitorsNotCloseTogether\":for(let s of l.capacitorSchematicBoxes)o(s);break;case\"ConnectorPositionCausesTraceDetours\":o(l.connectorSchematicBox);for(let s of l.connectedComponents)o(s);break;case\"ResetNetworkNotGrouped\":o(l.hostSchematicBox);for(let s of l.supportNetworkComponents)o(s);break;case\"SchematicTextCollision\":if(l.collidingObject.schematicComponentId)o(n.get(l.collidingObject.schematicComponentId));if(l.collidingObject.type===\"trace\")for(let s of F0({schematicTraceId:l.collidingObject.id,circuitJson:r,placementByComponentId:n}))o(s);break;case\"ComponentOverlap\":o(l.firstComponent),o(l.secondComponent);break;case\"SchematicBoxHasALotOfSurroundingWhitespace\":case\"CapacitorSymbolHorizontal\":case\"PinHeaderSchematicBoxTooWide\":case\"GenericSchematicBoxTooWide\":case\"SchematicBoxInnerLabelCollision\":case\"SchematicPinPaddingToEdgeTooLarge\":o(l.schematicBox);break;case\"VerboseSchematicNetLabel\":for(let s of l.involvedPins)c(Q9(s),l.schematicSheetId);break;case\"ParallelDiodeResistorNotAligned\":case\"DiodeResistorNotAligned\":o(l.diodeSchematicBox),o(l.resistorSchematicBox);break;case\"ComponentPinsWouldAlignWithVerticalShift\":o(l.firstComponent),o(l.secondComponent),o(l.targetComponent);break;case\"TraceCanBeSimplifiedByMovingComponent\":o(l.targetComponent);for(let s of F0({schematicTraceId:l.schematicTraceId,circuitJson:r,placementByComponentId:n}))i.add(s);break;case\"CrystalNotCenteredOverLoadCapacitors\":o(l.crystalSchematicBox),o(l.firstLoadCapacitorSchematicBox),o(l.secondLoadCapacitorSchematicBox);break;case\"TwoPinComponentCouldBeFlipped\":o(l.targetComponent),o(l.connectedComponent);break;case\"FeedbackNetworkNotCompact\":o(l.amplifierSchematicBox);for(let s of l.feedbackComponents)o(s);break;case\"TwoPinComponentShouldBeVertical\":case\"TwoPinComponentHasInvertedRails\":o(l.schematicBox);break;case\"RailPathTooSpreadOut\":o(l.hostSchematicBox);for(let s of l.supportSchematicBoxes)o(s);break;case\"PullResistorOnWrongSide\":o(l.resistorSchematicBox),o(l.hostSchematicBox);break;case\"ComponentNetLabelCollision\":o(l.firstComponent),o(l.secondComponent);break;case\"ComponentBoxNetLabelCollision\":o(l.boxComponent),o(l.labelComponent);break;case\"NetLabelCollision\":for(let s of l.pairs)c(s.comp1Name,l.schematicSheetId),c(s.comp2Name,l.schematicSheetId);for(let s of l.moves)c(s.componentName,l.schematicSheetId);break}return e.filter((l)=\u003ei.has(l))},pr=(t)=\u003e{if(\"schematicSheetId\"in t||\"schematicSheetName\"in t){let e=\"schematicSheetId\"in t\u0026\u0026typeof t.schematicSheetId===\"string\"?t.schematicSheetId:void 0,r=\"schematicSheetName\"in t\u0026\u0026typeof t.schematicSheetName===\"string\"?t.schematicSheetName:void 0;if(e||r)return{schematicSheetId:e,schematicSheetName:r}}for(let e of Object.values(t).flat())if(H9(e))return{schematicSheetId:e.schematicSheetId,schematicSheetName:e.schematicSheetName};return{}},Q9=(t)=\u003e{let e=t.lastIndexOf(\".\");return e===-1?t:t.slice(0,e)},H9=(t)=\u003eBoolean(t\u0026\u0026typeof t===\"object\"\u0026\u0026\"positionAnchor\"in t\u0026\u0026t.positionAnchor===\"center\"\u0026\u0026\"schX\"in t\u0026\u0026\"schY\"in t\u0026\u0026\"width\"in t\u0026\u0026\"height\"in t),F0=({schematicTraceId:t,circuitJson:e,placementByComponentId:r})=\u003e{let i=e.find((s)=\u003es.type===\"schematic_trace\"\u0026\u0026s.schematic_trace_id===t),n=i?.edges[0],a=i?.edges.at(-1);if(!i||!n||!a)return[];let o=e.filter((s)=\u003es.type===\"schematic_port\"),c=new Map(o.map((s)=\u003e[s.schematic_port_id,s]));return[n.from_schematic_port_id?c.get(n.from_schematic_port_id):P0(o,n.from,i.schematic_sheet_id),a.to_schematic_port_id?c.get(a.to_schematic_port_id):P0(o,a.to,i.schematic_sheet_id)].flatMap((s)=\u003e{let p=s?.schematic_component_id?r.get(s.schematic_component_id):void 0;return p?[p]:[]})},P0=(t,e,r)=\u003et.find((i)=\u003ei.schematic_sheet_id===r\u0026\u0026Math.abs(i.center.x-e.x)\u003c=0.01\u0026\u0026Math.abs(i.center.y-e.y)\u003c=0.01);class Xc{lineItems;groupBySchematicSheet;constructor(t,e=!1){this.lineItems=t;this.groupBySchematicSheet=e}getLineItems(){return this.lineItems}getIssues(t={}){return this.lineItems.flatMap((e)=\u003ee.lineItemType===\"SchematicPlacementIssues\"?e.issues:[]).filter((e)=\u003e(t.issueTypes===void 0||t.issueTypes.includes(e.lineItemType))\u0026\u0026(t.schematicSheetId===void 0||(pr(e).schematicSheetId??\"\")===t.schematicSheetId))}getIssueCounts(t={}){let e={FlybackDiodeSeparatedFromRelayCoil:0,ComponentOverlap:0,SchematicBoxHasALotOfSurroundingWhitespace:0,CapacitorSymbolHorizontal:0,VerboseSchematicNetLabel:0,PinHeaderSchematicBoxTooWide:0,GenericSchematicBoxTooWide:0,SchematicBoxInnerLabelCollision:0,SchematicPinPaddingToEdgeTooLarge:0,DiodeResistorNotAligned:0,ParallelDiodeResistorNotAligned:0,ComponentPinsWouldAlignWithVerticalShift:0,TraceCanBeSimplifiedByMovingComponent:0,CrystalNotCenteredOverLoadCapacitors:0,ComponentNetLabelCollision:0,ComponentBoxNetLabelCollision:0,NetLabelCollision:0,FeedbackNetworkNotCompact:0,PullResistorOnWrongSide:0,SchematicTextCollision:0,ResetNetworkNotGrouped:0,TwoPinComponentCouldBeFlipped:0,TwoPinComponentShouldBeVertical:0,TwoPinComponentHasInvertedRails:0,DecouplingCapacitorsNotCloseTogether:0,ConnectorPositionCausesTraceDetours:0,LowSideTransistorNotAlignedWithLoad:0,UsbSeriesResistorsNotAligned:0,RegulatorCapacitorsOnWrongSides:0,VoltageDividerSupplyResistorBelowGroundResistor:0,CurrentSenseShuntSeparatedFromInputs:0,PiFilterComponentsNotGrouped:0,MosfetGateNetworkNotGrouped:0,CapacitorSeparatedFromChipPins:0,RailPathTooSpreadOut:0};for(let r of this.getIssues(t))e[r.lineItemType]++;return e}getString(){return this.toString()}schematicBoxPlacementsToString(t){let e=[];return S(e,\"componentName\",t.sourceComponentName),S(e,\"positionAnchor\",t.positionAnchor),S(e,\"schX\",t.schX),S(e,\"schY\",t.schY),S(e,\"width\",t.width),S(e,\"height\",t.height),`\u003cSchematicBoxPlacement ${e.join(\" \")} /\u003e`}schematicIssuesToString(t){switch(t.lineItemType){case\"CapacitorSeparatedFromChipPins\":return xr.issueToString(t);case\"PiFilterComponentsNotGrouped\":return br.issueToString(t);case\"MosfetGateNetworkNotGrouped\":return vr.issueToString(t);case\"CurrentSenseShuntSeparatedFromInputs\":return wr.issueToString(t);case\"ComponentOverlap\":return tr.issueToString(t);case\"CapacitorSymbolHorizontal\":return re.issueToString(t);case\"DecouplingCapacitorsNotCloseTogether\":return Se.issueToString(t);case\"VerboseSchematicNetLabel\":return Gr.issueToString(t);case\"PinHeaderSchematicBoxTooWide\":case\"GenericSchematicBoxTooWide\":return er.issueToString(t);case\"SchematicBoxInnerLabelCollision\":return Lr.issueToString(t);case\"SchematicPinPaddingToEdgeTooLarge\":return Tr.issueToString(t);case\"ParallelDiodeResistorNotAligned\":return fr.issueToString(t);case\"DiodeResistorNotAligned\":return he.issueToString(t);case\"ComponentPinsWouldAlignWithVerticalShift\":return je.issueToString(t);case\"TraceCanBeSimplifiedByMovingComponent\":return ne.issueToString(t);case\"CrystalNotCenteredOverLoadCapacitors\":return $e.issueToString(t);case\"TwoPinComponentCouldBeFlipped\":return oe.issueToString(t);case\"FeedbackNetworkNotCompact\":return qe.issueToString(t);case\"TwoPinComponentShouldBeVertical\":case\"TwoPinComponentHasInvertedRails\":return le.issueToString(t);case\"RailPathTooSpreadOut\":return gr.issueToString(t);case\"PullResistorOnWrongSide\":return Xe.issueToString(t);case\"NetLabelCollision\":return Oe.netLabelCollisionToString(t);case\"SchematicTextCollision\":return Qr.issueToString(t);case\"ResetNetworkNotGrouped\":return lr.issueToString(t);case\"ConnectorPositionCausesTraceDetours\":return Pr.issueToString(t);case\"LowSideTransistorNotAlignedWithLoad\":return Ir.issueToString(t);case\"FlybackDiodeSeparatedFromRelayCoil\":return Sr.issueToString(t);case\"VoltageDividerSupplyResistorBelowGroundResistor\":return Ar.issueToString(t);case\"RegulatorCapacitorsOnWrongSides\":return Br.issueToString(t);case\"UsbSeriesResistorsNotAligned\":return Mr.issueToString(t);default:return\"\"}}toString(){let t=this.lineItems.filter((n)=\u003en.lineItemType===\"SchematicBoxPlacement\"),e=this.lineItems.flatMap((n)=\u003en.lineItemType===\"SchematicPlacementIssues\"?n.issues:[]);if(e.length===0)return\"\";if(!this.groupBySchematicSheet)return this.issueContextToLines(t,e).join(`\n`);let r=new Map,i=(n)=\u003e{let a=n.schematicSheetId??n.schematicSheetName??\"__default__\",o=r.get(a);if(o)return o;let c={...n,placements:[],issues:[]};return r.set(a,c),c};for(let n of e)i(pr(n)).issues.push(n);for(let n of t)i({schematicSheetId:n.schematicSheetId,schematicSheetName:n.schematicSheetName}).placements.push(n);return[...r.values()].flatMap((n)=\u003e{let a=[];return S(a,\"name\",n.schematicSheetName),S(a,\"id\",n.schematicSheetId),[`\u003cSchematicSheet${a.length\u003e0?` ${a.join(\" \")}`:\"\"}\u003e`,...this.issueContextToLines(n.placements,n.issues),\"\u003c/SchematicSheet\u003e\"]}).join(`\n`)}issueContextToLines(t,e){return[...t.length\u003e0?[\"\u003cSchematicBoxPositions\u003e\",...t.map(this.schematicBoxPlacementsToString),\"\u003c/SchematicBoxPositions\u003e\"]:[],\"\u003cSchematicPlacementIssues\u003e\",...e.map(this.schematicIssuesToString),\"\u003c/SchematicPlacementIssues\u003e\"]}}var Vc=(t,e={})=\u003e{let r=new $c(t,e);r.solve();let{issues:i,componentPlacements:n}=r.getOutput(),o=[...Gn({issues:i,componentPlacements:n,circuitJson:t}),...i.length\u003e0?[{lineItemType:\"SchematicPlacementIssues\",issues:i}]:[]],c=new Set(t.flatMap((l)=\u003e(\"schematic_sheet_id\"in l)\u0026\u0026typeof l.schematic_sheet_id===\"string\"?[l.schematic_sheet_id]:[]));return new Xc(o,c.size\u003e1)};function Z9(t){let e=t.match(/\u003csvg([^\u003e]*)\u003e/);if(!e)throw Error(\"Invalid SVG string: No \u003csvg\u003e tag found\");let r={},i={},n=e[1]??\"\",a=/([A-Za-z_:][A-Za-z0-9_.:-]*)=(?:\"([^\"]*)\"|'([^']*)')/g,o;while((o=a.exec(n))!==null){let _=o[1],x=o[2]??o[3];if(!_||x===void 0)continue;if(_===\"xmlns\"||_.startsWith(\"xmlns:\"))i[_]=x;r[_]=x}let c=0,l=0,s,p,d,m,u;if(r.viewBox){s=r.viewBox;let _=s.trim().split(/[\\s,]+/).map((x)=\u003eNumber.parseFloat(x));if(Number.isFinite(_[0]))p=_[0];if(Number.isFinite(_[1]))d=_[1];if(Number.isFinite(_[2]))m=_[2];if(Number.isFinite(_[3]))u=_[3];if(!r.width\u0026\u0026Number.isFinite(m))c=m;if(!r.height\u0026\u0026Number.isFinite(u))l=u}if(r.width){let _=Number.parseFloat(r.width);if(Number.isFinite(_))c=_}if(r.height){let _=Number.parseFloat(r.height);if(Number.isFinite(_))l=_}if(!Number.isFinite(c))c=0;if(!Number.isFinite(l))l=0;let f=t.match(/\u003csvg[^\u003e]*\u003e([\\s\\S]*)\u003c\\/svg\u003e/)?.[1]?.trim()??\"\";return{width:c,height:l,viewBox:s,viewBoxMinX:p,viewBoxMinY:d,viewBoxWidth:m,viewBoxHeight:u,content:f,attributes:r,xmlnsAttributes:i}}function K9(t,e,r){let i=[];if(i.push(`translate(${e}, ${r})`),t.viewBoxMinX!==void 0\u0026\u0026t.viewBoxMinY!==void 0\u0026\u0026t.viewBoxWidth\u0026\u0026t.viewBoxHeight){let{viewBoxMinX:a,viewBoxMinY:o}=t,c=t.width||t.viewBoxWidth,l=t.height||t.viewBoxHeight,s=c/t.viewBoxWidth,p=l/t.viewBoxHeight;i.push(`scale(${s}, ${p})`),i.push(`translate(${-a}, ${-o})`)}return i.join(\" \")}function J9(t,e){let r=new Map,i=/\\bid=\"([^\"]+)\"/g,n;while((n=i.exec(t))!==null){let o=n[1];if(!o)continue;let c=`${o}${e}`;r.set(o,c)}if(r.size===0)return t;let a=t.replace(i,(o,c)=\u003e`id=\"${r.get(c)||c}\"`);return a=a.replace(/url\\(#([^)]+)\\)/g,(o,c)=\u003er.has(c)?`url(#${r.get(c)})`:o),a=a.replace(/(xlink:href|href)=\"#([^\"]+)\"/g,(o,c,l)=\u003er.has(l)?`${c}=\"#${r.get(l)}\"`:o),a=a.replace(/style=\"([^\"]*)\"/g,(o,c)=\u003e`style=\"${c.replace(/url\\(#([^)]+)\\)/g,(s,p)=\u003er.has(p)?`url(#${r.get(p)})`:s)}\"`),a}function q9(t,e){if(t.length===0)return t;let r=0;for(let n of t){let a=Math.max(n.width,n.height);if(a\u003er)r=a}if(r===0)return t;let i=e??r;return t.map((n)=\u003e{let a=Math.max(n.width,n.height);if(a===0)return n;let o=i/a;return{...n,width:n.width*o,height:n.height*o}})}function t4(t){let e={};e.xmlns=\"http://www.w3.org/2000/svg\";for(let r of t)for(let[i,n]of Object.entries(r.xmlnsAttributes))if(!e[i])e[i]=n;return e}function e4(t){return Object.entries(t).map(([e,r])=\u003e`${e}=\"${r}\"`).join(\" \")}function I0(t,e={}){let r=e.gap??0;if(!Number.isFinite(r))r=0;let i=e.normalizeSize??!0;if(t.length===0)return'\u003csvg width=\"0\" height=\"0\" viewBox=\"0 0 0 0\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\u003c/svg\u003e';let n=t.map((u,y)=\u003e{try{return Z9(u)}catch(f){throw Error(`Failed to parse SVG at index ${y}: ${f.message}`)}}),a=i?q9(n,e.targetSize):n,o=Math.max(...a.map((u)=\u003eu.width)),c=a.reduce((u,y)=\u003eu+y.height,0)+r*(a.length-1),l=0,s=[];for(let u=0;u\u003ca.length;u++){let y=a[u];if(!y)continue;let f=(o-y.width)/2,_=u===0?y.content:J9(y.content,`__stack${u}`),x=K9(y,f,l);s.push(` \u003cg transform=\"${x}\"\u003e\n ${_}\n \u003c/g\u003e`),l+=y.height+r}let p=t4(a),d={width:o.toString(),height:c.toString(),viewBox:`0 0 ${o} ${c}`,...p,...e.rootAttributes||{}};return`\u003csvg ${e4(d)}\u003e\n${s.join(`\n`)}\n\u003c/svg\u003e`}var M0=\"T1RUTwAJAIAAAwAQQ0ZGIFhQSpcAAAcwAABJ3U9TLzJqmmVhAAABAAAAAGBjbWFwFN0WswAABEwAAALEaGVhZC1P1HwAAACcAAAANmhoZWEDrgI1AAAA1AAAACRobXR44xAAAAAAURAAAAFQbWF4cABUUAAAAAD4AAAABm5hbWUZQ94BAAABYAAAAutwb3N0AAMAAAAABxAAAAAgAAEAAAABAADb+Z65Xw889QADA+gAAAAA5e9IsgAAAADl70iy/9P/PwKHAvkAAAADAAIAAAAAAAAAAQAAA6z/LAAAArQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAFQAAFAAAFQAAAADArQB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAABYWFhYAEAAIQB6A6z/LAAAAvkAwQAAAAEAAAAAAiwC1wAAAAAAAAAAACIBngABAAAAAAAAAAEAWQABAAAAAAABABEAAAABAAAAAAACAAcAMwABAAAAAAADABsA/AABAAAAAAAEABkASAABAAAAAAAFAAsA2wABAAAAAAAGABgAkwABAAAAAAAHAAEAWQABAAAAAAAIAAEAWQABAAAAAAAJAAEAWQABAAAAAAAKAAEAWQABAAAAAAALAAEAWQABAAAAAAAMAAEAWQABAAAAAAANAAEAWQABAAAAAAAOAAEAWQABAAAAAAAQABEAAAABAAAAAAARAAcAMwADAAEECQAAAAIAgwADAAEECQABACIAEQADAAEECQACAA4AOgADAAEECQADADYBFwADAAEECQAEADIAYQADAAEECQAFABYA5gADAAEECQAGADAAqwADAAEECQAHAAIAgwADAAEECQAIAAIAgwADAAEECQAJAAIAgwADAAEECQAKAAIAgwADAAEECQALAAIAgwADAAEECQAMAAIAgwADAAEECQANAAIAgwADAAEECQAOAAIAgwADAAEECQAQACIAEQADAAEECQARAA4AOlRzY2lyY3VpdEFscGhhYmV0AFQAcwBjAGkAcgBjAHUAaQB0AEEAbABwAGgAYQBiAGUAdFJlZ3VsYXIAUgBlAGcAdQBsAGEAclRzY2lyY3VpdEFscGhhYmV0IFJlZ3VsYXIAVABzAGMAaQByAGMAdQBpAHQAQQBsAHAAaABhAGIAZQB0ACAAUgBlAGcAdQBsAGEAclRzY2lyY3VpdEFscGhhYmV0UmVndWxhcgBUAHMAYwBpAHIAYwB1AGkAdABBAGwAcABoAGEAYgBlAHQAUgBlAGcAdQBsAGEAclZlcnNpb24gMC4xAFYAZQByAHMAaQBvAG4AIAAwAC4AMSA6VHNjaXJjdWl0QWxwaGFiZXQgUmVndWxhcgAgADoAVABzAGMAaQByAGMAdQBpAHQAQQBsAHAAaABhAGIAZQB0ACAAUgBlAGcAdQBsAGEAcgAAAAABAAMAAQAAAAwABAK4AAAAqgCAAAYAKgAAACEAIgAjACQAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA8AD0APgBBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAev//AAAAAAAhACIAIwAkACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAPAA9AD4AQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBhAGIAYwBkAGUAZgBnAGgAaQBqAGsAbABtAG4AbwBwAHEAcgBzAHQAdQB2AHcAeAB5AHr//wAA/+D/4P/g/+D/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/c/9z/3P/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2QABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEABAEAAQEBGVRzY2lyY3VpdEFscGhhYmV0UmVndWxhcgABAQEo+BsA+BwC+B0D+B4Ei/tV+kD5SAUdAAABOQ8dAAAB4BGLHQAASd0SAFcBAQwlNj0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkFZlcnNpb24gMC4xVHNjaXJjdWl0QWxwaGFiZXQgUmVndWxhclRzY2lyY3VpdEFscGhhYmV0UmVndWxhciEiIyQnKCkqKywtLi8wMTIzNDU2Nzg5PD0+QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2FiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6AAAAAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHPAdAB0QHSAdMB1AHVAdYB1wHYAdkB2gHbAdwB3QBUAgABAAQAeADuAgwFUgWPBmUHOwffCGMIzwkMCUgJhQq1CzwMhg5ADwwQUBHfEt8U3hYZFqIXFxeiGEIZtBsIHCccsh0sHpIfGh9XIC8gtiEFIjwjJSRTJWUmviftKXQp2CqzK0gsfS0ILW8uPy6iLuAvQy+2L/IxEDItM0A0XjWWNlQ39zjFOTk59zp9Oro76Dy1Pd8+/EAaQJVCDELOQ49EGEVZReRGgUdR+UgO+Uj37vlBFYv8VgWIewWBfQV8ggV6iAV6jgV8lAWBmQWImwWL+FYFjpsFlZkFmpQFnI8FnIcFmoIFlX0FL/z3Fe+LBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBSeLBXqOBX2UBYGZBYebBY+bBZWZBZmUBQ75SPdm+UEVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQX3p3sVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj3XvcoFYAiBYZ7BYB/BXyDBXmJBXqQBX6VBYOaBYmbBZPgBSR/BXqMBXuSBX+YBYaaBYycBZOaBZiVBZyRBfcPmgWe91QFKH8FeYwFfJIFf5gFhZoFjZwFkpkFmZYFm5EF9wyZBZ33RgWQmgWWmAWakwWdjQWchgWYgQWUfAWMewV7+zIF9zifBZr3JgWQmgWWmAWbkwWcjQWchgWZgQWTfAWNewV++xMF8JcFnIoFm4QFl34FkHwFinoFg30FfoAFeoUF+w19BXj7VQXslwWdigWahAWXfwWRewWKegWDfQV+gAV6hgX7CnwFfvscBYZ7BX9/BXyDBXqJBXqQBX2VBYOaBYmbBZf3CQX7MM0V9zifBZ/3VAX7OHcFDvlI9/T5XhWL/awFiHoFgX4FfIEFeogFeo4FfJUFgpgFh5wFi/msBY+bBZSZBZqUBZyOBZyIBZqCBZV9BfcB+2YVNd0FgpkFiJsFjpsFlZkFmpQFnI4FnIcFmoIF4DkFlX0FjnoFh3sFgX4FfYIFeYgFeo4FQ9sV+z+bBXuQBX2VBYOaBYmbBZCbBZeYBZqTBZ2MBfc+ewWchgWZgAWTfQWMegWGfAWAfgV8gwX7LqUVKjgFe4MFeogFeo8FfZUFgpkFiJwFkJsFlZgF7d4FmpMFnI0FnIcFmYEFlH0FjnsFh3sFLD4VZvsHBYN8BX2BBXqGBXqMBXuTBYCYBYabBY2bBa/3CAWTmQWZlgWckAWciQWbgwWWfwWQewVkIRWkSQWNegWHewWAfgV8gwV6iQV6jwV9lQWCmQVyzQWJmwWPmwWWmQWakwWcjQWchwWZgQWdTxXUWgWXfwWRewWKewWEfAV+fwV7hgV5iwV7kgVCvQV/lwWFmgWLnAWTmgWYlgWbkQWdigXTWhX3fFkFm4QFl38FkXwFi3oFhHwFfoAFe4UFeYwF+3y8BXuSBX+XBYWaBYycBZKaBZeWBZyRBfedUhXVWgWWfwWSewWKewWEfAV+fwV6hgV6iwV7kgVCvAV/mAWFmgWLnAWTmgWXlgWckQWcigX2PBWjOAWMewWGewV/fgV8hAV5igV6kAV+lgWDmQVz3gWKmwWQmwWXmAWakgWdjAWbhgWZgAWp+xAVW/sHBYF9BX2BBXqIBXmOBX2UBYGYBYebBY6cBbz3BwWUmQWalQWcjgWciAWaggWVfQWPewU/+y8V+w5aBXqHBXmOBX2UBYGZBYebBY6bBZWZBZmUBfcOvQWcjgWciAWaggWVfgWPewWIewWBfQX7M00V+zObBXuQBX2WBYOZBYqcBZCaBZaYBZuTBZyMBfczewWchgWYgAWTfAWNewWFewWAfwV7gwX7VqAVNb0Ff5YFg5oFi5sFkZsFl5cFm5IFnIsFnIYF4FkFmIAFknwFjHoFhXwFf38Fe4QFeYoF+wzZFWbuBYmbBY+bBZaYBZqUBZyNBZyHBZmBBZR9BbAnBY17BYd7BYB+BXyDBXmIBXqQBX2VBQ75SPfu+UEVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj4Ko0VsmUFlX0FjnsFh3sFgX0FfYIFeYgFeo8FfZQFYrMFio0FiYwFY7sFiowFiowFYsMFiowFiowFY8oFio4FiY0FbcoFio4FiY4Fd8oFi44Fio0FgcMFi5IFi5IFlcMFjI0Fi44Fn8oFjY4FjI4FqcoFjY0FjI4Fs8oFjIwFjIwFtMMFjIwFjIwFs7sFjYwFjI0FtLMFmZQFnI8FnYgFmYIFlX0Fj3sFiHsFgX0FZGUFZV4FZFUFZE8Fb1AFeFEFg10Fk10FnlEFp1AFsk8FslUFDvlI95tWFYqJBWJjBX2CBXqHBXmOBX2UBYGZBYebBY6bBZWZBbKxBbG4BbLBBbLHBafGBZ7FBZO5BYO5BXjFBW/GBWTHBWTBBWW4BWSxBYGZBYibBY+bBZWZBZqUBZyOBZyHBZmCBbRjBYyJBY2KBbRbBYuKBY2KBbNTBYyKBYyKBbRMBYuIBY2JBapMBYuIBY2IBZ9MBYuIBYyJBZVTBYuEBYuEBYFTBYqJBYuIBXdMBYmIBYuIBWxMBYmJBYuIBWJMBYqKBYqKBWNTBYmKBYuKBWJbBQ75SPeU+FUV+zRWBXqIBXqPBX2VBYKZBYicBY+bBZaYBZqTBfc5wgUh9yQFhJoFi5sFkZsFmJYFm5IFnIsFm4UFmIAF8fsfBfH3HwWYlgWbkQWciwWchAWXgAWRewWLewWEfAUh+yQF9zlUBZqDBZZ+BY97BYh6BYJ9BX2BBXqHBXqOBfs0wAWL+yoFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFDvlI95T39hWL90sFjpwFlZgFmpUFnI4FnIgFmoEFlX4FjnoFi/tLBfdpiwWciAWaggWVfQWOewWIegWBfgV8ggV6hwX7aYsFi/tLBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3SwX7aYsFeo8FfJQFgZgFiJwFjpsFlZkFmpQFnI4FDvlI96puFcJVBZV9BY56BYd7BYF+BXyCBXqIBXqOBX2VBTXfBYeRBYaRBYuMBYqMBYqSBYmSBYyMBYqMBY2SBYyTBYyLBYuMBZCRBY+RBfc/9zwFmpUFnI4FnIgFmoMFlX0Fj3sFiHsFgX0FDvlI90L35RX3kosFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogF+5KLBXqOBXyUBYGZBYibBY6bBZWZBZqUBQ75SPf/7RX7D4sFeY4FfZQFgZkFiJsFjpsFlZkFmZQFnY4F9w+LBZyIBZmCBZV9BY97BYd7BYF9BX2CBQ75SKOAFfhx+WMFl5cFm5EFnYwFm4UFmIAFknwFjHoFhXwF/HH9YwV/fwV7hQV5igV7kQV+lgWEmgWKnAUO+Uj4CfkPFUOeBUN4BUZQBWMvBYH7JQWj+wwFxi0F2F0FyYsF2LkFxukFo/cMBYH3JQVj5wVq9x4VjYoFkYgFkYgFjIoFjYoF4EEFi4sFjIoFj4UFkIUFi4oFjIoFuSEFjIQFjYUFlvsyBYqGBYuGBXH7GQWIhQWJhAVH+wIFiYoFiokFhocFh4YFiYoFiooFKVEFh4kFiIkFhooFh4oFh4sFh4oFM4sFh4wFh4sFh4wFhowFiI0Fh40FKcUFiowFiYwFh5AFho8Fio0FiowFRvcCBYmSBYiRBXH3GQWLkAWKkAWW9zIFjZEFjJIFufUFjIwFi4wFkJEFj5EFjIwFjIsF39UFjYwFjIwFkY4FkY4FjYwFjYsF6aMFjowFjowFkYoFkYwFjooFjooF6XMFDvlI9/v5ZRWQjgWNjAWNjAWSiwWSjQWMigWNiwWSigWSiQWMigWNiwWRhwWQhwWMigWNigWOhQWPhQWMigWLiQWMhQWNhAWL/REFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/i2BTRFBXuDBXqJBXqPBX2WBYOZBYmbBY+bBZaYBfc19xUFDvlI90rmFffoiwWdiAWZggWVfQWOewWIewWBfQV9ggV5iAX8TosFg4wFg4wFiowFiosFhY8FhI8Fi4sFiowFhpEFh5EFi4wFiowFipIFiZIFi4wFi4wFjJIFjJIFjIwFi4wFj5EFj5EF9zn3PgX3L/dKBcTlBZezBYueBYOqBXeiBV6dBUaQBWaGBVBzBWttBX9mBYN9BX6ABXqGBXmNBXyTBYCYBYaaBYycBZu6BYuMBYyNBY+QBY6RBYyMBYyNBbi2BYuLBYuLBZOQBZKQBYuLBYuLBdWoBZCNBZGMBbqSBZCKBZCMBd2FBZKJBZKKBclxBYyKBY2LBZCHBZGHBYyKBY2JBaxlBYyKBYuKBY+FBY6EBYuKBYyKBZdeBYuFBYyGBYptBYqGBYuGBX1ZBYiFBYmGBUwpBYmJBYqJBfsy+04FiooFiooFDvlI9wqUFYeMBVObBXySBX+YBYabBY2bBZOaBZmVBZuQBZ2KBcB8BdeABeiJBb2WBdGxBbW2BZy5BYOvBWWzBUStBTSiBT2UBYiMBYiLBYWOBYaMBYmNBYiNBYePBYeOBYmOBYmNBYmQBYmQBYuOBYqOBYuQBYuRBYyNBYuOBY2QBY2QBY2NBY2OBY+PBY+PBY6MBY2NBZCNBZGNBY6LBY6MBduVBeKdBdGpBauoBZGqBXWtBV2uBUagBTyPBUp2BVZxBWhxBXyEBXmKBXuQBX2WBYOZBYqcBZCaBZeYBbCnBY+MBY6OBceoBY6MBY6NBdikBZOMBZSMBemGBZCKBZGKBd1yBZKIBZOHBcVeBZCGBZCGBa9UBY2EBY6FBYuKBYyKBYqEBYuDBYBQBYmHBYqHBYmIBYmHBYiIBYiHBVxfBYWGBYSHBUduBdFqBZGGBZKHBcBUBYyIBY6JBY2GBY6HBYuIBY2HBZZQBYuJBYyIBYqFBYuGBYqIBYuJBXNKBYuLBYuLBYeEBYaEBYuLBYuLBVZUBYWHBYaHBTlfBYWJBYWIBU19BYWLBYWKBSeNBYiMBYiLBTmWBQ75SPgF98IVi+oFj5sFlJgFmpUFnI4FnIgFmoEFlX4FjnsFiywF6YsFnIcFmoIFlX0FjnsFiHsFgX0FfIIFeogFLYsFi/s9BYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBYv3PQX71IsFhIwFhYwFiYwFiYsFhY8FhY0Fio0FiYwFh5AFh5AFi40FiY0FipEFiZEFi40Fi40FjJEFjJEFjI0Fi40Fj5EFjpAF+Ab4PgWYlgWcjwWcigWbgwWWfgWQfAWKegWCfQX7yfv5BQ75SKn5QRWOmwWVmQWalAWcjwX4WIsFnIcFmoIFlX0FjnsFiHsFgX0FfIIFeogF/CuLBYv7dwX3HakFk4sFk4wF9x57BZOIBZOJBcJuBZGGBZGHBbFiBYyJBYyKBY6FBY+FBYuKBYyJBaj7BAWLigWLigWLhAWMhAWKigWLiQV9UQWLiwWLigWHhAWIhAWLiwWKigVnXgWFhQWFhgVFYQWFiQWFiAU5dQWGigWGigU+hwWFjAWGiwVKlwWGjQWGjAVWogWGjgWFjwVUugWAmAWHmwWOmwWUmQWZlQWcjwWciQWaggW9YQW0eQXCgQXNjgXSngXFrgWlqwWUswVz5wVxpwVjoAX7DZkF+01iBYaLBYaKBYeMBYiKBYaNBYaMBYiNBYeMBYePBYeNBYmOBYiNBYmQBYiPBYuOBYmPBYuPBYqQBQ75SPch96QVi4sFi4sFbW4FioMFnlkFm24FtWEFtHIFzoEF2o8FxaMFsqoFnrMFjaoFf7MFeKwFcqQFZ5sFUJcFU44FU4MFU28F+yxcFYqPBYyRBYy5BYuLBYuLBY7cBY2RBYyRBafaBYyNBYuNBbTfBZCSBZCRBcC7BY6NBY2NBdC4BZGOBZCOBdykBYyLBYuLBeKlBZ2NBZuGBZmBBZN8BY17BYZ7BYB+BXyDBTRyBUFzBU9kBV5jBWdABXJEBYp7BZGOBZCPBdGtBZKNBZKOBc6UBZCLBY+LBcuJBY+KBY+LBc58BZCKBZCJBbt2BZKGBZKHBa5oBY6GBY+GBaNhBYyHBY2HBZpZBYyEBYyFBYlbBYuLBYuLBYmDBYmDBYuLBYuLBW9UBYuKBYqKBYaGBYeFBYqKBYqLBVhiBYaIBYaIBUNtBYOJBYOJBS+GBYeMBYaLBTmXBYqLBYqLBYSOBYOOBYuLBYqLBVasBYiPBYaNBVq8BYeQBYeQBXaxBYqOBYqOBXXHBYqSBYmTBQ75SPfP90gVg/saBYd7BYF+BXyCBXmJBXqPBX2VBYKZBYmbBZL3HAWMjQWLjQWc9wcFi4wFjI0Fms0FjI0Fi4wFnsYFjIwFi40FoL4FjIwFi40ForcFjIwFi40Fo7EFjIwFjI0FoqoFjI0FjIwFoqYFjYwF+96LBXmOBX2UBYGZBYibBY6bBZWZBZmUBZ2PBfhfiwWQigWQigWOigWPigWPiAWQiQWOiQWNiQWOhwWPhwWMiAWNiAWMhgWNhgWLiAWMiAWJhgWLhgWKiAWKiAWIhwWJhgWIiQWJiAWHiAWHiAVqeQV9gQVkaAV3dAV2bgV1aAV2YgV4WwV5UwV8TAUO+Uj3pvf2FUR0BUpaBXBZBYleBaZdBcVnBdlzBciJBeCmBb6wBaLEBYLEBWK1BTi2BVKfBdH3sxU4kQVLgAVXcwVrXQWVaQW4ZQW/bAXDeAWwlgXetQWdpgWMwwV1rwVr9wEVi4sFk4gFk4kFi4sFjIsF0GgFjokFj4kFjocFj4gFjYgFjYgFrVIFjIkFjYgFjIYFjYYFiogFjIgFiTwFi4gFi4kFiYUFioYFiYkFiogFbVwFiYkFiYgFh4gFh4cFiIoFiYkFUm4F0mYFkIcFkYcFw1IFjYcFj4gFjIcFjYgFjIYFjIcFmDoFi4kFi4kFioUFi4UFiokFiokFbDwFiYcFiogFh4cFiYgFiIgFiIkFR1sFhYgFhYcFJ2sFg4oFg4oFP40FhY0FhIsFMqcFho4FhY0FQ7gFio0FiYwFho8Fh5AFio0FiYwFZc0Fio4Fio4FipAFiZAFjI4Fio4Fjs0Fi4wFi4sFjZMFjZIFi4wFi4sFr80Fi4wFjIwFkJAFkJEFi4wFjIsF2sYFkY4Fko8FmI8FaZ8FiI4Fh40FUrwFiY0FiI4FiY8FiI8Fio4FiY4FeMsFi40Fi4wFipIFi5IFi4wFi4wFjpIFjZIFjIsFjI0Fu9IFjo4FjY4Fj44Fj44Fjo0Fjo0F0KsFkYwFkY0F15gFkIsFkYwF7YQFDvlI+Fr4mBWVnQV8xwVwqwVfoAVIkwVHgwVTdAVnagV+XwWYYAWvaQXDdAXMhAXMmgW8qgVf/BoVi4oFZ0IFgX4FfIIFeYgFeo8FfZUFgpkFiJsFj5sFr9QFtuoFwPcXBYuLBYuMBZKcBT55BYOKBYKLBTuUBYWNBYWMBUWoBYSPBYSQBVm6BYqNBYmMBYiQBYeQBYuOBYqNBXfNBYqOBYqOBYyQBYqQBYyOBYyPBZ/NBYyNBYuNBY+QBY6QBY2NBYyNBb26BZKPBZKQBdGnBZGMBZGNBduVBZGKBZGMBduBBZKJBZKJBcdvBYyKBYyLBZGGBZGHBYuKBYyKBbNcBYyKBYyKBY6FBY6FBYuJBYyKBZ83BYuFBYyEBYqJBYuJBYmFBYmGBYqHBUH7SAVW+xgFi4oFiooFXysFDvlI9y/3yxX4OvtDBZqBBZR9BY57BYd7BYF9BXyCBXqJBXqOBfyY92oFhI8FhY8FiowFiowFh5EFh5EFi4wFiosFipMFiZIFi4wFi4wFjZIFjJIFjIwFi4wFj5EFj5EFjIwFjIsFkY8Fko8F+Jj3agWcjwWciAWaggWVfgWPewWIegWCfQV8ggUO+Ui2+GkV+JiLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfyYiwV6jgV8lAWBmQWImwWOmwWVmQWalAWc+4gV+JiLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfyYiwV6jgV8lAWBmQWImwWOmwWVmQWalAUO+Uj44/fpFYyKBY+FBY+FBYuKBYyKBYyEBY2EBYuKBYuKBYmEBYqDBYqLBYuKBYeFBYeFBYqKBYqKBYWHBYSHBfyY+2oFeogFeo0FfJQFgZkFh5sFjpsFlJkFmpUF+Dv3QwX8O/dDBXyUBYKZBYicBY+bBZWYBZqUBZyOBZyHBfiY+2oFkocFkYcFDvlI+Ev3kxWGigX7q4sFi4sFLPtyBYF9BX2CBXqIBXmOBX2UBYGYBYecBY6bBfek+REFkJIFkJIFi4sFi4sFko8FkpAFi4sFjIsFk40Fk40FjIsFi4sFk4kFlIoFi4sFi4sFkoYFkocFjIsFi4sFkIQFj4QF97r9EQWPewWIegWBfgV9gQV6iAV5jgV9lAWBmAX7IvfIFfsB94AFJvuABQ75SPe++GUV2bYFlMsFTL8F+weeBSmGBYv7VgX32vxEFYSJBYmLBYmLBfv7hwWKiwWLiwWDjAWCjQWLiwWLiwWEjwWEkAWKiwWLiwWGkgWHkQWLjAWKiwWKkwWJkgWLjAWLiwWL+QoFjJIFjZIFi4wFi4wFkJEFjpEFjIwFjIwFkY8FkY8FjYsFjIwFkowFk40F9yWTBZCKBZCLBfcZdQWOigWPigWQiQWQiQWNiQWOiQXlQQWNiAWPiQWNhwWOhwWMhwWNiAWLhgWMhwWLhwWLhwV9+wAFiokFi4gFiIYFiYYFiYkFiogFh4cFh4cFiIoFiYkFSGYF9wJmBY6JBY+KBY+IBY+JBY2IBY6IBdE3BY6GBY6FBYyJBYuKBYyEBYyEBYX7AAWLiQWLiQWJhQWJhQWKiQWKiQVsWwWIiQWKiAWHiAWHhwWIigWIiQU+ZAWJigWJigVu3BXEqAWeqAWP3QVYyQX7JLsF+1CWBYv7nAUO+Uj4ZPclFaDbBZOZBZiXBZuQBZ2KBZuEBZd/BZF7BYp7BXIwBYqIBYqHBYiHBYmHBYiIBYmIBUNLBYiJBYmJBYaJBYaIBYiLBYiJBSl1BYuLBYuLBYOLBYKLBYuLBYuLBfsEnAWJiwWKjAWEjQWEjgWKjAWKiwVRsQWFkQWFkQVU3QWLiwWLiwWIkwWIkgWLiwWLiwVm918Fi5MFi5MFuvdeBYyMBYuNBY+RBY2RBY2MBYyNBc7XBYyMBYuLBZGQBZKQBYuLBYuLBdGsBZKNBZKOBdqVBYyLBYyLBZOKBZKLBYyKBY2LBfVqBYyLBYyLBZKHBZGHBYyLBYyKBcNZBYyLBYuKBZCFBY+FBYyKBYuLBapEBY57BYh7BYF9BXyCBXqIBXqOBXyVBYGYBXDJBWKwBTSlBU6EBVVxBVRNBWD7TAWt+04FuUgFtG8F6H0F2JwFDvlI93uVFYaKBfs1iAWLiwWKiwWDjAWDjQWKiwWLiwWEjwWEjwWLjAWKiwWHkgWGkQWLjAWLiwWJkwWJkgWMjAWKiwWT+QQFjJAFi5EFjY0Fi48Fj48FjY8FjY4FjY0FkI4Fj44Fjo0FjowFkIwFkY0F7pgFj4sFjowF14kFkYoFkIsF9xBrBYuLBYuLBZOHBZKIBYyLBYuKBeZIBYyKBYuLBZCFBZGFBYuLBYuKBb8wBY2FBY6GBaAsBYuHBYyHBY1EBYqHBYuIBYJOBYmHBYqHBXhXBYeFBYmGBUw8BYWGBYWGBTdZBYWJBYWIBfsdaAV53hX3EasF0rUFwM4Fm7UFlMAFicsFeOAFXtoFPsQF+wGnBUiMBVGDBYX8tAUO+Uj3EeUV+CGLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfxOiwV6jgV8lAWCmQWHmwWL99MFi/fSBY+bBZSZBZqUBZyPBfhOiwWchwWaggWVfQWOewWIewWBfQV8ggV6iAX8IYsFi/t+BfeciwWdiAWZggWVfQWOewWIegWBfgV9ggV5hwX7nIsFDvlI9xf32hWL+6oFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY+bBZWZBZmUBZyPBZ2HBYyKBfgviwWciAWZggWVfQWPewWHewWBfQV9ggV6iAX8FYsFi/t4BffQiwWdiAWZggWVfQWOewWIewWBfQV9ggV5hwUO+Uj4fve0Ffs1iwV6jwV9lAWBmQWImwWOmwWVmQWZlAWdjgX3bIsFj4oFkIsFj4kFj4oFj4kFj4kFjogFj4kFjYgFjocFjYgFjYcFjIcFjYcFi4cFjIcFiocFi4cFXvtaBYqJBYuIBYiGBYiGBYmJBYqJBUtGBYmKBYqJBYWIBYaHBYmKBYmKBTpwBYqLBYuKBYOKBYOKBYqLBYqLBTWSBYSNBYSNBTmuBYWOBYaOBUfCBYaQBYaQBV/QBYuMBYqMBYmRBYiSBYuMBYuMBXf3UgWLkQWLkgWx90IFjIwFi40FjpEFjpEFjIwFjI0FzdsFjIwFi4wFkZAFkY8FjIwFjIsF37QFi4sFi4sFk40Fk44Fi4sFi4sF9xeVBZKKBZGLBfcQcQWbhQWXfwWRfAWLegWEfAV+gAV7hQV5iwX7CKMF+weCBUhrBVZJBWj7MwWe+0IFrlUFxFwF0W4Fz4UFx6AFvL8FDvlI+H74OhWL95sFj5sFlJkFmpQFnI8FnIcFmoIFlX0FjnsFi/0RBYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBYv3tgX8DosFi/u2BYd7BYJ9BXyCBXqIBXqOBXyUBYGZBYibBYv34AWL98UFjpsFlZkFmpQFnI8FnIcFmoIFlH0Fj3sFi/ubBQ75SPfu+UEVi/0RBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv5EQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Ui/9z4Vio4Fia8FjpsFlJkFmZUFnY4FnIkFmoIFlX4Fj3sFjGsFkXIFlXYFmXkFnX0FunoFzoQFu5EFwp8FoJkFnJ0Fl6EFk70FivhxBY6bBZWZBZqUBZyPBZyHBZqCBZR+BY96BYz8dAWKiAWLiAWCTgWJhQWJhAV5awWHhgWIhwVycQWHiAWIiAVtdwWGiQWGiAVKcwWGigWFigVRhAWGiwWGiwU8kwWFjAWFjAVRoQWFjwWFjQVvoQWHjwWHjgV2pQWJkAWIjwV+qAWKkAWJjwWEqwUO+Uj3Uff3FfsBOQWL+3UFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY+bBZWZBZmUBZyPBZ2HBZmCBZV9BY57BYv7xAX4Hve7BZuSBZyNBZyGBZiABZR8BYx7BYZ7BX9/Bfui+14F9+b70AWVfQWPewWHewWCfQV8ggV6iAV6jgV8lAUO+Uj3DOUV+CuLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBfxYiwV6jgV9lAWBmQWHmwWL+REFj5sFlZkFmZQFnI8FnYcFmYIFlX0FjnsFDvlI+KH5WxWOjwWNjQWNjQWRjQWPjgWOjAWOjAWRjAWRjAWOigWOiwWQiQWRigWNigWOigWQhwWPiAWNiQWNiQWOhgWOhgWMiQWMiAWLhgWNhQWL/REFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/h1BftD+6wFiYkFiokFhocFh4cFiYkFiYoFhYkFhYgFiYsFiIoFhYwFhYoFiIwFiYsFhY4FhY0FiYwFiY0Fh48Fho8Fio0FiY0F+0P3rAWL/HUFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY2RBYuQBYyOBYyNBY6QBY6QBY2NBY2NBY+OBZCPBY6MBY2MBZGMBZCNBY6LBY6MBZGKBZGKBY6KBY6KBY+IBZGJBY2JBY2JBY6HBY+HBfdw+/UF93D39QUO+Uj4e/dPFYT4hgWOmwWVmQWZlAWcjwWdiAWZggWVfQWPewWU/REFioYFi4cFiocFiocFiYgFiYcFiIgFiIcFiIkFiIgFh4kFh4kFh4oFh4oFhosFh4oFhosFh4sFh40Fh4wFh40Fh4wFiI4Fh44FiI4FiI4F/BT4oQWL/IkFh3sFgn0FfIIFeogFeo4FfJQFgZkFiJsFi/kRBYyPBYuPBYyPBYyPBY6PBYyOBY6OBY6PBY6NBY6OBZCNBY+NBY+MBY6NBZCLBZCMBY+KBY+LBY+JBZCKBY+JBY6KBY+IBY+IBY2IBY6IBQ75SPgblBWFiAWJiwWJiwUzgAWKiwWKigWEjAWDjAWKiwWKiwUypQWJjAWIjAWGjgWGjgWJjQWJjAU62gWJjgWIjgWJjwWIjwWLjwWJjgVP96AFi40Fi4wFi5IFi5IFjIwFi40FxPddBY2PBYyPBY6OBY2PBY6NBY6PBdHEBYyMBYyMBZKOBZGOBY2LBYyMBfcOqQWPiwWPjAWQigWPjAWPiQWPiwX3B2cFjIoFjYsFkYcFkYgFjIoFjYkFzkoFjYgFjYkFjocFjYYFjIgFjIgFxfuJBYuDBYuDBW/7LgWIhAWJhQVYMgWKiQWLigWGhgWGhgWKigWKigUwTgWJigWKigUg0BXOkwXUvAW11gWl9x8FVvd1BVm8BTCoBShzBVdgBVj7RgXD+4sFy00FDvlI93j3xxWJigX7AooFi/uVBYd7BYF9BX2CBXqIBXmOBX2UBYGZBYibBYv5BQWMkQWMkgWMjAWLjQWPkQWOkAWNjAWMjQWQjwWRjwWNiwWMjAWSjQWRjAX3HZcFjosFj4sF9w6EBY+KBZCLBdp2BY+KBY+KBa96BZCIBZCIBcRbBYuKBYuLBZCFBZCEBYuLBYyLBaRXBY2EBY2EBZA/BYuJBYuJBYqFBYqFBYqJBYuJBXRcBYqJBYqJBYeHBYeFBYmKBYqKBWhxBYWIBYWIBVN2BYeKBYeJBTp8BYiLBYmLBfsCggWF4BX1kwXWmQW5nAWgmwWZpwWGxAV6sAVesQVxlwVEnQX7BpIFL4MFi/uJBQ75SPiTtRXQOQWTfAWNewWFewWAfwV7gwV6igV6kAV+lQVRzwVUYAWIigWJiQWGiQWGiAWHiwWIigU1fgWJjAWJigWEjAWFiwWJjAWIiwU0qQWJjAWIjAWGjgWGjgWJjgWJjAU75AWKjgWJjQWJkAWIkAWLjgWKjQVQ98MFi4sFi4sFi5MFi5MFi4sFi4wFw/d2BY2OBYyPBY2PBY6PBY2OBY2OBdDLBY2MBYyNBZGOBZGOBY2MBY2MBfcLrAWRjAWRjAWNigWOjAWRiQWRigX3BGMFjYoFjooFj4cFkYgFjIkFjYoFzUEFjIkFjYkFjYYFjoYFjIgFjIkFw/uoBYuEBYuEBW/7QgWJhQWJhQX7K0AVMfUFg5oFipsFkJsFlpcFm5MFnIwFnIYFmIEF0zcFmqkFpfc1BVb3lgVZxAU0qgUucQVXWgVY+2IFwvuvBctDBcx2BcmUBQ75SPfz+EoV3JcFrpgFoJsFlqIFjLMFfbkFgZYFd5gFcZUFQZsF+xSQBfsofgWL+10F90g8FftIhQWL+7cFh3oFgn4FfIEFeogFeo4FfJUFgZgFiJwFi/j8BYyRBYyRBYyNBYuNBY+QBY6RBY2MBYyNBZGOBZCPBY2MBY2MBZGMBZKNBfdUmwWOiwWOjAX3G4UFj4oFj4sF3HoFj4kFj4sFrX0Fj4kFj4kFp3kFj4cFkIgFoHQFi4oFjIsFjoQFj4UFi4oFjIoFnU0FjIUFjIUFiVQFi4sFiYMFiYMFi4sFeWQFiooFi4oFhoUFhoUFiosFi4oFaXAFhIgFhYcFXXoFhooFhokFNX8F94H7rQWTfQWNegWGewV/fwV8gwV5igV6kAV+lgX7nPfLBYOaBQ75SOXBFYaOBYqNBYiNBYmQBYeQBVr3AQWHnAWOmwWVmQWZlAWcjgWdiAWZggWVfgW3KgXNaQX3IIcF7bgFq/AFdsUFS68F+4ezBYiNBYiLBYaNBYaNBYmOBYiMBUu+BYiPBYiOBYmOBYiOBYqQBYmOBXrHBYuPBYqOBYuQBYuPBYyPBYyPBbT3DAWOkAWNkAWNjQWMjQWQjwWPjwXvzAWRjgWQjgWOiwWNjAWRiwWRjAX3R4IFjYoFjIwFkogFkooFjIoFjYoFkIcFkYcFjIoFjIoF1zAFknwFjXoFhXwFgH4Fe4QFeYoFe5AFfpYFTNYF+yOTBUBaBWssBZVoBbZoBfeDYwWTiQWTiAXfWgWQhwWQhwWNiQWMigWOhQWOhgWrNgWLhgWNhwWLhwWLiAWKhgWKhgVi+xgFi4oFiooFh4UFiIQFiosFiooFhYYFhYcFiosFiooF+xJRBYmLBYqKBYSKBYSJBYmLBYmLBfs2jwWJjAWJiwWFjQWEjAWJjAWJjAUzuQUO+Uj3yflsFfeiiwWchwWaggWVfQWOewWIewWBfQV8ggV6iAX7dYsFi/znBYh7BYF9BX2CBXmIBXqOBXyUBYKZBYebBYv45wX7hYsFeo4FfJQFgZkFiJsFjpsFlZkFmpQFnI8FDvlI+HT3hxWQ+E4Fj5sFlZkFmZQFnY4FnIcFmYIFlX0FjnsFhvxQBYqIBYyJBYFHBYqHBYqGBXdYBYmIBYmHBX53BYiHBYiIBW1sBYWHBYaHBVhxBYSJBYSJBU2BBYWLBYSLBTOUBYaNBYWMBUWlBYWPBYWOBVyvBYeQBYWQBWjCBYiRBYiRBXnSBYqPBYqOBYTsBYuNBYuMBYr39wWOmwWVmQWalAWcjwWchwWaggWVfgWOegWM+/UFki8Fm00Fp2EFr28FxXYF14IFu5MFsJ4FoqIFk5cFnLYFDvlI99H3NRX3a/ivBZSZBZqVBZyPBZyIBZqCBZV+BY97BYh6BfuS/REFi4sFi4oFhoUFh4QFi4sFiooFhIcFhYYFiosFi4sFg4kFg4oFiosFi4sFg4wFgowFi4wFiosFhI8FhI8Fi4sFi4wFhpEFhpEFi4wFi4sF+7j5EgWHmwWOmwWVmQWZlAWcjwWciAWaggWVfQUO+Uj4dvdYFdf4gwWQmwWXlwWbkgWcjAWchgWYgAWTfAWMegUq/REFiYcFioYFiYgFiocFiIgFiIcFiIkFiIgFh4kFh4kFh4oFh4kFh4sFhooFh4sFh4sFho0Fh4sFh40Fh40FiI4Fh40FiI4FiI4FiY8FiI4F+0b3/wX7Ofv2BYiHBYiGBYmJBYmJBYaIBYeHBYiKBYiKBYaKBYWJBYiLBYiLBYWMBYaLBYiNBYiLBYaOBYaOBYmNBYiNBYiPBYiPBYqOBYmOBYqQBYmQBTv5CQWNnAWTmQWYlgWckAWcigWbhAWWfgWRewXH/G8F9x/3vgWPkAWPkQWMjAWMjAWRjwWRjwWNiwWMjAWSjAWSjQWNiwWMiwWSiQWTigWMiwWMigWRhwWSiAWMigWMigWPhQWPhQUO+Uj3/Pf/FfeZ+7QFlH0FjXsFhnsFgH4FfIMFeYkFeo8FfpYF+5D3qQX7kPupBX6ABXqHBXmNBXyTBYCYBYabBY2bBZSZBfeZ97QF+5/3uwWCmQWJnAWQmwWWlwWalAWdjAWchwWYgQX3lvuxBfeW97EFmZUFm48FnYoFmoIFln8FkHsFiXoFgn0FDvlI9+j4EhWV++EFiHsFgn0FfYEFeogFeY0FfJQFgZkFh5sFgffjBfud96cFgpkFiJsFj5sFlpkFmpMFnI4FnIcFmYEF94n7kQX3k/eQBZqVBZyPBZyIBZqCBZV+BY96BYh7BYJ9BQ75SPci5RX4KosFnYgFmYIFlX0FjnsFiHsFgX0FfYIFeYgF/IKLBYWMBYaLBYiMBYeMBYeOBYaNBYmNBYiNBYiPBYePBYqOBYmOBYqQBYmPBYuPBYuOBYyQBYuQBYyOBYyOBY6PBY2QBfhP+M4F/CqLBXmOBX2UBYGZBYibBY6bBZWZBZmUBZ2PBfiCiwWRigWQigWOigWPigWPiQWQiAWNiQWOiQWOhwWPhwWMiAWNiAWMhwWNhgWLiAWLhwWKhgWLhgWKiAWKiAWIhwWJhgUO+Uj3h3QV9zaLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqHBftjiwV5jwV9lAWBmQWImwWL+Z8FjpsFlZkFmZQFnY4F92OLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBfs2iwUO+Ujw+VgV+HH9YwWRfAWKegWEfAV+gAV7hQV5jAV7kQV/lwX8cfljBYWaBYycBZKaBZiWBZuRBZ2KBZuFBQ75SPhWShWHewWBfQV9ggV6hwX7Y4sFeY8FfZQFgZkFiJsFjpsFlZkFmZQFnY4F9zaLBYv5SwX7NosFeY4FfZQFgZkFiJsFjpsFlZkFmZQFnY4F92OLBZyIBZmCBZV9BY97BQ75SPeo+WQVko8FjIsFjIwFkowFk40FjIoFjIwFk4kFkooFjIoFjIsFkocFkYcF9577ggWVfgWPewWIegWBfQV9ggV6hwV6jgV8lAX7f/dmBft/+2YFfIIFeogFeo8FfZQFgZkFiJwFj5sFlZgF9573ggUO+UiL+wEV+O6LBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfzuiwV6jgV8lAWBmQWImwWOmwWVmQWalAUO+Uj4POoVxcIFi/eQBVLBBVCnBS+LBVBvBUxQBWsvBYtQBaswBcpPBcdvBeaLBfcIZhWHiAWFhwVAZwWKigWJigWEigWFiQWJjAWJigX7BYsFiYwFiYoFhI0FhYwFiYwFiYwFQK8FhY8FhY8FP9MFiowFiowFiJEFh5EFiowFiowFZvYFipIFipIFi9IFjJIFjJEFsPcABYyNBYyMBY+RBY6RBYyMBYyMBdfTBZGPBZGPBdeuBYyMBY2MBZKMBZKNBYyKBY2MBfcFiwWMigWNjAWSiQWSigWMigWNigXWaAWQhwWQiAWLjwWPnAWUmAWalQWcjgWciAWagQWVfgWOegWL/IoFiHsFgX4FfIEFeogFeo4FfJUFgpgFh5sFDvlI9xOvFYaOBYuKBYd6BYF+BX2CBXqHBXmPBX2UBYGYBYicBYv5OAWOmwWVmQWZlAWdjgWciAWZggWVfQWPewWL+3YFkI4FkY8F1asFjIsFjIsFko0Fk40FjIoFjIwF9wSLBYyLBYuLBZOJBZOJBYyLBYuLBddrBZCHBZKIBdZKBYyKBY2KBY6FBY+GBYyJBYyKBbApBYyEBYyEBYtLBYqEBYqDBWYrBYqKBYqJBYeGBYiFBYmKBYqJBUBLBYWIBYWHBUBqBYqLBYqLBYSJBYOJBYqLBYqLBfsEiwWKjAWKigWDjQWEjQWKiwWKiwVBrAWA9w0VwlwFxnEF54sFx6UFycAFqdoFi70FbdsFTcAFT6QFL4sFUHIFVFwFDvlI+DLqFczNBZqVBZyPBZyIBZqDBZV9BY97BYl7BYF9BUVDBYWHBYWHBUZmBYiLBYmJBYWKBYWJBYiMBYmKBSGLBYmMBYiKBYWNBYWMBYmNBYmLBUSwBYWPBYWPBUXTBYqMBYqMBYeRBYeRBYuMBYqMBWn2BYqRBYqSBYvSBYyRBYySBa33AAWMjAWLjAWPkQWPkQWMjAWMjAXR0wWRjwWRjwXSrwWNiwWNjQWRjAWSjQWNigWNjAX1iwWNigWNjAWSiQWRigWNiQWNiwXRZwWRhwWRhwXRQwWVfQWNewWHewWBfQV8gwV6iAV6jwV8lQVKzQVWpgU3iwVVcAVRUAVtLgWLUAWoLwXGUAXCbwXdiwUO+Uj4PfUVwroFi/dxBVS6BVCkBS+LBU9yBU1WBW07BYtZBak8BclWBcdxBeeLBfcGYhWGiAWFhwVBagWKiwWKiwWEiQWDiQWKjAWKigX7BIsFiosFiosFhI0Fg40FiosFiosFQKwFhY8Fho4FP8sFio0FiYwFiJEFh5AFio0FiowFZusFipMFipIFi8sFjJIFjJIFsO0FjIwFjI0Fj5AFjpEFjYwFjIwF18wFkY4FkI8F16sFi4sFjIsFk40Fk40Fi4sFjIsF9wSLBYyKBYyMBZOJBZKJBYyLBYyLBdVrBZGHBZCIBYv3dgWPmwWVmQWZlAWcjgWdiAWZggWVfQWOewWL/TgFiHoFgX4FfYIFeYcFeo8FfZQFgZgFh5wFDvlI9x74IBV8YQX4GIsFg5QFZs0FbaYFS6cFJosFSm8F93r7/BXXzgWZlAWdjgWchwWZggWVfQWNegWIewWAfgU6QwWGiAWFhwU8ZgWJiwWKigWEigWEiQWJiwWKiwX7DYsFiosFiosFg40FhIwFiowFiosFOrAFhY8FhY4FO9MFiYwFiowFh5EFh5AFi40Fio0FY/YFipIFipIFi9IFjJIFjJIFs/cABYyNBYuNBY+QBY+QBYyNBY2MBdvTBZKOBZCPBdyvBYyLBYyMBZOMBZKNBYyLBYyLBfcNiwWMiwWMiwWTiQWSigWMigWMiwXbZwWQhwWRiAW1ZwWPhQWQhQWyRAWQewWJegWDfQV/ggWUhQWVfgWOegWIewWBfQV9ggV5iAX8SYsFi3UFrDAFz08FzG4F8IsFDvlI97n4VhWL/CQFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/gkBfsGiwV6jgV8lQWCmAWHmwWPnAWUmAWalQWcjgX3BosFi8AFi40Fi40FjZEFjJEFjY0Fi4wFwOoFkZEFkJEFi4sFi4wFk44Fko8F9asFkowFkowF9YsFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogFKIsFOXIFZEUFi2EF9zuLBZyIBZqBBZV+BY56BYh7BYF+BXyBBXqIBQ75SPg99yMVwroFi/dxBVS7BVCkBS+LBU9yBU1WBW06BYtaBak7BclWBcdxBeeLBfcGYhWGiAWFhwVBagWKiwWKigWEigWDiQWKiwWKiwX7BIsFiosFiosFg40FhIwFiowFiosFQKwFhY8FhY4FQMwFiowFiYwFiJEFh5AFio0FiowFZuwFipIFipIFi8wFjJIFjJIFsOwFjI0FjI0Fj5AFjpAFjY0FjIwF1swFko4FkI8F16sFi4sFjIwFk4wFk40Fi4sFjIsF9wSLBYyLBYyLBZOJBZKKBYyKBYyLBdVrBZGHBZCIBYuLBY+cBZWYBZmVBZyOBZ2IBZmBBZV+BY56BYv8mAWKhAWKhAVmKgWKigWKiQWHhgWIhQWJigWKiQVlawWFhwWFhwVBbAWKigWKiwWEiQWDigWKiwWKiwX7BIsFiosFi4sFg4wFg40FiosFi4sFP6sFho8FhI8FQMsFio0FiYwFiJAFh5AFio0Fio0FZuwFiZwFj5sFlZgFm5QFnI0FnIcFmYEFlH0FrDQFyVYFx3EF54sFxqUFpKAFqdoFDvlI+L34CRWNhAWL+9AFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/fIBW7TBVqfBSyLBU1yBS49BYv7vQWIewWBfQV8ggV6iAV6jgV8lAWBmQWImwWL+SwFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/uSBbKsBZGOBZGPBdeqBYyLBYuMBZOMBZONBYyLBYuLBfcGiwWMiwWLiwWTiQWTigWMigWLiwXXbAWLiwWLiwWShgWShwWLigWMiwWPhAWQhQWLigWLiwWxLAUO+Uj3mfmIFduLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBTuLBXqOBXyUBYGZBYibBY6bBZWZBZqUBfH7mRWL/E4FiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/hOBY6cBZWYBZqVBZyOBZyIBZqBBZV+BQ75SPgV+YgVyYsFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogFTYsFeo4FfJQFgpkFh5sFj5sFlJkFmpQF+wn+MhWGigWIjQWHiwUpqQV8kwWAmAWGmwWNmwWUmQWZlgWbjwWdiQXhcQXpoQWhyQWL+I4Fj5sFlJkFmpQFnI8FnIcFmoIFlX0FjnsFi/yVBYqEBYqFBWswBYiGBYmHBYmIBYmIBYeIBYeIBYiJBYiJBYaKBYaJBfsXbQWIiwWHigUO+Uj3f/eMFfsRLwWLIQWIewWBfQV8ggV6iAV6jgV8lAWCmQWHmwWL+SwFj5sFlJkFmpQFnI4FnIgFmoIFlX0FjnsFi/xXBff495sFm5IFnIwFnIYFmIEFk3wFjHoFhnwFgH4F+2v7MgX3mPtwBZV+BZB7BYh7BYJ9BX2BBXqHBXqNBXyTBQ75SPfu+WMVi/0xBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv5MQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj43/iYFZCGBYuKBYyJBYyFBY2EBYuKBYyJBYv8WwWHewWBfQV9ggV6iAV5jgV9lAWBmQWImwWL+EgFfJYFXIsFdHgFVDEFi/vmBYh7BYF9BX2CBXmIBXqOBX2UBYGZBYebBYv36gVo4wV1nAVdiwVzeAVVMQWL++YFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/h9BY6cBZWYBZmVBZ2OBZyIBZmBBZV+BY2ABa2mBZGOBZGPBY2LBYyMBZKLBZKNBduLBZKJBZKLBYyKBY2LBZGHBZGIBbZoBYyJBY2KBY+GBY+GBYuJBY2JBZN1BZynBZCQBZCRBbWtBZGPBZGPBY2LBYyMBZKLBZKNBdyLBZKJBZKLBYyKBY2LBZGHBZGIBbZoBYyKBYyKBQ75SPi++B0VjIUFi/vyBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv36wVt3QVaoQUtiwVPcAUsMwWL++AFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/h9BY6cBZWYBZqVBZyOBZyIBZqBBZV+BY56BYtlBbCtBZKPBZCPBdiuBYyLBYyMBZKMBZONBYyLBYyLBfcGiwWMiwWNiwWSiQWSigWMigWNiwXWaAWMiwWLiwWShgWRhgWMiwWLiwWPhAWPhAWLiwWLiwWyIQUO+Uj37Ph4FTWLBVRwBU9PBWwvBYtQBaowBcdPBcNvBeCLBcKnBcfHBarmBYvGBWznBU/HBWH3AxWNjAWRiQWSigWNiQWNiwXTaAWRhgWRhwXTQwWLigWMiwWPhAWPhQWLigWMigWv+wAFjIUFjIQFi0QFioQFioUFZyAFiooFi4oFh4QFh4UFiosFi4oFQ0MFhYcFhYcFQ2YFiYsFiYkFhYoFhIkFiYwFiYoF+wCLBYmMBYmKBYSNBYWMBYmNBYmLBUOwBYWPBYWPBUPTBYuMBYqLBYeRBYeSBYuMBYqMBWf2BYqRBYqSBYvSBYySBYyRBa/3AAWMjAWLjAWPkQWPkgWMiwWLjAXT0wWSjwWQkAXTrgWNiwWNjQWSjAWRjQWNigWNjAX3AIsFDvlI9xTXFYWPBYv7dQWHewWCfQV8ggV6iAV6jgV8lAWBmQWImwWL+TMFjpwFlZgFmpUFnI4FnIgFmoEFlH4Fj3oFi4sFkY8FkI4F1asFjIsFjIwFk4wFko0FjIsFjIsF9wSLBYyLBYuLBZOJBZOKBYyKBYuLBdZsBZGHBZGHBdZLBY2KBYyJBY+GBY+GBYuJBY2JBa8rBY2EBYyDBYtLBYqEBYmEBWYsBYqJBYuJBYeGBYeFBYqKBYmKBUBLBYWHBYaIBUBqBYqLBYqKBYOKBYSJBYqLBYqLBfsEiwWKiwWKiwWDjQWEjAWKjAWKiwVBrAWA9w0VwlwFxnEF54sFx6UFyb8FqdoFi7wFbdsFTb8FT6QFL4sFUHIFVFwFDvlI+D33JRXCugWL924FVLoFUKQFL4sFT3IFTVcFbTsFi1oFqTwFyVcFx3EF54sF9wZiFYaIBYWHBUFqBYqLBYqLBYSJBYOJBYqMBYqKBfsEiwWKjAWKigWEjQWDjQWKiwWKiwVArAWGjgWFjwVAywWJjAWKjQWHkAWHkAWLjQWKjQVm6gWJkgWKkwWLywWMkgWNkgWw6wWMjQWLjQWPkAWPkQWMjAWNjAXWywWRjwWRjwXWqgWLiwWMjAWTjAWTjQWLiwWMiwX3BIsFjIsFjIsFkokFk4oFjIoFjIsF1WwFkIcFkYgFi4sFj5sFlJkFmpQFnI4FnIgFmoIFlX0FjnsFi/00BYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBQ75SPfp+MsVk40F9yaLBZyIBZmBBZV+BY96BYd7BYF+BX2BBXqIBfsdiwU4bgU5TwViNAWL+6MFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/h9BY+cBZWYBZmVBZyOBZ2IBZmBBZV+BY56BYtWBdTABZGNBZGPBeutBQ75SO6nFYSQBYuLBYuMBYeSBYeSBXLSBYmcBY+bBZaYBZuTBZyNBZyGBZmBBZN9BZ9TBbt0BfWLBeSsBbuhBYuoBVHCBfsBygX7BIsFiYsFiosFhI0FhIwFiowFiYwFQK8FhY8Fho8FiowFiYwFiJEFh5EFi4wFio0FipEFipIFi9IFjJMFjZMFi4sFi4wFkJEFj5IF1tMFjIsFjIwFkY8Fko8FjIsFi4wF764Fk4wFk40F9xGLBYyKBY2MBZKJBZKKBYyKBY2KBdZoBZmBBZN8BY17BYd7BYB+BXyDBXmJBXqPBUqqBSGLBTluBVRWBYtuBbN4BfcGiwWOigWPiwWQiQWQigWOigWPiQX3EEQFj4cFkIgF1kQFj4QFkIQFi4sFi4sFjYMFjIMFi0MFioUFioQFiooFi4kFh4UFiIYFiYoFiokFhYgFhoYFQGgFiYsFiYkFJ2cFg4oFg4kF+xGLBYmMBYmKBYWNBYSMBYmMBYqMBUCvBQ75SPdd+DEV+wyLBXqOBXyUBYGZBYibBY6bBZWZBZqUBZyOBfcMiwWL9zcFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/s3BfdDiwWciAWaggWVfQWOewWIewWBfQV8ggV6iAX7Q4sFi/uCBbNMBeF0BfOLBZyHBZqCBZV9BY57BYh7BYF9BXyCBXqIBfsCiwWFjAWFjAX7AqgFg48FhI4Fi4sFiowFhpEFhZAFVOIFio4FiY4FipAFiZAFjI4Fio4FDvlI+GX3SRWL9+AFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/x9BYh6BYF+BXyBBXqIBXqOBXyVBYGYBYicBYuyBWZpBYWHBYWHBT9oBYmKBYqKBYSKBYSJBYmMBYqKBfsGiwWJjAWKigWEjQWEjAWJjAWKjAU/rgWEkAWEkAWLiwWLiwWHkgWHkgVk9AWKkgWKkQWL9/IFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/vrBak6Bb10BeeLBcinBQ75SPfB9xcV92j4JgWWmAWakwWcjQWchwWZgQWUfQWNegWHewX7kfxyBYiHBYiGBYiJBYqJBYaIBYaIBYiKBYiKBYaKBYWKBYiLBYiLBYWMBYaMBYiMBYiMBYaOBYaOBYqNBYiNBYiQBYiPBfuQ+HIFhpsFjZwFlJkFmZUFnI8FnIkFmoMFln4FDvlI+Fj3TRX29+kFk5oFmZUFm5AFnYoFmoMFl34FkHsFiXsF+yr8cgWIhwWKhwWIiAWKhwWHiQWIhwWHiQWIiQWGiQWHiQWHiwWHigWHiwWGiwWHjAWHiwWHjQWGjQWIjQWHjQWIjwWIjQWJjwWIjgWKjwWIjwUg9+kFIPvpBYiHBYqHBYiIBYmHBYiJBYiHBYeJBYiJBYaJBYeJBYeLBYeKBYeLBYaLBYeMBYeLBYeNBYaNBYiNBYeNBYiPBYiNBYmPBYiOBYqPBYiPBfsq+HIFiZsFkJsFl5gFmpMFnYwFm4YFmYEFk3wF9wD76QX29+kFjY8FjI8Fjo4FjY8Fj44Fjo4Fjo0Fj40Fj40Fj40Fj4sFj4wFkIsFkIsFj4oFj4sFj4kFkIkFjokFjokFjogFj4gFjYcFjogFjIcFjYcFDvlI+AL3pxX3evtlBZV+BY97BYh7BYF9BX2BBXqIBXmOBX2UBft992YF+337ZgV9ggV5iAV6jgV9lQWBmQWImwWPmwWVmAX3evdlBft692UFgZgFh5sFjpwFlZgFmZUFnI4FnYgFmYMF9337ZwX3ffdnBZmTBZ2OBZyIBZmBBZV+BY56BYd7BYF+BQ75SOj7TxWDigWLiwWLiwVjiwV6jgV8lAWBmQWImwWOmwWVmQWalAWcjgWqiwXLpQXOwQXJ7gX7dfg4BYebBY2bBZSaBZiVBZyPBZ2JBZqDBZZ+BfdX/AEF91n4AQWWmAWakwWdjQWbhwWZgQWUfAWNewWGewX7gfxMBYuKBYqJBT37EQWGhQWGhgU9TAWEiAWGhwU8bAWLiwWLiwUO+Uj3UtkV98+LBZ2IBZmCBZV9BY57BYh7BYF9BX2CBXmIBfwsiwWEjAWFiwWJjQWIiwWGjgWGjgWJjQWJjAWHkAWHkAWKjQWKjQWKkQWJkAWLjgWLjQWMkQWLkQWNjQWLjQWPkAWOkQX38vguBfvPiwV5jgV9lAWBmQWImwWOmwWVmQWZlAWdjgX4LIsFkooFkYsFjYoFjooFkIgFkYgFjIkFjYoFj4YFj4YFjIkFjIkFjIUFjYYFi4gFi4kFioUFi4UFiYkFi4kFh4YFiIYFDgAAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAA==\";var s1=te(ee(),1);var AD=te(ee(),1);var c1=te(E0(),1);var CU=te(ee(),1);var jU=te(ee(),1);var QU=te(ee(),1);var iG=te(ee(),1);function ae(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function T0(t){return typeof t\u003e\"u\"}function N0(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Na(...t){t=Array.isArray(t[0])?t[0]:t;let e=(r,i)=\u003e({a:r.a*i.a+r.c*i.b,c:r.a*i.c+r.c*i.d,e:r.a*i.e+r.c*i.f+r.e,b:r.b*i.a+r.d*i.b,d:r.b*i.c+r.d*i.d,f:r.b*i.e+r.d*i.f+r.f});switch(t.length){case 0:throw Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[r,i,...n]=t,a=e(r,i);return Na(a,...n)}}}var{cos:v4,sin:S4,PI:yV}=Math;function w4(t,e,r){let i=v4(t),n=S4(t),a={a:i,c:-n,e:0,b:n,d:i,f:0};return T0(e)||T0(r)?a:Na([N0(e,r),a,N0(-e,-r)])}var{tan:fV}=Math;function A4(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Wa(t,e,r,i){var n=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(n,Wa.prototype),n.expected=e,n.found=r,n.location=i,n.name=\"SyntaxError\",n}A4(Wa,Error);function Dc(t,e,r){return r=r||\" \",t.length\u003ee?t:(e-=t.length,r+=r.repeat(e),t+r.slice(0,e))}Wa.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var r=null,i;for(i=0;i\u003ct.length;i++)if(t[i].source===this.location.source){r=t[i].text.split(/\\r\\n|\\n|\\r/g);break}var n=this.location.start,a=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(n):n,o=this.location.source+\":\"+a.line+\":\"+a.column;if(r){var c=this.location.end,l=Dc(\"\",a.line.toString().length,\" \"),s=r[n.line-1],p=n.line===c.line?c.column:s.length+1,d=p-n.column||1;e+=`\n --\u003e `+o+`\n`+l+` |\n`+a.line+\" | \"+s+`\n`+l+\" | \"+Dc(\"\",n.column-1,\" \")+Dc(\"\",d,\"^\")}else e+=`\n at `+o}return e};Wa.buildMessage=function(t,e){var r={literal:function(s){return'\"'+n(s.text)+'\"'},class:function(s){var p=s.parts.map(function(d){return Array.isArray(d)?a(d[0])+\"-\"+a(d[1]):a(d)});return\"[\"+(s.inverted?\"^\":\"\")+p.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(s){return s.description}};function i(s){return s.charCodeAt(0).toString(16).toUpperCase()}function n(s){return s.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,\"\\\\\\\"\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(p){return\"\\\\x0\"+i(p)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(p){return\"\\\\x\"+i(p)})}function a(s){return s.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(p){return\"\\\\x0\"+i(p)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(p){return\"\\\\x\"+i(p)})}function o(s){return r[s.type](s)}function c(s){var p=s.map(o),d,m;if(p.sort(),p.length\u003e0){for(d=1,m=1;d\u003cp.length;d++)p[d-1]!==p[d]\u0026\u0026(p[m]=p[d],m++);p.length=m}switch(p.length){case 1:return p[0];case 2:return p[0]+\" or \"+p[1];default:return p.slice(0,-1).join(\", \")+\", or \"+p[p.length-1]}}function l(s){return s?'\"'+n(s)+'\"':\"end of input\"}return\"Expected \"+c(t)+\" but \"+l(e)+\" found.\"};function Ce(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,r=-1/0,i=1/0,n=-1/0,a=(o)=\u003e{e=Math.min(e,o.x),r=Math.max(r,o.x),i=Math.min(i,o.y),n=Math.max(n,o.y)};return t.forEach((o)=\u003e{switch(o.type){case\"path\":o.points.forEach(a);break;case\"text\":a({x:o.x,y:o.y});break;case\"circle\":{let{x:c,y:l,radius:s}=o;a({x:c-s,y:l-s}),a({x:c+s,y:l+s});break}case\"box\":{let{x:c,y:l,width:s,height:p}=o,d=s/2,m=p/2;a({x:c-d,y:l-m}),a({x:c+d,y:l+m});break}}}),{minX:e,maxX:r,minY:i,maxY:n}}var B4=(t,e=\"right\")=\u003e{switch(e){case\"down\":switch(t){case\"middle_top\":return\"middle_right\";case\"middle_bottom\":return\"middle_left\";case\"middle_left\":return\"middle_bottom\";case\"middle_right\":return\"middle_top\"}break;case\"up\":switch(t){case\"middle_top\":return\"middle_left\";case\"middle_bottom\":return\"middle_right\";case\"middle_left\":return\"middle_top\";case\"middle_right\":return\"middle_bottom\"}break;case\"left\":switch(t){case\"middle_top\":return\"middle_bottom\";case\"middle_bottom\":return\"middle_top\";case\"middle_left\":return\"middle_right\";case\"middle_right\":return\"middle_left\"}break;case\"right\":return t}return t},ri=(t,e)=\u003e{let{primitives:r,center:i,ports:n,size:a}=t,o=Na({a:1,b:0,c:0,d:-1,e:0,f:2*i.y}),c=r.map((s)=\u003e{switch(s={...s},s.type){case\"path\":return{...s,points:s.points.map((u)=\u003eae(o,u))};case\"text\":let p=ae(o,{x:s.x,y:s.y}),d={top_left:\"bottom_left\",top_right:\"bottom_right\",bottom_left:\"top_left\",bottom_right:\"top_right\",center:\"center\",middle_top:\"middle_bottom\",middle_bottom:\"middle_top\",middle_left:\"middle_left\",middle_right:\"middle_right\"};return{...s,x:p.x,y:p.y,anchor:d[s.anchor]};case\"circle\":case\"box\":let m=ae(o,{x:s.x,y:s.y});return{...s,x:m.x,y:m.y}}}),l=n.map((s)=\u003e({...s,...ae(o,s)}));return{primitives:c,center:i,ports:l,size:a,...e}},ii=(t,e)=\u003e{let{primitives:r,center:i,ports:n,size:a}=t,o=Na({a:-1,b:0,c:0,d:1,e:0,f:2*i.x}),c=r.map((s)=\u003e{switch(s={...s},s.type){case\"path\":return{...s,points:s.points.map((u)=\u003eae(o,u))};case\"text\":let p=ae(o,{x:s.x,y:s.y}),d={top_left:\"top_right\",top_right:\"top_left\",bottom_left:\"bottom_right\",bottom_right:\"bottom_left\",center:\"center\",middle_top:\"middle_top\",middle_bottom:\"middle_bottom\",middle_left:\"middle_right\",middle_right:\"middle_left\"};return{...s,x:p.x,y:p.y,anchor:d[s.anchor]};case\"circle\":case\"box\":let m=ae(o,{x:s.x,y:s.y});return{...s,x:m.x,y:m.y}}}),l=n.map((s)=\u003e({...s,...ae(o,s)}));return{primitives:c,center:i,ports:l,size:a,...e}},en=(t,e)=\u003e{let{newOrientation:r,overrides:i}=e,n={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},a=w4(r?n[r]:Math.PI/2,t.center.x,t.center.y),{primitives:o,center:c,size:l,ports:s}=t,p=o.map((u)=\u003e{switch(u={...u},u.type){case\"path\":return{...u,points:u.points.map((x)=\u003eae(a,x))};case\"text\":let y=ae(a,{x:u.x,y:u.y});return u.anchor=B4(u.anchor,r??\"right\"),{...u,x:y.x,y:y.y};case\"circle\":let f=ae(a,{x:u.x,y:u.y});return{...u,x:f.x,y:f.y};case\"box\":let _=ae(a,{x:u.x,y:u.y});return{...u,x:_.x,y:_.y,width:u.height,height:u.width}}}),d=s.map((u)=\u003e({...u,...ae(a,u)})),m=Ce(p);return{primitives:p,center:c,ports:d,size:{width:m.maxX-m.minX,height:m.maxY-m.minY},...i}},z=(t,e=\"down\",r={})=\u003een(t,{newOrientation:e,overrides:r}),F4=class{symbol;constructor(t){this.symbol=JSON.parse(JSON.stringify(t)),this.symbol.size=this.computeSize()}changeTextAnchor(t,e,r){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map((i)=\u003ei.type===\"text\"\u0026\u0026i.text===t?{...i,anchor:e,...r?{x:i.x+r.x,y:i.y+r.y}:{}}:i)},this}labelPort(t,e){return this.symbol={...this.symbol,ports:this.symbol.ports.map((r)=\u003er.labels.includes(t)?{...r,labels:e}:r)},this}rotateRightFacingSymbol(t){return this.symbol=en(this.symbol,{newOrientation:t}),this}computeSize(){let t=Ce(this.symbol.primitives);return{width:t.maxX-t.minX,height:t.maxY-t.minY}}build(){return{...this.symbol,size:this.computeSize()}}},F=(t)=\u003e{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],r=t.ports??Object.entries(t.refblocks).flatMap(([n,a])=\u003e[{...a,labels:[n]}]),i=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return r.length===2\u0026\u0026(i={x:(r[0].x+r[1].x)/2,y:(r[0].y+r[1].y)/2}),new F4({...t,primitives:e,ports:r,center:i})},ni={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0.04},{x:0.54,y:0.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:\"primary\",fill:!1},path17:{type:\"path\",points:[{x:0,y:-0.13},{x:0.07,y:-0.11}],color:\"primary\",fill:!1},path18:{type:\"path\",points:[{x:0.07,y:-0.11},{x:0.14,y:-0.13}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:-0.15,y:-0.13},{x:-0.07,y:-0.11}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:-0.07,y:-0.11},{x:0,y:-0.13}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.17,y:0.4},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.04,radius:0.29,color:\"primary\",fill:!1}}},{paths:P4,texts:_V,bounds:Zn,refblocks:W0,circles:I4}=ni,M4=F({primitives:[...Object.values(P4),...Object.values(I4),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.3894553499999995}],ports:[{...W0.left1,labels:[\"1\"]},{...W0.right1,labels:[\"2\"]}],size:{width:Zn.width,height:Zn.height},center:{x:Zn.centerX,y:Zn.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:k4,texts:gV,bounds:Kn,refblocks:R0,circles:C4}=ni,Y4=F({primitives:[...Object.values(k4),...Object.values(C4),{type:\"text\",text:\"{REF}\",x:-0,y:0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.4094553499999995}],ports:[{...R0.left1,labels:[\"1\"]},{...R0.right1,labels:[\"2\"]}],size:{width:Kn.width,height:Kn.height},center:{x:Kn.centerX,y:Kn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:L4,texts:xV,bounds:Jn,refblocks:O0,circles:E4}=ni,T4=F({primitives:[...Object.values(L4),...Object.values(E4),{type:\"text\",text:\"{REF}\",x:-0,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.4094553499999995}],ports:[{...O0.left1,labels:[\"1\"]},{...O0.right1,labels:[\"2\"]}],size:{width:Jn.width,height:Jn.height},center:{x:Jn.centerX,y:Jn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:N4,texts:bV,bounds:qn,refblocks:j0,circles:W4}=ni,R4=F({primitives:[...Object.values(N4),...Object.values(W4),{type:\"text\",text:\"{REF}\",x:-0,y:0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.4094553499999995}],ports:[{...j0.left1,labels:[\"1\"]},{...j0.right1,labels:[\"2\"]}],size:{width:qn.width,height:qn.height},center:{x:qn.centerX,y:qn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:O4,texts:vV,bounds:to,refblocks:$0,circles:j4}=ni,$4=F({primitives:[...Object.values(O4),...Object.values(j4),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...$0.left1,labels:[\"1\"]},{...$0.right1,labels:[\"2\"]}],size:{width:to.width,height:to.height},center:{x:to.centerX,y:to.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:X4,texts:SV,bounds:eo,refblocks:X0,circles:V4}=ni,z4=F({primitives:[...Object.values(X4),...Object.values(V4),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...X0.left1,labels:[\"1\"]},{...X0.right1,labels:[\"2\"]}],size:{width:eo.width,height:eo.height},center:{x:eo.centerX,y:eo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),oi={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:0.14,y:0.18},{x:0.08,y:0.2}],color:\"primary\",fill:!1},\"path43-8-3\":{type:\"path\",points:[{x:0.21,y:-0.11},{x:0.15,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:D4,texts:wV,bounds:ro,refblocks:V0,circles:U4}=oi,G4=F({primitives:[...Object.values(D4),...Object.values(U4),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.3294553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.3294553499999995}],ports:[{...V0.left1,labels:[\"1\"]},{...V0.right1,labels:[\"2\"]}],size:{width:ro.width,height:ro.height},center:{x:ro.centerX,y:ro.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Q4=F(oi).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:H4,texts:AV,bounds:io,refblocks:z0,circles:Z4}=oi,K4=F({primitives:[...Object.values(H4),...Object.values(Z4),{type:\"text\",text:\"{REF}\",x:-0,y:-0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.3294553499999995}],ports:[{...z0.left1,labels:[\"1\"]},{...z0.right1,labels:[\"2\"]}],size:{width:io.width,height:io.height},center:{x:io.centerX,y:io.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),J4=F(oi).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:q4,texts:BV,bounds:no,refblocks:D0,circles:t5}=oi,e5=F({primitives:[...Object.values(q4),...Object.values(t5),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2294553499999995}],ports:[{...D0.left1,labels:[\"1\"]},{...D0.right1,labels:[\"2\"]}],size:{width:no.width,height:no.height},center:{x:no.centerX,y:no.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:r5,texts:FV,bounds:oo,refblocks:U0,circles:i5}=oi,n5=F({primitives:[...Object.values(r5),...Object.values(i5),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2294553499999995}],ports:[{...U0.left1,labels:[\"1\"]},{...U0.right1,labels:[\"2\"]}],size:{width:oo.width,height:oo.height},center:{x:oo.centerX,y:oo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Ra={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:0.18,y:0.18},{x:0.11,y:0.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:0.18,y:-0.09},{x:0.11,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:o5,texts:PV,bounds:ao,refblocks:G0,circles:a5}=Ra,s5=F({primitives:[...Object.values(o5),...Object.values(a5),{type:\"text\",text:\"{REF}\",x:-0.16,y:0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0.16,y:0.2294553499999995}],ports:[{...G0.left1,labels:[\"1\"]},{...G0.right1,labels:[\"2\"]}],size:{width:ao.width,height:ao.height},center:{x:ao.centerX,y:ao.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:c5,texts:IV,bounds:so,refblocks:Q0,circles:l5}=Ra,hx=F({primitives:[...Object.values(c5),...Object.values(l5),{type:\"text\",text:\"{REF}\",x:-0.0001118,y:-0.18},{type:\"text\",text:\"{VAL}\",x:0.0001118,y:0.2738453}],ports:[{...Q0.left1,labels:[\"1\"]},{...Q0.right1,labels:[\"2\"]}],size:{width:so.width,height:so.height},center:{x:so.centerX,y:so.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:p5,texts:MV,bounds:co,refblocks:H0,circles:h5}=Ra,d5=F({primitives:[...Object.values(p5),...Object.values(h5),{type:\"text\",text:\"{REF}\",x:-0.0050250999999996715,y:0.27384529999999985,anchor:\"middle_left\"},{type:\"text\",text:\"{VAL}\",x:-0.00011179999999999524,y:-0.27384530000000007,anchor:\"middle_left\"}],ports:[{...H0.left1,labels:[\"1\"]},{...H0.right1,labels:[\"2\"]}],size:{width:co.width,height:co.height},center:{x:co.centerX,y:co.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"right1\",[\"2\"]).labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:kV,texts:CV,bounds:YV,refblocks:LV,circles:EV}=Ra,Sl=z(hx,\"down\"),wl=Sl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Al=Sl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");wl.anchor=\"middle_left\";Al.anchor=\"middle_left\";wl.x=0.25;wl.y+=0.21;Al.y-=0.21;Al.x=0.25;var m5=Sl,rn={paths:{path43:{type:\"path\",points:[{x:-0.06,y:0.19},{x:-0.06,y:-0.12}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:0.02,y:0.13},{x:0.02,y:-0.06}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.06,y:0.03},{x:-0.5,y:0.03}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.5,y:0.03},{x:0.03,y:0.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.03,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.03,y:-0.28}},refblocks:{left1:{x:-0.5,y:0.03},right1:{x:0.5,y:0.03}},bounds:{minX:-0.5,maxX:0.5,minY:-0.38,maxY:0.27,width:1,height:0.29,centerX:0,centerY:0.06},circles:{}},{paths:u5,bounds:Z0,refblocks:K0,circles:y5}=rn,f5=F({primitives:[...Object.values(u5),...Object.values(y5),{type:\"text\",text:\"{REF}\",x:-0.2,y:0.31},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.31}],ports:[{...K0.left1,labels:[\"1\"]},{...K0.right1,labels:[\"2\"]}],center:{x:Z0.centerX,y:Z0.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),_5={...f5,size:{width:1,height:0.9}};function It(t){let e=t.size;if(!e){let r=Ce(t.primitives);e={width:r.maxX-r.minX,height:r.maxY-r.minY}}return{...t,size:e}}var{paths:g5,texts:J0,bounds:lo,refblocks:q0,circles:x5}=rn,dx=It({primitives:[...Object.values(g5),...Object.values(x5),{...J0.top1,anchor:\"middle_bottom\"},{...J0.bottom1,anchor:\"middle_top\"}],ports:[{...q0.left1,labels:[\"1\"]},{...q0.right1,labels:[\"2\"]}],size:{width:lo.width,height:lo.height},center:{x:lo.centerX,y:lo.centerY}}),{paths:b5,bounds:t_,refblocks:e_,circles:v5}=rn,S5=F({primitives:[...Object.values(b5),...Object.values(v5),{type:\"text\",text:\"{REF}\",x:0,y:-0.22},{type:\"text\",text:\"{VAL}\",x:0,y:0.28}],ports:[{...e_.left1,labels:[\"1\"]},{...e_.right1,labels:[\"2\"]}],center:{x:t_.centerX,y:t_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),w5={...S5,size:{width:1,height:0.65}},{paths:A5,bounds:r_,refblocks:i_,circles:B5}=rn,F5=F({primitives:[...Object.values(A5),...Object.values(B5),{type:\"text\",text:\"{REF}\",x:0,y:0.28},{type:\"text\",text:\"{VAL}\",x:0,y:-0.22}],ports:[{...i_.left1,labels:[\"1\"]},{...i_.right1,labels:[\"2\"]}],center:{x:r_.centerX,y:r_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),P5={...F5,size:{width:1,height:0.65}},{paths:I5,bounds:n_,refblocks:o_,circles:M5}=rn,k5=F({primitives:[...Object.values(I5),...Object.values(M5),{type:\"text\",text:\"{REF}\",x:0.2,y:-0.25},{type:\"text\",text:\"{VAL}\",x:-0.2,y:-0.25}],ports:[{...o_.left1,labels:[\"1\"]},{...o_.right1,labels:[\"2\"]}],center:{x:n_.centerX,y:n_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),C5={...k5,size:{width:1,height:0.9}},Y5=en(dx,{newOrientation:\"up\"}),Oa={paths:{path1:{type:\"path\",points:[{x:-0.3,y:0},{x:-0.19998,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path2:{type:\"path\",points:[{x:0.19998,y:0},{x:0.3,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path3:{type:\"path\",points:[{x:-0.19998,y:0.07998},{x:0.19998,y:0.07998},{x:0.19998,y:-0.07998},{x:-0.19998,y:-0.07998},{x:-0.19998,y:0.07998}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.3,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.45,anchor:\"middle_bottom\"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.45,maxY:0.3,width:0.6,height:0.75,centerX:0,centerY:0},circles:{}},{paths:L5,texts:TV,bounds:a_,refblocks:s_,circles:E5}=Oa,T5=F({primitives:[...Object.values(L5),...Object.values(E5),{type:\"text\",text:\"{REF}\",x:-0.16,y:0.16},{type:\"text\",text:\"{VAL}\",x:0.16,y:0.16}],ports:[{...s_.left1,labels:[\"1\"]},{...s_.right1,labels:[\"2\"]}],center:{x:a_.centerX,y:a_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),N5={...T5,size:{width:0.9,height:0.6}},{paths:W5,texts:NV,bounds:c_,refblocks:l_,circles:R5}=Oa,O5=F({primitives:[...Object.values(W5),...Object.values(R5),{type:\"text\",text:\"{REF}\",x:0,y:-0.16},{type:\"text\",text:\"{VAL}\",x:0,y:0.16}],ports:[{...l_.left1,labels:[\"1\"]},{...l_.right1,labels:[\"2\"]}],center:{x:c_.centerX,y:c_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),j5={...O5,size:{width:0.6,height:0.65}},{paths:$5,texts:WV,bounds:p_,refblocks:h_,circles:X5}=Oa,V5=F({primitives:[...Object.values($5),...Object.values(X5),{type:\"text\",text:\"{REF}\",x:0,y:0.16},{type:\"text\",text:\"{VAL}\",x:0,y:-0.16}],ports:[{...h_.left1,labels:[\"1\"]},{...h_.right1,labels:[\"2\"]}],center:{x:p_.centerX,y:p_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),z5={...V5,size:{width:0.6,height:0.65}},ja={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.25,y:0},{x:-0.175,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},body:{type:\"path\",points:[{x:-0.175,y:0.075},{x:0.175,y:0.075},{x:0.175,y:-0.075},{x:-0.175,y:-0.075},{x:-0.175,y:0.075}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-lead\":{type:\"path\",points:[{x:0.175,y:0},{x:0.25,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},D5={boxresistor:{horizontalOffset:0.16,horizontalHeight:0.65,verticalX:0.16,verticalRefY:0.16,verticalValY:-0.16,verticalWidth:0.9},capacitor:{horizontalOffset:0.24,horizontalHeight:0.65,verticalX:0.2,verticalRefY:0.095,verticalValY:-0.095,verticalWidth:0.9},resistor:{horizontalOffset:0.22,horizontalHeight:0.65,verticalX:0.2,verticalRefY:0.14,verticalValY:-0.14,verticalWidth:0.9}},Nt=(t,{kind:e,orientation:r,pin1Labels:i=[\"1\"],pin2Labels:n=[\"2\"]})=\u003e{let a=D5[e],o=F({...t,texts:{}}).rotateRightFacingSymbol(r).labelPort(\"left1\",i).labelPort(\"right1\",n).build(),c=r===\"right\"||r===\"left\",l=c?[{type:\"text\",text:\"{REF}\",x:0,y:a.horizontalOffset,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-a.horizontalOffset,anchor:\"middle_top\"}]:[{type:\"text\",text:\"{REF}\",x:a.verticalX,y:a.verticalRefY,anchor:\"middle_left\"},{type:\"text\",text:\"{VAL}\",x:a.verticalX,y:a.verticalValY,anchor:\"middle_left\"}],[s,p]=o.ports,d=Math.hypot(p.x-s.x,p.y-s.y);return{...o,primitives:[...o.primitives,...l],size:c?{width:d,height:a.horizontalHeight}:{width:a.verticalWidth,height:d}}},U5=Nt(ja,{kind:\"boxresistor\",orientation:\"down\"}),G5=Nt(ja,{kind:\"boxresistor\",orientation:\"left\"}),Q5=Nt(ja,{kind:\"boxresistor\",orientation:\"right\"}),H5=Nt(ja,{kind:\"boxresistor\",orientation:\"up\"}),$a={paths:{path2:{type:\"path\",points:[{x:0.15,y:-0.01},{x:0.55,y:-0.01}],color:\"primary\",fill:!0},\"path2-5\":{type:\"path\",points:[{x:-0.15,y:0.06},{x:0.14,y:0.06}],color:\"primary\",fill:!0},\"path2-5-1\":{type:\"path\",points:[{x:0.14,y:0.06},{x:0.14,y:-0.08}],color:\"primary\",fill:!0},\"path2-5-1-6\":{type:\"path\",points:[{x:-0.16,y:0.06},{x:-0.16,y:-0.08}],color:\"primary\",fill:!0},\"path2-5-4\":{type:\"path\",points:[{x:-0.15,y:-0.08},{x:0.14,y:-0.08}],color:\"primary\",fill:!0},\"path2-9\":{type:\"path\",points:[{x:-0.55,y:-0.01},{x:-0.17,y:-0.01}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.17},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.17}},refblocks:{left1:{x:-0.55,y:-0.01},right1:{x:0.55,y:-0.01}},bounds:{minX:-0.58,maxX:0.58,minY:-0.17,maxY:0.17,width:1.16,height:0.35,centerX:0,centerY:0},circles:{}},{paths:Z5,texts:RV,bounds:po,refblocks:d_,circles:K5}=$a,J5=F({primitives:[...Object.values(Z5),...Object.values(K5),{type:\"text\",text:\"{REF}\",x:-0.2,y:0.1404553499999995},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.1494553499999995}],ports:[{...d_.left1,labels:[\"1\"]},{...d_.right1,labels:[\"2\"]}],size:{width:po.width,height:po.height},center:{x:po.centerX,y:po.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:q5,texts:OV,bounds:ho,refblocks:m_,circles:tv}=$a,ev=F({primitives:[...Object.values(q5),...Object.values(tv),{type:\"text\",text:\"{REF}\",x:0,y:-0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.1704553499999995}],ports:[{...m_.left1,labels:[\"1\"]},{...m_.right1,labels:[\"2\"]}],size:{width:ho.width,height:ho.height},center:{x:ho.centerX,y:ho.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:rv,texts:jV,bounds:mo,refblocks:u_,circles:iv}=$a,nv=F({primitives:[...Object.values(rv),...Object.values(iv),{type:\"text\",text:\"{REF}\",x:0,y:0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.1704553499999995}],ports:[{...u_.left1,labels:[\"1\"]},{...u_.right1,labels:[\"2\"]}],size:{width:mo.width,height:mo.height},center:{x:mo.centerX,y:mo.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:ov,texts:$V,bounds:uo,refblocks:y_,circles:av}=$a,sv=F({primitives:[...Object.values(ov),...Object.values(av),{type:\"text\",text:\"{REF}\",x:0.2,y:-0.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-0.2,y:-0.1494553499999995}],ports:[{...y_.left1,labels:[\"1\"]},{...y_.right1,labels:[\"2\"]}],size:{width:uo.width,height:uo.height},center:{x:uo.centerX,y:uo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:cv,texts:XV,bounds:f_,refblocks:__,circles:lv}=Oa,pv=F({primitives:[...Object.values(cv),...Object.values(lv),{type:\"text\",text:\"{REF}\",x:0.16,y:-0.16},{type:\"text\",text:\"{VAL}\",x:-0.16,y:-0.16}],ports:[{...__.left1,labels:[\"1\"]},{...__.right1,labels:[\"2\"]}],center:{x:f_.centerX,y:f_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),hv={...pv,size:{width:0.9,height:0.6}},Xa={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.175,y:0},{x:-0.14,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},body:{type:\"path\",points:[{x:-0.14,y:0.065},{x:0.14,y:0.065},{x:0.14,y:-0.065},{x:-0.14,y:-0.065},{x:-0.14,y:0.065}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-lead\":{type:\"path\",points:[{x:0.14,y:0},{x:0.175,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},dv=Nt(Xa,{kind:\"boxresistor\",orientation:\"down\"}),mv=Nt(Xa,{kind:\"boxresistor\",orientation:\"left\"}),uv=Nt(Xa,{kind:\"boxresistor\",orientation:\"right\"}),yv=Nt(Xa,{kind:\"boxresistor\",orientation:\"up\"}),Bl={paths:{\"horizontal-bar\":{type:\"path\",points:[{x:-0.4,y:0},{x:0.4,y:0}],color:\"primary\",fill:!1},\"middle-dash-1\":{type:\"path\",points:[{x:0,y:0.2},{x:0,y:0.07}],color:\"primary\",fill:!1},\"middle-dash-2\":{type:\"path\",points:[{x:0,y:0.01},{x:0,y:-0.12}],color:\"primary\",fill:!1},\"middle-dash-3\":{type:\"path\",points:[{x:0,y:-0.18},{x:0,y:-0.31}],color:\"primary\",fill:!1},\"left-vertical\":{type:\"path\",points:[{x:-0.25,y:0},{x:-0.25,y:-0.2}],color:\"primary\",fill:!1},\"right-vertical\":{type:\"path\",points:[{x:0.25,y:0},{x:0.25,y:-0.2}],color:\"primary\",fill:!1},\"left-ground\":{type:\"path\",points:[{x:-0.3,y:-0.2},{x:-0.25,y:-0.3},{x:-0.2,y:-0.2},{x:-0.3,y:-0.2}],color:\"primary\",fill:!1},\"right-ground\":{type:\"path\",points:[{x:0.2,y:-0.2},{x:0.25,y:-0.3},{x:0.3,y:-0.2},{x:0.2,y:-0.2}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-0.4,y:0},right1:{x:0.4,y:0}},texts:{ref:{type:\"text\",text:\"{REF}\",x:0,y:0.35}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.35,width:0.8,height:0.75,centerX:0,centerY:-0.02},circles:{}},{paths:fv,texts:VV,bounds:g_,refblocks:x_,circles:_v}=Bl,gv=F({primitives:[...Object.values(fv),...Object.values(_v),{type:\"text\",text:\"{REF}\",x:0,y:0.2594553499999995}],ports:[{...x_.left1,labels:[\"1\"]},{...x_.right1,labels:[\"2\"]}],center:{x:g_.centerX,y:g_.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:xv,texts:zV,bounds:b_,refblocks:v_,circles:bv}=Bl,mx=F({primitives:[...Object.values(xv),...Object.values(bv),{type:\"text\",text:\"{REF}\",x:0,y:0.2594553499999995}],ports:[{...v_.left1,labels:[\"1\"]},{...v_.right1,labels:[\"2\"]}],center:{x:b_.centerX,y:b_.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),vv=ii(mx),{paths:Sv,texts:DV,bounds:S_,refblocks:w_,circles:wv}=Bl,Av=F({primitives:[...Object.values(Sv),...Object.values(wv),{type:\"text\",text:\"{REF}\",x:0,y:0.2594553499999995}],ports:[{...w_.left1,labels:[\"1\"]},{...w_.right1,labels:[\"2\"]}],center:{x:S_.centerX,y:S_.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),Va={paths:{path27:{type:\"path\",points:[{x:0.3,y:0},{x:0.06,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path28:{type:\"path\",points:[{x:-0.06,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path29:{type:\"path\",points:[{x:0.06,y:0.16002},{x:0.06,y:-0.16002}],color:\"primary\",fill:!1,strokeWidth:0.012},path30:{type:\"path\",points:[{x:-0.06,y:0.16002},{x:-0.06,y:-0.16002}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.24,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.24,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.24,maxY:0.24,width:0.6,height:0.48,centerX:0,centerY:0},circles:{}},{paths:Bv,texts:UV,bounds:yo,refblocks:A_,circles:Fv}=Va,Pv=F({primitives:[...Object.values(Bv),...Object.values(Fv),{type:\"text\",text:\"{REF}\",x:-0.2,y:0.115},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.115}],ports:[{...A_.left1,labels:[\"1\"]},{...A_.right1,labels:[\"2\"]}],size:{width:yo.width,height:yo.height},center:{x:yo.centerX,y:yo.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),Iv={...Pv,size:{width:0.9,height:0.6}},Mv=F(Va).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),kv={...Mv,size:{width:0.6,height:0.65}},za={paths:{path27:{type:\"path\",points:[{x:0.3,y:0},{x:0.000657,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path28:{type:\"path\",points:[{x:-0.038683,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},path30:{type:\"path\",points:[{x:-0.074255,y:0.16002},{x:-0.074255,y:0.16002},{x:-0.069544,y:0.149352},{x:-0.065126,y:0.138684},{x:-0.061005,y:0.128016},{x:-0.057182,y:0.117348},{x:-0.053663,y:0.10668},{x:-0.05045,y:0.096012},{x:-0.047547,y:0.085344},{x:-0.044957,y:0.074676},{x:-0.042684,y:0.064008},{x:-0.040732,y:0.05334},{x:-0.039103,y:0.042672},{x:-0.037801,y:0.032004},{x:-0.03683,y:0.021336},{x:-0.036193,y:0.010668},{x:-0.035893,y:0},{x:-0.036193,y:-0.010668},{x:-0.03683,y:-0.021336},{x:-0.037801,y:-0.032004},{x:-0.039103,y:-0.042672},{x:-0.040732,y:-0.05334},{x:-0.042684,y:-0.064008},{x:-0.044957,y:-0.074676},{x:-0.047547,y:-0.085344},{x:-0.05045,y:-0.096012},{x:-0.053663,y:-0.10668},{x:-0.057182,y:-0.117348},{x:-0.061005,y:-0.128016},{x:-0.065126,y:-0.138684},{x:-0.069544,y:-0.149352},{x:-0.074255,y:-0.16002},{x:-0.074255,y:-0.16002}],color:\"primary\",fill:!1,strokeWidth:0.012},\"path30-7\":{type:\"path\",points:[{x:-0.000385,y:0.16002},{x:-0.000385,y:-0.16002}],color:\"primary\",fill:!1,strokeWidth:0.012},\"path30-9-2\":{type:\"path\",points:[{x:0.156026,y:0.2},{x:0.085846,y:0.2}],color:\"primary\",fill:!1,strokeWidth:0.012},\"path30-9-2-9\":{type:\"path\",points:[{x:0.120936,y:0.16491},{x:0.120936,y:0.23509}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.42,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.42,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.55,maxY:0.55,width:0.6,height:1.1,centerX:0,centerY:0},circles:{\"viewbox-padding-min\":{type:\"circle\",x:-0.3,y:-0.55,radius:0,fill:!1,color:\"transparent\"},\"viewbox-padding-max\":{type:\"circle\",x:0.3,y:0.55,radius:0,fill:!1,color:\"transparent\"}}},Cv=F(za).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.7,y:0.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-0.12,y:-0.3}).build(),Yv=F(za).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Lv=F(za).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.78}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-0.78}).build(),Ev=F(za).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-0.12,y:0.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.72,y:-0.3}).build(),Tv=F(Va).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Nv={...Tv,size:{width:0.6,height:0.65}},Da={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.25,y:0},{x:-0.06,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},\"left-plate\":{type:\"path\",points:[{x:-0.06,y:0.16},{x:-0.06,y:-0.16}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-plate\":{type:\"path\",points:[{x:0.06,y:0.16},{x:0.06,y:-0.16}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-lead\":{type:\"path\",points:[{x:0.06,y:0},{x:0.25,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},Wv=Nt(Da,{kind:\"capacitor\",orientation:\"down\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),Rv=Nt(Da,{kind:\"capacitor\",orientation:\"left\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),Ov=Nt(Da,{kind:\"capacitor\",orientation:\"right\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),jv=Nt(Da,{kind:\"capacitor\",orientation:\"up\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),{paths:$v,texts:GV,bounds:fo,refblocks:B_,circles:Xv}=Va,Vv=F({primitives:[...Object.values($v),...Object.values(Xv),{type:\"text\",text:\"{REF}\",x:0.2,y:-0.095},{type:\"text\",text:\"{VAL}\",x:-0.2,y:-0.095}],ports:[{...B_.left1,labels:[\"1\"]},{...B_.right1,labels:[\"2\"]}],size:{width:fo.width,height:fo.height},center:{x:fo.centerX,y:fo.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),zv={...Vv,size:{width:0.9,height:0.6}},Ua={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.175,y:0},{x:-0.05,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012},\"left-plate\":{type:\"path\",points:[{x:-0.05,y:0.14},{x:-0.05,y:-0.14}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-plate\":{type:\"path\",points:[{x:0.05,y:0.14},{x:0.05,y:-0.14}],color:\"primary\",fill:!1,strokeWidth:0.012},\"right-lead\":{type:\"path\",points:[{x:0.05,y:0},{x:0.175,y:0}],color:\"primary\",fill:!1,strokeWidth:0.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},Dv=Nt(Ua,{kind:\"capacitor\",orientation:\"down\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),Uv=Nt(Ua,{kind:\"capacitor\",orientation:\"left\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),Gv=Nt(Ua,{kind:\"capacitor\",orientation:\"right\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),Qv=Nt(Ua,{kind:\"capacitor\",orientation:\"up\",pin1Labels:[\"1\",\"pos\"],pin2Labels:[\"2\",\"neg\"]}),ai={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.29,y:0.29},{x:0.29,y:-0.23}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.02,y:0.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:-0.37}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.04,radius:0.29,color:\"primary\",fill:!1}}},{paths:Hv,texts:QV,bounds:_o,refblocks:F_,circles:Zv}=ai,Kv=F({primitives:[...Object.values(Hv),...Object.values(Zv),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.3894553499999995}],ports:[{...F_.left1,labels:[\"1\"]},{...F_.right1,labels:[\"2\"]}],size:{width:_o.width,height:_o.height},center:{x:_o.centerX,y:_o.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Jv=F(ai).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:qv,texts:HV,bounds:go,refblocks:P_,circles:tS}=ai,eS=F({primitives:[...Object.values(qv),...Object.values(tS),{type:\"text\",text:\"{REF}\",x:-0,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.3894553499999995}],ports:[{...P_.left1,labels:[\"1\"]},{...P_.right1,labels:[\"2\"]}],size:{width:go.width,height:go.height},center:{x:go.centerX,y:go.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),rS=F(ai).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:iS,texts:ZV,bounds:xo,refblocks:I_,circles:nS}=ai,oS=F({primitives:[...Object.values(iS),...Object.values(nS),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...I_.left1,labels:[\"1\"]},{...I_.right1,labels:[\"2\"]}],size:{width:xo.width,height:xo.height},center:{x:xo.centerX,y:xo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:aS,texts:KV,bounds:bo,refblocks:M_,circles:sS}=ai,cS=F({primitives:[...Object.values(aS),...Object.values(sS),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...M_.left1,labels:[\"1\"]},{...M_.right1,labels:[\"2\"]}],size:{width:bo.width,height:bo.height},center:{x:bo.centerX,y:bo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Ga={paths:{path27:{type:\"path\",points:[{x:0.54,y:-0.01},{x:0.13,y:-0.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:0.13,y:0.25},{x:0.13,y:-0.27}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:0.07,y:0.25},{x:0.07,y:-0.28}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-0.14,y:0.25},{x:-0.14,y:-0.27}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-0.08,y:0.26},{x:-0.08,y:-0.27}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:0.07,y:0.26},{x:-0.08,y:0.26}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:0.07,y:-0.28},{x:-0.08,y:-0.28}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-0.21,y:0.32},{x:0.2,y:0.32}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:0.71},{x:0,y:0.33},{x:0,y:0.32}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:-0.21,y:0.32},{x:-0.21,y:0.25}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:0.2,y:0.32},{x:0.2,y:0.25}],color:\"primary\",fill:!1},\"path43-9\":{type:\"path\",points:[{x:0.19,y:-0.35},{x:-0.22,y:-0.35}],color:\"primary\",fill:!1},\"path44-0-5\":{type:\"path\",points:[{x:-0.02,y:-0.71},{x:-0.02,y:-0.36},{x:-0.02,y:-0.35}],color:\"primary\",fill:!1},\"path43-8-1\":{type:\"path\",points:[{x:0.19,y:-0.35},{x:0.19,y:-0.28}],color:\"primary\",fill:!1},\"path43-8-8-9\":{type:\"path\",points:[{x:-0.22,y:-0.35},{x:-0.22,y:-0.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-0.14,y:-0.01},{x:-0.54,y:-0.01}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"{REF}\",x:0.53,y:0.28},right1:{type:\"text\",text:\"{VAL}\",x:0.54,y:-0.28}},refblocks:{top1:{x:0,y:0.71},bottom1:{x:-0.02,y:-0.71},left1:{x:-0.54,y:-0.01},right1:{x:0.54,y:-0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.74,maxY:0.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:lS,texts:JV,bounds:vo,refblocks:So,circles:pS}=Ga,hS=F({primitives:[...Object.values(lS),...Object.values(pS),{type:\"text\",text:\"{REF}\",x:-0.4,y:0.4094554499999995},{type:\"text\",text:\"{VAL}\",x:0.4,y:0.4094553499999995}],ports:[{...So.left1,labels:[\"1\"]},{...So.right1,labels:[\"3\"]},{...So.bottom1,labels:[\"2\"]},{...So.top1,labels:[\"4\"]}],size:{width:vo.width,height:vo.height},center:{x:vo.centerX,y:vo.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),dS=F(Ga).labelPort(\"top1\",[\"2\",\"gnd1\"]).labelPort(\"bottom1\",[\"4\",\"gnd2\"]).labelPort(\"left1\",[\"3\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),mS=F(Ga).labelPort(\"top1\",[\"4\",\"gnd1\"]).labelPort(\"bottom1\",[\"2\",\"gnd2\"]).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),{paths:uS,texts:qV,bounds:wo,refblocks:Ao,circles:yS}=Ga,fS=F({primitives:[...Object.values(uS),...Object.values(yS),{type:\"text\",text:\"{VAL}\",x:-0.4,y:-0.4094554499999995},{type:\"text\",text:\"{REF}\",x:0.4,y:-0.4094553499999995}],ports:[{...Ao.left1,labels:[\"1\"]},{...Ao.right1,labels:[\"3\"]},{...Ao.bottom1,labels:[\"2\"]},{...Ao.top1,labels:[\"4\"]}],size:{width:wo.width,height:wo.height},center:{x:wo.centerX,y:wo.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),Qa={paths:{path27:{type:\"path\",points:[{x:0.55,y:-0.01},{x:0.13,y:-0.01}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-0.14,y:-0.01},{x:-0.55,y:-0.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:0.13,y:-0.28},{x:0.13,y:0.25}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:0.07,y:-0.28},{x:0.07,y:0.25}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-0.14,y:-0.28},{x:-0.14,y:0.25}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-0.08,y:-0.28},{x:-0.08,y:0.25}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:0.07,y:-0.28},{x:-0.08,y:-0.28}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:0.07,y:0.26},{x:-0.08,y:0.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:-0.42},bottom1:{type:\"text\",text:\"{REF}\",x:0,y:0.43}},refblocks:{left1:{x:-0.55,y:-0.01},right1:{x:0.55,y:-0.01}},bounds:{minX:-0.58,maxX:0.58,minY:-0.52,maxY:0.43,width:1.16,height:1,centerX:0,centerY:-0.04},circles:{}},{paths:_S,texts:tz,bounds:Bo,refblocks:k_,circles:gS}=Qa,xS=F({primitives:[...Object.values(_S),...Object.values(gS),{type:\"text\",text:\"{REF}\",x:-0.3,y:0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0.3,y:0.3094553499999995}],ports:[{...k_.left1,labels:[\"1\"]},{...k_.right1,labels:[\"2\"]}],size:{width:Bo.width,height:Bo.height},center:{x:Bo.centerX,y:Bo.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),bS=F(Qa).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),vS=F(Qa).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:SS,texts:ez,bounds:Fo,refblocks:C_,circles:wS}=Qa,AS=F({primitives:[...Object.values(SS),...Object.values(wS),{type:\"text\",text:\"{REF}\",x:0.3,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:-0.3094553499999995}],ports:[{...C_.left1,labels:[\"1\"]},{...C_.right1,labels:[\"2\"]}],size:{width:Fo.width,height:Fo.height},center:{x:Fo.centerX,y:Fo.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),Zi=0.6,Uc=0.3,BS=[{type:\"path\",points:[{x:-Zi,y:0},{x:-Uc,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:Uc,y:0},{x:Zi,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:Uc,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:\"primary\",fill:!1}],FS=F({primitives:[...BS,{type:\"text\",text:\"{REF}\",x:-0.2,y:0.35},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.35}],ports:[{x:-Zi,y:0,labels:[\"1\"]},{x:Zi,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:Zi*2,height:0.9}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Ki=0.6,Gc=0.3,PS=[{type:\"path\",points:[{x:-Ki,y:0},{x:-Gc,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:Gc,y:0},{x:Ki,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:Gc,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:\"primary\",fill:!1}],IS=F({primitives:[...PS,{type:\"text\",text:\"{REF}\",x:0,y:-0.4},{type:\"text\",text:\"{VAL}\",x:0,y:0.4}],ports:[{x:-Ki,y:0,labels:[\"1\"]},{x:Ki,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:Ki*2,height:0.9}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Ji=0.6,Qc=0.3,MS=[{type:\"path\",points:[{x:-Ji,y:0},{x:-Qc,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:Qc,y:0},{x:Ji,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:Qc,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:\"primary\",fill:!1}],kS=F({primitives:[...MS,{type:\"text\",text:\"{REF}\",x:0,y:0.4},{type:\"text\",text:\"{VAL}\",x:0,y:-0.4}],ports:[{x:-Ji,y:0,labels:[\"1\"]},{x:Ji,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:Ji*2,height:0.9}}).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),qi=0.6,Hc=0.3,CS=[{type:\"path\",points:[{x:-qi,y:0},{x:-Hc,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:Hc,y:0},{x:qi,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:Hc,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:\"primary\",fill:!1}],YS=F({primitives:[...CS,{type:\"text\",text:\"{REF}\",x:0.2,y:-0.35},{type:\"text\",text:\"{VAL}\",x:-0.2,y:-0.35}],ports:[{x:-qi,y:0,labels:[\"1\"]},{x:qi,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:qi*2,height:0.9}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),si={paths:{path11:{type:\"path\",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:\"primary\",fill:!1},\"arrow-2\":{type:\"path\",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:\"primary\",fill:!0},path1:{type:\"path\",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:\"primary\",fill:!1},\"arrow-1\":{type:\"path\",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:\"primary\",fill:!0},path9:{type:\"path\",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:1.88,y:-1.94},right1:{type:\"text\",text:\"{REF}\",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:0.77,height:0.86,centerX:1.96,centerY:-1.55},circles:{\"path1-0\":{type:\"circle\",x:2.05,y:-1.54,radius:0.3,color:\"primary\",fill:!1}}},LS=F(si).rotateRightFacingSymbol(\"down\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.8,y:-0.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:0.15}).build(),ES=F(si).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),TS=F(si).rotateRightFacingSymbol(\"left\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-0.8}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:0.8}).build(),NS=F(si).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),WS=F(si).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-0.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.8,y:0.15}).build(),RS=F(si).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-0.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.8,y:0.15}).build(),OS={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-0.12,y:0.09},{x:0.12,y:0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.45},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.35},left1:{type:\"text\",text:\"A\",x:0,y:-0.1}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:-0.09,maxY:0.09,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:Y_,bounds:Po,refblocks:L_,circles:jS}=OS,nn=It({primitives:[Y_.path11,Y_.path12,{type:\"path\",points:[{x:-0.12,y:0.14},{x:0.12,y:0.14}],color:\"primary\",fill:!1},...Object.values(jS),{type:\"text\",text:\"{REF}\",x:0,y:0.3594553499999995,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-0.35,anchor:\"middle_top\"},{type:\"path\",points:[{x:-0.095,y:-0.16},{x:0,y:0.09}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0,y:0.09},{x:0.095,y:-0.16}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:-0.048,y:-0.045},{x:0.048,y:-0.045}],color:\"primary\",fill:!1}],ports:[{...L_.left1,labels:[\"1\"]},{...L_.right1,labels:[\"2\"]}],size:{width:Po.width,height:Po.height},center:{x:Po.centerX,y:Po.centerY}}),gl=structuredClone(nn);gl.primitives=gl.primitives.map((t)=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:-0.16,y:0.3594553499999995,anchor:\"middle_bottom\"}:t.text===\"{VAL}\"?{...t,x:0.16,y:0.35,anchor:\"middle_bottom\"}:t);var E_=en(gl,{newOrientation:\"down\"}),$S=ii(nn),XS=nn,xl=structuredClone(nn);xl.primitives=xl.primitives.map((t)=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:0.16,y:-0.3594553499999995,anchor:\"middle_top\"}:t.text===\"{VAL}\"?{...t,x:-0.16,y:-0.35,anchor:\"middle_top\"}:t);var VS=en(xl,{newOrientation:\"up\"}),ci={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0.04},{x:0.54,y:0.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-0.12,y:-0.14},{x:0.12,y:-0.14}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.17,y:0.4},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.04,radius:0.29,color:\"primary\",fill:!1}}},{paths:zS,texts:rz,bounds:Io,refblocks:T_,circles:DS}=ci,US=F({primitives:[...Object.values(zS),...Object.values(DS),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.3894553499999995}],ports:[{...T_.left1,labels:[\"1\"]},{...T_.right1,labels:[\"2\"]}],size:{width:Io.width,height:Io.height},center:{x:Io.centerX,y:Io.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:GS,texts:iz,bounds:Mo,refblocks:N_,circles:QS}=ci,HS=F({primitives:[...Object.values(GS),...Object.values(QS),{type:\"text\",text:\"{REF}\",x:-0,y:0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.3294553499999995}],ports:[{...N_.left1,labels:[\"1\"]},{...N_.right1,labels:[\"2\"]}],size:{width:Mo.width,height:Mo.height},center:{x:Mo.centerX,y:Mo.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ZS,texts:nz,bounds:ko,refblocks:W_,circles:KS}=ci,JS=F({primitives:[...Object.values(ZS),...Object.values(KS),{type:\"text\",text:\"{REF}\",x:-0,y:-0.3294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.4294553499999995}],ports:[{...W_.left1,labels:[\"1\"]},{...W_.right1,labels:[\"2\"]}],size:{width:ko.width,height:ko.height},center:{x:ko.centerX,y:ko.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:qS,texts:oz,bounds:Co,refblocks:R_,circles:t3}=ci,e3=F({primitives:[...Object.values(qS),...Object.values(t3),{type:\"text\",text:\"{REF}\",x:-0,y:0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.3294553499999995}],ports:[{...R_.left1,labels:[\"1\"]},{...R_.right1,labels:[\"2\"]}],size:{width:Co.width,height:Co.height},center:{x:Co.centerX,y:Co.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:r3,texts:az,bounds:Yo,refblocks:O_,circles:i3}=ci,n3=F({primitives:[...Object.values(r3),...Object.values(i3),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...O_.left1,labels:[\"1\"]},{...O_.right1,labels:[\"2\"]}],size:{width:Yo.width,height:Yo.height},center:{x:Yo.centerX,y:Yo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:o3,texts:sz,bounds:Lo,refblocks:j_,circles:a3}=ci,s3=F({primitives:[...Object.values(o3),...Object.values(a3),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...j_.left1,labels:[\"1\"]},{...j_.right1,labels:[\"2\"]}],size:{width:Lo.width,height:Lo.height},center:{x:Lo.centerX,y:Lo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),li={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.04},{x:-0.11,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.1,y:0.04},{x:0.54,y:0.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.09,y:-0.15},{x:-0.09,y:0.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:0.09,y:-0.15},{x:0.09,y:0.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.15},{x:0.09,y:-0.05},{x:-0.08,y:0.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:0.08,y:0.26},{x:0.08,y:0.05},{x:-0.09,y:0.15},{x:0.07,y:0.26}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.03,y:0.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.03,y:-0.42}},refblocks:{left1:{x:-0.54,y:0.04},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.42,maxY:0.42,width:1.14,height:0.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.05,radius:0.29,color:\"primary\",fill:!1}}},c3=F(li).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-0.03,y:0.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.8,y:-0.2}).build(),l3=F(li).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),p3=F(li).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.8}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-0.9}).build(),h3=F(li).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),d3=F(li).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.7,y:0.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-0.13,y:-0.2}).build(),m3=F(li).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.7,y:0.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-0.13,y:-0.2}).build(),Ha={paths:{triangle:{type:\"path\",points:[{x:-0.06,y:-0.09},{x:-0.06,y:0.09},{x:0.06,y:0},{x:-0.06,y:-0.09}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-0.11,y:0},{x:-0.06,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.03}},refblocks:{left1:{x:-0.11,y:0}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{}},{paths:u3,bounds:$_,refblocks:y3}=Ha,f3=F({primitives:[...Object.values(u3),{type:\"text\",text:\"{REF}\",x:-0.13,y:-0}],ports:[{...y3.left1,labels:[\"1\"]}],center:{x:$_.centerX,y:$_.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:_3,bounds:X_,refblocks:g3}=Ha,x3=F({primitives:[...Object.values(_3),{type:\"text\",text:\"{REF}\",x:-0.13,y:0}],ports:[{...g3.left1,labels:[\"1\"]}],center:{x:X_.centerX,y:X_.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:b3,bounds:V_,refblocks:v3}=Ha,S3=F({primitives:[...Object.values(b3),{type:\"text\",text:\"{REF}\",x:-0.13,y:-0}],ports:[{...v3.left1,labels:[\"1\"]}],center:{x:V_.centerX,y:V_.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:w3,bounds:z_,refblocks:A3}=Ha,B3=F({primitives:[...Object.values(w3),{type:\"text\",text:\"{REF}\",x:-0.13,y:0}],ports:[{...A3.left1,labels:[\"1\"]}],center:{x:z_.centerX,y:z_.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),F3={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},Za=F(F3).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),P3=z(Za,\"down\"),I3=z(Za,\"left\"),M3=z(Za,\"up\"),k3={paths:{path1:{type:\"path\",points:[{x:-0.37,y:0.22},{x:-0.13,y:0.22}],color:\"primary\",fill:!1},\"path-1-2\":{type:\"path\",points:[{x:-0.07,y:0.22},{x:0.11,y:0.16}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.1,y:0.13},{x:0.37,y:0.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0.12,y:0.36},{x:0.37,y:0.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-0.37,y:-0.18},{x:-0.13,y:-0.18}],color:\"primary\",fill:!1},\"path4-5\":{type:\"path\",points:[{x:-0.07,y:-0.19},{x:0.1,y:-0.24}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:0.1,y:-0.27},{x:0.37,y:-0.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:0.12,y:-0.04},{x:0.37,y:-0.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-0.2},{x:0,y:0.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.56},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.42}},refblocks:{left1:{x:-0.37,y:0.22},left2:{x:-0.37,y:-0.18},right1:{x:0.37,y:0.36},right2:{x:0.37,y:0.13},right3:{x:0.37,y:-0.04},right5:{x:0.37,y:-0.27}},bounds:{minX:-0.4,maxX:0.4,minY:-0.47,maxY:0.56,width:1,height:1.04,centerX:0,centerY:0.05},circles:{\"circle-2\":{type:\"circle\",x:0.08,y:0.13,radius:0.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:0.08,y:-0.27,radius:0.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:0.08,y:0.37,radius:0.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:0.08,y:-0.04,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0.22,radius:0.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-0.1,y:-0.18,radius:0.02,color:\"primary\",fill:!1}}},Ka=F(k3).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Fl=z(Ka,\"down\"),Pl=Fl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Il=Fl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Pl.anchor=\"middle_bottom\";Il.anchor=\"middle_top\";Pl.x=0;Pl.y+=0.537;Il.y-=0.5375;Il.x=0;var C3=Fl,Ml=z(Ka,\"left\"),kl=Ml.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Cl=Ml.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");kl.anchor=\"middle_bottom\";Cl.anchor=\"middle_top\";kl.x=0;kl.y+=1;Cl.y-=1;Cl.x=0;var Y3=Ml,Yl=z(Ka,\"up\"),Ll=Yl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),El=Yl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ll.anchor=\"middle_bottom\";El.anchor=\"middle_top\";Ll.x=0;Ll.y+=0.537;El.y-=0.5375;El.x=0;var L3=Yl,E3={paths:{path1:{type:\"path\",points:[{x:-0.37,y:0.22},{x:-0.13,y:0.22}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-0.07,y:0.23},{x:0.11,y:0.33}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.1,y:0.13},{x:0.37,y:0.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0.12,y:0.36},{x:0.37,y:0.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-0.37,y:-0.18},{x:-0.13,y:-0.18}],color:\"primary\",fill:!1},\"path4-6\":{type:\"path\",points:[{x:-0.07,y:-0.18},{x:0.11,y:-0.07}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:0.1,y:-0.27},{x:0.37,y:-0.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:0.12,y:-0.04},{x:0.37,y:-0.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-0.12},{x:0,y:0.27}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.61},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.52}},refblocks:{left1:{x:-0.37,y:0.22},left2:{x:-0.37,y:-0.18},right1:{x:0.37,y:0.36},right2:{x:0.37,y:0.13},right3:{x:0.37,y:-0.04},right5:{x:0.37,y:-0.27}},bounds:{minX:-0.4,maxX:0.4,minY:-0.47,maxY:0.56,width:1,height:1.04,centerX:0,centerY:0.05},circles:{\"circle-2\":{type:\"circle\",x:0.08,y:0.13,radius:0.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:0.08,y:-0.27,radius:0.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:0.08,y:0.37,radius:0.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:0.08,y:-0.04,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0.22,radius:0.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-0.1,y:-0.18,radius:0.02,color:\"primary\",fill:!1}}},Ja=F(E3).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Tl=z(Ja,\"down\"),Nl=Tl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Wl=Tl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Nl.anchor=\"middle_bottom\";Wl.anchor=\"middle_top\";Nl.x=0;Nl.y+=0.565;Wl.y-=0.555;Wl.x=0;var T3=Tl,Rl=z(Ja,\"left\"),Ol=Rl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),jl=Rl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ol.anchor=\"middle_bottom\";jl.anchor=\"middle_top\";Ol.x=0;Ol.y+=1.09;jl.y-=1.09;jl.x=0;var N3=Rl,$l=z(Ja,\"up\"),Xl=$l.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Vl=$l.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Xl.anchor=\"middle_bottom\";Vl.anchor=\"middle_top\";Xl.x=0;Xl.y+=0.565;Vl.y-=0.555;Vl.x=0;var W3=$l,R3={paths:{path11:{type:\"path\",points:[{x:-0.38,y:0.06},{x:-0.14,y:0.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.09,y:0.07},{x:0.11,y:0.11}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.13,y:0.06},{x:0.38,y:0.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-0.38,y:-0.17},{x:-0.14,y:-0.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-0.09,y:-0.17},{x:0.11,y:-0.12}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:0.13,y:-0.17},{x:0.38,y:-0.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.31}},refblocks:{left1:{x:-0.38,y:-0.17},left3:{x:-0.38,y:0.06},right1:{x:0.38,y:-0.17},right3:{x:0.38,y:0.06}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.81,height:0.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:0.1,y:0.06,radius:0.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:0.1,y:-0.17,radius:0.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-0.11,y:0.06,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.11,y:-0.17,radius:0.02,color:\"primary\",fill:!1}}},qa=F(R3).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),zl=z(qa,\"down\"),Dl=zl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ul=zl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Dl.anchor=\"middle_bottom\";Ul.anchor=\"middle_top\";Dl.x=0.4;Dl.y+=0.265;Ul.y-=0.265;Ul.x=0.4;var O3=zl,Gl=z(qa,\"left\"),Ql=Gl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Hl=Gl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ql.anchor=\"middle_bottom\";Hl.anchor=\"middle_top\";Ql.x=0;Ql.y+=0.67;Hl.y-=0.67;Hl.x=0;var j3=Gl,Zl=z(qa,\"up\"),Kl=Zl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Jl=Zl.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Kl.anchor=\"middle_bottom\";Jl.anchor=\"middle_top\";Kl.x=0.46;Kl.y+=0.265;Jl.y-=0.265;Jl.x=0.46;var $3=Zl,X3={paths:{path11:{type:\"path\",points:[{x:-0.38,y:0.06},{x:-0.14,y:0.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.09,y:0.07},{x:0.1,y:0.2}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.13,y:0.06},{x:0.38,y:0.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-0.38,y:-0.17},{x:-0.14,y:-0.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-0.09,y:-0.16},{x:0.1,y:-0.03}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:0.13,y:-0.17},{x:0.38,y:-0.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.42}},refblocks:{left1:{x:-0.38,y:-0.17},left3:{x:-0.38,y:0.06},right1:{x:0.38,y:-0.17},right3:{x:0.38,y:0.06}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.81,height:0.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:0.1,y:0.06,radius:0.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:0.1,y:-0.17,radius:0.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-0.11,y:0.06,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.11,y:-0.17,radius:0.02,color:\"primary\",fill:!1}}},ts=F(X3).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ql=z(ts,\"down\"),tp=ql.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),ep=ql.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");tp.anchor=\"middle_bottom\";ep.anchor=\"middle_top\";tp.x=0.4;tp.y+=0.295;ep.y-=0.295;ep.x=0.42;var V3=ql,rp=z(ts,\"left\"),ip=rp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),np=rp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ip.anchor=\"middle_bottom\";np.anchor=\"middle_top\";ip.x=0;ip.y+=0.795;np.y-=0.795;np.x=0;var z3=rp,op=z(ts,\"up\"),ap=op.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),sp=op.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ap.anchor=\"middle_bottom\";sp.anchor=\"middle_top\";ap.x=0.46;ap.y+=0.315;sp.y-=0.315;sp.x=0.46;var D3=op,ux={paths:{path5:{type:\"path\",points:[{x:-0.44,y:0},{x:-0.16,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:0.17,y:0},{x:0.44,y:0.01}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:-0.25,y:-0.16},{x:0.02,y:0.3},{x:0.25,y:0.17},{x:-0.02,y:-0.29},{x:-0.25,y:-0.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.37}},refblocks:{left1:{x:-0.44,y:0},right1:{x:0.44,y:0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.25,maxY:0.25,width:1.13,height:0.5,centerX:0,centerY:0},circles:{}},{paths:U3,texts:cz,bounds:Eo,refblocks:D_,circles:G3}=ux,yx=F({primitives:[...Object.values(U3),...Object.values(G3),{type:\"text\",text:\"{REF}\",x:0.18,y:-0.3204553499999995},{type:\"text\",text:\"{VAL}\",x:-0.25,y:-0.3294553499999995}],ports:[{...D_.left1,labels:[\"1\"]},{...D_.right1,labels:[\"2\"]}],size:{width:Eo.width,height:Eo.height},center:{x:Eo.centerX,y:Eo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),cp=ri(yx),lp=cp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),pp=cp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");lp.anchor=\"middle_left\";pp.anchor=\"middle_left\";lp.y+=0.4;lp.x=0.32;pp.y-=0.45;pp.x=0.32;var Q3=cp,fx=F(ux).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),H3=ii(fx),pi={paths:{path11:{type:\"path\",points:[{x:-0.56,y:0.04},{x:-0.22,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.14,y:0.05},{x:0.48,y:0.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:0.14,y:-0.15},{x:0.14,y:0.25}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.22,y:0.25},{x:-0.21,y:-0.15},{x:0.14,y:0.05},{x:-0.22,y:0.25}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.09,y:0.38},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.07,y:-0.38},right1:{type:\"text\",text:\"\",x:0.59,y:-0.33}},refblocks:{left1:{x:-0.56,y:0.04},right1:{x:0.48,y:0.05}},bounds:{minX:-0.59,maxX:0.59,minY:-0.38,maxY:0.38,width:1.18,height:0.76,centerX:0,centerY:0},circles:{}},{paths:Z3,texts:lz,bounds:To,refblocks:U_,circles:K3}=pi,J3=F({primitives:[...Object.values(Z3),...Object.values(K3),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.3294553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.3294553499999995}],ports:[{...U_.left1,labels:[\"1\"]},{...U_.right1,labels:[\"2\"]}],size:{width:To.width,height:To.height},center:{x:To.centerX,y:To.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:q3,texts:pz,bounds:No,refblocks:G_,circles:tw}=pi,ew=F({primitives:[...Object.values(q3),...Object.values(tw),{type:\"text\",text:\"{REF}\",x:-0,y:0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.4094553499999995}],ports:[{...G_.left1,labels:[\"1\"]},{...G_.right1,labels:[\"2\"]}],size:{width:No.width,height:No.height},center:{x:No.centerX,y:No.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:rw,texts:hz,bounds:Wo,refblocks:Q_,circles:iw}=pi,nw=F({primitives:[...Object.values(rw),...Object.values(iw),{type:\"text\",text:\"{REF}\",x:-0,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.4094553499999995}],ports:[{...Q_.left1,labels:[\"1\"]},{...Q_.right1,labels:[\"2\"]}],size:{width:Wo.width,height:Wo.height},center:{x:Wo.centerX,y:Wo.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ow,texts:dz,bounds:Ro,refblocks:H_,circles:aw}=pi,sw=F({primitives:[...Object.values(ow),...Object.values(aw),{type:\"text\",text:\"{REF}\",x:-0,y:0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.4094553499999995}],ports:[{...H_.left1,labels:[\"1\"]},{...H_.right1,labels:[\"2\"]}],size:{width:Ro.width,height:Ro.height},center:{x:Ro.centerX,y:Ro.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:cw,texts:mz,bounds:Oo,refblocks:Z_,circles:lw}=pi,pw=F({primitives:[...Object.values(cw),...Object.values(lw),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...Z_.left1,labels:[\"1\"]},{...Z_.right1,labels:[\"2\"]}],size:{width:Oo.width,height:Oo.height},center:{x:Oo.centerX,y:Oo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:hw,texts:uz,bounds:jo,refblocks:K_,circles:dw}=pi,mw=F({primitives:[...Object.values(hw),...Object.values(dw),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2894553499999995}],ports:[{...K_.left1,labels:[\"1\"]},{...K_.right1,labels:[\"2\"]}],size:{width:jo.width,height:jo.height},center:{x:jo.centerX,y:jo.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),uw={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"Hz\",x:0,y:-0.04}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:yw,texts:fw,bounds:$o,refblocks:J_,circles:_w}=uw,hp=It({primitives:[...Object.values(yw),...Object.values(_w),{type:\"text\",text:\"{REF}\",x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:0.35,anchor:\"middle_bottom\"},{...fw.left1,x:0,y:0.01,anchor:\"center\",fontSize:0.2}],ports:[{...J_.left1,labels:[\"1\"]},{...J_.right1,labels:[\"2\"]}],size:{width:$o.width,height:$o.height},center:{x:$o.centerX,y:$o.centerY}}),{5:gw,...xw}=hp.primitives;function bw(t){return typeof t==\"object\"}var q_=z({...hp,primitives:Object.values(xw).filter(bw)}),vw={...q_,primitives:[...q_.primitives,gw]},Sw={paths:{path10:{type:\"path\",points:[{x:-0.53,y:0.04},{x:0.53,y:0.04}],color:\"primary\",fill:!1},path14:{type:\"path\",points:[{x:0,y:0.17},{x:0.27,y:0.17},{x:0.27,y:-0.1},{x:-0.26,y:-0.1},{x:-0.26,y:0.17},{x:0,y:0.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.24},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.17,y:-0.24}},refblocks:{left1:{x:-0.53,y:0.04},right1:{x:0.53,y:0.04}},bounds:{minX:-0.56,maxX:0.56,minY:-0.24,maxY:0.24,width:1.13,height:0.47,centerX:0,centerY:0},circles:{}},{paths:ww,texts:Aw,bounds:Xo,refblocks:tg}=Sw,_x=It({primitives:[...Object.values(ww),{...Aw.top1,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-0.2,anchor:\"middle_top\"}],ports:[{...tg.left1,labels:[\"1\"]},{...tg.right1,labels:[\"2\"]}],size:{width:Xo.width,height:Xo.height},center:{x:Xo.centerX,y:Xo.centerY}}),Bw=z(_x),hi={paths:{path1:{type:\"path\",points:[{x:-0.29,y:0.01},{x:0.04,y:0}],color:\"primary\",fill:!0},path2:{type:\"path\",points:[{x:0.04,y:-0.22},{x:0.04,y:0.22}],color:\"primary\",fill:!0},path3:{type:\"path\",points:[{x:0.12,y:-0.17},{x:0.12,y:0.17}],color:\"primary\",fill:!0},path4:{type:\"path\",points:[{x:0.19,y:-0.06},{x:0.19,y:0.06}],color:\"primary\",fill:!0}},texts:{right1:{type:\"text\",text:\"{REF}\",x:0.31,y:-0.02}},refblocks:{left1:{x:-0.29,y:0.01}},bounds:{minX:-0.31,maxX:0.31,minY:-0.22,maxY:0.22,width:0.62,height:0.45,centerX:0,centerY:0},circles:{}},Fw=F(hi).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),Pw=F(hi).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Iw=F(hi).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),Mw=F(hi).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),kw=F(hi).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Cw=F(hi).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),dp={paths:{path11:{type:\"path\",points:[{x:-0.52,y:0.03},{x:-0.18,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.19,y:0.04},{x:0.52,y:0.04}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.31,y:0.2},{x:-0.31,y:-0.11},{x:-0.01,y:0.04},{x:-0.3,y:0.2}],color:\"primary\",fill:!0},\"path11-0-9-5\":{type:\"path\",points:[{x:0.33,y:0.2},{x:0.33,y:-0.1},{x:0.04,y:0.04},{x:0.33,y:0.2}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.04,y:0.32},bottom1:{type:\"text\",text:\"{VAL}\",x:0.04,y:-0.32}},refblocks:{left1:{x:-0.52,y:0.03},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.32,maxY:0.32,width:1.09,height:0.63,centerX:0,centerY:0},circles:{}},{paths:yz,texts:fz,bounds:_z,refblocks:gz,circles:xz}=dp,Yw=F(dp).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Lw=F(dp).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Ew={paths:{path45:{type:\"path\",points:[{x:0.14,y:0},{x:-0.13,y:-0.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:0.13,y:0},{x:0.3,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-0.13,y:0.13},{x:0.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-0.13,y:-0.14},{x:-0.13,y:0.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:0.14,y:0.13},{x:0.14,y:-0.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-0.13,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:0.16,y:0.29},{x:0.25,y:0.3},{x:0.22,y:0.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:0.08,y:0.17},{x:0.09,y:0.17},{x:0.21,y:0.27},{x:0.21,y:0.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-0.02,y:0.31},{x:0.08,y:0.32},{x:0.04,y:0.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-0.1,y:0.19},{x:-0.09,y:0.2},{x:0.04,y:0.29},{x:0.04,y:0.29}],color:\"primary\",fill:!1},box:{type:\"path\",points:[{x:-0.3,y:-0.4},{x:0.3,y:-0.4},{x:0.3,y:0.4},{x:-0.3,y:0.4},{x:-0.3,y:-0.4},{x:-0.3,y:0.4}],color:\"primary\",fill:!1},\"path48-1\":{type:\"path\",points:[{x:-0.3,y:0.13},{x:-0.54,y:0.13}],color:\"primary\",fill:!1},\"path48-2\":{type:\"path\",points:[{x:-0.3,y:-0.13},{x:-0.54,y:-0.13}],color:\"primary\",fill:!1},\"path48-3\":{type:\"path\",points:[{x:0.3,y:-0.13},{x:0.54,y:-0.13}],color:\"primary\",fill:!1},\"path48-4\":{type:\"path\",points:[{x:0.3,y:0.13},{x:0.54,y:0.13}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.43},right1:{type:\"text\",text:\"{REF}\",x:0,y:0.43}},refblocks:{left1:{x:-0.54,y:0.13},left2:{x:-0.54,y:-0.13},right1:{x:0.54,y:-0.13},right2:{x:0.54,y:0.13}},bounds:{minX:-0.56,maxX:0.56,minY:-0.32,maxY:0.32,width:1.13,height:0.65,centerX:0,centerY:0},circles:{}},es=F(Ew).labelPort(\"left1\",[\"1\",\"DIN\"]).labelPort(\"left2\",[\"2\",\"POWER\"]).labelPort(\"right1\",[\"3\",\"GND\"]).labelPort(\"right2\",[\"4\",\"DOUT\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Tw=z(es,\"down\"),Nw=ii(es),mp=z(es,\"up\"),up=mp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),yp=mp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");up.anchor=\"middle_left\";yp.anchor=\"middle_left\";up.y+=0.21;up.x=0.44;yp.y-=0.21;yp.x=0.44;var Ww=mp,Rw={paths:{path11:{type:\"path\",points:[{x:-0.4,y:0},{x:-0.01,y:0}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:0.01,y:-0.12},{x:0.01,y:0.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.28,y:-0.25},{x:0.28,y:-0.56}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.28,y:0.56},{x:0.28,y:0.27}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.17,y:-0.22},{x:0.28,y:-0.23},{x:0.23,y:-0.14}],color:\"primary\",fill:!0},path17:{type:\"path\",points:[{x:0.08,y:-0.09},{x:0.23,y:-0.2}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.07,y:0.11},{x:0.28,y:0.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.02,y:-0.42}},refblocks:{top1:{x:0.28,y:0.56},bottom1:{x:0.28,y:-0.56},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.14,y:0.01,radius:0.29,color:\"primary\",fill:!1}}},gx=F(Rw).changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"3\"]).labelPort(\"top1\",[\"2\"]).labelPort(\"bottom1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),fp=z(gx),_p=fp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),xx=fp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");_p.anchor=\"middle_left\";xx.anchor=\"middle_right\";_p.x=0.45;_p.y+=0.065;xx.y+=0.065;var Ow=fp,jw={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:0.02,y:-0.02},{x:0.02,y:-0.1}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-0.47,y:-0.19},{x:-0.17,y:-0.19}],color:\"primary\",fill:!1},\"path12-1-5-6-8\":{type:\"path\",points:[{x:0.02,y:0.17},{x:0.02,y:0.11}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-0.15,y:-0.03},{x:0.2,y:-0.19}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.2,y:-0.19},{x:0.47,y:-0.19}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4\":{type:\"path\",points:[{x:0.02,y:0.12},{x:0.02,y:0.02}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3\":{type:\"path\",points:[{x:0.08,y:0.11},{x:0.08,y:0.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3-1\":{type:\"path\",points:[{x:-0.04,y:0.11},{x:-0.04,y:0.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-4\":{type:\"path\",points:[{x:0.08,y:0.11},{x:-0.04,y:0.11}],color:\"primary\",fill:!1},\"path14-5\":{type:\"path\",points:[{x:-0.01,y:0.28},{x:0.01,y:0.25},{x:0.04,y:0.23},{x:0.06,y:0.2}],color:\"primary\",fill:!0},\"path14-5-3\":{type:\"path\",points:[{x:-0.01,y:0.2},{x:0.01,y:0.23},{x:0.04,y:0.25},{x:0.06,y:0.28}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.01,y:0.38},bottom1:{type:\"text\",text:\"{VAL}\",x:0.06,y:-0.38}},refblocks:{left1:{x:-0.47,y:-0.19},right1:{x:0.47,y:-0.19}},bounds:{minX:-0.5,maxX:0.5,minY:-0.38,maxY:0.38,width:1,height:0.76,centerX:0,centerY:0},circles:{path9:{type:\"circle\",x:0.02,y:0.24,radius:0.06,color:\"primary\",fill:!1}}},bx=F(jw).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),vx=z(bx),Sx=vx.primitives.filter((t)=\u003et.type===\"text\"),gp=Sx.find((t)=\u003et.text===\"{VAL}\");gp.x=-0.35;gp.y=0;gp.anchor=\"middle_right\";var xp=Sx.find((t)=\u003et.text===\"{REF}\");xp.y=0;xp.x=0.35;xp.anchor=\"middle_left\";var $w=vx,rs={paths:{path8698:{type:\"path\",points:[{x:-0.19796749999999919,y:-0.023826854587889912},{x:-0.2004570399999992,y:-0.018993393814014044},{x:-0.2029465799999992,y:-0.014174384106555204},{x:-0.20543611999999922,y:-0.009384187436300498},{x:-0.20792565999999923,y:-0.004636988132081332},{x:-0.21041519999999925,y:0.00005329457033053167},{x:-0.21290473999999926,y:0.004673092344940184},{x:-0.21539427999999927,y:0.009209271428771242},{x:-0.21788381999999928,y:0.013649213595881985},{x:-0.2203733599999993,y:0.01798089395292432},{x:-0.2228628999999993,y:0.022192955076609913},{x:-0.22535243999999932,y:0.02627477703600152},{x:-0.22784197999999933,y:0.030216542867918667},{x:-0.23033151999999935,y:0.03400929910178016},{x:-0.23282105999999936,y:0.03764501096072756},{x:-0.23531059999999937,y:0.04111661189869628},{x:-0.23780013999999938,y:0.04441804716802203},{x:-0.2402896799999994,y:0.04754431114897349},{x:-0.2427792199999994,y:0.05049147821106258},{x:-0.24526875999999942,y:0.053256726915861724},{x:-0.24775829999999943,y:0.05583835741211009},{x:-0.25024783999999944,y:0.05823580191586174},{x:-0.25273737999999946,y:0.060449628211062575},{x:-0.25522691999999947,y:0.0624815361489735},{x:-0.2577164599999995,y:0.06433434716802203},{x:-0.2602059999999995,y:0.06601198689869628},{x:-0.2626955399999995,y:0.06751946096072757},{x:-0.2651850799999995,y:0.06886282410178016},{x:-0.26767461999999953,y:0.07004914286791866},{x:-0.27016415999999954,y:0.0710864520360015},{x:-0.27265369999999955,y:0.07198370507660991},{x:-0.27514323999999957,y:0.07275071895292433},{x:-0.2776327799999996,y:0.07339811359588198},{x:-0.2801223199999996,y:0.07393724642877124},{x:-0.2826118599999996,y:0.07438014234494018},{x:-0.2851013999999996,y:0.07473941957033053},{x:-0.28759093999999963,y:0.07502821186791866},{x:-0.29008047999999964,y:0.07526008756369952},{x:-0.29257001999999965,y:0.07544896589344477},{x:-0.29505955999999967,y:0.07560903118598594},{x:-0.2975490999999997,y:0.07575464541211008},{x:-0.30003863749999965,y:0.07560903118598594},{x:-0.3025281749999997,y:0.07544896589344477},{x:-0.30501771249999965,y:0.07526008756369951},{x:-0.3075072499999996,y:0.07502821186791866},{x:-0.30999678749999965,y:0.07473941957033052},{x:-0.3124863249999996,y:0.07438014234494018},{x:-0.3149758624999996,y:0.07393724642877124},{x:-0.31746539999999956,y:0.07339811359588198},{x:-0.3199549374999996,y:0.07275071895292431},{x:-0.32244447499999956,y:0.07198370507660991},{x:-0.32493401249999954,y:0.0710864520360015},{x:-0.32742354999999956,y:0.07004914286791866},{x:-0.32991308749999954,y:0.06886282410178016},{x:-0.3324026249999995,y:0.06751946096072756},{x:-0.33489216249999954,y:0.06601198689869628},{x:-0.3373816999999995,y:0.06433434716802203},{x:-0.3398712374999995,y:0.06248153614897349},{x:-0.3423607749999995,y:0.06044962821106258},{x:-0.3448503124999994,y:0.05823580191586174},{x:-0.34733984999999945,y:0.05583835741211009},{x:-0.3498293874999995,y:0.053256726915861724},{x:-0.35231892499999945,y:0.050491478211062576},{x:-0.3548084624999994,y:0.0475443111489735},{x:-0.3572979999999994,y:0.04441804716802203},{x:-0.35978753749999937,y:0.04111661189869628},{x:-0.3622770749999994,y:0.03764501096072756},{x:-0.36476661249999937,y:0.03400929910178016},{x:-0.36725614999999934,y:0.030216542867918673},{x:-0.36974568749999936,y:0.02627477703600152},{x:-0.37223522499999934,y:0.022192955076609917},{x:-0.3747247624999993,y:0.017980893952924324},{x:-0.37721429999999934,y:0.013649213595881985},{x:-0.3797038374999993,y:0.00920927142877125},{x:-0.3821933749999993,y:0.004673092344940191},{x:-0.3846829124999993,y:0.00005329457033053514},{x:-0.3871724499999993,y:-0.004636988132081328},{x:-0.38966198749999925,y:-0.009384187436300498},{x:-0.3921515249999992,y:-0.014174384106555197},{x:-0.39464106249999925,y:-0.01899339381401404},{x:-0.3971305999999992,y:-0.023826854587889912}],color:\"primary\",fill:!1},path8700:{type:\"path\",points:[{x:0.0011955000000007932,y:-0.02382615458789039},{x:-0.00129403749999919,y:-0.01899269131401453},{x:-0.0037835749999991734,y:-0.014173679106555696},{x:-0.006273112499999156,y:-0.009383479936300985},{x:-0.00876264999999914,y:-0.004636278132081827},{x:-0.011252187499999122,y:0.00005400707033003174},{x:-0.013741724999999105,y:0.004673807344939681},{x:-0.016231262499999087,y:0.009209988928770731},{x:-0.018720799999999073,y:0.013649933595881476},{x:-0.021210337499999055,y:0.017981616452923805},{x:-0.023699874999999038,y:0.022193680076609393},{x:-0.026189412499999024,y:0.026275504536001},{x:-0.028678949999999002,y:0.030217272867918137},{x:-0.03116848749999899,y:0.034010031601779636},{x:-0.03365802499999897,y:0.03764574596072702},{x:-0.03614756249999895,y:0.04111734939869574},{x:-0.03863709999999894,y:0.04441878716802149},{x:-0.04112663749999892,y:0.04754505364897295},{x:-0.043616174999998904,y:0.05049222321106203},{x:-0.04610571249999888,y:0.05325747441586117},{x:-0.04859524999999887,y:0.055839107412109526},{x:-0.051084787499998854,y:0.05823655441586117},{x:-0.05357432499999884,y:0.06045038321106201},{x:-0.05606386249999881,y:0.06248229364897292},{x:-0.0585533999999988,y:0.06433510716802145},{x:-0.061042937499998784,y:0.0660127493986957},{x:-0.06353247499999877,y:0.06752022596072697},{x:-0.06602201249999876,y:0.06886359160177957},{x:-0.06851154999999873,y:0.07004991286791806},{x:-0.07100108749999871,y:0.07108722453600091},{x:-0.0734906249999987,y:0.0719844800766093},{x:-0.07598016249999869,y:0.07275149645292371},{x:-0.07846969999999867,y:0.07339889359588138},{x:-0.08095923749999864,y:0.07393802892877062},{x:-0.08344877499999863,y:0.07438092734493956},{x:-0.08593831249999861,y:0.07474020707032991},{x:-0.0884278499999986,y:0.07502900186791804},{x:-0.09091738749999859,y:0.07526088006369888},{x:-0.09340692499999856,y:0.07544976089344414},{x:-0.09589646249999854,y:0.0756098286859853},{x:-0.09838599999999853,y:0.07575544541210943},{x:-0.10087553999999854,y:0.0756098286859853},{x:-0.10336507999999855,y:0.07544976089344414},{x:-0.10585461999999857,y:0.07526088006369887},{x:-0.10834415999999858,y:0.07502900186791804},{x:-0.11083369999999859,y:0.0747402070703299},{x:-0.1133232399999986,y:0.07438092734493956},{x:-0.11581277999999862,y:0.07393802892877062},{x:-0.11830231999999863,y:0.07339889359588138},{x:-0.12079185999999864,y:0.07275149645292371},{x:-0.12328139999999865,y:0.0719844800766093},{x:-0.12577093999999867,y:0.07108722453600091},{x:-0.12826047999999868,y:0.07004991286791806},{x:-0.1307500199999987,y:0.06886359160177957},{x:-0.1332395599999987,y:0.06752022596072697},{x:-0.13572909999999871,y:0.0660127493986957},{x:-0.13821863999999873,y:0.06433510716802145},{x:-0.14070817999999874,y:0.06248229364897291},{x:-0.14319771999999875,y:0.06045038321106202},{x:-0.14568725999999876,y:0.05823655441586117},{x:-0.14817679999999878,y:0.055839107412109526},{x:-0.1506663399999988,y:0.05325747441586117},{x:-0.1531558799999988,y:0.05049222321106202},{x:-0.1556454199999988,y:0.047545053648972956},{x:-0.15813495999999883,y:0.04441878716802149},{x:-0.16062449999999884,y:0.04111734939869574},{x:-0.16311403999999885,y:0.03764574596072702},{x:-0.16560357999999886,y:0.034010031601779636},{x:-0.16809311999999887,y:0.03021727286791814},{x:-0.1705826599999989,y:0.026275504536001},{x:-0.1730721999999989,y:0.022193680076609396},{x:-0.1755617399999989,y:0.017981616452923805},{x:-0.17805127999999892,y:0.013649933595881474},{x:-0.18054081999999894,y:0.00920998892877074},{x:-0.18303035999999895,y:0.0046738073449396865},{x:-0.18551989999999896,y:0.00005400707033003521},{x:-0.18800943999999897,y:-0.004636278132081827},{x:-0.19049897999999899,y:-0.009383479936300985},{x:-0.192988519999999,y:-0.01417367910655569},{x:-0.19547805999999898,y:-0.018992691314014522},{x:-0.19796759999999902,y:-0.02382615458789039}],color:\"primary\",fill:!1},path8702:{type:\"path\",points:[{x:0.2003586000000006,y:-0.02382615458789039},{x:0.19786906000000057,y:-0.01899269131401453},{x:0.19537952000000058,y:-0.014173679106555696},{x:0.19288998000000057,y:-0.009383479936300985},{x:0.1904004400000006,y:-0.004636278132081827},{x:0.18791090000000055,y:0.00005400707033003174},{x:0.1854213600000005,y:0.004673807344939681},{x:0.18293182000000052,y:0.009209988928770731},{x:0.1804422800000005,y:0.013649933595881476},{x:0.17795274000000053,y:0.017981616452923805},{x:0.17546320000000049,y:0.022193680076609393},{x:0.17297366000000047,y:0.026275504536001},{x:0.17048412000000046,y:0.030217272867918137},{x:0.16799458000000045,y:0.034010031601779636},{x:0.16550504000000044,y:0.03764574596072702},{x:0.16301550000000042,y:0.04111734939869574},{x:0.1605259600000004,y:0.04441878716802149},{x:0.1580364200000004,y:0.04754505364897295},{x:0.1555468800000004,y:0.05049222321106203},{x:0.15305734000000037,y:0.05325747441586117},{x:0.15056780000000036,y:0.055839107412109526},{x:0.14807826000000035,y:0.05823655441586117},{x:0.14558872000000034,y:0.06045038321106201},{x:0.14309918000000033,y:0.06248229364897292},{x:0.1406096400000003,y:0.06433510716802145},{x:0.1381201000000003,y:0.0660127493986957},{x:0.1356305600000003,y:0.06752022596072697},{x:0.13314102000000028,y:0.06886359160177957},{x:0.13065148000000026,y:0.07004991286791806},{x:0.12816194000000025,y:0.07108722453600091},{x:0.12567240000000024,y:0.0719844800766093},{x:0.12318286000000023,y:0.07275149645292371},{x:0.12069332000000021,y:0.07339889359588138},{x:0.1182037800000002,y:0.07393802892877062},{x:0.11571424000000019,y:0.07438092734493956},{x:0.11322470000000018,y:0.07474020707032991},{x:0.11073516000000017,y:0.07502900186791804},{x:0.10824562000000015,y:0.07526088006369888},{x:0.10575608000000014,y:0.07544976089344414},{x:0.10326654000000013,y:0.0756098286859853},{x:0.10077700000000012,y:0.07575544541210943},{x:0.09828746250000013,y:0.0756098286859853},{x:0.09579792500000014,y:0.07544976089344414},{x:0.09330838750000017,y:0.07526088006369887},{x:0.09081885000000019,y:0.07502900186791804},{x:0.0883293125000002,y:0.0747402070703299},{x:0.08583977500000022,y:0.07438092734493956},{x:0.08335023750000023,y:0.07393802892877062},{x:0.08086070000000026,y:0.07339889359588138},{x:0.07837116250000027,y:0.07275149645292371},{x:0.07588162500000029,y:0.0719844800766093},{x:0.0733920875000003,y:0.07108722453600091},{x:0.07090255000000031,y:0.07004991286791806},{x:0.06841301250000034,y:0.06886359160177957},{x:0.06592347500000036,y:0.06752022596072697},{x:0.06343393750000037,y:0.0660127493986957},{x:0.060944400000000384,y:0.06433510716802145},{x:0.0584548625000004,y:0.06248229364897291},{x:0.05596532500000043,y:0.06045038321106202},{x:0.05347578750000044,y:0.05823655441586117},{x:0.050986250000000455,y:0.055839107412109526},{x:0.04849671250000047,y:0.05325747441586117},{x:0.04600717500000048,y:0.05049222321106202},{x:0.04351763750000051,y:0.047545053648972956},{x:0.041028100000000525,y:0.04441878716802149},{x:0.03853856250000054,y:0.04111734939869574},{x:0.036049025000000554,y:0.03764574596072702},{x:0.03355948750000057,y:0.034010031601779636},{x:0.031069950000000596,y:0.03021727286791814},{x:0.02858041250000061,y:0.026275504536001},{x:0.026090875000000624,y:0.022193680076609396},{x:0.023601337500000638,y:0.017981616452923805},{x:0.021111800000000652,y:0.013649933595881474},{x:0.01862226250000068,y:0.00920998892877074},{x:0.016132725000000694,y:0.0046738073449396865},{x:0.013643187500000709,y:0.00005400707033003521},{x:0.011153650000000723,y:-0.004636278132081827},{x:0.008664112500000737,y:-0.009383479936300985},{x:0.006174575000000764,y:-0.01417367910655569},{x:0.0036850375000007786,y:-0.018992691314014522},{x:0.0011955000000007932,y:-0.02382615458789039}],color:\"primary\",fill:!1},path8704:{type:\"path\",points:[{x:0.3995216000000006,y:-0.02382615458789039},{x:0.39703206250000056,y:-0.01899269131401453},{x:0.3945425250000006,y:-0.014173679106555696},{x:0.3920529875000006,y:-0.009383479936300985},{x:0.38956345000000064,y:-0.004636278132081827},{x:0.38707391250000067,y:0.00005400707033003174},{x:0.3845843750000007,y:0.004673807344939681},{x:0.38209483750000073,y:0.009209988928770731},{x:0.37960530000000076,y:0.013649933595881476},{x:0.3771157625000008,y:0.017981616452923805},{x:0.37462622500000076,y:0.022193680076609393},{x:0.37213668750000073,y:0.026275504536001},{x:0.36964715000000076,y:0.030217272867918137},{x:0.3671576125000008,y:0.034010031601779636},{x:0.3646680750000008,y:0.03764574596072702},{x:0.36217853750000084,y:0.04111734939869574},{x:0.3596890000000008,y:0.04441878716802149},{x:0.3571994625000009,y:0.04754505364897295},{x:0.35470992500000087,y:0.05049222321106203},{x:0.35222038750000095,y:0.05325747441586117},{x:0.3497308500000009,y:0.055839107412109526},{x:0.3472413125000009,y:0.05823655441586117},{x:0.344751775000001,y:0.06045038321106201},{x:0.34226223750000095,y:0.06248229364897292},{x:0.33977270000000104,y:0.06433510716802145},{x:0.337283162500001,y:0.0660127493986957},{x:0.334793625000001,y:0.06752022596072697},{x:0.33230408750000107,y:0.06886359160177957},{x:0.3298145500000011,y:0.07004991286791806},{x:0.32732501250000107,y:0.07108722453600091},{x:0.3248354750000011,y:0.0719844800766093},{x:0.3223459375000011,y:0.07275149645292371},{x:0.3198564000000011,y:0.07339889359588138},{x:0.3173668625000012,y:0.07393802892877062},{x:0.31487732500000115,y:0.07438092734493956},{x:0.3123877875000012,y:0.07474020707032991},{x:0.3098982500000012,y:0.07502900186791804},{x:0.30740871250000124,y:0.07526088006369888},{x:0.30491917500000126,y:0.07544976089344414},{x:0.30242963750000124,y:0.0756098286859853},{x:0.29994010000000126,y:0.07575544541210943},{x:0.29745056000000125,y:0.0756098286859853},{x:0.29496102000000124,y:0.07544976089344414},{x:0.2924714800000012,y:0.07526088006369887},{x:0.2899819400000012,y:0.07502900186791804},{x:0.2874924000000012,y:0.0747402070703299},{x:0.2850028600000012,y:0.07438092734493956},{x:0.2825133200000012,y:0.07393802892877062},{x:0.28002378000000117,y:0.07339889359588138},{x:0.27753424000000115,y:0.07275149645292371},{x:0.27504470000000114,y:0.0719844800766093},{x:0.27255516000000113,y:0.07108722453600091},{x:0.2700656200000011,y:0.07004991286791806},{x:0.2675760800000011,y:0.06886359160177957},{x:0.2650865400000011,y:0.06752022596072697},{x:0.2625970000000011,y:0.0660127493986957},{x:0.26010746000000107,y:0.06433510716802145},{x:0.25761792000000105,y:0.06248229364897291},{x:0.25512838000000104,y:0.06045038321106202},{x:0.25263884000000103,y:0.05823655441586117},{x:0.250149300000001,y:0.055839107412109526},{x:0.247659760000001,y:0.05325747441586117},{x:0.245170220000001,y:0.05049222321106202},{x:0.24268068000000098,y:0.047545053648972956},{x:0.24019114000000097,y:0.04441878716802149},{x:0.23770160000000096,y:0.04111734939869574},{x:0.23521206000000094,y:0.03764574596072702},{x:0.23272252000000093,y:0.034010031601779636},{x:0.23023298000000092,y:0.03021727286791814},{x:0.2277434400000009,y:0.026275504536001},{x:0.2252539000000009,y:0.022193680076609396},{x:0.22276436000000088,y:0.017981616452923805},{x:0.22027482000000087,y:0.013649933595881474},{x:0.21778528000000086,y:0.00920998892877074},{x:0.21529574000000085,y:0.0046738073449396865},{x:0.21280620000000083,y:0.00005400707033003521},{x:0.21031666000000082,y:-0.004636278132081827},{x:0.2078271200000008,y:-0.009383479936300985},{x:0.2053375800000008,y:-0.01417367910655569},{x:0.20284804000000078,y:-0.018992691314014522},{x:0.20035850000000077,y:-0.02382615458789039}],color:\"primary\",fill:!1},path8706:{type:\"path\",points:[{x:-0.40026109999999937,y:-0.022544054587890106},{x:-0.5272914999999991,y:-0.022544054587890106}],color:\"primary\",fill:!1},\"path8706-5\":{type:\"path\",points:[{x:0.5282280000000006,y:-0.027111054587890093},{x:0.4011975999999997,y:-0.027111054587890093}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.0020145999999989783,y:0.22997364541210996},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.002185205294839676,y:-0.22997364541210996}},refblocks:{left1:{x:-0.5279125,y:-0.021272154587890446},right1:{x:0.5279125,y:-0.026521254587889898}},bounds:{minX:-0.556070941,maxX:0.556070941,minY:-0.22997364541210996,maxY:0.22997364541210996,width:1.112141882,height:0.4599472908242199,centerX:0,centerY:0},circles:{}},Xw=F(rs).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\",{x:-0.5,y:0}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.5,y:0}).build(),Vw=F(rs).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.5}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-0.5}).build(),zw=F(rs).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Dw=F(rs).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),wx={paths:{path11:{type:\"path\",points:[{x:-0.54,y:-0.06},{x:-0.15,y:-0.06}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.13,y:-0.05},{x:-0.13,y:-0.18}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.13,y:0.08},{x:0.13,y:-0.05}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.13,y:-0.18},{x:-0.13,y:0.08}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.13,y:0.08},{x:0.13,y:-0.18}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.14,y:-0.05},{x:0.54,y:-0.06}],color:\"primary\",fill:!1},\"path25-0-9-8\":{type:\"path\",points:[{x:-0.03,y:0.39},{x:-0.05,y:0.47},{x:-0.08,y:0.39}],color:\"primary\",fill:!0},\"path78-6-5-5\":{type:\"path\",points:[{x:-0.05,y:0.27},{x:-0.05,y:0.29},{x:-0.05,y:0.41},{x:-0.05,y:0.42}],color:\"primary\",fill:!1},\"path25-0-9-8-2\":{type:\"path\",points:[{x:0.07,y:0.39},{x:0.04,y:0.47},{x:0.02,y:0.39}],color:\"primary\",fill:!0},\"path78-6-5-5-7\":{type:\"path\",points:[{x:0.04,y:0.27},{x:0.04,y:0.29},{x:0.04,y:0.41},{x:0.04,y:0.42}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:0.03,y:0.06},{x:0.03,y:-0.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.38,y:0.38},bottom1:{type:\"text\",text:\"{VAL}\",x:0.38,y:-0.47}},refblocks:{left1:{x:-0.54,y:-0.06},right1:{x:0.54,y:-0.06}},bounds:{minX:-0.57,maxX:0.57,minY:-0.47,maxY:0.47,width:1.14,height:0.93,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-0.05,radius:0.29,color:\"primary\",fill:!1}}};wx.bounds.width+=0.2;var is=F(wx).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),bp=z(is,\"down\"),vp=bp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Sp=bp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");vp.anchor=\"middle_left\";Sp.anchor=\"middle_left\";vp.y+=0.9;vp.x=0.3;Sp.y-=0.1;Sp.x=0.3;var Uw=bp,wp=z(is,\"left\"),Ap=wp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Bp=wp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ap.anchor=\"middle_left\";Bp.anchor=\"middle_left\";Ap.y+=0.71;Ap.x=0.44;Bp.y-=0.71;Bp.x=0.44;var Gw=wp,Fp=z(is,\"up\"),Pp=Fp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ip=Fp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Pp.anchor=\"middle_left\";Ip.anchor=\"middle_left\";Pp.y+=0.1;Pp.x=0.3;Ip.y-=0.71;Ip.x=0.3;var Qw=Fp,Hw={paths:{path45:{type:\"path\",points:[{x:0.14,y:0},{x:-0.13,y:-0.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:0.13,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-0.13,y:0.13},{x:0.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-0.13,y:-0.14},{x:-0.13,y:0.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:0.14,y:0.13},{x:0.14,y:-0.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-0.13,y:0},{x:-0.54,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:0.16,y:0.29},{x:0.25,y:0.3},{x:0.22,y:0.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:0.08,y:0.17},{x:0.09,y:0.17},{x:0.21,y:0.27},{x:0.21,y:0.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-0.02,y:0.31},{x:0.08,y:0.32},{x:0.04,y:0.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-0.1,y:0.19},{x:-0.09,y:0.2},{x:0.04,y:0.29},{x:0.04,y:0.29}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.21},right1:{type:\"text\",text:\"{REF}\",x:0,y:0.41}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.56,maxX:0.56,minY:-0.32,maxY:0.32,width:1.13,height:0.65,centerX:0,centerY:0},circles:{}},{paths:Zw,texts:eg,bounds:Vo,refblocks:rg,circles:Kw}=Hw,Mp=It({primitives:[...Object.values(Zw),...Object.values(Kw),{...eg.bottom1,anchor:\"middle_top\"},{...eg.right1,anchor:\"middle_bottom\"}],ports:[{...rg.left1,labels:[\"1\"]},{...rg.right1,labels:[\"2\"]}],size:{width:Vo.width,height:Vo.height},center:{x:Vo.centerX,y:Vo.centerY}}),kp=z(Mp,\"up\"),Cp=kp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Yp=kp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Cp.anchor=\"middle_left\";Yp.anchor=\"middle_left\";Cp.y+=0.21;Cp.x=0.21;Yp.y-=0.21;Yp.x=0.21;var Ax=kp,Lp=ri(Ax),Ep=Lp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Tp=Lp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ep.anchor=\"middle_left\";Tp.anchor=\"middle_left\";Ep.y+=0.4;Ep.x=0.2;Tp.y-=0.41;Tp.x=0.2;var Jw=Lp,qw=ii(Mp),t8={paths:{path11:{type:\"path\",points:[{x:-0.52,y:-0.01},{x:-0.18,y:-0.01}],color:\"primary\",fill:!1},\"path11-2\":{type:\"path\",points:[{x:-0.17,y:-0.11},{x:-0.17,y:0.08}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-0.17,y:-0.12},{x:0.16,y:-0.12}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:-0.17,y:0.08},{x:0.16,y:0.08}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.17,y:-0.01},{x:0.52,y:-0.01}],color:\"primary\",fill:!1},\"path11-2-1\":{type:\"path\",points:[{x:0.16,y:-0.12},{x:0.16,y:0.08}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:-0.4,y:-0.21},{x:-0.33,y:-0.18},{x:-0.34,y:-0.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:-0.45,y:-0.34},{x:-0.44,y:-0.32},{x:-0.35,y:-0.22},{x:-0.35,y:-0.22}],color:\"primary\",fill:!1},\"path25-0-9-0\":{type:\"path\",points:[{x:-0.3,y:-0.34},{x:-0.22,y:-0.31},{x:-0.24,y:-0.4}],color:\"primary\",fill:!0},\"path78-6-5-9\":{type:\"path\",points:[{x:-0.35,y:-0.46},{x:-0.34,y:-0.45},{x:-0.25,y:-0.35},{x:-0.25,y:-0.35}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.17,y:-0.41},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.46}},refblocks:{left1:{x:-0.52,y:-0.01},right1:{x:0.52,y:-0.01}},bounds:{minX:-0.55,maxX:0.55,minY:-0.51,maxY:0.46,width:1.1,height:0.62,centerX:0,centerY:-0.02},circles:{path1:{type:\"circle\",x:0,y:-0.02,radius:0.28,color:\"primary\",fill:!1}}},{paths:e8,texts:ig,bounds:zo,refblocks:ng,circles:r8}=t8,Bx=It({primitives:[...Object.values(e8),...Object.values(r8),{...ig.top1,anchor:\"middle_left\",x:0},{...ig.bottom1,anchor:\"middle_left\",x:0}],ports:[{...ng.left1,labels:[\"1\"]},{...ng.right1,labels:[\"2\"]}],size:{width:zo.width,height:zo.height},center:{x:zo.centerX,y:zo.centerY}}),Fx=z(Bx),Px=Fx.primitives.filter((t)=\u003et.type===\"text\"),Np=Px.find((t)=\u003et.text===\"{VAL}\");Np.x=-0.35;Np.y=0;Np.anchor=\"middle_right\";var Wp=Px.find((t)=\u003et.text===\"{REF}\");Wp.y=0;Wp.x=0.35;Wp.anchor=\"middle_left\";var i8=Fx,n8={paths:{path208:{type:\"path\",points:[{x:0.38,y:0.13},{x:0.52,y:-0.13}],color:\"primary\",fill:!1},path209:{type:\"path\",points:[{x:0.25,y:-0.13},{x:0.38,y:0.13}],color:\"primary\",fill:!1},path210:{type:\"path\",points:[{x:0.52,y:-0.13},{x:0.25,y:-0.13}],color:\"primary\",fill:!1},path211:{type:\"path\",points:[{x:0.25,y:0.13},{x:0.52,y:0.13}],color:\"primary\",fill:!1},path212:{type:\"path\",points:[{x:0.12,y:-0.4},{x:0.38,y:-0.4}],color:\"primary\",fill:!1},path213:{type:\"path\",points:[{x:0.38,y:0.4},{x:0.12,y:0.4}],color:\"primary\",fill:!1},path214:{type:\"path\",points:[{x:0.12,y:0.54},{x:0.12,y:0.18}],color:\"primary\",fill:!1},path215:{type:\"path\",points:[{x:0.12,y:-0.54},{x:0.12,y:0}],color:\"primary\",fill:!1},path216:{type:\"path\",points:[{x:0.38,y:-0.4},{x:0.38,y:0.4}],color:\"primary\",fill:!1},path217:{type:\"path\",points:[{x:-0.14,y:0.26},{x:-0.14,y:-0.27}],color:\"primary\",fill:!1},path218:{type:\"path\",points:[{x:-0.22,y:-0.27},{x:-0.22,y:0.26}],color:\"primary\",fill:!1},path219:{type:\"path\",points:[{x:-0.54,y:-0.27},{x:-0.22,y:-0.27}],color:\"primary\",fill:!1},path220:{type:\"path\",points:[{x:-0.14,y:-0.19},{x:0.12,y:-0.19}],color:\"primary\",fill:!1},path221:{type:\"path\",points:[{x:-0.14,y:0.18},{x:0.12,y:0.18}],color:\"primary\",fill:!1},path222:{type:\"path\",points:[{x:-0.07,y:0},{x:0.12,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{VAL}\",x:0.57,y:0.02},right2:{type:\"text\",text:\"{REF}\",x:0.57,y:0.21}},refblocks:{top1:{x:0.12,y:0.54},bottom1:{x:0.12,y:-0.54},left1:{x:-0.54,y:-0.27}},bounds:{minX:-0.57,maxX:0.57,minY:-0.57,maxY:0.57,width:1.14,height:1.14,centerX:0,centerY:0},circles:{}};function on(t,e){return{width:Math.max(...e.map((r)=\u003eMath.abs(r.x-t.x)))*2,height:Math.max(...e.map((r)=\u003eMath.abs(r.y-t.y)))*2}}var{paths:o8,texts:og,bounds:ag,refblocks:Jr}=n8,sg={x:ag.centerX+0.2,y:ag.centerY},Ix=It({primitives:[...Object.values(o8),{...og.right1,anchor:\"middle_left\"},{...og.right2,anchor:\"middle_left\"}],ports:[{...Jr.top1,labels:[\"1\"]},{...Jr.bottom1,labels:[\"2\"]},{...Jr.left1,labels:[\"3\"]}],size:on(sg,[Jr.top1,Jr.bottom1,Jr.left1]),center:sg}),Rp=z(Ix),Mx=Rp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Op=Rp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Mx.anchor=\"middle_top\";Op.anchor=\"middle_top\";Mx.x=Op.x;Op.y+=0.15;var a8=Rp,s8={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:0.01,y:0.07},{x:0.01,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-0.47,y:-0.09},{x:-0.17,y:-0.09}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-0.16,y:-0.01},{x:0.17,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.2,y:-0.09},{x:0.47,y:-0.09}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-0.1,y:0.06},{x:-0.1,y:0.06},{x:-0.1,y:0.07},{x:-0.1,y:0.07},{x:-0.1,y:0.07},{x:-0.1,y:0.08},{x:-0.1,y:0.08},{x:-0.1,y:0.08},{x:-0.1,y:0.09},{x:-0.09,y:0.09},{x:-0.09,y:0.09},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.11},{x:-0.09,y:0.11},{x:-0.08,y:0.11},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.05,y:0.14},{x:-0.05,y:0.15},{x:-0.05,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.03,y:0.16},{x:-0.03,y:0.16},{x:-0.03,y:0.16},{x:-0.02,y:0.16},{x:-0.02,y:0.16},{x:-0.02,y:0.16},{x:-0.01,y:0.16},{x:-0.01,y:0.16},{x:0,y:0.16},{x:0,y:0.16},{x:0,y:0.16},{x:0.01,y:0.16},{x:0.01,y:0.16},{x:0.01,y:0.16},{x:0.02,y:0.16},{x:0.02,y:0.16},{x:0.02,y:0.16},{x:0.03,y:0.16},{x:0.03,y:0.16},{x:0.03,y:0.16},{x:0.04,y:0.16},{x:0.04,y:0.16},{x:0.04,y:0.16},{x:0.05,y:0.15},{x:0.05,y:0.15},{x:0.05,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.14},{x:0.07,y:0.14},{x:0.07,y:0.14},{x:0.07,y:0.14},{x:0.08,y:0.14},{x:0.08,y:0.13},{x:0.08,y:0.13},{x:0.08,y:0.13},{x:0.09,y:0.13},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.1,y:0.11},{x:0.1,y:0.11},{x:0.1,y:0.1},{x:0.1,y:0.1},{x:0.11,y:0.09},{x:0.11,y:0.09},{x:0.11,y:0.09},{x:0.11,y:0.08},{x:0.11,y:0.08},{x:0.11,y:0.08},{x:0.11,y:0.07},{x:0.11,y:0.07},{x:0.11,y:0.07},{x:0.11,y:0.06},{x:0.11,y:0.06},{x:0.1,y:0.06},{x:0.1,y:0.06},{x:0.09,y:0.06},{x:0.09,y:0.06},{x:0.08,y:0.06},{x:0.07,y:0.06},{x:0.07,y:0.06},{x:0.06,y:0.06},{x:0.05,y:0.06},{x:0.05,y:0.06},{x:0.04,y:0.06},{x:0.03,y:0.06},{x:0.03,y:0.06},{x:0.02,y:0.06},{x:0.01,y:0.06},{x:0.01,y:0.06},{x:0,y:0.06},{x:-0.01,y:0.06},{x:-0.01,y:0.06},{x:-0.02,y:0.06},{x:-0.03,y:0.06},{x:-0.03,y:0.06},{x:-0.04,y:0.06},{x:-0.05,y:0.06},{x:-0.05,y:0.06},{x:-0.06,y:0.06},{x:-0.07,y:0.06},{x:-0.07,y:0.06},{x:-0.08,y:0.06},{x:-0.09,y:0.06},{x:-0.09,y:0.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.16,y:-0.27}},refblocks:{left1:{x:-0.47,y:-0.09},right1:{x:0.47,y:-0.09}},bounds:{minX:-0.5,maxX:0.5,minY:-0.27,maxY:0.27,width:1,height:0.53,centerX:0,centerY:0},circles:{}},{paths:c8,texts:cg,bounds:Do,refblocks:lg,circles:l8}=s8,kx=It({primitives:[...Object.values(c8),...Object.values(l8),{...cg.top1,anchor:\"middle_bottom\",x:0},{...cg.bottom1,anchor:\"middle_top\",x:0}],ports:[{...lg.left1,labels:[\"1\"]},{...lg.right1,labels:[\"2\"]}],size:{width:Do.width,height:Do.height},center:{x:Do.centerX+0.006,y:Do.centerY+0.06}}),jp=z(kx),tn=jp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ta=jp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");tn.anchor=\"middle_left\";Ta.anchor=\"middle_right\";tn.x=tn.x-0.03;tn.y=tn.y;Ta.x=Ta.x;Ta.y=0;var p8=jp,Ct=({horizontalSymbol:t,verticalSymbol:e,gateSide:r,drainSide:i})=\u003e{let n=r===\"left\"||r===\"right\",a=i===\"left\"||i===\"right\";if(n===a)throw Error(`Invalid MOSFET orientation: gate ${r}, drain ${i}. Gate and drain must be perpendicular.`);let o=n?t:e;return(r===\"right\"||a\u0026\u0026i===\"left\")\u0026\u0026(o=ii(o)),(r===\"bottom\"||!a\u0026\u0026i===\"bottom\")\u0026\u0026(o=ri(o)),o},h8={paths:{path11:{type:\"path\",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.09,y:0.19},{x:0.09,y:-0.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.27,y:-0.04},{x:0.27,y:0.03},{x:0.2,y:0},{x:0.27,y:-0.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.05,y:0.17},{x:0.05,y:-0.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.13,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.16,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:d8,texts:pg,bounds:hg,refblocks:dr,circles:m8}=h8,Cx={x:hg.centerX,y:hg.centerY},u8={x:Cx.x,y:dr.left1.y},fe=It({primitives:[...Object.values(d8),...Object.values(m8),{...pg.top1,anchor:\"middle_right\",x:0},{...pg.bottom1,anchor:\"middle_right\",x:0}],ports:[{...dr.top1,labels:[\"1\",\"drain\"]},{...dr.bottom1,labels:[\"2\",\"source\"]},{...dr.left1,labels:[\"3\",\"gate\"]}],size:on(Cx,[dr.top1,dr.bottom1,dr.left1]),center:u8}),Yx=z(fe),Lx=Yx.primitives.filter((t)=\u003et.type===\"text\"),$p=Lx.find((t)=\u003et.text===\"{VAL}\");$p.x=-0.35;$p.y=0;$p.anchor=\"middle_right\";var Xp=Lx.find((t)=\u003et.text===\"{REF}\");Xp.y=0;Xp.x=0.35;Xp.anchor=\"middle_left\";var Ye=Yx,y8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"bottom\",drainSide:\"left\"}),f8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"bottom\",drainSide:\"right\"}),_8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"left\",drainSide:\"bottom\"}),g8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"left\",drainSide:\"top\"}),x8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"right\",drainSide:\"bottom\"}),b8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"right\",drainSide:\"top\"}),v8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"top\",drainSide:\"left\"}),S8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:\"top\",drainSide:\"right\"}),w8={paths:{path11:{type:\"path\",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:0.09,y:0.15},{x:0.09,y:0.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:0.09,y:-0.08},{x:0.09,y:-0.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:0.09,y:0.03},{x:0.09,y:-0.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.27,y:-0.04},{x:0.27,y:0.03},{x:0.2,y:0},{x:0.27,y:-0.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.05,y:0.11},{x:0.05,y:-0.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.13,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.16,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:A8,texts:dg,bounds:mg,refblocks:qr,circles:B8}=w8,ug={x:mg.centerX,y:mg.centerY},_e=It({primitives:[...Object.values(A8),...Object.values(B8),{...dg.top1,anchor:\"middle_right\",x:0},{...dg.bottom1,anchor:\"middle_right\",x:0}],ports:[{...qr.top1,labels:[\"1\",\"drain\"]},{...qr.bottom1,labels:[\"2\",\"source\"]},{...qr.left1,labels:[\"3\",\"gate\"]}],size:on(ug,[qr.top1,qr.bottom1,qr.left1]),center:ug}),Ex=z(_e),Tx=Ex.primitives.filter((t)=\u003et.type===\"text\"),Vp=Tx.find((t)=\u003et.text===\"{VAL}\");Vp.x=-0.35;Vp.y=0;Vp.anchor=\"middle_right\";var zp=Tx.find((t)=\u003et.text===\"{REF}\");zp.y=0;zp.x=0.35;zp.anchor=\"middle_left\";var Le=Ex,F8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"bottom\",drainSide:\"left\"}),P8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"bottom\",drainSide:\"right\"}),I8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"left\",drainSide:\"bottom\"}),M8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"left\",drainSide:\"top\"}),k8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"right\",drainSide:\"bottom\"}),C8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"right\",drainSide:\"top\"}),Y8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"top\",drainSide:\"left\"}),L8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:\"top\",drainSide:\"right\"}),E8={paths:{path11:{type:\"path\",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.28,y:0.55},{x:0.28,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.07,y:0.11},{x:0.29,y:0.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.07,y:-0.1},{x:0.29,y:-0.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.07},{x:0.01,y:0},{x:-0.08,y:0.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.15,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.04,y:-0.42}},refblocks:{top1:{x:0.28,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.14,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:T8,texts:yg,bounds:Uo,refblocks:Zc,circles:N8}=E8,Nx=It({primitives:[...Object.values(T8),...Object.values(N8),{...yg.top1,anchor:\"middle_right\",x:0},{...yg.bottom1,anchor:\"middle_right\",x:0}],ports:[{...Zc.top1,labels:[\"1\",\"drain\"]},{...Zc.bottom1,labels:[\"2\",\"source\"]},{...Zc.left1,labels:[\"3\",\"gate\"]}],size:{width:Uo.width,height:Uo.height},center:{x:Uo.centerX,y:Uo.centerY}}),Wx=z(Nx),Rx=Wx.primitives.filter((t)=\u003et.type===\"text\"),Dp=Rx.find((t)=\u003et.text===\"{VAL}\");Dp.x=-0.35;Dp.y=0;Dp.anchor=\"middle_right\";var Up=Rx.find((t)=\u003et.text===\"{REF}\");Up.y=0;Up.x=0.35;Up.anchor=\"middle_left\";var W8=Wx,R8={paths:{diag1:{type:\"path\",points:[{x:-0.1,y:-0.1},{x:0.1,y:0.1}],color:\"primary\",fill:!1},diag2:{type:\"path\",points:[{x:-0.1,y:0.1},{x:0.1,y:-0.1}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-0.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1}},texts:{},refblocks:{left1:{x:-0.2,y:0}},bounds:{minX:-0.19,maxX:0.2,minY:-0.12,maxY:0.12,width:0.39,height:0.24,centerX:0,centerY:0},circles:{}},{paths:O8,bounds:fg,refblocks:j8}=R8,ns=F({primitives:[...Object.values(O8)],ports:[{...j8.left1,labels:[\"1\"]}],center:{x:fg.centerX,y:fg.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).build(),$8=z(ns,\"down\"),X8=z(ns,\"left\"),V8=z(ns,\"up\"),di={paths:{path11:{type:\"path\",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:0.07,y:0.27},{x:0.07,y:-0.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:0.28,y:0.24},{x:0.08,y:0.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:0.29,y:-0.24},{x:0.09,y:-0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.29,y:0.25},{x:0.29,y:0.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.19,y:-0.1},{x:0.12,y:-0.2},{x:0.22,y:-0.2},{x:0.19,y:-0.1}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.08,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.07,y:-0.41}},refblocks:{top1:{x:0.29,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:0.14,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:z8,texts:bz,bounds:Go,refblocks:Kc,circles:D8}=di,U8=F({primitives:[...Object.values(z8),...Object.values(D8),{type:\"text\",text:\"{REF}\",x:-0.3,y:0.5094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:-0.5094553499999995}],ports:[{...Kc.top1,labels:[\"1\",\"collector\"]},{...Kc.bottom1,labels:[\"3\",\"emitter\"]},{...Kc.left1,labels:[\"2\",\"base\"]}],size:{width:Go.width,height:Go.height},center:{x:Go.centerX,y:Go.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:G8,texts:vz,bounds:Qo,refblocks:Jc,circles:Q8}=di,H8=F({primitives:[...Object.values(G8),...Object.values(Q8),{type:\"text\",text:\"{REF}\",x:0.55,y:-0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:-0.4094553499999995}],ports:[{...Jc.top1,labels:[\"1\",\"collector\"]},{...Jc.bottom1,labels:[\"3\",\"emitter\"]},{...Jc.left1,labels:[\"2\",\"base\"]}],size:{width:Qo.width,height:Qo.height},center:{x:Qo.centerX,y:Qo.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Z8,texts:Sz,bounds:Ho,refblocks:qc,circles:K8}=di,J8=F({primitives:[...Object.values(Z8),...Object.values(K8),{type:\"text\",text:\"{REF}\",x:-0.5,y:0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0.55,y:0.3094553499999995}],ports:[{...qc.top1,labels:[\"1\",\"collector\"]},{...qc.bottom1,labels:[\"3\",\"emitter\"]},{...qc.left1,labels:[\"2\",\"base\"]}],size:{width:Ho.width,height:Ho.height},center:{x:Ho.centerX,y:Ho.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:q8,texts:wz,bounds:Zo,refblocks:tl,circles:tA}=di,eA=F({primitives:[...Object.values(q8),...Object.values(tA),{type:\"text\",text:\"{REF}\",x:0.55,y:-0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:-0.4094553499999995}],ports:[{...tl.top1,labels:[\"1\",\"collector\"]},{...tl.bottom1,labels:[\"3\",\"emitter\"]},{...tl.left1,labels:[\"2\",\"base\"]}],size:{width:Zo.width,height:Zo.height},center:{x:Zo.centerX,y:Zo.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:rA,texts:Az,bounds:Ko,refblocks:el,circles:iA}=di,nA=F({primitives:[...Object.values(rA),...Object.values(iA),{type:\"text\",text:\"{REF}\",x:-0.3,y:-0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:0.4094553499999995}],ports:[{...el.top1,labels:[\"1\",\"collector\"]},{...el.bottom1,labels:[\"3\",\"emitter\"]},{...el.left1,labels:[\"2\",\"base\"]}],size:{width:Ko.width,height:Ko.height},center:{x:Ko.centerX,y:Ko.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:oA,texts:Bz,bounds:Jo,refblocks:rl,circles:aA}=di,sA=F({primitives:[...Object.values(oA),...Object.values(aA),{type:\"text\",text:\"{REF}\",x:-0.3,y:-0.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:0.4094553499999995}],ports:[{...rl.top1,labels:[\"1\",\"collector\"]},{...rl.bottom1,labels:[\"3\",\"emitter\"]},{...rl.left1,labels:[\"2\",\"base\"]}],size:{width:Jo.width,height:Jo.height},center:{x:Jo.centerX,y:Jo.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),cA={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.32,y:-0.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.32,y:0.31},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.32,y:-0.21},{x:-0.32,y:0.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.32,y:0.18},{x:-0.57,y:0.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-0.32,y:-0.09},{x:-0.57,y:-0.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.43,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-0.19,y:-0.09},{x:-0.27,y:-0.09}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-0.19,y:0.18},{x:-0.27,y:0.18}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-0.23,y:0.14},{x:-0.23,y:0.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.3}},refblocks:{left1:{x:-0.57,y:0.18},left2:{x:-0.57,y:-0.09},right1:{x:0.43,y:0.04}},bounds:{minX:-0.57,maxX:0.43,minY:-0.38,maxY:0.27,width:1.09,height:0.3,centerX:-0.07,centerY:0.05},circles:{}},os=F(cA).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"3\",\"out\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),lA=z(os,\"down\"),pA=ri(z(os,\"left\")),hA=z(os,\"up\"),dA={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.32,y:-0.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.32,y:0.31},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.32,y:-0.21},{x:-0.32,y:0.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.32,y:0.18},{x:-0.57,y:0.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-0.32,y:-0.09},{x:-0.57,y:-0.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.43,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path44-1\":{type:\"path\",points:[{x:-0.1,y:0.44},{x:-0.1,y:0.18}],color:\"primary\",fill:!1},\"path44-2\":{type:\"path\",points:[{x:-0.09,y:-0.34},{x:-0.09,y:-0.09}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-0.19,y:0.18},{x:-0.27,y:0.18}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-0.19,y:-0.09},{x:-0.27,y:-0.09}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-0.23,y:0.14},{x:-0.23,y:0.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.25,y:0.32},bottom1:{type:\"text\",text:\"{VAL}\",x:0.25,y:-0.24}},refblocks:{left1:{x:-0.57,y:0.18},left2:{x:-0.57,y:-0.09},right1:{x:0.43,y:0.04},top2:{x:-0.1,y:0.44},bottom1:{x:-0.09,y:-0.34}},bounds:{minX:-0.57,maxX:0.43,minY:-0.38,maxY:0.27,width:1.09,height:0.3,centerX:-0.07,centerY:0.05},circles:{}},as=F(dA).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"4\",\"out\"]).labelPort(\"top2\",[\"5\",\"V+\"]).labelPort(\"bottom1\",[\"3\",\"V-\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),mA=z(as,\"down\"),uA=ri(z(as,\"left\")),yA=z(as,\"up\"),fA={paths:{path11:{type:\"path\",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.09,y:0.19},{x:0.09,y:-0.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.2,y:0.03},{x:0.2,y:-0.04},{x:0.27,y:-0.01},{x:0.2,y:0.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.05,y:0.17},{x:0.05,y:-0.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.13,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.16,y:0,radius:0.29,color:\"primary\",fill:!1}}};var{paths:_A,texts:_g,bounds:gg,refblocks:ti,circles:gA}=fA,xg={x:gg.centerX,y:gg.centerY},ge=It({primitives:[...Object.values(_A),...Object.values(gA),{..._g.top1,anchor:\"middle_right\",x:0},{..._g.bottom1,anchor:\"middle_right\",x:0}],ports:[{...ti.top1,labels:[\"1\",\"drain\"]},{...ti.bottom1,labels:[\"2\",\"source\"]},{...ti.left1,labels:[\"3\",\"gate\"]}],size:on(xg,[ti.top1,ti.bottom1,ti.left1]),center:xg}),Ox=z(ge),jx=Ox.primitives.filter((t)=\u003et.type===\"text\"),Gp=jx.find((t)=\u003et.text===\"{VAL}\");Gp.x=-0.35;Gp.y=0;Gp.anchor=\"middle_right\";var Qp=jx.find((t)=\u003et.text===\"{REF}\");Qp.y=0;Qp.x=0.35;Qp.anchor=\"middle_left\";var Ee=Ox,xA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"bottom\",drainSide:\"left\"}),bA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"bottom\",drainSide:\"right\"}),vA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"left\",drainSide:\"bottom\"}),SA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"left\",drainSide:\"top\"}),wA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"right\",drainSide:\"bottom\"}),AA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"right\",drainSide:\"top\"}),BA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"top\",drainSide:\"left\"}),FA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:\"top\",drainSide:\"right\"}),PA={paths:{path11:{type:\"path\",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:0.09,y:0.15},{x:0.09,y:0.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:0.09,y:-0.08},{x:0.09,y:-0.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:0.09,y:0.03},{x:0.09,y:-0.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.2,y:0.03},{x:0.2,y:-0.04},{x:0.27,y:-0.01},{x:0.2,y:0.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:0.05,y:0.11},{x:0.05,y:-0.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.13,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.16,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:IA,texts:bg,bounds:vg,refblocks:ei,circles:MA}=PA,Sg={x:vg.centerX,y:vg.centerY},xe=It({primitives:[...Object.values(IA),...Object.values(MA),{...bg.top1,anchor:\"middle_right\",x:0},{...bg.bottom1,anchor:\"middle_right\",x:0}],ports:[{...ei.top1,labels:[\"1\",\"drain\"]},{...ei.bottom1,labels:[\"2\",\"source\"]},{...ei.left1,labels:[\"3\",\"gate\"]}],size:on(Sg,[ei.top1,ei.bottom1,ei.left1]),center:Sg}),$x=z(xe),Xx=$x.primitives.filter((t)=\u003et.type===\"text\"),Hp=Xx.find((t)=\u003et.text===\"{VAL}\");Hp.x=-0.35;Hp.y=0;Hp.anchor=\"middle_right\";var Zp=Xx.find((t)=\u003et.text===\"{REF}\");Zp.y=0;Zp.x=0.35;Zp.anchor=\"middle_left\";var Te=$x,kA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"bottom\",drainSide:\"left\"}),CA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"bottom\",drainSide:\"right\"}),YA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"left\",drainSide:\"bottom\"}),LA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"left\",drainSide:\"top\"}),EA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"right\",drainSide:\"bottom\"}),TA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"right\",drainSide:\"top\"}),NA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"top\",drainSide:\"left\"}),WA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:\"top\",drainSide:\"right\"}),RA={paths:{path11:{type:\"path\",points:[{x:-0.54,y:-0.01},{x:-0.15,y:-0.02}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.13,y:0},{x:-0.13,y:-0.13}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.13,y:0.13},{x:0.13,y:0}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.13,y:-0.13},{x:-0.13,y:0.13}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.13,y:0.13},{x:0.13,y:-0.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.14,y:0},{x:0.54,y:-0.01}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:0.2,y:0.38},{x:0.16,y:0.28},{x:0.26,y:0.3}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:0.33,y:0.43},{x:0.32,y:0.42},{x:0.21,y:0.31},{x:0.21,y:0.31}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:0.35,y:0.35},{x:0.31,y:0.26},{x:0.41,y:0.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:0.48,y:0.4},{x:0.47,y:0.39},{x:0.35,y:0.29},{x:0.35,y:0.29}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.1,y:0.35},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.43}},refblocks:{left1:{x:-0.54,y:-0.01},right1:{x:0.54,y:-0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.43,maxY:0.43,width:1.14,height:0.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},Vx=F(RA).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),zx=z(Vx),OA=zx.primitives.filter((t)=\u003et.type===\"text\"),Dx=OA.find((t)=\u003et.text===\"{REF}\");Dx.y=0;Dx.anchor=\"middle_left\";var jA=zx,$A={paths:{path11:{type:\"path\",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:0.28,y:0.55},{x:0.28,y:0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.07,y:0.11},{x:0.29,y:0.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:0.07,y:-0.1},{x:0.29,y:-0.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.01,y:-0.07},{x:0.01,y:0.06},{x:-0.08,y:0},{x:0.01,y:-0.07}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.15,y:0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:0.04,y:-0.42}},refblocks:{top1:{x:0.28,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.14,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:XA,texts:wg,bounds:qo,refblocks:il,circles:VA}=$A,Ux=It({primitives:[...Object.values(XA),...Object.values(VA),{...wg.top1,anchor:\"middle_right\",x:0},{...wg.bottom1,anchor:\"middle_right\"}],ports:[{...il.top1,labels:[\"1\",\"drain\"]},{...il.bottom1,labels:[\"2\",\"source\"]},{...il.left1,labels:[\"3\",\"gate\"]}],size:{width:qo.width,height:qo.height},center:{x:qo.centerX,y:qo.centerY}}),Gx=z(Ux),Qx=Gx.primitives.filter((t)=\u003et.type===\"text\"),Kp=Qx.find((t)=\u003et.text===\"{VAL}\");Kp.x=-0.35;Kp.y=0;Kp.anchor=\"middle_right\";var Jp=Qx.find((t)=\u003et.text===\"{REF}\");Jp.y=0;Jp.x=0.35;Jp.anchor=\"middle_left\";var zA=Gx,mr={paths:{path11:{type:\"path\",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:0.07,y:0.27},{x:0.07,y:-0.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:0.28,y:0.24},{x:0.08,y:0.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:0.29,y:-0.24},{x:0.09,y:-0.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:0.29,y:0.25},{x:0.29,y:0.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0.15,y:-0.23},{x:0.22,y:-0.12},{x:0.12,y:-0.12},{x:0.15,y:-0.23}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.08,y:0.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.07,y:-0.41}},refblocks:{top1:{x:0.29,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:0.14,y:0,radius:0.29,color:\"primary\",fill:!1}}},{paths:DA,texts:Fz,bounds:ta,refblocks:nl,circles:UA}=mr,GA=F({primitives:[...Object.values(DA),...Object.values(UA),{type:\"text\",text:\"{REF}\",x:-0.1,y:0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.1,y:-0.3094553499999995}],ports:[{...nl.top1,labels:[\"1\",\"collector\"]},{...nl.bottom1,labels:[\"3\",\"emitter\"]},{...nl.left1,labels:[\"2\",\"base\"]}],size:{width:ta.width,height:ta.height},center:{x:ta.centerX,y:ta.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:Pz,texts:Iz,bounds:Mz,refblocks:kz,circles:Cz}=mr,QA=F(mr).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{VAL}\",\"middle_left\").labelPort(\"left1\",[\"2\",\"base\"]).labelPort(\"top1\",[\"1\",\"collector\"]).labelPort(\"bottom1\",[\"3\",\"emitter\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:HA,texts:Yz,bounds:ea,refblocks:ol,circles:ZA}=mr,KA=F({primitives:[...Object.values(HA),...Object.values(ZA),{type:\"text\",text:\"{REF}\",x:-0.1,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.1,y:0.3094553499999995}],ports:[{...ol.top1,labels:[\"1\",\"collector\"]},{...ol.bottom1,labels:[\"3\",\"emitter\"]},{...ol.left1,labels:[\"2\",\"base\"]}],size:{width:ea.width,height:ea.height},center:{x:ea.centerX,y:ea.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_bottom\").build(),{paths:JA,texts:Lz,bounds:ra,refblocks:al,circles:qA}=mr,t6=F({primitives:[...Object.values(JA),...Object.values(qA),{type:\"text\",text:\"{REF}\",x:-0.1,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.1,y:0.3094553499999995}],ports:[{...al.top1,labels:[\"1\",\"collector\"]},{...al.bottom1,labels:[\"3\",\"emitter\"]},{...al.left1,labels:[\"2\",\"base\"]}],size:{width:ra.width,height:ra.height},center:{x:ra.centerX,y:ra.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_top\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:e6,texts:Ez,bounds:ia,refblocks:sl,circles:r6}=mr,i6=F({primitives:[...Object.values(e6),...Object.values(r6),{type:\"text\",text:\"{REF}\",x:-0.1,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.1,y:0.3094553499999995}],ports:[{...sl.top1,labels:[\"1\",\"collector\"]},{...sl.bottom1,labels:[\"3\",\"emitter\"]},{...sl.left1,labels:[\"2\",\"base\"]}],size:{width:ia.width,height:ia.height},center:{x:ia.centerX,y:ia.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:n6,texts:Tz,bounds:na,refblocks:cl,circles:o6}=mr,a6=F({primitives:[...Object.values(n6),...Object.values(o6),{type:\"text\",text:\"{REF}\",x:-0.1,y:-0.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-0.1,y:0.3094553499999995}],ports:[{...cl.top1,labels:[\"1\",\"collector\"]},{...cl.bottom1,labels:[\"3\",\"emitter\"]},{...cl.left1,labels:[\"2\",\"base\"]}],size:{width:na.width,height:na.height},center:{x:na.centerX,y:na.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),s6={paths:{path40:{type:\"path\",points:[{x:-0.19,y:0.33},{x:-0.26,y:0.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.38,y:0.26},{x:-0.19,y:0.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.26,y:0.14},{x:-0.38,y:0.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-0.26,y:0.39},{x:-0.13,y:0.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.32,y:0.2},{x:-0.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:0.52},{x:-0.19,y:0.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-0.19,y:-0.32},{x:-0.38,y:-0.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-0.26,y:-0.13},{x:-0.19,y:-0.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-0.38,y:-0.26},{x:-0.26,y:-0.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-0.13,y:-0.26},{x:-0.26,y:-0.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-0.32,y:-0.19},{x:-0.51,y:-0.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-0.01,y:-0.5},{x:-0.19,y:-0.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:0.32,y:0.19},{x:0.13,y:0.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:0.26,y:0.38},{x:0.32,y:0.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:0.13,y:0.26},{x:0.26,y:0.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:0.39,y:0.26},{x:0.26,y:0.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:0.2,y:0.32},{x:0.01,y:0.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:0.52,y:0},{x:0.32,y:0.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:0.32,y:-0.19},{x:0.26,y:-0.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:0.13,y:-0.26},{x:0.32,y:-0.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:0.26,y:-0.38},{x:0.13,y:-0.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:0.26,y:-0.13},{x:0.39,y:-0.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:0.19,y:-0.32},{x:0,y:-0.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:0.5,y:-0.01},{x:0.32,y:-0.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.29,y:0.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.29,y:-0.5}},refblocks:{top1:{x:0,y:0.52},bottom1:{x:0,y:-0.52},left1:{x:-0.52,y:0},right1:{x:0.52,y:0}},bounds:{minX:-0.55,maxX:0.55,minY:-0.55,maxY:0.55,width:1.09,height:1.09,centerX:0,centerY:0},circles:{}},{paths:c6,texts:Ag,bounds:oa,refblocks:Bg}=s6,Hx=It({primitives:[...Object.values(c6),{...Ag.bottom1,y:0.35,anchor:\"middle_top\"},{...Ag.top1,anchor:\"middle_left\"}],ports:[{...Bg.left1,labels:[\"1\"]},{...Bg.right1,labels:[\"2\"]}],size:{width:oa.width+0.05,height:oa.height},center:{x:oa.centerX,y:oa.centerY}}),l6=z(Hx),p6=l6,h6={paths:{path18:{type:\"path\",points:[{x:-0.53,y:0},{x:-0.27,y:0}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:0.26,y:0},{x:0.53,y:0}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:0,y:0.13},{x:0.26,y:0.13},{x:0.26,y:-0.13},{x:-0.27,y:-0.13},{x:-0.27,y:0.13},{x:0,y:0.13}],color:\"primary\",fill:!1},path24:{type:\"path\",points:[{x:0.29,y:-0.29},{x:0.26,y:-0.16},{x:0.16,y:-0.26},{x:0.29,y:-0.29}],color:\"primary\",fill:!0},path26:{type:\"path\",points:[{x:-0.3,y:0.29},{x:0.2,y:-0.2}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.06,y:0.2},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.1,y:-0.28}},refblocks:{left1:{x:-0.53,y:0},right1:{x:0.53,y:0}},bounds:{minX:-0.56,maxX:0.56,minY:-0.29,maxY:0.29,width:1.13,height:0.58,centerX:0,centerY:0},circles:{}},{paths:d6,texts:Fg,bounds:aa,refblocks:Pg}=h6,ss=It({primitives:[...Object.values(d6),{...Fg.bottom1,x:0,y:-0.35,anchor:\"middle_top\"},{...Fg.top1,x:0,y:0.35,anchor:\"middle_bottom\"}],ports:[{...Pg.left1,labels:[\"1\"]},{...Pg.right1,labels:[\"2\"]}],size:{width:aa.width+0.05,height:aa.height},center:{x:aa.centerX,y:aa.centerY}}),qp=z(ss,\"down\"),th=qp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),eh=qp.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");th.anchor=\"middle_left\";eh.anchor=\"middle_left\";th.y+=0.31;th.x=0.34;eh.y-=0.31;eh.x=0.34;var m6=qp,rh=z(ss,\"left\"),ih=rh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),nh=rh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ih.anchor=\"middle_bottom\";nh.anchor=\"middle_top\";ih.y+=0.73;ih.x=0;nh.y-=0.7;nh.x=0;var u6=rh,oh=z(ss,\"up\"),ah=oh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),sh=oh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ah.anchor=\"middle_left\";sh.anchor=\"middle_left\";ah.y+=0.21;ah.x=0.34;sh.y-=0.21;sh.x=0.34;var y6=oh,cs={paths:{path1:{type:\"path\",points:[{x:-0.42,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},\"path1-2-1\":{type:\"path\",points:[{x:-0.3,y:0},{x:-0.25,y:0.1},{x:-0.15,y:-0.1},{x:-0.05,y:0.1},{x:0.05,y:-0.1},{x:0.15,y:0.1},{x:0.25,y:-0.1},{x:0.3,y:0}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.3,y:0},{x:0.42,y:0}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0,y:-0.17},{x:0,y:-0.4}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0,y:-0.12},{x:0.05,y:-0.2},{x:-0.05,y:-0.2},{x:0,y:-0.12}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.3,y:0.25},bottom1:{type:\"text\",text:\"{VAL}\",x:0.3,y:-0.25}},refblocks:{left:{x:-0.42,y:0},right:{x:0.42,y:0},bottom:{x:0,y:-0.4}},bounds:{minX:-0.42,maxX:0.42,minY:-0.2,maxY:0.2,width:0.84,height:0.4,centerX:0,centerY:0},circles:{}},{paths:f6,texts:Nz,bounds:sa,refblocks:ll,circles:_6}=cs,g6=F({primitives:[...Object.values(f6),...Object.values(_6),{type:\"text\",text:\"{REF}\",x:-0.15,y:0.2394553499999995},{type:\"text\",text:\"{VAL}\",x:0.15,y:0.2394553499999995}],ports:[{...ll.left,labels:[\"1\"]},{...ll.right,labels:[\"3\"]},{...ll.bottom,labels:[\"2\"]}],size:{width:sa.width,height:sa.height},center:{x:sa.centerX,y:sa.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:x6,texts:Wz,bounds:ca,refblocks:pl,circles:b6}=cs,v6=F({primitives:[...Object.values(x6),...Object.values(b6),{type:\"text\",text:\"{REF}\",x:-0.3,y:-0.3894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:0.3194553499999995}],ports:[{...pl.left,labels:[\"1\"]},{...pl.right,labels:[\"3\"]},{...pl.bottom,labels:[\"2\"]}],size:{width:ca.width,height:ca.height},center:{x:ca.centerX,y:ca.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),S6=F(cs).labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"3\"]).labelPort(\"bottom\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:w6,texts:Rz,bounds:la,refblocks:hl,circles:A6}=cs,B6=F({primitives:[...Object.values(w6),...Object.values(A6),{type:\"text\",text:\"{REF}\",x:0.3,y:-0.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-0.3,y:-0.2894553499999995}],ports:[{...hl.left,labels:[\"1\"]},{...hl.right,labels:[\"3\"]},{...hl.bottom,labels:[\"2\"]}],size:{width:la.width,height:la.height},center:{x:la.centerX,y:la.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),F6={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.16,y:0.4},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.4},left1:{type:\"text\",text:\"COS φ\",x:-0.15,y:0.01}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.04,radius:0.29,color:\"primary\",fill:!1}}},{paths:P6,texts:Oz,bounds:pa,refblocks:Ig,circles:I6}=F6,Zx=It({primitives:[...Object.values(P6),...Object.values(I6),{type:\"text\",text:\"{REF}\",x:0,y:0.43330070000000065,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-0.43330070000000065,anchor:\"middle_top\"},{type:\"text\",text:\"COS φ\",x:0,y:0.014279000000000375,anchor:\"center\"}],ports:[{...Ig.left1,labels:[\"1\"]},{...Ig.right1,labels:[\"2\"]}],size:{width:pa.width,height:pa.height},center:{x:pa.centerX,y:pa.centerY}}),Kx=z(Zx),ch=Kx.primitives.filter((t)=\u003et.type===\"text\"),bl=ch.find((t)=\u003et.text===\"{REF}\"),lh=ch.find((t)=\u003et.text===\"{VAL}\"),vl=ch.find((t)=\u003et.text===\"COS φ\");bl.x=0.35;bl.y=0.4279000000000375,bl.anchor=\"middle_left\";lh.anchor=\"middle_left\";lh.x=0.35;lh.y=-0.4279000000000375,vl.x=0;vl.y=0.014279000000000375,vl.anchor=\"center\";var M6=Kx,k6={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:0.01,y:0.03},{x:0.01,y:-0.09}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-0.47,y:-0.05},{x:-0.17,y:-0.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-0.16,y:-0.09},{x:0.18,y:-0.09}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:0.2,y:-0.05},{x:0.47,y:-0.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.01,y:0.22},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.16,y:-0.22}},refblocks:{left1:{x:-0.47,y:-0.05},right1:{x:0.47,y:-0.05}},bounds:{minX:-0.5,maxX:0.5,minY:-0.22,maxY:0.22,width:1,height:0.45,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-0.14,y:-0.05,radius:0.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:0.17,y:-0.05,radius:0.02,color:\"primary\",fill:!1}}},{paths:C6,texts:Mg,bounds:kg,refblocks:Cg,circles:Y6}=k6,Jx=It({primitives:[...Object.values(C6),...Object.values(Y6),{...Mg.top1,anchor:\"middle_left\"},{...Mg.bottom1,anchor:\"middle_left\"}],ports:[{...Cg.left1,labels:[\"1\"]},{...Cg.right1,labels:[\"2\"]}],center:{x:kg.centerX,y:kg.centerY}}),L6=z(Jx,\"up\"),qx={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:-0.05,y:0.09},{x:-0.05,y:0.04}],color:\"primary\",fill:!1},\"path12-1-8-7-9-9\":{type:\"path\",points:[{x:-0.05,y:0.09},{x:0.07,y:0.09}],color:\"primary\",fill:!1},\"path12-1-8-6-9-10\":{type:\"path\",points:[{x:0.07,y:0.09},{x:0.07,y:0.04}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-0.47,y:-0.05},{x:-0.17,y:-0.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-0.16,y:0.04},{x:0.18,y:0.04}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:0.2,y:-0.05},{x:0.47,y:-0.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.01,y:0.29},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.16,y:-0.22}},refblocks:{left1:{x:-0.47,y:-0.05},right1:{x:0.47,y:-0.05}},bounds:{minX:-0.5,maxX:0.5,minY:-0.22,maxY:0.22,width:1,height:0.45,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-0.14,y:-0.05,radius:0.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:0.17,y:-0.05,radius:0.02,color:\"primary\",fill:!1}}},{paths:E6,texts:Yg,bounds:T6,refblocks:dl,circles:N6}=qx,an=It({primitives:[...Object.values(E6),...Object.values(N6),{...Yg.top1,x:0,y:0.3594553499999995,anchor:\"middle_bottom\"},{...Yg.bottom1,x:0,y:-0.3594553499999995,anchor:\"middle_top\"}],ports:[{...dl.left1,labels:[\"1\"]},{...dl.right1,labels:[\"2\"]}],center:{x:T6.centerX,y:dl.left1.y}}),ph=z(an,\"down\"),hh=ph.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),dh=ph.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");hh.anchor=\"middle_bottom\";dh.anchor=\"middle_top\";hh.y=0.4;hh.x=0.35;dh.y=-0.4;dh.x=0.35;var W6=ph,{paths:R6,texts:Lg,bounds:O6,refblocks:ml,circles:j6}=qx,$6=It({primitives:[...Object.values(R6),...Object.values(j6),{...Lg.top1,x:0,y:0.3594553499999995,anchor:\"middle_bottom\"},{...Lg.bottom1,x:0,y:-0.3594553499999995,anchor:\"middle_top\"}],ports:[{...ml.left1,labels:[\"1\"]},{...ml.right1,labels:[\"2\"]}],center:{x:O6.centerX,y:ml.left1.y}}),mh=z(an,\"left\"),uh=mh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),yh=mh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");uh.anchor=\"middle_bottom\";yh.anchor=\"middle_top\";uh.y=0.4;uh.x=0;yh.y=-0.4;yh.x=0;var X6=mh,fh=z(an,\"up\"),_h=fh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),gh=fh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");_h.anchor=\"middle_left\";gh.anchor=\"middle_left\";_h.y+=0.4;_h.x=0.34;gh.y-=0.41;gh.x=0.34;var V6=fh,xh=z(an,\"up\"),bh=xh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),vh=xh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");bh.anchor=\"middle_left\";vh.anchor=\"middle_left\";bh.y+=0.4;bh.x=0.34;vh.y-=0.41;vh.x=0.34;var z6=xh,ls={paths:{path12_rotated:{type:\"path\",points:[{x:-0.09,y:0.12},{x:-0.09,y:-0.12}],color:\"primary\",fill:!1},path2_rotated:{type:\"path\",points:[{x:-0.09,y:0},{x:0.09,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.03}},refblocks:{left1:{x:0.09,y:0}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{}},{paths:D6,texts:jz,bounds:Eg,refblocks:U6,circles:G6}=ls,Q6=F({primitives:[...Object.values(D6),...Object.values(G6),{type:\"text\",text:\"{REF}\",x:-0.14,y:-0}],ports:[{...U6.left1,labels:[\"1\"]}],center:{x:Eg.centerX,y:Eg.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:H6,texts:$z,bounds:Tg,refblocks:Z6,circles:K6}=ls,J6=F({primitives:[...Object.values(H6),...Object.values(K6),{type:\"text\",text:\"{REF}\",x:-0.13,y:0}],ports:[{...Z6.left1,labels:[\"1\"]}],center:{x:Tg.centerX,y:Tg.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:q6,texts:Xz,bounds:Ng,refblocks:tB,circles:eB}=ls,rB=F({primitives:[...Object.values(q6),...Object.values(eB),{type:\"text\",text:\"{REF}\",x:-0.14,y:-0}],ports:[{...tB.left1,labels:[\"1\"]}],center:{x:Ng.centerX,y:Ng.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:iB,texts:Vz,bounds:Wg,refblocks:nB}=ls,oB=F({primitives:[...Object.values(iB),{type:\"text\",text:\"{REF}\",x:-0.14,y:0}],ports:[{...nB.left1,labels:[\"1\"]}],center:{x:Wg.centerX,y:Wg.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),aB={paths:{path40:{type:\"path\",points:[{x:-0.19,y:-0.33},{x:-0.26,y:-0.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.38,y:-0.26},{x:-0.19,y:-0.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.26,y:-0.14},{x:-0.38,y:-0.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-0.26,y:-0.39},{x:-0.13,y:-0.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.32,y:-0.2},{x:-0.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:-0.52},{x:-0.19,y:-0.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-0.19,y:0.32},{x:-0.38,y:0.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-0.26,y:0.13},{x:-0.19,y:0.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-0.38,y:0.26},{x:-0.26,y:0.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-0.13,y:0.26},{x:-0.26,y:0.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-0.32,y:0.19},{x:-0.51,y:0.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-0.01,y:0.5},{x:-0.19,y:0.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:0.32,y:-0.19},{x:0.13,y:-0.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:0.26,y:-0.38},{x:0.32,y:-0.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:0.13,y:-0.26},{x:0.26,y:-0.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:0.39,y:-0.26},{x:0.26,y:-0.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:0.2,y:-0.32},{x:0.01,y:-0.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:0.52,y:0},{x:0.32,y:-0.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:0.32,y:0.19},{x:0.26,y:0.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:0.13,y:0.26},{x:0.32,y:0.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:0.26,y:0.38},{x:0.13,y:0.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:0.26,y:0.13},{x:0.39,y:0.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:0.19,y:0.32},{x:0,y:0.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:0.5,y:0.01},{x:0.32,y:0.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.29,y:-0.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.29,y:0.5}},refblocks:{top1:{x:0,y:-0.52},bottom1:{x:0,y:0.52},left1:{x:-0.52,y:0},right1:{x:0.52,y:0}},bounds:{minX:-0.55,maxX:0.55,minY:-0.56,maxY:0.55,width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:sB,texts:Rg,bounds:ha,refblocks:da,circles:cB}=aB,tb=It({primitives:[...Object.values(sB),...Object.values(cB),{...Rg.top1,anchor:\"middle_right\"},{...Rg.bottom1,anchor:\"middle_right\"}],ports:[{...da.top1,labels:[\"1\"]},{...da.bottom1,labels:[\"2\"]},{...da.left1,labels:[\"3\"]},{...da.right1,labels:[\"4\"]}],size:{width:ha.width,height:ha.height},center:{x:ha.centerX,y:ha.centerY}}),Sh=z(tb),lB=Sh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),pB=Sh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");lB.anchor=\"middle_left\";pB.anchor=\"middle_right\";var hB=Sh,ps={paths:{path27:{type:\"path\",points:[{x:0.47,y:0.04},{x:0.21,y:0.04}],color:\"primary\",fill:!1},\"path27-0\":{type:\"path\",points:[{x:-0.21,y:0.04},{x:-0.47,y:0.04}],color:\"primary\",fill:!1},\"path27-8-2-4\":{type:\"path\",points:[{x:0.21,y:0.04},{x:0.19,y:-0.05}],color:\"primary\",fill:!1},\"path27-8-2-4-29\":{type:\"path\",points:[{x:-0.19,y:0.14},{x:-0.21,y:0.04}],color:\"primary\",fill:!1},\"path27-8-2-4-5\":{type:\"path\",points:[{x:0.19,y:-0.05},{x:0.13,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1\":{type:\"path\",points:[{x:0.08,y:-0.05},{x:0.13,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9\":{type:\"path\",points:[{x:0.08,y:-0.05},{x:0.03,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2\":{type:\"path\",points:[{x:-0.03,y:-0.05},{x:0.03,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1\":{type:\"path\",points:[{x:-0.03,y:-0.05},{x:-0.08,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2\":{type:\"path\",points:[{x:-0.13,y:-0.05},{x:-0.08,y:0.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2-2\":{type:\"path\",points:[{x:-0.13,y:-0.05},{x:-0.19,y:0.14}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.05,y:0.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.04,y:-0.42}},refblocks:{left1:{x:-0.47,y:0.04},right1:{x:0.47,y:0.04}},bounds:{minX:-0.49,maxX:0.49,minY:-0.42,maxY:0.42,width:0.99,height:0.84,centerX:0,centerY:0},circles:{}},{paths:dB,texts:zz,bounds:ma,refblocks:Og,circles:mB}=ps,uB=F({primitives:[...Object.values(dB),...Object.values(mB),{type:\"text\",text:\"{REF}\",x:-0.2,y:0.2194553499999995},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.2194553499999995}],ports:[{...Og.left1,labels:[\"1\"]},{...Og.right1,labels:[\"2\"]}],size:{width:ma.width,height:ma.height},center:{x:ma.centerX,y:ma.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:yB,texts:Dz,bounds:ua,refblocks:jg,circles:fB}=ps,_B=F({primitives:[...Object.values(yB),...Object.values(fB),{type:\"text\",text:\"{REF}\",x:0,y:-0.1704553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:0.2294553499999995}],ports:[{...jg.left1,labels:[\"1\"]},{...jg.right1,labels:[\"2\"]}],size:{width:ua.width,height:ua.height},center:{x:ua.centerX,y:ua.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:gB,texts:Uz,bounds:ya,refblocks:$g,circles:xB}=ps,bB=F({primitives:[...Object.values(gB),...Object.values(xB),{type:\"text\",text:\"{REF}\",x:0,y:0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-0.1704553499999995}],ports:[{...$g.left1,labels:[\"1\"]},{...$g.right1,labels:[\"2\"]}],size:{width:ya.width,height:ya.height},center:{x:ya.centerX,y:ya.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),hs={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.25,y:0},{x:-0.16,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02},zigzag:{type:\"path\",points:[{x:-0.16,y:0},{x:-0.12,y:0.095},{x:-0.07,y:-0.095},{x:-0.02,y:0.095},{x:0.02,y:-0.095},{x:0.07,y:0.095},{x:0.12,y:-0.095},{x:0.16,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02},\"right-lead\":{type:\"path\",points:[{x:0.16,y:0},{x:0.25,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},vB=Nt(hs,{kind:\"resistor\",orientation:\"down\"}),SB=Nt(hs,{kind:\"resistor\",orientation:\"left\"}),wB=Nt(hs,{kind:\"resistor\",orientation:\"right\"}),AB=Nt(hs,{kind:\"resistor\",orientation:\"up\"}),{paths:BB,texts:Gz,bounds:fa,refblocks:Xg,circles:FB}=ps,PB=F({primitives:[...Object.values(BB),...Object.values(FB),{type:\"text\",text:\"{REF}\",x:0.2,y:-0.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-0.2,y:-0.1494553499999995}],ports:[{...Xg.left1,labels:[\"1\"]},{...Xg.right1,labels:[\"2\"]}],size:{width:fa.width,height:fa.height},center:{x:fa.centerX,y:fa.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),ds={paths:{\"left-lead\":{type:\"path\",points:[{x:-0.175,y:0},{x:-0.115,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02},zigzag:{type:\"path\",points:[{x:-0.115,y:0},{x:-0.07,y:0.095},{x:-0.025,y:-0.095},{x:0.025,y:0.095},{x:0.07,y:-0.095},{x:0.115,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02},\"right-lead\":{type:\"path\",points:[{x:0.115,y:0},{x:0.175,y:0}],color:\"primary\",fill:!1,strokeWidth:0.02}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25,anchor:\"middle_top\"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},IB=Nt(ds,{kind:\"resistor\",orientation:\"down\"}),MB=Nt(ds,{kind:\"resistor\",orientation:\"left\"}),kB=Nt(ds,{kind:\"resistor\",orientation:\"right\"}),CB=Nt(ds,{kind:\"resistor\",orientation:\"up\"}),eb={paths:{path27:{type:\"path\",points:[{x:0.76,y:-0.28},{x:0.31,y:-0.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-0.3,y:-0.02},{x:-0.77,y:-0.02}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-0.3,y:0.35},{x:-0.3,y:-0.28}],color:\"primary\",fill:!1},\"path27-3\":{type:\"path\",points:[{x:0.77,y:0.35},{x:0.32,y:0.35}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-0.07,y:-0.28},{x:-0.3,y:-0.28}],color:\"primary\",fill:!1},\"path29-5-7\":{type:\"path\",points:[{x:0.33,y:-0.28},{x:0.11,y:-0.28}],color:\"primary\",fill:!1},\"path29-5-7-6\":{type:\"path\",points:[{x:-0.06,y:-0.17},{x:-0.06,y:-0.39}],color:\"primary\",fill:!1},\"path29-5-7-6-6\":{type:\"path\",points:[{x:0.09,y:-0.17},{x:0.09,y:-0.39}],color:\"primary\",fill:!1},\"path29-5-9\":{type:\"path\",points:[{x:-0.07,y:0.35},{x:-0.3,y:0.35}],color:\"primary\",fill:!1},\"path29-5-7-2\":{type:\"path\",points:[{x:0.33,y:0.35},{x:0.11,y:0.35}],color:\"primary\",fill:!1},\"path29-5-7-6-0\":{type:\"path\",points:[{x:-0.06,y:0.46},{x:-0.06,y:0.24}],color:\"primary\",fill:!1},\"path29-5-7-6-6-2\":{type:\"path\",points:[{x:0.09,y:0.46},{x:0.09,y:0.24}],color:\"primary\",fill:!1},\"path29-5-92\":{type:\"path\",points:[{x:0.33,y:0.13},{x:0.33,y:0.35}],color:\"primary\",fill:!1},\"path29-5-7-28\":{type:\"path\",points:[{x:0.33,y:-0.28},{x:0.33,y:-0.05}],color:\"primary\",fill:!1},\"path29-5-7-6-9\":{type:\"path\",points:[{x:0.44,y:0.11},{x:0.22,y:0.11}],color:\"primary\",fill:!1},\"path29-5-7-6-6-7\":{type:\"path\",points:[{x:0.44,y:-0.04},{x:0.22,y:-0.04}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2\":{type:\"path\",points:[{x:0.44,y:0.07},{x:0.22,y:0.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4\":{type:\"path\",points:[{x:0.44,y:0},{x:0.44,y:0.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4-6\":{type:\"path\",points:[{x:0.22,y:0},{x:0.22,y:0.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-9\":{type:\"path\",points:[{x:0.44,y:0},{x:0.22,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.02,y:0.53},bottom1:{type:\"text\",text:\"{VAL}\",x:0.01,y:-0.54}},refblocks:{left1:{x:-0.77,y:-0.02},right1:{x:0.76,y:-0.28},right2:{x:0.77,y:0.35}},bounds:{minX:-0.79,maxX:0.79,minY:-0.54,maxY:0.54,width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:YB,texts:Vg,bounds:_a,refblocks:ul,circles:LB}=eb,ms=It({primitives:[...Object.values(YB),...Object.values(LB),{...Vg.top1,anchor:\"middle_bottom\"},{...Vg.bottom1,anchor:\"middle_top\"}],ports:[{...ul.left1,labels:[\"1\"]},{...ul.right1,labels:[\"2\"]},{...ul.right2,labels:[\"3\"]}],size:{width:_a.width,height:_a.height},center:{x:_a.centerX,y:_a.centerY}}),wh=z(ms,\"down\"),Ah=wh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Bh=wh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ah.anchor=\"middle_bottom\";Bh.anchor=\"middle_top\";Ah.y+=0.3;Ah.x+=0.101;Bh.y-=0.49999;Bh.x+=1.19999;var EB=wh,{paths:TB,texts:Qz,bounds:ga,refblocks:yl,circles:NB}=eb,rb=It({primitives:[...Object.values(TB),...Object.values(NB),{type:\"text\",text:\"{REF}\",x:0.01596175000000022,y:-0.5308501500000009,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0.013116750000000454,y:0.5408501499999989,anchor:\"middle_bottom\"}],ports:[{...yl.left1,labels:[\"1\"]},{...yl.right1,labels:[\"2\"]},{...yl.right2,labels:[\"3\"]}],size:{width:ga.width,height:ga.height},center:{x:ga.centerX,y:ga.centerY}}),Fh=z(ms,\"left\"),Ph=Fh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ih=Fh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ph.anchor=\"middle_bottom\";Ih.anchor=\"middle_top\";Ph.y+=0.99;Ph.x-=0;Ih.y-=1.10999;Ih.x=0;var WB=Fh,Mh=z(ms,\"up\"),kh=Mh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ch=Mh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");kh.anchor=\"middle_bottom\";Ch.anchor=\"middle_top\";kh.y+=0.499;kh.x=0.62;Ch.y-=0.29999;Ch.x+=0.1;var RB=Mh,OB=z(rb),jB={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path43-7\":{type:\"path\",points:[{x:0.21,y:0.18},{x:0.14,y:0.18}],color:\"primary\",fill:!1},\"path43-7-9\":{type:\"path\",points:[{x:0.21,y:0.13},{x:0.21,y:0.18}],color:\"primary\",fill:!1},\"path43-7-2\":{type:\"path\",points:[{x:0.08,y:-0.09},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},\"path43-7-9-3\":{type:\"path\",points:[{x:0.08,y:-0.04},{x:0.08,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},us=F(jB).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_top\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Yh=z(us,\"down\"),Lh=Yh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Eh=Yh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Lh.anchor=\"middle_left\";Eh.anchor=\"middle_left\";Lh.y+=0.3;Lh.x=0.3;Eh.y-=0.3;Eh.x=0.3;var $B=Yh,Th=z(us,\"left\"),Nh=Th.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Wh=Th.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Nh.anchor=\"middle_bottom\";Wh.anchor=\"middle_top\";Nh.y+=0.5;Nh.x=0;Wh.y-=0.55;Wh.x=0;var XB=Th,Rh=z(us,\"up\"),Oh=Rh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),jh=Rh.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Oh.anchor=\"middle_left\";jh.anchor=\"middle_left\";Oh.y+=0.3;Oh.x=0.3;jh.y-=0.3;jh.x=0.3;var VB=Rh,ib={paths:{path11:{type:\"path\",points:[{x:-0.52,y:0.04},{x:-0.18,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.19,y:0.05},{x:0.52,y:0.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:0.18,y:-0.15},{x:0.18,y:0.25}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:0.19,y:0},{x:0.35,y:-0.14}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:0.35,y:-0.14},{x:0.34,y:-0.35}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.17,y:0.27},{x:-0.17,y:-0.15},{x:0.18,y:0.05},{x:-0.17,y:0.27}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.22,y:0.38},bottom1:{type:\"text\",text:\"{VAL}\",x:0.11,y:-0.38}},refblocks:{bottom1:{x:0.34,y:-0.35},left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.05}},bounds:{minX:-0.55,maxX:0.55,minY:-0.38,maxY:0.38,width:1.09,height:0.77,centerX:0,centerY:0},circles:{}},{paths:Hz,texts:Zz,bounds:Kz,refblocks:Jz,circles:qz}=ib,nb=F(ib).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ob=z(nb),zB=ob.primitives.filter((t)=\u003et.type===\"text\"),ab=zB.find((t)=\u003et.text===\"{REF}\");ab.y=0;ab.anchor=\"middle_left\";var DB=ob,sb={paths:{path44:{type:\"path\",points:[{x:-0.195,y:-0.025},{x:-0.45,y:-0.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:-0.025},{x:0.195,y:-0.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:0.07,y:-0.025},{x:-0.07,y:-0.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.07,y:0.1},{x:0.07,y:-0.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.07,y:0.1},{x:-0.07,y:-0.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.07,y:0.1},{x:-0.082252,y:0.099398},{x:-0.094386,y:0.097598},{x:-0.106286,y:0.094618},{x:-0.117835,y:0.090485},{x:-0.128925,y:0.08524},{x:-0.139446,y:0.078934},{x:-0.149299,y:0.071626},{x:-0.158388,y:0.063388},{x:-0.166626,y:0.054299},{x:-0.173934,y:0.044446},{x:-0.18024,y:0.033925},{x:-0.185485,y:0.022835},{x:-0.189618,y:0.011286},{x:-0.192598,y:-0.000614},{x:-0.194398,y:-0.012748},{x:-0.195,y:-0.025},{x:-0.194398,y:-0.037252},{x:-0.192598,y:-0.049386},{x:-0.189618,y:-0.061286},{x:-0.185485,y:-0.072835},{x:-0.18024,y:-0.083925},{x:-0.173934,y:-0.094446},{x:-0.166626,y:-0.104299},{x:-0.158388,y:-0.113388},{x:-0.149299,y:-0.121626},{x:-0.139446,y:-0.128934},{x:-0.128925,y:-0.13524},{x:-0.117835,y:-0.140485},{x:-0.106286,y:-0.144618},{x:-0.094386,y:-0.147598},{x:-0.082252,y:-0.149398},{x:-0.07,y:-0.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.07,y:0.1},{x:0.082252,y:0.099398},{x:0.094386,y:0.097598},{x:0.106286,y:0.094618},{x:0.117835,y:0.090485},{x:0.128925,y:0.08524},{x:0.139446,y:0.078934},{x:0.149299,y:0.071626},{x:0.158388,y:0.063388},{x:0.166626,y:0.054299},{x:0.173934,y:0.044446},{x:0.18024,y:0.033925},{x:0.185485,y:0.022835},{x:0.189618,y:0.011286},{x:0.192598,y:-0.000614},{x:0.194398,y:-0.012748},{x:0.195,y:-0.025},{x:0.194398,y:-0.037252},{x:0.192598,y:-0.049386},{x:0.189618,y:-0.061286},{x:0.185485,y:-0.072835},{x:0.18024,y:-0.083925},{x:0.173934,y:-0.094446},{x:0.166626,y:-0.104299},{x:0.158388,y:-0.113388},{x:0.149299,y:-0.121626},{x:0.139446,y:-0.128934},{x:0.128925,y:-0.13524},{x:0.117835,y:-0.140485},{x:0.106286,y:-0.144618},{x:0.094386,y:-0.147598},{x:0.082252,y:-0.149398},{x:0.07,y:-0.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.020635199999998965,y:0.15414649999999952}},refblocks:{left1:{x:-0.4458008,y:-0.025023700000000426},right1:{x:0.4458008,y:-0.02514810000000045}},bounds:{minX:-0.45,maxX:0.45,minY:-0.15,maxY:0.1,width:0.9,height:0.25,centerX:0,centerY:-0.025},circles:{}},UB=F(sb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),$h=F(sb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),cb=z($h,\"left\"),Xh=cb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Xh.anchor=\"middle_bottom\";Xh.y+=0.4;Xh.x=0;var GB=cb,lb=z($h,\"up\"),Vh=lb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Vh.anchor=\"middle_left\";Vh.y+=0;Vh.x=0.2;var QB=lb,pb={paths:{path44:{type:\"path\",points:[{x:-0.195,y:-0.025},{x:-0.45,y:-0.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:-0.025},{x:0.195,y:-0.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.07,y:0.1},{x:0.07,y:-0.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.07,y:0.1},{x:-0.07,y:-0.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.07,y:0.1},{x:-0.082252,y:0.099398},{x:-0.094386,y:0.097598},{x:-0.106286,y:0.094618},{x:-0.117835,y:0.090485},{x:-0.128925,y:0.08524},{x:-0.139446,y:0.078934},{x:-0.149299,y:0.071626},{x:-0.158388,y:0.063388},{x:-0.166626,y:0.054299},{x:-0.173934,y:0.044446},{x:-0.18024,y:0.033925},{x:-0.185485,y:0.022835},{x:-0.189618,y:0.011286},{x:-0.192598,y:-0.000614},{x:-0.194398,y:-0.012748},{x:-0.195,y:-0.025},{x:-0.194398,y:-0.037252},{x:-0.192598,y:-0.049386},{x:-0.189618,y:-0.061286},{x:-0.185485,y:-0.072835},{x:-0.18024,y:-0.083925},{x:-0.173934,y:-0.094446},{x:-0.166626,y:-0.104299},{x:-0.158388,y:-0.113388},{x:-0.149299,y:-0.121626},{x:-0.139446,y:-0.128934},{x:-0.128925,y:-0.13524},{x:-0.117835,y:-0.140485},{x:-0.106286,y:-0.144618},{x:-0.094386,y:-0.147598},{x:-0.082252,y:-0.149398},{x:-0.07,y:-0.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.07,y:0.1},{x:0.082252,y:0.099398},{x:0.094386,y:0.097598},{x:0.106286,y:0.094618},{x:0.117835,y:0.090485},{x:0.128925,y:0.08524},{x:0.139446,y:0.078934},{x:0.149299,y:0.071626},{x:0.158388,y:0.063388},{x:0.166626,y:0.054299},{x:0.173934,y:0.044446},{x:0.18024,y:0.033925},{x:0.185485,y:0.022835},{x:0.189618,y:0.011286},{x:0.192598,y:-0.000614},{x:0.194398,y:-0.012748},{x:0.195,y:-0.025},{x:0.194398,y:-0.037252},{x:0.192598,y:-0.049386},{x:0.189618,y:-0.061286},{x:0.185485,y:-0.072835},{x:0.18024,y:-0.083925},{x:0.173934,y:-0.094446},{x:0.166626,y:-0.104299},{x:0.158388,y:-0.113388},{x:0.149299,y:-0.121626},{x:0.139446,y:-0.128934},{x:0.128925,y:-0.13524},{x:0.117835,y:-0.140485},{x:0.106286,y:-0.144618},{x:0.094386,y:-0.147598},{x:0.082252,y:-0.149398},{x:0.07,y:-0.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.020635199999998965,y:0.15414649999999952}},refblocks:{left1:{x:-0.44,y:-0.02},right1:{x:0.4458008,y:-0.02514810000000045}},bounds:{minX:-0.45,maxX:0.45,minY:-0.15,maxY:0.1,width:0.9,height:0.25,centerX:0,centerY:-0.025},circles:{}},HB=F(pb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),zh=F(pb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),hb=z(zh,\"left\"),Dh=hb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Dh.anchor=\"middle_bottom\";Dh.y+=0.4;Dh.x=0;var ZB=hb,db=z(zh,\"up\"),Uh=db.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Uh.anchor=\"middle_left\";Uh.y+=0.05;Uh.x=0.2;var KB=db,mb={paths:{path44:{type:\"path\",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-0.045,y:0.1},{x:-0.125,y:0.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.020635199999998965,y:0.28075747049999955}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},JB=F(mb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Gh=F(mb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ub=z(Gh,\"left\"),Qh=ub.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Qh.anchor=\"middle_left\";Qh.y+=0.5;Qh.x=0.2;var qB=ub,yb=z(Gh,\"up\"),Hh=yb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Hh.anchor=\"middle_left\";Hh.y+=0.3;Hh.x=0.2;var t7=yb,fb={paths:{path44:{type:\"path\",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-0.045,y:0.1},{x:-0.125,y:0.1}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:0.125,y:0.1},{x:0.045,y:0.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.28}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},e7=F(fb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Zh=F(fb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),_b=z(Zh,\"left\"),Kh=_b.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Kh.anchor=\"middle_left\";Kh.y+=0.5;Kh.x=0.2;var r7=_b,gb=z(Zh,\"up\"),Jh=gb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Jh.anchor=\"middle_left\";Jh.y+=0.4;Jh.x=0.2;var i7=gb,xb={paths:{path44:{type:\"path\",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:0.125,y:0.1},{x:0.045,y:0.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.28}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},n7=F(xb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),qh=F(xb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),bb=z(qh,\"left\"),td=bb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");td.anchor=\"middle_left\";td.y+=0.6;td.x=0.3;var o7=bb,vb=z(qh,\"up\"),ed=vb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");ed.anchor=\"middle_left\";ed.y+=0.4;ed.x=0.2;var a7=vb,Sb={paths:{path44:{type:\"path\",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.020635199999998965,y:0.28075747049999955}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},s7=F(Sb).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),rd=F(Sb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),wb=z(rd,\"left\"),id=wb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");id.anchor=\"middle_left\";id.y+=0.5;id.x=0.3;var c7=wb,Ab=z(rd,\"up\"),nd=Ab.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");nd.anchor=\"middle_left\";nd.y+=0.3;nd.x=0.2;var l7=Ab,p7={paths:{path1:{type:\"path\",points:[{x:-0.37,y:0.03},{x:-0.13,y:0.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-0.07,y:0.03},{x:0.11,y:-0.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.1,y:-0.06},{x:0.37,y:-0.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0.12,y:0.17},{x:0.37,y:0.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.37}},refblocks:{left1:{x:-0.37,y:0.03},right1:{x:0.37,y:-0.06},right2:{x:0.37,y:0.17}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.79,height:0.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:0.08,y:-0.07,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0.03,radius:0.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:0.08,y:0.17,radius:0.02,color:\"primary\",fill:!1}}},ys=F(p7).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),od=z(ys,\"down\"),ad=od.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),sd=od.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ad.anchor=\"middle_bottom\";sd.anchor=\"middle_top\";ad.x=0.44;ad.y+=0.28;sd.y-=0.28;sd.x=0.44;var h7=od,cd=z(ys,\"left\"),ld=cd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),pd=cd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ld.anchor=\"middle_bottom\";pd.anchor=\"middle_top\";ld.x=0;ld.y+=0.625;pd.y-=0.695;pd.x=0;var d7=cd,hd=z(ys,\"up\"),dd=hd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),md=hd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");dd.anchor=\"middle_bottom\";md.anchor=\"middle_top\";dd.x=0.4;dd.y+=0.28;md.y-=0.28;md.x=0.4;var m7=hd,u7={paths:{path1:{type:\"path\",points:[{x:-0.37,y:0.03},{x:-0.13,y:0.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-0.07,y:0.03},{x:0.11,y:0.14}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:0.1,y:-0.06},{x:0.37,y:-0.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0.12,y:0.17},{x:0.37,y:0.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.4},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.4}},refblocks:{left1:{x:-0.37,y:0.03},right1:{x:0.37,y:-0.06},right3:{x:0.37,y:0.17}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.79,height:0.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:0.08,y:-0.07,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0.03,radius:0.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:0.08,y:0.17,radius:0.02,color:\"primary\",fill:!1}}},fs=F(u7).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right3\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ud=z(fs,\"down\"),yd=ud.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),fd=ud.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");yd.anchor=\"middle_bottom\";fd.anchor=\"middle_top\";yd.x=0.44;yd.y+=0.28;fd.y-=0.28;fd.x=0.44;var y7=ud,_d=z(fs,\"left\"),gd=_d.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),xd=_d.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");gd.anchor=\"middle_bottom\";xd.anchor=\"middle_top\";gd.x=0;gd.y+=0.625;xd.y-=0.695;xd.x=0;var f7=_d,bd=z(fs,\"up\"),vd=bd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Sd=bd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");vd.anchor=\"middle_bottom\";Sd.anchor=\"middle_top\";vd.x=0.4;vd.y+=0.28;Sd.y-=0.28;Sd.x=0.4;var _7=bd,mi={paths:{\"lead-positive\":{type:\"path\",points:[{x:-0.4,y:0.19999999999999996},{x:-0.20000000000000007,y:0.19999999999999996}],color:\"primary\",fill:!1},\"lead-negative\":{type:\"path\",points:[{x:-0.4,y:-0.20000000000000018},{x:-0.20000000000000007,y:-0.20000000000000018}],color:\"primary\",fill:!1},\"voice-coil\":{type:\"path\",points:[{x:-0.20000000000000007,y:0.19999999999999996},{x:0,y:0.19999999999999996},{x:0,y:-0.20000000000000018},{x:-0.20000000000000007,y:-0.20000000000000018},{x:-0.20000000000000007,y:0.19999999999999996}],color:\"primary\",fill:!1},cone:{type:\"path\",points:[{x:0,y:0.19999999999999996},{x:0.3999999999999999,y:0.3999999999999999},{x:0.3999999999999999,y:-0.40000000000000013},{x:0,y:-0.20000000000000018},{x:0,y:0.19999999999999996}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.6},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.6000000000000001}},refblocks:{left1:{x:-0.4,y:-0.20000000000000018},left2:{x:-0.4,y:0.19999999999999996}},bounds:{minX:-0.4,maxX:0.3999999999999999,minY:-0.6000000000000001,maxY:0.6,width:0.7999999999999999,height:1.2000000000000002,centerX:-0.00000000000000005551115123125783,centerY:-0.00000000000000005551115123125783},circles:{}},Bb=F(mi).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),xa=Ce(Bb.primitives),g7={...Bb,center:{x:(xa.minX+xa.maxX)/2,y:(xa.minY+xa.maxY)/2}},Fb=F(mi).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ba=Ce(Fb.primitives),x7={...Fb,center:{x:(ba.minX+ba.maxX)/2,y:(ba.minY+ba.maxY)/2}},Pb=F(mi).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),va=Ce(Pb.primitives),b7={...Pb,center:{x:(va.minX+va.maxX)/2,y:(va.minY+va.maxY)/2}},Ib=F(mi).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Sa=Ce(Ib.primitives),v7={...Ib,center:{x:(Sa.minX+Sa.maxX)/2,y:(Sa.minY+Sa.maxY)/2}},Mb=F(mi).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),wa=Ce(Mb.primitives),S7={...Mb,center:{x:(wa.minX+wa.maxX)/2,y:(wa.minY+wa.maxY)/2}},kb=F(mi).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Aa=Ce(kb.primitives),w7={...kb,center:{x:(Aa.minX+Aa.maxX)/2,y:(Aa.minY+Aa.maxY)/2}},_s={paths:{path11:{type:\"path\",points:[{x:-0.38,y:0},{x:-0.12,y:-0.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.07,y:0},{x:0.11,y:0.05}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.12,y:-0.01},{x:0.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.28}},refblocks:{left1:{x:-0.12,y:-0.01},left2:{x:-0.38,y:0},right1:{x:0.12,y:-0.01},right2:{x:0.38,y:0}},bounds:{minX:-0.4,maxX:0.4,minY:-0.25,maxY:0.25,width:0.81,height:0.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:0.1,y:0,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0,radius:0.02,color:\"primary\",fill:!1}}};delete _s.refblocks.left1;delete _s.refblocks.right1;_s.bounds.width+=0.2;var gs=F(_s).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),wd=z(gs,\"down\"),Ad=wd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Bd=wd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ad.anchor=\"middle_bottom\";Bd.anchor=\"middle_top\";Ad.x=0.3;Ad.y+=0.265;Bd.y-=0.265;Bd.x=0.3;var A7=wd,Fd=z(gs,\"left\"),Pd=Fd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Id=Fd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Pd.anchor=\"middle_bottom\";Id.anchor=\"middle_top\";Pd.x=0;Pd.y+=0.57;Id.y-=0.57;Id.x=0;var B7=Fd,Md=z(gs,\"up\"),kd=Md.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Cd=Md.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");kd.anchor=\"middle_bottom\";Cd.anchor=\"middle_top\";kd.x=0.3;kd.y+=0.265;Cd.y-=0.265;Cd.x=0.3;var F7=Md,xs={paths:{path11:{type:\"path\",points:[{x:-0.38,y:0},{x:-0.12,y:-0.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.07,y:0.01},{x:0.1,y:0.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.12,y:-0.01},{x:0.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:0.25},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.25}},refblocks:{left1:{x:-0.12,y:-0.01},left2:{x:-0.38,y:0},right1:{x:0.12,y:-0.01},right2:{x:0.38,y:0}},bounds:{minX:-0.4,maxX:0.4,minY:-0.25,maxY:0.25,width:0.81,height:0.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:0.1,y:0,radius:0.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-0.1,y:0,radius:0.02,color:\"primary\",fill:!1}}};delete xs.refblocks.left1;delete xs.refblocks.right1;xs.bounds.width+=0.2;var bs=F(xs).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Yd=z(bs,\"down\"),Ld=Yd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ed=Yd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ld.anchor=\"middle_bottom\";Ed.anchor=\"middle_top\";Ld.x=0.3;Ld.y+=0.265;Ed.y-=0.265;Ed.x=0.3;var P7=Yd,Td=z(bs,\"left\"),Nd=Td.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Wd=Td.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Nd.anchor=\"middle_bottom\";Wd.anchor=\"middle_top\";Nd.x=0;Nd.y+=0.57;Wd.y-=0.57;Wd.x=0;var I7=Td,Rd=z(bs,\"up\"),Od=Rd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),jd=Rd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Od.anchor=\"middle_bottom\";jd.anchor=\"middle_top\";Od.x=0.3;Od.y+=0.265;jd.y-=0.265;jd.x=0.3;var M7=Rd,vs={paths:{path44:{type:\"path\",points:[{x:-0.16845120000000047,y:0.02621170000000017},{x:-0.4458008,y:0.02709619999999968}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.4458008,y:0.026971799999999657},{x:0.1677968999999997,y:0.027926399999999685}],color:\"primary\",fill:!1},\"path8704-1\":{type:\"path\",points:[{x:-0.0040837000000002455,y:-0.13467459999999964},{x:-0.0040837000000002455,y:-0.13467459999999964},{x:-0.017668143940740948,y:-0.1311205263185182},{x:-0.03043520885925943,y:-0.12727072121481456},{x:-0.04240966440000013,y:-0.1231399985999998},{x:-0.05361628020740751,y:-0.11874317238518502},{x:-0.064079825925926,y:-0.11409505648148131},{x:-0.07382507120000005,y:-0.10921046479999987},{x:-0.0828767856740741,y:-0.10410421125185171},{x:-0.0912597389925926,y:-0.09879110974814802},{x:-0.09899870079999995,y:-0.0932859741999998},{x:-0.10611844074074069,y:-0.08760361851851838},{x:-0.11264372845925916,y:-0.0817588566148146},{x:-0.11859933359999993,y:-0.07576650239999982},{x:-0.12401002580740728,y:-0.06964136978518495},{x:-0.12890057472592584,y:-0.06339827268148127},{x:-0.13329574999999985,y:-0.05705202499999972},{x:-0.13722032127407394,y:-0.05061744065185156},{x:-0.14069905819259243,y:-0.04410933354814783},{x:-0.14375673039999987,y:-0.03754251759999966},{x:-0.14641810754074058,y:-0.030931806718518143},{x:-0.1487079592592591,y:-0.0242920148148144},{x:-0.15065105519999983,y:-0.017637955799999563},{x:-0.15227216500740723,y:-0.01098444358518472},{x:-0.15359605832592574,y:-0.004346292081480994},{x:-0.1546475047999998,y:0.00226168480000051},{x:-0.15545127407407386,y:0.008824673148148676},{x:-0.1560321357925924,y:0.015327859051852397},{x:-0.1564148595999998,y:0.02175642860000056},{x:-0.1566242151407405,y:0.028095567881482052},{x:-0.15668497205925902,y:0.03433046298518576},{x:-0.15662189999999976,y:0.04044630000000058},{x:-0.15662189999999976,y:0.0404463000000006},{x:-0.15662189999999976,y:0.0404463000000006},{x:-0.15622857394444417,y:0.04717166472222282},{x:-0.1553217675555553,y:0.05388046444444503},{x:-0.15392183849999977,y:0.060558907500000585},{x:-0.1520491444444442,y:0.0671932022222228},{x:-0.1497240430555553,y:0.07376955694444502},{x:-0.14696689199999974,y:0.08027418000000058},{x:-0.14379804894444415,y:0.0866932797222228},{x:-0.1402378715555553,y:0.09301306444444506},{x:-0.13630671749999965,y:0.09921974250000057},{x:-0.13202494444444415,y:0.10529952222222282},{x:-0.12741291005555522,y:0.11123861194444501},{x:-0.1224909719999997,y:0.1170232200000006},{x:-0.11727948794444407,y:0.12263955472222278},{x:-0.11179881555555524,y:0.12807382444444504},{x:-0.10606931249999965,y:0.13331223750000057},{x:-0.1001113364444441,y:0.13834100222222284},{x:-0.09394524505555521,y:0.14314632694444504},{x:-0.08759139599999967,y:0.14771442000000062},{x:-0.08107014694444413,y:0.15203148972222283},{x:-0.07440185555555523,y:0.15608374444444503},{x:-0.0676068794999997,y:0.15985739250000058},{x:-0.06070557644444415,y:0.16333864222222283},{x:-0.05371830405555529,y:0.16651370194444504},{x:-0.04666541999999976,y:0.1693687800000006},{x:-0.03956728194444424,y:0.1718900847222228},{x:-0.03244424755555539,y:0.17406382444444501},{x:-0.025316674499999876,y:0.17587620750000055},{x:-0.01820492044444437,y:0.17731344222222278},{x:-0.01112934305555553,y:0.178361736944445},{x:-0.004110300000000034,y:0.17900730000000054},{x:-0.004110300000000011,y:0.17900730000000054}],color:\"primary\",fill:!1},\"path8704-1-9\":{type:\"path\",points:[{x:0.004158700000000071,y:-0.1355885000000001},{x:0.004158700000000071,y:-0.1355885000000001},{x:0.017743143940740766,y:-0.1320344263185187},{x:0.03051020885925925,y:-0.12818462121481505},{x:0.042484664399999955,y:-0.12405389860000024},{x:0.053691280207407335,y:-0.11965707238518546},{x:0.0641548259259258,y:-0.11500895648148178},{x:0.07390007119999986,y:-0.1101243648000003},{x:0.0829517856740739,y:-0.10501811125185218},{x:0.0913347389925924,y:-0.09970500974814848},{x:0.09907370079999973,y:-0.09419987420000027},{x:0.10619344074074046,y:-0.08851751851851883},{x:0.11271872845925893,y:-0.08267275661481507},{x:0.11867433359999968,y:-0.07668040240000029},{x:0.12408502580740703,y:-0.0705552697851854},{x:0.12897557472592555,y:-0.06431217268148172},{x:0.13337074999999957,y:-0.05796592500000018},{x:0.13729532127407365,y:-0.05153134065185202},{x:0.14077405819259214,y:-0.045023233548148286},{x:0.14383173039999952,y:-0.038456417600000126},{x:0.14649310754074024,y:-0.03184570671851861},{x:0.14878295925925875,y:-0.02520591481481487},{x:0.1507260551999995,y:-0.01855185580000003},{x:0.15234716500740686,y:-0.011898343585185192},{x:0.15367105832592537,y:-0.005260192081481464},{x:0.15472250479999944,y:0.001347784800000043},{x:0.1555262740740735,y:0.007910773148148207},{x:0.156107135792592,y:0.01441395905185193},{x:0.1564898595999994,y:0.020842528600000094},{x:0.15669921514074014,y:0.02718166788148159},{x:0.15675997205925862,y:0.03341656298518529},{x:0.15669689999999936,y:0.03953240000000011},{x:0.15669689999999936,y:0.039532400000000134},{x:0.15669689999999936,y:0.039532400000000134},{x:0.1563035739444438,y:0.04625776472222235},{x:0.15539676755555493,y:0.05296656444444457},{x:0.15399683849999934,y:0.05964500750000013},{x:0.1521241444444438,y:0.06627930222222234},{x:0.14979904305555491,y:0.07285565694444456},{x:0.14704189199999937,y:0.07936028000000013},{x:0.1438730489444438,y:0.08577937972222234},{x:0.1403128715555549,y:0.09209916444444458},{x:0.13638171749999925,y:0.0983058425000001},{x:0.13209994444444376,y:0.10438562222222235},{x:0.12748791005555482,y:0.11032471194444453},{x:0.12256597199999929,y:0.11610932000000013},{x:0.1173544879444437,y:0.1217256547222223},{x:0.11187381555555485,y:0.12715992444444457},{x:0.10614431249999925,y:0.1323983375000001},{x:0.10018633644444369,y:0.13742710222222235},{x:0.09402024505555481,y:0.14223242694444457},{x:0.08766639599999927,y:0.14680052000000016},{x:0.08114514694444372,y:0.15111758972222236},{x:0.07447685555555483,y:0.15516984444444457},{x:0.06768187949999929,y:0.15894349250000012},{x:0.06078057644444377,y:0.16242474222222236},{x:0.053793304055554894,y:0.16559980194444457},{x:0.046740419999999366,y:0.16845488000000014},{x:0.039642281944443844,y:0.17097618472222234},{x:0.03251924755555499,y:0.17314992444444455},{x:0.02539167449999948,y:0.17496230750000008},{x:0.018279920444443973,y:0.17639954222222232},{x:0.011204343055555134,y:0.17744783694444452},{x:0.004185299999999637,y:0.17809340000000007},{x:0.004185299999999614,y:0.17809340000000007}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-0.08039130000000005,y:0.0179576999999993},{x:-0.08039130000000005,y:0.09650599999999931}],color:\"primary\",fill:!0},\"path4-5\":{type:\"path\",points:[{x:0.01494479999999987,y:-0.055216500000000224},{x:0.01494479999999987,y:0.09691909999999937}],color:\"primary\",fill:!0},\"path4-5-8\":{type:\"path\",points:[{x:0.06871169999999927,y:-0.056870000000000864},{x:0.06871169999999927,y:0.018784499999999538}],color:\"primary\",fill:!0},\"path4-1\":{type:\"path\",points:[{x:-0.08179359999999969,y:0.09650570000000003},{x:0.015771699999999722,y:0.09650570000000003}],color:\"primary\",fill:!0},\"path4-1-6\":{type:\"path\",points:[{x:0.0117995999999998,y:-0.05594970000000088},{x:0.06843709999999925,y:-0.05594970000000088}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-0.17162450000000073,y:0.11125030000000025},{x:-0.2688274000000015,y:0.11125030000000025},{x:-0.2688274000000015,y:0.11469129999999961},{x:-0.17162450000000073,y:0.11469129999999961}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-0.2184661999999995,y:0.16159429999999997},{x:-0.2184661999999995,y:0.06439139999999943},{x:-0.22190719999999908,y:0.06439139999999943},{x:-0.22190719999999908,y:0.16159429999999997}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.0024445000000006267,y:0.23933980000000044},bottom1:{type:\"text\",text:\"{VAL}\",x:0.00341719999999901,y:-0.23933980000000066}},refblocks:{left1:{x:-0.4458008,y:0.02709619999999968},right1:{x:0.4458008,y:0.026971799999999657}},bounds:{minX:-0.473959241,maxX:0.473959241,minY:-0.23933980000000066,maxY:0.23933980000000044,width:0.947918482,height:0.4786796000000011,centerX:0,centerY:-0.00000000000000011102230246251565},circles:{}},k7=F(vs).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.02,y:0.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.5,y:-0.2}).build(),C7=F(vs).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:0.45}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-0.55}).build(),Y7=F(vs).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),L7=F(vs).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0.02,y:-0.2}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0.5,y:0.2}).build(),Cb={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path43-5\":{type:\"path\",points:[{x:0.19,y:-0.09},{x:0.15,y:-0.09}],color:\"primary\",fill:!1},\"path43-5-2\":{type:\"path\",points:[{x:0.19,y:-0.14},{x:0.19,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:tD,texts:eD,bounds:rD,refblocks:iD,circles:nD}=Cb,Yb=F(Cb).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),E7=z(Yb),T7={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"RPM\",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:N7,texts:W7,bounds:Ba,refblocks:zg,circles:R7}=T7,$d=It({primitives:[...Object.values(N7),...Object.values(R7),{type:\"text\",text:\"{REF}\",x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:0.35,anchor:\"middle_bottom\"},{...W7.left1,y:0.01,anchor:\"center\",fontSize:0.2}],ports:[{...zg.left1,labels:[\"1\"]},{...zg.right1,labels:[\"2\"]}],size:{width:Ba.width,height:Ba.height},center:{x:Ba.centerX,y:Ba.centerY}}),{5:O7,...j7}=$d.primitives;function $7(t){return typeof t==\"object\"}var Dg=z({...$d,primitives:Object.values(j7).filter($7)}),X7={...Dg,primitives:[...Dg.primitives,O7]},Ss=It({primitives:[{type:\"path\",points:[{x:-0.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:Array.from({length:32},(t,e)=\u003e{let r=Math.PI/2-e*Math.PI/31,i=0.1;return{x:0.1-i*Math.cos(r),y:i*Math.sin(r)}}),color:\"primary\",fill:!1},{type:\"text\",text:\"{REF}\",x:0.125,y:0,anchor:\"middle_left\"}],ports:[{x:-0.2,y:0,labels:[\"1\"]}],center:{x:0,y:0}}),Lb=z(Ss,\"down\"),Ug=Lb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Ug\u0026\u0026(Ug.anchor=\"middle_top\");var V7=Lb,z7=z(Ss,\"left\"),Eb=z(Ss,\"up\"),Gg=Eb.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Gg\u0026\u0026(Gg.anchor=\"middle_bottom\");var D7=Eb,U7={paths:{path40:{type:\"path\",points:[{x:0.44,y:0.04},{x:0.19,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:0.19,y:0.18},{x:0.44,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:0.19,y:-0.09},{x:0.19,y:0.18}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:0.19,y:0.04},{x:-0.11,y:0.04}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-0.43,y:0.22},{x:-0.11,y:0.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{right1:{x:-0.43,y:0.22}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},Xd=F(U7).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Vd=z(Xd,\"up\"),zd=Vd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Dd=Vd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");zd.anchor=\"middle_bottom\";Dd.anchor=\"middle_top\";zd.x=0.4;zd.y+=0.2;Dd.y-=0.3;Dd.x=0.4;var Tb=Vd,Ud=ri(Tb),Gd=Ud.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Qd=Ud.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Gd.anchor=\"middle_bottom\";Qd.anchor=\"middle_top\";Gd.x=0.35;Gd.y+=0.4;Qd.y-=0.4;Qd.x=0.35;var G7=Ud,Hd=z(Xd,\"left\"),Zd=Hd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Kd=Hd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Zd.anchor=\"middle_bottom\";Kd.anchor=\"middle_top\";Zd.x=0;Zd.y+=0.5;Kd.y-=0.6;Kd.x=0;var Q7=Hd,Nb={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.04},{x:-0.11,y:0.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.1,y:0.04},{x:0.54,y:0.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.09,y:-0.15},{x:-0.09,y:0.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:0.09,y:-0.15},{x:0.09,y:0.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.15},{x:0.09,y:-0.05},{x:-0.08,y:0.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:0.08,y:0.26},{x:0.08,y:0.05},{x:-0.09,y:0.15},{x:0.07,y:0.26}],color:\"primary\",fill:!0},\"path12-2\":{type:\"path\",points:[{x:0.09,y:-0.06},{x:0.27,y:-0.17}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:0.27,y:-0.18},{x:0.27,y:-0.31}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0.01,y:0.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.03,y:-0.42}},refblocks:{bottom1:{x:0.27,y:-0.31},left1:{x:-0.54,y:0.04},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.42,maxY:0.42,width:1.14,height:0.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.05,radius:0.29,color:\"primary\",fill:!1}}},{paths:oD,texts:aD,bounds:sD,refblocks:cD,circles:lD}=Nb,Wb=F(Nb).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Rb=z(Wb),Ob=Rb.primitives.filter((t)=\u003et.type===\"text\"),H7=Ob.find((t)=\u003et.text===\"{REF}\"),Z7=Ob.find((t)=\u003et.text===\"{VAL}\");H7.y=0;Z7.y=0;var K7=Rb,J7={paths:{path40:{type:\"path\",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:0.14,y:0.18},{x:0.08,y:0.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:0.14,y:-0.09},{x:0.08,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:q7,texts:Qg,bounds:Fa,refblocks:Hg,circles:tF}=J7,jb=It({primitives:[...Object.values(q7),...Object.values(tF),{...Qg.top1,anchor:\"middle_bottom\"},{...Qg.bottom1,anchor:\"middle_top\"}],ports:[{...Hg.left1,labels:[\"1\"]},{...Hg.right1,labels:[\"2\"]}],size:{width:Fa.width,height:Fa.height},center:{x:Fa.centerX,y:Fa.centerY}}),Jd=z(jb),eF=Jd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),rF=Jd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");eF.anchor=\"middle_left\";rF.anchor=\"middle_right\";var iF=Jd,nF={paths:{path11:{type:\"path\",points:[{x:-0.34,y:0.22},{x:-0.02,y:0.01}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.23,y:0.13},{x:0.23,y:0.4}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:0.23,y:-0.08},{x:0.23,y:-0.35}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-0.01,y:-0.18},{x:-0.01,y:0.23}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:0.23,y:0.12},{x:-0.01,y:0.12}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-0.11,y:0.13},{x:-0.17,y:0.04},{x:-0.06,y:0.03},{x:-0.11,y:0.13}],color:\"primary\",fill:!0},\"path11-0-3-8\":{type:\"path\",points:[{x:0.23,y:-0.08},{x:-0.01,y:-0.08}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.2,y:0.39},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.03,y:-0.42}},refblocks:{top1:{x:0.23,y:0.4},bottom1:{x:0.23,y:-0.35},left1:{x:-0.34,y:0.22}},bounds:{minX:-0.37,maxX:0.37,minY:-0.42,maxY:0.42,width:0.74,height:0.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0.08,y:0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:oF,texts:Zg,bounds:Pa,refblocks:fl,circles:aF}=nF,$b=It({primitives:[...Object.values(oF),...Object.values(aF),{...Zg.top1,anchor:\"middle_left\"},{...Zg.bottom1,anchor:\"middle_right\"}],ports:[{...fl.top1,labels:[\"1\"]},{...fl.bottom1,labels:[\"2\"]},{...fl.left1,labels:[\"3\"]}],size:{width:Pa.width,height:Pa.height},center:{x:Pa.centerX,y:Pa.centerY}}),Xb=z($b),Vb=Xb.primitives.filter((t)=\u003et.type===\"text\"),sF=Vb.find((t)=\u003et.text===\"{REF}\");sF.y=0.1;var zb=Vb.find((t)=\u003et.text===\"{VAL}\");zb.y=0.1;zb.x=-0.4;var cF=Xb,lF={paths:{capsule_outer:{type:\"path\",points:[{x:-0.44,y:0.34},{x:-0.45,y:0.39},{x:-0.46,y:0.42},{x:-0.49,y:0.44},{x:-0.52,y:0.46},{x:-0.56,y:0.46},{x:-0.6,y:0.46},{x:-0.63,y:0.44},{x:-0.65,y:0.42},{x:-0.67,y:0.39},{x:-0.68,y:0.34},{x:-0.68,y:-0.34},{x:-0.67,y:-0.39},{x:-0.65,y:-0.42},{x:-0.63,y:-0.44},{x:-0.6,y:-0.45},{x:-0.56,y:-0.46},{x:-0.52,y:-0.45},{x:-0.49,y:-0.44},{x:-0.46,y:-0.42},{x:-0.45,y:-0.39},{x:-0.44,y:-0.34},{x:-0.44,y:0.34}],color:\"primary\",fill:!1},capsule_inner:{type:\"path\",points:[{x:-0.51,y:0.28},{x:-0.52,y:0.32},{x:-0.53,y:0.34},{x:-0.56,y:0.35},{x:-0.57,y:0.35},{x:-0.58,y:0.34},{x:-0.6,y:0.32},{x:-0.61,y:0.28},{x:-0.61,y:-0.28},{x:-0.6,y:-0.32},{x:-0.58,y:-0.34},{x:-0.57,y:-0.35},{x:-0.56,y:-0.35},{x:-0.53,y:-0.34},{x:-0.52,y:-0.32},{x:-0.51,y:-0.28},{x:-0.51,y:0.28}],color:\"primary\",fill:!0},usb_vertical:{type:\"path\",points:[{x:0.1,y:-0.4},{x:0.1,y:0.4}],color:\"primary\",fill:!1},usb_left_branch:{type:\"path\",points:[{x:0.1,y:-0.1},{x:-0.03,y:0.05},{x:-0.03,y:0.15}],color:\"primary\",fill:!1},usb_right_branch:{type:\"path\",points:[{x:0.1,y:0},{x:0.25,y:0.15},{x:0.25,y:0.25}],color:\"primary\",fill:!1},usb_arrow:{type:\"path\",points:[{x:0.05,y:0.4},{x:0.1,y:0.5},{x:0.15,y:0.4},{x:0.05,y:0.4}],color:\"primary\",fill:!0},usb_square:{type:\"path\",points:[{x:0.2,y:0.25},{x:0.3,y:0.25},{x:0.3,y:0.35},{x:0.2,y:0.35},{x:0.2,y:0.25}],color:\"primary\",fill:!0}},circles:{usb_base:{type:\"circle\",x:0.1,y:-0.4,radius:0.07,color:\"primary\",fill:!0},usb_tip_circle:{type:\"circle\",x:-0.03,y:0.15,radius:0.04,color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.25,y:0.7}},refblocks:{},bounds:{minX:-0.75,maxX:0.35,minY:-0.6,maxY:0.75,width:1.1,height:1.35,centerX:-0.2,centerY:0.08}},pF=F(lF).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),hF={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"Var\",x:-0.19,y:0.07}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:dF,texts:_l,bounds:Ia,refblocks:Kg,circles:mF}=hF,Db=It({primitives:[...Object.values(dF),...Object.values(mF),{..._l.top1,x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{..._l.bottom1,x:0,y:0.35,anchor:\"middle_bottom\"},{..._l.left1,x:-0.02,y:0.01,fontSize:0.2,anchor:\"center\"}],ports:[{...Kg.left1,labels:[\"1\"]},{...Kg.right1,labels:[\"2\"]}],size:{width:Ia.width,height:Ia.height},center:{x:Ia.centerX,y:Ia.centerY}}),uF=z(Db),yF={paths:{path40:{type:\"path\",points:[{x:0.08,y:0.04},{x:-0.18,y:-0.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.18,y:0.18},{x:0.08,y:0.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.18,y:-0.09},{x:-0.18,y:0.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.09,y:0.17},{x:0.1,y:-0.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.2,y:0.04},{x:-0.52,y:0.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.52,y:0.04},{x:0.21,y:0.04}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:0.19,y:0.17},{x:0.19,y:-0.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.01,y:0.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:fF,texts:Jg,bounds:Ma,refblocks:qg,circles:_F}=yF,Ub=It({primitives:[...Object.values(fF),...Object.values(_F),{...Jg.top1,anchor:\"middle_bottom\"},{...Jg.bottom1,anchor:\"middle_top\"}],ports:[{...qg.left1,labels:[\"1\"]},{...qg.right1,labels:[\"2\"]}],size:{width:Ma.width,height:Ma.height},center:{x:Ma.centerX,y:Ma.centerY}}),qd=z(Ub),gF=qd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),xF=qd.primitives.find((t)=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");gF.anchor=\"middle_left\";xF.anchor=\"middle_right\";var bF=qd,vF={paths:{path5:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.26,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:0.27,y:0},{x:0.54,y:0.01}],color:\"primary\",fill:!1},path7:{type:\"path\",points:[{x:0.27,y:-0.23},{x:-0.26,y:0.24}],color:\"primary\",fill:!1},path8:{type:\"path\",points:[{x:0.38,y:-0.23},{x:0.27,y:-0.23}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:0,y:0.14},{x:0.27,y:0.14},{x:0.27,y:-0.13},{x:-0.26,y:-0.13},{x:-0.26,y:0.14},{x:0,y:0.14}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.06,y:0.25},bottom1:{type:\"text\",text:\"{VAL}\",x:0.01,y:-0.25}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.25,maxY:0.25,width:1.13,height:0.5,centerX:0,centerY:0},circles:{}},{paths:SF,texts:tx,bounds:ka,refblocks:ex}=vF,Gb=It({primitives:[...Object.values(SF),{...tx.top1,anchor:\"middle_left\"},{...tx.bottom1,anchor:\"middle_right\"}],ports:[{...ex.left1,labels:[\"1\",\"-\"]},{...ex.right1,labels:[\"2\",\"+\"]}],size:{width:ka.width,height:ka.height},center:{x:ka.centerX,y:ka.centerY}}),wF=z(Gb),AF={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"Var\",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:BF,texts:FF,bounds:Ca,refblocks:rx,circles:PF}=AF,tm=It({primitives:[...Object.values(BF),...Object.values(PF),{type:\"text\",text:\"{REF}\",x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:0.35,anchor:\"middle_bottom\"},{...FF.left1,anchor:\"center\",y:0.02,fontSize:0.2}],ports:[{...rx.left1,labels:[\"1\"]},{...rx.right1,labels:[\"2\"]}],size:{width:Ca.width,height:Ca.height},center:{x:Ca.centerX,y:Ca.centerY}}),{5:IF,...MF}=tm.primitives;function kF(t){return typeof t==\"object\"}var ix=z({...tm,primitives:Object.values(MF).filter(kF)}),CF={...ix,primitives:[...ix.primitives,IF]},ws={paths:{\"path28-2\":{type:\"path\",points:[{x:0.19,y:0},{x:0,y:0.09}],color:\"primary\",fill:!1},\"path28-2-6\":{type:\"path\",points:[{x:0.19,y:0},{x:0,y:-0.09}],color:\"primary\",fill:!1},\"path29-3\":{type:\"path\",points:[{x:0.19,y:0},{x:-0.23,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{REF}\",x:0.25,y:0}},refblocks:{left1:{x:-0.23,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.09,maxY:0.09,width:0.5,height:0.19,centerX:0,centerY:0},circles:{}};function As(t,e){let{width:r,height:i}=t.size,n=1,a=1;e.width!==void 0\u0026\u0026e.height!==void 0?(n=e.width/r,a=e.height/i):e.width!==void 0?n=a=e.width/r:e.height!==void 0\u0026\u0026(n=a=e.height/i);let o=t.primitives.map((c)=\u003e{switch(c.type){case\"path\":return{...c,points:c.points.map((l)=\u003e({x:l.x*n,y:l.y*a}))};case\"text\":return{...c,x:c.x*n,y:c.y*a,fontSize:c.fontSize?c.fontSize*n:void 0};case\"circle\":return{...c,x:c.x*n,y:c.y*a,radius:c.radius*n};case\"box\":return{...c,x:c.x*n,y:c.y*a,width:c.width*n,height:c.height*a};default:return c}});return{...t,primitives:o,center:{x:t.center.x*n,y:t.center.y*a},ports:t.ports.map((c)=\u003e({...c,x:c.x*n,y:c.y*a})),size:{width:r*n,height:i*a}}}var YF=F(ws).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),LF=As(YF,{width:0.24,height:0.23}),EF=F(ws).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),TF=As(EF,{width:0.23,height:0.24}),NF=F(ws).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),WF=As(NF,{width:0.23,height:0.24}),RF=F(ws).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),OF=As(RF,{width:0.24,height:0.23}),em={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.02,y:0.4},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.8,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0.04,radius:0.29,color:\"primary\",fill:!1}}},{paths:pD,texts:hD,bounds:dD,circles:mD,refblocks:uD}=em,jF=F(em).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:$F,texts:yD,bounds:nx,circles:XF,refblocks:ox}=em,VF=F({primitives:[...Object.values($F),...Object.values(XF),{type:\"text\",text:\"{REF}\",x:-0.2,y:0.35},{type:\"text\",text:\"{VAL}\",x:0.2,y:0.35}],ports:[{...ox.left1,labels:[\"left1\"]},{...ox.right1,labels:[\"right1\"]}],center:{x:nx.centerX,y:nx.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),zF=VF,DF={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"Wh\",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:UF,texts:GF,bounds:Ya,refblocks:ax,circles:QF}=DF,rm=It({primitives:[...Object.values(UF),...Object.values(QF),{type:\"text\",text:\"{REF}\",x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:0.35,anchor:\"middle_bottom\"},{...GF.left1,anchor:\"center\",y:0.01,fontSize:0.2}],ports:[{...ax.left1,labels:[\"1\"]},{...ax.right1,labels:[\"2\"]}],size:{width:Ya.width,height:Ya.height},center:{x:Ya.centerX,y:Ya.centerY}}),{5:HF,...ZF}=rm.primitives;function KF(t){return typeof t==\"object\"}var sx=z({...rm,primitives:Object.values(ZF).filter(KF)}),JF={...sx,primitives:[...sx.primitives,HF]},qF={paths:{path11:{type:\"path\",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:0.29,y:0},{x:0.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.18,y:-0.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.01,y:0.43},left1:{type:\"text\",text:\"W\",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-0.01,y:-0.01,radius:0.29,color:\"primary\",fill:!1}}},{paths:tP,texts:eP,bounds:La,refblocks:cx,circles:rP}=qF,im=It({primitives:[...Object.values(tP),...Object.values(rP),{type:\"text\",text:\"{REF}\",x:0,y:-0.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:0.35,anchor:\"middle_bottom\"},{...eP.left1,anchor:\"center\",y:0.01,fontSize:0.3}],ports:[{...cx.left1,labels:[\"1\"]},{...cx.right1,labels:[\"2\"]}],size:{width:La.width,height:La.height},center:{x:La.centerX,y:La.centerY}}),{5:iP,...nP}=im.primitives;function oP(t){return typeof t==\"object\"}var lx=z({...im,primitives:Object.values(nP).filter(oP)}),aP={...lx,primitives:[...lx.primitives,iP]},Qb={paths:{path40:{type:\"path\",points:[{x:0.14458890000000002,y:0.04403629999999992},{x:-0.1199943999999995,y:-0.08825540000000043}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-0.1199943999999995,y:0.17632800000000026},{x:0.14458890000000002,y:0.04403629999999992}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-0.1199943999999995,y:-0.0882553999999991},{x:-0.1199943999999995,y:0.17632800000000026}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:0.14458890000000002,y:0.17632800000000026},{x:0.14458890000000002,y:-0.0882553999999991}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-0.12219909999999956,y:0.04403629999999992},{x:-0.5168693999999996,y:0.04403629999999992}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0.5233797000000002,y:0.043951100000000354},{x:0.1496715999999998,y:0.043951100000000354}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:0.14458890000000002,y:0.17632800000000026},{x:0.21069330000000042,y:0.17632800000000026}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:0.14458890000000002,y:-0.0882553999999991},{x:0.07848449999999962,y:-0.0882553999999991}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-0.0050250999999996715,y:0.27384530000000007},bottom1:{type:\"text\",text:\"{VAL}\",x:-0.00011179999999977319,y:-0.27384529999999985}},refblocks:{left1:{x:-0.5191471000000001,y:0.044920700000000924},right1:{x:0.5191470999999999,y:0.04389609999999999}},bounds:{minX:-0.5473055410000001,maxX:0.5473055409999998,minY:-0.27384529999999985,maxY:0.27384530000000007,width:1.094611082,height:0.5476905999999999,centerX:-0.00000000000000011102230246251565,centerY:0.00000000000000011102230246251565},circles:{}},sP=F(Qb).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:cP,bounds:Ea,refblocks:px,circles:lP}=Qb,pP=F({primitives:[...Object.values(cP),...Object.values(lP),{type:\"text\",text:\"{REF}\",x:0.15,y:-0.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-0.15,y:-0.2294553499999995}],ports:[{...px.left1,labels:[\"1\"]},{...px.right1,labels:[\"2\"]}],size:{width:Ea.width,height:Ea.height},center:{x:Ea.centerX,y:Ea.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),ur={ac_voltmeter_down:M4,ac_voltmeter_horz:Y4,ac_voltmeter_left:T4,ac_voltmeter_right:R4,ac_voltmeter_up:$4,ac_voltmeter_vert:z4,avalanche_diode_down:G4,avalanche_diode_horz:Q4,avalanche_diode_left:K4,avalanche_diode_right:J4,avalanche_diode_up:e5,avalanche_diode_vert:n5,backward_diode_down:s5,backward_diode_left:hx,backward_diode_right:d5,backward_diode_up:m5,battery_down:_5,battery_horz:dx,battery_left:w5,battery_right:P5,battery_up:C5,battery_vert:Y5,boxresistor_down:N5,boxresistor_left:j5,boxresistor_right:z5,boxresistor_sm_down:U5,boxresistor_sm_left:G5,boxresistor_sm_right:Q5,boxresistor_sm_up:H5,boxresistor_small_down:J5,boxresistor_small_left:ev,boxresistor_small_right:nv,boxresistor_small_up:sv,boxresistor_up:hv,boxresistor_xs_down:dv,boxresistor_xs_left:mv,boxresistor_xs_right:uv,boxresistor_xs_up:yv,bridged_ground_down:gv,bridged_ground_left:vv,bridged_ground_right:mx,bridged_ground_up:Av,capacitor_down:Iv,capacitor_left:kv,capacitor_polarized_down:Cv,capacitor_polarized_left:Yv,capacitor_polarized_right:Lv,capacitor_polarized_up:Ev,capacitor_right:Nv,capacitor_sm_down:Wv,capacitor_sm_left:Rv,capacitor_sm_right:Ov,capacitor_sm_up:jv,capacitor_up:zv,capacitor_xs_down:Dv,capacitor_xs_left:Uv,capacitor_xs_right:Gv,capacitor_xs_up:Qv,constant_current_diode_down:Kv,constant_current_diode_horz:Jv,constant_current_diode_left:eS,constant_current_diode_right:rS,constant_current_diode_up:oS,constant_current_diode_vert:cS,crystal_4pin_down:hS,crystal_4pin_left:dS,crystal_4pin_right:mS,crystal_4pin_up:fS,crystal_down:xS,crystal_left:bS,crystal_right:vS,crystal_up:AS,current_source_down:FS,current_source_left:IS,current_source_right:kS,current_source_up:YS,darlington_pair_transistor_down:LS,darlington_pair_transistor_horz:ES,darlington_pair_transistor_left:TS,darlington_pair_transistor_right:NS,darlington_pair_transistor_up:WS,darlington_pair_transistor_vert:RS,dc_ammeter_down:E_,dc_ammeter_horz:nn,dc_ammeter_left:$S,dc_ammeter_right:XS,dc_ammeter_up:VS,dc_ammeter_vert:E_,dc_voltmeter_down:US,dc_voltmeter_horz:HS,dc_voltmeter_left:JS,dc_voltmeter_right:e3,dc_voltmeter_up:n3,dc_voltmeter_vert:s3,diac_down:c3,diac_horz:l3,diac_left:p3,diac_right:h3,diac_up:d3,diac_vert:m3,digital_ground_down:f3,digital_ground_left:x3,digital_ground_right:S3,digital_ground_up:B3,diode_down:P3,diode_left:I3,diode_right:Za,diode_up:M3,dpdt_normally_closed_switch_down:C3,dpdt_normally_closed_switch_left:Y3,dpdt_normally_closed_switch_right:Ka,dpdt_normally_closed_switch_up:L3,dpdt_switch_down:T3,dpdt_switch_left:N3,dpdt_switch_right:Ja,dpdt_switch_up:W3,dpst_normally_closed_switch_down:O3,dpst_normally_closed_switch_left:j3,dpst_normally_closed_switch_right:qa,dpst_normally_closed_switch_up:$3,dpst_switch_down:V3,dpst_switch_left:z3,dpst_switch_right:ts,dpst_switch_up:D3,ferrite_bead_down:Q3,ferrite_bead_left:H3,ferrite_bead_right:fx,ferrite_bead_up:yx,filled_diode_down:J3,filled_diode_horz:ew,filled_diode_left:nw,filled_diode_right:sw,filled_diode_up:pw,filled_diode_vert:mw,frequency_meter_horz:hp,frequency_meter_vert:vw,fuse_horz:_x,fuse_vert:Bw,ground_down:Fw,ground_horz:Pw,ground_left:Iw,ground_right:Mw,ground_up:kw,ground_vert:Cw,gunn_diode_horz:Yw,gunn_diode_vert:Lw,icled_down:Tw,icled_left:Nw,icled_right:es,icled_up:Ww,igbt_transistor_horz:gx,igbt_transistor_vert:Ow,illuminated_push_button_normally_open_horz:bx,illuminated_push_button_normally_open_vert:$w,inductor_down:Xw,inductor_left:Vw,inductor_right:zw,inductor_up:Dw,laser_diode_down:Uw,laser_diode_left:Gw,laser_diode_right:is,laser_diode_up:Qw,led_down:Jw,led_left:qw,led_right:Mp,led_up:Ax,light_dependent_resistor_horz:Bx,light_dependent_resistor_vert:i8,mosfet_depletion_normally_on_horz:Ix,mosfet_depletion_normally_on_vert:a8,mushroom_head_normally_open_momentary_horz:kx,mushroom_head_normally_open_momentary_vert:p8,n_channel_d_mosfet_transistor_gate_bottom_drain_left:y8,n_channel_d_mosfet_transistor_gate_bottom_drain_right:f8,n_channel_d_mosfet_transistor_gate_left_drain_bottom:_8,n_channel_d_mosfet_transistor_gate_left_drain_top:g8,n_channel_d_mosfet_transistor_gate_right_drain_bottom:x8,n_channel_d_mosfet_transistor_gate_right_drain_top:b8,n_channel_d_mosfet_transistor_gate_top_drain_left:v8,n_channel_d_mosfet_transistor_gate_top_drain_right:S8,n_channel_d_mosfet_transistor_horz:fe,n_channel_d_mosfet_transistor_vert:Ye,n_channel_e_mosfet_transistor_gate_bottom_drain_left:F8,n_channel_e_mosfet_transistor_gate_bottom_drain_right:P8,n_channel_e_mosfet_transistor_gate_left_drain_bottom:I8,n_channel_e_mosfet_transistor_gate_left_drain_top:M8,n_channel_e_mosfet_transistor_gate_right_drain_bottom:k8,n_channel_e_mosfet_transistor_gate_right_drain_top:C8,n_channel_e_mosfet_transistor_gate_top_drain_left:Y8,n_channel_e_mosfet_transistor_gate_top_drain_right:L8,n_channel_e_mosfet_transistor_horz:_e,n_channel_e_mosfet_transistor_vert:Le,njfet_transistor_horz:Nx,njfet_transistor_vert:W8,not_connected_down:$8,not_connected_left:X8,not_connected_right:ns,not_connected_up:V8,npn_bipolar_transistor_down:U8,npn_bipolar_transistor_horz:H8,npn_bipolar_transistor_left:J8,npn_bipolar_transistor_right:eA,npn_bipolar_transistor_up:nA,npn_bipolar_transistor_vert:sA,opamp_no_power_down:lA,opamp_no_power_left:pA,opamp_no_power_right:os,opamp_no_power_up:hA,opamp_with_power_down:mA,opamp_with_power_left:uA,opamp_with_power_right:as,opamp_with_power_up:yA,p_channel_d_mosfet_transistor_gate_bottom_drain_left:xA,p_channel_d_mosfet_transistor_gate_bottom_drain_right:bA,p_channel_d_mosfet_transistor_gate_left_drain_bottom:vA,p_channel_d_mosfet_transistor_gate_left_drain_top:SA,p_channel_d_mosfet_transistor_gate_right_drain_bottom:wA,p_channel_d_mosfet_transistor_gate_right_drain_top:AA,p_channel_d_mosfet_transistor_gate_top_drain_left:BA,p_channel_d_mosfet_transistor_gate_top_drain_right:FA,p_channel_d_mosfet_transistor_horz:ge,p_channel_d_mosfet_transistor_vert:Ee,p_channel_e_mosfet_transistor_gate_bottom_drain_left:kA,p_channel_e_mosfet_transistor_gate_bottom_drain_right:CA,p_channel_e_mosfet_transistor_gate_left_drain_bottom:YA,p_channel_e_mosfet_transistor_gate_left_drain_top:LA,p_channel_e_mosfet_transistor_gate_right_drain_bottom:EA,p_channel_e_mosfet_transistor_gate_right_drain_top:TA,p_channel_e_mosfet_transistor_gate_top_drain_left:NA,p_channel_e_mosfet_transistor_gate_top_drain_right:WA,p_channel_e_mosfet_transistor_horz:xe,p_channel_e_mosfet_transistor_vert:Te,photodiode_horz:Vx,photodiode_vert:jA,pjfet_transistor_horz:Ux,pjfet_transistor_vert:zA,pnp_bipolar_transistor_down:GA,pnp_bipolar_transistor_horz:QA,pnp_bipolar_transistor_left:KA,pnp_bipolar_transistor_right:t6,pnp_bipolar_transistor_up:i6,pnp_bipolar_transistor_vert:a6,potentiometer_horz:Hx,potentiometer_vert:p6,potentiometer2_down:m6,potentiometer2_left:u6,potentiometer2_right:ss,potentiometer2_up:y6,potentiometer3_down:g6,potentiometer3_left:v6,potentiometer3_right:S6,potentiometer3_up:B6,power_factor_meter_horz:Zx,power_factor_meter_vert:M6,push_button_normally_closed_momentary_horz:Jx,push_button_normally_closed_momentary_vert:L6,push_button_normally_open_momentary_down:W6,push_button_normally_open_momentary_horz:$6,push_button_normally_open_momentary_left:X6,push_button_normally_open_momentary_right:an,push_button_normally_open_momentary_up:V6,push_button_normally_open_momentary_vert:z6,rail_down:Q6,rail_left:J6,rail_right:rB,rail_up:oB,rectifier_diode_horz:tb,rectifier_diode_vert:hB,resistor_down:uB,resistor_left:_B,resistor_right:bB,resistor_sm_down:vB,resistor_sm_left:SB,resistor_sm_right:wB,resistor_sm_up:AB,resistor_up:PB,resistor_xs_down:IB,resistor_xs_left:MB,resistor_xs_right:kB,resistor_xs_up:CB,resonator_down:EB,resonator_horz:rb,resonator_left:WB,resonator_right:ms,resonator_up:RB,resonator_vert:OB,schottky_diode_down:$B,schottky_diode_left:XB,schottky_diode_right:us,schottky_diode_up:VB,silicon_controlled_rectifier_horz:nb,silicon_controlled_rectifier_vert:DB,solderjumper2_bridged12_down:UB,solderjumper2_bridged12_left:GB,solderjumper2_bridged12_right:$h,solderjumper2_bridged12_up:QB,solderjumper2_down:HB,solderjumper2_left:ZB,solderjumper2_right:zh,solderjumper2_up:KB,solderjumper3_bridged12_down:JB,solderjumper3_bridged12_left:qB,solderjumper3_bridged12_right:Gh,solderjumper3_bridged12_up:t7,solderjumper3_bridged123_down:e7,solderjumper3_bridged123_left:r7,solderjumper3_bridged123_right:Zh,solderjumper3_bridged123_up:i7,solderjumper3_bridged23_down:n7,solderjumper3_bridged23_left:o7,solderjumper3_bridged23_right:qh,solderjumper3_bridged23_up:a7,solderjumper3_down:s7,solderjumper3_left:c7,solderjumper3_right:rd,solderjumper3_up:l7,spdt_normally_closed_switch_down:h7,spdt_normally_closed_switch_left:d7,spdt_normally_closed_switch_right:ys,spdt_normally_closed_switch_up:m7,spdt_switch_down:y7,spdt_switch_left:f7,spdt_switch_right:fs,spdt_switch_up:_7,speaker_down:g7,speaker_horz:x7,speaker_left:b7,speaker_right:v7,speaker_up:S7,speaker_vert:w7,spst_normally_closed_switch_down:A7,spst_normally_closed_switch_left:B7,spst_normally_closed_switch_right:gs,spst_normally_closed_switch_up:F7,spst_switch_down:P7,spst_switch_left:I7,spst_switch_right:bs,spst_switch_up:M7,square_wave_down:k7,square_wave_left:C7,square_wave_right:Y7,square_wave_up:L7,step_recovery_diode_horz:Yb,step_recovery_diode_vert:E7,tachometer_horz:$d,tachometer_vert:X7,testpoint_down:V7,testpoint_left:z7,testpoint_right:Ss,testpoint_up:D7,tilted_ground_down:G7,tilted_ground_left:Q7,tilted_ground_right:Xd,tilted_ground_up:Tb,triac_horz:Wb,triac_vert:K7,tunnel_diode_horz:jb,tunnel_diode_vert:iF,unijunction_transistor_horz:$b,unijunction_transistor_vert:cF,usbc:pF,var_meter_horz:Db,var_meter_vert:uF,varactor_diode_horz:Ub,varactor_diode_vert:bF,varistor_horz:Gb,varistor_vert:wF,varmeter_horz:tm,varmeter_vert:CF,vcc_down:LF,vcc_left:TF,vcc_right:WF,vcc_up:OF,volt_meter_horz:jF,volt_meter_vert:zF,watt_hour_meter_horz:rm,watt_hour_meter_vert:JF,wattmeter_horz:im,wattmeter_vert:aP,zener_diode_horz:sP,zener_diode_vert:pP};var fD=Object.fromEntries(Object.keys(ur).map((t)=\u003e[t,t]));var OG=te(ee(),1);var VG=te(ee(),1);var FI=te(ee(),1);var PI=te(ee(),1);var cQ=te(ee(),1);var hP=\"TscircuitAlphabet\",Hb=\"data-tscircuit-alphabet-font\";function dP(t){let e=(i)=\u003e({...i,children:(i.children??[]).filter((n)=\u003e!(Hb in(n.attributes??{}))).map(e)}),r=e(t);return r.children.push({name:\"style\",type:\"element\",value:\"\",attributes:{[Hb]:\"\",type:\"text/css\"},children:[{name:\"\",type:\"text\",value:`@font-face { font-family: '${hP}'; src: url('data:font/ttf;base64,${M0}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),s1.stringify(r)}var l1=c1.default(\"circuit-to-svg\"),YD=l1.extend(\"pcb\"),LD=l1.extend(\"sch\");var Zt={\"3d_viewer\":{background_bottom:\"rgb(102, 102, 128)\",background_top:\"rgb(204, 204, 230)\",board:\"rgb(51, 43, 23)\",copper:\"rgb(179, 156, 0)\",silkscreen_bottom:\"rgb(230, 230, 230)\",silkscreen_top:\"rgb(230, 230, 230)\",soldermask:\"rgb(20, 51, 36)\",solderpaste:\"rgb(128, 128, 128)\"},board:{anchor:\"rgb(255, 38, 226)\",aux_items:\"rgb(255, 255, 255)\",b_adhes:\"rgb(0, 0, 132)\",b_crtyd:\"rgb(255, 38, 226)\",b_fab:\"rgb(88, 93, 132)\",b_mask:\"rgba(2, 255, 238, 0.400)\",b_paste:\"rgb(0, 194, 194)\",b_silks:\"rgb(232, 178, 167)\",background:\"rgb(0, 16, 35)\",cmts_user:\"rgb(89, 148, 220)\",copper:{b:\"rgb(77, 127, 196)\",f:\"rgb(200, 52, 52)\",in1:\"rgb(127, 200, 127)\",in10:\"rgb(237, 124, 51)\",in11:\"rgb(91, 195, 235)\",in12:\"rgb(247, 111, 142)\",in13:\"rgb(167, 165, 198)\",in14:\"rgb(40, 204, 217)\",in15:\"rgb(232, 178, 167)\",in16:\"rgb(242, 237, 161)\",in17:\"rgb(237, 124, 51)\",in18:\"rgb(91, 195, 235)\",in19:\"rgb(247, 111, 142)\",in2:\"rgb(206, 125, 44)\",in20:\"rgb(167, 165, 198)\",in21:\"rgb(40, 204, 217)\",in22:\"rgb(232, 178, 167)\",in23:\"rgb(242, 237, 161)\",in24:\"rgb(237, 124, 51)\",in25:\"rgb(91, 195, 235)\",in26:\"rgb(247, 111, 142)\",in27:\"rgb(167, 165, 198)\",in28:\"rgb(40, 204, 217)\",in29:\"rgb(232, 178, 167)\",in3:\"rgb(79, 203, 203)\",in30:\"rgb(242, 237, 161)\",in4:\"rgb(219, 98, 139)\",in5:\"rgb(167, 165, 198)\",in6:\"rgb(40, 204, 217)\",in7:\"rgb(232, 178, 167)\",in8:\"rgb(242, 237, 161)\",in9:\"rgb(141, 203, 129)\"},cursor:\"rgb(255, 255, 255)\",drc:\"rgb(194, 194, 194)\",drc_error:\"rgba(215, 91, 107, 0.800)\",drc_exclusion:\"rgb(255, 255, 255)\",drc_warning:\"rgba(255, 208, 66, 0.902)\",dwgs_user:\"rgb(194, 194, 194)\",eco1_user:\"rgb(180, 219, 210)\",eco2_user:\"rgb(216, 200, 82)\",edge_cuts:\"rgb(208, 210, 205)\",f_adhes:\"rgb(132, 0, 132)\",f_crtyd:\"rgb(255, 0, 245)\",f_fab:\"rgb(175, 175, 175)\",f_mask:\"rgba(216, 100, 255, 0.400)\",f_paste:\"rgba(180, 160, 154, 0.902)\",f_silks:\"rgb(242, 237, 161)\",footprint_text_back:\"rgb(0, 0, 132)\",footprint_text_front:\"rgb(194, 194, 194)\",footprint_text_invisible:\"rgb(132, 132, 132)\",grid:\"rgb(132, 132, 132)\",grid_axes:\"rgb(194, 194, 194)\",margin:\"rgb(255, 38, 226)\",microvia:\"rgb(0, 132, 132)\",no_connect:\"rgb(0, 0, 132)\",pad_back:\"rgb(77, 127, 196)\",pad_front:\"rgb(200, 52, 52)\",pad_plated_hole:\"rgb(194, 194, 0)\",pad_through_hole:\"rgb(227, 183, 46)\",plated_hole:\"rgb(26, 196, 210)\",ratsnest:\"rgba(245, 255, 213, 0.702)\",select_overlay:\"rgb(4, 255, 67)\",through_via:\"rgb(236, 236, 236)\",user_1:\"rgb(194, 194, 194)\",user_2:\"rgb(89, 148, 220)\",user_3:\"rgb(180, 219, 210)\",user_4:\"rgb(216, 200, 82)\",user_5:\"rgb(194, 194, 194)\",user_6:\"rgb(89, 148, 220)\",user_7:\"rgb(180, 219, 210)\",user_8:\"rgb(216, 200, 82)\",user_9:\"rgb(232, 178, 167)\",via_blind_buried:\"rgb(187, 151, 38)\",via_hole:\"rgb(227, 183, 46)\",via_micro:\"rgb(0, 132, 132)\",via_through:\"rgb(236, 236, 236)\",worksheet:\"rgb(200, 114, 171)\"},gerbview:{axes:\"rgb(0, 0, 132)\",background:\"rgb(0, 0, 0)\",dcodes:\"rgb(255, 255, 255)\",grid:\"rgb(132, 132, 132)\",layers:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\"],negative_objects:\"rgb(132, 132, 132)\",worksheet:\"rgb(0, 0, 132)\"},meta:{filename:\"kicad_2020\",name:\"KiCad 2020\",version:2},simulation_palette:[\"#1f77b4\",\"#d62728\",\"#2ca02c\",\"#ff7f0e\",\"#9467bd\",\"#17becf\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\"],palette:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\"],schematic:{aux_items:\"rgb(46, 46, 46)\",background:\"rgb(245, 241, 237)\",brightened:\"rgb(255, 0, 255)\",bus:\"rgb(0, 0, 132)\",bus_junction:\"rgb(0, 0, 132)\",component_body:\"rgb(255, 255, 194)\",component_outline:\"rgb(132, 0, 0)\",cursor:\"rgb(15, 15, 15)\",erc_error:\"rgba(230, 9, 13, 0.800)\",erc_warning:\"rgba(209, 146, 0, 0.800)\",fields:\"rgb(132, 0, 132)\",grid:\"rgb(181, 181, 181)\",grid_axes:\"rgb(0, 0, 132)\",hidden:\"rgb(194, 194, 194)\",junction:\"rgb(0, 150, 0)\",label_global:\"rgb(132, 0, 0)\",label_background:\"rgba(255, 255, 255, 0.6)\",label_hier:\"rgb(114, 86, 0)\",label_local:\"rgb(15, 15, 15)\",net_name:\"rgb(132, 132, 132)\",no_connect:\"rgb(132, 0, 0)\",note:\"rgb(0, 0, 194)\",override_item_colors:!1,pin:\"rgb(132, 0, 0)\",pin_name:\"rgb(0, 100, 100)\",pin_number:\"rgb(169, 0, 0)\",reference:\"rgb(0, 100, 100)\",shadow:\"rgba(102, 179, 255, 0.800)\",sheet:\"rgb(132, 0, 0)\",sheet_background:\"rgba(253, 255, 231, 0.000)\",sheet_fields:\"rgb(132, 0, 132)\",sheet_filename:\"rgb(114, 86, 0)\",sheet_label:\"rgb(0, 100, 100)\",sheet_name:\"rgb(0, 100, 100)\",table:\"rgb(102, 102, 102)\",value:\"rgb(0, 100, 100)\",wire:\"rgb(0, 150, 0)\",wire_crossing:\"rgb(30, 180, 30)\",worksheet:\"rgb(132, 0, 0)\"}};var jD=Zt.board.user_2;var XD=Zt.board.user_2,VD=Zt.board.user_2;var DD=Zt.board.user_2;var GD=Zt.board.user_2;var Zb=0.94,Bs=0.045,mP=Object.fromEntries(Object.entries(xi).map(([t,e])=\u003e{let r=e.flatMap((n)=\u003e[n.x1,n.x2]),i=e.flatMap((n)=\u003e[n.y1,n.y2]);return[t,e.length?{minX:Math.min(...r)-Bs,maxX:Math.max(...r)+Bs,minY:-(Math.max(...i)+Bs)*Zb,maxY:-(Math.min(...i)-Bs)*Zb}:null]})),tU=Math.round(Math.max(...Object.values(mP).map((t)=\u003et?t.maxX-t.minX:0))*1000)/1000;var Ts={copper:{top:\"rgb(200, 52, 52)\",inner1:\"rgb(255, 140, 0)\",inner2:\"rgb(255, 215, 0)\",inner3:\"rgb(50, 205, 50)\",inner4:\"rgb(64, 224, 208)\",inner5:\"rgb(138, 43, 226)\",inner6:\"rgb(255, 105, 180)\",inner7:\"rgb(0, 191, 255)\",inner8:\"rgb(160, 82, 45)\",bottom:\"rgb(77, 127, 196)\"},soldermaskWithCopperUnderneath:{top:\"rgb(18, 82, 50)\",bottom:\"rgb(18, 82, 50)\"},soldermask:{top:\"rgb(12, 55, 33)\",bottom:\"rgb(12, 55, 33)\"},soldermaskOverCopper:{top:\"rgb(52, 135, 73)\",bottom:\"rgb(52, 135, 73)\"},substrate:\"rgb(201, 162, 110)\",drill:\"#FF26E2\",silkscreen:{top:\"#f2eda1\",bottom:\"#5da9e9\"},boardOutline:\"rgba(255, 255, 255, 0.5)\",courtyard:{top:\"#FF00FF\",bottom:\"rgb(38, 233, 255)\"},keepout:\"#FF6B6B\",debugComponent:{fill:null,stroke:null}},iU=Ts.drill,nU=Ts.silkscreen.top,oU=Ts.silkscreen.bottom,aU={...Ts.copper};var uP=4;var p1=5;var yP=2,BU=p1+2,FU=yP+2,PU=p1+uP+6;function fP(t){return t.find((r)=\u003er.type===\"project_software_metadata\"||r.type===\"source_project_metadata\")?.software_used_string}var _P={name:\"circuit-to-svg\",type:\"module\",version:\"0.0.426\",repository:{type:\"git\",url:\"https://github.com/tscircuit/circuit-to-svg.git\"},description:\"Convert Circuit JSON to SVG\",main:\"dist/index.js\",files:[\"dist\"],scripts:{start:\"cosmos\",prepublish:\"npm run build\",prepare:\"node scripts/prepare-git.cjs\",build:\"tsup-node ./lib/index.ts --format esm --dts --sourcemap --external tscircuit\",format:\"biome format . --write\",\"format:check\":\"biome format .\",cosmos:\"cosmos\",\"cosmos-export\":\"cosmos-export\"},license:\"ISC\",devDependencies:{\"@biomejs/biome\":\"^1.9.4\",\"@resvg/resvg-js\":\"^2.6.2\",\"@tscircuit/alphabet\":\"^0.0.27\",\"@tscircuit/checks-latest\":\"npm:@tscircuit/checks@0.0.179\",\"@types/bun\":\"^1.2.8\",\"@types/debug\":\"^4.1.12\",\"@vitejs/plugin-react\":\"5.0.0\",biome:\"^0.3.3\",\"bun-match-svg\":\"^0.0.12\",\"circuit-json\":\"^0.0.491\",esbuild:\"^0.20.2\",\"format-si-unit\":\"^0.0.12\",\"performance-now\":\"^2.1.0\",react:\"19.1.0\",\"react-cosmos\":\"7.0.0\",\"react-cosmos-plugin-vite\":\"7.0.0\",\"react-dom\":\"19.1.0\",tscircuit:\"^0.0.2018\",tsup:\"^8.0.2\",typescript:\"^5.4.5\",\"vite-tsconfig-paths\":\"^5.0.1\"},peerDependencies:{\"@tscircuit/alphabet\":\"*\"},dependencies:{\"@types/node\":\"^22.5.5\",\"bun-types\":\"^1.1.40\",\"calculate-elbow\":\"0.0.12\",debug:\"^4.4.3\",\"svg-path-commander\":\"^2.1.11\",svgson:\"^5.3.1\",\"transformation-matrix\":\"^2.16.1\"}},gP=_P.version;function xP(t,e=\"error_text_overlay\"){let r=t.filter((a)=\u003ea.type.endsWith(\"_error\"));if(r.length===0)return null;let i=r.map((a)=\u003ea.message).filter((a)=\u003e!!a);if(i.length===0)return null;return{name:\"text\",type:\"element\",value:\"\",attributes:{x:\"10\",y:\"20\",fill:\"red\",\"font-family\":\"monospace\",\"font-size\":\"12px\",\"data-type\":e,\"data-layer\":\"global\"},children:i.map((a,o)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:\"10\",dy:o===0?\"0\":\"1.2em\"},children:[{type:\"text\",value:a,name:\"\",attributes:{},children:[]}]}))}}var bP={pin_number:0.15,negated_pin_number:0.12,reference_designator:0.18,manufacturer_number:0.18,net_label:0.18,error:0.05},He=(t,e)=\u003ee??bP[t],se=(t,e,r)=\u003eMath.abs(t.a)*He(e,r);function vP(t){let{minX:e,minY:r,maxX:i,maxY:n}=t.bounds,a=t.cellSize??1,o=t.labelCells??!1,c=[],l=(s,p)=\u003e{let[d,m]=P(t.transform,[s,p]);return{x:d,y:m}};for(let s=Math.floor(e);s\u003c=Math.ceil(i);s+=a){let p=l(s,r),d=l(s,n);c.push({name:\"line\",type:\"element\",attributes:{x1:p.x.toString(),y1:p.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:Zt.schematic.grid,\"stroke-width\":(0.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}for(let s=Math.floor(r);s\u003c=Math.ceil(n);s+=a){let p=l(e,s),d=l(i,s);c.push({name:\"line\",type:\"element\",attributes:{x1:p.x.toString(),y1:p.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:Zt.schematic.grid,\"stroke-width\":(0.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}if(o){let s=(p,d)=\u003e{if(a\u003c=0.1)return`${p.toFixed(1)},${d.toFixed(1)}`;return`${p},${d}`};for(let p=Math.floor(e);p\u003c=Math.ceil(i);p+=a)for(let d=Math.floor(r);d\u003c=Math.ceil(n);d+=a){let m=l(p,d);c.push({name:\"text\",type:\"element\",attributes:{x:(m.x-2.5).toString(),y:(m.y-5).toString(),fill:Zt.schematic.grid,\"font-size\":(a/5*Math.abs(t.transform.a)).toString(),\"fill-opacity\":\"0.5\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:s(p,d),name:\"\",attributes:{},children:[]}]})}}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"grid sch-grid\"},children:c}}function SP(t){let{points:e,transform:r}=t,i=[];for(let n of e){let[a,o]=P(r,[n.x-0.1,n.y-0.1]),[c,l]=P(r,[n.x+0.1,n.y+0.1]),[s,p]=P(r,[n.x-0.1,n.y+0.1]),[d,m]=P(r,[n.x+0.1,n.y-0.1]);i.push({name:\"path\",type:\"element\",attributes:{d:`M${a},${o} L${c},${l} M${s},${p} L${d},${m}`,stroke:Zt.schematic.grid,\"stroke-width\":(0.02*Math.abs(r.a)).toString(),\"stroke-opacity\":\"0.7\"}});let[u,y]=P(r,[n.x+0.15,n.y-0.15]);i.push({name:\"text\",type:\"element\",attributes:{x:u.toString(),y:y.toString(),fill:Zt.schematic.grid,\"font-size\":(0.1*Math.abs(r.a)).toString(),\"fill-opacity\":\"0.7\",\"text-anchor\":\"start\",\"font-family\":\"sans-serif\",\"dominant-baseline\":\"middle\"},children:[{type:\"text\",value:n.label||`(${n.x},${n.y})`,name:\"\",attributes:{},children:[]}]})}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"labeled-points sch-labeled-points\"},children:i}}function wP(t){return t.reduce((e,r)=\u003e{if(!e)return r;if(r.sheet_index===void 0)return e;if(e.sheet_index===void 0)return r;return r.sheet_index\u003ce.sheet_index?r:e},void 0)}var Kb={\"0\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"1\":{width:13,height:27,ascent:22,descent:5,left:-3,right:9},\"2\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"3\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"4\":{width:13,height:27,ascent:22,descent:5,left:0,right:12},\"5\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"6\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"7\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"8\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"9\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\" \":{width:7,height:27,ascent:22,descent:5,left:0,right:0},\"!\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'\"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},\"#\":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"%\":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},\"\u0026\":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},\"'\":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},\"(\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\")\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"*\":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},\"+\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\",\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"-\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\".\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"/\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\":\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\";\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"\u003c\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"=\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"\u003e\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"?\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"@\":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},\"[\":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},\"\\\\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\"]\":{width:7,height:27,ascent:22,descent:5,left:0,right:5},\"^\":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},\"`\":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},\"{\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"|\":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},\"}\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"~\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},hn=(t)=\u003e{if(!t)return 0;let e=0;for(let r of t){let i=Kb[r];if(i)e+=i.width;else e+=Kb[\"?\"].width}return e/27},h1=0.65,d1=0.08;function Ls(t){return hn(t.text||\"\")+(t.display_superscript?d1+hn(t.display_superscript)*h1:0)}function am(t,e,r,i=\"central\"){let n=[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}];if(e)n.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{class:\"sch-net-label-superscript\",\"font-size\":`${r*h1}px`,dx:`${r*d1}`,dy:`${-r*(i===\"ideographic\"?0.5:0.25)}`},children:[{type:\"text\",value:e,name:\"\",attributes:{},children:[]}]});return n}var gi=(t)=\u003e{switch(t){case\"top\":return{x:0,y:-1};case\"bottom\":return{x:0,y:1};case\"left\":return{x:1,y:0};case\"right\":return{x:-1,y:0}}throw Error(`Invalid side: ${t}`)},Qe=0.3,fi=0.3,_i=0.06,m1=0.2,u1=(t)=\u003e({\"data-circuit-json-type\":\"schematic_net_label\",\"data-schematic-net-label-id\":t.schematic_net_label_id}),AP={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},Jb={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"};function BP(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function FP(t,e,r){let i=r+Qe*2+_i*t.text.length+fi,n=gi(t.anchor_side);return t.anchor_position??{x:t.center.x-n.x*i*e/2,y:t.center.y-n.y*i*e/2}}var PP=(t,e)=\u003e{let r=t\u003c0?t+2*Math.PI:t,i=e\u003c0?e+2*Math.PI:e,n=Math.abs(r-i);if(n\u003eMath.PI)n=2*Math.PI-n;return n},y1=({schPorts:t,symbol:e,schComponent:r})=\u003e{let i=t.map((c)=\u003e{let l=c.center.x-r.center.x,s=c.center.y-r.center.y;return{port:c,angle:Math.atan2(s,l)}}),n=e.ports.map((c)=\u003e{let l=c.x-e.center.x,s=c.y-e.center.y;return{port:c,angle:Math.atan2(s,l)}});i.sort((c,l)=\u003ec.angle-l.angle),n.sort((c,l)=\u003ec.angle-l.angle);let a=[],o=new Set;for(let c of i){let l=null;for(let s of n){if(o.has(s.port))continue;let p=PP(c.angle,s.angle);if(l===null||p\u003cl.angleDiff)l={symbolPort:s.port,angleDiff:p}}if(l\u0026\u0026l.angleDiff\u003cMath.PI/4)a.push({schPort:c.port,symbolPort:l.symbolPort}),o.add(l.symbolPort)}return a};function f1(t,e,r,i){let n=Math.sqrt((r.x-t.x)**2+(r.y-t.y)**2),o=Math.sqrt((i.x-e.x)**2+(i.y-e.y)**2)/n,c=e.x-o*t.x,l=e.y-o*t.y,s=Lt(c,l),p=Jt(o,o);return Ft(s,p)}function IP(t){let e=[],r=new Map,i=new Map,n=null;for(let a of t)if(a.type===\"schematic_component\")e.push(a);else if(a.type===\"schematic_port\"\u0026\u0026a.schematic_component_id){let o=r.get(a.schematic_component_id)??[];o.push(a),r.set(a.schematic_component_id,o)}else if(a.type===\"source_component\")i.set(a.source_component_id,a);for(let a of e){let o=MP({component:a,schematicPorts:r.get(a.schematic_component_id)??[],sourceComponent:a.source_component_id?i.get(a.source_component_id):void 0});if(!o)continue;n=n?_1(n,o):o}return n}function MP({component:t,schematicPorts:e,sourceComponent:r}){if(!t.symbol_name)return null;let i=ur[t.symbol_name];if(!i)return null;let n=y1({schPorts:e,symbol:i,schComponent:t});if(!n[0])return null;let a=f1(n[1]?.symbolPort??i.center,n[1]?.schPort.center??t.center,n[0].symbolPort,n[0].schPort.center),o=null;for(let c of i.primitives){if(c.type!==\"text\")continue;let l=kP({primitive:c,component:t,sourceComponent:r});if(!l)continue;let s=P(a,c),p=He(\"reference_designator\"),d=CP({x:s.x,y:s.y,width:hn(l)*p,height:p,anchor:c.anchor});o=o?_1(o,d):d}return o}function kP({primitive:t,component:e,sourceComponent:r}){if(t.text===\"{REF}\")return r?.display_name??r?.name??\"\";if(t.text===\"{VAL}\")return e.symbol_display_value??\"\";return\"\"}function CP({x:t,y:e,width:r,height:i,anchor:n}){let a=t,o=t,c=e-i/2,l=e+i/2;if(n.includes(\"left\"))o=t+r;else if(n.includes(\"right\"))a=t-r;else a=t-r/2,o=t+r/2;if(n.includes(\"top\"))c=e-i,l=e;else if(n.includes(\"bottom\"))c=e,l=e+i;return{minX:a,minY:c,maxX:o,maxY:l}}function _1(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var g1=(t,e)=\u003e{if(t.column_widths\u0026\u0026t.column_widths.length\u003e0\u0026\u0026t.row_heights\u0026\u0026t.row_heights.length\u003e0){let p=(d)=\u003e{if(typeof d===\"number\")return d;if(d.endsWith(\"mm\"))return parseFloat(d);if(d.endsWith(\"in\"))return parseFloat(d)*25.4;return parseFloat(d)};return{column_widths:t.column_widths.map(p),row_heights:t.row_heights.map(p)}}let r=e.filter((p)=\u003ep.type===\"schematic_table_cell\"\u0026\u0026p.schematic_table_id===t.schematic_table_id);if(r.length===0)return{column_widths:[],row_heights:[]};let i=r.reduce((p,d)=\u003eMath.max(p,d.end_column_index),-1)+1,n=r.reduce((p,d)=\u003eMath.max(p,d.end_row_index),-1)+1,{cell_padding:a=0.2}=t,o=Array(i).fill(0),c=Array(n).fill(0),l={},s={};for(let p of r){let d=He(\"reference_designator\",p.font_size),u=hn(p.text??\"\")*d+2*a,y=d*1.2+2*a,f=`${p.start_row_index}-${p.start_column_index}`;l[f]=u,s[f]=y}for(let p=0;p\u003cn;p++)for(let d=0;d\u003ci;d++){let m=`${p}-${d}`;if(l[m]\u0026\u0026l[m]\u003eo[d])o[d]=l[m];if(s[m]\u0026\u0026s[m]\u003ec[p])c[p]=s[m]}for(let p of r){if(p.start_column_index===p.end_column_index\u0026\u0026p.start_row_index===p.end_row_index)continue;let d=`${p.start_row_index}-${p.start_column_index}`,m=l[d],u=s[d];if(m===void 0||u===void 0)continue;let y=0;for(let _=p.start_column_index;_\u003c=p.end_column_index;_++)y+=o[_];if(m\u003ey){let x=(m-y)/(p.end_column_index-p.start_column_index+1);for(let Y=p.start_column_index;Y\u003c=p.end_column_index;Y++)o[Y]+=x}let f=0;for(let _=p.start_row_index;_\u003c=p.end_row_index;_++)f+=c[_];if(u\u003ef){let x=(u-f)/(p.end_row_index-p.start_row_index+1);for(let Y=p.start_row_index;Y\u003c=p.end_row_index;Y++)c[Y]+=x}}return{column_widths:o,row_heights:c}},YP=10.16,LP=1.1,Ze=YP/LP,EP=297/Ze,TP=210/Ze,AG=20/Ze,Fs=5/Ze;function sm(t={}){let e=t.center??{x:0,y:0},r=t.sheet_width===void 0?EP:t.sheet_width/Ze,i=t.sheet_height===void 0?TP:t.sheet_height/Ze,n=e.x-r/2,a=e.x+r/2,o=e.y-i/2,c=e.y+i/2;return{center:e,width:r,height:i,minX:n,maxX:a,minY:o,maxY:c,innerMinX:n+Fs,innerMaxX:a-Fs,innerMinY:o+Fs,innerMaxY:c-Fs}}function NP(t,e=0.5){let{POSITIVE_INFINITY:r,POSITIVE_INFINITY:i,NEGATIVE_INFINITY:n,NEGATIVE_INFINITY:a}=Number,o=0.2;for(let s of t)if(s.type===\"schematic_sheet\"){let p=sm(s);l(p.center,{width:p.width,height:p.height},0)}else if(s.type===\"schematic_component\")l(s.center,s.size,0);else if(s.type===\"schematic_port\")l(s.center,{width:o,height:o},0);else if(s.type===\"schematic_debug_object\"){if(s.shape===\"rect\")l(s.center,s.size,0);else if(s.shape===\"line\")l(s.start,{width:0.1,height:0.1},0),l(s.end,{width:0.1,height:0.1},0)}else if(s.type===\"schematic_net_label\"){let p=He(\"net_label\"),d=Ls(s),u=(d+Qe*2+_i*(s.text?.length||0)+fi)*p,y=m1,f=BP(s.anchor_side)/180*Math.PI,_=FP(s,p,d),x=gi(s.anchor_side),Y={x:_.x+x.x*u/2,y:_.y+x.y*u/2};l(Y,{width:u,height:y},f)}else if(s.type===\"schematic_trace\")for(let p of s.edges)l(p.from,{width:0.1,height:0.1},0),l(p.to,{width:0.1,height:0.1},0);else if(s.type===\"schematic_text\"){let d=He(\"reference_designator\",s.font_size)??0.18,m=s.text??\"\",u=s.display_superscript;if(u){let y=m.split(`\n`),f=Math.max(...y.map((X,E)=\u003eLs({text:X,display_superscript:E===y.length-1?u:void 0})))*d,_=s.anchor,x=_===\"left\"||_.endsWith(\"_left\")?f/2:_===\"right\"||_.endsWith(\"_right\")?-f/2:0,Y=_===\"top\"||_.startsWith(\"top_\")?0:_===\"bottom\"||_.startsWith(\"bottom_\")?-d:-d/2,b=(y.length+0.3)*d,M=-(Y-0.3*d+b/2),O=-(s.rotation??0)*Math.PI/180;l({x:s.position.x+x*Math.cos(O)-M*Math.sin(O),y:s.position.y+x*Math.sin(O)+M*Math.cos(O)},{width:f,height:b},O)}else{let y=m.length*d,f=d;l(s.position,{width:y,height:f},s.rotation??0)}}else if(s.type===\"schematic_voltage_probe\"){if(l(s.position,{width:0.2,height:0.4},0),s.name){let p=He(\"net_label\"),d=hn(s.name)*p,m=p,u=0.3,y=s.label_alignment??\"top_right\",f=s.position.x,_=s.position.y;if(y.includes(\"top\"))_+=0.3+m/2;else if(y.includes(\"bottom\"))_-=0.3+m/2;if(y.includes(\"right\"))f+=0.3+d/2;else if(y.includes(\"left\"))f-=0.3+d/2;l({x:f,y:_},{width:d,height:m},0)}}else if(s.type===\"schematic_box\")l({x:s.x+s.width/2,y:s.y+s.height/2},{width:s.width,height:s.height},0);else if(s.type===\"schematic_table\"){let{column_widths:p,row_heights:d}=g1(s,t),m=p.reduce((b,M)=\u003eb+M,0),u=d.reduce((b,M)=\u003eb+M,0),y=s.anchor??\"center\",f=s.anchor_position.x,_=s.anchor_position.y;if(y.includes(\"center\"))f-=m/2;else if(y.includes(\"right\"))f-=m;if(y.includes(\"center\"))_+=u/2;else if(y.includes(\"bottom\"))_+=u;let x=f+m/2,Y=_-u/2;l({x,y:Y},{width:m,height:u},0)}else if(s.type===\"schematic_line\")l({x:s.x1,y:s.y1},{width:0.02,height:0.02},0),l({x:s.x2,y:s.y2},{width:0.02,height:0.02},0);else if(s.type===\"schematic_circle\")l(s.center,{width:s.radius*2,height:s.radius*2},0);else if(s.type===\"schematic_rect\")l(s.center,{width:s.width,height:s.height},s.rotation);else if(s.type===\"schematic_arc\")l(s.center,{width:s.radius*2,height:s.radius*2},0);else if(s.type===\"schematic_path\"){if(s.points\u0026\u0026s.points.length\u003e0)for(let p of s.points)l(p,{width:0.02,height:0.02},0)}if(!Number.isFinite(r))r=-1,i=-1,n=1,a=1;r-=e,i-=e,n+=e,a+=e;let c=IP(t);if(c){if(c.minX\u003cr)r=c.minX-e;if(c.minY\u003ci)i=c.minY-e;if(c.maxX\u003en)n=c.maxX+e;if(c.maxY\u003ea)a=c.maxY+e}return{minX:r,minY:i,maxX:n,maxY:a};function l(s,p,d){let m=[{x:-p.width/2,y:-p.height/2},{x:p.width/2,y:-p.height/2},{x:p.width/2,y:p.height/2},{x:-p.width/2,y:p.height/2}];for(let u of m){let y=u.x*Math.cos(d)-u.y*Math.sin(d)+s.x,f=u.x*Math.sin(d)+u.y*Math.cos(d)+s.y;r=Math.min(r,y),i=Math.min(i,f),n=Math.max(n,y),a=Math.max(a,f)}}}function Ps(t){if(!Number.isFinite(t))return\"0\";return Number.parseFloat(t.toFixed(6)).toString()}var dn=\"image/svg+xml\";function WP({schematicGraphic:t,viewport:e}){let r=RP(t);return{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-graphic\",\"pointer-events\":\"none\",\"data-circuit-json-type\":\"schematic_graphic\",\"data-schematic-graphic-id\":t.schematic_graphic_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"image\",type:\"element\",value:\"\",attributes:{href:r,x:Ps(e.x),y:Ps(e.y),width:Ps(e.width),height:Ps(e.height),preserveAspectRatio:\"xMidYMid meet\",overflow:\"hidden\",\"pointer-events\":\"none\"},children:[]}]}}function RP(t){let e=`Unable to render schematic graphic \"${t.schematic_graphic_id}\"`,{asset:r,svg_content:i}=t;if(!r){if(i!==void 0)return qb(i);throw Error(`${e}: asset or svg_content is required`)}if(x1(r.mimetype)!==dn)throw Error(`${e}: asset.mimetype must be \"${dn}\" (received ${JSON.stringify(r.mimetype)})`);let n=r.url.trim();if(n.toLowerCase().startsWith(\"data:\"))return OP(n,e),n;if(i!==void 0)return qb(i);throw Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(r.url)}`)}function OP(t,e){let r=t.match(/^data:([^,]*),(.*)$/is);if(!r)throw Error(`${e}: asset.url is not a valid SVG data URL`);let i=r[1].split(\";\").map((l)=\u003el.trim());if(x1(i.shift()??\"\")!==dn)throw Error(`${e}: asset.url must use the \"${dn}\" media type`);let a=r[2],o=i.findIndex((l)=\u003el.toLowerCase()===\"base64\"),c=o!==-1;if(c\u0026\u0026o!==i.length-1)throw Error(`${e}: asset.url must place \"base64\" as its final metadata token`);if(c){let l=a.replace(/\\s+/g,\"\");if(!/^(?:[a-z\\d+/]{4})*(?:[a-z\\d+/]{2}==|[a-z\\d+/]{3}=)?$/i.test(l))throw Error(`${e}: asset.url is not a valid SVG data URL`);return}if(a.includes(\"#\"))throw Error(`${e}: asset.url must percent-encode \"#\" in a non-base64 SVG data URL`);try{decodeURIComponent(a)}catch(l){throw Error(`${e}: asset.url is not a valid SVG data URL`,{cause:l})}}function qb(t){let e=new TextEncoder().encode(t),r=\"\",i=32768;for(let n=0;n\u003ce.length;n+=i)r+=String.fromCharCode(...e.subarray(n,n+i));return`data:${dn};base64,${btoa(r)}`}function x1(t){return(t.split(\";\",1)[0]??\"\").trim().toLowerCase()}var $t=(t)=\u003eMath.abs(t.a)*0.02,om=({text:t,realCenter:e,realToScreenTransform:r})=\u003e{let i=P(r,e);return{type:\"element\",name:\"text\",value:\"\",attributes:{x:i.x.toString(),y:i.y.toString(),fill:\"red\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${se(r,\"error\")}px`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}},jP=({schNetLabel:t,realToScreenTransform:e,colorMap:r})=\u003e{if(!t.text)return[];let i=t.text.startsWith(\"N_\"),n=i?t.text.slice(2):t.text,a=u1(t),o=[],c=ur[t.symbol_name];if(!c){let Z=om({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return Z.attributes={...Z.attributes,...a},o.push(Z),o}let l=c.primitives.filter((Z)=\u003eZ.type===\"path\"),s=c.primitives.filter((Z)=\u003eZ.type===\"text\"),p=c.primitives.filter((Z)=\u003eZ.type===\"circle\"),d=c.primitives.filter((Z)=\u003eZ.type===\"box\"),m={minX:Math.min(...l.flatMap((Z)=\u003eZ.points.map((N)=\u003eN.x))),maxX:Math.max(...l.flatMap((Z)=\u003eZ.points.map((N)=\u003eN.x))),minY:Math.min(...l.flatMap((Z)=\u003eZ.points.map((N)=\u003eN.y))),maxY:Math.max(...l.flatMap((Z)=\u003eZ.points.map((N)=\u003eN.y)))},u=He(\"net_label\"),f=Ls({...t,text:n})+Qe*2+_i*n.length+fi,_=gi(t.anchor_side),x=t.anchor_position??{x:t.center.x-_.x*f*u/2,y:t.center.y-_.y*f*u/2},b=ye(0/180*Math.PI),M={minX:Math.min(...c.primitives.flatMap((Z)=\u003eZ.type===\"path\"?Z.points.map((N)=\u003eN.x):[])),maxX:Math.max(...c.primitives.flatMap((Z)=\u003eZ.type===\"path\"?Z.points.map((N)=\u003eN.x):[])),minY:Math.min(...c.primitives.flatMap((Z)=\u003eZ.type===\"path\"?Z.points.map((N)=\u003eN.y):[])),maxY:Math.max(...c.primitives.flatMap((Z)=\u003eZ.type===\"path\"?Z.points.map((N)=\u003eN.y):[]))},O=c.ports?.[0]?{x:c.ports[0].x,y:c.ports[0].y}:{x:M.minX,y:(M.minY+M.maxY)/2},X=P(b,O),E=Ft(Lt(x.x-X.x,x.y-X.y),b,Jt(1)),[I,U]=P(Ft(e,E),[m.minX,m.minY]),[q,ct]=P(Ft(e,E),[m.maxX,m.maxY]),Q=Math.abs(ct-U),k=Math.min(U,ct),st=Math.abs(q-I),ot=Math.min(I,q);o.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay sch-net-label-overlay\",...a,x:ot.toString(),y:k.toString(),width:st.toString(),height:Q.toString(),fill:\"transparent\"},children:[]});for(let Z of l){let N=Z.points.map((tt,J)=\u003e{let[W,j]=P(Ft(e,E),[tt.x,tt.y]);return`${J===0?\"M\":\"L\"} ${W} ${j}`}).join(\" \");o.push({name:\"path\",type:\"element\",attributes:{class:\"sch-net-label-symbol-path\",...a,d:N+(Z.closed?\" Z\":\"\"),stroke:r.schematic.component_outline,fill:\"none\",\"stroke-width\":`${$t(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(let Z of s){let N=P(Ft(e,E),Z),tt=Z.text;if(tt===\"{REF}\")tt=n||\"\";else if(tt===\"{VAL}\")tt=\"\";let W=Math.abs(e.a)*0.1,j={x:N.x,y:N.y};o.push({name:\"text\",type:\"element\",attributes:{class:\"sch-net-label-symbol-text\",...a,x:j.x.toString(),y:j.y.toString(),fill:r.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":AP[Z.anchor],\"dominant-baseline\":Jb[Z.anchor],\"font-size\":`${se(e,\"reference_designator\")}px`,...i\u0026\u0026tt===n?{style:\"text-decoration: overline;\"}:{}},children:am(tt,Z.text===\"{REF}\"?t.display_superscript:void 0,se(e,\"reference_designator\"),Jb[Z.anchor]),value:\"\"})}for(let Z of d){let N=P(Ft(e,E),Z),tt=Ft(e,E).a;o.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-net-label-symbol-box\",...a,x:N.x.toString(),y:N.y.toString(),width:(Z.width*tt).toString(),height:(Z.height*tt).toString(),fill:\"red\"},value:\"\",children:[]})}for(let Z of p){let N=P(Ft(e,E),Z),tt=Ft(e,E).a;o.push({name:\"circle\",type:\"element\",attributes:{class:\"sch-net-label-symbol-circle\",...a,cx:N.x.toString(),cy:N.y.toString(),r:(Z.radius*tt).toString(),fill:\"none\",stroke:r.schematic.component_outline,\"stroke-width\":`${$t(e)}px`},value:\"\",children:[]})}return o},$P=({schNetLabel:t,realToScreenTransform:e,colorMap:r})=\u003e{if(!t.text)return[];let i=t.text;if(t.symbol_name)return jP({schNetLabel:t,realToScreenTransform:e,colorMap:r});let n=u1(t),a=[],o=se(e,\"net_label\"),c=He(\"net_label\"),l=m1/c/2,s=Ls({...t,text:i}),p=P(e,t.center),d=gi(t.anchor_side),m={...d};m.y*=-1;let u=s+Qe*2+_i*i.length+fi,y=t.anchor_position?P(e,t.anchor_position):{x:p.x-m.x*u*o/2,y:p.y-m.y*u*o/2},f=t.anchor_position??{x:t.center.x-d.x*u*c/2,y:t.center.y-d.y*u*c/2},_={left:0,top:-90,bottom:90,right:180}[t.anchor_side],x=[{x:0,y:0},{x:Qe,y:l},{x:Qe*2+fi+_i*i.length+s,y:l},{x:Qe*2+fi+_i*i.length+s,y:-l},{x:Qe,y:-l}].map((X)=\u003eP(Ft(e,Lt(f.x,f.y),Jt(c),ye(_/180*Math.PI)),X)),Y=`\n M ${x[0].x},${x[0].y}\n L ${x[1].x},${x[1].y}\n L ${x[2].x},${x[2].y}\n L ${x[3].x},${x[3].y}\n L ${x[4].x},${x[4].y}\n Z\n `;a.push({name:\"path\",type:\"element\",attributes:{class:\"net-label sch-net-label\",...n,d:Y,fill:r.schematic.label_background,stroke:r.schematic.label_global,\"stroke-width\":`${$t(e)}px`},value:\"\",children:[]});let b={x:y.x+m.x*o*0.5,y:y.y+m.y*o*0.5},M={left:\"start\",top:\"start\",bottom:\"start\",right:\"end\"}[t.anchor_side],O={left:\"\",right:\"\",top:`rotate(90 ${b.x} ${b.y})`,bottom:`rotate(-90 ${b.x} ${b.y})`}[t.anchor_side];return a.push({name:\"text\",type:\"element\",attributes:{class:\"net-label-text sch-net-label-text\",...n,x:b.x.toString(),y:b.y.toString(),fill:r.schematic.label_global,\"text-anchor\":M,\"dominant-baseline\":\"central\",\"font-family\":\"sans-serif\",\"font-variant-numeric\":\"tabular-nums\",\"font-size\":`${o}px`,transform:O},children:am(i,t.display_superscript,o),value:\"\"}),a},XP=0.02,VP=({schPort:t,transform:e})=\u003e{let r=P(e,t.center),i=Math.abs(e.a)*XP*2;return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-port-hover sch-port-hover\",\"data-schematic-port-id\":t.source_port_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"circle\",type:\"element\",value:\"\",attributes:{cx:r.x.toString(),cy:r.y.toString(),r:i.toString(),fill:\"red\",opacity:\"0\"},children:[]}]}]},zP=({component:t,transform:e,circuitJson:r})=\u003e{let i=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id}),n=[];for(let a of i)n.push(...VP({schPort:a,transform:e}));return n},DP=({schPort:t,transform:e,colorMap:r})=\u003e{let{x:n,y:a}=t.center,o=[-1,1].map((c)=\u003e{let l=P(e,{x:n-0.05,y:a-c*0.05}),s=P(e,{x:n+0.05,y:a+c*0.05});return`M ${l.x} ${l.y} L ${s.x} ${s.y}`}).join(\" \");return{name:\"path\",type:\"element\",value:\"\",attributes:{class:\"sch-port-no-connect\",\"data-schematic-port-id\":t.schematic_port_id,\"data-source-port-id\":t.source_port_id,d:o,fill:\"none\",stroke:r.schematic.no_connect,\"stroke-width\":`${$t(e)}px`,\"stroke-linecap\":\"round\"},children:[]}},t1=0.02,UP=({schPort:t,transform:e,circuitJson:r,colorMap:i})=\u003e{let n=[],a=Math.abs(e.a)*t1,o=Math.abs(e.a)*t1,c=P(e,t.center),l=r.find((p)=\u003ep.type===\"source_port\"\u0026\u0026p.source_port_id===t.source_port_id);if(!l?.do_not_connect)n.push({name:\"circle\",type:\"element\",value:\"\",attributes:{class:\"component-pin sch-component-pin sch-port-indicator\",cx:c.x.toString(),cy:c.y.toString(),r:a.toString(),fill:\"none\",stroke:i.schematic.component_outline,\"stroke-width\":o.toString(),\"data-schematic-port-id\":t.schematic_port_id},children:[]});let s=t.display_pin_label??l?.name;if(s){let p={...t.center},d=t.distance_from_component_edge??0,m=0.05,u=\"middle\",y=\"\";switch(t.facing_direction){case\"left\":p.x+=d/2,p.y+=0.05,u=\"start\";break;case\"right\":p.x-=d/2,p.y+=0.05,u=\"end\";break;case\"up\":p.y-=d/2,p.x-=0.05,u=\"middle\";break;case\"down\":p.y+=d/2,p.x-=0.05,u=\"middle\";break}let f=P(e,p),_=se(e,\"pin_number\");if(t.facing_direction===\"up\"||t.facing_direction===\"down\")y=`rotate(-90 ${f.x} ${f.y})`;n.push({name:\"text\",type:\"element\",value:\"\",attributes:{class:\"port-indicator-label sch-port-label\",x:f.x.toString(),y:f.y.toString(),fill:i.schematic.component_outline,\"font-family\":\"sans-serif\",\"font-size\":`${_*0.7}px`,\"text-anchor\":u,\"dominant-baseline\":\"middle\",...y\u0026\u0026{transform:y}},children:[{type:\"text\",value:s,name:\"\",attributes:{},children:[]}]})}return n},b1=(t)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:t.is_overlined?{\"text-decoration\":\"overline\"}:{},children:[{type:\"text\",name:\"\",value:t.text,attributes:{},children:[]}]}),GP=(t)=\u003et.filter((e)=\u003ee.text).map(b1),QP=(t)=\u003e{let e=[[]];for(let r of t)r.text.split(`\n`).forEach((i,n)=\u003e{if(n\u003e0)e.push([]);if(i)e.at(-1).push(b1({...r,text:i}))});return e},cm=({elm:t,transform:e,colorMap:r})=\u003e{let i=P(e,t.position),n={center:\"middle\",center_right:\"end\",bottom_left:\"start\",bottom_center:\"middle\",bottom_right:\"end\",left:\"start\",right:\"end\",top:\"middle\",bottom:\"middle\",top_left:\"start\",top_center:\"middle\",top_right:\"end\",center_left:\"start\"},a={center:\"middle\",center_right:\"middle\",bottom_left:\"ideographic\",bottom_center:\"ideographic\",bottom_right:\"ideographic\",left:\"middle\",right:\"middle\",top:\"hanging\",bottom:\"ideographic\",top_left:\"hanging\",top_center:\"hanging\",top_right:\"hanging\",center_left:\"middle\"},o=t.text.split(`\n`),c=QP(t.text_parts??[]),l=o.length===1?t.text_parts?.length?c[0]:[{type:\"text\",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:o.map((s,p)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:i.x.toString(),...p\u003e0?{dy:\"1em\"}:{}},children:t.text_parts?.length?c[p]??[]:[{type:\"text\",value:s,name:p===0?t.schematic_text_id:\"\",attributes:{},children:[]}]}));if(t.display_superscript)(o.length===1?l:l[l.length-1].children).push(...am(\"\",t.display_superscript,se(e,\"reference_designator\",t.font_size),a[t.anchor]).slice(1));return{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",x:i.x.toString(),y:i.y.toString(),fill:t.color??r.schematic.sheet_label,\"text-anchor\":n[t.anchor],\"dominant-baseline\":a[t.anchor],\"font-family\":\"sans-serif\",\"font-size\":`${se(e,\"reference_designator\",t.font_size)}px`,transform:`rotate(${t.rotation}, ${i.x}, ${i.y})`},children:l}};function v1({schArc:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.radius,a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=t.start_angle_degrees*Math.PI/180,l=t.end_angle_degrees*Math.PI/180,s=i.x+n*Math.cos(c),p=i.y+n*Math.sin(c),d=i.x+n*Math.cos(l),m=i.y+n*Math.sin(l),u=t.end_angle_degrees-t.start_angle_degrees;if(t.direction===\"clockwise\")u=-u;if(u\u003c0)u+=360;let y=u\u003e180?1:0,f=t.direction===\"clockwise\"?1:0;return[{name:\"path\",type:\"element\",attributes:{class:\"sch-arc\",d:`M ${s} ${p} A ${n} ${n} 0 ${y} ${f} ${d} ${m}`,fill:\"none\",stroke:t.color,\"stroke-width\":o.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(o*3).toString()},\"data-schematic-arc-id\":t.schematic_arc_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var HP=({schematicBox:t,transform:e,colorMap:r})=\u003e{let i=P(e,{x:t.x,y:t.y}),n=P(e,{x:t.x+t.width,y:t.y+t.height}),a=Math.min(i.y,n.y),o=Math.max(i.y,n.y),c=Math.min(i.x,n.x),l=Math.max(i.x,n.x),s=$t(e),p={class:\"schematic-box sch-box\",x:c.toString(),y:a.toString(),width:(l-c).toString(),height:(o-a).toString(),\"stroke-width\":`${s}px`,stroke:r.schematic.component_outline||\"black\",fill:\"transparent\"};if(t.is_dashed){let d=8*s,m=4*s;p[\"stroke-dasharray\"]=`${d} ${m}`}return[{name:\"rect\",type:\"element\",value:\"\",attributes:p,children:[]}]};function S1({schCircle:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.radius,a=t.stroke_width??0.02,o=Math.abs(e.a)*a;return[{name:\"circle\",type:\"element\",attributes:{class:\"sch-circle\",cx:i.x.toString(),cy:i.y.toString(),r:n.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":o.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(o*3).toString()},\"data-schematic-circle-id\":t.schematic_circle_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var w1=(t,e)=\u003e{for(let r of t){if(r.type!==\"source_trace\")continue;let i=r;if(Array.isArray(i.connected_source_port_ids)\u0026\u0026i.connected_source_port_ids.includes(e))return!0}return!1},ZP={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},KP={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"},JP=({component:t,transform:e,circuitJson:r,colorMap:i})=\u003e{let n=[],a=ur[t.symbol_name];if(!a)return[om({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];let o=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id}),c=Gt(r).source_component.get(t.source_component_id),l=y1({schPorts:o,symbol:a,schComponent:t});if(!l[0])return[om({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];let s=f1(l[1]?.symbolPort??a.center,l[1]?.schPort.center??t.center,l[0].symbolPort,l[0].schPort.center),p=a.primitives.filter((I)=\u003eI.type===\"path\"),d=a.primitives.filter((I)=\u003eI.type===\"text\"),m=a.primitives.filter((I)=\u003eI.type===\"circle\"),u=a.primitives.filter((I)=\u003eI.type===\"box\"),y=new Set;for(let I of l)if(w1(r,I.schPort.source_port_id)||Gt(r).source_port.get(I.schPort.source_port_id)?.do_not_connect)y.add(I.symbolPort);let f={minX:Math.min(...p.flatMap((I)=\u003eI.points.map((U)=\u003eU.x))),maxX:Math.max(...p.flatMap((I)=\u003eI.points.map((U)=\u003eU.x))),minY:Math.min(...p.flatMap((I)=\u003eI.points.map((U)=\u003eU.y))),maxY:Math.max(...p.flatMap((I)=\u003eI.points.map((U)=\u003eU.y)))},[_,x]=P(Ft(e,s),[f.minX,f.minY]),[Y,b]=P(Ft(e,s),[f.maxX,f.maxY]),M=Math.abs(b-x),O=Math.min(x,b),X=Math.abs(Y-_),E=Math.min(_,Y);n.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:E.toString(),y:O.toString(),width:X.toString(),height:M.toString(),fill:\"transparent\"},children:[]});for(let I of p){let{points:U,color:q,closed:ct,fill:Q}=I;n.push({type:\"element\",name:\"path\",attributes:{class:\"sch-component-symbol-path\",d:U.map((k,st)=\u003e{let[ot,Z]=P(Ft(e,s),[k.x,k.y]);return`${st===0?\"M\":\"L\"} ${ot} ${Z}`}).join(\" \")+(ct?\" Z\":\"\"),stroke:i.schematic.component_outline,fill:\"none\",\"stroke-width\":`${$t(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(let I of d){let U=P(Ft(e,s),I),q=\"\",ct=I.text===\"{REF}\";if(ct)q=c?.display_name??c?.name??\"\";else if(I.text===\"{VAL}\")q=t.symbol_display_value??\"\";let Q=KP[I.anchor];n.push({name:\"text\",type:\"element\",attributes:{class:ct?\"sch-component-name sch-component-text\":\"sch-component-text\",x:U.x.toString(),y:U.y.toString(),...ct?{stroke:i.schematic.background,\"stroke-width\":`${$t(e)}px`,\"paint-order\":\"stroke\"}:{},fill:i.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":ZP[I.anchor],\"dominant-baseline\":Q,\"font-size\":`${se(e,\"reference_designator\")}px`},value:\"\",children:[{type:\"text\",value:q,name:\"\",attributes:{},children:[]}]})}for(let I of u){let U=P(Ft(e,s),I),q=Ft(e,s).a;n.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-component-symbol-box\",x:U.x.toString(),y:U.y.toString(),width:(I.width*q).toString(),height:(I.height*q).toString(),fill:\"red\"},value:\"\",children:[]})}for(let I of a.ports){if(y.has(I))continue;let U=P(Ft(e,s),I);n.push({type:\"element\",name:\"circle\",attributes:{class:\"component-pin sch-component-pin\",cx:U.x.toString(),cy:U.y.toString(),r:`${Math.abs(e.a)*0.02}px`,\"stroke-width\":`${$t(e)}px`,fill:\"none\",stroke:i.schematic.component_outline},value:\"\",children:[]})}for(let I of m){let U=P(Ft(e,s),I),q=Math.abs(I.radius*e.a);n.push({type:\"element\",name:\"circle\",attributes:{class:\"sch-component-symbol-circle\",cx:U.x.toString(),cy:U.y.toString(),r:`${q}px`,\"stroke-width\":`${$t(e)}px`,fill:\"none\",stroke:i.schematic.component_outline},value:\"\",children:[]})}return n},sn=0.02,e1=(t,e,r,i,n)=\u003e{let a=Math.PI/6,o={x:t.x-r*Math.cos(e-a),y:t.y-r*Math.sin(e-a)},c={x:t.x-r*Math.cos(e+a),y:t.y-r*Math.sin(e+a)};return{name:\"polygon\",type:\"element\",attributes:{points:`${t.x},${t.y} ${o.x},${o.y} ${c.x},${c.y}`,fill:\"white\",stroke:i,\"stroke-width\":`${n}px`},value:\"\",children:[]}},qP=({schPort:t,schComponent:e,transform:r,circuitJson:i})=\u003e{let n=[],a=Gt(i).source_port.get(t.source_port_id),o={x:t.center.x,y:t.center.y},c=t.distance_from_component_edge??0.4;switch(t.side_of_component){case\"left\":o.x+=c;break;case\"right\":o.x-=c;break;case\"top\":o.y-=c;break;case\"bottom\":o.y+=c;break}let l=P(r,t.center),s=P(r,o),p=a!=null\u0026\u0026a.source_component_id==null\u0026\u0026typeof t.is_connected===\"boolean\"?t.is_connected:w1(i,t.source_port_id),d=t.is_drawn_with_inversion_circle??!1,m=0.06,u={...t.center};if(!p\u0026\u0026!a?.do_not_connect)switch(t.side_of_component){case\"left\":u.x+=sn;break;case\"right\":u.x-=sn;break;case\"top\":u.y-=sn;break;case\"bottom\":u.y+=sn;break}let y=P(r,u);if(d){let b=Math.abs(r.a)*m,M={...s};switch(t.side_of_component){case\"left\":M.x-=b,s.x-=b*2;break;case\"right\":M.x+=b,s.x+=b*2;break;case\"top\":M.y-=b,s.y-=b*2;break;case\"bottom\":M.y+=b,s.y+=b*2;break}n.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-inversion-bubble\",cx:M.x.toString(),cy:M.y.toString(),r:b.toString(),fill:\"white\",stroke:Zt.schematic.component_outline,\"stroke-width\":`${$t(r)}px`},value:\"\",children:[]})}n.push({name:\"line\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-line\",x1:s.x.toString(),y1:s.y.toString(),x2:y.x.toString(),y2:y.y.toString(),\"stroke-width\":`${$t(r)}px`},value:\"\",children:[]});let f=Math.abs(r.a)*sn,_=[];if(!p\u0026\u0026!a?.do_not_connect)_.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-terminal\",cx:l.x.toString(),cy:l.y.toString(),r:f.toString(),\"stroke-width\":`${$t(r)}px`},value:\"\",children:[]});_.push({name:\"rect\",type:\"element\",attributes:{x:(l.x-f).toString(),y:(l.y-f).toString(),width:(f*2).toString(),height:(f*2).toString(),opacity:\"0\"},value:\"\",children:[]}),n.push({name:\"g\",type:\"element\",value:\"\",attributes:{class:\"sch-port\",\"data-schematic-port-id\":t.source_port_id},children:_});let{has_input_arrow:x,has_output_arrow:Y}=t;if((x||Y)\u0026\u0026t.side_of_component){let b=Math.abs(r.a)*0.1,M=Zt.schematic.component_outline,O=b*Math.cos(Math.PI/6),X=$t(r)/3,E=0,I=0;if(t.side_of_component===\"left\")E=0,I=Math.PI;else if(t.side_of_component===\"right\")E=Math.PI,I=0;else if(t.side_of_component===\"top\")E=Math.PI/2,I=-Math.PI/2;else if(t.side_of_component===\"bottom\")E=-Math.PI/2,I=Math.PI/2;let U=x\u0026\u0026Y,q={...s},ct={...s};if(U){let Q=O;if(t.side_of_component===\"left\")ct.x-=Q;else if(t.side_of_component===\"right\")ct.x+=Q;else if(t.side_of_component===\"top\")ct.y-=Q;else if(t.side_of_component===\"bottom\")ct.y+=Q}if(x)n.push(e1(q,E,b,M,X));if(Y){let Q={x:ct.x+b*Math.cos(I),y:ct.y+b*Math.sin(I)};n.push(e1(Q,I,b,M,X))}}return n},tI=(t)=\u003e{let e=[],{schPort:r,schComponent:i,transform:n,circuitJson:a}=t,o={x:r.center.x,y:r.center.y};if(!r.side_of_component)return[];let c=gi(r.side_of_component),l=r.distance_from_component_edge??0.4;if(o.x+=c.x*l/2,o.y+=c.y*l/2,r.side_of_component===\"top\"||r.side_of_component===\"bottom\")o.x-=0.02;else o.y+=0.02;let s=P(n,o);return e.push({name:\"text\",type:\"element\",attributes:{class:\"pin-number sch-pin-number\",x:s.x.toString(),y:s.y.toString(),style:\"font-family: sans-serif;\",fill:Zt.schematic.pin_number,\"text-anchor\":\"middle\",\"dominant-baseline\":\"auto\",\"font-size\":`${se(n,\"pin_number\")}px`,transform:r.side_of_component===\"top\"||r.side_of_component===\"bottom\"?`rotate(-90 ${s.x} ${s.y})`:\"\"},children:[{type:\"text\",value:r.pin_number?.toString()||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},r1=0.1,A1=(t)=\u003e{let e=[],{schPort:r,schComponent:i,transform:n,labelColor:a=Zt.schematic.pin_number,labelClassName:o=\"pin-number sch-pin-label\"}=t,c={x:r.center.x,y:r.center.y};if(!r.side_of_component)return[];let l=gi(r.side_of_component),s=r.distance_from_component_edge??0.4;c.x+=l.x*(s+r1),c.y+=l.y*(s+r1);let p=P(n,c),d=r.display_pin_label??i.port_labels?.[`${r.pin_number}`];if(!d)return[];let m=d.startsWith(\"N_\"),u=m?d.slice(2):d,y=r.display_pin_label_text_parts,f=r.is_drawn_with_inversion_circle??!1,_=se(n,m||f?\"negated_pin_number\":\"pin_number\",r.display_pin_label_font_size);return e.push({name:\"text\",type:\"element\",attributes:{class:o,x:p.x.toString(),y:p.y.toString(),style:`font-family: sans-serif;${m\u0026\u0026!y?.length?\" text-decoration: overline;\":\"\"}`,fill:a,\"text-anchor\":r.side_of_component===\"left\"||r.side_of_component===\"bottom\"?\"start\":\"end\",\"dominant-baseline\":\"middle\",\"font-size\":`${_}px`,transform:r.side_of_component===\"top\"||r.side_of_component===\"bottom\"?`rotate(-90 ${p.x} ${p.y})`:\"\"},children:y?.length?GP(y):[{type:\"text\",value:u||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},eI=(t)=\u003e{let e=[],{schPort:r,schComponent:i,transform:n,circuitJson:a}=t;return e.push(...qP(t)),e.push(...tI(t)),e.push(...A1(t)),e},rI=({component:t,transform:e,circuitJson:r,colorMap:i})=\u003e{let n=[],a=P(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=P(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),c=o.x-a.x,l=o.y-a.y;n.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component chip sch-component-body\",x:a.x.toString(),y:a.y.toString(),width:c.toString(),height:l.toString(),\"stroke-width\":`${$t(e)}px`,fill:i.schematic.component_body,stroke:i.schematic.component_outline},children:[]}),n.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:a.x.toString(),y:a.y.toString(),width:c.toString(),height:l.toString(),fill:\"transparent\"},children:[]});let s=Gt(r).schematic_text.list();for(let d of s)if(d.schematic_component_id===t.schematic_component_id)n.push(cm({elm:d,transform:e,colorMap:i}));let p=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id});for(let d of p)n.push(...eI({schPort:d,schComponent:t,transform:e,circuitJson:r}));return n};function B1({isDashed:t,dashLength:e,dashGap:r,strokeWidth:i,transform:n}){if(!t)return;let a=Math.abs(n.a),o=i*a*3,c=e!==void 0?e*a:o,l=r!==void 0?r*a:o;return`${c} ${l}`}function F1({schLine:t,transform:e,colorMap:r}){let i=P(e,{x:t.x1,y:t.y1}),n=P(e,{x:t.x2,y:t.y2}),a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=B1({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:a,transform:e});return[{name:\"line\",type:\"element\",attributes:{class:\"sch-line\",x1:i.x.toString(),y1:i.y.toString(),x2:n.x.toString(),y2:n.y.toString(),stroke:t.color,\"stroke-width\":o.toString(),...c\u0026\u0026{\"stroke-dasharray\":c},\"data-schematic-line-id\":t.schematic_line_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function P1({schRect:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.width,a=Math.abs(e.d)*t.height,o=t.stroke_width??0.02,c=Math.abs(e.a)*o,l=i.x-n/2,s=i.y-a/2;return[{name:\"rect\",type:\"element\",attributes:{class:\"sch-rect\",x:l.toString(),y:s.toString(),width:n.toString(),height:a.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":c.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(c*3).toString()},...t.rotation!==0\u0026\u0026{transform:`rotate(${t.rotation} ${i.x} ${i.y})`},\"data-schematic-rect-id\":t.schematic_rect_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function I1({schPath:t,transform:e,colorMap:r}){let i=t.stroke_color??r.schematic.component_outline,n=t.fill_color??\"none\",a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=B1({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:a,transform:e});if(!t.points||t.points.length\u003c2)return[];return[{name:\"path\",type:\"element\",attributes:{class:\"sch-path\",d:t.points.map((p)=\u003eP(e,{x:p.x,y:p.y})).map((p,d)=\u003e`${d===0?\"M\":\"L\"} ${p.x} ${p.y}`).join(\" \"),stroke:i,\"stroke-width\":o.toString(),fill:t.is_filled?n:\"none\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",...c\u0026\u0026{\"stroke-dasharray\":c},...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var iI=({component:t,transform:e,circuitJson:r,colorMap:i})=\u003e{let n=[],a=t.schematic_component_id;for(let o of r){if(!(\"schematic_component_id\"in o)||o.schematic_component_id!==a)continue;if(o.type===\"schematic_text\"\u0026\u0026t.is_box_with_pins===!1)n.push(cm({elm:o,transform:e,colorMap:i}));else if(o.type===\"schematic_line\")n.push(...F1({schLine:o,transform:e,colorMap:i}));else if(o.type===\"schematic_circle\")n.push(...S1({schCircle:o,transform:e,colorMap:i}));else if(o.type===\"schematic_rect\")n.push(...P1({schRect:o,transform:e,colorMap:i}));else if(o.type===\"schematic_arc\")n.push(...v1({schArc:o,transform:e,colorMap:i}));else if(o.type===\"schematic_path\")n.push(...I1({schPath:o,transform:e,colorMap:i}))}if(t.is_box_with_pins===!1){let o=r.filter((l)=\u003el.type===\"schematic_line\"\u0026\u0026l.schematic_component_id===a),c=r.filter((l)=\u003el.type===\"schematic_port\"\u0026\u0026l.schematic_component_id===a);for(let l of c){let s=o.find((f)=\u003ef.x1===l.center.x\u0026\u0026f.y1===l.center.y||f.x2===l.center.x\u0026\u0026f.y2===l.center.y);if(!s)continue;let p=s.x1===l.center.x\u0026\u0026s.y1===l.center.y?{x:s.x2,y:s.y2}:{x:s.x1,y:s.y1},d=p.x-l.center.x,m=p.y-l.center.y,u=Math.abs(d)\u003eMath.abs(m)?d\u003e0?\"left\":\"right\":m\u003e0?\"bottom\":\"top\",y=Math.max(Math.abs(d),Math.abs(m));n.push(...A1({schPort:{...l,side_of_component:u,distance_from_component_edge:y},schComponent:t,transform:e,circuitJson:r,labelClassName:\"port-label sch-pin-label\",labelColor:i.schematic.pin_name}))}}return n};function nI(t){let{component:e}=t,r=[];if(e.is_box_with_pins!==!1)if(e.symbol_name)r=JP(t);else r=rI(t);let i=iI(t),n=[...r,...i];return[{type:\"element\",name:\"g\",attributes:{class:\"sch-component\",\"data-circuit-json-type\":\"schematic_component\",\"data-schematic-component-id\":e.schematic_component_id,...e.schematic_sheet_id?{\"data-schematic-sheet-id\":e.schematic_sheet_id}:{}},children:n,value:\"\"}]}function oI({debugObject:t,transform:e}){if(t.shape===\"rect\"){let[r,i]=P(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[n,a]=P(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[i,a]=[Math.min(i,a),Math.max(i,a)];let o=Math.abs(n-r),c=Math.abs(a-i),[l,s]=P(e,[t.center.x,t.center.y]);return[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:r.toString(),y:i.toString(),width:o.toString(),height:c.toString(),fill:\"none\",stroke:\"red\",\"stroke-width\":(0.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:l.toString(),y:(s-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(0.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}if(t.shape===\"line\"){let[r,i]=P(e,[t.start.x,t.start.y]),[n,a]=P(e,[t.end.x,t.end.y]),o=(r+n)/2,c=(i+a)/2;return[{name:\"line\",type:\"element\",value:\"\",attributes:{x1:r.toString(),y1:i.toString(),x2:n.toString(),y2:a.toString(),stroke:\"red\",\"stroke-width\":(0.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:o.toString(),y:(c-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(0.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}return[]}var M1=0.2/Ze,aI=3/Ze,Is=[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],cn=[\"A\",\"B\",\"C\",\"D\"];function sI({schematicSheet:t,transform:e,colorMap:r}){let i=sm(t),n=r.schematic.sheet,a=r.schematic.net_name,o=[i1({id:`${t.schematic_sheet_id}_outer`,center:i.center,width:i.width,height:i.height,transform:e,color:n}),i1({id:`${t.schematic_sheet_id}_inner`,center:i.center,width:i.innerMaxX-i.innerMinX,height:i.innerMaxY-i.innerMinY,transform:e,color:n})];for(let c=1;c\u003cIs.length;c++){let l=i.innerMinX+(i.innerMaxX-i.innerMinX)*c/Is.length;o.push(Ms({id:`${t.schematic_sheet_id}_top_column_${c}`,x1:l,y1:i.maxY,x2:l,y2:i.innerMaxY,transform:e,color:n}),Ms({id:`${t.schematic_sheet_id}_bottom_column_${c}`,x1:l,y1:i.minY,x2:l,y2:i.innerMinY,transform:e,color:n}))}for(let c=1;c\u003ccn.length;c++){let l=i.innerMinY+(i.innerMaxY-i.innerMinY)*c/cn.length;o.push(Ms({id:`${t.schematic_sheet_id}_left_row_${c}`,x1:i.minX,y1:l,x2:i.innerMinX,y2:l,transform:e,color:n}),Ms({id:`${t.schematic_sheet_id}_right_row_${c}`,x1:i.maxX,y1:l,x2:i.innerMaxX,y2:l,transform:e,color:n}))}return Is.forEach((c,l)=\u003e{let s=i.innerMinX+(i.innerMaxX-i.innerMinX)*(l+0.5)/Is.length;o.push(ks({text:c,x:s,y:(i.maxY+i.innerMaxY)/2,transform:e,color:a}),ks({text:c,x:s,y:(i.minY+i.innerMinY)/2,transform:e,color:a}))}),cn.forEach((c,l)=\u003e{let s=i.innerMinY+(i.innerMaxY-i.innerMinY)*(cn.length-l-0.5)/cn.length;o.push(ks({text:c,x:(i.minX+i.innerMinX)/2,y:s,transform:e,color:a}),ks({text:c,x:(i.maxX+i.innerMaxX)/2,y:s,transform:e,color:a}))}),[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-sheet\",\"data-circuit-json-type\":\"schematic_sheet\",\"data-schematic-sheet-id\":t.schematic_sheet_id},children:o}]}function i1({id:t,center:e,width:r,height:i,transform:n,color:a}){let o=P(n,e),c=Math.abs(n.a)*r,l=Math.abs(n.d)*i;return{name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"sch-rect\",x:(o.x-c/2).toString(),y:(o.y-l/2).toString(),width:c.toString(),height:l.toString(),fill:\"none\",stroke:a,\"stroke-width\":(Math.abs(n.a)*M1).toString(),\"data-schematic-rect-id\":t},children:[]}}function Ms({id:t,x1:e,y1:r,x2:i,y2:n,transform:a,color:o}){let c=P(a,{x:e,y:r}),l=P(a,{x:i,y:n});return{name:\"line\",type:\"element\",value:\"\",attributes:{class:\"sch-line\",x1:c.x.toString(),y1:c.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:o,\"stroke-width\":(Math.abs(a.a)*M1).toString(),\"data-schematic-line-id\":t},children:[]}}function ks({text:t,x:e,y:r,transform:i,color:n}){let a=P(i,{x:e,y:r});return{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",x:a.x.toString(),y:a.y.toString(),fill:n,\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${se(i,\"reference_designator\",aI)}px`,transform:`rotate(0, ${a.x}, ${a.y})`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}}var cI=({schematicTable:t,transform:e,colorMap:r,circuitJson:i})=\u003e{let{anchor_position:n,border_width:a=0.05,anchor:o=\"center\"}=t,{column_widths:c,row_heights:l}=g1(t,i),s=c.reduce((E,I)=\u003eE+I,0),p=l.reduce((E,I)=\u003eE+I,0),{x:d,y:m}=n;if(o.includes(\"center\"))d-=s/2;else if(o.includes(\"right\"))d-=s;if(o.includes(\"center\"))m+=p/2;else if(o.includes(\"bottom\"))m+=p;let u=[],y=a*Math.abs(e.a),f=$t(e),[_,x]=P(e,[d,m]),[Y,b]=P(e,[d+s,m-p]);u.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-table-border\",x:_.toString(),y:x.toString(),width:(Y-_).toString(),height:(b-x).toString(),fill:\"none\",stroke:r.schematic.table,\"stroke-width\":y.toString()},children:[],value:\"\"});let M=i.filter((E)=\u003eE.type===\"schematic_table_cell\"\u0026\u0026E.schematic_table_id===t.schematic_table_id),O=d;for(let E=0;E\u003cc.length-1;E++){O+=c[E];let I=m;for(let U=0;U\u003cl.length;U++){let q=I-l[U];if(!M.some((Q)=\u003eQ.start_column_index\u003c=E\u0026\u0026Q.end_column_index\u003eE\u0026\u0026Q.start_row_index\u003c=U\u0026\u0026Q.end_row_index\u003e=U)){let Q=P(e,{x:O,y:I}),k=P(e,{x:O,y:q});u.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:Q.x.toString(),y1:Q.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:r.schematic.table,\"stroke-width\":f.toString()},children:[],value:\"\"})}I=q}}let X=m;for(let E=0;E\u003cl.length-1;E++){X-=l[E];let I=d;for(let U=0;U\u003cc.length;U++){let q=I+c[U];if(!M.some((Q)=\u003eQ.start_row_index\u003c=E\u0026\u0026Q.end_row_index\u003eE\u0026\u0026Q.start_column_index\u003c=U\u0026\u0026Q.end_column_index\u003e=U)){let Q=P(e,{x:I,y:X}),k=P(e,{x:q,y:X});u.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:Q.x.toString(),y1:Q.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:r.schematic.table,\"stroke-width\":f.toString()},children:[],value:\"\"})}I=q}}for(let E of M)if(E.text){let I=c.slice(E.start_column_index,E.end_column_index+1).reduce((W,j)=\u003eW+j,0),U=l.slice(E.start_row_index,E.end_row_index+1).reduce((W,j)=\u003eW+j,0),q=d+c.slice(0,E.start_column_index).reduce((W,j)=\u003eW+j,0),ct=m-l.slice(0,E.start_row_index).reduce((W,j)=\u003eW+j,0),{cell_padding:Q=0.2}=t,k=E.horizontal_align??\"center\",st=E.vertical_align??\"middle\",ot={x:q+I/2,y:ct-U/2};if(k===\"left\")ot.x=q+Q;else if(k===\"right\")ot.x=q+I-Q;if(st===\"top\")ot.y=ct-Q;else if(st===\"bottom\")ot.y=ct-U+Q;let Z=P(e,ot),N=se(e,\"reference_designator\",E.font_size),tt={left:\"start\",center:\"middle\",right:\"end\"},J={top:\"hanging\",middle:\"middle\",bottom:\"ideographic\"};u.push({name:\"text\",type:\"element\",attributes:{class:\"sch-table-text\",x:Z.x.toString(),y:Z.y.toString(),\"font-size\":`${N}px`,\"text-anchor\":tt[k],\"dominant-baseline\":J[st],fill:r.schematic.table,\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:E.text,name:\"\",attributes:{},children:[]}],value:\"\"})}return[{name:\"g\",type:\"element\",attributes:{class:\"sch-table\",\"data-schematic-table-id\":t.schematic_table_id},children:u,value:\"\"}]};function lI({trace:t,transform:e,colorMap:r}){let i=t.edges;if(i.length===0)return[];let n=[],a=[],o=\"\";for(let c=0;c\u003ci.length;c++){let l=i[c];if(l.is_crossing)continue;let[s,p]=P(e,[l.from.x,l.from.y]),[d,m]=P(e,[l.to.x,l.to.y]);if(c===0||i[c-1]?.is_crossing)o+=`M ${s} ${p} L ${d} ${m}`;else o+=` L ${d} ${m}`}if(o)n.push({name:\"path\",type:\"element\",attributes:{d:o,class:\"trace-invisible-hover-outline sch-trace-hitbox\",stroke:r.schematic.wire,fill:\"none\",\"stroke-width\":`${$t(e)*8}px`,\"stroke-linecap\":\"round\",opacity:\"0\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]}),n.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-path\",d:o,stroke:r.schematic.wire,fill:\"none\",\"stroke-width\":`${$t(e)}px`,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]});for(let c of i){if(!c.is_crossing)continue;let[l,s]=P(e,[c.from.x,c.from.y]),[p,d]=P(e,[c.to.x,c.to.y]),m=(l+p)/2,u=(s+d)/2,y=p-l,f=d-s,_=Math.sqrt(y*y+f*f),x=_*0.7,Y=-f/_*x,b=y/_*x,M=m+Y,O=u-Math.abs(b);a.push({name:\"path\",type:\"element\",attributes:{class:\"trace-crossing-outline sch-trace-crossing-outline\",d:`M ${l} ${s} Q ${M} ${O} ${p} ${d}`,stroke:r.schematic.background,fill:\"none\",\"stroke-width\":`${$t(e)*1.5}px`,\"stroke-linecap\":\"butt\"},value:\"\",children:[]}),a.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-crossing-path\",d:`M ${l} ${s} Q ${M} ${O} ${p} ${d}`,stroke:r.schematic.wire,fill:\"none\",\"stroke-width\":`${$t(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}if(t.junctions)for(let c of t.junctions){let[l,s]=P(e,[c.x,c.y]);a.push({name:\"circle\",type:\"element\",attributes:{cx:l.toString(),cy:s.toString(),r:(Math.abs(e.a)*0.03).toString(),class:\"trace-junction sch-trace-junction\",fill:r.schematic.junction},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace sch-trace\",\"data-layer\":\"base\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:n},{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace-overlays sch-trace-overlays\",\"data-layer\":\"overlay\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:a}]}function pI({probe:t,transform:e,colorMap:r,fallbackColor:i}){let[n,a]=P(e,[t.position.x,t.position.y]),o=t.color??i??r.schematic.reference,c=Math.abs(e.a)*0.6,l=Math.abs(e.a)*0.28,s=t.label_alignment??\"top_right\",p,d,m,u;switch(s){case\"top_left\":p=-135*Math.PI/180,d=\"end\",m=-8,u=-8;break;case\"top_center\":p=-90*Math.PI/180,d=\"middle\",m=0,u=-8;break;case\"top_right\":p=-45*Math.PI/180,d=\"start\",m=8,u=-8;break;case\"center_left\":p=180*Math.PI/180,d=\"end\",m=-8,u=0;break;case\"center\":p=-90*Math.PI/180,d=\"middle\",m=0,u=-8;break;case\"center_right\":p=0*Math.PI/180,d=\"start\",m=8,u=0;break;case\"bottom_left\":p=135*Math.PI/180,d=\"end\",m=-8,u=8;break;case\"bottom_center\":p=90*Math.PI/180,d=\"middle\",m=0,u=8;break;case\"bottom_right\":p=45*Math.PI/180,d=\"start\",m=8,u=8;break;default:p=-50*Math.PI/180,d=\"start\",m=8,u=0}let y=n+c*Math.cos(p),f=a+c*Math.sin(p),_=n,x=a,Y=[`M ${y},${f}`,`L ${_},${x}`,`M ${_},${x}`,`L ${_-l*Math.cos((p*180/Math.PI+150)*Math.PI/180)},${x-l*Math.sin((p*180/Math.PI+150)*Math.PI/180)}`,`L ${_-l*Math.cos((p*180/Math.PI+210)*Math.PI/180)},${x-l*Math.sin((p*180/Math.PI+210)*Math.PI/180)}`,\"Z\"].join(\" \"),b=(y+m).toString(),M=(f+u).toString(),O=[];if(t.name\u0026\u0026t.voltage!==void 0)O.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:b},children:[{type:\"text\",value:t.name,name:\"\",attributes:{},children:[]}]}),O.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:b,dy:\"1.2em\"},children:[{type:\"text\",value:`${t.voltage}V`,name:\"\",attributes:{},children:[]}]});else{let X=[];if(t.name)X.push(t.name);if(t.voltage!==void 0)X.push(`${t.voltage}V`);O.push({type:\"text\",value:X.join(\" \"),name:\"\",attributes:{},children:[]})}return[{name:\"path\",type:\"element\",attributes:{class:\"sch-voltage-probe\",d:Y,stroke:o,fill:o,\"stroke-width\":`${$t(e)}px`},value:\"\",children:[]},{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-voltage-probe-label\",x:b,y:M,fill:o,\"text-anchor\":d,\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${se(e,\"reference_designator\")}px`,\"font-weight\":\"bold\",\"data-schematic-voltage-probe-id\":t.schematic_voltage_probe_id},children:O}]}var pn=6,Cs=12,Qt=12,ui=6,n1=14,Ys=11,o1=280,hI=140,k1=(t)=\u003et.type===\"schematic_component_overlap_warning\"||t.type===\"schematic_component_styling_warning\"||t.type===\"schematic_element_outside_sheet_warning\"||t.type===\"schematic_manual_edit_conflict_warning\";function dI({circuitJson:t,transform:e,svgWidth:r,svgHeight:i,colorMap:n}){let a=n.schematic.erc_warning,o=[];return t.filter(k1).flatMap((c)=\u003e{let l=mI(c,t,e);if(!l)return[];let s=Math.max(1,r-Qt*2),p=bI(c.message,Math.max(12,Math.floor((Math.min(o1,s)-ui*2)/(Ys*0.56)))),d=Math.max(...p.map((b)=\u003eb.length)),m=Math.min(o1,s,Math.max(Math.min(hI,s),d*Ys*0.56+ui*2)),u=ui*2+p.length*n1,y=_I({targetBounds:l,calloutWidth:m,calloutHeight:u,svgWidth:r,svgHeight:i,occupiedCalloutBounds:o});o.push(y);let f=xI(c),_=Es(l,pn),x=gI(y,_);return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-warning\",\"data-type\":c.type,\"data-warning-id\":f,role:\"note\",\"aria-label\":c.message},children:[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:_.minX.toString(),y:_.minY.toString(),width:(_.maxX-_.minX).toString(),height:(_.maxY-_.minY).toString(),rx:\"6\",fill:\"none\",stroke:a,\"stroke-width\":\"1\",\"stroke-dasharray\":\"4,3\",\"data-warning-reference\":\"target\"},children:[]},{name:\"line\",type:\"element\",value:\"\",attributes:{x1:x.from.x.toString(),y1:x.from.y.toString(),x2:x.to.x.toString(),y2:x.to.y.toString(),stroke:a,\"stroke-width\":\"1\",\"data-warning-reference\":\"leader\"},children:[]},{name:\"rect\",type:\"element\",value:\"\",attributes:{x:y.minX.toString(),y:y.minY.toString(),width:m.toString(),height:u.toString(),fill:\"rgba(255, 250, 235, 0.97)\",stroke:a,\"stroke-width\":\"1\",\"data-warning-reference\":\"callout\"},children:[]},{name:\"text\",type:\"element\",value:\"\",attributes:{x:(y.minX+ui).toString(),y:(y.minY+ui+Ys).toString(),fill:\"#5c4300\",\"font-family\":\"sans-serif\",\"font-size\":Ys.toString()},children:p.map((b,M)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:(y.minX+ui).toString(),dy:M===0?\"0\":n1.toString()},children:[wI(b)]}))}]}]})}function mI(t,e,r){let n=uI(t).map((a)=\u003eyI(e,a)).filter((a)=\u003eBoolean(a)).map((a)=\u003efI(a,r)).filter((a)=\u003eBoolean(a));if(n.length===0)return null;return n.reduce(vI)}function uI(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_ids;case\"schematic_component_styling_warning\":return[t.schematic_component_id,...t.schematic_port_ids??[]];case\"schematic_manual_edit_conflict_warning\":return[t.schematic_component_id];case\"schematic_element_outside_sheet_warning\":return[t.schematic_element_id]}}function yI(t,e){return t.find((r)=\u003e{if(!r.type.startsWith(\"schematic_\"))return!1;let i=`${r.type}_id`;return r[i]===e})}function fI(t,e){if(t.type===\"schematic_component\"){let r=P(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),i=P(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return nm([r,i])}if(t.type===\"schematic_port\"){let r=P(e,t.center);return Es(nm([r]),4)}if(t.type===\"schematic_net_label\"){let r=P(e,t.anchor_position??t.center),i=Math.max(28,t.text.length*8);return{minX:r.x-i/2,minY:r.y-10,maxX:r.x+i/2,maxY:r.y+10}}if(t.type===\"schematic_trace\"){let r=t.edges.flatMap((i)=\u003e[P(e,i.from),P(e,i.to)]);if(r.length===0)return null;return Es(nm(r),4)}return null}function _I({targetBounds:t,calloutWidth:e,calloutHeight:r,svgWidth:i,svgHeight:n,occupiedCalloutBounds:a}){let o=(t.minX+t.maxX)/2,c=(t.minY+t.maxY)/2,l=t.minY-pn-Cs-r,s=t.maxY+pn+Cs,p=t.minX-pn-Cs-e,d=t.maxX+pn+Cs,m=[];if(l\u003e=Qt)m.push(ln({x:yi(o-e/2,Qt,i-Qt-e),y:l,width:e,height:r,side:\"top\"}));if(s+r\u003c=n-Qt)m.push(ln({x:yi(o-e/2,Qt,i-Qt-e),y:s,width:e,height:r,side:\"bottom\"}));if(d+e\u003c=i-Qt)m.push(ln({x:d,y:yi(c-r/2,Qt,n-Qt-r),width:e,height:r,side:\"right\"}));if(p\u003e=Qt)m.push(ln({x:p,y:yi(c-r/2,Qt,n-Qt-r),width:e,height:r,side:\"left\"}));let u=m.find((y)=\u003ea.every((f)=\u003e!SI(Es(y,4),f)));if(u)return u;if(m[0])return m[0];return ln({x:yi(o-e/2,Qt,i-Qt-e),y:yi(l,Qt,n-Qt-r),width:e,height:r,side:\"top\"})}function gI(t,e){let r=(e.minX+e.maxX)/2,i=(e.minY+e.maxY)/2,n=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2;switch(t.side){case\"top\":return{from:{x:n,y:t.maxY},to:{x:r,y:e.minY}};case\"bottom\":return{from:{x:n,y:t.minY},to:{x:r,y:e.maxY}};case\"left\":return{from:{x:t.maxX,y:a},to:{x:e.minX,y:i}};case\"right\":return{from:{x:t.minX,y:a},to:{x:e.maxX,y:i}}}}function xI(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_overlap_warning_id;case\"schematic_component_styling_warning\":return t.schematic_component_styling_warning_id;case\"schematic_element_outside_sheet_warning\":return t.schematic_element_outside_sheet_warning_id;case\"schematic_manual_edit_conflict_warning\":return t.schematic_manual_edit_conflict_warning_id}}function bI(t,e){let r=t.trim().split(/\\s+/),i=[],n=\"\";for(let a of r){let o=n?`${n} ${a}`:a;if(o.length\u003c=e||n.length===0){n=o;continue}i.push(n),n=a}if(n)i.push(n);return i.length\u003e0?i:[\"Warning\"]}function nm(t){return{minX:Math.min(...t.map((e)=\u003ee.x)),minY:Math.min(...t.map((e)=\u003ee.y)),maxX:Math.max(...t.map((e)=\u003ee.x)),maxY:Math.max(...t.map((e)=\u003ee.y))}}function vI(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function Es(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function SI(t,e){return!(t.maxX\u003c=e.minX||t.minX\u003e=e.maxX||t.maxY\u003c=e.minY||t.minY\u003e=e.maxY)}function ln({x:t,y:e,width:r,height:i,side:n}){return{minX:t,minY:e,maxX:t+r,maxY:e+i,side:n}}function yi(t,e,r){if(r\u003ce)return(e+r)/2;return Math.min(Math.max(t,e),r)}function wI(t){return{name:\"\",type:\"text\",value:t,attributes:{},children:[]}}function C1(t,e){let r=t.filter((R)=\u003eR.type===\"schematic_sheet\"),i=wP(r),n=i;if(e?.schematicSheetId!==void 0)n=r.find((R)=\u003eR.schematic_sheet_id===e.schematicSheetId)??i;else if(e?.schematicSheetIndex!==void 0)n=r.find((R)=\u003eR.sheet_index===e.schematicSheetIndex)??i;let a=n?t.filter((R)=\u003e!R.type.startsWith(\"schematic_\")||k1(R)||(\"schematic_sheet_id\"in R)\u0026\u0026R.schematic_sheet_id===n.schematic_sheet_id):t,o=NP(a),c=o.maxX-o.minX,l=o.maxY-o.minY,s=e?.width??1200,p=e?.height??600,d=e?.colorOverrides,m={...Zt,schematic:{...Zt.schematic,...d?.schematic??{}}},u=c/l,y=s/p,f;if(u\u003ey){let R=s/u;f={x:0,y:(p-R)/2}}else{let R=p*u;f={x:(s-R)/2,y:0}}let _=g0([{x:o.minX,y:o.maxY},{x:o.maxX,y:o.maxY},{x:o.maxX,y:o.minY}],[{x:f.x,y:f.y},{x:s-f.x,y:f.y},{x:s-f.x,y:p-f.y}]),x=[];if(x.push({name:\"rect\",type:\"element\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",width:s.toString(),height:p.toString()},children:[],value:\"\"}),e?.grid){let R=typeof e.grid===\"object\"?e.grid:{};x.push(vP({bounds:o,transform:_,...R}))}let Y=[],b=[],M=[],O=[],X=[],E=[],I=[],U=[],q=[],ct=[],Q=[],k=[],st=[],ot=[],Z=[],N=[],tt=[],J=AI({transform:_,svgWidth:s,svgHeight:p,schematicSheet:n}),W=Array.isArray(m.simulation_palette)?m.simulation_palette:Array.isArray(m.palette)?m.palette:[],j=0;for(let R of a)if(R.type===\"schematic_sheet\")N.push(...sI({schematicSheet:R,transform:_,colorMap:m}));else if(R.type===\"schematic_graphic\")tt.push(WP({schematicGraphic:R,viewport:BI({availableViewport:J,schematicGraphic:R,transform:_})}));else if(R.type===\"schematic_debug_object\")Y.push(...oI({debugObject:R,transform:_}));else if(R.type===\"schematic_component\")b.push(...nI({component:R,transform:_,circuitJson:a,colorMap:m})),q.push(...zP({component:R,transform:_,circuitJson:a}));else if(R.type===\"schematic_box\")I.push(...HP({schematicBox:R,transform:_,colorMap:m}));else if(R.type===\"schematic_trace\")M.push(...lI({trace:R,transform:_,colorMap:m}));else if(R.type===\"schematic_net_label\")O.push(...$P({schNetLabel:R,realToScreenTransform:_,colorMap:m}));else if(R.type===\"schematic_text\"\u0026\u0026!R.schematic_component_id)X.push(cm({elm:R,transform:_,colorMap:m}));else if(R.type===\"schematic_voltage_probe\"){let pt=W.length\u003e0?W[j%W.length]:void 0;j+=1,E.push(...pI({probe:R,transform:_,colorMap:m,fallbackColor:pt}))}else if(R.type===\"schematic_table\")U.push(...cI({schematicTable:R,transform:_,colorMap:m,circuitJson:a}));else if(R.type===\"schematic_line\"){if(R.schematic_component_id)continue;Q.push(...F1({schLine:R,transform:_,colorMap:m}))}else if(R.type===\"schematic_circle\"){if(R.schematic_component_id)continue;k.push(...S1({schCircle:R,transform:_,colorMap:m}))}else if(R.type===\"schematic_rect\"){if(R.schematic_component_id)continue;st.push(...P1({schRect:R,transform:_,colorMap:m}))}else if(R.type===\"schematic_arc\"){if(R.schematic_component_id)continue;ot.push(...v1({schArc:R,transform:_,colorMap:m}))}else if(R.type===\"schematic_path\"){if(R.schematic_component_id)continue;Z.push(...I1({schPath:R,transform:_,colorMap:m}))}else if(R.type===\"schematic_port\"){let pt=a.find((xt)=\u003ext.type===\"source_port\"\u0026\u0026xt.source_port_id===R.source_port_id);if(pt?.type===\"source_port\"\u0026\u0026pt.do_not_connect===!0)ct.push(DP({schPort:R,transform:_,colorMap:m}));if(e?.drawPorts)ct.push(...UP({schPort:R,transform:_,circuitJson:a,colorMap:m}))}let G=M.filter((R)=\u003eR.attributes?.[\"data-layer\"]!==\"overlay\"),D=M.filter((R)=\u003eR.attributes?.[\"data-layer\"]===\"overlay\");if(x.push(...tt,...Y,...N,...G,...D,...Q,...k,...st,...ot,...Z,...b,...q,...ct,...O,...X,...I,...E,...U),e?.labeledPoints)x.push(SP({points:e.labeledPoints,transform:_}));if(e?.shouldDrawWarnings)x.push(...dI({circuitJson:a,transform:_,svgWidth:s,svgHeight:p,colorMap:m}));let et=fP(t),mt=gP;if(e?.showErrorsInTextOverlay){let R=xP(t);if(R)x.push(R)}let dt={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",class:[\"tscircuit-schematic\",e?.className].filter(Boolean).join(\" \"),width:s.toString(),height:p.toString(),style:`background-color: ${m.schematic.background}`,\"data-real-to-screen-transform\":f0(_),...et\u0026\u0026{\"data-software-used-string\":et},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":mt}},children:[{name:\"style\",type:\"element\",children:[{type:\"text\",value:`\n .boundary { fill: ${m.schematic.background}; }\n .schematic-boundary { fill: none; stroke: #fff; }\n .component { fill: none; stroke: ${m.schematic.component_outline}; }\n .chip { fill: ${m.schematic.component_body}; stroke: ${m.schematic.component_outline}; }\n .component-pin { fill: none; stroke: ${m.schematic.component_outline}; }\n .text { font-family: sans-serif; fill: ${m.schematic.wire}; }\n .pin-number { fill: ${m.schematic.pin_number}; }\n .port-label { fill: ${m.schematic.reference}; }\n .component-name { fill: ${m.schematic.reference}; }\n ${e?.css??\"\"}\n `,name:\"\",attributes:{},children:[]}],value:\"\",attributes:{}},...x],value:\"\"};return dP(dt)}function AI({transform:t,svgWidth:e,svgHeight:r,schematicSheet:i}){if(!i)return{x:0,y:0,width:e,height:r};let n=sm(i),a=P(t,{x:n.innerMinX,y:n.innerMaxY}),o=P(t,{x:n.innerMaxX,y:n.innerMinY});return{x:Math.min(a.x,o.x),y:Math.min(a.y,o.y),width:Math.abs(o.x-a.x),height:Math.abs(o.y-a.y)}}function BI({availableViewport:t,schematicGraphic:e,transform:r}){if(e.width===void 0\u0026\u0026e.height===void 0)return t;let i=e.width===void 0?t.width:a1(e.width*Math.hypot(r.a,r.b),t.width),n=e.height===void 0?t.height:a1(e.height*Math.hypot(r.c,r.d),t.height);return{x:t.x+(t.width-i)/2,y:t.y+(t.height-n)/2,width:i,height:n}}function a1(t,e){if(!Number.isFinite(t))return e;return Math.max(0,Math.min(t,e))}var lm=11;function Y1(t,e=1){let r=12*e,i=26*e,n=t.left+r,a=t.right-r,o=t.top+r,c=t.bottom-r,l=[],s=Math.ceil(Math.max(t.right-t.left,t.bottom-t.top)/i);return(p)=\u003e{let d={x:Math.max(n,Math.min(a,p.x)),y:Math.max(o,Math.min(c,p.y))};for(let m=0;m\u003c=s;m++)for(let u=-m;u\u003c=m;u++)for(let y=-m;y\u003c=m;y++){if(Math.max(Math.abs(u),Math.abs(y))!==m)continue;let f={x:d.x+u*i,y:d.y+y*i};if(f.x\u003cn||f.x\u003ea||f.y\u003co||f.y\u003ec)continue;if(l.some((_)=\u003eMath.hypot(_.x-f.x,_.y-f.y)\u003ci-0.000001*e))continue;return l.push(f),f}throw Error(\"Not enough room for issue markers; increase the schematic width or height\")}}function II(t){return[...new Set(t.flatMap((r)=\u003er.type.startsWith(\"schematic_\")\u0026\u0026!r.type.endsWith(\"_warning\")\u0026\u0026!r.type.endsWith(\"_error\")\u0026\u0026r.type!==\"schematic_symbol\"\u0026\u0026!(r.type===\"schematic_group\"\u0026\u0026r.is_subcircuit\u0026\u0026!r.show_as_schematic_box)?[(\"schematic_sheet_id\"in r?r.schematic_sheet_id:void 0)??\"\"]:[]))].map((r)=\u003e{let i=t.find((n)=\u003en.type===\"schematic_sheet\"\u0026\u0026n.schematic_sheet_id===r);return{id:r,name:i?.type===\"schematic_sheet\"?i.name||r:r||\"Unassigned sheet\"}})}var MI=(t)=\u003et.replaceAll(\"\u0026\",\"\u0026amp;\").replaceAll(\"\u003c\",\"\u0026lt;\").replaceAll('\"',\"\u0026quot;\").replaceAll(\"\u003e\",\"\u0026gt;\"),Ns=(t)=\u003eUt(t.schX,t.schY,t.width,t.height);function L1(t){let{circuitJson:e,analysis:r}=t,i=t.schematicSheetId??II(e)[0]?.id??\"\",n=e.filter((k)=\u003e!k.type.startsWith(\"schematic_\")||k.type===\"schematic_symbol\"||((\"schematic_sheet_id\"in k?k.schematic_sheet_id:void 0)??\"\")===i),a=C1(n,{width:t.width??1400,height:t.height??900}),o=a.match(/data-real-to-screen-transform=\"matrix\\(([^)]+)\\)\"/);if(!o)throw Error(\"Schematic renderer did not provide its coordinate transform\");let c=o[1].split(/[\\s,]+/).map(Number);if(c.length!==6||c.some((k)=\u003e!Number.isFinite(k)))throw Error(\"Invalid schematic transform\");let[l,s,p,d,m,u]=c,y=(k,st)=\u003e({x:l*k+p*st+m,y:s*k+d*st+u}),f=[],_=[],x=(k)=\u003e{f.push(k);for(let st of[k.left,k.right])for(let ot of[k.bottom,k.top])_.push(y(st,ot))},Y=r.getLineItems().filter((k)=\u003ek.lineItemType===\"SchematicBoxPlacement\"),b=new Set,M=r.getIssues().flatMap((k,st)=\u003e{if((pr(k).schematicSheetId??\"\")!==i||t.issueTypes!==void 0\u0026\u0026!t.issueTypes.includes(k.lineItemType)||t.issueIndex!==void 0\u0026\u0026st!==t.issueIndex)return[];let ot=Gn({issues:[k],componentPlacements:Y,circuitJson:e}),Z=[],N,tt=new Map,J=(G,D=!1)=\u003e{x(G),N??={x:G.left,y:G.top};let et=[D?\"context\":\"issue\",G.left,G.bottom,G.right,G.top].join(\":\");if(!D)tt.set(et,{x:G.left,y:G.top});if(b.has(et))return;b.add(et);let mt=`\u003crect x=\"${G.left}\" y=\"${G.bottom}\" width=\"${G.right-G.left}\" height=\"${G.top-G.bottom}\" fill=\"${D?\"none\":\"#ef444433\"}\" stroke=\"${D?\"#2563eb\":\"#dc2626\"}\" stroke-width=\"${D?0.35:0.5}\" ${D?'stroke-dasharray=\"5 3\"':\"\"} vector-effect=\"non-scaling-stroke\" /\u003e`;Z.push(mt)};for(let G of ot)J(Ns(G),!0);switch(N=void 0,k.lineItemType){case\"RailPathTooSpreadOut\":{x(k.pathBounds),N=k.pathPoints[0],Z.push(`\u003cpolyline points=\"${k.pathPoints.map((G)=\u003e`${G.x},${G.y}`).join(\" \")}\" fill=\"none\" stroke=\"#dc2626\" stroke-width=\"3\" stroke-opacity=\"0.75\" vector-effect=\"non-scaling-stroke\" /\u003e`);break}case\"ComponentOverlap\":{let G=Ns(k.firstComponent),D=Ns(k.secondComponent);J({left:Math.max(G.left,D.left),right:Math.min(G.right,D.right),top:Math.min(G.top,D.top),bottom:Math.max(G.bottom,D.bottom)});break}case\"NetLabelCollision\":for(let G of k.collisionBounds??[])J(G);break;case\"SchematicTextCollision\":J(k.textBounds),J(k.collidingObjectBounds);break;case\"ComponentNetLabelCollision\":J(k.overlappingLabel1Bounds),J(k.overlappingLabel2Bounds);break;case\"ComponentBoxNetLabelCollision\":J(k.boxBounds),J(k.labelBounds);break;case\"VerboseSchematicNetLabel\":{N={x:k.schX,y:k.schY},x(Ut(N.x,N.y,18/Math.abs(l),18/Math.abs(d))),Z.push(`\u003ccircle cx=\"${N.x}\" cy=\"${N.y}\" r=\"${9/Math.abs(l)}\" fill=\"#ef444433\" stroke=\"#dc2626\" stroke-width=\"0.5\" vector-effect=\"non-scaling-stroke\" /\u003e`);break}case\"TraceCanBeSimplifiedByMovingComponent\":{if(k.suggestedTraces){let D=Ut(k.newSchX,k.newSchY,k.targetComponent.width,k.targetComponent.height);x(D),Z.push(`\u003crect x=\"${D.left}\" y=\"${D.bottom}\" width=\"${D.right-D.left}\" height=\"${D.top-D.bottom}\" fill=\"#16a34a22\" stroke=\"#16a34a\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\" /\u003e`);for(let et of k.suggestedTraces)for(let[mt,dt]of et.points.slice(1).entries()){let R=et.points[mt];x({left:Math.min(R.x,dt.x),right:Math.max(R.x,dt.x),bottom:Math.min(R.y,dt.y),top:Math.max(R.y,dt.y)}),Z.push(`\u003cline x1=\"${R.x}\" y1=\"${R.y}\" x2=\"${dt.x}\" y2=\"${dt.y}\" stroke=\"#16a34a\" stroke-width=\"1.5\" vector-effect=\"non-scaling-stroke\" /\u003e`)}}let G=n.find((D)=\u003eD.type===\"schematic_trace\"\u0026\u0026D.schematic_trace_id===k.schematicTraceId);if(G?.type===\"schematic_trace\")for(let D of G.edges)x({left:Math.min(D.from.x,D.to.x),right:Math.max(D.from.x,D.to.x),bottom:Math.min(D.from.y,D.to.y),top:Math.max(D.from.y,D.to.y)}),N??=D.from,Z.push(`\u003cline x1=\"${D.from.x}\" y1=\"${D.from.y}\" x2=\"${D.to.x}\" y2=\"${D.to.y}\" stroke=\"#dc2626\" stroke-width=\"0.5\" vector-effect=\"non-scaling-stroke\" /\u003e`);break}default:for(let G of ot)J(Ns(G))}N??=ot[0]?{x:ot[0].schX,y:ot[0].schY}:void 0;let W=(tt.size?[...tt.values()]:N?[N]:[]).map((G)=\u003ey(G.x,G.y)),j=MI(`#${st+1} ${k.lineItemType}\n${r.schematicIssuesToString(k)}`);return[{index:st,points:W,title:j,geometry:`\u003ctitle\u003e${j}\u003c/title\u003e\u003cg transform=\"matrix(${c.join(\" \")})\"\u003e${Z.join(\"\")}\u003c/g\u003e`,issueType:k.lineItemType}]}),O=a,X=1,E={left:0,top:0,right:t.width??1400,bottom:t.height??900};if(!t.showFullSchematic\u0026\u0026_.length\u003e0){let k=Math.min(..._.map((et)=\u003eet.x)),st=Math.max(..._.map((et)=\u003eet.x)),ot=Math.min(..._.map((et)=\u003eet.y)),Z=Math.max(..._.map((et)=\u003eet.y)),N=Math.max((st-k)/2,12),tt=Math.max((Z-ot)/2,12),J=st-k+N*2,W=Z-ot+tt*2;E={left:k-N,top:ot-tt,right:st+N,bottom:Z+tt};let j=`${E.left} ${E.top} ${J} ${W}`;O=a.replace(/^\u003csvg\\b[^\u003e]*\u003e/,(et)=\u003eet.replace(/\\sviewBox=\"[^\"]*\"/,\"\").replace(/\u003e$/,` viewBox=\"${j}\"\u003e`)),X=Math.max(J/(t.width??1400),W/(t.height??900));let G=(t.width??1400)*X,D=(t.height??900)*X;E={left:(k+st-G)/2,right:(k+st+G)/2,top:(ot+Z-D)/2,bottom:(ot+Z+D)/2}}let I=f.length?{left:Math.min(...f.map((k)=\u003ek.left)),right:Math.max(...f.map((k)=\u003ek.right)),top:Math.max(...f.map((k)=\u003ek.top)),bottom:Math.min(...f.map((k)=\u003ek.bottom))}:void 0;if(t.showOverlay===!1)return{svg:O,bounds:I};let U=Y1(E,X),q=[],ct=[],Q=M.map(({index:k,points:st,title:ot,geometry:Z,issueType:N})=\u003e{for(let tt of st){let J={x:tt.x,y:tt.y-(lm+1)*X},W=U(J);if(W.x!==J.x||W.y!==J.y)q.push(`\u003cline x1=\"${tt.x}\" y1=\"${tt.y}\" x2=\"${W.x}\" y2=\"${W.y}\" stroke=\"#b91c1c\" stroke-width=\"0.5\" /\u003e`);ct.push(`\u003cg data-issue-number=\"${k+1}\" data-issue-type=\"${N}\" transform=\"translate(${W.x} ${W.y}) scale(${X})\"\u003e\u003ctitle\u003e${ot}\u003c/title\u003e\u003ccircle r=\"${lm}\" fill=\"#b91c1c\" /\u003e\u003ctext y=\"4\" text-anchor=\"middle\" fill=\"white\" font-family=\"sans-serif\" font-size=\"11\"\u003e${k+1}\u003c/text\u003e\u003c/g\u003e`)}return`\u003cg data-issue-index=\"${k}\" data-issue-type=\"${N}\"\u003e${Z}\u003c/g\u003e`});return{bounds:I,svg:O.replace(/\u003c\\/svg\u003e\\s*$/,`\u003cg class=\"placement-issue-overlays\"\u003e${Q.join(`\n`)}${q.join(`\n`)}${ct.join(`\n`)}\u003c/g\u003e\u003c/svg\u003e`)}}function E1(t,e,r=[]){let i=Math.max(20,Math.floor((e-(r.length?70:36))/10)),n=[],a=[],o=[...r],c=0,l;for(let u of t?t.split(`\n`):[]){if(u.startsWith(\"\u003cSchematicSheet \"))l=u.match(/\\bid=\"([^\"]*)\"/)?.[1];let y=o.findIndex((f)=\u003ef.text\u0026\u0026t.startsWith(f.text,c)\u0026\u0026(l===void 0||l===f.sheetId));if(y!==-1){let[f]=o.splice(y,1);a.push({number:f.number,lineIndex:n.length})}n.push(...CI(u,Math.min(96,i))),c+=u.length+1}let s=22,p=18,d=a.length?52:p,m=p*2+n.length*s;return[`\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"${e}\" height=\"${m}\" viewBox=\"0 0 ${e} ${m}\"\u003e`,'\u003crect width=\"100%\" height=\"100%\" fill=\"#fff\" /\u003e',`\u003ctext x=\"${d}\" y=\"${p+s}\" fill=\"#d00\" font-family=\"Menlo, Consolas, monospace\" font-size=\"16\"\u003e`,...n.map((u,y)=\u003e`\u003ctspan x=\"${d}\" dy=\"${y===0?0:s}\"\u003e${kI(u)}\u003c/tspan\u003e`),\"\u003c/text\u003e\",...a.map(({number:u,lineIndex:y})=\u003e{let f=p+(y+1)*s-5;return`\u003cg data-listing-issue-number=\"${u}\"\u003e\u003ccircle cx=\"${p+6}\" cy=\"${f}\" r=\"11\" fill=\"#b91c1c\" /\u003e\u003ctext x=\"${p+6}\" y=\"${f}\" dy=\"0.35em\" text-anchor=\"middle\" font-family=\"sans-serif\" font-size=\"11\" fill=\"white\"\u003e${u}\u003c/text\u003e\u003c/g\u003e`}),\"\u003c/svg\u003e\"].join(`\n`)}function kI(t){return t.replaceAll(\"\u0026\",\"\u0026amp;\").replaceAll(\"\u003c\",\"\u0026lt;\").replaceAll(\"\u003e\",\"\u0026gt;\").replaceAll('\"',\"\u0026quot;\").replaceAll(\"'\",\"\u0026apos;\")}function CI(t,e){if(t.length\u003c=e)return[t];let r=[],i=t;while(i.length\u003ee){let n=i.lastIndexOf(\" \",e),a=n\u003e0?n:e;r.push(i.slice(0,a)),i=` ${i.slice(a).trimStart()}`}return r.push(i),r}function YI(t,e={}){let r=e.width??1400,i=e.height??900;if(!Number.isFinite(r)||r\u003c320||!Number.isFinite(i)||i\u003c=0)throw Error(\"Artifact width must be at least 320 and height must be positive (finite pixels)\");let n=e.analysis??Vc(t),a=n.getIssues();return n.getIssues(e).map((o)=\u003e{let c=a.indexOf(o),{schematicSheetId:l}=pr(o),{svg:s,bounds:p}=L1({circuitJson:t,analysis:n,issueIndex:c,schematicSheetId:l??\"\",width:r,height:i}),d=n.schematicIssuesToString(o)||`\u003c${o.lineItemType} details=\"${Xs(JSON.stringify(o))}\" /\u003e`,m=I0([`\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"${r}\" height=\"${i}\"\u003e${s}\u003c/svg\u003e`,E1(d,r)],{normalizeSize:!1,gap:0}).replace(/[ \\t]+$/gm,\"\");return{issueIndex:c,issue:o,schematicSheetId:l,bounds:p,descriptionXml:d,fileName:`issue-${String(c+1).padStart(4,\"0\")}-${o.lineItemType}.svg`,contentType:\"image/svg+xml\",content:m}})}export{Xc as SchematicPlacementAnalysis,Vc as analyzeSchematicPlacement,YI as createSchematicPlacementIssueArtifacts};\n","content_mimetype":"application/javascript","created_at":"2026-10-15T23:26:38.117Z"}; window.SSR_PACKAGE_RELEASES = [{"package_release_id":"072b855c-e67c-4392-aee0-1f4641b4d047","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.92-pr10-4dd4b26c","github_commit_sha":"4dd4b26ce9354c3477d1ca6fc5d7b03e06e83e51","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-16T21:23:32.967Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-e030c5986f4cd703c30095fdc54e1e7f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=072b855c-e67c-4392-aee0-1f4641b4d047\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=072b855c-e67c-4392-aee0-1f4641b4d047\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=072b855c-e67c-4392-aee0-1f4641b4d047\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ac2c1fd9-32bb-494e-a5c4-8eb76f37b52f","user_code_job_started_at":"2026-10-16T21:32:01.855Z","user_code_job_completed_at":"2026-10-16T21:46:17.094Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=65156b9d0a45c05b23031ddf240128734990332d640ad2132579d2312c6a10e1","ai_review_requested":false,"github_pr_number":10,"github_pr_title":"Update external-system parts, power guidance and readiness docs","github_branch_name":"codex/external-system-handoff-docs"},{"package_release_id":"f9c7a51c-0362-489e-94d3-5901eb27ba81","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.92","github_commit_sha":"8139bcaac0d26eefba43a5b7cb0ee2b7a01d2931","is_locked":false,"is_latest":true,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-15T23:24:59.159Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6ea8765f8d6be5f16fa201d09bf9dadf","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=f9c7a51c-0362-489e-94d3-5901eb27ba81\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=f9c7a51c-0362-489e-94d3-5901eb27ba81\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=f9c7a51c-0362-489e-94d3-5901eb27ba81\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"942766f9-b6d4-4b3a-a8bb-f44eaecc7eae","user_code_job_started_at":"2026-10-15T23:29:17.818Z","user_code_job_completed_at":"2026-10-15T23:46:21.638Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=761dad025a90956dd62c9f0fefacad1a9e4d74f39c284f6906ad3fb25ac509d6","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1785a8dd-fe60-477c-81d1-b32387950da9","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.91","github_commit_sha":"38fe46550e14d4a66c78f2e4d06f09a1f5caf8dd","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-15T23:07:07.064Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-c3f715ec2be539821cc9701ad77cd22a","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1785a8dd-fe60-477c-81d1-b32387950da9\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1785a8dd-fe60-477c-81d1-b32387950da9\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1785a8dd-fe60-477c-81d1-b32387950da9\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"d88e14d6-b9e6-4c10-866f-016c1b61c080","user_code_job_started_at":"2026-10-15T23:11:34.358Z","user_code_job_completed_at":"2026-10-15T23:24:59.987Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=20ecf869ebd7e1147702f05da259ccb7143a200e2185e44ca9caed056a6e6f0b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"af8e94b0-05fe-4ff7-b589-bb29869d23ba","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.90","github_commit_sha":"71c2efc3350f365382dd32ec3a0e6ecfd0fd9e17","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-14T17:09:02.208Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-73719c77dde48c8208b002f5f24b5efc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=af8e94b0-05fe-4ff7-b589-bb29869d23ba\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=af8e94b0-05fe-4ff7-b589-bb29869d23ba\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=af8e94b0-05fe-4ff7-b589-bb29869d23ba\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8a5e9892-1ed6-41de-8043-1e352532b2b3","user_code_job_started_at":"2026-10-14T17:29:43.204Z","user_code_job_completed_at":"2026-10-14T17:46:09.205Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=3f7a924be89d096b561dd8524eef11fc762592c514025c0c3c3cb8489dc7f592","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"e459f29f-73a7-4f18-b564-a59fce520cfe","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.89","github_commit_sha":"dbaad38cc4fd2e75c812b883c97df68a17f81a2b","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-14T07:38:44.960Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f50ed677511b07c9ccbcd425847ca5a9","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e459f29f-73a7-4f18-b564-a59fce520cfe\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e459f29f-73a7-4f18-b564-a59fce520cfe\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e459f29f-73a7-4f18-b564-a59fce520cfe\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"4170562c-8789-40e3-8b44-f1868b6d5625","user_code_job_started_at":"2026-10-14T13:37:13.437Z","user_code_job_completed_at":"2026-10-14T13:47:22.761Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=b936b5da98ed602d1380aa8c86e9bcda90c2690df232251862f75213606580b5","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d1e56fd4-e4b9-46af-8eff-35aa7a25c3c9","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.88","github_commit_sha":"5bb9d4bcc71c397436a0ca0a92c1b13846b4480a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-14T05:13:10.496Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-330affdd87be3ee3bed642a2225c3927","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d1e56fd4-e4b9-46af-8eff-35aa7a25c3c9\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d1e56fd4-e4b9-46af-8eff-35aa7a25c3c9\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d1e56fd4-e4b9-46af-8eff-35aa7a25c3c9\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"7b5f49b2-f0b5-489f-8d00-5a1e7f169491","user_code_job_started_at":"2026-10-14T05:42:23.765Z","user_code_job_completed_at":"2026-10-14T05:53:51.654Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=9c1f147b4dd9591ba1ebd1e464dd8729c978f28fbe2b266b3c17c18d366acb0b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"020df351-a209-49d3-aa76-3f0d4bc8b896","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.86-pr9-ef5a206c","github_commit_sha":"ef5a206c95d2a88a5be58e4b9aeb97e0b5ab27f0","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T04:52:26.317Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-b69704374b7072b91b3375d053ea7f60","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=020df351-a209-49d3-aa76-3f0d4bc8b896\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=020df351-a209-49d3-aa76-3f0d4bc8b896\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=020df351-a209-49d3-aa76-3f0d4bc8b896\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"3b636a82-bc1e-494a-ba20-034546058de5","user_code_job_started_at":"2026-10-14T04:56:53.635Z","user_code_job_completed_at":"2026-10-14T05:16:08.677Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=5d55a647d890b3c8d419b5665060848d8d21604df6aa2c23c1f5e9b852872a5b","ai_review_requested":false,"github_pr_number":9,"github_pr_title":"Fix release publishing and refresh merged-source evidence","github_branch_name":"codex/refresh-main-release"},{"package_release_id":"5d2fe303-149d-4960-bb60-e7c6cbb4ee80","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.86-pr8-b78e1278","github_commit_sha":"b78e1278e53cabec62def839e7c659b5ca67326c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T02:56:38.985Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-05781bd3ff4712d56b898c0edd08344c","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5d2fe303-149d-4960-bb60-e7c6cbb4ee80\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5d2fe303-149d-4960-bb60-e7c6cbb4ee80\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5d2fe303-149d-4960-bb60-e7c6cbb4ee80\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"f242789e-ac72-45b9-b9b5-3242833a2cab","user_code_job_started_at":"2026-10-14T03:34:59.720Z","user_code_job_completed_at":"2026-10-14T03:41:23.782Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=501e696de57817d0d9434e42cd81cbc84f7450f9ccc4516404bfd63ca15a08b1","ai_review_requested":false,"github_pr_number":8,"github_pr_title":"Use native U16 and U35 footprints with supplier CAD","github_branch_name":"codex/u16-footprinter-cad"},{"package_release_id":"a354e5fe-7085-4b0e-b775-8442145c1c7a","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.86-pr8-093f76be","github_commit_sha":"093f76be1277b800f953fd5a996f1a1c1d4a0745","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T02:44:55.556Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-24c5b0148b0fc1185cadf9f58e65ba58","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"549bf13d-76e0-4dea-9087-1589ff51254e","user_code_job_started_at":"2026-10-14T02:50:32.643Z","user_code_job_completed_at":"2026-10-14T02:51:47.188Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=99439674d3f9b14db2d61e79182f19017ecf45eb7da03d0bde93cac81ca78df1","ai_review_requested":false,"github_pr_number":8,"github_pr_title":"Use native U16 footprint with explicit LQFP CAD","github_branch_name":"codex/u16-footprinter-cad"},{"package_release_id":"e2690f79-311a-47a1-801c-a907afdd12c7","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.87","github_commit_sha":"2cb6b345062f18db7ab0e1cf6f131cc688e85add","is_locked":false,"is_latest":false,"ready_to_build":false,"is_pr_preview":false,"created_at":"2026-10-14T02:26:55.901Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":false,"transpilation_display_status":"pending","fs_sha":null,"circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":false,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":false,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":null,"user_code_job_started_at":null,"user_code_job_completed_at":null,"user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":null,"ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"c4f4c36d-8f1a-4845-9948-4130d3423803","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.86-pr8-af95e1a6","github_commit_sha":"af95e1a6323d0d3a33f6dd8a1fa34aebb0b15ed9","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T02:25:59.700Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f5301de9adfacae9d0ec0e8760b42f1f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c4f4c36d-8f1a-4845-9948-4130d3423803\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c4f4c36d-8f1a-4845-9948-4130d3423803\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c4f4c36d-8f1a-4845-9948-4130d3423803\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"b029849b-5806-44e9-bba1-e0f7a290b4c0","user_code_job_started_at":"2026-10-14T02:31:38.629Z","user_code_job_completed_at":"2026-10-14T02:51:02.798Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=cbba796a9da4f79add2abe03624300214825bcf6ac909e82723326afaf4406c6","ai_review_requested":false,"github_pr_number":8,"github_pr_title":"Use native U16 footprint with explicit LQFP CAD","github_branch_name":"codex/u16-footprinter-cad"},{"package_release_id":"6411152d-ce9f-481d-baf0-a1b0f4523e51","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.86","github_commit_sha":"2cb6b345062f18db7ab0e1cf6f131cc688e85add","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-14T02:17:03.696Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-d8e90d0d0aa87130752485d5dfd359e3","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"77949d03-3835-4c32-9c79-8d0df77f4afa","user_code_job_started_at":"2026-10-14T02:22:00.937Z","user_code_job_completed_at":"2026-10-14T02:23:03.190Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=7a3be103925c067e3ac19ab40f3bafdfc480db633367f78232a156d79bbc4f68","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"3c5547c0-584a-49d9-940d-a0abdce571cc","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.85-pr8-af95e1a6","github_commit_sha":"af95e1a6323d0d3a33f6dd8a1fa34aebb0b15ed9","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T02:15:49.333Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f5301de9adfacae9d0ec0e8760b42f1f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"bbd17ac9-3040-4fbe-9a3e-eac8e32cbdc2","user_code_job_started_at":"2026-10-14T02:20:58.394Z","user_code_job_completed_at":"2026-10-14T02:21:58.628Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=12fd05b86970017c2e097ae761ea1d4bad9e12ce085d88a125cac8b2dddacd58","ai_review_requested":false,"github_pr_number":8,"github_pr_title":"Use native U16 footprint with explicit LQFP CAD","github_branch_name":"codex/u16-footprinter-cad"},{"package_release_id":"307b7849-0265-4374-b584-95fb17640477","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.85-pr7-294cdc52","github_commit_sha":"294cdc529f990e1fe0f1cf6342cb6e59d5e7acde","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-14T02:14:16.665Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-d8e90d0d0aa87130752485d5dfd359e3","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=307b7849-0265-4374-b584-95fb17640477\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=307b7849-0265-4374-b584-95fb17640477\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=307b7849-0265-4374-b584-95fb17640477\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"c19e5d18-910b-4536-a82c-0ac3b93e408c","user_code_job_started_at":"2026-10-14T02:17:55.800Z","user_code_job_completed_at":"2026-10-14T02:34:52.721Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=9d5ded2ed5196bcab88929162687c12e6c1b0e930112f51e7e4d9dc4b6ce1778","ai_review_requested":false,"github_pr_number":7,"github_pr_title":"Correct J1 and J10 USB-C model Y origin","github_branch_name":"codex/usb-model-offset"},{"package_release_id":"47df281e-f7f0-4d04-b640-f286efb27fcc","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.85","github_commit_sha":"0ab6ce090d47ab52316e7f7c325e44bac22c0e40","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-14T01:04:52.141Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-4b43a41fa69cbfdd2d99fda19e71cc61","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=47df281e-f7f0-4d04-b640-f286efb27fcc\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=47df281e-f7f0-4d04-b640-f286efb27fcc\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=47df281e-f7f0-4d04-b640-f286efb27fcc\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"413f39e3-8e06-4fbc-ac6c-98a4479cc638","user_code_job_started_at":"2026-10-14T01:08:33.372Z","user_code_job_completed_at":"2026-10-14T01:22:19.979Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=15b5e8fa0dcdeffd59f82871802f90ff20659a883291514912c8f3e33fc3b359","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"83877303-9d17-4234-ad17-680bce4e5115","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.84-pr6-8636d9f7","github_commit_sha":"8636d9f7ad7e7342e1f05853837d526acbf887d3","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T17:50:15.986Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-4b43a41fa69cbfdd2d99fda19e71cc61","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=83877303-9d17-4234-ad17-680bce4e5115\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=83877303-9d17-4234-ad17-680bce4e5115\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=83877303-9d17-4234-ad17-680bce4e5115\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"f1842841-8613-4a15-893c-a42903ac4ff3","user_code_job_started_at":"2026-10-13T17:54:09.826Z","user_code_job_completed_at":"2026-10-13T18:04:39.234Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=85cabf611d8d5e63cf41520f846c79d4c8ae06c0b2bdb1a48fed1ee8e4c8d425","ai_review_requested":false,"github_pr_number":6,"github_pr_title":"Use manufacturer splice CAD and exact stock evidence","github_branch_name":"codex/final-prototype-closure"},{"package_release_id":"c89c0d86-3883-4040-a238-9b4b4b1b21c4","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.84-pr6-0efcda8d","github_commit_sha":"0efcda8d0397d8a97a8c603f5f1d18bcd70289d5","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T17:17:59.110Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-358941da36a7b0abb785052668af0393","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c89c0d86-3883-4040-a238-9b4b4b1b21c4\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c89c0d86-3883-4040-a238-9b4b4b1b21c4\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c89c0d86-3883-4040-a238-9b4b4b1b21c4\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"b78e02de-36c8-49a3-bcfd-eca128048fc6","user_code_job_started_at":"2026-10-13T17:22:00.655Z","user_code_job_completed_at":"2026-10-13T17:35:11.729Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1771998ac925ebc4bf65b44e4206ca5c9d9a559f60e858990c0364d471e75d50","ai_review_requested":false,"github_pr_number":6,"github_pr_title":"Use manufacturer splice CAD and exact stock evidence","github_branch_name":"codex/final-prototype-closure"},{"package_release_id":"46e587b4-cfd9-430b-bf46-0b71ef02e51c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.84","github_commit_sha":"d856d305407e63784c483366d38cab11c52c0a33","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T14:35:54.754Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-383d80707d33f14ebea967dfd5cf5b7e","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8cb392a9-a8c9-4dea-be4d-305af8793dd3","user_code_job_started_at":"2026-10-13T14:40:27.700Z","user_code_job_completed_at":"2026-10-13T14:42:45.349Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=887c74fda859596f9504dfa4babc8edacdd9d1538a6fe7e66416aa6d2a103bdc","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"51e10c04-90ae-433d-81fe-3dc14b33c249","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.83-pr5-0b3cab4e","github_commit_sha":"0b3cab4e1b129fc41ffb3a69e36eb280608d827a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T14:09:24.651Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-383d80707d33f14ebea967dfd5cf5b7e","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=51e10c04-90ae-433d-81fe-3dc14b33c249\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=51e10c04-90ae-433d-81fe-3dc14b33c249\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=51e10c04-90ae-433d-81fe-3dc14b33c249\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"95998787-665f-408f-8170-ddcfc188e5e5","user_code_job_started_at":"2026-10-13T14:13:54.535Z","user_code_job_completed_at":"2026-10-13T14:27:08.691Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=8ddb5376fba45d048d0d73514219c4e18979ae1fa18909cda5c4d530d2a2f2d9","ai_review_requested":false,"github_pr_number":5,"github_pr_title":"Monitor brake continuity during RUN and refresh prototype review evidence","github_branch_name":"codex/complete-prototype-review"},{"package_release_id":"b22f18b0-36d5-4604-b47e-9221bef0db58","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.83-pr5-bc817b26","github_commit_sha":"bc817b262ba9cffb3736ffb3d684109447a27913","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T12:30:01.168Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-3025a8115eb4127ae4d9d20b95edc1d7","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"e87ce832-9409-40d1-8f45-154a0045aa12","user_code_job_started_at":"2026-10-13T12:46:12.341Z","user_code_job_completed_at":"2026-10-13T12:49:22.919Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=67ed3c7da489503c81bc7f1769b34d2f13ef101ed3504cbd00afd6eb5f53c29f","ai_review_requested":false,"github_pr_number":5,"github_pr_title":"Monitor brake continuity during RUN and refresh prototype review evidence","github_branch_name":"codex/complete-prototype-review"},{"package_release_id":"b4c5b417-22ee-4f1d-8944-557cd1e742d0","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.83-pr4-28ad385e","github_commit_sha":"28ad385ee86825d578dda6839edfc48218317174","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T12:05:59.710Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-9fe6a71c73db546bc6bfecf33824b0f1","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b4c5b417-22ee-4f1d-8944-557cd1e742d0\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b4c5b417-22ee-4f1d-8944-557cd1e742d0\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b4c5b417-22ee-4f1d-8944-557cd1e742d0\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"794396c7-d54a-48fa-8ef5-ad1929cc03f8","user_code_job_started_at":"2026-10-13T12:10:02.578Z","user_code_job_completed_at":"2026-10-13T12:21:57.446Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=3cfe96594a5332a7dcbdab374b84be528ea7b65e5dd6724af9f1f85ae83737fb","ai_review_requested":false,"github_pr_number":4,"github_pr_title":"Resolve three sourcing identities and document programming and hardware acceptance","github_branch_name":"codex/sourcing-manufacturing-readiness"},{"package_release_id":"eaca0f8d-fe08-4ad6-b5c5-3301cdb11c41","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.83","github_commit_sha":"0cacbb2dcead1b818dd5ed0c09fca35fa721b132","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T11:10:43.854Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6fc48999c45c2c04797b5b1e55bbf4b0","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=eaca0f8d-fe08-4ad6-b5c5-3301cdb11c41\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=eaca0f8d-fe08-4ad6-b5c5-3301cdb11c41\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=eaca0f8d-fe08-4ad6-b5c5-3301cdb11c41\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"0f136782-0be8-4fcb-87ce-d4b48f607ac1","user_code_job_started_at":"2026-10-13T11:14:20.540Z","user_code_job_completed_at":"2026-10-13T11:23:04.393Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1127464d81b02505a568a9b337d311d3f49764b47e96daf3b9b58ebc1f138349","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1c61c853-8d18-4ad6-bb54-7cd7c147f2fe","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.82-pr3-168a187d","github_commit_sha":"168a187d1793d52b77068b830afb1f60fb8c7198","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T10:46:53.438Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6fc48999c45c2c04797b5b1e55bbf4b0","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1c61c853-8d18-4ad6-bb54-7cd7c147f2fe\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1c61c853-8d18-4ad6-bb54-7cd7c147f2fe\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1c61c853-8d18-4ad6-bb54-7cd7c147f2fe\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"932c9a5e-b4f3-4670-8956-72d4a419f3dd","user_code_job_started_at":"2026-10-13T10:51:01.087Z","user_code_job_completed_at":"2026-10-13T10:59:04.333Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1975094b5ed4e799be70721b298ff2020976559e7eb34554c160f3996f137207","ai_review_requested":false,"github_pr_number":3,"github_pr_title":"Correct unused SBU protection and prepare TI programming candidate","github_branch_name":"codex/readiness-sbu-review"},{"package_release_id":"fb197195-b148-4ced-bfc1-580235302878","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.82-pr3-3a48c343","github_commit_sha":"3a48c3439405d550b6283ea8d9586294b4db8805","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T05:46:42.956Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-03bdf39bc9d548097bb72b1cd9fb85f4","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"a876c1b7-e6d4-4da6-a35d-5f9fc28edbdf","user_code_job_started_at":"2026-10-13T05:51:52.501Z","user_code_job_completed_at":"2026-10-13T05:54:10.313Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4c6044ffefa24dd5a22291ee224ae35f3e1d21758ae900a4546e0b304c095f5e","ai_review_requested":false,"github_pr_number":3,"github_pr_title":"Correct unused SBU protection and prepare TI programming candidate","github_branch_name":"codex/readiness-sbu-review"},{"package_release_id":"0d25554b-f4f5-499c-9d7d-e3d068a11c67","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.82","github_commit_sha":"97ea91ed31722749aa81b6b1ec7ae394e83b2228","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T04:53:44.703Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-5233175dd19e0d356ad213ab63d27bb5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=0d25554b-f4f5-499c-9d7d-e3d068a11c67\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=0d25554b-f4f5-499c-9d7d-e3d068a11c67\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=0d25554b-f4f5-499c-9d7d-e3d068a11c67\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2dbd59e2-4a69-496a-8e17-dae1563724bf","user_code_job_started_at":"2026-10-13T04:57:26.068Z","user_code_job_completed_at":"2026-10-13T05:08:22.296Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=b2f5ac58928b1c2eb319f6df96fb6e3b2b7ce662ca1f511c55e0277a76696660","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a54db015-f3cc-4f46-82ed-6d08f7f814cc","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.81","github_commit_sha":"313b61fda18d6c2c6dc7ae0950f69e46503ce0b6","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T04:30:15.041Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-28890ba698f7d63a2e73b2f8cebe0c2d","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a54db015-f3cc-4f46-82ed-6d08f7f814cc\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a54db015-f3cc-4f46-82ed-6d08f7f814cc\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a54db015-f3cc-4f46-82ed-6d08f7f814cc\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"4d69df24-22e3-435f-b5eb-7ee93874ba6b","user_code_job_started_at":"2026-10-13T04:49:17.803Z","user_code_job_completed_at":"2026-10-13T05:02:54.721Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4240531fca5c0612abe2677fc444044cc2b2e4a002380463b801d00d13da283b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"3b067c9f-39d7-41cf-a5fb-1015eae0aedb","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.80","github_commit_sha":"f6bda16186418a521cf66d5779c48276c1d54427","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T04:25:08.763Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-704aab68d49837ec148aef965a151ba4","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3b067c9f-39d7-41cf-a5fb-1015eae0aedb\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3b067c9f-39d7-41cf-a5fb-1015eae0aedb\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3b067c9f-39d7-41cf-a5fb-1015eae0aedb\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"937bc896-eee7-43c7-bc44-a2f09aaf9aa9","user_code_job_started_at":"2026-10-13T04:28:22.474Z","user_code_job_completed_at":"2026-10-13T04:36:56.961Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=bd2b8675f1d2e373ee282675945b515d486421c0d1ca3442a53fe95da54682d6","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"3f41ca00-085b-46a7-ae91-f72adcea49ab","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.79","github_commit_sha":"6007098e8c92df1ca86c1d90462242065bc9e1aa","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T03:51:09.911Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-af5035b9561c1085ea2d4aa26f947a32","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3f41ca00-085b-46a7-ae91-f72adcea49ab\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3f41ca00-085b-46a7-ae91-f72adcea49ab\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3f41ca00-085b-46a7-ae91-f72adcea49ab\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"d3c97cf7-07c4-4114-8393-26fdf39506d7","user_code_job_started_at":"2026-10-13T03:54:13.949Z","user_code_job_completed_at":"2026-10-13T04:03:20.855Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=aeb22ea41b62616c6aee28a1e0cf01c2ace348dd9fdc96ab5c42c56a3cc3a0b8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"886ff6f2-a789-4e69-86b5-12ae181fe50c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.78-pr2-4b11eac6","github_commit_sha":"4b11eac6d1c4741411ada9f5f77eac986cadb970","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T03:42:01.248Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-af5035b9561c1085ea2d4aa26f947a32","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=886ff6f2-a789-4e69-86b5-12ae181fe50c\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=886ff6f2-a789-4e69-86b5-12ae181fe50c\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=886ff6f2-a789-4e69-86b5-12ae181fe50c\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"3dba99e3-089c-4623-bf97-0d3fcc44676e","user_code_job_started_at":"2026-10-13T03:45:30.040Z","user_code_job_completed_at":"2026-10-13T03:55:16.373Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=9d9dceab684a9f2c4001951ecc77de7b6c1661e0c035c8f4ae132b38e0936d0c","ai_review_requested":false,"github_pr_number":2,"github_pr_title":"Refine protection limits and restore native component references","github_branch_name":"codex/native-labels-protection-20261013"},{"package_release_id":"12983e59-0842-4cfa-85e0-4a1e1dee032c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.78-pr2-0a8ce710","github_commit_sha":"0a8ce71065a9b2d5e641c038b02ca2fb99875a3f","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-13T02:16:43.150Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f33dd2c8f327b4d2151de71b313fbba5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=12983e59-0842-4cfa-85e0-4a1e1dee032c\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=12983e59-0842-4cfa-85e0-4a1e1dee032c\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=12983e59-0842-4cfa-85e0-4a1e1dee032c\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"7244e78e-e566-48b2-b269-b1ab2148e829","user_code_job_started_at":"2026-10-13T02:20:38.009Z","user_code_job_completed_at":"2026-10-13T02:34:20.383Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=25107880b8c0b77776e11b53d19b45f8897bdb2ae3518b2ed2b0a43866d49a88","ai_review_requested":false,"github_pr_number":2,"github_pr_title":"Refine protection limits and restore native component references","github_branch_name":"codex/native-labels-protection-20261013"},{"package_release_id":"13b57c5d-764a-485e-ae19-78ffdc60da73","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.78","github_commit_sha":"4836266cb3d771da798b0559fe3ae5de7c5905b6","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-13T02:08:23.159Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-4a7ef23dcb0264bcf16e437829e8f9be","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=13b57c5d-764a-485e-ae19-78ffdc60da73\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=13b57c5d-764a-485e-ae19-78ffdc60da73\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=13b57c5d-764a-485e-ae19-78ffdc60da73\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ceeaffc7-25f2-460c-b10d-c084179b91b1","user_code_job_started_at":"2026-10-13T02:11:37.215Z","user_code_job_completed_at":"2026-10-13T02:23:47.699Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=d20ef0c7cc127bc4a0616c4e2220ce319caa14478b2fdf7997284de4f5d38cc0","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"aac31e97-3a2f-4a03-b9e3-ae40ab7be9b9","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.77","github_commit_sha":"16d1347fc9991399f7ff5ea089966af2876fc3ad","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-12T05:16:01.567Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-d438aec84a6b5ca29b32a1e33215d32f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=aac31e97-3a2f-4a03-b9e3-ae40ab7be9b9\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=aac31e97-3a2f-4a03-b9e3-ae40ab7be9b9\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=aac31e97-3a2f-4a03-b9e3-ae40ab7be9b9\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"96050101-56e7-4112-bf93-a406623bc282","user_code_job_started_at":"2026-10-12T05:20:24.434Z","user_code_job_completed_at":"2026-10-12T05:35:59.143Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=95ea7d109c8a0e13a189c0ec788cf59cd9e96d4b2253dc7acd6015c21fdc0a9f","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7687d3ba-02dc-4627-8aac-53341c939862","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.76","github_commit_sha":"16d1347fc9991399f7ff5ea089966af2876fc3ad","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-12T05:11:35.324Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-d438aec84a6b5ca29b32a1e33215d32f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7687d3ba-02dc-4627-8aac-53341c939862\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7687d3ba-02dc-4627-8aac-53341c939862\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7687d3ba-02dc-4627-8aac-53341c939862\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"4197a468-9a40-49ba-8484-7121a336295f","user_code_job_started_at":"2026-10-12T05:16:04.797Z","user_code_job_completed_at":"2026-10-12T05:27:48.483Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1a8833c04b818e30363476dc98c8beb3caf07c97388b39e31579553a55f75b24","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a9926c96-0f64-4b3a-b129-5e8b7275e773","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.75","github_commit_sha":"3f855c45023ff142e976d81202aeb30466eefc1f","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-12T02:21:23.963Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-798df967b043a7c2ed76f9e0bb6c8024","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a9926c96-0f64-4b3a-b129-5e8b7275e773\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a9926c96-0f64-4b3a-b129-5e8b7275e773\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a9926c96-0f64-4b3a-b129-5e8b7275e773\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"03df00d9-eeba-438b-b5c5-151a22086d03","user_code_job_started_at":"2026-10-12T02:25:29.823Z","user_code_job_completed_at":"2026-10-12T02:38:39.026Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=57e5119e5d4141a4a4315ffe8693ce81f1c73a175ada0fd0e13493c685f6635d","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a3beab72-f670-4b7e-9526-86873d600e0b","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.74","github_commit_sha":"2574ba02ff5035796423c18b6ec902c8a9e58d98","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-12T01:55:26.692Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-122e3ac100cff33d634faa4e3c938af6","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a3beab72-f670-4b7e-9526-86873d600e0b\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a3beab72-f670-4b7e-9526-86873d600e0b\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a3beab72-f670-4b7e-9526-86873d600e0b\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"434019dd-f7a2-48e5-8872-21f8ccd85426","user_code_job_started_at":"2026-10-12T01:59:05.977Z","user_code_job_completed_at":"2026-10-12T02:13:35.492Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f6f5741c15abaa6ca9e2700c5fdba3745a9c5edff2911e8d156cd1ba65089976","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"babc762e-f772-4e4c-b227-a8d936aaead9","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.73","github_commit_sha":"772be0dac4ea9e5e2af159348712a18185f8ff87","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-12T00:30:19.532Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-1642cd2f24073fd04ca664fe70633c1a","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=babc762e-f772-4e4c-b227-a8d936aaead9\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=babc762e-f772-4e4c-b227-a8d936aaead9\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=babc762e-f772-4e4c-b227-a8d936aaead9\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2bb4956a-8c6f-45b8-9eaf-44233f5079fd","user_code_job_started_at":"2026-10-12T00:33:51.833Z","user_code_job_completed_at":"2026-10-12T00:46:37.747Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=aed7984eed94d5f2b483908eb7118332a5a783c02541c3bbfe70196d6c8000de","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"2857cdc8-b92e-4462-93d7-28b97752a152","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.72","github_commit_sha":"7c2e2851f8a114e61cdad5623ea22a6a3050c29b","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T23:49:31.305Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6a1dcffd182e8300dbaed442cdcfff92","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"baad1c86-2e74-499f-917f-a56f183c9e17","user_code_job_started_at":"2026-10-11T23:53:57.086Z","user_code_job_completed_at":"2026-10-11T23:54:41.198Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=01da56259bc5dcd27a0fdc4ada71e887a0fc0261b5a6bed8123214348af2a9a4","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"065d97a3-1216-46a1-b712-6c013a6ce346","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.71","github_commit_sha":"56b7dee8d0150ae728028d68e12341bd9ad49f42","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T22:36:11.608Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-44bc65f7d87f63b90c203ced9fb59eed","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=065d97a3-1216-46a1-b712-6c013a6ce346\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=065d97a3-1216-46a1-b712-6c013a6ce346\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=065d97a3-1216-46a1-b712-6c013a6ce346\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ccb75aa3-9971-4f40-a65c-76a0cc3befc9","user_code_job_started_at":"2026-10-11T22:39:06.684Z","user_code_job_completed_at":"2026-10-11T22:53:21.418Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=eb3fb6bdd715823c79b60b1a1c624c4b07a0421f040c5966752f679974a39ec6","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"77417e37-0eee-43bb-8fc1-8a021ac51582","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.70","github_commit_sha":"f3aa03eb153a068a22c1829639f777ffc528d46a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T18:05:56.434Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-126325b55007d15e27e1299a83142df6","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8b45361d-5fd5-4024-bcdd-807bd6e45ee5","user_code_job_started_at":"2026-10-11T18:15:19.117Z","user_code_job_completed_at":"2026-10-11T18:45:26.663Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=90043df0c456a71504a42a22756461b7219ebbba5fb4aa817fb95a86972072a8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"911bcb7b-1140-48cf-ab7f-65bd1045d488","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.69","github_commit_sha":"f3aa03eb153a068a22c1829639f777ffc528d46a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T17:55:16.591Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-126325b55007d15e27e1299a83142df6","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"af8a3235-d907-4237-a1a7-b9830d43a244","user_code_job_started_at":"2026-10-11T18:01:23.566Z","user_code_job_completed_at":"2026-10-11T18:02:49.729Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=600c6714fcc2e0bbdc697f36e532c89a3abddcd0db318489767f690e1b5a1ac2","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7f6b423c-4351-4427-8cb3-45b53ac17f4f","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.68","github_commit_sha":"d473f8e4c721faa3d8e6501f802e6651080296c8","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T12:45:39.431Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-a877d05a10a3ef75cc653a13c76a547e","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7f6b423c-4351-4427-8cb3-45b53ac17f4f\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7f6b423c-4351-4427-8cb3-45b53ac17f4f\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7f6b423c-4351-4427-8cb3-45b53ac17f4f\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"76441a13-1a2b-4925-977f-7b4edb582ad4","user_code_job_started_at":"2026-10-11T12:47:58.785Z","user_code_job_completed_at":"2026-10-11T13:10:31.349Z","user_code_job_error":{"message":"Failed to store output file, see build logs","error_code":"failed_to_store_output_file"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f65010f3edd926923dfb32e3377db9adb02ac74ea28bf1b802736084a9f2c646","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"bfb2fdc4-c0c9-43c1-997f-5691f49834be","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.67","github_commit_sha":"f543137dfe915c06098bbaa614b18797ec6c3773","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T11:59:42.982Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-d231080308356210bbbc6e09be0251cc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bfb2fdc4-c0c9-43c1-997f-5691f49834be\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bfb2fdc4-c0c9-43c1-997f-5691f49834be\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bfb2fdc4-c0c9-43c1-997f-5691f49834be\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"b877270e-86de-4291-82d4-f8f9a204b6b5","user_code_job_started_at":"2026-10-11T12:02:05.460Z","user_code_job_completed_at":"2026-10-11T12:09:50.289Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4268cde4b26eb2d6602a6a2b0ed65b85208501aa0cc8e0504d4a8b355dfc0cef","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"231121ca-edee-47ec-9a48-e485a6053df4","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.66","github_commit_sha":"f2909b45edf453e486c1f6bb8531e71142161fa2","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T11:49:31.720Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-0b2e18874d6c4896bcfbab8bc50c9cc2","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=231121ca-edee-47ec-9a48-e485a6053df4\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=231121ca-edee-47ec-9a48-e485a6053df4\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=231121ca-edee-47ec-9a48-e485a6053df4\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"f5e49f2c-c7f0-407c-bf14-f0db330ae913","user_code_job_started_at":"2026-10-11T11:51:53.629Z","user_code_job_completed_at":"2026-10-11T12:04:24.511Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=6555e47926a20d5cb1859629bda5cdfefbd6ec6e3b3b6dd64efe6e134ee16e67","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d8bfd915-d871-4fc2-b8ba-4e9ac157c9a6","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.65","github_commit_sha":"084b71eb3ae35083ee0c4f1ee021f4cf12be5ca3","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T07:46:49.342Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6484a3e4a221b056d269bdff76c054c5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d8bfd915-d871-4fc2-b8ba-4e9ac157c9a6\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d8bfd915-d871-4fc2-b8ba-4e9ac157c9a6\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d8bfd915-d871-4fc2-b8ba-4e9ac157c9a6\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"dbd21634-ced1-4464-be45-20905f1e0f3e","user_code_job_started_at":"2026-10-11T07:49:18.655Z","user_code_job_completed_at":"2026-10-11T07:57:57.872Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=27d0af12ab8af221ef59cb1c16b47786309ad6af652600871be8fa69a5afd53a","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"72bfc77d-46fd-4d13-aca2-216eee3815f5","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.64","github_commit_sha":"36deebd3b9980e30bf43f1255828c2a2500b7ba7","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T06:44:41.060Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-51bdcaa276a057be38d2f28cc7ea5b79","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=72bfc77d-46fd-4d13-aca2-216eee3815f5\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=72bfc77d-46fd-4d13-aca2-216eee3815f5\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=72bfc77d-46fd-4d13-aca2-216eee3815f5\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ce044191-6a10-47b1-95d7-48cd3fd512a8","user_code_job_started_at":"2026-10-11T06:47:19.163Z","user_code_job_completed_at":"2026-10-11T06:55:46.411Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=bc18703d3c5d204d7f3fc9d9ebef7eede8101215fdf1e1f0b48e2fcc89c5c276","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a294b5b2-ccf2-485b-aa41-a4ba19280f1a","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.63","github_commit_sha":"8d9fd9ae5d5649b31adeeb09f02fa57349ef1f15","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T06:29:27.743Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-8935ca52f4715fa89cc3504fdaff69bd","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a294b5b2-ccf2-485b-aa41-a4ba19280f1a\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a294b5b2-ccf2-485b-aa41-a4ba19280f1a\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a294b5b2-ccf2-485b-aa41-a4ba19280f1a\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ebb41daa-7cfb-498a-9431-bbee97fa2f53","user_code_job_started_at":"2026-10-11T06:32:31.940Z","user_code_job_completed_at":"2026-10-11T07:02:00.908Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=01f0a6bb99ee24d6a416cb7afe3890ac4a411471b2280de9a148f0af9e90b7e5","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"9476456b-832b-4041-b527-2855d7155611","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.62","github_commit_sha":"56729549ba0ac8c60ce19137651d952b5ae1da34","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T03:53:07.647Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-0a53e3b1400e9d438ff5a4d98ded6cea","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9476456b-832b-4041-b527-2855d7155611\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9476456b-832b-4041-b527-2855d7155611\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9476456b-832b-4041-b527-2855d7155611\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"4df7fbce-53bb-443f-9050-e03106c1f2e6","user_code_job_started_at":"2026-10-11T03:55:15.153Z","user_code_job_completed_at":"2026-10-11T04:03:24.691Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c2bce7a108e495c2f551247878a2068d174bd8da4a049585ff19e9c5aaf36597","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1807e2c5-7fd8-4650-93b8-4203a9c79353","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.61","github_commit_sha":"0a53acee2ff69f08097d9d3b2407c6b0b190f70f","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T03:31:21.318Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-7ae422a4126822df86f8d5a4f28df761","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1807e2c5-7fd8-4650-93b8-4203a9c79353\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1807e2c5-7fd8-4650-93b8-4203a9c79353\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1807e2c5-7fd8-4650-93b8-4203a9c79353\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2a12829a-afed-4701-9271-16c6cc855076","user_code_job_started_at":"2026-10-11T03:33:28.207Z","user_code_job_completed_at":"2026-10-11T03:43:29.622Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=debda48a753377bd861800c82db4b01bcd50644dc63b62ced7c432791f5b179c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"4a7f4e1a-e5cc-4346-9e5b-2728b919f005","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.60","github_commit_sha":"509c650224688afd320fab2e4b82ea0ee98fbe2c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T02:46:56.475Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-159399855032b01dbde5f9aa4f3b73a5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4a7f4e1a-e5cc-4346-9e5b-2728b919f005\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4a7f4e1a-e5cc-4346-9e5b-2728b919f005\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4a7f4e1a-e5cc-4346-9e5b-2728b919f005\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"d058f043-ac81-4e58-8a9c-c641eec32fc1","user_code_job_started_at":"2026-10-11T02:48:56.664Z","user_code_job_completed_at":"2026-10-11T02:57:17.633Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=d8c5dda8ea9656d862860904a1fef14f6784508b92ae2a04ea2705f635a129e7","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"6f08e5a7-32e6-4af5-8e63-7ed8c3fd6aff","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.59","github_commit_sha":"1c6b513a8ffac9b9c9e4ea62a5c74944cbcd951a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T02:07:13.342Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-8a5c11d44078748836cba05abcf44a45","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6f08e5a7-32e6-4af5-8e63-7ed8c3fd6aff\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6f08e5a7-32e6-4af5-8e63-7ed8c3fd6aff\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6f08e5a7-32e6-4af5-8e63-7ed8c3fd6aff\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"536b2dd0-eee7-47e1-b856-151ffd8f06bf","user_code_job_started_at":"2026-10-11T02:09:24.378Z","user_code_job_completed_at":"2026-10-11T02:21:17.711Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=76ad0d82445586831cbfcd9e44eaf7fa963a9c038d321d8a303a7dca530fce0b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"0f5802f6-734d-47cc-9a35-5c2f97920b6e","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.58","github_commit_sha":"61d2d66f19d42bdcb0541ae2fd6934e2f135d173","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T01:14:32.569Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-1220e6229bc18dbbbdeda2f946828576","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"78bf5156-d290-4210-8992-6a012216a0e3","user_code_job_started_at":"2026-10-11T01:16:33.531Z","user_code_job_completed_at":"2026-10-11T01:48:49.882Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=a03f9f2834fd0b689e2f7e5e015448eede2bb19b88e10161e9ca77306bdedec2","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"6a3ae86a-8ab9-45d3-98ca-3b7bf71524f0","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.57","github_commit_sha":"3ee04f1223e0b22a957d7ee6ef52a36639f49f7a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-11T00:40:16.509Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-88f9900b57a8704e8c963c2cf367bb42","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a3ae86a-8ab9-45d3-98ca-3b7bf71524f0\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a3ae86a-8ab9-45d3-98ca-3b7bf71524f0\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a3ae86a-8ab9-45d3-98ca-3b7bf71524f0\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"5fc8e867-ee1a-44e1-bdfe-9fe20a218edf","user_code_job_started_at":"2026-10-11T00:42:39.230Z","user_code_job_completed_at":"2026-10-11T00:49:40.399Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=9d79b48a20e467d8b2a511d9b9d0ae20686c560ddd08450aeee4bd2241de352f","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"bdef37e4-0ffd-45e0-ae93-4ae45f174771","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.56","github_commit_sha":"9aa7f0494c21b1bf80172229be5dc479cb161da7","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T23:24:25.629Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-35264a81977777b0c370fb5268a9c747","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bdef37e4-0ffd-45e0-ae93-4ae45f174771\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bdef37e4-0ffd-45e0-ae93-4ae45f174771\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=bdef37e4-0ffd-45e0-ae93-4ae45f174771\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"aebc3bef-cd62-448c-b5bd-375b4758d810","user_code_job_started_at":"2026-10-10T23:26:21.636Z","user_code_job_completed_at":"2026-10-10T23:33:13.069Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1f7f1ff5eb3091488b522a190c5bdd94c5ef00de7f32a5d3a8c7710c8edcf11c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"42a6bc46-90e9-483c-87b1-7b6f1e7ab9cf","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.55","github_commit_sha":"b131a20c4cbb718690f9e7ab57e86acf09dea1a4","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T22:38:24.230Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-35264a81977777b0c370fb5268a9c747","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=42a6bc46-90e9-483c-87b1-7b6f1e7ab9cf\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=42a6bc46-90e9-483c-87b1-7b6f1e7ab9cf\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=42a6bc46-90e9-483c-87b1-7b6f1e7ab9cf\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"089d8dd6-5535-43bb-9a7f-1c04674edb46","user_code_job_started_at":"2026-10-10T22:40:26.645Z","user_code_job_completed_at":"2026-10-10T22:47:31.555Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=835916a50804d84e3c201bc296a522e8556cf9d4b50c9504a385e8751534aff3","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"8f195fff-3e85-4ee7-a4fd-d2ff05b8909c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.54","github_commit_sha":"f7d74d3f20d73caa22ff136048b776b680c9abc1","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T22:04:35.240Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-b738f5c052c0d1d2740999e627dbc50f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8f195fff-3e85-4ee7-a4fd-d2ff05b8909c\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8f195fff-3e85-4ee7-a4fd-d2ff05b8909c\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8f195fff-3e85-4ee7-a4fd-d2ff05b8909c\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"56b9d06d-7581-4840-a8f6-67daccfc4d1a","user_code_job_started_at":"2026-10-10T22:06:50.736Z","user_code_job_completed_at":"2026-10-10T22:13:56.659Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=d8e1e4a340b9d4afd2952dfdcf21870c9008c0d0ed713d20d5d408fe95f89d17","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"b318d29f-c0db-4f47-8864-b65dee62bad2","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.53","github_commit_sha":"57a7f335cae69e88ff74667ab7f4f96ecada499e","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T21:48:22.223Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-94307c3f68e1486b39a2d9c09a738a86","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b318d29f-c0db-4f47-8864-b65dee62bad2\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b318d29f-c0db-4f47-8864-b65dee62bad2\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b318d29f-c0db-4f47-8864-b65dee62bad2\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"456e302e-e663-4a80-a42c-65e4e6059b59","user_code_job_started_at":"2026-10-10T21:52:05.467Z","user_code_job_completed_at":"2026-10-10T22:00:39.240Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=20f836f5a960fc3fb4f603aaffac11e2a0db5edf8150470b5dfa6da86a0e735d","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"e42dcedb-113f-47ac-8f6c-a026653ab8e6","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.52","github_commit_sha":"57a7f335cae69e88ff74667ab7f4f96ecada499e","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T21:44:04.671Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-94307c3f68e1486b39a2d9c09a738a86","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e42dcedb-113f-47ac-8f6c-a026653ab8e6\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e42dcedb-113f-47ac-8f6c-a026653ab8e6\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e42dcedb-113f-47ac-8f6c-a026653ab8e6\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"47772209-9a82-49dc-afa0-8d25ebce1d2d","user_code_job_started_at":"2026-10-10T21:48:42.842Z","user_code_job_completed_at":"2026-10-10T21:56:14.351Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=502b884657fc9afaa05f2bc8751b97c7860f3451ba60d3c8ac1e795ab501c2e0","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1af96559-66a4-468f-86e6-ff7893db37fc","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.51","github_commit_sha":"57a7f335cae69e88ff74667ab7f4f96ecada499e","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T21:38:59.138Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-94307c3f68e1486b39a2d9c09a738a86","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1af96559-66a4-468f-86e6-ff7893db37fc\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1af96559-66a4-468f-86e6-ff7893db37fc\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1af96559-66a4-468f-86e6-ff7893db37fc\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"72a78970-a409-4968-954d-2000aecc56db","user_code_job_started_at":"2026-10-10T21:44:21.660Z","user_code_job_completed_at":"2026-10-10T21:54:30.757Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=dbc138d71656d4bcf4646d7c14740541fa981b487dbc081ca568d8f728c73269","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"9a45a251-a8f0-43d0-8941-99771c438100","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.50","github_commit_sha":"23287ea27fa5284220bd960cfd6d53fdfdc96f80","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T14:06:41.165Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-368eb7d4467f8fce6c1371c4cabf5a8b","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9a45a251-a8f0-43d0-8941-99771c438100\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9a45a251-a8f0-43d0-8941-99771c438100\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9a45a251-a8f0-43d0-8941-99771c438100\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"6e572e9d-ad09-4650-93c6-d38af42cf66e","user_code_job_started_at":"2026-10-10T14:08:52.169Z","user_code_job_completed_at":"2026-10-10T14:16:40.728Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f5040d3259932dfcbea3b021f1a672a94a70dbf7ce057d5a0b61545945fd1ac7","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"8c52fba9-4845-4a23-ae15-076a196e0b4c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.49","github_commit_sha":"62329796015d6a25a0570a4c03b4937ceb5f3d63","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T09:54:12.667Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-307a0afceacbd17a5673b8699f28fa34","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8c52fba9-4845-4a23-ae15-076a196e0b4c\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8c52fba9-4845-4a23-ae15-076a196e0b4c\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8c52fba9-4845-4a23-ae15-076a196e0b4c\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2e019988-d0d9-45d6-b9d8-1087f75067d8","user_code_job_started_at":"2026-10-10T09:56:31.298Z","user_code_job_completed_at":"2026-10-10T10:05:05.849Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1e91128a92861cfd9dccbe0458d65838ce322669ac047acd1964a46e08513b93","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"b31fa5ae-6b90-4ebb-af27-b1ca2c79f724","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.48","github_commit_sha":"a8688e9488fce955834c7015a15bbd76ff149f5b","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T09:36:16.141Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-b41d0c9b6996f5224f84a96e13fa2e64","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b31fa5ae-6b90-4ebb-af27-b1ca2c79f724\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b31fa5ae-6b90-4ebb-af27-b1ca2c79f724\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=b31fa5ae-6b90-4ebb-af27-b1ca2c79f724\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"e8666aa1-161a-4380-b208-4bac3c32c0fd","user_code_job_started_at":"2026-10-10T09:38:19.268Z","user_code_job_completed_at":"2026-10-10T09:44:42.779Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4d26a9ddb25d65c82a0b497eafc3b48c871dc8d8aff7b614817192d22dfa91eb","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7cb9da0d-bf6f-49ba-8c2a-55968bd2c58e","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.47","github_commit_sha":"b38aa63c568504deec009184d52fd277ab1c7e7c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T09:04:12.354Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-9e6e07f75df843a82c0045e25a5b8c62","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7cb9da0d-bf6f-49ba-8c2a-55968bd2c58e\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7cb9da0d-bf6f-49ba-8c2a-55968bd2c58e\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7cb9da0d-bf6f-49ba-8c2a-55968bd2c58e\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"49d09623-aca8-4a79-b9b3-874e45352e9d","user_code_job_started_at":"2026-10-10T09:06:09.797Z","user_code_job_completed_at":"2026-10-10T09:13:11.555Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=67782a97d7bfa9eac9cf1e699c1d1291e69a58a7c5fec6a7a0c76f7c99d6808d","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d45f7582-d6df-483a-a9a8-c70495710f12","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.46","github_commit_sha":"51d4abeef20cd5ba113ff5a20b78f97c0e055ef3","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T08:36:19.895Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6306d3bafed887e68b4773fd04576e62","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d45f7582-d6df-483a-a9a8-c70495710f12\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d45f7582-d6df-483a-a9a8-c70495710f12\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d45f7582-d6df-483a-a9a8-c70495710f12\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"9346ed66-5dab-4ec9-862c-5100b45ff008","user_code_job_started_at":"2026-10-10T08:38:28.583Z","user_code_job_completed_at":"2026-10-10T08:45:33.523Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4f3629a3561b50d4ff8102f3e941a0c39e711d6fb3285968c5d80f4d5fc11d9f","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"00b07937-e3de-477f-bd68-f1417785efce","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.45","github_commit_sha":"b981f096348ff480466346ac4371a59b7f41de05","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T07:16:07.569Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-b08bc65d324ae54f9eb6a0f318eb2548","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=00b07937-e3de-477f-bd68-f1417785efce\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=00b07937-e3de-477f-bd68-f1417785efce\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=00b07937-e3de-477f-bd68-f1417785efce\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2363d9bf-0844-4f85-9e22-df35b3c96d04","user_code_job_started_at":"2026-10-10T07:18:23.212Z","user_code_job_completed_at":"2026-10-10T07:25:37.429Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=d6abfbb10d4a804f080ec5fe9d1be6578c99cff73c4e55b481cb97fd4718fed8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"5a02682b-1048-4882-aaed-aa0a9be53056","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.44","github_commit_sha":"d2a031a9567a39b6d79b2f984d2c3fdae52ac53d","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T05:27:29.293Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-62e1761ece366bbfbcf7168a293359b5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5a02682b-1048-4882-aaed-aa0a9be53056\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5a02682b-1048-4882-aaed-aa0a9be53056\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5a02682b-1048-4882-aaed-aa0a9be53056\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8401534f-fc30-4a60-87e3-59efec38437b","user_code_job_started_at":"2026-10-10T05:29:27.750Z","user_code_job_completed_at":"2026-10-10T05:36:04.141Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=cd7920e1e4bcf4f8dcaf67eee6ccb92edefd0709d75de5dc175fc38f516ab77f","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"73d8181f-6ff2-4c57-a90f-bbf2f5ab4f20","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.43","github_commit_sha":"d02df91171e6f44e42e1531dce0d28b64a0d0e21","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T04:32:59.241Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-68d8425e72d09c645f6a44b00c5e86a3","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=73d8181f-6ff2-4c57-a90f-bbf2f5ab4f20\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=73d8181f-6ff2-4c57-a90f-bbf2f5ab4f20\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=73d8181f-6ff2-4c57-a90f-bbf2f5ab4f20\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2e262e05-403d-48f5-8b45-53d28604026d","user_code_job_started_at":"2026-10-10T04:34:59.327Z","user_code_job_completed_at":"2026-10-10T04:42:42.830Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=844458c29e51196f2b9c3829ea7f481a6d5adab7e3251810961140179e3800e0","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7be88670-b6b1-46f6-a7d8-053df5b9459b","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.42","github_commit_sha":"d28bcf61d0d0479ad3a44b3ad14bfbf5b858c435","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-10T02:59:16.411Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-a706ac10c86908fbbc0973f9fe0a2ae7","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be88670-b6b1-46f6-a7d8-053df5b9459b\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be88670-b6b1-46f6-a7d8-053df5b9459b\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be88670-b6b1-46f6-a7d8-053df5b9459b\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"a678247c-c802-4c72-8889-d86356863394","user_code_job_started_at":"2026-10-10T03:01:09.356Z","user_code_job_completed_at":"2026-10-10T03:09:41.265Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c68ad19f7b9c85cc74624d7da79550982839d4f5a908f22951ca84104b066bca","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7be1a9a2-ec51-4861-8bf0-50f01a755122","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.41-pr1-45b2fe12","github_commit_sha":"45b2fe129156352d2987e32b4da22a97e59a78d6","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-10T02:14:28.153Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-a706ac10c86908fbbc0973f9fe0a2ae7","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be1a9a2-ec51-4861-8bf0-50f01a755122\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be1a9a2-ec51-4861-8bf0-50f01a755122\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7be1a9a2-ec51-4861-8bf0-50f01a755122\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"bf9e54da-47d3-461b-a3bc-989ca4d0ba41","user_code_job_started_at":"2026-10-10T02:16:37.458Z","user_code_job_completed_at":"2026-10-10T02:23:10.669Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1b50b6c4a41860dd563f0ecdc2c72644d7cc452ff8dba4605518ba10f1fe8862","ai_review_requested":false,"github_pr_number":1,"github_pr_title":"Add temperature and phase-current diagnostics with revised motor-stage layout","github_branch_name":"codex/reference-board-eco"},{"package_release_id":"6a74aaeb-bd2c-40cb-b3fd-18f322a4fb31","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.41-pr1-3716b208","github_commit_sha":"3716b2086cf352be93dd1887524b6f01f13c0295","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":true,"created_at":"2026-10-09T18:46:07.060Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6d10a0013acfe4624d9d676049483095","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a74aaeb-bd2c-40cb-b3fd-18f322a4fb31\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a74aaeb-bd2c-40cb-b3fd-18f322a4fb31\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6a74aaeb-bd2c-40cb-b3fd-18f322a4fb31\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"af4032f5-9e99-40a3-9aa8-701e9816517b","user_code_job_started_at":"2026-10-09T18:49:15.276Z","user_code_job_completed_at":"2026-10-09T18:57:18.278Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=660d6a7345b1206043fa85e109e292fbf2036eea82dc6f0607716f9cc7e07f54","ai_review_requested":false,"github_pr_number":1,"github_pr_title":"Add temperature and phase-current diagnostics with revised motor-stage layout","github_branch_name":"codex/reference-board-eco"},{"package_release_id":"fd35adca-3581-484d-94be-c9a98ee9861b","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.41","github_commit_sha":"49c3ac7836e0595798955490af49c769ca056bc6","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-09T13:52:22.312Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-791a84ef13a7d605d273dfa4b96fec46","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fd35adca-3581-484d-94be-c9a98ee9861b\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fd35adca-3581-484d-94be-c9a98ee9861b\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fd35adca-3581-484d-94be-c9a98ee9861b\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"3107373b-0a9f-4f63-9e43-2d93da576b19","user_code_job_started_at":"2026-10-09T13:54:24.310Z","user_code_job_completed_at":"2026-10-09T14:00:24.836Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=45a11a8ebed6b51cb6bf1013175e8b99cdb754e382560edf8055dff287f5f5c0","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"65f5dbaf-ccdc-479a-a06a-604b57b5f303","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.40","github_commit_sha":"33eb130d5725f9d265072ca58795b973c76261dc","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-09T08:03:48.054Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-03c55b30ec6a09b1302ca70941bc715f","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=65f5dbaf-ccdc-479a-a06a-604b57b5f303\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=65f5dbaf-ccdc-479a-a06a-604b57b5f303\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=65f5dbaf-ccdc-479a-a06a-604b57b5f303\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"01a59879-4097-4d2e-b0bd-32d9b33b9dc9","user_code_job_started_at":"2026-10-09T08:05:36.048Z","user_code_job_completed_at":"2026-10-09T08:13:17.703Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f36b779ffedd96376efc16ee3ea969e5d8c7af54e176145cb2a77595c864e7d5","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"fc3d1ec4-7f6b-46fe-9040-a7b96a36b50b","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.39","github_commit_sha":"3cb470b1edb3a1562233fa85b4c145d706f3ea6c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-09T07:02:02.643Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-3e685d3d165f336946b4a5beab06ab9a","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fc3d1ec4-7f6b-46fe-9040-a7b96a36b50b\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fc3d1ec4-7f6b-46fe-9040-a7b96a36b50b\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=fc3d1ec4-7f6b-46fe-9040-a7b96a36b50b\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"b827e03f-ae79-4aae-af5c-ebc49876166f","user_code_job_started_at":"2026-10-09T07:03:34.831Z","user_code_job_completed_at":"2026-10-09T07:09:38.978Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=2036f9f28144dac1a1e546a613d6dac7fca5a275129730006a9033af85cffdd7","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"5788ebbb-7aa1-4eb5-8ebb-b8b25a6aa79c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.38","github_commit_sha":"46980626ef47632b15ee1ce70e23858e21f59128","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T19:03:22.412Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-e2d97f7cc41e9a05cca73e95fefa3008","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5788ebbb-7aa1-4eb5-8ebb-b8b25a6aa79c\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5788ebbb-7aa1-4eb5-8ebb-b8b25a6aa79c\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=5788ebbb-7aa1-4eb5-8ebb-b8b25a6aa79c\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"0fc9d2ce-2348-4f4e-8118-092364dbe5b7","user_code_job_started_at":"2026-10-08T19:04:51.829Z","user_code_job_completed_at":"2026-10-08T19:11:57.855Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=3f4e9d68757aa25c85b9b0bcace432fbd74a086fbbf442d152686e19f236d238","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"4b29c801-5969-4599-8518-51a5bf65343b","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.37","github_commit_sha":"c32ecc253c0c87f81efad8563f4991ac8ca44904","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T18:10:53.615Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-2000aed340fabc10742a8adf8df472c5","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b29c801-5969-4599-8518-51a5bf65343b\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b29c801-5969-4599-8518-51a5bf65343b\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b29c801-5969-4599-8518-51a5bf65343b\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"049a58b7-f829-4da0-b3e4-2918f32bc90c","user_code_job_started_at":"2026-10-08T18:12:33.393Z","user_code_job_completed_at":"2026-10-08T18:18:39.362Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4fb61a64bd4e2a9b6b9db3633e1b1b84e3e75b7e34dc4b94d62ab209c09cdf09","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"967d34cd-77f9-4675-af4f-28b12adf002e","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.36","github_commit_sha":"002a0aa17dba72394e3b8a5f44ab0bd84d728811","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T17:32:10.903Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f4afc261692abd13ef7d45bff63cb5fd","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=967d34cd-77f9-4675-af4f-28b12adf002e\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"1e3084e0-0bc9-4ffb-862e-93d58b0af091","user_code_job_started_at":"2026-10-08T17:33:38.491Z","user_code_job_completed_at":"2026-10-08T17:39:37.103Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=ce0d93def7acdd5dda21ed9420c695028faffead02d431d172f16fda781d5b80","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"6535907d-38a6-4fa0-97b4-3c1090c860d6","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.35","github_commit_sha":"978974af8b71a8c7411194ecaec222b3ba2218e9","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T17:21:06.699Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-ff5db487b9a18bb5a1a742390cd021db","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6535907d-38a6-4fa0-97b4-3c1090c860d6\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6535907d-38a6-4fa0-97b4-3c1090c860d6\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=6535907d-38a6-4fa0-97b4-3c1090c860d6\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8a0dce21-f432-4903-bd1e-5e9e67bf61fd","user_code_job_started_at":"2026-10-08T17:22:49.166Z","user_code_job_completed_at":"2026-10-08T17:28:17.230Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=01e54cf1db4e87c9230c8445c91b2109c7612e170bef324ed675354849181014","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"98ad6b26-748f-496e-a637-e9fd848177e9","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.34","github_commit_sha":"8a21b01edc17d7dc3e0f20044361854d1603cbeb","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T16:33:56.457Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-e073d68769c0b0b965a19a2b23c5d9cc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=98ad6b26-748f-496e-a637-e9fd848177e9\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=98ad6b26-748f-496e-a637-e9fd848177e9\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=98ad6b26-748f-496e-a637-e9fd848177e9\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"807ee466-4744-49c5-b987-6f7f5df7b633","user_code_job_started_at":"2026-10-08T16:35:28.248Z","user_code_job_completed_at":"2026-10-08T16:41:57.309Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4bf39c2a93485e1e74ab9e9d39f9c2c36fa7bfeeaf7ecfc992fa10aace6839cc","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"4b368397-6a2c-48c2-8bfa-914a62d61dc3","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.33","github_commit_sha":"712669cac963316a4ab46ed064f5592dcd5c6b0c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T15:12:02.575Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-66feca54a4a056a2eb5d4c253dfc6e48","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b368397-6a2c-48c2-8bfa-914a62d61dc3\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b368397-6a2c-48c2-8bfa-914a62d61dc3\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=4b368397-6a2c-48c2-8bfa-914a62d61dc3\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"16ec2b79-e12c-4955-aab1-56dd50d984e8","user_code_job_started_at":"2026-10-08T15:13:40.661Z","user_code_job_completed_at":"2026-10-08T15:19:45.235Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=ceec01495e950a1d7f1dd4e87e796ab9fd5df81efc3a6db39baa9e84e23d9dc9","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d0f7c852-2919-4843-8e26-86c363adc35e","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.32","github_commit_sha":"fcfede58e0a2503a63f964ceda50dd35b95f8582","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T14:21:13.061Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-5ec4b7f6b3efd390e18ca998388722f0","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d0f7c852-2919-4843-8e26-86c363adc35e\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d0f7c852-2919-4843-8e26-86c363adc35e\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=d0f7c852-2919-4843-8e26-86c363adc35e\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"f1cef6bd-3a8c-41b0-adf9-2a7cac53caa6","user_code_job_started_at":"2026-10-08T14:23:00.636Z","user_code_job_completed_at":"2026-10-08T14:29:16.734Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=a6abedfaccaa769d7e918cb150d44e3e9261e161d8b052e1e9b656d13cc3540e","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"331985f3-940c-489d-8254-7cb587a9c8cd","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.31","github_commit_sha":"6c2efd2e172d8e46e32438ee678392d56c7da311","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T13:53:06.924Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-ad51be059545c4e3d53280808a2679cc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"a9b92943-141e-496b-9e18-8b677b0c4394","user_code_job_started_at":"2026-10-08T13:54:42.494Z","user_code_job_completed_at":"2026-10-08T13:57:41.778Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=d56f9377ad62c14e42e7dcf0bdd3c238873c8bd037582c4ed705c5e6471292df","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"e58c8145-e148-4f02-ba23-91d6992e57c4","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.30","github_commit_sha":"b9597d0e62f9b7cf2cd7eaaa8828e6b62422e8ed","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T13:25:38.268Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-224b2381b05d9c81b471bca7de647a50","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e58c8145-e148-4f02-ba23-91d6992e57c4\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e58c8145-e148-4f02-ba23-91d6992e57c4\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e58c8145-e148-4f02-ba23-91d6992e57c4\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"cd83b2d7-ed49-400c-a99a-02cf13628f71","user_code_job_started_at":"2026-10-08T13:27:15.335Z","user_code_job_completed_at":"2026-10-08T13:31:28.618Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=19580a7f3c2c93ef1ce43b44344c4e6b4960d5d66bfda4818b9d1079c41c5bc8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"7ba31aa7-6727-424b-8c5a-8fb4c5489112","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.29","github_commit_sha":"b83f2b8c5aa03569418d946d0e5a691b1856cab7","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T08:26:39.886Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-e93a7be31bd2d69a709f9af783081d7d","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7ba31aa7-6727-424b-8c5a-8fb4c5489112\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7ba31aa7-6727-424b-8c5a-8fb4c5489112\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=7ba31aa7-6727-424b-8c5a-8fb4c5489112\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2de39105-b642-452e-a40c-a8021d1da9f0","user_code_job_started_at":"2026-10-08T09:08:07.223Z","user_code_job_completed_at":"2026-10-08T09:38:10.666Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=a7ddb56c3f63f43d33077da35a1140bea0bef9787617c3fe97c1894dce32ac52","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"153e06d4-2fa1-455b-bf42-8af0eee879ce","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.28","github_commit_sha":"1e7ec3be4f9645c418bbab8fc984d566611f8724","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T07:24:37.265Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-a3a7716868dedf1fcc575bff523a40bc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=153e06d4-2fa1-455b-bf42-8af0eee879ce\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=153e06d4-2fa1-455b-bf42-8af0eee879ce\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=153e06d4-2fa1-455b-bf42-8af0eee879ce\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"a6f893e2-bd4c-45fd-a448-9bef40b07ff5","user_code_job_started_at":"2026-10-08T07:40:59.184Z","user_code_job_completed_at":"2026-10-08T07:45:20.933Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=2ee2aa5367ac006cc9f16afd6cb1d3498c3ba675183d47351a28a4bb9945cf95","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"0e92428d-5926-44eb-8328-e2094c632e38","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.27","github_commit_sha":"40cd07ae5d91bcfae1c7e169f63c41cfa50be9e3","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T07:16:13.212Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6ad30f03cc3adcc67edc45f677d4ae52","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2cf089bd-e8ac-42c7-b2d7-e546dc61a72a","user_code_job_started_at":"2026-10-08T07:17:35.697Z","user_code_job_completed_at":"2026-10-08T07:29:46.326Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f3d2475937da4e00b3a8d6dcd68eca6e584be6fafb36f6b5e504076bf118b88b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"925a914f-a7ff-4d43-8050-686b3786ff62","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.26","github_commit_sha":"c93f4526d885872a8d29e98b7d4fd4229f7b87d7","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T07:09:05.864Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-a4fb32cd36aeeec5ea79e243436b9079","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=925a914f-a7ff-4d43-8050-686b3786ff62\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=925a914f-a7ff-4d43-8050-686b3786ff62\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=925a914f-a7ff-4d43-8050-686b3786ff62\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"8a5d58bf-cf66-4ada-a22d-96eec82a8346","user_code_job_started_at":"2026-10-08T07:11:41.389Z","user_code_job_completed_at":"2026-10-08T07:15:16.957Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=739c014e16a7aa4d04a32ae9086e62a8f57eb223f3c1ab53676296c6d8869008","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"338394d2-cc4f-4d4f-9c25-ee3822e03326","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.25","github_commit_sha":"d6e916016b30f588fcf9e4a3b83c07c9550fb834","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T07:04:36.232Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-adbbbd133e0ce56929a6a60af34ecf9d","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=338394d2-cc4f-4d4f-9c25-ee3822e03326\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=338394d2-cc4f-4d4f-9c25-ee3822e03326\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=338394d2-cc4f-4d4f-9c25-ee3822e03326\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"506c82d9-2300-4c40-a936-580eb064ccee","user_code_job_started_at":"2026-10-08T07:06:03.083Z","user_code_job_completed_at":"2026-10-08T07:11:52.525Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=8825ae4d87b1b3903c8422bc32e7826e61165e33a50fbf21057a94c8e001426b","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"52682ce8-441d-4c88-ad7d-81f90324e1f3","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.24","github_commit_sha":"29624a436cf767fafcd74dbfcab10ff02cba093c","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-08T02:35:37.128Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-5ca18f995bd59d376d9b6b1c08bfafda","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=52682ce8-441d-4c88-ad7d-81f90324e1f3\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=52682ce8-441d-4c88-ad7d-81f90324e1f3\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=52682ce8-441d-4c88-ad7d-81f90324e1f3\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"5f91fc24-ab53-4322-89cc-1a3fd3e128d0","user_code_job_started_at":"2026-10-08T02:39:55.306Z","user_code_job_completed_at":"2026-10-08T02:45:51.610Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=366b754cb679cf135871f71c972a2f524a3019e1dd7b1d25ca48ee90b21fc5ec","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"b6c0a21d-1ee5-4113-bd78-f9c3f0fbe2da","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.23","github_commit_sha":"4633cba4a677e16e92c06289cd2600dfb2894d9d","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T19:46:06.352Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-157143b199b7f8f857d47b69f4904c47","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"915fb08d-0e5e-488d-8466-c8a9014e639a","user_code_job_started_at":"2026-10-07T19:47:37.903Z","user_code_job_completed_at":"2026-10-07T19:52:47.030Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=a40b3b97295c5b7cabc086b1478d5811eb819c1664ff3fbaa543ed00f986b410","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1287f2c1-b772-4120-b5f1-03f1f9e7a86f","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.22","github_commit_sha":"bf1528cfb345f90c964796767820497295252f5e","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T19:38:54.804Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-927762b7a80957a61948cdd60df27ace","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"bdb1c310-cbbf-41cb-a0be-85bcbef4e34a","user_code_job_started_at":"2026-10-07T19:40:09.729Z","user_code_job_completed_at":"2026-10-07T19:45:13.740Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=fba8282d6d1a7c68e2a54a2af907ef89d0c798d0c1f284590c8b032ae8a79a44","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"bb31c5f1-3c6a-42d7-93c9-6d898bee3657","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.21","github_commit_sha":"730f37c3526543ed51d5be3b904758dd7fd8f383","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T18:13:54.701Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-9f50a043af7e634c4527872be29c0b57","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"121c856e-1e43-434e-8156-44768bc5fb8c","user_code_job_started_at":"2026-10-07T18:17:09.699Z","user_code_job_completed_at":"2026-10-07T18:47:13.679Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c9e03a73d8be45f0d371d2f68222dff56fd0a7038b0b9b5cee3d0947dc122607","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"be229003-c95e-41c6-b45f-2aa220704225","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.20","github_commit_sha":"272350bea9636e867139a9c8d98fd1c69e8ff6bc","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T14:32:24.719Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-97169de4526066ed4facd8148daa8eae","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=be229003-c95e-41c6-b45f-2aa220704225\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=be229003-c95e-41c6-b45f-2aa220704225\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=be229003-c95e-41c6-b45f-2aa220704225\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"70da4c5d-ffad-4453-868d-5f6981bba778","user_code_job_started_at":"2026-10-07T14:52:17.251Z","user_code_job_completed_at":"2026-10-07T14:57:01.446Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f8a54cdb273da49e05c5f69a0f4ae38a6a3d97ed4eb7adbb16b9ffaa59ed2581","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1ec3a73d-d9b0-410f-92b0-33d821e4c7a0","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.19","github_commit_sha":"fd481d83e17540e1e4f2be48f25ee6f59b568e94","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T14:18:46.531Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-98fbac03a9028bcb033533d3a7f7b4c4","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1ec3a73d-d9b0-410f-92b0-33d821e4c7a0\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1ec3a73d-d9b0-410f-92b0-33d821e4c7a0\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=1ec3a73d-d9b0-410f-92b0-33d821e4c7a0\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"312fc5c9-f4f0-4bcc-a351-0fb58448010d","user_code_job_started_at":"2026-10-07T14:20:08.717Z","user_code_job_completed_at":"2026-10-07T14:25:36.326Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=a9e9a52feeb78cb60491d3d1efd8e1ab504444cf293cfd3df619828f593167d5","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a02a9661-0c3b-4572-8084-9e3d6eb2d49d","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.18","github_commit_sha":"05cdb495e6960f8efdad8a7870f8cd16f6713304","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T11:39:31.953Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-2ab04fc3190b21e346b20e6eb2189fe7","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a02a9661-0c3b-4572-8084-9e3d6eb2d49d\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a02a9661-0c3b-4572-8084-9e3d6eb2d49d\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=a02a9661-0c3b-4572-8084-9e3d6eb2d49d\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"7deef7df-6ec3-4090-89ff-ab347b394a1f","user_code_job_started_at":"2026-10-07T11:40:54.665Z","user_code_job_completed_at":"2026-10-07T11:51:27.071Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=7d0fb3868b9dd05503c9fc2d7485894bc798924ab3064c15c50649c966ca3f6c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"8dec38d6-0cf7-4106-99e3-dfbaab1aa764","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.17","github_commit_sha":"93caa4c912b5d9d735f496bc068972f194254712","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T08:21:14.340Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f7f4070a3e1bcc88594408836553140c","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8dec38d6-0cf7-4106-99e3-dfbaab1aa764\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8dec38d6-0cf7-4106-99e3-dfbaab1aa764\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=8dec38d6-0cf7-4106-99e3-dfbaab1aa764\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"64db2a40-8138-45bf-a37a-853ac9950e66","user_code_job_started_at":"2026-10-07T08:22:30.481Z","user_code_job_completed_at":"2026-10-07T08:26:53.737Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f742d94ded6ff3086cf7ebe924f46445672aa2cfd133b8f8de2515ba6aa4d19c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"01321b41-99dd-4f51-bef4-653f398ce88d","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.16","github_commit_sha":"ea730b91ef6de88ffd24c6cd0dab3059b7eb14c2","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T05:55:52.939Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-6ad9a0300bae3bd035bb25abec66d05b","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=01321b41-99dd-4f51-bef4-653f398ce88d\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=01321b41-99dd-4f51-bef4-653f398ce88d\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=01321b41-99dd-4f51-bef4-653f398ce88d\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"4b992892-cadc-4ded-a655-7e1768454e00","user_code_job_started_at":"2026-10-07T05:57:22.872Z","user_code_job_completed_at":"2026-10-07T06:14:51.711Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=62ded4c91b61a3e52e2e2a10bf42a7d268fcc2aa304ec46933ab05b9e3f95eed","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"10e147da-1404-477e-b25c-cefaa3d7b93f","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.15","github_commit_sha":"bfd73317c28d5c289b2ba8b99b16cf6d7d42c4b2","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-07T05:47:41.604Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-3e49f25baf641b473491ee66e8c4355e","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=10e147da-1404-477e-b25c-cefaa3d7b93f\u0026file_path=dist%2Frelease%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=10e147da-1404-477e-b25c-cefaa3d7b93f\u0026file_path=dist%2Frelease%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=10e147da-1404-477e-b25c-cefaa3d7b93f\u0026file_path=dist%2Frelease%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"6fabf79a-97c5-4f71-a9d8-5a1be5c81516","user_code_job_started_at":"2026-10-07T05:49:05.006Z","user_code_job_completed_at":"2026-10-07T05:54:24.613Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=39f8b4f63fd87529043a4d303f17839821cf54e4eec4f431c34cdedf85a57384","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"19d46d62-8e3b-45a3-958f-403be2e8e077","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.14","github_commit_sha":"4eb3389c3fe0af0309d95c304e15cec01c0e3065","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T19:37:48.502Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-9bba9c37989f6fdc72444e03b379fdc9","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"88a39e36-9034-45c4-9c61-843e03a2b885","user_code_job_started_at":"2026-10-06T19:43:05.598Z","user_code_job_completed_at":"2026-10-06T20:14:07.577Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=989ba823dbd5631c0dfe60ced28221112f755c4361b33d247c39e9ffd679854c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"2b34ac1f-ee29-4d93-85ff-71bed5233a0c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.13","github_commit_sha":"1d2a2d8aba1b2cd341996a5c8107db1e06787f3d","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T19:30:40.329Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-4c29eeb1ac68e211b7f99bcb4e002065","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"da65cb7c-9ffe-4629-b21f-baf4b18292b2","user_code_job_started_at":"2026-10-06T19:32:31.214Z","user_code_job_completed_at":"2026-10-06T20:03:37.891Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=3bf0a4d0d65715df529a7779ef55a0e6103aa5827d8167f88f76b16d21bd5aca","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"742f95dc-0dd7-4e0d-90d2-72da7bd16aab","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.12","github_commit_sha":"96da4aef0f1c20f15186934a47f17edf9f4d853a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T19:01:15.358Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-70cc4dab49b3f01f5840b749961dcfbc","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=742f95dc-0dd7-4e0d-90d2-72da7bd16aab\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=742f95dc-0dd7-4e0d-90d2-72da7bd16aab\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=742f95dc-0dd7-4e0d-90d2-72da7bd16aab\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"6cc2585b-ffbe-4f37-b84b-50c033edfb87","user_code_job_started_at":"2026-10-06T19:02:34.633Z","user_code_job_completed_at":"2026-10-06T19:08:57.175Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=0f0c97abff8a48a635bcbedc7aae320eda8aa8a03a3842e6a98b0d405a1ffb86","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"9d83bec7-3bed-44d3-933f-77ab9e450150","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.11","github_commit_sha":"7d2598bf6b672aa9ec9711c88794d93b9518b160","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T18:45:46.247Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-268fe87bd0775790f1cbcb98f2f39606","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9d83bec7-3bed-44d3-933f-77ab9e450150\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9d83bec7-3bed-44d3-933f-77ab9e450150\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=9d83bec7-3bed-44d3-933f-77ab9e450150\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"218e2163-658c-412c-812e-f536c45e1a42","user_code_job_started_at":"2026-10-06T18:47:31.588Z","user_code_job_completed_at":"2026-10-06T19:00:24.997Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=8c4099dd9cb5a25e33d59750aeeee51379d9b57f5c0e13bff312c1ed5828848c","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"88f497ac-737e-4389-a04b-4186c603a222","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.10","github_commit_sha":"caab067e988c266546edc7ce08d485000c6efe25","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T17:41:32.775Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-73a81021cea1f4b7fa8fd7756a33ca71","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"ed5d0fb5-9335-44cd-b73a-0280dfb2be7c","user_code_job_started_at":"2026-10-06T17:44:30.606Z","user_code_job_completed_at":"2026-10-06T18:14:35.791Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=fb1ea810c7d871d565ececb1fc7c62920d526cfa92e33c313865c2d788558ff7","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"6ddf804a-d2a5-4cde-adc5-002f0fd1583c","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.9","github_commit_sha":"f5853d58f5587f750cf1b180806c788ea07947e2","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T17:25:01.888Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-73a81021cea1f4b7fa8fd7756a33ca71","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"d30b691e-cd8b-4205-92f7-4ea085e73fac","user_code_job_started_at":"2026-10-06T17:27:26.466Z","user_code_job_completed_at":"2026-10-06T17:57:59.193Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f354ed38820bf6eeb81a0bd45ee3c36cf9765fd70ba98f23837ae0bf79080a7f","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"63e54acd-19cb-4dd8-b5db-e859a1fc7e55","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.8","github_commit_sha":"6ba318b64486eb58b27947457dcaba728e4ed14a","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T16:51:32.766Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-c4e805344751f29b2bf5a38d1f06e44b","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"1d5f8e74-d17f-4fcf-80e9-838e69bb60da","user_code_job_started_at":"2026-10-06T16:54:01.973Z","user_code_job_completed_at":"2026-10-06T16:59:24.033Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c933ff2a89cf1a242f4a28ff2b0400471942c5013dbe8e51ac8fddef397ed3f3","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d48ba8dd-dd58-4721-9ed7-b87b9f1e9560","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.7","github_commit_sha":"64600d9aaba59b9daf1c10aeba3870014aedc6ac","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T16:07:10.628Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-e13a6591a798d1796d45ae4c99ab90a9","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"b57d612f-4e97-41f9-b1dd-280b4530f7cd","user_code_job_started_at":"2026-10-06T16:08:23.645Z","user_code_job_completed_at":"2026-10-06T16:38:27.623Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1ee40a42701557fabad1b003fff6f459bc258897946ef3e4214ad5f6c016a2e8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"9856c4e8-0c72-4fdf-b19f-d3a057fc6b07","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.6","github_commit_sha":"39f4cbf2a48ecc95d4d1beb6060391c07905e044","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T15:34:08.900Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-bd0275c9e5d7ababcbd3406349a0abae","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"218298ec-e9ec-479c-a86c-0e65a97b34c8","user_code_job_started_at":"2026-10-06T15:36:11.727Z","user_code_job_completed_at":"2026-10-06T15:59:14.832Z","user_code_job_error":{"message":"Your code failed to build (exit code 1), see build logs for the error details","error_code":"user_code_build_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=60b6d881aa5e354df6d4b88ce6cd701ba13aa8f61e59e6e5e13f79f09f88a76a","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"a290c993-578a-4451-90fd-35a40c6fa092","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.5","github_commit_sha":"6a193cae27f732fd12de96c187897afcedbcc7bb","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T15:21:54.083Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-c22ceda335ffbe0caa644698afe7a77c","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"1d9f765f-3e41-4eb6-a4f9-83b913838ca3","user_code_job_started_at":"2026-10-06T15:23:02.175Z","user_code_job_completed_at":"2026-10-06T15:53:02.540Z","user_code_job_error":{"message":"Build timed out after 30 minutes","error_code":"user_code_job_timeout"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=4c571066768524b26433bc290cd14ce14d730fbeb9c72d275eb470b720c9e7e8","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"4666494f-dfff-4658-9bf6-360c8613d0e1","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.4","github_commit_sha":"098304dd51b99973b80e8f1d1544c82ccc6beb9f","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T14:03:01.338Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-3158e7d90bf06276a3d0eb705b404d38","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"e1be7c27-f75a-456b-81a1-945205533937","user_code_job_started_at":"2026-10-06T14:05:54.699Z","user_code_job_completed_at":"2026-10-06T14:08:25.904Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c55129327eb7f9268c285df5217e025cfb4466ef57174bbb130f5fb43301cfbc","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"1951c287-981b-440b-a4a3-ab6fd109b264","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.3","github_commit_sha":"1b2e1bf7eba170af94f36d05df39495afeb11f94","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T13:59:09.463Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f02a7c079c2cf59ef9e16844c9ec0960","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"5d1b0ac9-425a-469a-9329-80ee78d94336","user_code_job_started_at":"2026-10-06T14:00:39.121Z","user_code_job_completed_at":"2026-10-06T14:03:00.883Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=7788ab6e7c39f0b246bc97986001ecb4dcb72c222fc9e019636d7c03144ab477","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"12133327-ce66-4e40-beb0-a41cedb01268","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.2","github_commit_sha":"0adc1f70a10ffc89c4708c35f20ebd3c4bfa3fd9","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T13:31:05.916Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-09d88332364bfd90e94c8c9179f76de9","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"18e348c2-7ce7-40ae-b873-778b5a9ec8bd","user_code_job_started_at":"2026-10-06T13:32:21.801Z","user_code_job_completed_at":"2026-10-06T13:34:43.445Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=c6a2acb83a4165714512ff9d52b7e158340d0991d8a10718476ff4592b08933a","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"d2fdb39e-4407-4e81-a07f-06b564d043ba","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.1","github_commit_sha":"9c1bc9a84d3d9420e5b24d7fd32cb1c6d6b4a897","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T13:23:35.777Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-04223bed4706f1352ea11b9f20d4c00e","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"e689e889-1e4a-4e08-93b9-2e2d1998a902","user_code_job_started_at":"2026-10-06T13:25:22.951Z","user_code_job_completed_at":"2026-10-06T13:27:38.291Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=bd29bb37b16f3f758939fbbee31310d547db95ad17194276ac600037db80ab91","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"fcd5f663-00dd-41ed-95de-93919c853805","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.3.0","github_commit_sha":"c87772547204d6ede3c779fb42e8c0c00faf0154","is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T13:21:40.486Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-dd114981a9c943a378ae2eeab435bfb8","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":"2d1008fa-5291-4f5c-bb75-85c13987776b","user_code_job_started_at":"2026-10-06T13:23:11.660Z","user_code_job_completed_at":"2026-10-06T13:25:37.535Z","user_code_job_error":{"message":"There was an error running the job on our infrastructure, this is probably not your code, see build logs","error_code":"user_code_job_infrastructure_error"},"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=93ddb5abc7b13cccd07d265e4b9c155fe429048c31e5ddd0cf4e94f2f8089c77","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":"main"},{"package_release_id":"480fd219-9a8d-4c07-9f10-5ff16f0c680e","package_id":"47603b95-ab31-436b-9fa3-5c812028222d","version":"0.0.1","github_commit_sha":null,"is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-06T13:18:04.723Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-02bc43df574b0c37865cd6c45b39e1c0","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=480fd219-9a8d-4c07-9f10-5ff16f0c680e\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=480fd219-9a8d-4c07-9f10-5ff16f0c680e\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=480fd219-9a8d-4c07-9f10-5ff16f0c680e\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"3039c6e0-7a79-45e4-9efd-1fee549e8181","user_code_job_started_at":"2026-10-06T13:18:18.642Z","user_code_job_completed_at":"2026-10-06T13:19:16.888Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=fbc053a5a331240721c801e9dacb10c51c40065abdb0662630b24972b9ceaa56","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":null}]; window.SSR_PACKAGE_BUILDS = []; window.SSR_RELATED_PACKAGES = [{"package_id":"e5ab1435-ff48-4afa-8ec4-48882869e026","creator_account_id":"5d8d1e56-fbe8-42af-9fc9-ac71e7f121e8","latest_package_release_id":"14eb4a7f-834d-4478-8b1f-e224f5fd0655","last_built_release_id":"14eb4a7f-834d-4478-8b1f-e224f5fd0655","latest_package_release_fs_sha":"md5-2884996003e0638f6cbcedb541ab841b","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=14eb4a7f-834d-4478-8b1f-e224f5fd0655\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=14eb4a7f-834d-4478-8b1f-e224f5fd0655\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=14eb4a7f-834d-4478-8b1f-e224f5fd0655\u0026file_path=dist%2Findex%2F3d.png","latest_version":"0.0.1","license":"unset","owner_org_id":"4c466b0d-4391-4e5e-a070-66a79abef8ed","org_owner_tscircuit_handle":"techmannih","owner_github_username":"techmannih","github_repo_full_name":null,"is_source_from_github":false,"description":null,"name":"techmannih/schematic-test","unscoped_name":"schematic-test","star_count":0,"created_at":"2026-08-31T13:25:14.712Z","updated_at":"2026-09-09T04:29:10.958Z","ai_description":"A PCB with a 6-pin SPI display connector linked to SPI signals, ground, and 3.3V power.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"same_author","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=14eb4a7f-834d-4478-8b1f-e224f5fd0655\u0026file_path=dist%2Findex%2Fpcb.svg"},{"package_id":"f064ebaf-e000-4825-a7fb-2871976fb32b","creator_account_id":"96f144ef-7dfe-4068-aac0-8753c8ab5f62","latest_package_release_id":"e8d285f7-c3d8-46f5-9a54-344fdde0124e","last_built_release_id":"e8d285f7-c3d8-46f5-9a54-344fdde0124e","latest_package_release_fs_sha":"md5-ccffada3c1cc24d393e7b2485cb701f3","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e8d285f7-c3d8-46f5-9a54-344fdde0124e\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e8d285f7-c3d8-46f5-9a54-344fdde0124e\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=e8d285f7-c3d8-46f5-9a54-344fdde0124e\u0026file_path=dist%2Findex%2F3d.png","latest_version":"1.0.42","license":"unset","owner_org_id":"719473db-1754-470b-a747-20148ebb82aa","org_owner_tscircuit_handle":"imrishabh18","owner_github_username":"imrishabh18","github_repo_full_name":null,"is_source_from_github":false,"description":null,"name":"imrishabh18/rp2040-motor-controller","unscoped_name":"rp2040-motor-controller","star_count":5,"created_at":"2026-08-07T23:10:26.096Z","updated_at":"2026-10-02T13:30:59.461Z","ai_description":"An RP2040-based NEMA17 stepper-motor controller with USB-C programming and PD motor-power negotiation, DRV8825 dual H-bridge drive, current/temperature telemetry, protected power filtering, status RGB LED, buzzer alarm, and optional magnetic encoder.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"similar_ai_description","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=e8d285f7-c3d8-46f5-9a54-344fdde0124e\u0026file_path=dist%2Findex%2Fpcb.svg"},{"package_id":"e0df0168-d225-48f4-a273-024877039361","creator_account_id":"63586009-ac32-446c-b5aa-a60ea81a44bf","latest_package_release_id":"c188afab-0c4d-4a14-bb3a-95e2f52f8338","last_built_release_id":"c188afab-0c4d-4a14-bb3a-95e2f52f8338","latest_package_release_fs_sha":"md5-d77127f7ba0d4c273e6e781e45bfd73d","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c188afab-0c4d-4a14-bb3a-95e2f52f8338\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c188afab-0c4d-4a14-bb3a-95e2f52f8338\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=c188afab-0c4d-4a14-bb3a-95e2f52f8338\u0026file_path=dist%2Findex%2F3d.png","latest_version":"0.0.1","license":"unset","owner_org_id":"e4b51b30-273d-4e29-92ed-981078150dff","org_owner_tscircuit_handle":"ShiboSoftwareDev","owner_github_username":"ShiboSoftwareDev","github_repo_full_name":null,"is_source_from_github":false,"description":null,"name":"ShiboSoftwareDev/muse-m5stack-stickc-plus2-replacement","unscoped_name":"muse-m5stack-stickc-plus2-replacement","star_count":0,"created_at":"2026-10-02T21:16:50.153Z","updated_at":"2026-10-02T21:23:42.030Z","ai_description":"A 4-layer ESP32-S3 carrier board with USB-C 5V input, AMS1117 3.3V regulation, buttons, status LED, decoupling passives, and a 24-pin FFC interface for display, touch, audio, or sensor peripherals.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"random","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=c188afab-0c4d-4a14-bb3a-95e2f52f8338\u0026file_path=dist%2Findex%2Fpcb.svg"}]; window.SSR_PACKAGE_ROUTE = {"author":"techmannih","packageName":"nema34-mounted-stepper-controller","packageNameWithScope":"techmannih/nema34-mounted-stepper-controller","version":null,"isLegacyRoute":false,"kind":"file","filePath":"checks/vendor/circuit-json-schematic-placement-analysis.browser.js"};

techmannih/nema34-mounted-stepper-controller

A 48 V USB‑C PD 3.1 EPR NEMA‑34 stepper controller PCB combining STM32/TMC5160 control, external MOSFET motor bridges, protected power and regenerative braking, USB data, telemetry, diagnostics, status LEDs, and buzzer alarms.

Version
0.3.92
License
unset
Stars
1

checks/vendor/circuit-json-schematic-placement-analysis.browser.js

var N1=Object.create;var{getPrototypeOf:W1,defineProperty:Ws,getOwnPropertyNames:R1}=Object;var pm=Object.prototype.hasOwnProperty;function O1(t){return this[t]}var j1,$1,te=(t,e,r)=>{var i=t!=null&&typeof t==="object";if(i){var n=e?j1??=new WeakMap:$1??=new WeakMap,a=n.get(t);if(a)return a}r=t!=null?N1(W1(t)):{};let o=e||!t||!t.__esModule||!pm.call(t,"default")?Ws(r,"default",{value:t,enumerable:!0}):r;if(t&&typeof t==="object"||typeof t==="function"){for(let c of R1(t))if(!pm.call(o,c))Ws(o,c,{get:O1.bind(t,c),enumerable:!0})}if(i)n.set(t,o);return o};var un=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var X1=(t)=>t;function V1(t,e){this[t]=X1.bind(null,e)}var z1=(t,e)=>{for(var r in e)Ws(t,r,{get:e[r],enumerable:!0,configurable:!0,set:V1.bind(e,r)})};var ee=un(function(Os,js){(function(t,e){typeof Os==="object"&&typeof js<"u"?js.exports=e():typeof define==="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.svgson=e())})(Os,function(){/*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */var t=function(J){return J!=null&&(e(J)||r(J)||!!J._isBuffer)};function e(J){return!!J.constructor&&typeof J.constructor.isBuffer==="function"&&J.constructor.isBuffer(J)}function r(J){return typeof J.readFloatLE==="function"&&typeof J.slice==="function"&&e(J.slice(0,0))}var i=Object.prototype.toString,n=function(W){if(typeof W>"u")return"undefined";if(W===null)return"null";if(W===!0||W===!1||W instanceof Boolean)return"boolean";if(typeof W==="string"||W instanceof String)return"string";if(typeof W==="number"||W instanceof Number)return"number";if(typeof W==="function"||W instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(W))return"array";if(W instanceof RegExp)return"regexp";if(W instanceof Date)return"date";var j=i.call(W);if(j==="[object RegExp]")return"regexp";if(j==="[object Date]")return"date";if(j==="[object Arguments]")return"arguments";if(j==="[object Error]")return"error";if(t(W))return"buffer";if(j==="[object Set]")return"set";if(j==="[object WeakSet]")return"weakset";if(j==="[object Map]")return"map";if(j==="[object WeakMap]")return"weakmap";if(j==="[object Symbol]")return"symbol";if(j==="[object Int8Array]")return"int8array";if(j==="[object Uint8Array]")return"uint8array";if(j==="[object Uint8ClampedArray]")return"uint8clampedarray";if(j==="[object Int16Array]")return"int16array";if(j==="[object Uint16Array]")return"uint16array";if(j==="[object Int32Array]")return"int32array";if(j==="[object Uint32Array]")return"uint32array";if(j==="[object Float32Array]")return"float32array";if(j==="[object Float64Array]")return"float64array";return"object"};function a(J,W){return W={exports:{}},J(W,W.exports),W.exports}var o=a(function(J){(function(){function W(j,G){if(typeof G!=="function")return j;var D={};for(var et in j)if(Object.prototype.hasOwnProperty.call(j,et))D[G(et,j[et])||et]=j[et];return D}if(J.exports)J.exports=W;else window.rename=W})()}),c=function J(W,j){var G=n(W);if(G!=="object"&&G!=="array")throw Error("expected an object");var D=[];if(G==="object")W=o(W,j),D={};for(var et in W)if(W.hasOwnProperty(et)){var mt=W[et];if(n(mt)==="object"||n(mt)==="array")D[et]=J(mt,j);else D[et]=mt}return D},l=a(function(J){var W=Object.prototype.hasOwnProperty,j="~";function G(){}if(Object.create){if(G.prototype=Object.create(null),!new G().__proto__)j=!1}function D(mt,dt,R){this.fn=mt,this.context=dt,this.once=R||!1}function et(){this._events=new G,this._eventsCount=0}et.prototype.eventNames=function(){var dt=[],R,pt;if(this._eventsCount===0)return dt;for(pt in R=this._events)if(W.call(R,pt))dt.push(j?pt.slice(1):pt);if(Object.getOwnPropertySymbols)return dt.concat(Object.getOwnPropertySymbols(R));return dt},et.prototype.listeners=function(dt,R){var pt=j?j+dt:dt,xt=this._events[pt];if(R)return!!xt;if(!xt)return[];if(xt.fn)return[xt.fn];for(var yt=0,Wt=xt.length,_t=Array(Wt);yt<Wt;yt++)_t[yt]=xt[yt].fn;return _t},et.prototype.emit=function(dt,R,pt,xt,yt,Wt){var _t=j?j+dt:dt;if(!this._events[_t])return!1;var ht=this._events[_t],Tt=arguments.length,Dt,bt;if(ht.fn){if(ht.once)this.removeListener(dt,ht.fn,void 0,!0);switch(Tt){case 1:return ht.fn.call(ht.context),!0;case 2:return ht.fn.call(ht.context,R),!0;case 3:return ht.fn.call(ht.context,R,pt),!0;case 4:return ht.fn.call(ht.context,R,pt,xt),!0;case 5:return ht.fn.call(ht.context,R,pt,xt,yt),!0;case 6:return ht.fn.call(ht.context,R,pt,xt,yt,Wt),!0}for(bt=1,Dt=Array(Tt-1);bt<Tt;bt++)Dt[bt-1]=arguments[bt];ht.fn.apply(ht.context,Dt)}else{var be=ht.length,ce;for(bt=0;bt<be;bt++){if(ht[bt].once)this.removeListener(dt,ht[bt].fn,void 0,!0);switch(Tt){case 1:ht[bt].fn.call(ht[bt].context);break;case 2:ht[bt].fn.call(ht[bt].context,R);break;case 3:ht[bt].fn.call(ht[bt].context,R,pt);break;case 4:ht[bt].fn.call(ht[bt].context,R,pt,xt);break;default:if(!Dt)for(ce=1,Dt=Array(Tt-1);ce<Tt;ce++)Dt[ce-1]=arguments[ce];ht[bt].fn.apply(ht[bt].context,Dt)}}}return!0},et.prototype.on=function(dt,R,pt){var xt=new D(R,pt||this),yt=j?j+dt:dt;if(!this._events[yt])this._events[yt]=xt,this._eventsCount++;else if(!this._events[yt].fn)this._events[yt].push(xt);else this._events[yt]=[this._events[yt],xt];return this},et.prototype.once=function(dt,R,pt){var xt=new D(R,pt||this,!0),yt=j?j+dt:dt;if(!this._events[yt])this._events[yt]=xt,this._eventsCount++;else if(!this._events[yt].fn)this._events[yt].push(xt);else this._events[yt]=[this._events[yt],xt];return this},et.prototype.removeListener=function(dt,R,pt,xt){var yt=j?j+dt:dt;if(!this._events[yt])return this;if(!R){if(--this._eventsCount===0)this._events=new G;else delete this._events[yt];return this}var Wt=this._events[yt];if(Wt.fn){if(Wt.fn===R&&(!xt||Wt.once)&&(!pt||Wt.context===pt))if(--this._eventsCount===0)this._events=new G;else delete this._events[yt]}else{for(var _t=0,ht=[],Tt=Wt.length;_t<Tt;_t++)if(Wt[_t].fn!==R||xt&&!Wt[_t].once||pt&&Wt[_t].context!==pt)ht.push(Wt[_t]);if(ht.length)this._events[yt]=ht.length===1?ht[0]:ht;else if(--this._eventsCount===0)this._events=new G;else delete this._events[yt]}return this},et.prototype.removeAllListeners=function(dt){var R;if(dt){if(R=j?j+dt:dt,this._events[R])if(--this._eventsCount===0)this._events=new G;else delete this._events[R]}else this._events=new G,this._eventsCount=0;return this},et.prototype.off=et.prototype.removeListener,et.prototype.addListener=et.prototype.on,et.prototype.setMaxListeners=function(){return this},et.prefixed=j,et.EventEmitter=et,J.exports=et});function s(J,W,j){if(W in J)Object.defineProperty(J,W,{value:j,enumerable:!0,configurable:!0,writable:!0});else J[W]=j;return J}var p=function(){},d={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},m={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},u={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},y={" ":m.space,"\t":m.space,"\n":m.space,"\r":m.space,"<":m.lt,">":m.gt,'"':m.quote,"'":m.quote,"=":m.equal,"/":m.slash},f=function(W){return y[W]||m.char},_=function(W){var j,G,D,et,mt,dt,R,pt,xt,yt;W=Object.assign({debug:!1},W);var Wt=new l,_t=d.data,ht="",Tt="",Dt="",bt="",be="",ce="",Rt=function(Ke,ve){if(Tt[0]==="?"||Tt[0]==="!")return;var mn={type:Ke,value:ve};if(W.debug)console.log("emit:",mn);Wt.emit("data",mn)};Wt.stateMachine=(yt={},s(yt,d.data,(j={},s(j,m.lt,function(){if(ht.trim())Rt(u.text,ht);Tt="",be=!1,_t=d.tagBegin}),s(j,m.char,function(Pt){ht+=Pt}),j)),s(yt,d.cdata,s({},m.char,function(Pt){if(ht+=Pt,ht.substr(-3)==="]]>")Rt(u.text,ht.slice(0,-3)),ht="",_t=d.data})),s(yt,d.tagBegin,(G={},s(G,m.space,p),s(G,m.char,function(Pt){Tt=Pt,_t=d.tagName}),s(G,m.slash,function(){Tt="",be=!0}),G)),s(yt,d.tagName,(D={},s(D,m.space,function(){if(be)_t=d.tagEnd;else _t=d.attributeNameStart,Rt(u.openTag,Tt)}),s(D,m.gt,function(){if(be)Rt(u.closeTag,Tt);else Rt(u.openTag,Tt);ht="",_t=d.data}),s(D,m.slash,function(){_t=d.tagEnd,Rt(u.openTag,Tt)}),s(D,m.char,function(Pt){if(Tt+=Pt,Tt==="![CDATA[")_t=d.cdata,ht="",Tt=""}),D)),s(yt,d.tagEnd,(et={},s(et,m.gt,function(){Rt(u.closeTag,Tt),ht="",_t=d.data}),s(et,m.char,p),et)),s(yt,d.attributeNameStart,(mt={},s(mt,m.char,function(Pt){Dt=Pt,_t=d.attributeName}),s(mt,m.gt,function(){ht="",_t=d.data}),s(mt,m.space,p),s(mt,m.slash,function(){be=!0,_t=d.tagEnd}),mt)),s(yt,d.attributeName,(dt={},s(dt,m.space,function(){_t=d.attributeNameEnd}),s(dt,m.equal,function(){Rt(u.attributeName,Dt),_t=d.attributeValueBegin}),s(dt,m.gt,function(){bt="",Rt(u.attributeName,Dt),Rt(u.attributeValue,bt),ht="",_t=d.data}),s(dt,m.slash,function(){be=!0,bt="",Rt(u.attributeName,Dt),Rt(u.attributeValue,bt),_t=d.tagEnd}),s(dt,m.char,function(Pt){Dt+=Pt}),dt)),s(yt,d.attributeNameEnd,(R={},s(R,m.space,p),s(R,m.equal,function(){Rt(u.attributeName,Dt),_t=d.attributeValueBegin}),s(R,m.gt,function(){bt="",Rt(u.attributeName,Dt),Rt(u.attributeValue,bt),ht="",_t=d.data}),s(R,m.char,function(Pt){bt="",Rt(u.attributeName,Dt),Rt(u.attributeValue,bt),Dt=Pt,_t=d.attributeName}),R)),s(yt,d.attributeValueBegin,(pt={},s(pt,m.space,p),s(pt,m.quote,function(Pt){ce=Pt,bt="",_t=d.attributeValue}),s(pt,m.gt,function(){bt="",Rt(u.attributeValue,bt),ht="",_t=d.data}),s(pt,m.char,function(Pt){ce="",bt=Pt,_t=d.attributeValue}),pt)),s(yt,d.attributeValue,(xt={},s(xt,m.space,function(Pt){if(ce)bt+=Pt;else Rt(u.attributeValue,bt),_t=d.attributeNameStart}),s(xt,m.quote,function(Pt){if(ce===Pt)Rt(u.attributeValue,bt),_t=d.attributeNameStart;else bt+=Pt}),s(xt,m.gt,function(Pt){if(ce)bt+=Pt;else Rt(u.attributeValue,bt),ht="",_t=d.data}),s(xt,m.slash,function(Pt){if(ce)bt+=Pt;else Rt(u.attributeValue,bt),be=!0,_t=d.tagEnd}),s(xt,m.char,function(Pt){bt+=Pt}),xt)),yt);var T1=function(Ke){if(W.debug)console.log(_t,Ke);var ve=Wt.stateMachine[_t],mn=ve[f(Ke)]||ve[m.error]||ve[m.char];mn(Ke)};return Wt.write=function(Pt){var Ke=Pt.length;for(var ve=0;ve<Ke;ve++)T1(Pt[ve])},Wt},x={State:d,Action:m,Type:u,create:_},Y=x.Type,b={element:"element",text:"text"},M=function(W){return Object.assign({name:"",type:b.element,value:"",parent:null,attributes:{},children:[]},W)},O=function(W){W=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},W);var j=void 0,G=void 0,D=void 0,et=void 0,mt=new l,dt=function(pt){switch(pt.type){case Y.openTag:if(D===null)D=G,D.name=pt.value;else{var xt=M({name:pt.value,parent:D});D.children.push(xt),D=xt}break;case Y.closeTag:var yt=D.parent;if(!W.parentNodes)D.parent=null;if(D.name!==pt.value)break;if(W.stream&&yt===G)G.children=[],D.parent=null;if(!W.emitTopLevelOnly||yt===G)mt.emit(W.tagPrefix+D.name,D),mt.emit("tag",D.name,D);if(D===G)j.removeAllListeners("data"),mt.emit(W.doneEvent,D),G=null;D=yt;break;case Y.text:if(D)D.children.push(M({type:b.text,value:pt.value,parent:W.parentNodes?D:null}));break;case Y.attributeName:et=pt.value,D.attributes[et]="";break;case Y.attributeValue:D.attributes[et]=pt.value;break}};return mt.reset=function(){j=x.create({debug:W.debug}),j.on("data",dt),G=M(),D=null,et="",mt.parse=j.write},mt.reset(),mt},X=function(W,j){j=Object.assign({},j,{stream:!1,tagPrefix:":"});var G=O(j),D=void 0;return G.on("done",function(et){D=et}),G.parse(W),D},E={parseSync:X,create:O,NodeType:b},I=E.parseSync,U=function(W){var j=I("<root>".concat(W,"</root>"),{parentNodes:!1}),G=j.children&&j.children.length>0&&j.children.every(function(D){return D.name==="svg"});if(G)return j.children.length===1?j.children[0]:j.children;else throw Error("nothing to parse")},q=function(W){return c(W,function(j){if(!Q(j))return ct(j);return j})},ct=function(W){return W.replace(/[-|:]([a-z])/gi,function(j,G){return G.toUpperCase()})},Q=function(W){return/^(data|aria)(-\w+)/.test(W)},k=function(W){if(W){var j=String(W);return/[&<>]/.test(j)?"<![CDATA[".concat(j.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):j}return""},st=function(W){return String(W).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},ot=function(W){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=j.transformNode,D=G===void 0?function(R){return R}:G,et=j.camelcase,mt=et===void 0?!1:et,dt=function(pt){var xt=D(pt);if(mt)xt=q(xt);return xt};return dt(U(W))};function Z(){for(var J=arguments.length,W=Array(J),j=0;j<J;j++)W[j]=arguments[j];return new Promise(function(G,D){try{var et=ot.apply(void 0,W);G(et)}catch(mt){D(mt)}})}var N=function J(W){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=j.transformAttr,D=G===void 0?function(_t,ht,Tt){return"".concat(_t,'="').concat(Tt(ht),'"')}:G,et=j.transformNode,mt=et===void 0?function(_t){return _t}:et,dt=j.selfClose,R=dt===void 0?!0:dt;if(Array.isArray(W))return W.map(function(_t){return J(_t,{transformAttr:D,selfClose:R,transformNode:mt})}).join("");var pt=mt(W);if(pt.type==="text")return k(pt.value);var xt="";for(var yt in pt.attributes){var Wt=D(yt,pt.attributes[yt],st,pt.name);xt+=Wt?" ".concat(Wt):""}return pt.children&&pt.children.length>0||!R?"<".concat(pt.name).concat(xt,">").concat(J(pt.children,{transformAttr:D,transformNode:mt,selfClose:R}),"</").concat(pt.name,">"):"<".concat(pt.name).concat(xt,"/>")},tt=Object.assign({},{parse:Z,parseSync:ot,stringify:N});return tt})});var C0=un(function(hV,k0){var Hr=1000,Zr=Hr*60,Kr=Zr*60,hr=Kr*24,r4=hr*7,i4=hr*365.25;k0.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return n4(t);else if(r==="number"&&isFinite(t))return e.long?a4(t):o4(t);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function n4(t){if(t=String(t),t.length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*i4;case"weeks":case"week":case"w":return r*r4;case"days":case"day":case"d":return r*hr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Kr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Hr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function o4(t){var e=Math.abs(t);if(e>=hr)return Math.round(t/hr)+"d";if(e>=Kr)return Math.round(t/Kr)+"h";if(e>=Zr)return Math.round(t/Zr)+"m";if(e>=Hr)return Math.round(t/Hr)+"s";return t+"ms"}function a4(t){var e=Math.abs(t);if(e>=hr)return Qn(t,e,hr,"day");if(e>=Kr)return Qn(t,e,Kr,"hour");if(e>=Zr)return Qn(t,e,Zr,"minute");if(e>=Hr)return Qn(t,e,Hr,"second");return t+" ms"}function Qn(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var L0=un(function(dV,Y0){function s4(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=n,r.enabled=c,r.humanize=C0(),r.destroy=s,Object.keys(t).forEach((p)=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let d=0;for(let m=0;m<p.length;m++)d=(d<<5)-d+p.charCodeAt(m),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(p){let d,m=null,u,y;function f(..._){if(!f.enabled)return;let x=f,Y=Number(new Date),b=Y-(d||Y);if(x.diff=b,x.prev=d,x.curr=Y,d=Y,_[0]=r.coerce(_[0]),typeof _[0]!=="string")_.unshift("%O");let M=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(X,E)=>{if(X==="%%")return"%";M++;let I=r.formatters[E];if(typeof I==="function"){let U=_[M];X=I.call(x,U),_.splice(M,1),M--}return X}),r.formatArgs.call(x,_),(x.log||r.log).apply(x,_)}if(f.namespace=p,f.useColors=r.useColors(),f.color=r.selectColor(p),f.extend=i,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(m!==null)return m;if(u!==r.namespaces)u=r.namespaces,y=r.enabled(p);return y},set:(_)=>{m=_}}),typeof r.init==="function")r.init(f);return f}function i(p,d){let m=r(this.namespace+(typeof d>"u"?":":d)+p);return m.log=this.log,m}function n(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let d=(typeof p==="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of d)if(m[0]==="-")r.skips.push(m.slice(1));else r.names.push(m)}function a(p,d){let m=0,u=0,y=-1,f=0;while(m<p.length)if(u<d.length&&(d[u]===p[m]||d[u]==="*"))if(d[u]==="*")y=u,f=m,u++;else m++,u++;else if(y!==-1)u=y+1,f++,m=f;else return!1;while(u<d.length&&d[u]==="*")u++;return u===d.length}function o(){let p=[...r.names,...r.skips.map((d)=>"-"+d)].join(",");return r.enable(""),p}function c(p){for(let d of r.skips)if(a(p,d))return!1;for(let d of r.names)if(a(p,d))return!0;return!1}function l(p){if(p instanceof Error)return p.stack||p.message;return p}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Y0.exports=s4});var E0=un(function(zc,Hn){zc.formatArgs=l4;zc.save=p4;zc.load=h4;zc.useColors=c4;zc.storage=d4();zc.destroy=(()=>{let t=!1;return()=>{if(!t)t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();zc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function c4(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l4(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(n)=>{if(n==="%%")return;if(r++,n==="%c")i=r}),t.splice(i,0,e)}zc.log=console.debug||console.log||(()=>{});function p4(t){try{if(t)zc.storage.setItem("debug",t);else zc.storage.removeItem("debug")}catch(e){}}function h4(){let t;try{t=zc.storage.getItem("debug")||zc.storage.getItem("DEBUG")}catch(e){}if(!t&&typeof process<"u"&&"env"in process)t=process.env.DEBUG;return t}function d4(){try{return localStorage}catch(t){}}Hn.exports=L0()(zc);var{formatters:m4}=Hn.exports;m4.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var hm={"0":"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813","1":"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966","2":"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045","3":"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671","4":"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897","5":"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996","6":"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006","7":"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897","8":"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813","9":"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812","!":"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897",'"':"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022","#":"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486",$:"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547","'":"M0.301026 0.270996 L0.301026 0.523022","(":"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491",")":"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491","*":"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834","+":"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661",",":"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971","-":"M0.173829 0.686035 L0.428224 0.686035",".":"M0.362549 0.851074 L0.239503 0.851074","/":"M0.062501 1.035249 L0.539551 0.270996","<":"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902","=":"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837",">":"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902",A:"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521",B:"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897",C:"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065",D:"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897",E:"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897",F:"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677",G:"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131",H:"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897",I:"M0.301026 0.270996 L0.301026 0.94897",J:"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413",K:"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903",L:"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897",M:"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897",N:"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996",O:"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214",P:"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258",Q:"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653",R:"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897",S:"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334",T:"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897",U:"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017",V:"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996",W:"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996",X:"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897",Y:"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897",Z:"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897","[":"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424","\\":"M0.062501 0.270996 L0.539551 1.035249","]":"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424","^":"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931",_:"M0 1.160601 L0.602052 1.160601",a:"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898",b:"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739",c:"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979",d:"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739",e:"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979",f:"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088",g:"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193",h:"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817",i:"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817",j:"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586",k:"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817",l:"M0.301026 0.234863 L0.301026 0.946441",m:"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796",n:"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796",o:"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941",p:"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866",q:"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809",r:"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941",s:"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979",t:"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799",u:"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954",v:"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719",w:"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719",x:"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719",y:"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166",z:"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651"},xi={};for(let t in hm){xi[t]=[];let e=hm[t].split("M").slice(1).map((r)=>r.split("L").map((i)=>i.trim().split(" ").map(parseFloat)));for(let r of e)for(let i=0;i<r.length-1;i++)xi[t].push({x1:r[i][0],y1:1-r[i][1],x2:r[i+1][0],y2:1-r[i+1][1]})}var UI=(()=>{let t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),GI={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};var D1=[];for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)if(e&1)e=3988292384^e>>>1;else e=e>>>1;D1[t]=e}var K1=new Uint16Array([255]),J1=new Uint8Array(K1.buffer),eM=J1[0]===255;var q1=new Uint16Array([255]),t2=new Uint8Array(q1.buffer),nM=t2[0]===255,oM=new Uint8Array(0);var sM=Uint8Array.of(137,80,78,71,13,10,26,10);var pM=new TextDecoder("latin1");var{cos:uk,sin:yk,PI:fk}=Math;var{tan:wk}=Math;var m2=te(ee(),1);var fn=(t,e)=>({...t,rects:[...t.rects??[],...e.rects??[]],points:[...t.points??[],...e.points??[]],lines:[...t.lines??[],...e.lines??[]],infiniteLines:[...t.infiniteLines??[],...e.infiniteLines??[]],polygons:[...t.polygons??[],...e.polygons??[]],circles:[...t.circles??[],...e.circles??[]],arrows:[...t.arrows??[],...e.arrows??[]],texts:[...t.texts??[],...e.texts??[]]});function Si(t,e){if(t.points)for(let r of t.points)r.step=e;if(t.lines)for(let r of t.lines)r.step=e;if(t.infiniteLines)for(let r of t.infiniteLines)r.step=e;if(t.polygons)for(let r of t.polygons)r.step=e;if(t.rects)for(let r of t.rects)r.step=e;if(t.circles)for(let r of t.circles)r.step=e;if(t.texts)for(let r of t.texts)r.step=e;return t}var at=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){if(this._setupDone)return;this._setup(),this._setupDone=!0}_setup(){}step(){if(!this._setupDone)this.setup();if(this.solved)return;if(this.failed)return;this.iterations++;try{this._step()}catch(t){throw this.error=`${this.getSolverName()} error: ${t}`,this.failed=!0,t}if(!this.solved&&this.iterations>=this.MAX_ITERATIONS)this.tryFinalAcceptance();if(!this.solved&&this.iterations>=this.MAX_ITERATIONS)this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0;if("computeProgress"in this)this.progress=this.computeProgress()}_step(){}getConstructorParams(){throw Error("getConstructorParams not implemented")}getOutput(){return null}solve(){let t=Date.now();while(!this.solved&&!this.failed)this.step();let e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function Mt(t,e,r,i={}){return{solverName:t,solverClass:e,getConstructorParams:r,onSolved:i.onSolved}}var bm=class extends at{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(t){super();this.inputProblem=t,this.MAX_ITERATIONS=1e6}_step(){let t=this.pipelineDef[this.currentPipelineStageIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[t.solverName]=performance.now(),this.timeSpentOnStage[t.solverName]=this.endTimeOfStage[t.solverName]-this.startTimeOfStage[t.solverName];let r=this.activeSubSolver.getOutput();if(r!==null)this.pipelineOutputs[t.solverName]=r;t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else if(this.activeSubSolver.failed)this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null;return}let e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnStage[t.solverName]=0,this.startTimeOfStage[t.solverName]=performance.now(),this.firstIterationOfStage[t.solverName]=this.iterations}solveUntilStage(t){while(this.getCurrentStageName().toLowerCase()!==t.toLowerCase())if(this.step(),this.failed||this.solved)break}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){let t=this.pipelineDef.length;if(t===0)return 1;let e=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+e)/t}getStageStats(){let t={};for(let e of this.pipelineDef){let r=this.timeSpentOnStage[e.solverName]||0,i=this.firstIterationOfStage[e.solverName]||0,n=this.iterations,a=e.solverName===this.getCurrentStageName()?n-i:0,o=this.currentPipelineStageIndex>this.pipelineDef.findIndex((c)=>c.solverName===e.solverName);t[e.solverName]={timeSpent:r,iterations:a,completed:o}}return t}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let t=0,e=this.initialVisualize();if(e)Si(e,0),t=1;let r=null;if(this.solved)r=this.finalVisualize();let i=[e].filter(Boolean).concat(this.pipelineDef.map((n,a)=>{let c=this[n.solverName]?.visualize();if(!c)return null;return Si(c,a+t),c}).filter(Boolean));if(i.length===0)return{points:[],rects:[],lines:[],circles:[],texts:[]};if(this.solved&&r)Si(r,i.length+t+1),i.push(r);if(i.length===1)return i[0];return{points:i.flatMap((n)=>n.points||[]),rects:i.flatMap((n)=>n.rects||[]),lines:i.flatMap((n)=>n.lines||[]),circles:i.flatMap((n)=>n.circles||[]),texts:i.flatMap((n)=>n.texts||[])}}preview(){if(this.activeSubSolver)return this.activeSubSolver.preview();return super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(t){return this.pipelineOutputs[t]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(t){return t in this.pipelineOutputs}getSolver(t){return this[t]}};var yr=(t)=>{if(Number.isInteger(t))return String(t);return t.toFixed(3).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")},$s=(t)=>{let e=yr(t);return t>0?`+${e}`:e},Xs=(t)=>t.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;").replaceAll(">","&gt;"),S=(t,e,r,i)=>{if(r===void 0)return;let n=typeof r==="number"?i?.formatDelta?$s(r):yr(r):Xs(r);t.push(`${e}="${n}"`)};function _n(t){let e=new Map,r=(n)=>{let a=e.get(n);if(a===void 0||a===n)return n;let o=r(a);return e.set(n,o),o},i=(n)=>{let a=n[0];if(!a)return;let o=r(a);for(let c of n.slice(1))e.set(r(c),o)};for(let n of t){if(n.type==="source_port"||n.type==="source_net"){let a=n.type==="source_port"?n.source_port_id:n.source_net_id;if(n.subcircuit_connectivity_map_key)i([a,`connectivity:${n.subcircuit_connectivity_map_key}`])}if(n.type==="source_trace")i([...n.connected_source_port_ids,...n.connected_source_net_ids,...n.subcircuit_connectivity_map_key?[`connectivity:${n.subcircuit_connectivity_map_key}`]:[]]);if(n.type==="source_component_internal_connection")i(n.source_port_ids);if(n.type==="source_component")for(let a of n.internally_connected_source_port_ids??[])i(a)}return r}class At{connected;components=new Map;portsByComponent=new Map;portsByNet=new Map;powerNets=new Set;groundNets=new Set;placements=new Map;schematicComponents=new Map;schematicPorts=new Map;constructor(t){this.connected=_n(t.circuitJson);for(let e of t.componentPlacements)if(e.sourceComponentId)gn(this.placements,e.sourceComponentId,e);for(let e of t.circuitJson){if(e.type==="source_component")this.components.set(e.source_component_id,e);if(e.type==="source_port"&&e.source_component_id)gn(this.portsByComponent,e.source_component_id,e),gn(this.portsByNet,this.connected(e.source_port_id),e);if(e.type==="source_net"){let r=this.connected(e.source_net_id);if(e.is_power||e.is_positive_voltage_source)this.powerNets.add(r);if(e.is_ground)this.groundNets.add(r)}if(e.type==="schematic_component")this.schematicComponents.set(e.schematic_component_id,e);if(e.type==="schematic_port"&&e.source_port_id)gn(this.schematicPorts,e.source_port_id,e)}}placement(t){let e=this.placements.get(t);return e?.length===1?e[0]:void 0}port(t){let e=this.placement(t.source_component_id),r=this.schematicPorts.get(t.source_port_id)?.filter((i)=>i.schematic_component_id===e?.schematicComponentId);return r?.length===1?r[0]:void 0}namedPort(t,e){let r=this.portsByComponent.get(t)?.filter((i)=>i.name===e||i.port_hints?.includes(e));return r?.length===1?r[0]:void 0}twoTerminalNets(t){let e=this.portsByComponent.get(t);if(e?.length!==2)return;let r=this.connected(e[0].source_port_id),i=this.connected(e[1].source_port_id);if(r!==i)return[r,i]}isRail(t){return this.powerNets.has(t)||this.groundNets.has(t)}isDirectOpAmpFeedback(t){let e=this.twoTerminalNets(t);if(!e||e.some((r)=>this.isRail(r)))return!1;return e.some((r)=>(this.portsByNet.get(r)??[]).some((i)=>{let n=i.source_component_id;if(this.components.get(n)?.ftype!=="simple_op_amp")return!1;if(this.namedPort(n,"output")?.source_port_id!==i.source_port_id)return!1;return["inverting_input","non_inverting_input"].some((o)=>{let c=this.namedPort(n,o);if(!c)return!1;let l=this.connected(c.source_port_id);return l!==r&&e.includes(l)})}))}sameLocalScope(t,e){if(t.schematicSheetId!==e.schematicSheetId||t.subcircuitId!==e.subcircuitId)return!1;let r=this.schematicComponents.get(t.schematicComponentId??""),i=this.schematicComponents.get(e.schematicComponentId??"");if(!r||!i||r.schematic_group_id!==i.schematic_group_id)return!1;let n=this.components.get(t.sourceComponentId??""),a=this.components.get(e.sourceComponentId??"");return n?.source_group_id===a?.source_group_id&&n?.subcircuit_id===a?.subcircuit_id}}function gn(t,e,r){let i=t.get(e);if(i)i.push(r);else t.set(e,[r])}class fr extends at{params;banks=[];bankIndex=0;constructor(t){super();this.params=t;let e=new At(t.ctx),r=new Map;for(let i of e.components.values()){let n=i.ftype==="simple_diode"||i.ftype==="simple_led";if(!n&&i.ftype!=="simple_resistor")continue;let a=i.source_component_id,o=e.placement(a),c=e.twoTerminalNets(a)?.sort(),l=e.portsByComponent.get(a);if(!o||!c||!l)continue;let s=c.map((_)=>{let x=l.find((Y)=>e.connected(Y.source_port_id)===_);return x&&e.port(x)}),[p,d]=s,m={diode:n,box:o};if(p&&d&&!l.some((_)=>_.do_not_connect)&&s.every((_)=>_?.schematic_sheet_id===o.schematicSheetId))m.pins=[p,d],m.axis=g2(p,d);let u=JSON.stringify(c),y=r.get(u)??[],f=y.find((_)=>e.sameLocalScope(_[0].box,o));if(f)f.push(m);else{let _=[m];y.push(_),this.banks.push(_)}r.set(u,y)}this.solved=this.banks.length===0}_step(){let t=this.banks[this.bankIndex++];if(this.solved=this.bankIndex>=this.banks.length,t.length!==2)return;let e=t.find((o)=>o.diode),r=t.find((o)=>!o.diode);if(!e?.pins||!e.axis||!r?.pins||!r.axis)return;let i=e.box,n=r.box;if(Math.abs(i.schX-n.schX)<(i.width+n.width)/2&&Math.abs(i.schY-n.schY)<(i.height+n.height)/2)return;let a;if(e.axis!==r.axis)a="different_axes";else{let o=e.axis==="horizontal"?"x":"y",c=e.pins.map((s)=>s.center[o]),l=r.pins.map((s)=>s.center[o]);if((c[1]-c[0])*(l[1]-l[0])<0)a="crossed_connections";else{if(Math.min(Math.max(...c),Math.max(...l))-Math.max(Math.min(...c),Math.min(...l))>0.01)return;a="staggered"}}this.params.issues.push({lineItemType:"ParallelDiodeResistorNotAligned",diodeSchematicBox:i,resistorSchematicBox:n,reason:a,message:`Draw ${i.sourceComponentName||"the diode"} and ${n.sourceComponentName||"the resistor"} as adjacent parallel rows or columns with their shared nets at matching ends. Preserve every pin connection and diode polarity, leave room for labels, and reroute the affected wires.`})}static issueToString(t){let e=[];return S(e,"diodeComponentName",t.diodeSchematicBox.sourceComponentName),S(e,"resistorComponentName",t.resistorSchematicBox.sourceComponentName),S(e,"reason",t.reason),S(e,"message",t.message),`<ParallelDiodeResistorNotAligned ${e.join(" ")} />`}}function g2(t,e){let r=new Set([t.facing_direction,e.facing_direction]);if(r.has("left")&&r.has("right")&&Math.abs(t.center.y-e.center.y)<0.01&&Math.abs(t.center.x-e.center.x)>0.01)return"horizontal";if(r.has("up")&&r.has("down")&&Math.abs(t.center.x-e.center.x)<0.01&&Math.abs(t.center.y-e.center.y)>0.01)return"vertical"}var _r=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),Ne=0.001;class gr extends at{index;nodes=new Map;starts=[];currentIndex=0;issues;maxSpan;maxLength;constructor({ctx:t,issues:e,maxSpan:r=8,maxLength:i=16}){super();if(this.index=new At(t),this.issues=e,!Number.isFinite(r)||r<0||!Number.isFinite(i)||i<0)throw Error("Rail visibility thresholds must be finite and nonnegative");this.maxSpan=r,this.maxLength=i;let n=this.index,a=(s,p,d)=>{let m=JSON.stringify([d,p,Math.round(s.x/Ne),Math.round(s.y/Ne)]);if(!this.nodes.has(m))this.nodes.set(m,{point:s,net:p,sheet:d,links:[]});return m},o=(s,p,d)=>{let m=this.nodes.get(s),u=this.nodes.get(p),y=_r(m.point,u.point);m.links.push({to:p,length:y,...d}),u.links.push({to:s,length:y,...d})},c=new Map;for(let[s,p]of n.portsByComponent)for(let d of p){let m=n.port(d);if(!m)continue;let u=a(m.center,n.connected(d.source_port_id),m.schematic_sheet_id);if(c.set(d.source_port_id,u),p.length>2)this.starts.push({portId:d.source_port_id,componentId:s,nodeId:u})}for(let s of t.circuitJson){if(s.type!=="schematic_net_label"||!s.source_net_id||!s.anchor_position)continue;let p=n.connected(s.source_net_id);if(!n.isRail(p)||n.powerNets.has(p)&&n.groundNets.has(p))continue;let d=a(s.anchor_position,p,s.schematic_sheet_id);this.nodes.get(d).terminal=n.groundNets.has(p)?"ground":"power"}let l=[];for(let s of t.circuitJson){if(s.type!=="schematic_trace")continue;let p=x2(s,t.circuitJson,n);if(!p)continue;for(let d of s.edges)l.push({from:a(d.from,p,s.schematic_sheet_id),to:a(d.to,p,s.schematic_sheet_id),traceId:s.schematic_trace_id})}for(let s of l){let p=this.nodes.get(s.from),d=this.nodes.get(s.to);if(_r(p.point,d.point)<Ne)continue;let u=[...this.nodes].filter(([,y])=>y.net===p.net&&y.sheet===p.sheet&&b2(y.point,p.point,d.point)).sort(([,y],[,f])=>_r(p.point,y.point)-_r(p.point,f.point));for(let y=1;y<u.length;y++)o(u[y-1][0],u[y][0],{traceId:s.traceId})}for(let[s,p]of n.components){if(!["simple_resistor","simple_capacitor","simple_inductor"].includes(p.ftype))continue;let d=n.portsByComponent.get(s);if(d?.length!==2||!n.twoTerminalNets(s))continue;let m=c.get(d[0].source_port_id),u=c.get(d[1].source_port_id);if(m&&u)o(m,u,{componentId:s})}this.solved=this.starts.length===0}_step(){let t=this.starts[this.currentIndex++];if(this.solved=this.currentIndex>=this.starts.length,!t)return;let e=this.index.portsByComponent.get(t.componentId)?.find((c)=>c.source_port_id===t.portId),r=e?this.index.port(e):void 0,i=r?.display_pin_label||e?.name||(r?.pin_number!==void 0?`pin${r.pin_number}`:"connected pin"),n=this.index.placement(t.componentId);if(!n)return;let a=[{id:t.nodeId,length:0,hops:0,path:[t.nodeId],links:[]}],o=new Map([[`${t.nodeId}:0`,0]]);while(a.length){a.sort((p,d)=>p.length-d.length);let c=a.shift(),l=`${c.id}:${c.hops}`;if(c.length!==o.get(l))continue;let s=this.nodes.get(c.id);if(s.terminal){let p=c.path.map((_)=>this.nodes.get(_).point),d=p.map((_)=>_.x),m=p.map((_)=>_.y),u={left:Math.min(...d),right:Math.max(...d),bottom:Math.min(...m),top:Math.max(...m)},y=Math.max(u.right-u.left,u.top-u.bottom);if(y<=this.maxSpan&&c.length<=this.maxLength)return;let f=[...new Set(c.links.flatMap((_)=>_.componentId?[_.componentId]:[]))];this.issues.push({lineItemType:"RailPathTooSpreadOut",hostSchematicBox:n,sourcePortId:t.portId,sourcePortName:i,railType:s.terminal,supportSchematicBoxes:f.flatMap((_)=>{let x=this.index.placement(_);return x?[x]:[]}),schematicTraceIds:[...new Set(c.links.flatMap((_)=>_.traceId?[_.traceId]:[]))],pathPoints:p,pathBounds:u,pathLength:c.length,pathSpan:y,maxRecommendedSpan:this.maxSpan,maxRecommendedPathLength:this.maxLength,message:`Visible path from ${n.sourceComponentName||"component"}.${i} to ${s.terminal} spans ${y.toFixed(2)} schematic units; move the connected support elements closer together near the pin and recompute their schematic traces.`});return}for(let p of s.links){if(c.path.includes(p.to))continue;if(p.componentId){let y=this.index.placement(p.componentId);if(c.hops>=3||!y||!this.index.sameLocalScope(n,y))continue}let d=c.length+p.length,m=c.hops+(p.componentId?1:0),u=`${p.to}:${m}`;if(d>=(o.get(u)??1/0))continue;o.set(u,d),a.push({id:p.to,length:d,hops:m,path:[...c.path,p.to],links:[...c.links,p]})}}}static issueToString(t){let e=[];return S(e,"hostName",t.hostSchematicBox.sourceComponentName),S(e,"pinName",t.sourcePortName),S(e,"railType",t.railType),S(e,"pathSpan",t.pathSpan),S(e,"pathLength",t.pathLength),S(e,"message",t.message),`<RailPathTooSpreadOut ${e.join(" ")} />`}}function x2(t,e,r){if(t.subcircuit_connectivity_map_key)return r.connected(`connectivity:${t.subcircuit_connectivity_map_key}`);let i=e.find((a)=>a.type==="source_trace"&&a.source_trace_id===t.source_trace_id);if(i?.type!=="source_trace")return;let n=[...i.connected_source_port_ids,...i.connected_source_net_ids];return n[0]?r.connected(n[0]):void 0}function b2(t,e,r){let i=r.x-e.x,n=r.y-e.y,a=_r(e,r);if(a<Ne)return _r(e,t)<Ne;let o=((t.x-e.x)*i+(t.y-e.y)*n)/a;return Math.abs((t.x-e.x)*n-(t.y-e.y)*i)/a<Ne&&o>=-Ne&&o<=a+Ne}class xr extends at{params;index;capacitorIds;unpopulated=new Set;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx);for(let e of t.ctx.circuitJson)if(e.type==="pcb_component"&&e.do_not_place)this.unpopulated.add(e.source_component_id);this.capacitorIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_capacitor").map((e)=>e.source_component_id),this.solved=this.capacitorIds.length===0}_step(){let t=this.capacitorIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.capacitorIds.length,!t||this.unpopulated.has(t))return;let e=this.index,r=e.components.get(t),i=e.placement(t),n=e.portsByComponent.get(t)??[],a=e.twoTerminalNets(t);if(r?.ftype!=="simple_capacitor"||!Number.isFinite(r.capacitance)||r.capacitance<=0||!i||!a||a.some((I)=>e.isRail(I))||n.some((I)=>I.do_not_connect||Vs(I)))return;let o=a.map((I)=>{let U=e.portsByNet.get(I)??[];if(U.length!==2)return;return U.find((q)=>q.source_component_id!==t)}),[c,l]=o;if(!c||!l||c.source_component_id!==l.source_component_id||c.do_not_connect||l.do_not_connect||Vs(c)||Vs(l))return;let s=c.source_component_id,p=e.placement(s);if(e.components.get(s)?.ftype!=="simple_chip"||this.unpopulated.has(s)||!p||!e.sameLocalScope(p,i))return;let d=[c,l],m=d.map((I)=>e.port(I)),u=n.map((I)=>e.port(I));if([...m,...u].some((I)=>!I||I.schematic_sheet_id!==p.schematicSheetId||!Number.isFinite(I.center.x)||!Number.isFinite(I.center.y))||[p,i].some((I)=>![I.schX,I.schY,I.width,I.height].every(Number.isFinite)||I.width<=0||I.height<=0))return;let y=m[0],f=m[1],_=y.facing_direction;if(!_||_!==f.facing_direction)return;let x=_==="left"||_==="right",Y=_==="left"||_==="down"?-1:1,b=Math.hypot(y.center.x-f.center.x,y.center.y-f.center.y);if(b<0.01)return;let M=-Y*(x?i.schX-p.schX:i.schY-p.schY),O=x?(p.width+i.width)/2:(p.height+i.height)/2;if(M<=O+0.2)return;let X=Math.max(...m.map((I,U)=>Math.hypot(I.center.x-u[U].center.x,I.center.y-u[U].center.y))),E=Math.max(4,3*Math.max(i.width,i.height),2*b);if(X<=E)return;this.params.issues.push({lineItemType:"CapacitorSeparatedFromChipPins",hostSchematicBox:p,capacitorSchematicBox:i,chipSourcePortIds:[d[0].source_port_id,d[1].source_port_id],maxPinDistance:X,maxRecommendedPinDistance:E,message:`Place ${i.sourceComponentName||"component"} beside its two connected pins on the ${_} side of ${p.sourceComponentName||"component"} so their connections can be read together. Preserve pin connections, leave room for labels, and reroute affected traces; exact alignment is not required.`})}static issueToString(t){let e=[];return S(e,"hostComponentName",t.hostSchematicBox.sourceComponentName),S(e,"capacitorName",t.capacitorSchematicBox.sourceComponentName),S(e,"maxPinDistance",t.maxPinDistance),S(e,"maxRecommendedPinDistance",t.maxRecommendedPinDistance),S(e,"message",t.message),`<CapacitorSeparatedFromChipPins ${e.join(" ")} />`}}function Vs(t){return Boolean(t.requires_power||t.provides_power||t.requires_ground||t.provides_ground||t.requires_voltage!==void 0||t.provides_voltage!==void 0)}class br extends at{params;index;inductorIds;unpopulated=new Set;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx);for(let e of t.ctx.circuitJson)if(e.type==="pcb_component"&&e.do_not_place)this.unpopulated.add(e.source_component_id);for(let e of t.ctx.circuitJson)if(e.type==="pcb_component"&&!e.do_not_place)this.unpopulated.delete(e.source_component_id);this.inductorIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_inductor"&&!this.unpopulated.has(e.source_component_id)).map((e)=>e.source_component_id),this.solved=this.inductorIds.length===0}_step(){let t=this.inductorIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.inductorIds.length,!t)return;let e=this.index,r=this.localPart(t),i=e.twoTerminalNets(t);if(!r||!i||i.some((d)=>e.isRail(d)))return;let n=i.map((d)=>{let m=e.portsByNet.get(d)??[];if(m.some((b)=>b.source_component_id!==t&&!this.unpopulated.has(b.source_component_id)&&e.components.get(b.source_component_id)?.ftype==="simple_inductor"))return;let u=m.filter((b)=>{let M=e.components.get(b.source_component_id),O=e.twoTerminalNets(b.source_component_id);return M?.ftype==="simple_capacitor"&&!this.unpopulated.has(b.source_component_id)&&O?.some((X)=>X!==d&&e.groundNets.has(X))});if(u.length!==1)return;let y=u[0],f=e.components.get(y.source_component_id);if(f.ftype!=="simple_capacitor"||!Number.isFinite(f.capacitance)||f.capacitance<=0)return;let _=this.localPart(y.source_component_id);if(!_||!e.sameLocalScope(r.placement,_.placement))return;let x=e.port(y),Y=e.port(r.ports.find((b)=>e.connected(b.source_port_id)===d));return{placement:_.placement,ground:e.twoTerminalNets(y.source_component_id).find((b)=>b!==d),distance:Math.hypot(x.center.x-Y.center.x,x.center.y-Y.center.y)}}),[a,o]=n;if(!a||!o||a.ground!==o.ground)return;let c=[r.placement,a.placement,o.placement],l=Math.max(4,...c.map((d)=>3*Math.max(d.width,d.height))),s=Math.max(a.distance,o.distance);if(s<=l)return;let p=(d)=>d.sourceComponentName||"component";this.params.issues.push({lineItemType:"PiFilterComponentsNotGrouped",inductorSchematicBox:r.placement,firstCapacitorSchematicBox:a.placement,secondCapacitorSchematicBox:o.placement,maxSignalPinDistance:s,maxRecommendedSignalPinDistance:l,message:`Group ${p(a.placement)} and ${p(o.placement)} beside the connected ends of ${p(r.placement)} so the series path and both grounded branches of the pi filter can be read together. Preserve pin connections, allow room for labels, and reroute affected traces.`})}localPart(t){let e=this.index.placement(t),r=this.index.portsByComponent.get(t);if(!e||r?.length!==2||r.some((i)=>{let n=this.index.port(i);return i.do_not_connect||!n||n.schematic_sheet_id!==e.schematicSheetId||!Number.isFinite(n.center.x)||!Number.isFinite(n.center.y)}))return;return{placement:e,ports:r}}static issueToString(t){let e=[];return S(e,"inductorName",t.inductorSchematicBox.sourceComponentName),S(e,"firstCapacitorName",t.firstCapacitorSchematicBox.sourceComponentName),S(e,"secondCapacitorName",t.secondCapacitorSchematicBox.sourceComponentName),S(e,"maxSignalPinDistance",t.maxSignalPinDistance),S(e,"maxRecommendedSignalPinDistance",t.maxRecommendedSignalPinDistance),S(e,"message",t.message),`<PiFilterComponentsNotGrouped ${e.join(" ")} />`}}class vr extends at{params;index;mosfetIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.mosfetIds=[...this.index.components.keys()].filter((e)=>this.mosfetPorts(e)),this.solved=this.mosfetIds.length===0}_step(){let t=this.mosfetIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.mosfetIds.length,!t)return;let e=this.index,r=e.placement(t),i=this.mosfetPorts(t);if(!r)return;let n=e.connected(i.gate.source_port_id),a=e.connected(i.sources[0].source_port_id),o=e.connected(i.drains[0].source_port_id);if(new Set([n,a,o]).size!==3||e.isRail(n))return;if([i.gate,...i.sources,...i.drains].some((f)=>{let _=e.port(f);return!_||_.schematic_sheet_id!==r.schematicSheetId}))return;let c=(e.portsByNet.get(n)??[]).filter((f)=>f.source_component_id!==t);if(c.length!==2)return;let l=c.map((f)=>{let _=f.source_component_id,x=e.components.get(_),Y=e.placement(_),b=e.twoTerminalNets(_);if(x?.ftype!=="simple_resistor"||!Number.isFinite(x.resistance)||x.resistance<=0||!Y||!b||!e.sameLocalScope(r,Y)||e.portsByComponent.get(_).some((M)=>{let O=e.port(M);return M.do_not_connect||!O||O.schematic_sheet_id!==r.schematicSheetId}))return;return{placement:Y,otherNet:b.find((M)=>M!==n)}});if(l.some((f)=>!f))return;let s=l.filter((f)=>f.otherNet===a),p=l.filter((f)=>f.otherNet!==a);if(s.length!==1||p.length!==1)return;let d=s[0].placement,m=p[0].placement;if(p[0].otherNet===o||e.isRail(p[0].otherNet))return;let u=Math.max(6,3*Math.max(r.width,r.height)),y=Math.max(vm(r,m),vm(r,d));if(y<=u)return;this.params.issues.push({lineItemType:"MosfetGateNetworkNotGrouped",mosfetSchematicBox:r,seriesGateResistorSchematicBox:m,gateSourceResistorSchematicBox:d,maxBodyGap:y,maxRecommendedBodyGap:u,message:`Group ${m.sourceComponentName||"component"} and ${d.sourceComponentName||"component"} beside ${r.sourceComponentName||"component"}'s gate/source pins so the gate-drive branch can be read together. Preserve all pin connections, leave room for labels, and reroute affected traces.`})}mosfetPorts(t){let e=this.index.components.get(t)?.ftype;if(e!=="simple_mosfet"&&e!=="simple_chip")return;let r=this.index.portsByComponent.get(t)??[],i=r.filter((o)=>zs(o,/^(G|GATE)$/)),n=r.filter((o)=>zs(o,/^(S|SOURCE)[0-9]*$/)),a=r.filter((o)=>zs(o,/^(D|DRAIN)[0-9]*$/));if(i.length!==1||!n.length||!a.length||i.length+n.length+a.length!==r.length||new Set([...i,...n,...a]).size!==r.length||r.some((o)=>o.do_not_connect))return;for(let o of[n,a])if(new Set(o.map((c)=>this.index.connected(c.source_port_id))).size!==1)return;return{gate:i[0],sources:n,drains:a}}static issueToString(t){let e=[];return S(e,"mosfetName",t.mosfetSchematicBox.sourceComponentName),S(e,"seriesGateResistorName",t.seriesGateResistorSchematicBox.sourceComponentName),S(e,"gateSourceResistorName",t.gateSourceResistorSchematicBox.sourceComponentName),S(e,"maxBodyGap",t.maxBodyGap),S(e,"maxRecommendedBodyGap",t.maxRecommendedBodyGap),S(e,"message",t.message),`<MosfetGateNetworkNotGrouped ${e.join(" ")} />`}}function zs(t,e){return[t.name,...t.port_hints??[]].some((r)=>e.test(r.toUpperCase().replace(/[\s_]/g,"")))}function vm(t,e){return Math.hypot(Math.max(0,Math.abs(t.schX-e.schX)-(t.width+e.width)/2),Math.max(0,Math.abs(t.schY-e.schY)-(t.height+e.height)/2))}class Sr extends at{params;index;relayIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.relayIds=[...this.index.components.keys()].filter((e)=>this.coilPorts(e)),this.solved=this.relayIds.length===0}_step(){let t=this.relayIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.relayIds.length,!t)return;let e=this.index,r=e.placement(t),i=this.coilPorts(t);if(!r||i.some((I)=>I.do_not_connect))return;let n=i.map((I)=>e.connected(I.source_port_id));if(n[0]===n[1])return;if(this.relayIds.some((I)=>I!==t&&this.coilPorts(I).every((U)=>n.includes(e.connected(U.source_port_id)))))return;let a=new Set((e.portsByNet.get(n[0])??[]).filter((I)=>e.components.get(I.source_component_id)?.ftype==="simple_diode").map((I)=>I.source_component_id).filter((I)=>e.twoTerminalNets(I)?.includes(n[1])));if(a.size!==1)return;let o=[...a][0],c=e.placement(o),l=this.uniquePort(o,/^(?:ANODE|A)$/),s=this.uniquePort(o,/^(?:CATHODE|K)$/);if(!c||!e.sameLocalScope(r,c)||!l||!s||l===s||l.do_not_connect||s.do_not_connect)return;let p=e.connected(l.source_port_id),d=e.connected(s.source_port_id);if(e.isRail(p)||e.groundNets.has(d)||!this.hasGroundedDriver(p,d))return;let m=i.map((I)=>e.port(I)),u=[l,s].map((I)=>e.port(I));if([...m,...u].some((I)=>!I||I.schematic_sheet_id!==r.schematicSheetId))return;let[y,f]=m,_=Math.min(y.center.x,f.center.x),x=Math.max(y.center.x,f.center.x),Y=Math.min(y.center.y,f.center.y),b=Math.max(y.center.y,f.center.y),M=Math.max(_-(c.schX+c.width/2),c.schX-c.width/2-x,0),O=Math.max(Y-(c.schY+c.height/2),c.schY-c.height/2-b,0),X=Math.hypot(M,O),E=Math.hypot(x-_,b-Y);if(X<=Math.max(1.5,2*E)||X>Math.max(8,4*Math.max(r.width,r.height)))return;if(!this.params.ctx.circuitJson.some((I)=>I.type==="schematic_net_label"&&I.schematic_sheet_id===r.schematicSheetId&&I.anchor_position&&u.some((U)=>Math.hypot(U.center.x-I.anchor_position.x,U.center.y-I.anchor_position.y)<0.01&&!this.hasWireAtPin(U))))return;this.params.issues.push({lineItemType:"FlybackDiodeSeparatedFromRelayCoil",relaySchematicBox:r,diodeSchematicBox:c,coilSourcePortIds:[i[0].source_port_id,i[1].source_port_id],distanceFromCoilPins:X,message:`Place ${c.sourceComponentName||"component"} beside ${r.sourceComponentName||"component"}'s coil pins so the flyback protection loop can be read together. Preserve diode polarity and all pin connections; leave room for labels and reroute affected traces.`})}hasWireAtPin(t){return this.params.ctx.circuitJson.some((e)=>e.type==="schematic_trace"&&e.schematic_sheet_id===t.schematic_sheet_id&&e.edges.some(({from:r,to:i})=>{let n=i.x-r.x,a=i.y-r.y,o=n*n+a*a,c=o?Math.max(0,Math.min(1,((t.center.x-r.x)*n+(t.center.y-r.y)*a)/o)):0;return Math.hypot(t.center.x-r.x-c*n,t.center.y-r.y-c*a)<0.01}))}uniquePort(t,e){let r=this.index.portsByComponent.get(t)?.filter((i)=>wi(i,e));return r?.length===1?r[0]:void 0}coilPorts(t){if(this.index.components.get(t)?.ftype!=="simple_chip")return;let e=this.index.portsByComponent.get(t)??[];if(!this.uniquePort(t,/^(?:COM|COMMON)$/)||!e.some((i)=>wi(i,/^(?:NO|NC|NORMALLYOPEN|NORMALLYCLOSED)$/)))return;if(e.filter((i)=>wi(i,/^(?:COIL[A-B12]|A[12])$/)).length!==2)return;for(let[i,n]of[["COILA","COILB"],["COIL1","COIL2"],["A1","A2"]]){let a=this.uniquePort(t,new RegExp(`^${i}$`)),o=this.uniquePort(t,new RegExp(`^${n}$`));if(a&&o&&a!==o&&!wi(a,new RegExp(`^${n}$`))&&!wi(o,new RegExp(`^${i}$`)))return[a,o]}}hasGroundedDriver(t,e){return(this.index.portsByNet.get(t)??[]).some((r)=>{let i=r.source_component_id,n=this.index.components.get(i);if(n?.ftype!=="simple_chip"&&!(n?.ftype==="simple_transistor"&&n.transistor_type==="npn"))return!1;if(this.index.portsByComponent.get(i)?.length!==3)return!1;let a=this.uniquePort(i,/^(?:C|COLLECTOR)$/),o=this.uniquePort(i,/^(?:E|EMITTER)$/),c=this.uniquePort(i,/^(?:B|BASE)$/);if(!a||!o||!c||new Set([a,o,c]).size!==3||[a,o,c].some((p)=>p.do_not_connect)||a.source_port_id!==r.source_port_id)return!1;let l=this.index.connected(o.source_port_id),s=this.index.connected(c.source_port_id);return this.index.groundNets.has(l)&&!this.index.powerNets.has(l)&&new Set([t,e,l,s]).size===4})}static issueToString(t){let e=[];return S(e,"relayName",t.relaySchematicBox.sourceComponentName),S(e,"diodeName",t.diodeSchematicBox.sourceComponentName),S(e,"distanceFromCoilPins",t.distanceFromCoilPins),S(e,"message",t.message),`<FlybackDiodeSeparatedFromRelayCoil ${e.join(" ")} />`}}function wi(t,e){return[t.name,...t.port_hints??[]].some((r)=>e.test(r.toUpperCase().replace(/[\s_]/g,"")))}var We=0.01;class wr extends at{params;index;hostIds;traces;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_chip").map((e)=>e.source_component_id),this.traces=t.ctx.circuitJson.filter((e)=>e.type==="schematic_trace"),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.hostIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.portsByComponent.get(t)??[],n=i.filter((k)=>Ds(k)==="positive"),a=i.filter((k)=>Ds(k)==="negative"),o=i.filter((k)=>Ai(k,/^(?:OUT|VOUT|OUTPUT)$/));if(!r||n.length!==1||a.length!==1||o.length!==1||!i.some((k)=>Ai(k,/^(?:VS|VCC|VDD)$/))||!i.some((k)=>Ai(k,/^(?:GND|GROUND|VSS)$/)))return;let c=[n[0],a[0]],l=c.map((k)=>e.connected(k.source_port_id));if(c.some((k)=>k.do_not_connect)||l[0]===l[1]||l.includes(e.connected(o[0].source_port_id)))return;let s=c.map((k)=>e.port(k)),[p,d]=s;if(!p||!d||!p.facing_direction||p.facing_direction!==d.facing_direction||s.some((k)=>k.schematic_sheet_id!==r.schematicSheetId))return;let m=new Set((e.portsByNet.get(l[0])??[]).filter((k)=>e.components.get(k.source_component_id)?.ftype==="simple_resistor").map((k)=>k.source_component_id).filter((k)=>e.twoTerminalNets(k)?.includes(l[1])));if(m.size!==1)return;let u=[...m][0],y=e.components.get(u);if(y?.ftype!=="simple_resistor"||!Number.isFinite(y.resistance)||y.resistance<=0||y.resistance>1)return;if(l.some((k)=>(e.portsByNet.get(k)??[]).some((st)=>st.source_component_id!==t&&Ds(st)!==void 0&&e.components.get(st.source_component_id)?.ftype==="simple_chip")))return;let f=e.placement(u);if(!f||!e.sameLocalScope(r,f))return;let _=e.portsByComponent.get(u);if(_.some((k)=>k.do_not_connect))return;let x=l.map((k)=>e.port(_.find((st)=>e.connected(st.source_port_id)===k)));if(x.some((k)=>!k||k.schematic_sheet_id!==r.schematicSheetId))return;let Y=p.facing_direction==="left"||p.facing_direction==="right",b=(k)=>Y?k.y:k.x,M=b(p.center),O=b(d.center),X=Math.abs(M-O);if(X<We)return;let E=Y?f.schY:f.schX,I=(Y?f.height:f.width)/2,U=Math.max(Math.min(M,O)-(E+I),E-I-Math.max(M,O));if(U<=Math.max(1.5,2*X)||Math.hypot(f.schX-r.schX,f.schY-r.schY)>Math.max(8,4*Math.max(r.width,r.height)))return;let q=s.map((k,st)=>this.hasVisibleConnection(x[st],k,l[st]));if(q[0]===q[1])return;let ct=q[0]?1:0,Q=l[ct];if(!this.params.ctx.circuitJson.some((k)=>{if(k.type!=="schematic_net_label"||k.schematic_sheet_id!==r.schematicSheetId)return!1;if(k.source_net_id&&(e.connected(k.source_net_id)===Q||e.connected(`connectivity:${k.source_net_id}`)===Q))return!0;let st=x[ct].center;if(k.anchor_position&&Math.hypot(k.anchor_position.x-st.x,k.anchor_position.y-st.y)<We)return!0;return k.source_trace_id!==void 0&&this.sourceTraceTouchesNet(k.source_trace_id,Q)}))return;this.params.issues.push({lineItemType:"CurrentSenseShuntSeparatedFromInputs",amplifierSchematicBox:r,shuntSchematicBox:f,positiveInputSourcePortId:c[0].source_port_id,negativeInputSourcePortId:c[1].source_port_id,inputBandGap:U,message:`Place ${f.sourceComponentName||"component"} near ${r.sourceComponentName||"component"}.${c[0].name}/${c[1].name}, so both sense connections can be read together. Move or rotate the shunt as needed; preserve all pin connections and leave room for labels.`})}hasVisibleConnection(t,e,r){let i=this.traces.filter((o)=>{if(o.schematic_sheet_id!==t.schematic_sheet_id)return!1;if(o.subcircuit_connectivity_map_key)return this.index.connected(`connectivity:${o.subcircuit_connectivity_map_key}`)===r;if(this.sourceTraceTouchesNet(o.source_trace_id,r))return!0;let c=[o.edges[0]?.from,o.edges.at(-1)?.to],l=new Set(this.params.ctx.circuitJson.flatMap((s)=>s.type==="schematic_port"&&s.source_port_id&&s.schematic_sheet_id===o.schematic_sheet_id&&c.some((p)=>p&&Math.hypot(p.x-s.center.x,p.y-s.center.y)<We)?[this.index.connected(s.source_port_id)]:[]));return l.size===1&&l.has(r)}).flatMap((o)=>o.edges),n=i.filter((o)=>xn(t.center,o.from,o.to)),a=new Set;for(let o=0;o<n.length;o++){let c=n[o];if(xn(e.center,c.from,c.to))return!0;for(let[l,s]of i.entries()){if(a.has(l)||![c.from,c.to].some((p)=>xn(p,s.from,s.to))&&![s.from,s.to].some((p)=>xn(p,c.from,c.to)))continue;a.add(l),n.push(s)}}return!1}sourceTraceTouchesNet(t,e){if(!t)return!1;let r=this.params.ctx.circuitJson.find((i)=>i.type==="source_trace"&&i.source_trace_id===t);return r?.type==="source_trace"&&r.connected_source_port_ids.some((i)=>this.index.connected(i)===e)}static issueToString(t){let e=[];return S(e,"amplifierName",t.amplifierSchematicBox.sourceComponentName),S(e,"shuntName",t.shuntSchematicBox.sourceComponentName),S(e,"inputBandGap",t.inputBandGap),S(e,"message",t.message),`<CurrentSenseShuntSeparatedFromInputs ${e.join(" ")} />`}}function Ai(t,e){return[t.name,...t.port_hints??[]].some((r)=>e.test(r.toUpperCase().replace(/[\s_]/g,"")))}function Ds(t){let e=Ai(t,/^(?:IN\+|VIN\+|INPOS|VINPOS)$/),r=Ai(t,/^(?:IN-|VIN-|INNEG|VINNEG)$/);return e===r?void 0:e?"positive":"negative"}function xn(t,e,r){let i=r.x-e.x,n=r.y-e.y,a=Math.hypot(i,n);if(a<We)return Math.hypot(t.x-e.x,t.y-e.y)<We;let o=((t.x-e.x)*i+(t.y-e.y)*n)/a;return o>=-We&&o<=a+We&&Math.abs((t.x-e.x)*n-(t.y-e.y)*i)/a<We}class Ar extends at{params;index;positiveNets=new Set;resistorIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.resistorIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_resistor").map((e)=>e.source_component_id);for(let e of t.ctx.circuitJson)if(e.type==="source_net"&&e.is_positive_voltage_source)this.positiveNets.add(this.index.connected(e.source_net_id));this.solved=this.resistorIds.length===0}_step(){let t=this.resistorIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.resistorIds.length,!t||!this.isResistor(t))return;let e=this.index,r=e.twoTerminalNets(t);if(!r)return;let i=r.filter((_)=>e.isRail(_));if(i.length!==1)return;let n=i[0];if(!this.positiveNets.has(n)||e.groundNets.has(n))return;let a=r.find((_)=>_!==n),o=e.portsByNet.get(a)??[],c=new Set(o.filter((_)=>e.components.get(_.source_component_id)?.ftype==="simple_resistor").map((_)=>_.source_component_id));if(c.size!==2)return;let l=[...c].find((_)=>_!==t);if(!this.isResistor(l))return;let s=e.twoTerminalNets(l),p=s?.find((_)=>_!==a);if(!s?.includes(a)||!p||!e.groundNets.has(p)||e.powerNets.has(p)||!o.some((_)=>!c.has(_.source_component_id)))return;let d=e.placement(t),m=e.placement(l);if(!d||!m||!e.sameLocalScope(d,m))return;let u=this.getDownwardResistorPorts(t,n,a),y=this.getDownwardResistorPorts(l,a,p);if(!u||!y)return;let f=m.schY-m.height/2-(d.schY+d.height/2);if(f<=1.5)return;this.params.issues.push({lineItemType:"VoltageDividerSupplyResistorBelowGroundResistor",supplyResistorSchematicBox:d,groundResistorSchematicBox:m,supplyTapSourcePortId:u.bottom.source_port_id,groundTapSourcePortId:y.top.source_port_id,reversedBodyGap:f,message:`Place ${d.sourceComponentName||"component"} above ${m.sourceComponentName||"component"}, close enough to read their shared divider tap. Preserve all connections and leave room for labels; exact alignment is not required.`})}isResistor(t){let e=this.index.components.get(t);return e?.ftype==="simple_resistor"&&Number.isFinite(e.resistance)&&e.resistance>0}getDownwardResistorPorts(t,e,r){let i=this.index,n=i.placement(t),a=i.portsByComponent.get(t);if(a.some((p)=>p.do_not_connect))return;let o=a.find((p)=>i.connected(p.source_port_id)===e),c=a.find((p)=>i.connected(p.source_port_id)===r);if(!o||!c)return;let l=i.port(o),s=i.port(c);if(!l||!s||l.schematic_sheet_id!==n.schematicSheetId||s.schematic_sheet_id!==n.schematicSheetId||l.facing_direction!=="up"||s.facing_direction!=="down"||l.center.y<=s.center.y)return;return{top:o,bottom:c}}static issueToString(t){let e=[];return S(e,"supplyResistorName",t.supplyResistorSchematicBox.sourceComponentName),S(e,"groundResistorName",t.groundResistorSchematicBox.sourceComponentName),S(e,"reversedBodyGap",t.reversedBodyGap),S(e,"message",t.message),`<VoltageDividerSupplyResistorBelowGroundResistor ${e.join(" ")} />`}}class Br extends at{params;index;hostIds;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_chip").map((e)=>e.source_component_id),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.hostIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.portsByComponent.get(t)??[];if(!r||i.some((E)=>!bn(E)))return;let n=i.filter((E)=>bn(E)==="input"),a=i.filter((E)=>bn(E)==="output"),o=i.filter((E)=>bn(E)==="ground");if(n.length!==1||a.length!==1||!o.length)return;let c=n[0],l=a[0];if([c,l,...o].some((E)=>E.do_not_connect))return;let s=e.connected(c.source_port_id),p=e.connected(l.source_port_id),d=new Set(o.map((E)=>e.connected(E.source_port_id)));if(d.size!==1)return;let m=[...d][0];if(new Set([s,p,m]).size!==3||!(e.groundNets.has(m)||o.some((E)=>E.requires_ground||E.provides_ground))||!(e.powerNets.has(s)||c.requires_power)||!(e.powerNets.has(p)||l.provides_power))return;let u=e.port(c),y=e.port(l);if(!u||!y||u.schematic_sheet_id!==r.schematicSheetId||y.schematic_sheet_id!==r.schematicSheetId)return;let f=u.facing_direction==="left"&&y.facing_direction==="right"||u.facing_direction==="right"&&y.facing_direction==="left",_=u.facing_direction==="up"&&y.facing_direction==="down"||u.facing_direction==="down"&&y.facing_direction==="up";if(!f&&!_)return;let x=y.facing_direction==="right"||y.facing_direction==="up"?1:-1;if(x*(f?y.center.x-u.center.x:y.center.y-u.center.y)<=0.01)return;let b=this.localCapacitor(r,s,m),M=this.localCapacitor(r,p,m);if(!b||!M)return;let O=(E,I)=>{let U=I*x*(f?E.schX-r.schX:E.schY-r.schY),q=f?(r.width+E.width)/2:(r.height+E.height)/2;return U>q+0.2};if(!O(b,1)||!O(M,-1))return;let X=r.sourceComponentName||"component";this.params.issues.push({lineItemType:"RegulatorCapacitorsOnWrongSides",regulatorSchematicBox:r,inputCapacitorSchematicBox:b,outputCapacitorSchematicBox:M,inputSourcePortId:c.source_port_id,outputSourcePortId:l.source_port_id,message:`Place ${b.sourceComponentName} near ${X}.${c.name} on the ${u.facing_direction} side and ${M.sourceComponentName} near ${X}.${l.name} on the ${y.facing_direction} side. Preserve all connections and leave room for labels; exact alignment is not required.`})}localCapacitor(t,e,r){let i=this.index,n=[],a=Math.max(6,4*Math.max(t.width,t.height)),o=new Set((i.portsByNet.get(e)??[]).map((c)=>c.source_component_id));for(let c of o){if(i.components.get(c)?.ftype!=="simple_capacitor")continue;let l=i.twoTerminalNets(c),s=i.placement(c);if(!l?.includes(r)||!s||!i.sameLocalScope(t,s))continue;if(Math.hypot(s.schX-t.schX,s.schY-t.schY)>a)continue;if(i.portsByComponent.get(c).some((d)=>d.do_not_connect||!i.port(d)||i.port(d).schematic_sheet_id!==t.schematicSheetId))continue;n.push(s)}return n.length===1?n[0]:void 0}static issueToString(t){let e=[];return S(e,"regulatorName",t.regulatorSchematicBox.sourceComponentName),S(e,"inputCapacitorName",t.inputCapacitorSchematicBox.sourceComponentName),S(e,"outputCapacitorName",t.outputCapacitorSchematicBox.sourceComponentName),S(e,"message",t.message),`<RegulatorCapacitorsOnWrongSides ${e.join(" ")} />`}}function bn(t){let e=new Set;for(let r of[t.name,...t.port_hints??[]]){let i=r.toUpperCase().replace(/[ _-]/g,"");if(/^(?:VIN|IN|INPUT)$/.test(i))e.add("input");else if(/^(?:VOUT|OUT|OUTPUT)$/.test(i))e.add("output");else if(/^(?:GND\d*|VSS)$/.test(i))e.add("ground");else if(/^(?:EN|ENABLE|CE|SHDN|NC\d*|EP|PAD|ADJ|FB|BYP|BYPASS|NR|PG|PGOOD)$/.test(i))e.add("control")}return e.size===1?[...e][0]:void 0}function Ut(t,e,r,i){return{left:t-r/2,right:t+r/2,top:e+i/2,bottom:e-i/2}}function Je(t,e){let r=Math.min(t.right,e.right)-Math.max(t.left,e.left),i=Math.min(t.top,e.top)-Math.max(t.bottom,e.bottom);return r>0&&i>0?{ow:r,oh:i}:null}var Fi=0.01,Sm={right:{x:1,y:0},left:{x:-1,y:0},up:{x:0,y:1},down:{x:0,y:-1}},Xt=(t,e)=>t.x*e.x+t.y*e.y,Bi=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),Re=(t,e)=>Bi(t,e)<=Fi,Fr=(t)=>Math.round(t*100)/100;class Pr extends at{params;constructor(t){super();this.params=t}_step(){let{ctx:t,issues:e}=this.params,r=new At(t);for(let n of r.portsByComponent.values())for(let a of n){let o=r.connected(a.source_port_id);if(a.requires_ground||a.provides_ground)r.groundNets.add(o);if(a.requires_power||a.provides_power)r.powerNets.add(o)}let i=t.circuitJson.filter((n)=>n.type==="schematic_trace");for(let[n,a]of r.components){if(a.ftype!=="simple_pin_header"&&a.ftype!=="simple_connector")continue;let o=r.placement(n),c=r.portsByComponent.get(n)??[];if(!o||c.length<2)continue;let l=c.map((N)=>r.port(N)),s=l[0]?.facing_direction;if(!s||l.some((N)=>!N||N.facing_direction!==s))continue;let p=Sm[s],d={x:-p.y,y:p.x},m=i.filter((N)=>N.schematic_sheet_id===o.schematicSheetId),u=t.circuitJson.filter((N)=>N.type==="schematic_net_label"&&N.schematic_sheet_id===o.schematicSheetId),y=[],f=!1;for(let N of c){let tt=r.port(N),J=r.connected(N.source_port_id),W=(r.portsByNet.get(J)??[]).filter((et)=>et.source_port_id!==N.source_port_id),j=m.filter((et)=>et.edges.some((mt)=>Re(mt.from,tt.center)||Re(mt.to,tt.center)));if(r.isRail(J)){if(j.some((et)=>!u.some((mt)=>mt.anchor_position&&wm(et,tt.center,mt.anchor_position))))f=!0;continue}if(W.length===0){if(j.length>0)f=!0;continue}let G=W.length===1?r.port(W[0]):void 0,D=W.length===1?r.placement(W[0].source_component_id):void 0;if(!G?.facing_direction||!D||!r.sameLocalScope(o,D)||Xt(Sm[G.facing_direction],p)!==-1){f=!0;break}y.push({pin:tt,peer:G,component:D})}if(f||y.length<2)continue;if(y.some((N)=>Xt(N.peer.center,p)>=Xt(N.pin.center,p)-2))continue;let _=y.map((N)=>m.filter((tt)=>wm(tt,N.pin.center,N.peer.center)&&v2(tt)>=3)).filter((N)=>N.length>0);if(_.length<2)continue;let x=_.flat(),Y=[...y].sort((N,tt)=>Xt(N.pin.center,d)-Xt(tt.pin.center,d));if(Y.some((N,tt)=>tt>0&&Xt(N.peer.center,d)<=Xt(Y[tt-1].peer.center,d)+Fi))continue;let b={x:o.schX,y:o.schY},M=Math.max(...y.map((N)=>Xt(N.pin.center,p)-Xt(b,p))),O=Math.min(...y.map((N)=>Xt(N.peer.center,p)))-2-M,X=y.map((N)=>Xt(N.peer.center,d)-Xt(N.pin.center,d)+Xt(b,d)).sort((N,tt)=>N-tt),E=X[Math.floor(X.length/2)],I={x:Fr(p.x*O+d.x*E),y:Fr(p.y*O+d.y*E)},U={x:I.x-b.x,y:I.y-b.y},q=(N)=>({x:N.center.x+U.x,y:N.center.y+U.y});if(y.some((N)=>Bi(q(N.pin),N.peer.center)>Bi(N.pin.center,N.peer.center)+Fi))continue;let ct=y.reduce((N,tt)=>N+Bi(tt.pin.center,tt.peer.center),0),Q=y.reduce((N,tt)=>N+Bi(q(tt.pin),tt.peer.center),0);if(ct-Q<4||Q>ct*0.75)continue;let k=t.componentPlacements.filter((N)=>N.schematicSheetId===o.schematicSheetId&&N.schematicComponentId!==o.schematicComponentId),st=Ut(I.x,I.y,o.width+0.4,o.height+0.4);if(k.some((N)=>Je(st,Ut(N.schX,N.schY,N.width,N.height))))continue;if(y.some((N)=>{let tt=q(N.pin),J=N.peer.center,W=(Xt(tt,p)+Xt(J,p))/2,j=[tt,{x:p.x*W+d.x*Xt(tt,d),y:p.y*W+d.y*Xt(tt,d)},{x:p.x*W+d.x*Xt(J,d),y:p.y*W+d.y*Xt(J,d)},J];return k.some((G)=>G.schematicComponentId!==N.component.schematicComponentId&&j.slice(1).some((D,et)=>S2(j[et],D,G)))}))continue;let ot=[...new Map(y.map((N)=>[N.component.schematicComponentId,N.component])).values()],Z=o.sourceComponentName||"component";e.push({lineItemType:"ConnectorPositionCausesTraceDetours",connectorSchematicBox:o,connectedComponents:ot,schematicTraceIds:[...new Set(x.map((N)=>N.schematic_trace_id))],evaluatedSignalCount:y.length,newSchX:I.x,newSchY:I.y,deltaSchX:Fr(U.x),deltaSchY:Fr(U.y),currentTotalSignalDistance:Fr(ct),suggestedTotalSignalDistance:Fr(Q),message:`Move ${Z} to schX=${I.x}, schY=${I.y} so its signal pins face ${ot.map((N)=>N.sourceComponentName||"component").join(", ")}. Preserve rotation and pin assignments; reroute the connections and attached rail labels.`})}this.solved=!0}static issueToString(t){let e=[];S(e,"connectorComponentName",t.connectorSchematicBox.sourceComponentName),S(e,"connectedComponents",t.connectedComponents.map((r)=>r.sourceComponentName||"component").join(","));for(let r of["evaluatedSignalCount","newSchX","newSchY","deltaSchX","deltaSchY","currentTotalSignalDistance","suggestedTotalSignalDistance"])S(e,r,t[r]);return S(e,"message",t.message),`<ConnectorPositionCausesTraceDetours ${e.join(" ")} />`}}function wm(t,e,r){let i=t.edges[0]?.from,n=t.edges.at(-1)?.to;return!!i&&!!n&&(Re(i,e)&&Re(n,r)||Re(i,r)&&Re(n,e))}function v2(t){let e,r=0;for(let i=0;i<t.edges.length;i++){let n=t.edges[i];if(i>0&&!Re(t.edges[i-1].to,n.from))return 0;if(Re(n.from,n.to))continue;let a=Math.abs(n.from.y-n.to.y)<Fi?"x":Math.abs(n.from.x-n.to.x)<Fi?"y":void 0;if(!a)return 0;if(e&&e!==a)r++;e=a}return r}function S2(t,e,r){let i=Ut(r.schX,r.schY,r.width+0.2,r.height+0.2);return Math.max(t.x,e.x)>i.left&&Math.min(t.x,e.x)<i.right&&Math.max(t.y,e.y)>i.bottom&&Math.min(t.y,e.y)<i.top}class Ir extends at{index;positiveNets=new Set;transistorIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t);for(let r of t.circuitJson)if(r.type==="source_net"&&r.is_positive_voltage_source)this.positiveNets.add(this.index.connected(r.source_net_id));this.transistorIds=[...this.index.components.values()].filter((r)=>r.ftype==="simple_transistor"&&r.transistor_type==="npn").map((r)=>r.source_component_id),this.solved=this.transistorIds.length===0}_step(){let t=this.transistorIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.transistorIds.length,!t)return;let e=this.index,r=e.placement(t);if(!r||e.portsByComponent.get(t)?.length!==3)return;let i=e.namedPort(t,"base"),n=e.namedPort(t,"collector"),a=e.namedPort(t,"emitter");if(!i||!n||!a)return;let o=e.connected(i.source_port_id),c=e.connected(n.source_port_id),l=e.connected(a.source_port_id);if(new Set([o,c,l]).size!==3||!e.groundNets.has(l)||e.powerNets.has(l)||e.isRail(o)||e.isRail(c))return;let s=(e.portsByNet.get(o)??[]).filter((tt)=>tt.source_component_id!==t);if(s.length!==1)return;let p=s[0].source_component_id,d=e.components.get(p),m=e.placement(p),y=e.twoTerminalNets(p)?.find((tt)=>tt!==o);if(d?.ftype!=="simple_resistor"||d.resistance<=0||!m||!e.sameLocalScope(r,m)||!y||e.isRail(y)||y===c)return;let f=(e.portsByNet.get(c)??[]).filter((tt)=>tt.source_component_id!==t),_=f.filter((tt)=>e.components.get(tt.source_component_id)?.ftype==="simple_chip");if(_.length!==1)return;let x=_[0].source_component_id,Y=e.placement(x),M=e.twoTerminalNets(x)?.find((tt)=>tt!==c);if(!Y||!e.sameLocalScope(r,Y)||!M||!this.positiveNets.has(M)||e.groundNets.has(M))return;let O=f.filter((tt)=>tt.source_component_id!==x);if(O.length!==1)return;let X=O[0].source_component_id,E=e.placement(X),I=e.namedPort(X,"anode"),U=e.namedPort(X,"cathode");if(e.components.get(X)?.ftype!=="simple_diode"||!e.twoTerminalNets(X)||!I||!U||e.connected(I.source_port_id)!==c||e.connected(U.source_port_id)!==M||!E||!e.sameLocalScope(r,E))return;let q=e.port(n),ct=e.port(a),Q=e.port(i);if(!q||!ct||!Q)return;let k=q.facing_direction,st=ct.facing_direction;if(!k||!st)return;let ot=[];if(r.schY>=Y.schY)ot.push("transistor_not_below_load");if(k!=="up")ot.push("collector_not_up");if(st!=="down")ot.push("emitter_not_down");if(ot.length===0)return;let Z=r.sourceComponentName||"component",N=Y.sourceComponentName||"component";this.issues.push({lineItemType:"LowSideTransistorNotAlignedWithLoad",transistorSchematicBox:r,loadSchematicBox:Y,baseResistorSchematicBox:m,clampDiodeSchematicBox:E,collectorSourcePortId:n.source_port_id,emitterSourcePortId:a.source_port_id,collectorFacingDirection:k,emitterFacingDirection:st,placementProblems:ot,message:`Arrange ${Z} below ${N}, with its collector facing up toward the load and emitter facing down toward ground; place ${m.sourceComponentName||"component"} beside the base. Preserve all pin connections and reroute affected traces.`})}static issueToString(t){let e=[];return S(e,"transistorName",t.transistorSchematicBox.sourceComponentName),S(e,"loadName",t.loadSchematicBox.sourceComponentName),S(e,"baseResistorName",t.baseResistorSchematicBox.sourceComponentName),S(e,"clampDiodeName",t.clampDiodeSchematicBox.sourceComponentName),S(e,"placementProblems",t.placementProblems.join(",")),S(e,"collectorFacingDirection",t.collectorFacingDirection),S(e,"emitterFacingDirection",t.emitterFacingDirection),S(e,"message",t.message),`<LowSideTransistorNotAlignedWithLoad ${e.join(" ")} />`}}class Mr extends at{params;index;hostIds;reportedPairs=new Set;currentIndex=0;constructor(t){super();this.params=t;this.index=new At(t.ctx),this.hostIds=[...this.index.components.values()].filter((e)=>e.ftype==="simple_chip").map((e)=>e.source_component_id),this.solved=this.hostIds.length===0}_step(){let t=this.hostIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.hostIds.length,!t)return;let e=this.index.portsByComponent.get(t)??[],r=e.filter((O)=>Am(O)==="positive"),i=e.filter((O)=>Am(O)==="negative");if(r.length!==1||i.length!==1)return;let n=r[0],a=i[0],o=this.seriesResistor(n),c=this.seriesResistor(a);if(!o||!c||o.axis!==c.axis||!this.index.sameLocalScope(o.placement,c.placement)||new Set([o.hostNet,c.hostNet,o.interfaceNet,c.interfaceNet]).size!==4||!this.shareInterface(o,c,t))return;let l=[o.id,c.id].sort().join("\x00");if(this.reportedPairs.has(l))return;let s=o.placement,p=c.placement,d=o.axis==="horizontal",m=Math.abs(d?s.schX-p.schX:s.schY-p.schY),u=Math.abs(d?s.schY-p.schY:s.schX-p.schX),y=d?s.width:s.height,f=d?p.width:p.height,_=d?s.height:s.width,x=d?p.height:p.width;if(m-(y+f)/2<Math.max(y,f)||u>=(_+x)/2-0.01)return;this.reportedPairs.add(l);let b=s.sourceComponentName||"component",M=p.sourceComponentName||"component";this.params.issues.push({lineItemType:"UsbSeriesResistorsNotAligned",positiveResistorSchematicBox:s,negativeResistorSchematicBox:p,hostSourceComponentId:t,positiveSourcePortId:n.source_port_id,negativeSourcePortId:a.source_port_id,signalAxis:o.axis,message:`Place ${b} (D+) and ${M} (D−) near each other and draw clear traces to their corresponding USB ports. Exact alignment is not required; preserve pin assignments and leave space for labels.`})}seriesResistor(t){let e=this.index,r=e.connected(t.source_port_id);if(e.isRail(r))return;let i=new Set((e.portsByNet.get(r)??[]).filter((u)=>e.components.get(u.source_component_id)?.ftype==="simple_resistor").map((u)=>u.source_component_id));if(i.size!==1)return;let n=[...i][0],o=e.twoTerminalNets(n)?.find((u)=>u!==r),c=e.placement(n);if(!o||e.isRail(o)||!c)return;if((e.portsByNet.get(o)??[]).some((u)=>u.source_component_id!==n&&e.components.get(u.source_component_id)?.ftype==="simple_resistor"))return;let l=e.portsByComponent.get(n).map((u)=>e.port(u)),[s,p]=l;if(!s||!p)return;let d=new Set([s.facing_direction,p.facing_direction]),m;if(d.has("left")&&d.has("right")&&Math.abs(s.center.y-p.center.y)<0.01)m="horizontal";else if(d.has("up")&&d.has("down")&&Math.abs(s.center.x-p.center.x)<0.01)m="vertical";else return;return{id:n,placement:c,hostNet:r,interfaceNet:o,axis:m}}shareInterface(t,e,r){let i=(a)=>new Set((this.index.portsByNet.get(a)??[]).map((o)=>o.source_component_id).filter((o)=>o!==r&&o!==t.id&&o!==e.id&&(this.index.portsByComponent.get(o)?.length??0)>2)),n=i(t.interfaceNet);return[...i(e.interfaceNet)].some((a)=>n.has(a))}static issueToString(t){let e=[];return S(e,"positiveResistorName",t.positiveResistorSchematicBox.sourceComponentName),S(e,"negativeResistorName",t.negativeResistorSchematicBox.sourceComponentName),S(e,"signalAxis",t.signalAxis),S(e,"message",t.message),`<UsbSeriesResistorsNotAligned ${e.join(" ")} />`}}function Am(t){let e=new Set;for(let r of[t.name,...t.port_hints??[]]){let i=r.toUpperCase();if(/^(?:USB_?)?D(?:P|\+|_POS)$/.test(i))e.add("positive");if(/^(?:USB_?)?D(?:M|N|-|_NEG)$/.test(i))e.add("negative")}return e.size===1?[...e][0]:void 0}function Bm(t){return t.filter((e)=>e!==void 0).reduce((e,r)=>fn(e,r),{})}function Fm(t,e,r){return{rects:[{center:{x:t.schX,y:t.schY},width:t.width,height:t.height,stroke:e,fill:e.replace("0.95","0.15"),label:r}]}}function Pm(t){return{rects:t.filter((r)=>r.type==="schematic_box").map((r)=>{let i=r;return{center:{x:i.x,y:i.y},width:i.width,height:i.height,stroke:"hsl(0,0%,60%)"}})}}class re extends at{static EPSILON=0.01;static ORIENTATION_MESSAGE='Use schOrientation="vertical" on this capacitor to fix the symbol orientation';ctx;out;schematicComponentById;sourceComponentById;capacitorPlacements;feedbackCapacitorIds;currentPlacementIndex=0;horizontalSymbolNames=new Set(["capacitor_left","capacitor_right"]);constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e,this.schematicComponentById=this.buildSchematicComponentById(t.circuitJson),this.sourceComponentById=this.buildSourceComponentById(t.circuitJson),this.capacitorPlacements=this.getCapacitorPlacements();let r=new At(t);this.feedbackCapacitorIds=new Set(this.capacitorPlacements.flatMap((i)=>i.sourceComponentId&&r.isDirectOpAmpFeedback(i.sourceComponentId)?[i.sourceComponentId]:[])),this.solved=this.capacitorPlacements.length===0}getCapacitorPlacements(){return this.ctx.componentPlacements.filter((t)=>t.sourceComponentId!==void 0&&this.sourceComponentById.get(t.sourceComponentId)?.ftype==="simple_capacitor").map((t)=>({schX:t.schX,schY:t.schY,width:t.width,height:t.height,sourceComponentId:t.sourceComponentId,sourceComponentName:t.sourceComponentName,schematicComponentId:t.schematicComponentId,schematicSheetId:t.schematicSheetId,schematicSheetName:t.schematicSheetName}))}_step(){let t=this.capacitorPlacements[this.currentPlacementIndex];if(!t){this.solved=!0;return}this.currentPlacementIndex+=1,this.solved=this.currentPlacementIndex>=this.capacitorPlacements.length;let e=this.getIssueForPlacement(t);if(e)this.out.push(e)}visualize(){let t=this.getFocusedPlacement();return Bm([Pm(this.ctx.circuitJson),t?Fm(t,"hsl(210, 100%, 50%, 0.95)","capacitorOrientation"):void 0])}getFocusedPlacement(){if(this.capacitorPlacements.length===0)return;let t=this.iterations===0?this.currentPlacementIndex:Math.max(0,this.currentPlacementIndex-1);return this.capacitorPlacements[t]}buildSchematicComponentById(t){return new Map(t.filter((e)=>e.type==="schematic_component").map((e)=>[e.schematic_component_id,e]))}buildSourceComponentById(t){return new Map(t.flatMap((e)=>{if(e.type!=="source_component"||!("source_component_id"in e)||typeof e.source_component_id!=="string")return[];return[{type:"source_component",source_component_id:e.source_component_id,ftype:"ftype"in e&&typeof e.ftype==="string"?e.ftype:void 0}]}).map((e)=>[e.source_component_id,e]))}createIssuePlacement(t){return{positionAnchor:"center",schX:t.schX,schY:t.schY,width:t.width,height:t.height,sourceComponentId:t.sourceComponentId,sourceComponentName:t.sourceComponentName,schematicComponentId:t.schematicComponentId,schematicSheetId:t.schematicSheetId,schematicSheetName:t.schematicSheetName}}getIssueForPlacement(t){if(!t.schematicComponentId||!t.sourceComponentId)return;let e=this.schematicComponentById.get(t.schematicComponentId);if(!e)return;if(!this.horizontalSymbolNames.has(e.symbol_name??""))return;if(this.feedbackCapacitorIds.has(t.sourceComponentId))return;if(this.isInlineWithHorizontalTraces(t.schematicComponentId))return;return{lineItemType:"CapacitorSymbolHorizontal",schematicBox:this.createIssuePlacement(t),message:re.ORIENTATION_MESSAGE}}isInlineWithHorizontalTraces(t){let e=this.ctx.circuitJson.filter((i)=>i.type==="schematic_port"&&i.schematic_component_id===t);if(e.length!==2)return!1;let r=e.map((i)=>this.getOutwardHorizontalTrace(i));return r.every((i)=>i!==void 0)&&r.some((i)=>i!==void 0&&i.edges.every((n)=>Math.abs(n.from.y-n.to.y)<=re.EPSILON))}getOutwardHorizontalTrace(t){if(t.facing_direction!=="left"&&t.facing_direction!=="right")return;return this.ctx.circuitJson.find((e)=>e.type==="schematic_trace"&&e.schematic_sheet_id===t.schematic_sheet_id&&e.edges.some((r)=>{let i=this.pointsEqual(r.from,t.center)?r.to:this.pointsEqual(r.to,t.center)?r.from:void 0;return i!==void 0&&Math.abs(i.y-t.center.y)<=re.EPSILON&&(t.facing_direction==="left"?i.x<t.center.x-re.EPSILON:i.x>t.center.x+re.EPSILON)}))}pointsEqual(t,e){return Math.abs(t.x-e.x)<=re.EPSILON&&Math.abs(t.y-e.y)<=re.EPSILON}static issueToString(t){let e=[];return S(e,"componentName",t.schematicBox.sourceComponentName),S(e,"schX",t.schematicBox.schX),S(e,"schY",t.schematicBox.schY),S(e,"width",t.schematicBox.width),S(e,"height",t.schematicBox.height),S(e,"message",t.message),`<CapacitorSymbolHorizontal ${e.join(" ")} />`}}class Se extends at{params;static MIN_BODY_GAP=1;banks=[];netNames=new Map;bankIndex=0;constructor(t){super();this.params=t;let e=new At(t.ctx),r=new Set(e.powerNets),i=new Set(e.groundNets);for(let n of t.ctx.circuitJson)if(n.type==="source_net"){let a=e.connected(n.source_net_id);if(!this.netNames.has(a))this.netNames.set(a,n.name)}for(let n of e.portsByComponent.values())for(let a of n){if(a.do_not_connect)continue;let o=e.connected(a.source_port_id);if(a.provides_power||a.requires_power)r.add(o);if(a.provides_ground||a.requires_ground)i.add(o);if((r.has(o)||i.has(o))&&!this.netNames.has(o))this.netNames.set(o,a.name)}for(let n of e.components.values()){if(n.ftype!=="simple_capacitor")continue;let a=n.source_component_id,o=e.placement(a),c=e.twoTerminalNets(a),l=e.portsByComponent.get(a);if(!o||!c||!l||l.some((m)=>{let u=e.port(m);return m.do_not_connect||!u||u.schematic_sheet_id!==o.schematicSheetId}))continue;let s=c.find((m)=>r.has(m)&&!i.has(m)),p=c.find((m)=>i.has(m)&&!r.has(m));if(!s||!p)continue;let d=this.banks.find((m)=>m.power===s&&m.ground===p&&e.sameLocalScope(m.capacitors[0],o));if(d)d.capacitors.push(o);else this.banks.push({power:s,ground:p,capacitors:[o]})}this.solved=this.banks.length===0}_step(){let t=this.banks[this.bankIndex++];if(this.solved=this.bankIndex>=this.banks.length,t.capacitors.length<2)return;let e=Math.max(Se.MIN_BODY_GAP,...t.capacitors.map((o)=>Math.max(o.width,o.height))),r=0,i=t.capacitors.slice(1).map((o)=>({box:o,gap:Se.bodyGap(t.capacitors[0],o)}));while(i.length>0){let o=0;for(let l=1;l<i.length;l++)if(i[l].gap<i[o].gap)o=l;let c=i.splice(o,1)[0];r=Math.max(r,c.gap);for(let l of i)l.gap=Math.min(l.gap,Se.bodyGap(c.box,l.box))}if(r<=e+0.000001)return;let n=this.netNames.get(t.power)??"power",a=this.netNames.get(t.ground)??"ground";this.params.issues.push({lineItemType:"DecouplingCapacitorsNotCloseTogether",railName:n,groundName:a,capacitorSchematicBoxes:t.capacitors,maxBodyGap:r,maxRecommendedBodyGap:e,message:`Group the decoupling capacitors between ${n} and ${a} closer together in this schematic block. Preserve their net connections.`})}static bodyGap(t,e){return Math.hypot(Math.max(0,Math.abs(t.schX-e.schX)-(t.width+e.width)/2),Math.max(0,Math.abs(t.schY-e.schY)-(t.height+e.height)/2))}static issueToString(t){let e=[];return S(e,"rail",t.railName),S(e,"ground",t.groundName),S(e,"capacitorNames",t.capacitorSchematicBoxes.map((r)=>r.sourceComponentName||"component").join(", ")),S(e,"maxBodyGap",t.maxBodyGap),S(e,"maxRecommendedBodyGap",t.maxRecommendedBodyGap),S(e,"message",t.message),`<DecouplingCapacitorsNotCloseTogether ${e.join(" ")} />`}}function kr(t){let e=t.anchor_side;if(e==="top"||e==="bottom"){let l=t.anchor_position?.y??t.center.y,s=(t.text?.length??8)*0.13/2+0.1,p=t.center.x-0.1,d=t.center.x+0.1;if(e==="top")return{left:p,right:d,top:l,bottom:l-s*2};return{left:p,right:d,top:l+s*2,bottom:l}}let i=t.anchor_position?.x??t.center.x,a=Math.abs(t.center.x-i)+0.1,o=t.center.y+0.1,c=t.center.y-0.1;if(t.center.x>=i)return{left:i,right:t.center.x+a,top:o,bottom:c};return{left:t.center.x-a,right:i,top:o,bottom:c}}class Oe extends at{params;placements;netLabelsByComponentId;rawCollisions=[];firstIndex=0;secondIndex=1;constructor(t){super();this.params=t;this.placements=t.ctx.componentPlacements,this.netLabelsByComponentId=this.buildNetLabelsByComponentId(t.ctx.circuitJson),this.solved=this.placements.length<2}_step(){if(this.firstIndex>=this.placements.length-1){this.buildAndPushIssues(),this.solved=!0;return}let t=this.placements[this.firstIndex],e=this.placements[this.secondIndex];if(this.detectPair(t,e),this.secondIndex++,this.secondIndex>=this.placements.length)this.firstIndex++,this.secondIndex=this.firstIndex+1}detectPair(t,e){if(t.schematicSheetId!==e.schematicSheetId)return;this.rawCollisions.push(...this.detectLabelLabel(t,e)),this.rawCollisions.push(...this.detectBoxLabel(t,e)),this.rawCollisions.push(...this.detectBoxLabel(e,t))}detectLabelLabel(t,e){let r=t,i=e;if(t.schX>e.schX)r=e,i=t;let n=r.schematicComponentId,a=i.schematicComponentId;if(!n||!a)return[];let o=this.netLabelsByComponentId.get(n)??[],c=this.netLabelsByComponentId.get(a)??[];if(o.length===0||c.length===0)return[];let l=[];for(let s of o)for(let p of c){let d=kr(s),m=kr(p);if(Je(d,m))l.push({type:"label-label",bounds:{left:Math.max(d.left,m.left),right:Math.min(d.right,m.right),top:Math.min(d.top,m.top),bottom:Math.max(d.bottom,m.bottom)},leftComp:r,rightComp:i,leftId:n,rightId:a,xSeparation:d.right-m.left+0.1})}return l}detectBoxLabel(t,e){let r=t.schematicComponentId,i=e.schematicComponentId;if(!r||!i)return[];let n=this.netLabelsByComponentId.get(i)??[];if(n.length===0)return[];let a=Ut(t.schX,t.schY,t.width,t.height),o=t.schX<=e.schX,c=[];for(let l of n){let s=kr(l);if(!Je(a,s))continue;let p;if(o)p=a.right-s.left+0.1;else p=s.right-a.left+0.1;c.push({type:"box-label",bounds:{left:Math.max(a.left,s.left),right:Math.min(a.right,s.right),top:Math.min(a.top,s.top),bottom:Math.max(a.bottom,s.bottom)},boxComp:t,labelComp:e,boxId:r,labelId:i,xSeparation:p})}return c}buildAndPushIssues(){if(this.rawCollisions.length===0)return;let t=new Map;for(let e of this.rawCollisions){let i=(e.type==="label-label"?e.leftComp:e.boxComp).schematicSheetId??"",n=t.get(i);if(n)n.push(e);else t.set(i,[e])}for(let e of t.values())this.buildAndPushIssueForSheet(e)}buildAndPushIssueForSheet(t){let e=this.computeGlobalFixes(t);if(e.size===0)return;let r=new Set,i=[];for(let o of t){let c,l;if(o.type==="label-label")c=o.leftComp.sourceComponentName??"",l=o.rightComp.sourceComponentName??"";else c=o.boxComp.sourceComponentName??"",l=o.labelComp.sourceComponentName??"";let s=`${c}/${l}`;if(!r.has(s))r.add(s),i.push({comp1Name:c,comp2Name:l})}let n=t[0],a=n.type==="label-label"?n.leftComp:n.boxComp;this.params.issues.push({lineItemType:"NetLabelCollision",schematicSheetId:a.schematicSheetId,schematicSheetName:a.schematicSheetName,pairs:i,collisionBounds:t.map((o)=>o.bounds),moves:Array.from(e.values())})}computeGlobalFixes(t){let e=new Map;for(let s of this.placements)if(s.schematicComponentId)e.set(s.schematicComponentId,s);let r=new Map,i=(s,p,d)=>{let m=e.get(s),u=e.get(p);if(!m||!u)return;let y=u.schX-m.schX+d,f=`${s}|${p}`;r.set(f,Math.max(r.get(f)??0,y))};for(let s of t)if(s.type==="label-label")i(s.leftId,s.rightId,s.xSeparation);else if(s.boxComp.schX<=s.labelComp.schX)i(s.boxId,s.labelId,s.xSeparation);else i(s.labelId,s.boxId,s.xSeparation);let n=[...r.entries()].map(([s,p])=>{let d=s.indexOf("|");return{leftId:s.slice(0,d),rightId:s.slice(d+1),minSep:p}}),a=new Set,o=new Map;for(let{leftId:s,rightId:p}of n){if(a.add(s),a.add(p),!o.has(s))o.set(s,new Set);if(!o.has(p))o.set(p,new Set);o.get(s).add(p),o.get(p).add(s)}let c=new Set,l=new Map;for(let s of a){if(c.has(s))continue;let p=[],d=[s];c.add(s);while(d.length){let _=d.shift();p.push(_);for(let x of o.get(_)??[])if(!c.has(x))c.add(x),d.push(x)}p.sort((_,x)=>(e.get(_)?.schX??0)-(e.get(x)?.schX??0));let m=new Set(p),u=n.filter((_)=>m.has(_.leftId)&&m.has(_.rightId)),y=new Map;for(let _ of p){let x=e.get(_)?.schX??0;for(let{leftId:Y,rightId:b,minSep:M}of u)if(b===_&&y.has(Y))x=Math.max(x,y.get(Y)+M);y.set(_,x)}let f=[...y.entries()].reduce((_,[x,Y])=>_+(Y-(e.get(x)?.schX??0)),0);if(f>0.000000001){let _=f/p.length,x=new Map;for(let b of p){let M=(e.get(b)?.schX??0)-_;for(let{leftId:O,rightId:X,minSep:E}of u)if(X===b&&x.has(O))M=Math.max(M,x.get(O)+E);x.set(b,M)}let Y=(b)=>[...b.entries()].reduce((M,[O,X])=>Math.max(M,Math.abs(X-(e.get(O)?.schX??0))),0);if(Y(x)<Y(y))for(let[b,M]of x)y.set(b,M)}for(let[_,x]of y){let Y=e.get(_);if(!Y||Math.abs(x-Y.schX)<0.000000001)continue;l.set(_,{componentName:Y.sourceComponentName||"component",newSchX:Math.round(x*100)/100,newSchY:Math.round(Y.schY*100)/100})}}return l}buildNetLabelsByComponentId(t){let r=[];for(let n of t){if(n.type!=="schematic_port")continue;let a=n;if(!a.schematic_component_id)continue;r.push({componentId:a.schematic_component_id,cx:a.center.x,cy:a.center.y,schematicSheetId:a.schematic_sheet_id})}let i=new Map;for(let n of t){if(n.type!=="schematic_net_label")continue;let a=n;if(!a.anchor_position)continue;let{x:o,y:c}=a.anchor_position,l=r.filter((m)=>m.schematicSheetId===a.schematic_sheet_id&&Math.hypot(m.cx-o,m.cy-c)<0.0001);if(l.length===0)continue;if(new Set(l.map((m)=>m.componentId)).size!==1)continue;let p=l[0].componentId,d=i.get(p)??[];d.push(a),i.set(p,d)}return i}static netLabelCollisionToString(t){let e=t.pairs.map((i,n)=>`pair${n+1}="${i.comp1Name}/${i.comp2Name}"`).join(" "),r=t.moves.map((i)=>`    <Move componentName="${i.componentName}" newSchX="${i.newSchX}" newSchY="${i.newSchY}" />`);return[`<ComponentNetLabelCollision ${e}>`,'  <SuggestedFix note="Apply all moves simultaneously. Set schAutoLayoutEnabled on your circuit.">',...r,"  </SuggestedFix>","</ComponentNetLabelCollision>"].join(`
`)}}class je extends at{static ALIGNMENT_EPSILON=0.01;ctx;out;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e}_step(){let t=new Map(this.ctx.circuitJson.filter((i)=>i.type==="schematic_port").map((i)=>[i.schematic_port_id,i])),e=new Map(this.ctx.componentPlacements.flatMap((i)=>i.schematicComponentId?[[i.schematicComponentId,i]]:[])),r=new Map;for(let i of this.ctx.circuitJson.filter((n)=>n.type==="schematic_trace")){let n=this.getTracePinPair(i,t);if(!n)continue;let a=n.firstPort.schematic_component_id,o=n.secondPort.schematic_component_id;if(!a||!o||a===o)continue;let c=a<o?n:{firstPort:n.secondPort,secondPort:n.firstPort},l=[a,o].sort().join("\x00"),s=r.get(l)??[];if(!s.some((d)=>d.firstPort.schematic_port_id===c.firstPort.schematic_port_id&&d.secondPort.schematic_port_id===c.secondPort.schematic_port_id))s.push(c);r.set(l,s)}for(let i of r.values()){let n=this.findVerticalShiftIssue(i,e);if(n)this.out.push(n)}this.solved=!0}getTracePinPair(t,e){let r=t.edges?.[0],i=t.edges?.at(-1);if(!r||!i)return;let n=r.from_schematic_port_id??r.to_schematic_port_id,a=i.to_schematic_port_id??i.from_schematic_port_id,o=[...e.values()],c=n?e.get(n):this.findPortAtPoint(o,r.from,t.schematic_sheet_id),l=a?e.get(a):this.findPortAtPoint(o,i.to,t.schematic_sheet_id);if(!c||!l)return;if(c.schematic_port_id===l.schematic_port_id)return;if(c.schematic_sheet_id!==l.schematic_sheet_id)return;return{firstPort:c,secondPort:l}}findPortAtPoint(t,e,r){let{ALIGNMENT_EPSILON:i}=je;return t.find((n)=>n.schematic_sheet_id===r&&Math.abs(n.center.x-e.x)<=i&&Math.abs(n.center.y-e.y)<=i)}findVerticalShiftIssue(t,e){let r=t[0];if(!r)return;let i=e.get(r.firstPort.schematic_component_id),n=e.get(r.secondPort.schematic_component_id);if(!i||!n)return;let[a,o]=i.schX<=n.schX?[i,n]:[n,i],c=t.flatMap((f)=>{let[_,x]=f.firstPort.center.x<=f.secondPort.center.x?[f.firstPort,f.secondPort]:[f.secondPort,f.firstPort];return _.facing_direction==="right"&&x.facing_direction==="left"?[{leftPort:_,rightPort:x}]:[]});if(c.length<2)return;let{ALIGNMENT_EPSILON:l}=je,s=c.filter(({leftPort:f,rightPort:_})=>Math.abs(f.center.y-_.center.y)<=l).length,p=[];for(let f of c){let _=f.leftPort.center.y-f.rightPort.center.y;if(Math.abs(_)<=l)continue;let x=p.find((Y)=>Math.abs(Y.deltaSchY-_)<=l);if(x)x.pairs.push(f);else p.push({deltaSchY:_,pairs:[f]})}let d=p.sort((f,_)=>_.pairs.length-f.pairs.length||Math.abs(f.deltaSchY)-Math.abs(_.deltaSchY))[0];if(!d||d.pairs.length<2||d.pairs.length<=s)return;let m=o.sourceComponentName||"component",u=d.deltaSchY,y=o.schY+u;return{lineItemType:"ComponentPinsWouldAlignWithVerticalShift",firstComponent:a,secondComponent:o,targetComponent:o,deltaSchY:u,newSchY:y,currentlyAlignedPinCount:s,alignedPinCount:d.pairs.length,alignedPinPairs:d.pairs.map(({leftPort:f,rightPort:_})=>({firstPin:this.getPinLabel(f),secondPin:this.getPinLabel(_)})),message:`shift ${m} vertically by ${$s(u)} to align ${d.pairs.length} connected pin pairs`}}getPinLabel(t){return t.display_pin_label??t.pin_number?.toString()}static issueToString(t){let e=[];return S(e,"firstComponentName",t.firstComponent.sourceComponentName),S(e,"secondComponentName",t.secondComponent.sourceComponentName),S(e,"targetComponentName",t.targetComponent.sourceComponentName),S(e,"deltaSchY",t.deltaSchY),S(e,"newSchY",t.newSchY),S(e,"currentlyAlignedPinCount",t.currentlyAlignedPinCount),S(e,"alignedPinCount",t.alignedPinCount),S(e,"message",t.message),`<ComponentPinsWouldAlignWithVerticalShift ${e.join(" ")} />`}}class $e extends at{static ALIGNMENT_TOLERANCE=0.1;issues;networks;currentNetworkIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.networks=this.findCrystalLoadNetworks(t),this.solved=this.networks.length===0}_step(){let t=this.networks[this.currentNetworkIndex];if(!t){this.solved=!0;return}this.currentNetworkIndex+=1,this.solved=this.currentNetworkIndex>=this.networks.length;let e=vn(t.newSchX-t.crystal.schX),r=vn(t.newSchY-t.crystal.schY);if(Math.abs(e)<=$e.ALIGNMENT_TOLERANCE&&Math.abs(r)<=$e.ALIGNMENT_TOLERANCE)return;let i=t.crystal.sourceComponentName??"the crystal",n=t.firstLoadCapacitor.sourceComponentName??"the first load capacitor",a=t.secondLoadCapacitor.sourceComponentName??"the second load capacitor";this.issues.push({lineItemType:"CrystalNotCenteredOverLoadCapacitors",crystalSchematicBox:t.crystal,firstLoadCapacitorSchematicBox:t.firstLoadCapacitor,secondLoadCapacitorSchematicBox:t.secondLoadCapacitor,deltaSchX:e,deltaSchY:r,newSchX:t.newSchX,newSchY:t.newSchY,message:`move ${i} to schX=${t.newSchX}, schY=${t.newSchY} so it is centered between ${n} and ${a} and aligned with their load-side pins`})}findCrystalLoadNetworks(t){let e=new Map,r=new Map,i=new Map,n=new Map(t.componentPlacements.flatMap((c)=>c.sourceComponentId?[[c.sourceComponentId,c]]:[]));for(let c of t.circuitJson){if(c.type==="source_component")e.set(c.source_component_id,{sourceComponentId:c.source_component_id,ftype:"ftype"in c&&typeof c.ftype==="string"?c.ftype:void 0});if(c.type==="source_port"&&typeof c.source_component_id==="string"&&typeof c.subcircuit_connectivity_map_key==="string"){let l={sourcePortId:c.source_port_id,sourceComponentId:c.source_component_id,connectivityKey:c.subcircuit_connectivity_map_key},s=r.get(c.source_component_id)??[];s.push(l),r.set(c.source_component_id,s)}if(c.type==="schematic_port"&&c.source_port_id)i.set(c.source_port_id,c)}let a=new Map;for(let c of e.values()){if(c.ftype!=="simple_capacitor")continue;let l=r.get(c.sourceComponentId)??[];if(l.length!==2)continue;let s=l[0],p=l[1],d=n.get(c.sourceComponentId);if(!d)continue;for(let[m,u]of[[s,p],[p,s]]){let y=i.get(m.sourcePortId);if(!y)continue;let f=a.get(m.connectivityKey)??[];f.push({capacitor:d,loadPort:y,returnConnectivityKey:u.connectivityKey}),a.set(m.connectivityKey,f)}}let o=[];for(let c of e.values()){if(c.ftype!=="simple_crystal"&&c.ftype!=="simple_chip")continue;let l=r.get(c.sourceComponentId)??[];if(l.length!==2||l[0].connectivityKey===l[1].connectivityKey)continue;let s=l[0].connectivityKey,p=l[1].connectivityKey;if(![...r.entries()].some(([b,M])=>b!==c.sourceComponentId&&M.length>2&&M.some((O)=>O.connectivityKey===s)&&M.some((O)=>O.connectivityKey===p)))continue;let m=n.get(c.sourceComponentId);if(!m)continue;let u=a.get(l[0].connectivityKey)??[],y=a.get(l[1].connectivityKey)??[],f=u.flatMap((b)=>y.flatMap((M)=>{if(b.capacitor.sourceComponentId===M.capacitor.sourceComponentId||b.returnConnectivityKey!==M.returnConnectivityKey||b.returnConnectivityKey===s||b.returnConnectivityKey===p||b.capacitor.schematicSheetId!==m.schematicSheetId||M.capacitor.schematicSheetId!==m.schematicSheetId)return[];return[{firstConnection:b,secondConnection:M}]}));if(f.length===0)continue;let _=f.toSorted((b,M)=>Im(b,m)-Im(M,m))[0],x=[_.firstConnection.loadPort,_.secondConnection.loadPort],Y=[_.firstConnection.capacitor,_.secondConnection.capacitor].toSorted((b,M)=>b.schX-M.schX);o.push({crystal:m,firstLoadCapacitor:Y[0],secondLoadCapacitor:Y[1],newSchX:vn((x[0].center.x+x[1].center.x)/2),newSchY:vn((x[0].center.y+x[1].center.y)/2)})}return o}static issueToString(t){let e=[];return S(e,"crystalName",t.crystalSchematicBox.sourceComponentName),S(e,"firstLoadCapacitorName",t.firstLoadCapacitorSchematicBox.sourceComponentName),S(e,"secondLoadCapacitorName",t.secondLoadCapacitorSchematicBox.sourceComponentName),S(e,"newSchX",t.newSchX),S(e,"newSchY",t.newSchY),S(e,"deltaSchX",t.deltaSchX,{formatDelta:!0}),S(e,"deltaSchY",t.deltaSchY,{formatDelta:!0}),S(e,"message",t.message),`<CrystalNotCenteredOverLoadCapacitors ${e.join(" ")} />`}}var Im=(t,e)=>Mm(t.firstConnection.capacitor,e)+Mm(t.secondConnection.capacitor,e),Mm=(t,e)=>Math.hypot(t.schX-e.schX,t.schY-e.schY),vn=(t)=>Math.round(t*100)/100;function Us(t){let e=new Map,r=0;function i(n){for(let[,o]of e)if(o.has(n))return o;let a=new Set;return e.set(`connectivity_net${r++}`,a),a}for(let n of t){let a=null;for(let o of n){if(!a)a=i(o);else if(!a.has(o)){let c=i(o);if(c!==a){for(let l of c)a.add(l);e.delete(Array.from(e.entries()).find(([,l])=>l===c)[0])}}a.add(o)}}return Object.fromEntries(Array.from(e.entries()).map(([n,a])=>[n,Array.from(a)]))}var A2=class{netMap;idToNetMap;constructor(t){this.netMap=t,this.idToNetMap={};for(let[e,r]of Object.entries(t))for(let i of r)this.idToNetMap[i]=e}addConnections(t){for(let e of t){let r=new Set;for(let n of e){let a=this.idToNetMap[n];if(a)r.add(a)}let i;if(r.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(r.size===1)i=r.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=r.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(let n of r)if(n!==i){this.netMap[i].push(...this.netMap[n]),this.netMap[n]=this.netMap[i];for(let a of this.netMap[i])this.idToNetMap[a]=i}}for(let n of e){if(!this.netMap[i].includes(n))this.netMap[i].push(n);this.idToNetMap[n]=i}}}getIdsConnectedToNet(t){return this.netMap[t]||[]}getNetConnectedToId(t){return this.idToNetMap[t]}areIdsConnected(t,e){if(t===e)return!0;let r=this.getNetConnectedToId(t);if(!r)return!1;let i=this.getNetConnectedToId(e);if(!i)return!1;return r===i||i===t||i===t}areAllIdsConnected(t){let e=this.getNetConnectedToId(t[0]);for(let r of t){let i=this.getNetConnectedToId(r);if(i===void 0)return!1;if(i!==e)return!1}return!0}},Sn=(t)=>{let e=[];for(let i of t)if(i.type==="source_trace")e.push([...i.connected_source_port_ids??[],...i.connected_source_net_ids??[]]);else if(i.type==="source_component"){if(i.internally_connected_source_port_ids)for(let n of i.internally_connected_source_port_ids)e.push(n)}else if(i.type==="source_component_internal_connection")e.push(i.source_port_ids);let r=Us(e);return new A2(r)};class he extends at{static DIODE_FTYPES=new Set(["simple_led","simple_diode"]);ctx;out;schematicTraces;currentIndex=0;sourceConnectivity;sourceComponentFtypeById;sourceComponentIdBySourcePortId;schematicPorts;schematicBoxBySourceComponentId;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e;let{circuitJson:r}=t;this.sourceConnectivity=Sn(r),this.sourceComponentFtypeById=this.buildSourceComponentFtypeById(r),this.sourceComponentIdBySourcePortId=this.buildSourceComponentIdBySourcePortId(r),this.schematicPorts=r.filter((i)=>i.type==="schematic_port"),this.schematicBoxBySourceComponentId=this.buildSchematicBoxBySourceComponentId(),this.schematicTraces=r.filter((i)=>i.type==="schematic_trace"),this.solved=this.schematicTraces.length===0}_step(){let t=this.schematicTraces[this.currentIndex];if(!t){this.solved=!0;return}if(this.currentIndex++,this.solved=this.currentIndex>=this.schematicTraces.length,!t.edges||t.edges.length===0)return;let e=t.edges[0],r=t.edges[t.edges.length-1];if(!e||!r)return;let i=e.from,n=r.to,a=t.schematic_sheet_id,o=this.findSourceComponentIdNearPoint(i,a),c=this.findSourceComponentIdNearPoint(n,a);if(!o||!c)return;let l=this.sourceComponentFtypeById.get(o),s=this.sourceComponentFtypeById.get(c),{DIODE_FTYPES:p}=he;if(!(p.has(l)&&s==="simple_resistor"||l==="simple_resistor"&&p.has(s)))return;let m=p.has(l)?o:c,u=l==="simple_resistor"?o:c,y=this.schematicBoxBySourceComponentId.get(m),f=this.schematicBoxBySourceComponentId.get(u);if(!y||!f)return;let _=this.findNearestPort(p.has(l)?i:n,a),x=this.findNearestPort(l==="simple_resistor"?i:n,a);if(!_?.center||!x?.center)return;if(!this.sourceConnectivity.areIdsConnected(_.source_port_id,x.source_port_id))return;let Y=y.sourceComponentName||"component",b=f.sourceComponentName||"component",M=_?.display_pin_label??_?.pin_number?.toString(),O=x?.display_pin_label??x?.pin_number?.toString(),X=_?.facing_direction,E=x?.facing_direction,I=M?`${Y}.${M}`:Y,U=O?`${b}.${O}`:b,q=(ct)=>({lineItemType:"DiodeResistorNotAligned",diodeSchematicBox:y,resistorSchematicBox:f,diodePin:M,resistorPin:O,diodePinFacingDirection:X,resistorPinFacingDirection:E,message:ct});if(!he.isCoLinear(_.center,x.center)){this.out.push(q(`trace has corners — align ${Y} and ${b} on same axis and rotate so ${I} faces ${U}`));return}if(X&&E&&!he.pinsFacingEachOther(_.center,X,x.center,E))this.out.push(q(`${I} and ${U} face away from each other — rotate ${Y} so ${I} faces ${U}`))}static isCoLinear(t,e,r=0.01){return Math.abs(t.x-e.x)<r||Math.abs(t.y-e.y)<r}static pinsFacingEachOther(t,e,r,i){let n=r.x-t.x,a=r.y-t.y,o=e==="right"&&n>0||e==="left"&&n<0||e==="up"&&a>0||e==="down"&&a<0,c=i==="right"&&n<0||i==="left"&&n>0||i==="up"&&a<0||i==="down"&&a>0;return o&&c}static dist(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}findNearestPort(t,e){let r,i=1/0;for(let n of this.schematicPorts){if(n.schematic_sheet_id!==e)continue;if(!n.center)continue;let a=he.dist(t,n.center);if(a<i)i=a,r=n}return r}findSourceComponentIdNearPoint(t,e){let r=this.findNearestPort(t,e);if(!r||!r.source_port_id)return;return this.sourceComponentIdBySourcePortId.get(r.source_port_id)}buildSourceComponentFtypeById(t){let e=new Map;for(let r of t)if(r.type==="source_component"&&"source_component_id"in r&&"ftype"in r&&typeof r.ftype==="string")e.set(r.source_component_id,r.ftype);return e}buildSourceComponentIdBySourcePortId(t){let e=new Map;for(let r of t)if(r.type==="source_port"&&"source_port_id"in r&&"source_component_id"in r&&typeof r.source_port_id==="string"&&typeof r.source_component_id==="string")e.set(r.source_port_id,r.source_component_id);return e}buildSchematicBoxBySourceComponentId(){let t=new Map;for(let e of this.ctx.componentPlacements)if(e.sourceComponentId)t.set(e.sourceComponentId,e);return t}static issueToString(t){let e=[];return S(e,"diodeComponentName",t.diodeSchematicBox.sourceComponentName),S(e,"diodePin",t.diodePin),S(e,"resistorComponentName",t.resistorSchematicBox.sourceComponentName),S(e,"resistorPin",t.resistorPin),S(e,"message",t.message),`<DiodeResistorNotAligned ${e.join(" ")} />`}}class qe extends at{static MIN_BODY_GAP=4;index;amplifierIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.amplifierIds=[...this.index.components.values()].filter((r)=>r.ftype==="simple_op_amp").map((r)=>r.source_component_id),this.solved=this.amplifierIds.length===0}_step(){let t=this.amplifierIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.amplifierIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.namedPort(t,"output"),n=e.namedPort(t,"inverting_input");if(!r||!i||!n||!e.port(i)||!e.port(n))return;let a=e.connected(i.source_port_id),o=e.connected(n.source_port_id);if(a===o||e.isRail(a)||e.isRail(o))return;if((e.portsByNet.get(o)??[]).some((d)=>d.source_component_id!==t&&e.components.get(d.source_component_id)?.ftype==="simple_op_amp"))return;let c=[],l=new Set;for(let d of e.portsByNet.get(a)??[]){let m=d.source_component_id;if(l.has(m))continue;l.add(m);let u=e.components.get(m);if(u?.ftype!=="simple_resistor"&&u?.ftype!=="simple_capacitor")continue;if(u.ftype==="simple_resistor"&&!(u.resistance>0))continue;let y=e.twoTerminalNets(m);if(!y?.includes(o)||!y.includes(a))continue;let f=e.placement(m);if(!f||!e.sameLocalScope(r,f))return;c.push(f)}let s=c.flatMap((d)=>{let m=B2(r,d),u=Math.max(qe.MIN_BODY_GAP,3*Math.max(d.width,d.height));return m>u?[{schematicBox:d,bodyGap:m,maxRecommendedBodyGap:u}]:[]});if(s.length===0)return;let p=s.map(({schematicBox:d})=>d.sourceComponentName||"component").join(", ");this.issues.push({lineItemType:"FeedbackNetworkNotCompact",amplifierSchematicBox:r,feedbackComponents:c,distantComponents:s,outputSourcePortId:i.source_port_id,invertingInputSourcePortId:n.source_port_id,message:`consider grouping ${p} closer to ${r.sourceComponentName||"component"}, with a compact feedback return path above or below the amplifier`})}static issueToString(t){let e=[];return S(e,"amplifierName",t.amplifierSchematicBox.sourceComponentName),S(e,"feedbackComponentNames",t.feedbackComponents.map((r)=>r.sourceComponentName||"component").join(", ")),S(e,"distantComponentNames",t.distantComponents.map(({schematicBox:r})=>r.sourceComponentName||"component").join(", ")),S(e,"message",t.message),`<FeedbackNetworkNotCompact ${e.join(" ")} />`}}function B2(t,e){return Math.hypot(Math.max(0,Math.abs(t.schX-e.schX)-(t.width+e.width)/2),Math.max(0,Math.abs(t.schY-e.schY)-(t.height+e.height)/2))}function Gs(t){let e=[],r=(i)=>{let n=t.portsByComponent.get(i);if(n?.length!==2)return!1;let a=t.port(n[0]),o=t.port(n[1]);return!!a&&!!o&&Math.abs(a.center.y-o.center.y)<0.01&&Math.abs(a.center.x-o.center.x)>0.01};for(let i of t.components.values()){if(i.ftype!=="simple_resistor"||i.resistance<=0)continue;let n=i.source_component_id,a=t.twoTerminalNets(n);if(!a||a.filter((b)=>t.isRail(b)).length!==1)continue;let o=a.find((b)=>t.isRail(b));if(t.powerNets.has(o)&&t.groundNets.has(o))continue;let c=a.find((b)=>b!==o),l=t.portsByNet.get(c)??[],s=l.filter((b)=>{let M=t.components.get(b.source_component_id)?.ftype;return M==="simple_switch"||M==="simple_push_button"});if(s.length!==1||l.filter((b)=>t.components.get(b.source_component_id)?.ftype==="simple_resistor").length!==1)continue;let p=s[0],d=p.source_component_id,m=t.components.get(d)?.ftype,y=t.twoTerminalNets(d)?.find((b)=>b!==c);if(!y)continue;let f=t.powerNets.has(o)?"up":"down";if(f==="up"?!t.groundNets.has(y)||t.powerNets.has(y):!t.powerNets.has(y)||t.groundNets.has(y))continue;if([n,d].some((b)=>t.portsByComponent.get(b)?.some((M)=>M.do_not_connect)))continue;let _=t.placement(n),x=t.placement(d),Y=t.port(p);if(!_||!x||!Y||!t.sameLocalScope(_,x))continue;e.push({resistor:_,switchBox:x,signalPort:p,signalSchY:Y.center.y,pullDirection:f,horizontalPushbutton:m==="simple_push_button"&&r(n)&&r(d)})}return e}function wn(t){return new Set(Gs(t).flatMap((e)=>e.horizontalPushbutton?[e.resistor.sourceComponentId,e.switchBox.sourceComponentId]:[]))}class Xe extends at{static MIN_WRONG_SIDE_GAP=1.5;index;resistorIds;horizontalPushbuttonComponentIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.horizontalPushbuttonComponentIds=wn(this.index),this.resistorIds=[...this.index.components.values()].filter((r)=>r.ftype==="simple_resistor"&&r.resistance>0).map((r)=>r.source_component_id),this.solved=this.resistorIds.length===0}_step(){let t=this.resistorIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.resistorIds.length,!t)return;if(this.horizontalPushbuttonComponentIds.has(t))return;let e=this.index,r=e.placement(t),i=e.twoTerminalNets(t);if(!r||!i)return;let n=i.filter((_)=>e.isRail(_));if(n.length!==1)return;let a=n[0];if(e.powerNets.has(a)&&e.groundNets.has(a))return;let o=e.groundNets.has(a)?"down":"up",c=i.find((_)=>_!==a),l=e.portsByNet.get(c)??[],s=l.filter((_)=>_.needs_external_pullup||_.needs_external_pulldown);if(s.length!==1)return;let p=s[0];if(p.needs_external_pullup&&p.needs_external_pulldown)return;if(o==="up"?!p.needs_external_pullup:!p.needs_external_pulldown)return;let d=e.placement(p.source_component_id),m=e.port(p);if(!d||!m||!e.sameLocalScope(d,r))return;if(l.some((_)=>{let x=_.source_component_id;if(x===t||x===p.source_component_id)return!1;if(e.components.get(x)?.ftype!=="simple_capacitor")return!0;let M=e.twoTerminalNets(x)?.find((X)=>X!==c);if(!M||!e.groundNets.has(M)||e.powerNets.has(M))return!0;let O=e.placement(x);return!O||!e.sameLocalScope(d,O)}))return;let u=m.center.y,y=o==="up"?u-(r.schY+r.height/2):r.schY-r.height/2-u;if(y<=Xe.MIN_WRONG_SIDE_GAP)return;let f=o==="up"?"above":"below";this.issues.push({lineItemType:"PullResistorOnWrongSide",resistorSchematicBox:r,hostSchematicBox:d,signalSourcePortId:p.source_port_id,signalPinName:p.name,signalSchY:u,pullDirection:o,preferredSide:f,wrongSideGap:y,maxRecommendedWrongSideGap:Xe.MIN_WRONG_SIDE_GAP,message:`consider placing ${r.sourceComponentName||"component"} ${f} ${d.sourceComponentName||"component"}.${p.name} so the pull-${o} branch reads toward ${o==="up"?"power":"ground"}`})}static issueToString(t){let e=[];return S(e,"resistorName",t.resistorSchematicBox.sourceComponentName),S(e,"hostName",t.hostSchematicBox.sourceComponentName),S(e,"signalPin",t.signalPinName),S(e,"pullDirection",t.pullDirection),S(e,"preferredSide",t.preferredSide),S(e,"signalSchY",t.signalSchY),S(e,"wrongSideGap",t.wrongSideGap),S(e,"message",t.message),`<PullResistorOnWrongSide ${e.join(" ")} />`}}class le extends at{static EPSILON=0.01;index;powerNets;groundNets;positiveVoltageNets=new Set;componentIds;horizontalPushbuttonComponentIds;issues;currentIndex=0;constructor({ctx:t,issues:e}){super();this.issues=e,this.index=new At(t),this.horizontalPushbuttonComponentIds=wn(this.index),this.powerNets=new Set(this.index.powerNets),this.groundNets=new Set(this.index.groundNets);for(let r of t.circuitJson){if(r.type==="source_net"&&r.is_positive_voltage_source)this.positiveVoltageNets.add(this.index.connected(r.source_net_id));if(r.type!=="source_port")continue;let i=this.index.connected(r.source_port_id);if(r.provides_power||r.requires_power)this.powerNets.add(i);if(r.provides_ground||r.requires_ground)this.groundNets.add(i)}this.componentIds=[...this.index.components.keys()].filter((r)=>this.index.portsByComponent.get(r)?.length===2),this.solved=this.componentIds.length===0}_step(){let t=this.componentIds[this.currentIndex++];if(this.solved=this.currentIndex>=this.componentIds.length,!t)return;let e=this.index,r=e.placement(t),i=e.components.get(t),n=e.twoTerminalNets(t);if(!r||!n)return;if(i?.ftype==="simple_inductor"&&!n.some((X)=>this.groundNets.has(X)))return;if(i?.ftype==="simple_diode"&&n.every((X)=>this.powerNets.has(X)))return;if(n.some((X)=>this.powerNets.has(X)&&this.groundNets.has(X)))return;let a=n.map((X)=>this.powerNets.has(X)?"power":this.groundNets.has(X)?"ground":void 0);if(a.every((X)=>X===void 0))return;let o=a.includes("power")?"power":"ground",c=n.flatMap((X,E)=>a[E]===o?[{net:X,index:E}]:[]),l=(c.find(({net:X})=>e.portsByNet.get(X)?.some((E)=>o==="power"?E.provides_power:E.provides_ground))??c.find(({net:X})=>(o==="power"?e.powerNets:e.groundNets).has(X))??c[0]).index,s=n[l],p=e.portsByComponent.get(t),d=p.find((X)=>e.connected(X.source_port_id)===s),m=p.find((X)=>X!==d),u=e.port(d),y=e.port(m);if(!u||!y)return;let f=e.connected(m.source_port_id),_=this.groundNets.has(f),x=i?.ftype==="simple_resistor"&&!this.powerNets.has(f)&&!_;if(this.positiveVoltageNets.has(s)&&(_||x)&&Math.abs(u.center.x-y.center.x)<=le.EPSILON&&u.center.y<y.center.y-le.EPSILON&&u.facing_direction==="down"&&y.facing_direction==="up"){this.issues.push({lineItemType:"TwoPinComponentHasInvertedRails",schematicBox:r,railSourcePortId:d.source_port_id,railPinName:d.name,railType:"power",deltaSchRotation:180,suggestedRailFacingDirection:"up",message:`rotate ${r.sourceComponentName||"component"} by 180° so its positive-supply pin faces up and its ${_?"ground":"signal"} pin faces down; preserve pin connections and reroute attached traces`});return}if(!(Math.abs(u.center.y-y.center.y)<=le.EPSILON&&Math.abs(u.center.x-y.center.x)>le.EPSILON&&(u.facing_direction==="left"&&y.facing_direction==="right"||u.facing_direction==="right"&&y.facing_direction==="left")))return;if(this.horizontalPushbuttonComponentIds.has(t))return;let M=o==="power"?"up":"down",O=u.facing_direction==="left"===(o==="power")?-90:90;this.issues.push({lineItemType:"TwoPinComponentShouldBeVertical",schematicBox:r,railSourcePortId:d.source_port_id,railPinName:d.name,railType:o,deltaSchRotation:O,suggestedRailFacingDirection:M,message:`rotate ${r.sourceComponentName||"component"} by ${O}° so its ${o}-connected pin faces ${M} and the component is vertical`})}static issueToString(t){let e=[];return S(e,"componentName",t.schematicBox.sourceComponentName),S(e,"railPin",t.railPinName),S(e,"railType",t.railType),S(e,"deltaSchRotation",t.deltaSchRotation),S(e,"suggestedRailFacingDirection",t.suggestedRailFacingDirection),S(e,"message",t.message),`<${t.lineItemType} ${e.join(" ")} />`}}var Pi=0.02;function Ii(t,e,r){let i={left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2},n=[];for(let a of e){if(!a.side_of_component)continue;if(!a.display_pin_label)continue;let o=r(a),c=0.075;switch(a.side_of_component){case"left":{let l=i.left+0.1;n.push({side:a.side_of_component,xMin:l,xMax:l+o,yMin:a.center.y-c,yMax:a.center.y+c});break}case"right":{let l=i.right-0.1;n.push({side:a.side_of_component,xMin:l-o,xMax:l,yMin:a.center.y-c,yMax:a.center.y+c});break}case"top":{let l=i.top-0.1;n.push({side:a.side_of_component,xMin:a.center.x-c,xMax:a.center.x+c,yMin:l-o,yMax:l});break}case"bottom":{let l=i.bottom+0.1;n.push({side:a.side_of_component,xMin:a.center.x-c,xMax:a.center.x+c,yMin:l,yMax:l+o});break}}}return n}function Bn(t,e,r=0.02){return An(t.xMin,t.xMax,e.xMin,e.xMax,r)&&An(t.yMin,t.yMax,e.yMin,e.yMax,r)}function An(t,e,r,i,n=0.02){return Math.min(e,i)-Math.max(t,r)+n>0.000000001}function Cr(t){return new Set(t.flatMap((e)=>e.type==="schematic_component"&&e.is_box_with_pins!==!1&&!e.symbol_name&&!e.schematic_symbol_id?[e.schematic_component_id]:[]))}var Ve=(t)=>[{x:t.left,y:t.bottom},{x:t.right,y:t.bottom},{x:t.right,y:t.top},{x:t.left,y:t.top}],F2=(t)=>{if(/\s/.test(t))return 0.28;if(/[ilI.,:;!'|]/.test(t))return 0.25;if(/[MW@%]/.test(t))return 0.9;if(/[mw]/.test(t))return 0.8;if(/[A-Z]/.test(t))return 0.67;return 0.56},Fn=(t)=>Array.from(t).reduce((e,r)=>e+F2(r),0),km=(t,e)=>Fn(t)*e;function Mi(t){let e=t.font_size;if(!Number.isFinite(e)||e<=0||!Number.isFinite(t.rotation)||!Number.isFinite(t.position.x)||!Number.isFinite(t.position.y))return[];let r=t.anchor,i=r.includes("left")?0:r.includes("right")?1:0.5,n=r.includes("top")?0:r.includes("bottom")?e:e/2,a=-t.rotation*Math.PI/180,o=Math.cos(a),c=Math.sin(a);return t.text.split(`
`).flatMap((l,s)=>{let p=l.trim();if(!p)return[];let d=l.length-l.trimStart().length,m=(Fn(l.slice(0,d))-Fn(l)*i)*e;return[Ve({left:m,right:m+Fn(p)*e,top:n-s*e-e*0.05,bottom:n-(s+1)*e+e*0.05}).map(({x:y,y:f})=>({x:t.position.x+y*o-f*c,y:t.position.y+y*c+f*o}))]})}function ki(t,e){for(let r of[t,e])for(let i=0;i<r.length;i++){let n=r[i],a=r[(i+1)%r.length],o=Math.hypot(a.x-n.x,a.y-n.y);if(o<0.000000001)continue;let c=-(a.y-n.y)/o,l=(a.x-n.x)/o,s=(m)=>m.map(({x:u,y})=>u*c+y*l),p=s(t),d=s(e);if(Math.min(Math.max(...p),Math.max(...d))-Math.max(Math.min(...p),Math.min(...d))<=0.000001)return!1}return!0}function Ci(t,e){let r=Math.hypot(e.x-t.x,e.y-t.y);if(r<0.000000001)return;let i=-(e.y-t.y)/r*0.01,n=(e.x-t.x)/r*0.01;return[{x:t.x+i,y:t.y+n},{x:e.x+i,y:e.y+n},{x:e.x-i,y:e.y-n},{x:t.x-i,y:t.y-n}]}function Yr(t,e,r){if(Math.hypot(e.x-t.x,e.y-t.y)<0.000000001)return!1;let i=0,n=1;for(let a=0;a<r.length;a++){let o=r[a],c=r[(a+1)%r.length],l=Math.hypot(c.x-o.x,c.y-o.y);if(l<0.000000001)continue;let s=-(c.y-o.y)/l,p=(c.x-o.x)/l,d=(t.x-o.x)*s+(t.y-o.y)*p-0.000001,m=(e.x-o.x)*s+(e.y-o.y)*p-0.000001;if(d<=0&&m<=0)return!1;if(d<=0)i=Math.max(i,-d/(m-d));if(m<=0)n=Math.min(n,-d/(m-d));if(n<=i)return!1}return n>i}var Qs=(t)=>{let e=t.flat();return{left:Math.min(...e.map((r)=>r.x)),right:Math.max(...e.map((r)=>r.x)),top:Math.max(...e.map((r)=>r.y)),bottom:Math.min(...e.map((r)=>r.y))}};class Lr extends at{params;entries;placementById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=>i.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex>=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=Ii(i,r,(o)=>km(o.display_pin_label,0.15));if(n.length===0)return;let a=this.getCollisionSummary(n);if(a.overlappingSides.length===0)return;this.params.issues.push({lineItemType:"SchematicBoxInnerLabelCollision",schematicBox:i,overlappingSides:a.overlappingSides,message:this.getMessage(a.overlappingSides)})}static issueToString(t){let e=[];return S(e,"message",t.message),S(e,"componentName",t.schematicBox.sourceComponentName),S(e,"currentSchWidth",t.schematicBox.width),S(e,"currentSchHeight",t.schematicBox.height),S(e,"overlappingSides",t.overlappingSides.join(",")),`<SchematicBoxInnerLabelCollision ${e.join(" ")} />`}getMessage(t){return`Inner labels are colliding. Increase the ${t.every((r)=>r==="left"||r==="right")?"schWidth":t.every((r)=>r==="top"||r==="bottom")?"schHeight":"schWidth or schHeight"}.`}isSchematicPort(t){return t.type==="schematic_port"}isSchematicSide(t){return t==="left"||t==="right"||t==="top"||t==="bottom"}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=>e.schematicComponentId).map((e)=>[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=>this.isSchematicPort(i))){if(!r.schematic_component_id)continue;if(!this.isSchematicSide(r.side_of_component))continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getCollisionSummary(t){let e=new Set;for(let r=0;r<t.length;r++)for(let i=r+1;i<t.length;i++){let n=t[r],a=t[i];if(n.side===a.side)continue;if(!Bn(n,a))continue;e.add(n.side),e.add(a.side)}return{overlappingSides:this.sortSides(Array.from(e))}}sortSides(t){let e={left:0,right:1,top:2,bottom:3};return t.sort((r,i)=>e[r]-e[i])}}class tr extends at{params;placements;firstIndex=0;secondIndex=1;constructor(t){super();this.params=t;this.placements=t.ctx.componentPlacements,this.solved=this.placements.length<2}_step(){if(this.firstIndex>=this.placements.length-1){this.solved=!0;return}let t=this.getComponentOverlap(this.placements[this.firstIndex],this.placements[this.secondIndex]);if(t)this.params.issues.push(t);if(this.secondIndex++,this.secondIndex>=this.placements.length)this.firstIndex++,this.secondIndex=this.firstIndex+1;this.solved=this.firstIndex>=this.placements.length-1}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY-t.height/2,bottom:t.schY+t.height/2}}getOverlapCorrectionSuggestions({firstComponent:t,secondComponent:e,overlapWidth:r,overlapHeight:i}){let n=t.width*t.height,a=e.width*e.height,o=n<=a?t:e,c=o===t?e:t,l=o.schX<=c.schX?-r:r,s=o.schY<=c.schY?-i:i;return[{targetComponentName:o.sourceComponentName,deltaSchX:l,deltaSchY:0,newSchX:o.schX+l,newSchY:o.schY},{targetComponentName:o.sourceComponentName,deltaSchX:0,deltaSchY:s,newSchX:o.schX,newSchY:o.schY+s}]}static issueToString(t){let e=[];return S(e,"component1Name",t.firstComponent.sourceComponentName),S(e,"component2Name",t.secondComponent.sourceComponentName),S(e,"component1SchX",t.firstComponent.schX),S(e,"component1SchY",t.firstComponent.schY),S(e,"component2SchX",t.secondComponent.schX),S(e,"component2SchY",t.secondComponent.schY),S(e,"overlapWidth",t.overlapWidth),S(e,"overlapHeight",t.overlapHeight),[`<ComponentOverlap ${e.join(" ")}>`,...t.correctionSuggestions.map(tr.correctionSuggestionToString),"</ComponentOverlap>"].join(`
`)}static correctionSuggestionToString(t){let e=[];if(S(e,"target",t.targetComponentName),t.deltaSchX!==0)S(e,"newSchX",t.newSchX),S(e,"deltaSchX",t.deltaSchX,{formatDelta:!0});if(t.deltaSchY!==0)S(e,"newSchY",t.newSchY),S(e,"deltaSchY",t.deltaSchY,{formatDelta:!0});return`<OverlapCorrectionSuggestion ${e.join(" ")} />`}getComponentOverlap(t,e){if(t.schematicSheetId!==e.schematicSheetId)return null;let r=this.getCenteredRectBounds(t),i=this.getCenteredRectBounds(e),n=Math.min(r.right,i.right)-Math.max(r.left,i.left),a=Math.min(r.bottom,i.bottom)-Math.max(r.top,i.top);if(n<=0||a<=0)return null;return{lineItemType:"ComponentOverlap",firstComponent:t,secondComponent:e,overlapWidth:n,overlapHeight:a,correctionSuggestions:this.getOverlapCorrectionSuggestions({firstComponent:t,secondComponent:e,overlapWidth:n,overlapHeight:a})}}}function Pn(t,e){let r;for(let i of t){if(i.type!=="schematic_path"&&i.type!=="schematic_circle"&&i.type!=="schematic_rect"||i.schematic_component_id!==e)continue;let n=(i.stroke_width??0.02)/2,a;if(i.type==="schematic_path"){if(!i.points.length)continue;a={xMin:Math.min(...i.points.map((o)=>o.x)),xMax:Math.max(...i.points.map((o)=>o.x)),yMin:Math.min(...i.points.map((o)=>o.y)),yMax:Math.max(...i.points.map((o)=>o.y))}}else{let o=i.type==="schematic_rect"?(i.rotation??0)*Math.PI/180:0,c=i.type==="schematic_circle"?2*i.radius:i.width,l=i.type==="schematic_circle"?2*i.radius:i.height,s=(Math.abs(c*Math.cos(o))+Math.abs(l*Math.sin(o)))/2,p=(Math.abs(c*Math.sin(o))+Math.abs(l*Math.cos(o)))/2;a={xMin:i.center.x-s,xMax:i.center.x+s,yMin:i.center.y-p,yMax:i.center.y+p}}a.xMin-=n,a.xMax+=n,a.yMin-=n,a.yMax+=n,r=r?{xMin:Math.min(r.xMin,a.xMin),xMax:Math.max(r.xMax,a.xMax),yMin:Math.min(r.yMin,a.yMin),yMax:Math.max(r.yMax,a.yMax)}:a}return r}var Lm=0.2,Er=(t)=>Array.from(t.display_pin_label??"").length*0.095;function In(t,e,r,i,n=0,a){if(!Number.isFinite(r)||r<=0)return;if(e.some((f)=>!f.side_of_component))return;if(!Ym(t,e,Pi,a))return;let o=0,c=0;for(let f of e)if(f.side_of_component==="left"||f.side_of_component==="right")c=Math.max(c,2*(Math.abs(f.center.y-t.schY)+r));else o=Math.max(o,2*(Math.abs(f.center.x-t.schX)+r));let l=i.width===void 0?t.width:Math.max(i.width,o,Cm(t,e,"width",a)),s=i.height===void 0?t.height:Math.max(i.height,c,Cm(t,e,"height",a)),p=(f)=>f>0.000000001&&f>=n-0.000000001,d=p(t.width-l)?l:void 0,m=p(t.height-s)?s:void 0;if(d===void 0&&m===void 0)return;let u=[{width:d,height:m}];if(d!==void 0&&m!==void 0)u.push({width:d},{height:m});let y=(f)=>(f.width??t.width)*(f.height??t.height);return u.sort((f,_)=>y(f)-y(_)),u.find((f)=>Ym({...t,width:f.width??t.width,height:f.height??t.height},e,Lm,a))}function Cm(t,e,r,i){let n=t[r],a=r==="width"?t.schX:t.schY,o=r==="width"?"xMin":"yMin",c=r==="width"?"xMax":"yMax",l=r==="width"?"yMin":"xMin",s=r==="width"?"yMax":"xMax",p=(y)=>{if(r==="width")return y.side==="left"?-0.5:y.side==="right"?0.5:0;return y.side==="bottom"?-0.5:y.side==="top"?0.5:0},d=0,m=(y,f,_=0)=>{if(f>0)d=Math.max(d,n+(_-y)/f)},u=Ii(t,e,Er);if(i)u.push(i);for(let y=0;y<u.length;y++){let f=u[y];m(f[o]-(a-n/2),p(f)+0.5),m(a+n/2-f[c],0.5-p(f));for(let _=y+1;_<u.length;_++){let x=u[_],Y=f.side&&x.side&&f.side!==x.side?Lm:Pi;if(!An(f[l],f[s],x[l],x[s],Y))continue;let[b,M]=f[c]<=x[o]?[f,x]:[x,f];m(M[o]-b[c],p(M)-p(b),Y)}}return d}function Ym(t,e,r=Pi,i){if(!Number.isFinite(t.width)||!Number.isFinite(t.height))return!1;let n=Ii(t,e,Er);if(i)n.push(i);for(let a=0;a<n.length;a++){let o=n[a];if(o.xMin<t.schX-t.width/2-0.000000001||o.xMax>t.schX+t.width/2+0.000000001||o.yMin<t.schY-t.height/2-0.000000001||o.yMax>t.schY+t.height/2+0.000000001)return!1;for(let c=a+1;c<n.length;c++){let l=n[c],s=o.side&&l.side&&o.side!==l.side?r:Pi;if(Bn(o,l,s))return!1}}return!0}class er extends at{params;SCHEMATIC_BOX_TOO_WIDE_MESSAGE="Shrink schematic box width";PIN_HEADER_MAX_ALLOWED_GAP=0.1;GENERIC_MAX_ALLOWED_GAP=1;PIN_LABEL_EDGE_PADDING=0.1;GAP_COMPARISON_EPSILON=0.000000001;entries;placementById;schematicComponentById;sourceComponentById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r),this.schematicComponentById=new Map(e.filter((n)=>n.type==="schematic_component").map((n)=>[n.schematic_component_id,n])),this.sourceComponentById=this.getSourceComponentById(e);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=>i.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex>=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=this.getCenteredRectBounds(i),a=this.getLabelColumn("left",r),o=this.getLabelColumn("right",r),c=this.getSourceComponentFtype(i,this.sourceComponentById),l;if(a&&o)l=this.getInnerLabelEdge(n,o)-this.getInnerLabelEdge(n,a);else if(a&&a.labelCount>=4)l=n.right-this.getInnerLabelEdge(n,a);else if(o&&o.labelCount>=4)l=this.getInnerLabelEdge(n,o)-n.left;if(l===void 0)return;let s=c==="simple_pin_header"?this.PIN_HEADER_MAX_ALLOWED_GAP:this.GENERIC_MAX_ALLOWED_GAP;if(!this.exceedsMaxAllowedGap(l,s))return;let p=this.getSuggestedWidth({measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,currentWidth:i.width}),d=this.schematicComponentById.get(e)?.pin_spacing;if(d===void 0)return;let m=In(i,r,d,{width:p},0,Pn(this.params.ctx.circuitJson,e));if(m?.width===void 0)return;let u=m.width;if(c==="simple_pin_header")this.params.issues.push({lineItemType:"PinHeaderSchematicBoxTooWide",schematicBox:i,measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,suggestedSchWidth:u,message:this.SCHEMATIC_BOX_TOO_WIDE_MESSAGE});else this.params.issues.push({lineItemType:"GenericSchematicBoxTooWide",schematicBox:i,measuredInnerLabelHorizontalEmptySpace:l,maxAllowedInnerLabelHorizontalEmptySpace:s,suggestedSchWidth:u,message:this.SCHEMATIC_BOX_TOO_WIDE_MESSAGE})}static issueToString(t){let e=[];return S(e,"message",t.message),S(e,"componentName",t.schematicBox.sourceComponentName),S(e,"currentSchWidth",t.schematicBox.width),S(e,"measuredInnerLabelHorizontalEmptySpace",t.measuredInnerLabelHorizontalEmptySpace),S(e,"maxAllowedInnerLabelHorizontalEmptySpace",t.maxAllowedInnerLabelHorizontalEmptySpace),S(e,"suggestedSchWidth",t.suggestedSchWidth),`<${t.lineItemType} ${e.join(" ")} />`}isSchematicPort(t){return t.type==="schematic_port"}getSourceComponentWithFtype(t){if(t.type!=="source_component"||!("source_component_id"in t)||typeof t.source_component_id!=="string")return null;return{type:"source_component",source_component_id:t.source_component_id,ftype:"ftype"in t&&typeof t.ftype==="string"?t.ftype:void 0}}exceedsMaxAllowedGap(t,e){return t-e>this.GAP_COMPARISON_EPSILON}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2}}getSourceComponentById(t){return new Map(t.flatMap((e)=>{let r=this.getSourceComponentWithFtype(e);return r?[r]:[]}).map((e)=>[e.source_component_id,e]))}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=>e.schematicComponentId).map((e)=>[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=>this.isSchematicPort(i))){if(!r.schematic_component_id)continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getSourceComponentFtype(t,e){return t.sourceComponentId?e.get(t.sourceComponentId)?.ftype:void 0}getLabelColumn(t,e){let r=e.filter((i)=>i.side_of_component===t).flatMap((i)=>i.display_pin_label?[Er(i)]:[]);if(r.length===0)return null;return{side:t,labelCount:r.length,maxLabelWidth:Math.max(...r)}}getInnerLabelEdge(t,e){return e.side==="left"?t.left+this.PIN_LABEL_EDGE_PADDING+e.maxLabelWidth:t.right-this.PIN_LABEL_EDGE_PADDING-e.maxLabelWidth}getSuggestedWidth(t){return t.currentWidth-t.measuredInnerLabelHorizontalEmptySpace+t.maxAllowedInnerLabelHorizontalEmptySpace}}class Tr extends at{params;MESSAGE="Move schematic pins closer to the box edge or change the schematic box";GAP_COMPARISON_EPSILON=0.000000001;entries;placementById;schematicComponentById;sourcePortById;currentIndex=0;constructor(t){super();this.params=t;let{circuitJson:e,componentPlacements:r}=t.ctx;this.placementById=this.getPlacementBySchematicComponentId(r),this.schematicComponentById=this.getSchematicComponentById(e),this.sourcePortById=this.getSourcePortById(e);let i=Cr(e);this.entries=Array.from(this.getPortsBySchematicComponentId(e)).filter(([n])=>i.has(n)),this.solved=this.entries.length===0}_step(){let t=this.entries[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex>=this.entries.length;let[e,r]=t,i=this.placementById.get(e);if(!i)return;let n=this.getPinSpacing(i,this.schematicComponentById);if(n===null)return;let a=this.getMaxLabelLengthBySide(r),o=new Map;for(let f of r){if(!this.isSchematicSide(f.side_of_component))continue;let _=o.get(f.side_of_component)??[];_.push(f),o.set(f.side_of_component,_)}let c=[];for(let[f,_]of o){if(_.length===1)continue;for(let x of this.getBoxEdgeSidesForPinSide(f)){let Y=this.getOuterPinBySide(x,_);if(!Y)continue;let b=this.getPinPaddingToEdge(i,Y,x),M=Math.max(n,this.getMaxAllowedPinPadding(n,x,a));if(!this.exceedsMaxAllowedGap(b,M+n))continue;c.push({schematicBox:i,pinSide:f,edgeSide:x,pinName:this.getPinName(Y,this.sourcePortById),measuredPadding:b,maxAllowedPadding:M})}}if(!c.length)return;let l=c.map((f)=>this.createIssue(f)),s=l.flatMap((f)=>f.suggestedSchWidth===void 0?[]:[f.suggestedSchWidth]),p=l.flatMap((f)=>f.suggestedSchHeight===void 0?[]:[f.suggestedSchHeight]),d=In(i,r,n,{width:s.length?Math.max(...s):void 0,height:p.length?Math.max(...p):void 0},2*n,Pn(this.params.ctx.circuitJson,e));if(!d)return;let m=l.filter((f)=>d.width!==void 0&&f.suggestedSchWidth!==void 0||d.height!==void 0&&f.suggestedSchHeight!==void 0),u=m.reduce((f,_)=>_.excessPadding>f.excessPadding?_:f),y=[d.width===void 0?"":"width",d.height===void 0?"":"height"].filter(Boolean).join(" and ");this.params.issues.push({...u,paddingDetails:m.map(({pinSide:f,edgeSide:_,pinName:x,measuredPadding:Y,maxAllowedPadding:b,excessPadding:M})=>({pinSide:f,edgeSide:_,pinName:x,measuredPadding:Y,maxAllowedPadding:b,excessPadding:M})),suggestedSchWidth:d.width,suggestedSchHeight:d.height,message:`${this.MESSAGE} ${y}`})}static issueToString(t){let e=[];if(S(e,"message",t.message),S(e,"componentName",t.schematicBox.sourceComponentName),t.paddingDetails)S(e,"pinSides",[...new Set(t.paddingDetails.map((r)=>r.pinSide))].join(",")),S(e,"edgeSides",[...new Set(t.paddingDetails.map((r)=>r.edgeSide))].join(","));else S(e,"pinSide",t.pinSide),S(e,"edgeSide",t.edgeSide),S(e,"pinName",t.pinName),S(e,"measuredPadding",t.measuredPadding),S(e,"maxAllowedPadding",t.maxAllowedPadding),S(e,"excessPadding",t.excessPadding);return S(e,"suggestedSchWidth",t.suggestedSchWidth),S(e,"suggestedSchHeight",t.suggestedSchHeight),`<SchematicPinPaddingToEdgeTooLarge ${e.join(" ")} />`}isSchematicPort(t){return t.type==="schematic_port"}isSourcePort(t){return t.type==="source_port"}isSchematicComponent(t){return t.type==="schematic_component"}isHorizontalSide(t){return t==="left"||t==="right"}isVerticalSide(t){return t==="top"||t==="bottom"}isSchematicSide(t){return this.isHorizontalSide(t)||this.isVerticalSide(t)}exceedsMaxAllowedGap(t,e){return t-e>this.GAP_COMPARISON_EPSILON}getCenteredRectBounds(t){return{left:t.schX-t.width/2,right:t.schX+t.width/2,top:t.schY+t.height/2,bottom:t.schY-t.height/2}}getSourcePortById(t){return new Map(t.filter((e)=>this.isSourcePort(e)).map((e)=>[e.source_port_id,e]))}getSchematicComponentById(t){return new Map(t.filter((e)=>this.isSchematicComponent(e)).map((e)=>[e.schematic_component_id,e]))}getPlacementBySchematicComponentId(t){return new Map(t.filter((e)=>e.schematicComponentId).map((e)=>[e.schematicComponentId,e]))}getPortsBySchematicComponentId(t){let e=new Map;for(let r of t.filter((i)=>this.isSchematicPort(i))){if(!r.schematic_component_id)continue;let i=e.get(r.schematic_component_id);if(i)i.push(r);else e.set(r.schematic_component_id,[r])}return e}getPinSpacing(t,e){if(!t.schematicComponentId)return null;let r=e.get(t.schematicComponentId);return typeof r?.pin_spacing==="number"?r.pin_spacing:null}getPinName(t,e){let r=e.get(t.source_port_id);if(r?.name)return r.name;if(t.display_pin_label)return t.display_pin_label;if(r?.pin_number!==void 0)return String(r.pin_number);return}getMaxLabelLengthBySide(t){let e={left:0,right:0,top:0,bottom:0};for(let r of t){if(!this.isSchematicSide(r.side_of_component))continue;if(!r.display_pin_label)continue;e[r.side_of_component]=Math.max(e[r.side_of_component],Er(r))}return e}getOuterPinBySide(t,e){if(e.length===0)return null;switch(t){case"top":return e.reduce((r,i)=>i.center.y>r.center.y?i:r);case"bottom":return e.reduce((r,i)=>i.center.y<r.center.y?i:r);case"left":return e.reduce((r,i)=>i.center.x<r.center.x?i:r);case"right":return e.reduce((r,i)=>i.center.x>r.center.x?i:r)}}getPinPaddingToEdge(t,e,r){let i=this.getCenteredRectBounds(t);switch(r){case"top":return Math.max(0,i.top-e.center.y);case"bottom":return Math.max(0,e.center.y-i.bottom);case"left":return Math.max(0,e.center.x-i.left);case"right":return Math.max(0,i.right-e.center.x)}}getBoxEdgeSidesForPinSide(t){return this.isHorizontalSide(t)?["top","bottom"]:["left","right"]}getMaxAllowedPinPadding(t,e,r){let i=this.isHorizontalSide(e)?["left","right"]:["top","bottom"];return(r[i[0]]+r[i[1]]+t)/2}createIssue(t){let e=Math.max(0,t.measuredPadding-t.maxAllowedPadding),r=e*2;return{lineItemType:"SchematicPinPaddingToEdgeTooLarge",pinSide:t.pinSide,edgeSide:t.edgeSide,pinName:t.pinName,schematicBox:t.schematicBox,measuredPadding:t.measuredPadding,maxAllowedPadding:t.maxAllowedPadding,excessPadding:e,suggestedSchWidth:this.isHorizontalSide(t.pinSide)?void 0:Math.max(0,t.schematicBox.width-r),suggestedSchHeight:this.isHorizontalSide(t.pinSide)?Math.max(0,t.schematicBox.height-r):void 0,message:this.isHorizontalSide(t.pinSide)?`${this.MESSAGE} height`:`${this.MESSAGE} width`}}}var Dr={};z1(Dr,{all_layers:()=>Mu,any_circuit_element:()=>u0,any_soup_element:()=>zr,any_source_component:()=>bu,asset:()=>ac,base_circuit_json_error:()=>kt,battery_capacity:()=>Hm,brep_shape:()=>Lc,cadModelDefaultDirectionMap:()=>E9,cad_component:()=>Hf,cad_model_axis_directions:()=>Qf,cad_model_formats:()=>L9,capacitance:()=>nc,circuit_json_footprint_load_error:()=>Sf,current:()=>Xr,distance:()=>C,duration_ms:()=>Vr,experiment_type:()=>r0,external_footprint_load_error:()=>vf,frequency:()=>or,getZodPrefixedIdWithDefault:()=>T,inductance:()=>Gm,kicadAt:()=>jn,kicadEffects:()=>Zm,kicadFont:()=>sc,kicadFootprintAttributes:()=>Jm,kicadFootprintMetadata:()=>eu,kicadFootprintModel:()=>tu,kicadFootprintPad:()=>qm,kicadFootprintProperties:()=>Km,kicadProperty:()=>Gi,kicadSymbolEffects:()=>nu,kicadSymbolMetadata:()=>au,kicadSymbolPinNames:()=>iu,kicadSymbolPinNumbers:()=>ru,kicadSymbolProperties:()=>ou,kicadSymbolProperty:()=>Ue,layer_ref:()=>St,layer_string:()=>rc,length:()=>K,manufacturing_drc_properties:()=>uy,ms:()=>Vt,ninePointAnchor:()=>ke,parseAndConvertSiUnit:()=>qt,pcbRenderLayer:()=>o9,pcb_autorouting_error:()=>Af,pcb_board:()=>$y,pcb_breakout_point:()=>If,pcb_component:()=>yy,pcb_component_invalid_layer_error:()=>Rf,pcb_component_not_on_board_edge_error:()=>Wf,pcb_component_outside_board_error:()=>Nf,pcb_connector_not_in_accessible_orientation_warning:()=>Ff,pcb_copper_pour:()=>Tf,pcb_copper_pour_brep:()=>Lf,pcb_copper_pour_polygon:()=>Ef,pcb_copper_pour_rect:()=>Yf,pcb_copper_text:()=>Hy,pcb_courtyard_circle:()=>Uf,pcb_courtyard_outline:()=>zf,pcb_courtyard_overlap_error:()=>mf,pcb_courtyard_pill:()=>Gf,pcb_courtyard_polygon:()=>Df,pcb_courtyard_rect:()=>Vf,pcb_cutout:()=>xf,pcb_cutout_circle:()=>ff,pcb_cutout_path:()=>gf,pcb_cutout_polygon:()=>_f,pcb_cutout_rect:()=>yf,pcb_fabrication_note_dimension:()=>af,pcb_fabrication_note_path:()=>nf,pcb_fabrication_note_rect:()=>of,pcb_fabrication_note_text:()=>rf,pcb_footprint_overlap_error:()=>df,pcb_ground_plane:()=>Mf,pcb_ground_plane_region:()=>kf,pcb_group:()=>wf,pcb_hole:()=>Sy,pcb_hole_circle_or_square_shape:()=>d9,pcb_hole_circle_shape:()=>p9,pcb_hole_oval_shape:()=>m9,pcb_hole_pill_shape:()=>u9,pcb_hole_rect_shape:()=>h9,pcb_hole_rotated_pill_shape:()=>y9,pcb_keepout:()=>uf,pcb_manual_edit_conflict_warning:()=>Bf,pcb_missing_footprint_error:()=>bf,pcb_net:()=>Oy,pcb_note_dimension:()=>hf,pcb_note_line:()=>pf,pcb_note_path:()=>lf,pcb_note_rect:()=>cf,pcb_note_text:()=>sf,pcb_pad_pad_clearance_error:()=>$f,pcb_pad_trace_clearance_error:()=>Xf,pcb_panel:()=>Xy,pcb_panelization_placement_error:()=>zy,pcb_placement_error:()=>Vy,pcb_plated_hole:()=>wy,pcb_port:()=>Ay,pcb_port_not_connected_error:()=>Ry,pcb_port_not_matched_error:()=>Wy,pcb_route_hint:()=>dy,pcb_route_hints:()=>l9,pcb_silkscreen_circle:()=>Ky,pcb_silkscreen_graphic:()=>tf,pcb_silkscreen_graphic_brep:()=>qy,pcb_silkscreen_line:()=>Uy,pcb_silkscreen_oval:()=>Jy,pcb_silkscreen_path:()=>Gy,pcb_silkscreen_pill:()=>ef,pcb_silkscreen_rect:()=>Zy,pcb_silkscreen_text:()=>Qy,pcb_smtpad:()=>Fy,pcb_smtpad_pill:()=>By,pcb_solder_paste:()=>Py,pcb_text:()=>Iy,pcb_thermal_spoke:()=>Cf,pcb_trace:()=>Ly,pcb_trace_error:()=>Ty,pcb_trace_hint:()=>Dy,pcb_trace_missing_error:()=>Ny,pcb_trace_route_point:()=>Yy,pcb_trace_route_point_through_pad:()=>Cy,pcb_trace_route_point_via:()=>ky,pcb_trace_route_point_wire:()=>My,pcb_trace_warning:()=>Ey,pcb_via:()=>jy,pcb_via_clearance_error:()=>Of,pcb_via_trace_clearance_error:()=>jf,point:()=>it,point3:()=>Ie,point_with_bulge:()=>hy,port_arrangement:()=>Xu,position:()=>r9,position3:()=>i9,resistance:()=>On,ring:()=>ic,rotation:()=>jt,route_hint_point:()=>my,schematic_arc:()=>Qu,schematic_box:()=>Wu,schematic_circle:()=>Gu,schematic_component:()=>Vu,schematic_component_port_arrangement_by_sides:()=>$u,schematic_component_port_arrangement_by_size:()=>ju,schematic_debug_line:()=>ry,schematic_debug_object:()=>ny,schematic_debug_object_base:()=>Xn,schematic_debug_point:()=>iy,schematic_debug_rect:()=>ey,schematic_error:()=>qu,schematic_group:()=>sy,schematic_layout_error:()=>ty,schematic_line:()=>Du,schematic_manual_edit_conflict_warning:()=>ay,schematic_net_label:()=>Ju,schematic_path:()=>Ru,schematic_pin_styles:()=>Ou,schematic_port:()=>Ku,schematic_rect:()=>Uu,schematic_sheet:()=>py,schematic_symbol:()=>zu,schematic_table:()=>cy,schematic_table_cell:()=>ly,schematic_text:()=>Zu,schematic_trace:()=>Hu,schematic_voltage_probe:()=>oy,simulation_ac_current_source:()=>t0,simulation_ac_voltage_source:()=>Kf,simulation_current_probe:()=>l0,simulation_current_source:()=>e0,simulation_dc_current_source:()=>qf,simulation_dc_voltage_source:()=>Zf,simulation_experiment:()=>n0,simulation_op_amp:()=>h0,simulation_oscilloscope_trace:()=>m0,simulation_spice_subcircuit:()=>d0,simulation_switch:()=>s0,simulation_transient_current_graph:()=>a0,simulation_transient_voltage_graph:()=>o0,simulation_unknown_experiment_error:()=>p0,simulation_voltage_probe:()=>c0,simulation_voltage_source:()=>Jf,size:()=>oc,source_ambiguous_port_reference:()=>Pu,source_board:()=>Fu,source_component_base:()=>Yt,source_component_internal_connection:()=>Su,source_component_misconfigured_error:()=>Yc,source_component_pins_underspecified_warning:()=>Eu,source_failed_to_create_component_error:()=>yu,source_group:()=>Au,source_i2c_misconfigured_error:()=>Cc,source_interconnect:()=>gu,source_invalid_component_property_error:()=>Pc,source_manually_placed_via:()=>ku,source_missing_manufacturer_part_number_warning:()=>kc,source_missing_property_error:()=>uu,source_net:()=>Bu,source_no_ground_pin_defined_warning:()=>Lu,source_no_power_pin_defined_warning:()=>Yu,source_pcb_ground_plane:()=>Iu,source_pin_attributes:()=>hu,source_pin_missing_trace_warning:()=>Mc,source_pin_must_be_connected_error:()=>Tu,source_port:()=>vu,source_project_metadata:()=>Fc,source_property_ignored_warning:()=>fu,source_simple_ammeter:()=>pu,source_simple_battery:()=>uc,source_simple_capacitor:()=>lc,source_simple_chip:()=>dc,source_simple_connector:()=>mu,source_simple_crystal:()=>du,source_simple_current_source:()=>lu,source_simple_diode:()=>$n,source_simple_fiducial:()=>su,source_simple_ground:()=>cu,source_simple_inductor:()=>yc,source_simple_led:()=>hc,source_simple_mosfet:()=>wc,source_simple_op_amp:()=>Ac,source_simple_pin_header:()=>gc,source_simple_pinout:()=>xc,source_simple_potentiometer:()=>_c,source_simple_power_source:()=>mc,source_simple_push_button:()=>fc,source_simple_resistor:()=>pc,source_simple_resonator:()=>bc,source_simple_switch:()=>Bc,source_simple_test_point:()=>Sc,source_simple_transistor:()=>vc,source_simple_voltage_probe:()=>_u,source_simple_voltage_source:()=>xu,source_trace:()=>wu,source_trace_not_connected_error:()=>Ic,source_unnamed_trace_warning:()=>Cu,spice_simulation_options:()=>i0,supplier_footprint_mismatch_warning:()=>Pf,supplier_name:()=>cc,time:()=>e9,timestamp:()=>Qm,unknown_error_finding_part:()=>Nu,visible_layer:()=>zt,voltage:()=>Me,wave_shape:()=>Tc});var Tm=new Map([["T",1000000000000],["G",1e9],["M",1e6],["K",1000],["k",1000],["",1],["m",0.001],["µ",0.000001],["u",0.000001],["n",0.000000001],["p",0.000000000001],["f",0.000000000000001]]),P2=[...Tm.keys()];function Nm(t){return Tm.get(t)}var Wm={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1000,Hz:1}},g:{baseUnit:"g",variants:{kg:1000,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:0.001,mohm:0.001,mOhm:0.001,milliohm:0.001,Ω:1,ohm:1,Ohm:1,kΩ:1000,KΩ:1000,kohm:1000,kOhm:1000,KOhm:1000,Kohm:1000,MΩ:1e6,Mohm:1e6,MOhm:1e6,megohm:1e6,Megohm:1e6,GΩ:1e9,Gohm:1e9,GOhm:1e9,TΩ:1000000000000,Tohm:1000000000000,TOhm:1000000000000}},V:{baseUnit:"V",variants:{mV:0.001,V:1,kV:1000,KV:1000,MV:1e6,GV:1e9,TV:1000000000000}},A:{baseUnit:"A",variants:{µA:0.000001,mA:0.001,ma:0.001,A:1,kA:1000,MA:1e6}},F:{baseUnit:"F",variants:{pF:0.000000000001,nF:0.000000001,µF:0.000001,uF:0.000001,mF:0.001,F:1,kF:1000,KF:1000,MF:1e6}},H:{baseUnit:"H",variants:{pH:0.000000000001,nH:0.000000001,µH:0.000001,uH:0.000001,mH:0.001,H:1,kH:1000,KH:1000,MH:1e6}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1000,L:1000}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:0.000000000001,ps:0.000000001,ns:0.000001,us:0.001,µs:0.001,ms:1,s:1000}},mm:{baseUnit:"mm",variants:{nm:0.000001,µm:0.001,um:0.001,mm:1,cm:10,dm:100,m:1000,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:0.0254}}},Hs=new Set;for(let[t,e]of Object.entries(Wm)){Hs.add(t);for(let r of Object.keys(e.variants))Hs.add(r)}function I2(t){for(let e of Object.values(Wm)){if(t in e.variants)return{baseUnit:e.baseUnit,conversionFactor:e.variants[t]};for(let[r,i]of Object.entries(e.variants)){if(!t.endsWith(r))continue;let n=t.slice(0,-r.length),a=Nm(n);if(a==null)continue;return{baseUnit:e.baseUnit,conversionFactor:a*i}}}return{baseUnit:t,conversionFactor:1}}function qt(t,e){if(t===void 0||t===null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t==="string"&&t.match(/^-?[\d.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t==="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t==="object"&&"x"in t&&"y"in t){let s=qt(t.x,e),p=qt(t.x,e),d=qt(t.y,e);if(p.value===null||d.value===null)return{parsedUnit:null,unitOfValue:null,value:null};return{parsedUnit:s.parsedUnit,unitOfValue:s.unitOfValue,value:{x:p.value,y:d.value}}}let i=t.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!i)throw Error(`Could not determine unit: "${t}"`);let n=i.split("").reverse().join(""),a=t.slice(0,-n.length),o=Nm(n);if(e&&o!=null)return{parsedUnit:null,unitOfValue:e,value:Number.parseFloat(a)*o};if(o!=null&&!Hs.has(n))return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(a)*o};let{baseUnit:c,conversionFactor:l}=I2(n);return{parsedUnit:n,unitOfValue:c,value:l*Number.parseFloat(a)}}var M2=P2.filter((t)=>t!=="").sort((t,e)=>e.length-t.length).map((t)=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),wT=new RegExp(`^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?)(?:(${M2}))?$`);var Em=[{value:1000000000000,symbol:"T"},{value:1e9,symbol:"G"},{value:1e6,symbol:"M"},{value:1000,symbol:"k"},{value:1,symbol:""},{value:0.001,symbol:"m"},{value:0.000001,symbol:"µ"},{value:0.000000001,symbol:"n"},{value:0.000000000001,symbol:"p"}],AT=Em[Em.length-1];var Bt;(function(t){t.assertEqual=(n)=>{};function e(n){}t.assertIs=e;function r(n){throw Error()}t.assertNever=r,t.arrayToEnum=(n)=>{let a={};for(let o of n)a[o]=o;return a},t.getValidEnumValues=(n)=>{let a=t.objectKeys(n).filter((c)=>typeof n[n[c]]!=="number"),o={};for(let c of a)o[c]=n[c];return t.objectValues(o)},t.objectValues=(n)=>t.objectKeys(n).map(function(a){return n[a]}),t.objectKeys=typeof Object.keys==="function"?(n)=>Object.keys(n):(n)=>{let a=[];for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o))a.push(o);return a},t.find=(n,a)=>{for(let o of n)if(a(o))return o;return},t.isInteger=typeof Number.isInteger==="function"?(n)=>Number.isInteger(n):(n)=>typeof n==="number"&&Number.isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map((o)=>typeof o==="string"?`'${o}'`:o).join(a)}t.joinValues=i,t.jsonStringifyReplacer=(n,a)=>{if(typeof a==="bigint")return a.toString();return a}})(Bt||(Bt={}));var Rm;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Rm||(Rm={}));var nt=Bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),we=(t)=>{switch(typeof t){case"undefined":return nt.undefined;case"string":return nt.string;case"number":return Number.isNaN(t)?nt.nan:nt.number;case"boolean":return nt.boolean;case"function":return nt.function;case"bigint":return nt.bigint;case"symbol":return nt.symbol;case"object":if(Array.isArray(t))return nt.array;if(t===null)return nt.null;if(t.then&&typeof t.then==="function"&&t.catch&&typeof t.catch==="function")return nt.promise;if(typeof Map<"u"&&t instanceof Map)return nt.map;if(typeof Set<"u"&&t instanceof Set)return nt.set;if(typeof Date<"u"&&t instanceof Date)return nt.date;return nt.object;default:return nt.unknown}};var V=Bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ie extends Error{get errors(){return this.issues}constructor(t){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let e=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,e);else this.__proto__=e;this.name="ZodError",this.issues=t}format(t){let e=t||function(n){return n.message},r={_errors:[]},i=(n)=>{for(let a of n.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(e(a));else{let o=r,c=0;while(c<a.path.length){let l=a.path[c];if(c!==a.path.length-1)o[l]=o[l]||{_errors:[]};else o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(a));o=o[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof ie))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=(e)=>e.message){let e={},r=[];for(let i of this.issues)if(i.path.length>0){let n=i.path[0];e[n]=e[n]||[],e[n].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:e}}get formErrors(){return this.flatten()}}ie.create=(t)=>new ie(t);var k2=(t,e)=>{let r;switch(t.code){case V.invalid_type:if(t.received===nt.undefined)r="Required";else r=`Expected ${t.expected}, received ${t.received}`;break;case V.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Bt.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:r=`Unrecognized key(s) in object: ${Bt.joinValues(t.keys,", ")}`;break;case V.invalid_union:r="Invalid input";break;case V.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Bt.joinValues(t.options)}`;break;case V.invalid_enum_value:r=`Invalid enum value. Expected ${Bt.joinValues(t.options)}, received '${t.received}'`;break;case V.invalid_arguments:r="Invalid function arguments";break;case V.invalid_return_type:r="Invalid function return type";break;case V.invalid_date:r="Invalid date";break;case V.invalid_string:if(typeof t.validation==="object")if("includes"in t.validation){if(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${t.validation.position}`}else if("startsWith"in t.validation)r=`Invalid input: must start with "${t.validation.startsWith}"`;else if("endsWith"in t.validation)r=`Invalid input: must end with "${t.validation.endsWith}"`;else Bt.assertNever(t.validation);else if(t.validation!=="regex")r=`Invalid ${t.validation}`;else r="Invalid";break;case V.too_small:if(t.type==="array")r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`;else if(t.type==="string")r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`;else if(t.type==="number")r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="bigint")r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`;else if(t.type==="date")r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`;else r="Invalid input";break;case V.too_big:if(t.type==="array")r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`;else if(t.type==="string")r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`;else if(t.type==="number")r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="bigint")r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`;else if(t.type==="date")r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`;else r="Invalid input";break;case V.custom:r="Invalid input";break;case V.invalid_intersection_types:r="Intersection results could not be merged";break;case V.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case V.not_finite:r="Number must be finite";break;default:r=e.defaultError,Bt.assertNever(t)}return{message:r}},ze=k2;var C2=ze;function Yi(){return C2}var Mn=(t)=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,a=[...r,...n.path||[]],o={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let c="",l=i.filter((s)=>!!s).slice().reverse();for(let s of l)c=s(o,{data:e,defaultError:c}).message;return{...n,path:a,message:c}};function rt(t,e){let r=Yi(),i=Mn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ze?void 0:ze].filter((n)=>!!n)});t.common.issues.push(i)}class Ht{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(t,e){let r=[];for(let i of e){if(i.status==="aborted")return ut;if(i.status==="dirty")t.dirty();r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,e){let r=[];for(let i of e){let n=await i.key,a=await i.value;r.push({key:n,value:a})}return Ht.mergeObjectSync(t,r)}static mergeObjectSync(t,e){let r={};for(let i of e){let{key:n,value:a}=i;if(n.status==="aborted")return ut;if(a.status==="aborted")return ut;if(n.status==="dirty")t.dirty();if(a.status==="dirty")t.dirty();if(n.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet))r[n.value]=a.value}return{status:t.value,value:r}}}var ut=Object.freeze({status:"aborted"}),Nr=(t)=>({status:"dirty",value:t}),Kt=(t)=>({status:"valid",value:t}),Zs=(t)=>t.status==="aborted",Ks=(t)=>t.status==="dirty",rr=(t)=>t.status==="valid",Li=(t)=>typeof Promise<"u"&&t instanceof Promise;var lt;(function(t){t.errToObj=(e)=>typeof e==="string"?{message:e}:e||{},t.toString=(e)=>typeof e==="string"?e:e?.message})(lt||(lt={}));class pe{constructor(t,e,r,i){this._cachedPath=[],this.parent=t,this.data=e,this._path=r,this._key=i}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Om=(t,e)=>{if(rr(e))return{success:!0,data:e.value};else{if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ie(t.common.issues);return this._error=r,this._error}}}};function vt(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(e)return{errorMap:e,description:n};return{errorMap:(o,c)=>{let{message:l}=t;if(o.code==="invalid_enum_value")return{message:l??c.defaultError};if(typeof c.data>"u")return{message:l??i??c.defaultError};if(o.code!=="invalid_type")return{message:c.defaultError};return{message:l??r??c.defaultError}},description:n}}class wt{get description(){return this._def.description}_getType(t){return we(t.data)}_getOrReturnCtx(t,e){return e||{common:t.parent.common,data:t.data,parsedType:we(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ht,ctx:{common:t.parent.common,data:t.data,parsedType:we(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let e=this._parse(t);if(Li(e))throw Error("Synchronous parse encountered promise.");return e}_parseAsync(t){let e=this._parse(t);return Promise.resolve(e)}parse(t,e){let r=this.safeParse(t,e);if(r.success)return r.data;throw r.error}safeParse(t,e){let r={common:{issues:[],async:e?.async??!1,contextualErrorMap:e?.errorMap},path:e?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Om(r,i)}"~validate"(t){let e={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:e});return rr(r)?{value:r.value}:{issues:e.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;e.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:e}).then((r)=>rr(r)?{value:r.value}:{issues:e.common.issues})}async parseAsync(t,e){let r=await this.safeParseAsync(t,e);if(r.success)return r.data;throw r.error}async safeParseAsync(t,e){let r={common:{issues:[],contextualErrorMap:e?.errorMap,async:!0},path:e?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:we(t)},i=this._parse({data:t,path:r.path,parent:r}),n=await(Li(i)?i:Promise.resolve(i));return Om(r,n)}refine(t,e){let r=(i)=>{if(typeof e==="string"||typeof e>"u")return{message:e};else if(typeof e==="function")return e(i);else return e};return this._refinement((i,n)=>{let a=t(i),o=()=>n.addIssue({code:V.custom,...r(i)});if(typeof Promise<"u"&&a instanceof Promise)return a.then((c)=>{if(!c)return o(),!1;else return!0});if(!a)return o(),!1;else return!0})}refinement(t,e){return this._refinement((r,i)=>{if(!t(r))return i.addIssue(typeof e==="function"?e(r,i):e),!1;else return!0})}_refinement(t){return new ue({schema:this,typeName:ft.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(e)=>this["~validate"](e)}}optional(){return me.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return $r.create(this,this._def)}or(t){return Ri.create([this,t],this._def)}and(t){return Oi.create(this,t,this._def)}transform(t){return new ue({...vt(this._def),schema:this,typeName:ft.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let e=typeof t==="function"?t:()=>t;return new Vi({...vt(this._def),innerType:this,defaultValue:e,typeName:ft.ZodDefault})}brand(){return new ec({typeName:ft.ZodBranded,type:this,...vt(this._def)})}catch(t){let e=typeof t==="function"?t:()=>t;return new zi({...vt(this._def),innerType:this,catchValue:e,typeName:ft.ZodCatch})}describe(t){return new this.constructor({...this._def,description:t})}pipe(t){return Wn.create(this,t)}readonly(){return Di.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var Y2=/^c[^\s-]{8,}$/i,L2=/^[0-9a-z]+$/,E2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T2=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,N2=/^[a-z0-9_-]{21}$/i,W2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,R2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,O2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,j2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Js,$2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,X2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,V2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,D2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,jm="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",G2=new RegExp(`^${jm}$`);function $m(t){let e="[0-5]\\d";if(t.precision)e=`${e}\\.\\d{${t.precision}}`;else if(t.precision==null)e=`${e}(\\.\\d+)?`;let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function Q2(t){return new RegExp(`^${$m(t)}$`)}function H2(t){let e=`${jm}T${$m(t)}`,r=[];if(r.push(t.local?"Z?":"Z"),t.offset)r.push("([+-]\\d{2}:?\\d{2})");return e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Z2(t,e){if((e==="v4"||!e)&&$2.test(t))return!0;if((e==="v6"||!e)&&V2.test(t))return!0;return!1}function K2(t,e){if(!W2.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let i=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(i));if(typeof n!=="object"||n===null)return!1;if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(e&&n.alg!==e)return!1;return!0}catch{return!1}}function J2(t,e){if((e==="v4"||!e)&&X2.test(t))return!0;if((e==="v6"||!e)&&z2.test(t))return!0;return!1}class Be extends wt{_parse(t){if(this._def.coerce)t.data=String(t.data);if(this._getType(t)!==nt.string){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.string,received:n.parsedType}),ut}let r=new Ht,i=void 0;for(let n of this._def.checks)if(n.kind==="min"){if(t.data.length<n.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty()}else if(n.kind==="max"){if(t.data.length>n.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty()}else if(n.kind==="length"){let a=t.data.length>n.value,o=t.data.length<n.value;if(a||o){if(i=this._getOrReturnCtx(t,i),a)rt(i,{code:V.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message});else if(o)rt(i,{code:V.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message});r.dirty()}}else if(n.kind==="email"){if(!O2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"email",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="emoji"){if(!Js)Js=new RegExp(j2,"u");if(!Js.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"emoji",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="uuid"){if(!T2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"uuid",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="nanoid"){if(!N2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"nanoid",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="cuid"){if(!Y2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"cuid",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="cuid2"){if(!L2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"cuid2",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="ulid"){if(!E2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"ulid",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),rt(i,{validation:"url",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="regex"){if(n.regex.lastIndex=0,!n.regex.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"regex",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="trim")t.data=t.data.trim();else if(n.kind==="includes"){if(!t.data.includes(n.value,n.position))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()}else if(n.kind==="toLowerCase")t.data=t.data.toLowerCase();else if(n.kind==="toUpperCase")t.data=t.data.toUpperCase();else if(n.kind==="startsWith"){if(!t.data.startsWith(n.value))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()}else if(n.kind==="endsWith"){if(!t.data.endsWith(n.value))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()}else if(n.kind==="datetime"){if(!H2(n).test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:"datetime",message:n.message}),r.dirty()}else if(n.kind==="date"){if(!G2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:"date",message:n.message}),r.dirty()}else if(n.kind==="time"){if(!Q2(n).test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{code:V.invalid_string,validation:"time",message:n.message}),r.dirty()}else if(n.kind==="duration"){if(!R2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"duration",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="ip"){if(!Z2(t.data,n.version))i=this._getOrReturnCtx(t,i),rt(i,{validation:"ip",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="jwt"){if(!K2(t.data,n.alg))i=this._getOrReturnCtx(t,i),rt(i,{validation:"jwt",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="cidr"){if(!J2(t.data,n.version))i=this._getOrReturnCtx(t,i),rt(i,{validation:"cidr",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="base64"){if(!D2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"base64",code:V.invalid_string,message:n.message}),r.dirty()}else if(n.kind==="base64url"){if(!U2.test(t.data))i=this._getOrReturnCtx(t,i),rt(i,{validation:"base64url",code:V.invalid_string,message:n.message}),r.dirty()}else Bt.assertNever(n);return{status:r.value,value:t.data}}_regex(t,e,r){return this.refinement((i)=>t.test(i),{validation:e,code:V.invalid_string,...lt.errToObj(r)})}_addCheck(t){return new Be({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...lt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...lt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...lt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...lt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...lt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...lt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...lt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...lt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...lt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...lt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...lt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...lt.errToObj(t)})}datetime(t){if(typeof t==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t});return this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...lt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){if(typeof t==="string")return this._addCheck({kind:"time",precision:null,message:t});return this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...lt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...lt.errToObj(t)})}regex(t,e){return this._addCheck({kind:"regex",regex:t,...lt.errToObj(e)})}includes(t,e){return this._addCheck({kind:"includes",value:t,position:e?.position,...lt.errToObj(e?.message)})}startsWith(t,e){return this._addCheck({kind:"startsWith",value:t,...lt.errToObj(e)})}endsWith(t,e){return this._addCheck({kind:"endsWith",value:t,...lt.errToObj(e)})}min(t,e){return this._addCheck({kind:"min",value:t,...lt.errToObj(e)})}max(t,e){return this._addCheck({kind:"max",value:t,...lt.errToObj(e)})}length(t,e){return this._addCheck({kind:"length",value:t,...lt.errToObj(e)})}nonempty(t){return this.min(1,lt.errToObj(t))}trim(){return new Be({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((t)=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find((t)=>t.kind==="date")}get isTime(){return!!this._def.checks.find((t)=>t.kind==="time")}get isDuration(){return!!this._def.checks.find((t)=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find((t)=>t.kind==="email")}get isURL(){return!!this._def.checks.find((t)=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find((t)=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find((t)=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((t)=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((t)=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((t)=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find((t)=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find((t)=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find((t)=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find((t)=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find((t)=>t.kind==="base64url")}get minLength(){let t=null;for(let e of this._def.checks)if(e.kind==="min"){if(t===null||e.value>t)t=e.value}return t}get maxLength(){let t=null;for(let e of this._def.checks)if(e.kind==="max"){if(t===null||e.value<t)t=e.value}return t}}Be.create=(t)=>new Be({checks:[],typeName:ft.ZodString,coerce:t?.coerce??!1,...vt(t)});function q2(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,a=Number.parseInt(t.toFixed(n).replace(".","")),o=Number.parseInt(e.toFixed(n).replace(".",""));return a%o/10**n}class Rr extends wt{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce)t.data=Number(t.data);if(this._getType(t)!==nt.number){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.number,received:n.parsedType}),ut}let r=void 0,i=new Ht;for(let n of this._def.checks)if(n.kind==="int"){if(!Bt.isInteger(t.data))r=this._getOrReturnCtx(t,r),rt(r,{code:V.invalid_type,expected:"integer",received:"float",message:n.message}),i.dirty()}else if(n.kind==="min"){if(n.inclusive?t.data<n.value:t.data<=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()}else if(n.kind==="max"){if(n.inclusive?t.data>n.value:t.data>=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()}else if(n.kind==="multipleOf"){if(q2(t.data,n.value)!==0)r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()}else if(n.kind==="finite"){if(!Number.isFinite(t.data))r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_finite,message:n.message}),i.dirty()}else Bt.assertNever(n);return{status:i.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,lt.toString(e))}gt(t,e){return this.setLimit("min",t,!1,lt.toString(e))}lte(t,e){return this.setLimit("max",t,!0,lt.toString(e))}lt(t,e){return this.setLimit("max",t,!1,lt.toString(e))}setLimit(t,e,r,i){return new Rr({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:lt.toString(i)}]})}_addCheck(t){return new Rr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:lt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:lt.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:lt.toString(e)})}finite(t){return this._addCheck({kind:"finite",message:lt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:lt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:lt.toString(t)})}get minValue(){let t=null;for(let e of this._def.checks)if(e.kind==="min"){if(t===null||e.value>t)t=e.value}return t}get maxValue(){let t=null;for(let e of this._def.checks)if(e.kind==="max"){if(t===null||e.value<t)t=e.value}return t}get isInt(){return!!this._def.checks.find((t)=>t.kind==="int"||t.kind==="multipleOf"&&Bt.isInteger(t.value))}get isFinite(){let t=null,e=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(e===null||r.value>e)e=r.value}else if(r.kind==="max"){if(t===null||r.value<t)t=r.value}return Number.isFinite(e)&&Number.isFinite(t)}}Rr.create=(t)=>new Rr({checks:[],typeName:ft.ZodNumber,coerce:t?.coerce||!1,...vt(t)});class Or extends wt{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==nt.bigint)return this._getInvalidInput(t);let r=void 0,i=new Ht;for(let n of this._def.checks)if(n.kind==="min"){if(n.inclusive?t.data<n.value:t.data<=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()}else if(n.kind==="max"){if(n.inclusive?t.data>n.value:t.data>=n.value)r=this._getOrReturnCtx(t,r),rt(r,{code:V.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()}else if(n.kind==="multipleOf"){if(t.data%n.value!==BigInt(0))r=this._getOrReturnCtx(t,r),rt(r,{code:V.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()}else Bt.assertNever(n);return{status:i.value,value:t.data}}_getInvalidInput(t){let e=this._getOrReturnCtx(t);return rt(e,{code:V.invalid_type,expected:nt.bigint,received:e.parsedType}),ut}gte(t,e){return this.setLimit("min",t,!0,lt.toString(e))}gt(t,e){return this.setLimit("min",t,!1,lt.toString(e))}lte(t,e){return this.setLimit("max",t,!0,lt.toString(e))}lt(t,e){return this.setLimit("max",t,!1,lt.toString(e))}setLimit(t,e,r,i){return new Or({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:lt.toString(i)}]})}_addCheck(t){return new Or({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:lt.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:lt.toString(e)})}get minValue(){let t=null;for(let e of this._def.checks)if(e.kind==="min"){if(t===null||e.value>t)t=e.value}return t}get maxValue(){let t=null;for(let e of this._def.checks)if(e.kind==="max"){if(t===null||e.value<t)t=e.value}return t}}Or.create=(t)=>new Or({checks:[],typeName:ft.ZodBigInt,coerce:t?.coerce??!1,...vt(t)});class kn extends wt{_parse(t){if(this._def.coerce)t.data=Boolean(t.data);if(this._getType(t)!==nt.boolean){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.boolean,received:r.parsedType}),ut}return Kt(t.data)}}kn.create=(t)=>new kn({typeName:ft.ZodBoolean,coerce:t?.coerce||!1,...vt(t)});class Ti extends wt{_parse(t){if(this._def.coerce)t.data=new Date(t.data);if(this._getType(t)!==nt.date){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_type,expected:nt.date,received:n.parsedType}),ut}if(Number.isNaN(t.data.getTime())){let n=this._getOrReturnCtx(t);return rt(n,{code:V.invalid_date}),ut}let r=new Ht,i=void 0;for(let n of this._def.checks)if(n.kind==="min"){if(t.data.getTime()<n.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()}else if(n.kind==="max"){if(t.data.getTime()>n.value)i=this._getOrReturnCtx(t,i),rt(i,{code:V.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()}else Bt.assertNever(n);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ti({...this._def,checks:[...this._def.checks,t]})}min(t,e){return this._addCheck({kind:"min",value:t.getTime(),message:lt.toString(e)})}max(t,e){return this._addCheck({kind:"max",value:t.getTime(),message:lt.toString(e)})}get minDate(){let t=null;for(let e of this._def.checks)if(e.kind==="min"){if(t===null||e.value>t)t=e.value}return t!=null?new Date(t):null}get maxDate(){let t=null;for(let e of this._def.checks)if(e.kind==="max"){if(t===null||e.value<t)t=e.value}return t!=null?new Date(t):null}}Ti.create=(t)=>new Ti({checks:[],coerce:t?.coerce||!1,typeName:ft.ZodDate,...vt(t)});class Cn extends wt{_parse(t){if(this._getType(t)!==nt.symbol){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.symbol,received:r.parsedType}),ut}return Kt(t.data)}}Cn.create=(t)=>new Cn({typeName:ft.ZodSymbol,...vt(t)});class Ni extends wt{_parse(t){if(this._getType(t)!==nt.undefined){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.undefined,received:r.parsedType}),ut}return Kt(t.data)}}Ni.create=(t)=>new Ni({typeName:ft.ZodUndefined,...vt(t)});class Wi extends wt{_parse(t){if(this._getType(t)!==nt.null){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.null,received:r.parsedType}),ut}return Kt(t.data)}}Wi.create=(t)=>new Wi({typeName:ft.ZodNull,...vt(t)});class Yn extends wt{constructor(){super(...arguments);this._any=!0}_parse(t){return Kt(t.data)}}Yn.create=(t)=>new Yn({typeName:ft.ZodAny,...vt(t)});class ir extends wt{constructor(){super(...arguments);this._unknown=!0}_parse(t){return Kt(t.data)}}ir.create=(t)=>new ir({typeName:ft.ZodUnknown,...vt(t)});class Fe extends wt{_parse(t){let e=this._getOrReturnCtx(t);return rt(e,{code:V.invalid_type,expected:nt.never,received:e.parsedType}),ut}}Fe.create=(t)=>new Fe({typeName:ft.ZodNever,...vt(t)});class Ln extends wt{_parse(t){if(this._getType(t)!==nt.undefined){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.void,received:r.parsedType}),ut}return Kt(t.data)}}Ln.create=(t)=>new Ln({typeName:ft.ZodVoid,...vt(t)});class de extends wt{_parse(t){let{ctx:e,status:r}=this._processInputParams(t),i=this._def;if(e.parsedType!==nt.array)return rt(e,{code:V.invalid_type,expected:nt.array,received:e.parsedType}),ut;if(i.exactLength!==null){let a=e.data.length>i.exactLength.value,o=e.data.length<i.exactLength.value;if(a||o)rt(e,{code:a?V.too_big:V.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty()}if(i.minLength!==null){if(e.data.length<i.minLength.value)rt(e,{code:V.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()}if(i.maxLength!==null){if(e.data.length>i.maxLength.value)rt(e,{code:V.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()}if(e.common.async)return Promise.all([...e.data].map((a,o)=>i.type._parseAsync(new pe(e,a,e.path,o)))).then((a)=>Ht.mergeArray(r,a));let n=[...e.data].map((a,o)=>i.type._parseSync(new pe(e,a,e.path,o)));return Ht.mergeArray(r,n)}get element(){return this._def.type}min(t,e){return new de({...this._def,minLength:{value:t,message:lt.toString(e)}})}max(t,e){return new de({...this._def,maxLength:{value:t,message:lt.toString(e)}})}length(t,e){return new de({...this._def,exactLength:{value:t,message:lt.toString(e)}})}nonempty(t){return this.min(1,t)}}de.create=(t,e)=>new de({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ft.ZodArray,...vt(e)});function Wr(t){if(t instanceof Ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=me.create(Wr(i))}return new Ot({...t._def,shape:()=>e})}else if(t instanceof de)return new de({...t._def,type:Wr(t.element)});else if(t instanceof me)return me.create(Wr(t.unwrap()));else if(t instanceof De)return De.create(Wr(t.unwrap()));else if(t instanceof Pe)return Pe.create(t.items.map((e)=>Wr(e)));else return t}class Ot extends wt{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),e=Bt.objectKeys(t);return this._cached={shape:t,keys:e},this._cached}_parse(t){if(this._getType(t)!==nt.object){let l=this._getOrReturnCtx(t);return rt(l,{code:V.invalid_type,expected:nt.object,received:l.parsedType}),ut}let{status:r,ctx:i}=this._processInputParams(t),{shape:n,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Fe&&this._def.unknownKeys==="strip")){for(let l in i.data)if(!a.includes(l))o.push(l)}let c=[];for(let l of a){let s=n[l],p=i.data[l];c.push({key:{status:"valid",value:l},value:s._parse(new pe(i,p,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Fe){let l=this._def.unknownKeys;if(l==="passthrough")for(let s of o)c.push({key:{status:"valid",value:s},value:{status:"valid",value:i.data[s]}});else if(l==="strict"){if(o.length>0)rt(i,{code:V.unrecognized_keys,keys:o}),r.dirty()}else if(l==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let s of o){let p=i.data[s];c.push({key:{status:"valid",value:s},value:l._parse(new pe(i,p,i.path,s)),alwaysSet:s in i.data})}}if(i.common.async)return Promise.resolve().then(async()=>{let l=[];for(let s of c){let p=await s.key,d=await s.value;l.push({key:p,value:d,alwaysSet:s.alwaysSet})}return l}).then((l)=>Ht.mergeObjectSync(r,l));else return Ht.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return lt.errToObj,new Ot({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(e,r)=>{let i=this._def.errorMap?.(e,r).message??r.defaultError;if(e.code==="unrecognized_keys")return{message:lt.errToObj(t).message??i};return{message:i}}}:{}})}strip(){return new Ot({...this._def,unknownKeys:"strip"})}passthrough(){return new Ot({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ot({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ot({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ft.ZodObject})}setKey(t,e){return this.augment({[t]:e})}catchall(t){return new Ot({...this._def,catchall:t})}pick(t){let e={};for(let r of Bt.objectKeys(t))if(t[r]&&this.shape[r])e[r]=this.shape[r];return new Ot({...this._def,shape:()=>e})}omit(t){let e={};for(let r of Bt.objectKeys(this.shape))if(!t[r])e[r]=this.shape[r];return new Ot({...this._def,shape:()=>e})}deepPartial(){return Wr(this)}partial(t){let e={};for(let r of Bt.objectKeys(this.shape)){let i=this.shape[r];if(t&&!t[r])e[r]=i;else e[r]=i.optional()}return new Ot({...this._def,shape:()=>e})}required(t){let e={};for(let r of Bt.objectKeys(this.shape))if(t&&!t[r])e[r]=this.shape[r];else{let n=this.shape[r];while(n instanceof me)n=n._def.innerType;e[r]=n}return new Ot({...this._def,shape:()=>e})}keyof(){return Xm(Bt.objectKeys(this.shape))}}Ot.create=(t,e)=>new Ot({shape:()=>t,unknownKeys:"strip",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});Ot.strictCreate=(t,e)=>new Ot({shape:()=>t,unknownKeys:"strict",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});Ot.lazycreate=(t,e)=>new Ot({shape:t,unknownKeys:"strip",catchall:Fe.create(),typeName:ft.ZodObject,...vt(e)});class Ri extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=this._def.options;function i(n){for(let o of n)if(o.result.status==="valid")return o.result;for(let o of n)if(o.result.status==="dirty")return e.common.issues.push(...o.ctx.common.issues),o.result;let a=n.map((o)=>new ie(o.ctx.common.issues));return rt(e,{code:V.invalid_union,unionErrors:a}),ut}if(e.common.async)return Promise.all(r.map(async(n)=>{let a={...e,common:{...e.common,issues:[]},parent:null};return{result:await n._parseAsync({data:e.data,path:e.path,parent:a}),ctx:a}})).then(i);else{let n=void 0,a=[];for(let c of r){let l={...e,common:{...e.common,issues:[]},parent:null},s=c._parseSync({data:e.data,path:e.path,parent:l});if(s.status==="valid")return s;else if(s.status==="dirty"&&!n)n={result:s,ctx:l};if(l.common.issues.length)a.push(l.common.issues)}if(n)return e.common.issues.push(...n.ctx.common.issues),n.result;let o=a.map((c)=>new ie(c));return rt(e,{code:V.invalid_union,unionErrors:o}),ut}}get options(){return this._def.options}}Ri.create=(t,e)=>new Ri({options:t,typeName:ft.ZodUnion,...vt(e)});var Ae=(t)=>{if(t instanceof ji)return Ae(t.schema);else if(t instanceof ue)return Ae(t.innerType());else if(t instanceof $i)return[t.value];else if(t instanceof nr)return t.options;else if(t instanceof Xi)return Bt.objectValues(t.enum);else if(t instanceof Vi)return Ae(t._def.innerType);else if(t instanceof Ni)return[void 0];else if(t instanceof Wi)return[null];else if(t instanceof me)return[void 0,...Ae(t.unwrap())];else if(t instanceof De)return[null,...Ae(t.unwrap())];else if(t instanceof ec)return Ae(t.unwrap());else if(t instanceof Di)return Ae(t.unwrap());else if(t instanceof zi)return Ae(t._def.innerType);else return[]};class tc extends wt{_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.object)return rt(e,{code:V.invalid_type,expected:nt.object,received:e.parsedType}),ut;let r=this.discriminator,i=e.data[r],n=this.optionsMap.get(i);if(!n)return rt(e,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ut;if(e.common.async)return n._parseAsync({data:e.data,path:e.path,parent:e});else return n._parseSync({data:e.data,path:e.path,parent:e})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,e,r){let i=new Map;for(let n of e){let a=Ae(n.shape[t]);if(!a.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(o)}`);i.set(o,n)}}return new tc({typeName:ft.ZodDiscriminatedUnion,discriminator:t,options:e,optionsMap:i,...vt(r)})}}function qs(t,e){let r=we(t),i=we(e);if(t===e)return{valid:!0,data:t};else if(r===nt.object&&i===nt.object){let n=Bt.objectKeys(e),a=Bt.objectKeys(t).filter((c)=>n.indexOf(c)!==-1),o={...t,...e};for(let c of a){let l=qs(t[c],e[c]);if(!l.valid)return{valid:!1};o[c]=l.data}return{valid:!0,data:o}}else if(r===nt.array&&i===nt.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let a=0;a<t.length;a++){let o=t[a],c=e[a],l=qs(o,c);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else if(r===nt.date&&i===nt.date&&+t===+e)return{valid:!0,data:t};else return{valid:!1}}class Oi extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t),i=(n,a)=>{if(Zs(n)||Zs(a))return ut;let o=qs(n.value,a.value);if(!o.valid)return rt(r,{code:V.invalid_intersection_types}),ut;if(Ks(n)||Ks(a))e.dirty();return{status:e.value,value:o.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,a])=>i(n,a));else return i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Oi.create=(t,e,r)=>new Oi({left:t,right:e,typeName:ft.ZodIntersection,...vt(r)});class Pe extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.array)return rt(r,{code:V.invalid_type,expected:nt.array,received:r.parsedType}),ut;if(r.data.length<this._def.items.length)return rt(r,{code:V.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ut;if(!this._def.rest&&r.data.length>this._def.items.length)rt(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),e.dirty();let n=[...r.data].map((a,o)=>{let c=this._def.items[o]||this._def.rest;if(!c)return null;return c._parse(new pe(r,a,r.path,o))}).filter((a)=>!!a);if(r.common.async)return Promise.all(n).then((a)=>Ht.mergeArray(e,a));else return Ht.mergeArray(e,n)}get items(){return this._def.items}rest(t){return new Pe({...this._def,rest:t})}}Pe.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pe({items:t,typeName:ft.ZodTuple,rest:null,...vt(e)})};class En extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.object)return rt(r,{code:V.invalid_type,expected:nt.object,received:r.parsedType}),ut;let i=[],n=this._def.keyType,a=this._def.valueType;for(let o in r.data)i.push({key:n._parse(new pe(r,o,r.path,o)),value:a._parse(new pe(r,r.data[o],r.path,o)),alwaysSet:o in r.data});if(r.common.async)return Ht.mergeObjectAsync(e,i);else return Ht.mergeObjectSync(e,i)}get element(){return this._def.valueType}static create(t,e,r){if(e instanceof wt)return new En({keyType:t,valueType:e,typeName:ft.ZodRecord,...vt(r)});return new En({keyType:Be.create(),valueType:t,typeName:ft.ZodRecord,...vt(e)})}}class Tn extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.map)return rt(r,{code:V.invalid_type,expected:nt.map,received:r.parsedType}),ut;let i=this._def.keyType,n=this._def.valueType,a=[...r.data.entries()].map(([o,c],l)=>({key:i._parse(new pe(r,o,r.path,[l,"key"])),value:n._parse(new pe(r,c,r.path,[l,"value"]))}));if(r.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,s=await c.value;if(l.status==="aborted"||s.status==="aborted")return ut;if(l.status==="dirty"||s.status==="dirty")e.dirty();o.set(l.value,s.value)}return{status:e.value,value:o}})}else{let o=new Map;for(let c of a){let{key:l,value:s}=c;if(l.status==="aborted"||s.status==="aborted")return ut;if(l.status==="dirty"||s.status==="dirty")e.dirty();o.set(l.value,s.value)}return{status:e.value,value:o}}}}Tn.create=(t,e,r)=>new Tn({valueType:e,keyType:t,typeName:ft.ZodMap,...vt(r)});class jr extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==nt.set)return rt(r,{code:V.invalid_type,expected:nt.set,received:r.parsedType}),ut;let i=this._def;if(i.minSize!==null){if(r.data.size<i.minSize.value)rt(r,{code:V.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),e.dirty()}if(i.maxSize!==null){if(r.data.size>i.maxSize.value)rt(r,{code:V.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),e.dirty()}let n=this._def.valueType;function a(c){let l=new Set;for(let s of c){if(s.status==="aborted")return ut;if(s.status==="dirty")e.dirty();l.add(s.value)}return{status:e.value,value:l}}let o=[...r.data.values()].map((c,l)=>n._parse(new pe(r,c,r.path,l)));if(r.common.async)return Promise.all(o).then((c)=>a(c));else return a(o)}min(t,e){return new jr({...this._def,minSize:{value:t,message:lt.toString(e)}})}max(t,e){return new jr({...this._def,maxSize:{value:t,message:lt.toString(e)}})}size(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}jr.create=(t,e)=>new jr({valueType:t,minSize:null,maxSize:null,typeName:ft.ZodSet,...vt(e)});class Ei extends wt{constructor(){super(...arguments);this.validate=this.implement}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.function)return rt(e,{code:V.invalid_type,expected:nt.function,received:e.parsedType}),ut;function r(o,c){return Mn({data:o,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Yi(),ze].filter((l)=>!!l),issueData:{code:V.invalid_arguments,argumentsError:c}})}function i(o,c){return Mn({data:o,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Yi(),ze].filter((l)=>!!l),issueData:{code:V.invalid_return_type,returnTypeError:c}})}let n={errorMap:e.common.contextualErrorMap},a=e.data;if(this._def.returns instanceof $r){let o=this;return Kt(async function(...c){let l=new ie([]),s=await o._def.args.parseAsync(c,n).catch((m)=>{throw l.addIssue(r(c,m)),l}),p=await Reflect.apply(a,this,s);return await o._def.returns._def.type.parseAsync(p,n).catch((m)=>{throw l.addIssue(i(p,m)),l})})}else{let o=this;return Kt(function(...c){let l=o._def.args.safeParse(c,n);if(!l.success)throw new ie([r(c,l.error)]);let s=Reflect.apply(a,this,l.data),p=o._def.returns.safeParse(s,n);if(!p.success)throw new ie([i(s,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ei({...this._def,args:Pe.create(t).rest(ir.create())})}returns(t){return new Ei({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,e,r){return new Ei({args:t?t:Pe.create([]).rest(ir.create()),returns:e||ir.create(),typeName:ft.ZodFunction,...vt(r)})}}class ji extends wt{get schema(){return this._def.getter()}_parse(t){let{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}}ji.create=(t,e)=>new ji({getter:t,typeName:ft.ZodLazy,...vt(e)});class $i extends wt{_parse(t){if(t.data!==this._def.value){let e=this._getOrReturnCtx(t);return rt(e,{received:e.data,code:V.invalid_literal,expected:this._def.value}),ut}return{status:"valid",value:t.data}}get value(){return this._def.value}}$i.create=(t,e)=>new $i({value:t,typeName:ft.ZodLiteral,...vt(e)});function Xm(t,e){return new nr({values:t,typeName:ft.ZodEnum,...vt(e)})}class nr extends wt{_parse(t){if(typeof t.data!=="string"){let e=this._getOrReturnCtx(t),r=this._def.values;return rt(e,{expected:Bt.joinValues(r),received:e.parsedType,code:V.invalid_type}),ut}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(t.data)){let e=this._getOrReturnCtx(t),r=this._def.values;return rt(e,{received:e.data,code:V.invalid_enum_value,options:r}),ut}return Kt(t.data)}get options(){return this._def.values}get enum(){let t={};for(let e of this._def.values)t[e]=e;return t}get Values(){let t={};for(let e of this._def.values)t[e]=e;return t}get Enum(){let t={};for(let e of this._def.values)t[e]=e;return t}extract(t,e=this._def){return nr.create(t,{...this._def,...e})}exclude(t,e=this._def){return nr.create(this.options.filter((r)=>!t.includes(r)),{...this._def,...e})}}nr.create=Xm;class Xi extends wt{_parse(t){let e=Bt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==nt.string&&r.parsedType!==nt.number){let i=Bt.objectValues(e);return rt(r,{expected:Bt.joinValues(i),received:r.parsedType,code:V.invalid_type}),ut}if(!this._cache)this._cache=new Set(Bt.getValidEnumValues(this._def.values));if(!this._cache.has(t.data)){let i=Bt.objectValues(e);return rt(r,{received:r.data,code:V.invalid_enum_value,options:i}),ut}return Kt(t.data)}get enum(){return this._def.values}}Xi.create=(t,e)=>new Xi({values:t,typeName:ft.ZodNativeEnum,...vt(e)});class $r extends wt{unwrap(){return this._def.type}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==nt.promise&&e.common.async===!1)return rt(e,{code:V.invalid_type,expected:nt.promise,received:e.parsedType}),ut;let r=e.parsedType===nt.promise?e.data:Promise.resolve(e.data);return Kt(r.then((i)=>this._def.type.parseAsync(i,{path:e.path,errorMap:e.common.contextualErrorMap})))}}$r.create=(t,e)=>new $r({type:t,typeName:ft.ZodPromise,...vt(e)});class ue extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ft.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:e,ctx:r}=this._processInputParams(t),i=this._def.effect||null,n={addIssue:(a)=>{if(rt(r,a),a.fatal)e.abort();else e.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),i.type==="preprocess"){let a=i.transform(r.data,n);if(r.common.async)return Promise.resolve(a).then(async(o)=>{if(e.value==="aborted")return ut;let c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});if(c.status==="aborted")return ut;if(c.status==="dirty")return Nr(c.value);if(e.value==="dirty")return Nr(c.value);return c});else{if(e.value==="aborted")return ut;let o=this._def.schema._parseSync({data:a,path:r.path,parent:r});if(o.status==="aborted")return ut;if(o.status==="dirty")return Nr(o.value);if(e.value==="dirty")return Nr(o.value);return o}}if(i.type==="refinement"){let a=(o)=>{let c=i.refinement(o,n);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return ut;if(o.status==="dirty")e.dirty();return a(o.value),{status:e.value,value:o.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=>{if(o.status==="aborted")return ut;if(o.status==="dirty")e.dirty();return a(o.value).then(()=>({status:e.value,value:o.value}))})}if(i.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!rr(a))return ut;let o=i.transform(a.value,n);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((a)=>{if(!rr(a))return ut;return Promise.resolve(i.transform(a.value,n)).then((o)=>({status:e.value,value:o}))});Bt.assertNever(i)}}ue.create=(t,e,r)=>new ue({schema:t,typeName:ft.ZodEffects,effect:e,...vt(r)});ue.createWithPreprocess=(t,e,r)=>new ue({schema:e,effect:{type:"preprocess",transform:t},typeName:ft.ZodEffects,...vt(r)});class me extends wt{_parse(t){if(this._getType(t)===nt.undefined)return Kt(void 0);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}me.create=(t,e)=>new me({innerType:t,typeName:ft.ZodOptional,...vt(e)});class De extends wt{_parse(t){if(this._getType(t)===nt.null)return Kt(null);return this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}De.create=(t,e)=>new De({innerType:t,typeName:ft.ZodNullable,...vt(e)});class Vi extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;if(e.parsedType===nt.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}Vi.create=(t,e)=>new Vi({innerType:t,typeName:ft.ZodDefault,defaultValue:typeof e.default==="function"?e.default:()=>e.default,...vt(e)});class zi extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r={...e,common:{...e.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(Li(i))return i.then((n)=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ie(r.common.issues)},input:r.data})}));else return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ie(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}zi.create=(t,e)=>new zi({innerType:t,typeName:ft.ZodCatch,catchValue:typeof e.catch==="function"?e.catch:()=>e.catch,...vt(e)});class Nn extends wt{_parse(t){if(this._getType(t)!==nt.nan){let r=this._getOrReturnCtx(t);return rt(r,{code:V.invalid_type,expected:nt.nan,received:r.parsedType}),ut}return{status:"valid",value:t.data}}}Nn.create=(t)=>new Nn({typeName:ft.ZodNaN,...vt(t)});var VT=Symbol("zod_brand");class ec extends wt{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;return this._def.type._parse({data:r,path:e.path,parent:e})}unwrap(){return this._def.type}}class Wn extends wt{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return ut;if(n.status==="dirty")return e.dirty(),Nr(n.value);else return this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();else{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(i.status==="aborted")return ut;if(i.status==="dirty")return e.dirty(),{status:"dirty",value:i.value};else return this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,e){return new Wn({in:t,out:e,typeName:ft.ZodPipeline})}}class Di extends wt{_parse(t){let e=this._def.innerType._parse(t),r=(i)=>{if(rr(i))i.value=Object.freeze(i.value);return i};return Li(e)?e.then((i)=>r(i)):r(e)}unwrap(){return this._def.innerType}}Di.create=(t,e)=>new Di({innerType:t,typeName:ft.ZodReadonly,...vt(e)});var zT={object:Ot.lazycreate},ft;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ft||(ft={}));var h=Be.create,w=Rr.create,DT=Nn.create,UT=Or.create,L=kn.create,GT=Ti.create,QT=Cn.create,HT=Ni.create,ZT=Wi.create,Vm=Yn.create,zm=ir.create,KT=Fe.create,JT=Ln.create,H=de.create,{create:A,strictCreate:qT}=Ot,Et=Ri.create,Ui=tc.create,tN=Oi.create,t9=Pe.create,Rn=En.create,eN=Tn.create,rN=jr.create,iN=Ei.create,nN=ji.create,g=$i.create,gt=nr.create,oN=Xi.create,aN=$r.create,sN=ue.create,cN=me.create,lN=De.create,pN=ue.createWithPreprocess,hN=Wn.create;var On=h().or(w()).transform((t)=>qt(t,"Ω").value),nc=h().or(w()).transform((t)=>qt(t,"F").value).transform((t)=>Number.parseFloat(t.toPrecision(12))),Gm=h().or(w()).transform((t)=>qt(t,"H").value),Me=h().or(w()).transform((t)=>qt(t,"V").value),K=h().or(w()).transform((t)=>qt(t).value),or=h().or(w()).transform((t)=>qt(t,"Hz").value),C=K,Xr=h().or(w()).transform((t)=>qt(t,"A").value),Vr=h().or(w()).transform((t)=>qt(t).value),e9=Vr,Vt=Vr,Qm=h().datetime(),jt=h().or(w()).transform((t)=>{if(typeof t==="number")return t;if(t.endsWith("deg"))return Number.parseFloat(t.split("deg")[0]);if(t.endsWith("rad"))return Number.parseFloat(t.split("rad")[0])*180/Math.PI;return Number.parseFloat(t)}),Hm=w().or(h().endsWith("mAh")).transform((t)=>{if(typeof t==="string"){let e=t.replace("mAh",""),r=Number.parseFloat(e);if(Number.isNaN(r))throw Error("Invalid capacity");return r}return t}).describe("Battery capacity in mAh"),v=(t)=>{};v("extra props b");v("missing props b");v(!0);v("mismatched prop types: a");var ar=(t)=>{};ar(!0);ar('T1 has extra: "c", T2 has extra: "d"');ar('T1 has extra: "c"');ar('T2 has extra: "c"');ar('T1 has extra: "d", T2 has extra: "c"');ar(!0);var it=A({x:C,y:C}),r9=it;v(!0);v(!0);var Ie=A({x:C,y:C,z:C}),i9=Ie;v(!0);var oc=A({width:w(),height:w()});v(!0);var n9=(t)=>Array.from({length:t},()=>"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.floor(Math.random()*62)]).join(""),T=(t)=>h().optional().default(()=>`${t}_${n9(10)}`),ke=gt(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]);v(!0);var o9=gt(["top_silkscreen","bottom_silkscreen","top_copper","bottom_copper","top_soldermask","bottom_soldermask","top_fabrication_note","bottom_fabrication_note","top_user_note","bottom_user_note","top_courtyard","bottom_courtyard","inner1_copper","inner2_copper","inner3_copper","inner4_copper","inner5_copper","inner6_copper","edge_cuts","drill"]);v(!0);var ac=A({project_relative_path:h(),url:h(),mimetype:h()});v(!0);var jn=it.extend({rotation:jt.optional()});v(!0);var sc=A({size:it.optional(),thickness:C.optional()});v(!0);var Zm=A({font:sc.optional()});v(!0);var Gi=A({value:h(),at:jn.optional(),layer:h().optional(),uuid:h().optional(),hide:L().optional(),effects:Zm.optional()});v(!0);var Km=A({Reference:Gi.optional(),Value:Gi.optional(),Datasheet:Gi.optional(),Description:Gi.optional()});v(!0);var Jm=A({through_hole:L().optional(),smd:L().optional(),exclude_from_pos_files:L().optional(),exclude_from_bom:L().optional()});v(!0);var qm=A({name:h(),type:h(),shape:h().optional(),at:jn.optional(),size:it.optional(),drill:C.optional(),layers:H(h()).optional(),removeUnusedLayers:L().optional(),uuid:h().optional()});v(!0);var tu=A({path:h(),offset:Ie.optional(),scale:Ie.optional(),rotate:Ie.optional()});v(!0);var eu=A({footprintName:h().optional(),version:Et([w(),h()]).optional(),generator:h().optional(),generatorVersion:Et([w(),h()]).optional(),layer:h().optional(),properties:Km.optional(),attributes:Jm.optional(),pads:H(qm).optional(),embeddedFonts:L().optional(),model:tu.optional()});v(!0);var ru=A({hide:L().optional()});v(!0);var iu=A({offset:C.optional(),hide:L().optional()});v(!0);var nu=A({font:sc.optional(),justify:Et([h(),H(h())]).optional(),hide:L().optional()});v(!0);var Ue=A({value:h(),id:Et([w(),h()]).optional(),at:jn.optional(),effects:nu.optional()});v(!0);var ou=A({Reference:Ue.optional(),Value:Ue.optional(),Footprint:Ue.optional(),Datasheet:Ue.optional(),Description:Ue.optional(),ki_keywords:Ue.optional(),ki_fp_filters:Ue.optional()});v(!0);var au=A({symbolName:h().optional(),extends:h().optional(),pinNumbers:ru.optional(),pinNames:iu.optional(),excludeFromSim:L().optional(),inBom:L().optional(),onBoard:L().optional(),properties:ou.optional(),embeddedFonts:L().optional()});v(!0);var kt=A({error_type:h(),message:h(),is_fatal:L().optional()});v(!0);var cc=gt(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]);v(!0);var Yt=A({type:g("source_component"),ftype:h().optional(),source_component_id:h(),name:h(),manufacturer_part_number:h().optional(),supplier_part_numbers:Rn(cc,H(h())).optional(),display_value:h().optional(),display_name:h().optional(),are_pins_interchangeable:L().optional(),internally_connected_source_port_ids:H(H(h())).optional(),source_group_id:h().optional(),subcircuit_id:h().optional()});v(!0);var lc=Yt.extend({ftype:g("simple_capacitor"),capacitance:nc,max_voltage_rating:Me.optional(),display_capacitance:h().optional(),max_decoupling_trace_length:C.optional()});v(!0);var pc=Yt.extend({ftype:g("simple_resistor"),resistance:On,display_resistance:h().optional()});v(!0);var $n=Yt.extend({ftype:g("simple_diode")});v(!0);var su=Yt.extend({ftype:g("simple_fiducial")});v(!0);var hc=$n.extend({ftype:g("simple_led"),color:h().optional(),wavelength:h().optional()});v(!0);var cu=Yt.extend({ftype:g("simple_ground")});v(!0);var dc=Yt.extend({ftype:g("simple_chip")});v(!0);var mc=Yt.extend({ftype:g("simple_power_source"),voltage:Me});v(!0);var lu=Yt.extend({ftype:g("simple_current_source"),current:Xr,frequency:or.optional(),peak_to_peak_current:Xr.optional(),wave_shape:gt(["sine","square","triangle","sawtooth","dc"]).optional().default("dc"),phase:w().optional(),duty_cycle:w().min(0).max(1).optional()});v(!0);var pu=Yt.extend({ftype:g("simple_ammeter")});v(!0);var hu=A({must_be_connected:L().optional(),provides_power:L().optional(),requires_power:L().optional(),provides_ground:L().optional(),requires_ground:L().optional(),provides_voltage:Et([h(),w()]).optional(),requires_voltage:Et([h(),w()]).optional(),do_not_connect:L().optional(),include_in_board_pinout:L().optional(),can_use_internal_pullup:L().optional(),is_using_internal_pullup:L().optional(),needs_external_pullup:L().optional(),can_use_internal_pulldown:L().optional(),is_using_internal_pulldown:L().optional(),needs_external_pulldown:L().optional(),can_use_open_drain:L().optional(),is_using_open_drain:L().optional(),can_use_push_pull:L().optional(),is_using_push_pull:L().optional(),should_have_decoupling_capacitor:L().optional(),recommended_decoupling_capacitor_capacitance:Et([h(),w()]).optional(),is_configured_for_i2c_sda:L().optional(),is_configured_for_i2c_scl:L().optional(),is_configured_for_spi_mosi:L().optional(),is_configured_for_spi_miso:L().optional(),is_configured_for_spi_sck:L().optional(),is_configured_for_spi_cs:L().optional(),is_configured_for_uart_tx:L().optional(),is_configured_for_uart_rx:L().optional(),supports_i2c_sda:L().optional(),supports_i2c_scl:L().optional(),supports_spi_mosi:L().optional(),supports_spi_miso:L().optional(),supports_spi_sck:L().optional(),supports_spi_cs:L().optional(),supports_uart_tx:L().optional(),supports_uart_rx:L().optional()});v(!0);var a9=Yt.extend({ftype:g("simple_fuse"),current_rating_amps:w().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:w().describe("Voltage rating in volts, e.g. ±5V would be 5")});v(!0);var uc=Yt.extend({ftype:g("simple_battery"),capacity:Hm});v(!0);var yc=Yt.extend({ftype:g("simple_inductor"),inductance:Gm,display_inductance:h().optional(),max_current_rating:w().optional()});v(!0);var fc=Yt.extend({ftype:g("simple_push_button")});v(!0);var _c=Yt.extend({ftype:g("simple_potentiometer"),max_resistance:On,display_max_resistance:h().optional()});v(!0);var du=Yt.extend({ftype:g("simple_crystal"),frequency:w().describe("Frequency in Hz"),load_capacitance:w().optional().describe("Load capacitance in pF"),pin_variant:gt(["two_pin","four_pin"]).optional()});v(!0);var gc=Yt.extend({ftype:g("simple_pin_header"),pin_count:w(),gender:gt(["male","female"]).optional().default("male")});v(!0);var mu=Yt.extend({ftype:g("simple_connector"),standard:gt(["usb_c","m2"]).optional()});v(!0);var xc=Yt.extend({ftype:g("simple_pinout")});v(!0);var bc=Yt.extend({ftype:g("simple_resonator"),load_capacitance:nc,equivalent_series_resistance:On.optional(),frequency:or});v(!0);var vc=Yt.extend({ftype:g("simple_transistor"),transistor_type:gt(["npn","pnp"])});v(!0);var Sc=Yt.extend({ftype:g("simple_test_point"),footprint_variant:gt(["pad","through_hole"]).optional(),pad_shape:gt(["rect","circle"]).optional(),pad_diameter:Et([w(),h()]).optional(),hole_diameter:Et([w(),h()]).optional(),width:Et([w(),h()]).optional(),height:Et([w(),h()]).optional()});v(!0);var wc=Yt.extend({ftype:g("simple_mosfet"),channel_type:gt(["n","p"]),mosfet_mode:gt(["enhancement","depletion"])});v(!0);var Ac=Yt.extend({ftype:g("simple_op_amp")});v(!0);var Bc=Yt.extend({ftype:g("simple_switch")});v(!0);var Fc=A({type:g("source_project_metadata"),name:h().optional(),software_used_string:h().optional(),project_url:h().optional(),created_at:Qm.optional()});v(!0);var uu=kt.extend({type:g("source_missing_property_error"),source_missing_property_error_id:T("source_missing_property_error"),source_component_id:h(),property_name:h(),subcircuit_id:h().optional(),error_type:g("source_missing_property_error").default("source_missing_property_error")}).describe("The source code is missing a property");v(!0);var yu=kt.extend({type:g("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:T("source_failed_to_create_component_error"),error_type:g("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:h().optional(),subcircuit_id:h().optional(),parent_source_component_id:h().optional(),pcb_center:A({x:w().optional(),y:w().optional()}).optional(),schematic_center:A({x:w().optional(),y:w().optional()}).optional()}).describe("Error emitted when a component fails to be constructed");v(!0);var Pc=kt.extend({type:g("source_invalid_component_property_error"),source_invalid_component_property_error_id:T("source_invalid_component_property_error"),source_component_id:h(),property_name:h(),property_value:zm().optional(),expected_format:h().optional(),subcircuit_id:h().optional(),error_type:g("source_invalid_component_property_error").default("source_invalid_component_property_error")}).describe("The source component property is invalid");v(!0);var Ic=kt.extend({type:g("source_trace_not_connected_error"),source_trace_not_connected_error_id:T("source_trace_not_connected_error"),error_type:g("source_trace_not_connected_error").default("source_trace_not_connected_error"),subcircuit_id:h().optional(),source_group_id:h().optional(),source_trace_id:h().optional(),connected_source_port_ids:H(h()).optional(),selectors_not_found:H(h()).optional()}).describe("Occurs when a source trace selector does not match any ports");v(!0);var fu=A({type:g("source_property_ignored_warning"),source_property_ignored_warning_id:T("source_property_ignored_warning"),source_component_id:h(),property_name:h(),subcircuit_id:h().optional(),error_type:g("source_property_ignored_warning").default("source_property_ignored_warning"),message:h()}).describe("The source property was ignored");v(!0);var Mc=A({type:g("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:T("source_pin_missing_trace_warning"),warning_type:g("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:h(),source_component_id:h(),source_port_id:h(),subcircuit_id:h().optional()}).describe("Warning emitted when a source component pin is missing a trace connection");v(!0);var kc=A({type:g("source_missing_manufacturer_part_number_warning"),source_missing_manufacturer_part_number_warning_id:T("source_missing_manufacturer_part_number_warning"),warning_type:g("source_missing_manufacturer_part_number_warning").default("source_missing_manufacturer_part_number_warning"),message:h(),source_component_id:h(),standard:h(),subcircuit_id:h().optional()}).describe("Warning emitted when a standard connector is missing manufacturer part number");v(!0);var _u=Yt.extend({ftype:g("simple_voltage_probe")});v(!0);var gu=Yt.extend({ftype:g("interconnect")});v(!0);var Cc=kt.extend({type:g("source_i2c_misconfigured_error"),source_i2c_misconfigured_error_id:T("source_i2c_misconfigured_error"),error_type:g("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),source_port_ids:H(h())}).describe("Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net");v(!0);var Yc=kt.extend({type:g("source_component_misconfigured_error"),source_component_misconfigured_error_id:T("source_component_misconfigured_error"),error_type:g("source_component_misconfigured_error").default("source_component_misconfigured_error"),source_component_ids:H(h()),source_port_ids:H(h()).optional()}).describe("Error emitted when one or more source components have an invalid or conflicting configuration");v(!0);var xu=Yt.extend({ftype:g("simple_voltage_source"),voltage:Me,frequency:or.optional(),peak_to_peak_voltage:Me.optional(),wave_shape:gt(["sinewave","square","triangle","sawtooth"]).optional(),phase:jt.optional(),duty_cycle:w().optional().describe("Duty cycle as a fraction (0 to 1)"),pulse_delay:Vt.optional(),rise_time:Vt.optional(),fall_time:Vt.optional(),pulse_width:Vt.optional(),period:Vt.optional()});v(!0);var bu=Et([pc,lc,$n,su,hc,cu,dc,mc,lu,pu,uc,yc,fc,_c,du,gc,mu,xc,bc,Bc,vc,Sc,wc,Ac,a9,_u,gu,xu,Fc,uu,Pc,yu,Ic,fu,Mc,kc,Cc,Yc]);v(!0);var vu=A({type:g("source_port"),pin_number:w().optional(),port_hints:H(h()).optional(),name:h(),source_port_id:h(),source_component_id:h().optional(),source_group_id:h().optional(),most_frequently_referenced_by_name:h().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()}).merge(hu);v(!0);var Su=A({type:g("source_component_internal_connection"),source_component_internal_connection_id:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()});v(!0);var wu=A({type:g("source_trace"),source_trace_id:h(),connected_source_port_ids:H(h()),connected_source_net_ids:H(h()),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),max_length:w().optional(),name:h().optional(),min_trace_thickness:w().optional(),display_name:h().optional()});v(!0);var Au=A({type:g("source_group"),source_group_id:h(),subcircuit_id:h().optional(),parent_subcircuit_id:h().optional(),parent_source_group_id:h().optional(),is_subcircuit:L().optional(),show_as_schematic_box:L().optional(),name:h().optional(),was_automatically_named:L().optional()});v(!0);var Bu=A({type:g("source_net"),source_net_id:h(),name:h(),member_source_group_ids:H(h()),is_power:L().optional(),is_ground:L().optional(),is_digital_signal:L().optional(),is_analog_signal:L().optional(),is_positive_voltage_source:L().optional(),trace_width:w().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()});v(!0);var Fu=A({type:g("source_board"),source_board_id:h(),source_group_id:h(),title:h().optional()}).describe("Defines a board in the source domain");v(!0);var Pu=kt.extend({type:g("source_ambiguous_port_reference"),source_ambiguous_port_reference_id:T("source_ambiguous_port_reference"),error_type:g("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),source_port_id:h().optional(),source_component_id:h().optional()}).describe("Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous");v(!0);var Iu=A({type:g("source_pcb_ground_plane"),source_pcb_ground_plane_id:h(),source_group_id:h(),source_net_id:h(),subcircuit_id:h().optional()}).describe("Defines a ground plane in the source domain");v(!0);var Mu=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],rc=gt(Mu),St=rc.or(A({name:rc})).transform((t)=>{if(typeof t==="string")return t;return t.name});v(!0);var zt=gt(["top","bottom"]),ku=A({type:g("source_manually_placed_via"),source_manually_placed_via_id:h(),source_group_id:h(),source_net_id:h(),subcircuit_id:h().optional(),source_trace_id:h().optional()}).describe("Defines a via that is manually placed in the source domain");v(!0);var Cu=A({type:g("source_unnamed_trace_warning"),source_unnamed_trace_warning_id:T("source_unnamed_trace_warning"),warning_type:g("source_unnamed_trace_warning").default("source_unnamed_trace_warning"),message:h(),source_trace_id:h(),subcircuit_id:h().optional()}).describe("Warning emitted when a source trace is missing a name");v(!0);var Yu=A({type:g("source_no_power_pin_defined_warning"),source_no_power_pin_defined_warning_id:T("source_no_power_pin_defined_warning"),warning_type:g("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Warning emitted when a chip has no source ports with requires_power=true");v(!0);var Lu=A({type:g("source_no_ground_pin_defined_warning"),source_no_ground_pin_defined_warning_id:T("source_no_ground_pin_defined_warning"),warning_type:g("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Warning emitted when a chip has no source ports marked as ground pins");v(!0);var Eu=A({type:g("source_component_pins_underspecified_warning"),source_component_pins_underspecified_warning_id:T("source_component_pins_underspecified_warning"),warning_type:g("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),message:h(),source_component_id:h(),source_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Warning emitted when all ports on a source component are underspecified");v(!0);var Tu=kt.extend({type:g("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:T("source_pin_must_be_connected_error"),error_type:g("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),source_component_id:h(),source_port_id:h(),subcircuit_id:h().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace");v(!0);var Nu=kt.extend({type:g("unknown_error_finding_part"),unknown_error_finding_part_id:T("unknown_error_finding_part"),error_type:g("unknown_error_finding_part").default("unknown_error_finding_part"),source_component_id:h().optional(),subcircuit_id:h().optional()}).describe("Error emitted when an unexpected error occurs while finding a part");v(!0);var Wu=A({type:g("schematic_box"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),width:C,height:C,is_dashed:L().default(!1),x:C,y:C,subcircuit_id:h().optional()}).describe("Draws a box on the schematic");v(!0);var Ru=A({type:g("schematic_path"),schematic_path_id:T("schematic_path"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),fill_color:h().optional(),is_filled:L().optional(),is_dashed:L().default(!1),stroke_width:C.nullable().optional(),stroke_color:h().optional(),dash_length:C.optional(),dash_gap:C.optional(),points:H(it),subcircuit_id:h().optional()});v(!0);var Ou=Rn(A({left_margin:K.optional(),right_margin:K.optional(),top_margin:K.optional(),bottom_margin:K.optional()})),ju=A({left_size:w(),right_size:w(),top_size:w().optional(),bottom_size:w().optional()});v(!0);var $u=A({left_side:A({pins:H(w()),direction:gt(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:A({pins:H(w()),direction:gt(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:A({pins:H(w()),direction:gt(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:A({pins:H(w()),direction:gt(["left-to-right","right-to-left"]).optional()}).optional()});v(!0);var Xu=Et([ju,$u]),Vu=A({type:g("schematic_component"),size:oc,center:it,source_component_id:h().optional(),schematic_component_id:h(),schematic_sheet_id:h().optional(),schematic_symbol_id:h().optional(),pin_spacing:K.optional(),pin_styles:Ou.optional(),box_width:K.optional(),symbol_name:h().optional(),port_arrangement:Xu.optional(),port_labels:Rn(h()).optional(),symbol_display_value:h().optional(),subcircuit_id:h().optional(),schematic_group_id:h().optional(),is_schematic_group:L().optional(),source_group_id:h().optional(),is_box_with_pins:L().optional().default(!0)});v(!0);var s9=A({kicad_symbol:au.optional()}).catchall(zm()),zu=A({type:g("schematic_symbol"),schematic_symbol_id:h(),name:h().optional(),metadata:s9.optional()}).describe("Defines a named schematic symbol that can be referenced by components.");v(!0);var Du=A({type:g("schematic_line"),schematic_line_id:T("schematic_line"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),x1:C,y1:C,x2:C,y2:C,stroke_width:C.nullable().optional(),color:h().default("#000000"),is_dashed:L().default(!1),dash_length:C.optional(),dash_gap:C.optional(),subcircuit_id:h().optional()}).describe("Draws a styled line on the schematic");v(!0);var Uu=A({type:g("schematic_rect"),schematic_rect_id:T("schematic_rect"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,width:C,height:C,rotation:jt.default(0),stroke_width:C.nullable().optional(),color:h().default("#000000"),is_filled:L().default(!1),fill_color:h().optional(),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe("Draws a styled rectangle on the schematic");v(!0);var Gu=A({type:g("schematic_circle"),schematic_circle_id:T("schematic_circle"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,radius:C,stroke_width:C.nullable().optional(),color:h().default("#000000"),is_filled:L().default(!1),fill_color:h().optional(),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe("Draws a styled circle on the schematic");v(!0);var Qu=A({type:g("schematic_arc"),schematic_arc_id:T("schematic_arc"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),center:it,radius:C,start_angle_degrees:jt,end_angle_degrees:jt,direction:gt(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:C.nullable().optional(),color:h().default("#000000"),is_dashed:L().default(!1),subcircuit_id:h().optional()}).describe("Draws a styled arc on the schematic");v(!0);var Hu=A({type:g("schematic_trace"),schematic_trace_id:h(),schematic_sheet_id:h().optional(),source_trace_id:h().optional(),junctions:H(A({x:w(),y:w()})),edges:H(A({from:A({x:w(),y:w()}),to:A({x:w(),y:w()}),is_crossing:L().optional(),from_schematic_port_id:h().optional(),to_schematic_port_id:h().optional()})),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional()});v(!0);var c9=gt(["center","left","right","top","bottom"]);v(!0);var Zu=A({type:g("schematic_text"),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),schematic_symbol_id:h().optional(),schematic_text_id:h(),text:h(),font_size:w().default(0.18),position:A({x:C,y:C}),rotation:w().default(0),anchor:Et([c9.describe("legacy"),ke]).default("center"),color:h().default("#000000"),subcircuit_id:h().optional()});v(!0);var Ku=A({type:g("schematic_port"),schematic_port_id:h(),source_port_id:h(),schematic_sheet_id:h().optional(),schematic_component_id:h().optional(),center:it,facing_direction:gt(["up","down","left","right"]).optional(),distance_from_component_edge:w().optional(),side_of_component:gt(["top","bottom","left","right"]).optional(),true_ccw_index:w().optional(),pin_number:w().optional(),display_pin_label:h().optional(),subcircuit_id:h().optional(),is_connected:L().optional(),has_input_arrow:L().optional(),has_output_arrow:L().optional(),is_drawn_with_inversion_circle:L().optional()}).describe("Defines a port on a schematic component");v(!0);var Ju=A({type:g("schematic_net_label"),schematic_net_label_id:T("schematic_net_label"),schematic_sheet_id:h().optional(),schematic_trace_id:h().optional(),source_trace_id:h().optional(),source_net_id:h(),center:it,anchor_position:it.optional(),anchor_side:gt(["top","bottom","left","right"]),text:h(),symbol_name:h().optional(),is_movable:L().optional(),subcircuit_id:h().optional()});v(!0);var qu=kt.extend({type:g("schematic_error"),schematic_error_id:h(),error_type:g("schematic_port_not_found").default("schematic_port_not_found"),subcircuit_id:h().optional()}).describe("Defines a schematic error on the schematic");v(!0);var ty=kt.extend({type:g("schematic_layout_error"),schematic_layout_error_id:T("schematic_layout_error"),error_type:g("schematic_layout_error").default("schematic_layout_error"),source_group_id:h(),schematic_group_id:h(),subcircuit_id:h().optional()}).describe("Error emitted when schematic layout fails for a group");v(!0);var Xn=A({type:g("schematic_debug_object"),label:h().optional(),subcircuit_id:h().optional()}),ey=Xn.extend({shape:g("rect"),center:it,size:oc}),ry=Xn.extend({shape:g("line"),start:it,end:it}),iy=Xn.extend({shape:g("point"),center:it}),ny=Ui("shape",[ey,ry,iy]);v(!0);var oy=A({type:g("schematic_voltage_probe"),schematic_voltage_probe_id:h(),schematic_sheet_id:h().optional(),source_component_id:h().optional(),name:h().optional(),position:it,schematic_trace_id:h(),voltage:Me.optional(),subcircuit_id:h().optional(),color:h().optional(),label_alignment:ke.optional()}).describe("Defines a voltage probe measurement point on a schematic trace");v(!0);var ay=A({type:g("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:T("schematic_manual_edit_conflict_warning"),warning_type:g("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:h(),schematic_component_id:h(),schematic_group_id:h().optional(),subcircuit_id:h().optional(),source_component_id:h()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates");v(!0);var sy=A({type:g("schematic_group"),schematic_group_id:T("schematic_group"),schematic_sheet_id:h().optional(),source_group_id:h(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),width:K,height:K,center:it,schematic_component_ids:H(h()),show_as_schematic_box:L().optional(),name:h().optional(),description:h().optional()}).describe("Defines a group of components on the schematic");v(!0);var cy=A({type:g("schematic_table"),schematic_table_id:T("schematic_table"),schematic_sheet_id:h().optional(),anchor_position:it,column_widths:H(C),row_heights:H(C),cell_padding:C.optional(),border_width:C.optional(),subcircuit_id:h().optional(),schematic_component_id:h().optional(),anchor:ke.optional()}).describe("Defines a table on the schematic");v(!0);var ly=A({type:g("schematic_table_cell"),schematic_table_cell_id:T("schematic_table_cell"),schematic_sheet_id:h().optional(),schematic_table_id:h(),start_row_index:w(),end_row_index:w(),start_column_index:w(),end_column_index:w(),text:h().optional(),center:it,width:C,height:C,horizontal_align:gt(["left","center","right"]).optional(),vertical_align:gt(["top","middle","bottom"]).optional(),font_size:C.optional(),subcircuit_id:h().optional()}).describe("Defines a cell within a schematic_table");v(!0);var py=A({type:g("schematic_sheet"),schematic_sheet_id:T("schematic_sheet"),name:h().optional(),sheet_index:w().optional(),subcircuit_id:h().optional(),outline_color:h().optional()}).describe("Defines a schematic sheet or page that components can be placed on");v(!0);var hy=A({x:C,y:C,bulge:w().optional()});v(!0);var ic=A({vertices:H(hy)});v(!0);var Lc=A({outer_ring:ic,inner_rings:H(ic).default([])});v(!0);var dy=A({x:C,y:C,via:L().optional(),via_to_layer:St.optional()}),l9=H(dy);v(!0);v(!0);var my=A({x:C,y:C,via:L().optional(),to_layer:St.optional(),trace_width:C.optional()});v(!0);var uy=A({min_trace_width:K.optional(),min_board_edge_clearance:K.optional(),min_via_hole_edge_to_via_hole_edge_clearance:K.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:K.optional(),min_trace_to_pad_edge_clearance:K.optional(),min_pad_edge_to_pad_edge_clearance:K.optional(),min_same_net_trace_edge_to_trace_edge_clearance:K.optional(),min_different_net_trace_edge_to_trace_edge_clearance:K.optional(),min_via_edge_to_pad_edge_clearance:K.optional(),min_via_hole_diameter:K.optional(),min_via_pad_diameter:K.optional()}),yy=A({type:g("pcb_component"),pcb_component_id:T("pcb_component"),source_component_id:h(),center:it,layer:St,rotation:jt,display_offset_x:h().optional().describe("How to display the x offset for this part, usually corresponding with how the user specified it"),display_offset_y:h().optional().describe("How to display the y offset for this part, usually corresponding with how the user specified it"),width:K,height:K,do_not_place:L().optional(),is_allowed_to_be_off_board:L().optional(),subcircuit_id:h().optional(),pcb_group_id:h().optional(),position_mode:gt(["packed","relative_to_group_anchor","relative_to_another_component","none"]).optional(),anchor_position:it.optional(),anchor_alignment:ke.optional(),positioned_relative_to_pcb_group_id:h().optional(),positioned_relative_to_pcb_board_id:h().optional(),cable_insertion_center:it.optional(),insertion_direction:gt(["from_above","from_left","from_right","from_front","from_back"]).optional(),metadata:A({kicad_footprint:eu.optional()}).optional(),obstructs_within_bounds:L().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB");v(!0);var fy=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g("circle"),hole_diameter:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),p9=fy.describe("Defines a circular hole on the PCB");v(!0);var _y=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g("rect"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),h9=_y.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square.");v(!0);var gy=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:gt(["circle","square"]),hole_diameter:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),d9=gy.describe("Defines a circular or square hole on the PCB");v(!0);var xy=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g("oval"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),m9=xy.describe("Defines an oval hole on the PCB");v(!0);var by=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g("pill"),hole_width:w(),hole_height:w(),x:C,y:C,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),u9=by.describe("Defines a pill-shaped hole on the PCB");v(!0);var vy=A({type:g("pcb_hole"),pcb_hole_id:T("pcb_hole"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_component_id:h().optional(),hole_shape:g("rotated_pill"),hole_width:w(),hole_height:w(),x:C,y:C,ccw_rotation:jt,is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),y9=vy.describe("Defines a rotated pill-shaped hole on the PCB");v(!0);var Sy=gy.or(xy).or(by).or(vy).or(fy).or(_y),f9=A({type:g("pcb_plated_hole"),shape:g("circle"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),outer_diameter:w(),hole_diameter:w(),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional()}),_9=A({type:g("pcb_plated_hole"),shape:gt(["oval","pill"]),pcb_group_id:h().optional(),subcircuit_id:h().optional(),outer_width:w(),outer_height:w(),hole_width:w(),hole_height:w(),is_covered_with_solder_mask:L().optional(),x:C,y:C,ccw_rotation:jt,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional()}),g9=A({type:g("pcb_plated_hole"),shape:g("circular_hole_with_rect_pad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g("circle"),pad_shape:g("rect"),hole_diameter:w(),rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional(),rect_ccw_rotation:jt.optional()}),x9=A({type:g("pcb_plated_hole"),shape:g("pill_hole_with_rect_pad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g("pill"),pad_shape:g("rect"),hole_width:w(),hole_height:w(),rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional()}),b9=A({type:g("pcb_plated_hole"),shape:g("rotated_pill_hole_with_rect_pad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:g("rotated_pill"),pad_shape:g("rect"),hole_width:w(),hole_height:w(),hole_ccw_rotation:jt,rect_pad_width:w(),rect_pad_height:w(),rect_border_radius:w().optional(),rect_ccw_rotation:jt,hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional()}),v9=A({type:g("pcb_plated_hole"),shape:g("hole_with_polygon_pad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),hole_shape:gt(["circle","oval","pill","rotated_pill"]),hole_diameter:w().optional(),hole_width:w().optional(),hole_height:w().optional(),pad_outline:H(A({x:C,y:C})).min(3),hole_offset_x:C.default(0),hole_offset_y:C.default(0),is_covered_with_solder_mask:L().optional(),x:C,y:C,layers:H(St),port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),pcb_plated_hole_id:T("pcb_plated_hole"),soldermask_margin:w().optional(),ccw_rotation:jt.optional()}),wy=Et([f9,_9,g9,x9,b9,v9]);v(!0);v(!0);v(!0);v(!0);v(!0);v(!0);var Ay=A({type:g("pcb_port"),pcb_port_id:T("pcb_port"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),source_port_id:h(),pcb_component_id:h().optional(),x:C,y:C,layers:H(St),is_board_pinout:L().optional()}).describe("Defines a port on the PCB");v(!0);var S9=A({type:g("pcb_smtpad"),shape:g("circle"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,radius:w(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),w9=A({type:g("pcb_smtpad"),shape:g("rect"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),rect_border_radius:w().optional(),corner_radius:w().optional(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional(),soldermask_margin_left:w().optional(),soldermask_margin_top:w().optional(),soldermask_margin_right:w().optional(),soldermask_margin_bottom:w().optional()}),A9=A({type:g("pcb_smtpad"),shape:g("rotated_rect"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),rect_border_radius:w().optional(),corner_radius:w().optional(),ccw_rotation:jt,layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional(),soldermask_margin_left:w().optional(),soldermask_margin_top:w().optional(),soldermask_margin_right:w().optional(),soldermask_margin_bottom:w().optional()}),By=A({type:g("pcb_smtpad"),shape:g("pill"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),B9=A({type:g("pcb_smtpad"),shape:g("rotated_pill"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),ccw_rotation:jt,layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),F9=A({type:g("pcb_smtpad"),shape:g("polygon"),pcb_smtpad_id:T("pcb_smtpad"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),points:H(it),layer:St,port_hints:H(h()).optional(),pcb_component_id:h().optional(),pcb_port_id:h().optional(),is_covered_with_solder_mask:L().optional(),soldermask_margin:w().optional()}),Fy=Ui("shape",[S9,w9,A9,B9,By,F9]).describe("Defines an SMT pad on the PCB");v(!0);v(!0);v(!0);v(!0);v(!0);v(!0);var P9=A({type:g("pcb_solder_paste"),shape:g("circle"),pcb_solder_paste_id:T("pcb_solder_paste"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,radius:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),I9=A({type:g("pcb_solder_paste"),shape:g("rect"),pcb_solder_paste_id:T("pcb_solder_paste"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),M9=A({type:g("pcb_solder_paste"),shape:g("pill"),pcb_solder_paste_id:T("pcb_solder_paste"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),radius:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),k9=A({type:g("pcb_solder_paste"),shape:g("rotated_rect"),pcb_solder_paste_id:T("pcb_solder_paste"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),ccw_rotation:C,layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),C9=A({type:g("pcb_solder_paste"),shape:g("oval"),pcb_solder_paste_id:T("pcb_solder_paste"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),x:C,y:C,width:w(),height:w(),layer:St,pcb_component_id:h().optional(),pcb_smtpad_id:h().optional()}),Py=Et([P9,I9,M9,k9,C9]).describe("Defines solderpaste on the PCB");v(!0);v(!0);v(!0);v(!0);v(!0);var Iy=A({type:g("pcb_text"),pcb_text_id:T("pcb_text"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),text:h(),center:it,layer:St,width:K,height:K,lines:w(),align:gt(["bottom-left"])}).describe("Defines text on the PCB");v(!0);var My=A({route_type:g("wire"),x:C,y:C,width:C,copper_pour_id:h().optional(),is_inside_copper_pour:L().optional(),start_pcb_port_id:h().optional(),end_pcb_port_id:h().optional(),layer:St}),ky=A({route_type:g("via"),x:C,y:C,copper_pour_id:h().optional(),is_inside_copper_pour:L().optional(),hole_diameter:C.optional(),outer_diameter:C.optional(),from_layer:St,to_layer:St}),Cy=A({route_type:g("through_pad"),start:it,end:it,width:C,start_layer:St,end_layer:St,pcb_smtpad_id:h().optional(),pcb_plated_hole_id:h().optional()}),Yy=Et([My,ky,Cy]),Ly=A({type:g("pcb_trace"),source_trace_id:h().optional(),pcb_component_id:h().optional(),pcb_trace_id:T("pcb_trace"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),route_thickness_mode:gt(["constant","interpolated"]).default("constant").optional(),route_order_index:w().optional(),should_round_corners:L().optional(),trace_length:w().optional(),highlight_color:h().optional(),route:H(Yy)}).describe("Defines a trace on the PCB");v(!0);v(!0);var Ey=A({type:g("pcb_trace_warning"),pcb_trace_warning_id:T("pcb_trace_warning"),warning_type:g("pcb_trace_warning").default("pcb_trace_warning"),message:h(),center:it.optional(),pcb_trace_id:h(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Defines a trace warning on the PCB");v(!0);var Ty=kt.extend({type:g("pcb_trace_error"),pcb_trace_error_id:T("pcb_trace_error"),error_type:g("pcb_trace_error").default("pcb_trace_error"),center:it.optional(),pcb_trace_id:h(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Defines a trace error on the PCB");v(!0);var Ny=kt.extend({type:g("pcb_trace_missing_error"),pcb_trace_missing_error_id:T("pcb_trace_missing_error"),error_type:g("pcb_trace_missing_error").default("pcb_trace_missing_error"),center:it.optional(),source_trace_id:h(),pcb_component_ids:H(h()),pcb_port_ids:H(h()),subcircuit_id:h().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace");v(!0);var Wy=kt.extend({type:g("pcb_port_not_matched_error"),pcb_error_id:T("pcb_error"),error_type:g("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),pcb_component_ids:H(h()),subcircuit_id:h().optional()}).describe("Defines a trace error on the PCB where a port is not matched");v(!0);var Ry=kt.extend({type:g("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:T("pcb_port_not_connected_error"),error_type:g("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),pcb_port_ids:H(h()),pcb_component_ids:H(h()),subcircuit_id:h().optional()}).describe("Defines an error when a pcb port is not connected to any trace");v(!0);var Oy=A({type:g("pcb_net"),pcb_net_id:T("pcb_net"),source_net_id:h().optional(),highlight_color:h().optional()}).describe("Defines a net on the PCB");v(!0);var jy=A({type:g("pcb_via"),pcb_via_id:T("pcb_via"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),x:C,y:C,outer_diameter:C.default("0.6mm"),hole_diameter:C.default("0.25mm"),from_layer:St.optional(),to_layer:St.optional(),layers:H(St),pcb_trace_id:h().optional(),net_is_assignable:L().optional(),net_assigned:L().optional(),is_tented:L().optional()}).describe("Defines a via on the PCB");v(!0);var $y=A({type:g("pcb_board"),pcb_board_id:T("pcb_board"),pcb_panel_id:h().optional(),carrier_pcb_board_id:h().optional(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),is_mounted_to_carrier_board:L().optional(),width:K.optional(),height:K.optional(),center:it,display_offset_x:h().optional().describe("How to display the x offset for this board, usually corresponding with how the user specified it"),display_offset_y:h().optional().describe("How to display the y offset for this board, usually corresponding with how the user specified it"),thickness:K.optional().default(1.4),num_layers:w().optional().default(4),outline:H(it).optional(),shape:gt(["rect","polygon"]).optional(),material:gt(["fr4","fr1"]).default("fr4"),solder_mask_color:h().optional(),silkscreen_color:h().optional(),anchor_position:it.optional(),anchor_alignment:ke.optional(),position_mode:gt(["relative_to_panel_anchor","none"]).optional()}).merge(uy).describe("Defines the board outline of the PCB");v(!0);var Xy=A({type:g("pcb_panel"),pcb_panel_id:T("pcb_panel"),width:K,height:K,center:it,thickness:K.optional().default(1.4),covered_with_solder_mask:L().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards");v(!0);var Vy=kt.extend({type:g("pcb_placement_error"),pcb_placement_error_id:T("pcb_placement_error"),error_type:g("pcb_placement_error").default("pcb_placement_error"),subcircuit_id:h().optional()}).describe("Defines a placement error on the PCB");v(!0);var zy=kt.extend({type:g("pcb_panelization_placement_error"),pcb_panelization_placement_error_id:T("pcb_panelization_placement_error"),error_type:g("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),pcb_panel_id:h().optional(),pcb_board_id:h().optional(),subcircuit_id:h().optional()}).describe("Defines a panelization placement error on the PCB");v(!0);var Dy=A({type:g("pcb_trace_hint"),pcb_trace_hint_id:T("pcb_trace_hint"),pcb_port_id:h(),pcb_component_id:h(),route:H(my),subcircuit_id:h().optional()}).describe("A hint that can be used during generation of a PCB trace");v(!0);var Uy=A({type:g("pcb_silkscreen_line"),pcb_silkscreen_line_id:T("pcb_silkscreen_line"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),stroke_width:C.default("0.1mm"),x1:C,y1:C,x2:C,y2:C,layer:zt}).describe("Defines a silkscreen line on the PCB");v(!0);var Gy=A({type:g("pcb_silkscreen_path"),pcb_silkscreen_path_id:T("pcb_silkscreen_path"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,route:H(it),stroke_width:K}).describe("Defines a silkscreen path on the PCB");v(!0);var Qy=A({type:g("pcb_silkscreen_text"),pcb_silkscreen_text_id:T("pcb_silkscreen_text"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:C.default("0.2mm"),pcb_component_id:h(),text:h(),is_knockout:L().default(!1).optional(),knockout_padding:A({left:K,top:K,bottom:K,right:K}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:w().optional(),layer:St,is_mirrored:L().default(!1).optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:ke.default("center")}).describe("Defines silkscreen text on the PCB");v(!0);var Hy=A({type:g("pcb_copper_text"),pcb_copper_text_id:T("pcb_copper_text"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:C.default("0.2mm"),pcb_component_id:h(),text:h(),is_knockout:L().default(!1).optional(),knockout_padding:A({left:K,top:K,bottom:K,right:K}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:w().optional(),layer:St,is_mirrored:L().default(!1).optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:ke.default("center")}).describe("Defines copper text on the PCB");v(!0);var Zy=A({type:g("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:T("pcb_silkscreen_rect"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:St,stroke_width:K.default("1mm"),corner_radius:K.optional(),is_filled:L().default(!0).optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),ccw_rotation:w().optional()}).describe("Defines a silkscreen rect on the PCB");v(!0);var Ky=A({type:g("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:T("pcb_silkscreen_circle"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:K,layer:zt,stroke_width:K.default("1mm"),is_filled:L().optional()}).describe("Defines a silkscreen circle on the PCB");v(!0);var Jy=A({type:g("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:T("pcb_silkscreen_oval"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius_x:C,radius_y:C,layer:zt,ccw_rotation:jt.optional()}).describe("Defines a silkscreen oval on the PCB");v(!0);var Y9=A({type:g("pcb_silkscreen_graphic"),pcb_silkscreen_graphic_id:T("pcb_silkscreen_graphic"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,image_asset:ac.optional()}),qy=Y9.extend({shape:g("brep"),brep_shape:Lc}).describe("Defines a BRep silkscreen graphic on the PCB");v(!0);var tf=Ui("shape",[qy]).describe("Defines a silkscreen graphic on the PCB");v(!0);var ef=A({type:g("pcb_silkscreen_pill"),pcb_silkscreen_pill_id:T("pcb_silkscreen_pill"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:St,ccw_rotation:w().optional()}).describe("Defines a silkscreen pill on the PCB");v(!0);var rf=A({type:g("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:T("pcb_fabrication_note_text"),subcircuit_id:h().optional(),pcb_group_id:h().optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:C.default("1mm"),pcb_component_id:h(),text:h(),ccw_rotation:w().optional(),layer:zt,anchor_position:it.default({x:0,y:0}),anchor_alignment:gt(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:h().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators");v(!0);var nf=A({type:g("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:T("pcb_fabrication_note_path"),pcb_component_id:h(),subcircuit_id:h().optional(),layer:St,route:H(it),stroke_width:K,color:h().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers");v(!0);var of=A({type:g("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:T("pcb_fabrication_note_rect"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:zt,stroke_width:K.default("0.1mm"),corner_radius:K.optional(),is_filled:L().optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),color:h().optional()}).describe("Defines a fabrication note rectangle on the PCB");v(!0);var af=A({type:g("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:T("pcb_fabrication_note_dimension"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,from:it,to:it,text:h().optional(),text_ccw_rotation:w().optional(),offset:K.optional(),offset_distance:K.optional(),offset_direction:A({x:w(),y:w()}).optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:K.default("1mm"),color:h().optional(),arrow_size:K.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes");v(!0);var sf=A({type:g("pcb_note_text"),pcb_note_text_id:T("pcb_note_text"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:C.default("1mm"),text:h().optional(),anchor_position:it.default({x:0,y:0}),anchor_alignment:gt(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),layer:zt.default("top"),is_mirrored_from_top_view:L().optional(),color:h().optional()}).describe("Defines a documentation note in text on the PCB");v(!0);var cf=A({type:g("pcb_note_rect"),pcb_note_rect_id:T("pcb_note_rect"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),center:it,width:K,height:K,layer:zt.default("top"),stroke_width:K.default("0.1mm"),corner_radius:K.optional(),is_filled:L().optional(),has_stroke:L().optional(),is_stroke_dashed:L().optional(),color:h().optional()}).describe("Defines a rectangular documentation note on the PCB");v(!0);var lf=A({type:g("pcb_note_path"),pcb_note_path_id:T("pcb_note_path"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),route:H(it),layer:zt.default("top"),stroke_width:K.default("0.1mm"),color:h().optional()}).describe("Defines a polyline documentation note on the PCB");v(!0);var pf=A({type:g("pcb_note_line"),pcb_note_line_id:T("pcb_note_line"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),text:h().optional(),x1:C,y1:C,x2:C,y2:C,layer:zt.default("top"),stroke_width:C.default("0.1mm"),color:h().optional(),is_dashed:L().optional()}).describe("Defines a straight documentation note line on the PCB");v(!0);var hf=A({type:g("pcb_note_dimension"),pcb_note_dimension_id:T("pcb_note_dimension"),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),name:h().optional(),from:it,to:it,text:h().optional(),text_ccw_rotation:w().optional(),offset_distance:K.optional(),offset_direction:A({x:w(),y:w()}).optional(),font:g("tscircuit2024").default("tscircuit2024"),font_size:K.default("1mm"),layer:zt.default("top"),color:h().optional(),arrow_size:K.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes");v(!0);var df=kt.extend({type:g("pcb_footprint_overlap_error"),pcb_error_id:T("pcb_error"),error_type:g("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),pcb_smtpad_ids:H(h()).optional(),pcb_plated_hole_ids:H(h()).optional(),pcb_hole_ids:H(h()).optional(),pcb_keepout_ids:H(h()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element");v(!0);var mf=kt.extend({type:g("pcb_courtyard_overlap_error"),pcb_error_id:T("pcb_error"),error_type:g("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),pcb_component_ids:t9([h(),h()])}).describe("Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another");v(!0);var uf=A({type:g("pcb_keepout"),shape:g("rect"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:C,height:C,pcb_keepout_id:h(),layers:H(h()),description:h().optional()}).or(A({type:g("pcb_keepout"),shape:g("circle"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:C,pcb_keepout_id:h(),layers:H(h()),description:h().optional()}));v(!0);var Vn=A({type:g("pcb_cutout"),pcb_cutout_id:T("pcb_cutout"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),pcb_board_id:h().optional(),pcb_panel_id:h().optional()}),yf=Vn.extend({shape:g("rect"),center:it,width:K,height:K,rotation:jt.optional(),corner_radius:K.optional()});v(!0);var ff=Vn.extend({shape:g("circle"),center:it,radius:K});v(!0);var _f=Vn.extend({shape:g("polygon"),points:H(it)});v(!0);var gf=Vn.extend({shape:g("path"),route:H(it),slot_width:K,slot_length:K.optional(),space_between_slots:K.optional(),slot_corner_radius:K.optional()});v(!0);var xf=Ui("shape",[yf,ff,_f,gf]).describe("Defines a cutout on the PCB, removing board material.");v(!0);var bf=kt.extend({type:g("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:T("pcb_missing_footprint_error"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),error_type:g("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:h()}).describe("Defines a missing footprint error on the PCB");v(!0);var vf=kt.extend({type:g("external_footprint_load_error"),external_footprint_load_error_id:T("external_footprint_load_error"),pcb_component_id:h(),source_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),footprinter_string:h().optional(),error_type:g("external_footprint_load_error").default("external_footprint_load_error")}).describe("Defines an error when an external footprint fails to load");v(!0);var Sf=kt.extend({type:g("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:T("circuit_json_footprint_load_error"),pcb_component_id:h(),source_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),error_type:g("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),circuit_json:H(Vm()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load");v(!0);var wf=A({type:g("pcb_group"),pcb_group_id:T("pcb_group"),source_group_id:h(),is_subcircuit:L().optional(),subcircuit_id:h().optional(),width:K.optional(),height:K.optional(),center:it,display_offset_x:h().optional().describe("How to display the x offset for this group, usually corresponding with how the user specified it"),display_offset_y:h().optional().describe("How to display the y offset for this group, usually corresponding with how the user specified it"),outline:H(it).optional(),anchor_position:it.optional(),anchor_alignment:ke.default("center"),position_mode:gt(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:h().optional(),positioned_relative_to_pcb_board_id:h().optional(),pcb_component_ids:H(h()),child_layout_mode:gt(["packed","none"]).optional(),name:h().optional(),description:h().optional(),layout_mode:h().optional(),autorouter_configuration:A({trace_clearance:K}).optional(),autorouter_used_string:h().optional()}).describe("Defines a group of components on the PCB");v(!0);var Af=kt.extend({type:g("pcb_autorouting_error"),pcb_error_id:T("pcb_autorouting_error"),error_type:g("pcb_autorouting_error").default("pcb_autorouting_error"),subcircuit_id:h().optional()}).describe("The autorouting has failed to route a portion of the board");v(!0);var Bf=A({type:g("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:T("pcb_manual_edit_conflict_warning"),warning_type:g("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:h(),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),source_component_id:h()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates");v(!0);var Dm=gt(["x-","x+","y+","y-"]),Ff=A({type:g("pcb_connector_not_in_accessible_orientation_warning"),pcb_connector_not_in_accessible_orientation_warning_id:T("pcb_connector_not_in_accessible_orientation_warning"),warning_type:g("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),message:h(),pcb_component_id:h(),source_component_id:h().optional(),pcb_board_id:h().optional(),facing_direction:Dm,recommended_facing_direction:Dm,subcircuit_id:h().optional()}).describe("Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction");v(!0);var Pf=A({type:g("supplier_footprint_mismatch_warning"),supplier_footprint_mismatch_warning_id:T("supplier_footprint_mismatch_warning"),warning_type:g("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),message:h(),source_component_id:h(),pcb_component_id:h().optional(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),supplier_name:cc.optional(),supplier_part_number:h().optional(),supplier_footprint_url:h().optional(),footprint_copper_intersection_over_union:w()}).describe("Warning emitted when a supplier part footprint does not match the expected footprint");v(!0);var If=A({type:g("pcb_breakout_point"),pcb_breakout_point_id:T("pcb_breakout_point"),pcb_group_id:h(),subcircuit_id:h().optional(),source_trace_id:h().optional(),source_port_id:h().optional(),source_net_id:h().optional(),x:C,y:C}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");v(!0);var Mf=A({type:g("pcb_ground_plane"),pcb_ground_plane_id:T("pcb_ground_plane"),source_pcb_ground_plane_id:h(),source_net_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional()}).describe("Defines a ground plane on the PCB");v(!0);var kf=A({type:g("pcb_ground_plane_region"),pcb_ground_plane_region_id:T("pcb_ground_plane_region"),pcb_ground_plane_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:St,points:H(it)}).describe("Defines a polygon region of a ground plane");v(!0);var Cf=A({type:g("pcb_thermal_spoke"),pcb_thermal_spoke_id:T("pcb_thermal_spoke"),pcb_ground_plane_id:h(),shape:h(),spoke_count:w(),spoke_thickness:C,spoke_inner_diameter:C,spoke_outer_diameter:C,pcb_plated_hole_id:h().optional(),subcircuit_id:h().optional()}).describe("Pattern for connecting a ground plane to a plated hole");v(!0);var Ec=A({type:g("pcb_copper_pour"),pcb_copper_pour_id:T("pcb_copper_pour"),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:St,source_net_id:h().optional(),covered_with_solder_mask:L().optional().default(!0)}),Yf=Ec.extend({shape:g("rect"),center:it,width:K,height:K,rotation:jt.optional()});v(!0);var Lf=Ec.extend({shape:g("brep"),brep_shape:Lc});v(!0);var Ef=Ec.extend({shape:g("polygon"),points:H(it)});v(!0);var Tf=Ui("shape",[Yf,Lf,Ef]).describe("Defines a copper pour on the PCB.");v(!0);var Nf=kt.extend({type:g("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:T("pcb_component_outside_board_error"),error_type:g("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),pcb_component_id:h(),pcb_board_id:h(),component_center:it,component_bounds:A({min_x:w(),max_x:w(),min_y:w(),max_y:w()}),subcircuit_id:h().optional(),source_component_id:h().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries");v(!0);var Wf=kt.extend({type:g("pcb_component_not_on_board_edge_error"),pcb_component_not_on_board_edge_error_id:T("pcb_component_not_on_board_edge_error"),error_type:g("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),pcb_component_id:h(),pcb_board_id:h(),component_center:it,pad_to_nearest_board_edge_distance:w(),source_component_id:h().optional(),subcircuit_id:h().optional()}).describe("Error emitted when a component that must be placed on the board edge is centered away from the edge");v(!0);var Rf=kt.extend({type:g("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:T("pcb_component_invalid_layer_error"),error_type:g("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),pcb_component_id:h().optional(),source_component_id:h(),layer:St,subcircuit_id:h().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)");v(!0);var Of=kt.extend({type:g("pcb_via_clearance_error"),pcb_error_id:T("pcb_error"),error_type:g("pcb_via_clearance_error").default("pcb_via_clearance_error"),pcb_via_ids:H(h()).min(2),minimum_clearance:C.optional(),actual_clearance:C.optional(),pcb_center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe("Error emitted when vias are closer than the allowed clearance");v(!0);var jf=kt.extend({type:g("pcb_via_trace_clearance_error"),pcb_via_trace_clearance_error_id:T("pcb_via_trace_clearance_error"),error_type:g("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),pcb_via_id:h(),pcb_trace_id:h(),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe("Error emitted when a via and trace are closer than the allowed clearance");v(!0);var $f=kt.extend({type:g("pcb_pad_pad_clearance_error"),pcb_pad_pad_clearance_error_id:T("pcb_pad_pad_clearance_error"),error_type:g("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),pcb_pad_ids:H(h()).min(2),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe("Error emitted when pads are closer than the allowed clearance");v(!0);var Xf=kt.extend({type:g("pcb_pad_trace_clearance_error"),pcb_pad_trace_clearance_error_id:T("pcb_pad_trace_clearance_error"),error_type:g("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),pcb_pad_id:h(),pcb_trace_id:h(),minimum_clearance:C.optional(),actual_clearance:C.optional(),center:A({x:w().optional(),y:w().optional()}).optional(),subcircuit_id:h().optional()}).describe("Error emitted when a pad and trace are closer than allowed clearance");v(!0);var Vf=A({type:g("pcb_courtyard_rect"),pcb_courtyard_rect_id:T("pcb_courtyard_rect"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,layer:zt,ccw_rotation:jt.optional(),color:h().optional()}).describe("Defines a courtyard rectangle on the PCB");v(!0);var zf=A({type:g("pcb_courtyard_outline"),pcb_courtyard_outline_id:T("pcb_courtyard_outline"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,outline:H(it).min(2)}).describe("Defines a courtyard outline on the PCB");v(!0);var Df=A({type:g("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:T("pcb_courtyard_polygon"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),layer:zt,points:H(it).min(3),color:h().optional()}).describe("Defines a courtyard polygon on the PCB");v(!0);var Uf=A({type:g("pcb_courtyard_circle"),pcb_courtyard_circle_id:T("pcb_courtyard_circle"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,radius:K,layer:zt,color:h().optional()}).describe("Defines a courtyard circle on the PCB");v(!0);var Gf=A({type:g("pcb_courtyard_pill"),pcb_courtyard_pill_id:T("pcb_courtyard_pill"),pcb_component_id:h(),pcb_group_id:h().optional(),subcircuit_id:h().optional(),center:it,width:K,height:K,radius:K,layer:zt,color:h().optional()}).describe("Defines a courtyard pill on the PCB");v(!0);var L9=["obj","stl","3mf","gltf","glb","step","wrl"],Qf=["x+","x-","y+","y-","z+","z-"],E9={obj:"z+",stl:"z+","3mf":"z+",gltf:"y+",glb:"y+",step:"z+",wrl:"y+"},Hf=A({type:g("cad_component"),cad_component_id:h(),pcb_component_id:h(),source_component_id:h(),position:Ie,rotation:Ie.optional(),size:Ie.optional(),layer:St.optional(),subcircuit_id:h().optional(),footprinter_string:h().optional(),model_obj_url:h().optional(),model_stl_url:h().optional(),model_3mf_url:h().optional(),model_gltf_url:h().optional(),model_glb_url:h().optional(),model_step_url:h().optional(),model_wrl_url:h().optional(),model_asset:ac.optional(),model_unit_to_mm_scale_factor:w().optional(),model_board_normal_direction:gt(Qf).optional().describe(`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`),model_origin_position:Ie.optional(),model_origin_alignment:gt(["unknown","center","center_of_component_on_board_surface","bottom_center_of_component"]).optional(),model_object_fit:gt(["contain_within_bounds","fill_bounds"]).optional().default("contain_within_bounds"),model_jscad:Vm().optional(),show_as_translucent_model:L().optional(),show_as_bounding_box:L().optional(),anchor_alignment:gt(["center","center_of_component_on_board_surface"]).optional().default("center")}).describe("Defines a component on the PCB");v(!0);var Tc=gt(["sinewave","square","triangle","sawtooth"]),T9=Et([h(),w()]).transform((t)=>{if(typeof t==="string"){if(t.endsWith("%"))return parseFloat(t.slice(0,-1))/100;return parseFloat(t)}return t}).pipe(w().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),Zf=A({type:g("simulation_voltage_source"),simulation_voltage_source_id:T("simulation_voltage_source"),is_dc_source:g(!0).optional().default(!0),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),voltage:Me}).describe("Defines a DC voltage source for simulation"),Kf=A({type:g("simulation_voltage_source"),simulation_voltage_source_id:T("simulation_voltage_source"),is_dc_source:g(!1),terminal1_source_port_id:h().optional(),terminal2_source_port_id:h().optional(),terminal1_source_net_id:h().optional(),terminal2_source_net_id:h().optional(),voltage:Me.optional(),frequency:or.optional(),peak_to_peak_voltage:Me.optional(),wave_shape:Tc.optional(),phase:jt.optional(),duty_cycle:T9.optional(),pulse_delay:Vt.optional(),rise_time:Vt.optional(),fall_time:Vt.optional(),pulse_width:Vt.optional(),period:Vt.optional()}).describe("Defines an AC voltage source for simulation"),Jf=Et([Zf,Kf]).describe("Defines a voltage source for simulation");v(!0);v(!0);v(!0);var N9=Et([h(),w()]).transform((t)=>{if(typeof t==="string"){if(t.endsWith("%"))return parseFloat(t.slice(0,-1))/100;return parseFloat(t)}return t}).pipe(w().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),qf=A({type:g("simulation_current_source"),simulation_current_source_id:T("simulation_current_source"),is_dc_source:g(!0).optional().default(!0),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),current:Xr}).describe("Defines a DC current source for simulation"),t0=A({type:g("simulation_current_source"),simulation_current_source_id:T("simulation_current_source"),is_dc_source:g(!1),terminal1_source_port_id:h().optional(),terminal2_source_port_id:h().optional(),terminal1_source_net_id:h().optional(),terminal2_source_net_id:h().optional(),current:Xr.optional(),frequency:or.optional(),peak_to_peak_current:Xr.optional(),wave_shape:Tc.optional(),phase:jt.optional(),duty_cycle:N9.optional()}).describe("Defines an AC current source for simulation"),e0=Et([qf,t0]).describe("Defines a current source for simulation");v(!0);v(!0);v(!0);var r0=Et([g("spice_dc_sweep"),g("spice_dc_operating_point"),g("spice_transient_analysis"),g("spice_ac_analysis")]),i0=A({method:gt(["trap","gear"]).optional(),reltol:Et([w(),h()]).optional(),abstol:Et([w(),h()]).optional(),vntol:Et([w(),h()]).optional()}).describe("SPICE solver options for a simulation experiment"),n0=A({type:g("simulation_experiment"),simulation_experiment_id:T("simulation_experiment"),name:h(),experiment_type:r0,time_per_step:Vr.optional(),start_time_ms:Vt.optional(),end_time_ms:Vt.optional(),spice_options:i0.optional()}).describe("Defines a simulation experiment configuration");v(!0);var o0=A({type:g("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:T("simulation_transient_voltage_graph"),simulation_experiment_id:h(),timestamps_ms:H(w()).optional(),voltage_levels:H(w()),source_component_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),time_per_step:Vr,start_time_ms:Vt,end_time_ms:Vt,name:h().optional(),color:h().optional()}).describe("Stores voltage measurements over time for a simulation");v(!0);var a0=A({type:g("simulation_transient_current_graph"),simulation_transient_current_graph_id:T("simulation_transient_current_graph"),simulation_experiment_id:h(),timestamps_ms:H(w()).optional(),current_levels:H(w()),source_component_id:h().optional(),subcircuit_connectivity_map_key:h().optional(),time_per_step:Vr,start_time_ms:Vt,end_time_ms:Vt,name:h().optional(),color:h().optional()}).describe("Stores current measurements over time for a simulation");v(!0);var s0=A({type:g("simulation_switch"),simulation_switch_id:T("simulation_switch"),source_component_id:h().optional(),closes_at:Vt.optional(),opens_at:Vt.optional(),starts_closed:L().optional(),switching_frequency:or.optional()}).describe("Defines a switch for simulation timing control");v(!0);var c0=A({type:g("simulation_voltage_probe"),simulation_voltage_probe_id:T("simulation_voltage_probe"),source_component_id:h().optional(),name:h().optional(),signal_input_source_port_id:h().optional(),signal_input_source_net_id:h().optional(),reference_input_source_port_id:h().optional(),reference_input_source_net_id:h().optional(),subcircuit_id:h().optional(),color:h().optional()}).describe("Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.").superRefine((t,e)=>{if(t.reference_input_source_port_id||t.reference_input_source_net_id){let i=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,n=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;if(i&&n)e.addIssue({code:V.custom,message:"Cannot mix port and net connections in a differential probe."});else if(i){if(!t.signal_input_source_port_id||!t.reference_input_source_port_id)e.addIssue({code:V.custom,message:"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."})}else if(n){if(!t.signal_input_source_net_id||!t.reference_input_source_net_id)e.addIssue({code:V.custom,message:"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."})}}else if(!!t.signal_input_source_port_id===!!t.signal_input_source_net_id)e.addIssue({code:V.custom,message:"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."})});v(!0);var l0=A({type:g("simulation_current_probe"),simulation_current_probe_id:T("simulation_current_probe"),source_component_id:h().optional(),name:h().optional(),positive_source_port_id:h().optional(),negative_source_port_id:h().optional(),positive_source_net_id:h().optional(),negative_source_net_id:h().optional(),subcircuit_id:h().optional(),color:h().optional()}).describe("Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.").superRefine((t,e)=>{let r=!!t.positive_source_port_id,i=!!t.negative_source_port_id,n=!!t.positive_source_net_id,a=!!t.negative_source_net_id,o=r||i,c=n||a;if(o&&c){e.addIssue({code:V.custom,message:"Cannot mix port and net connections in a current probe."});return}if(o){if(!r||!i)e.addIssue({code:V.custom,message:"Current probe using source ports requires both positive_source_port_id and negative_source_port_id."});return}if(c){if(!n||!a)e.addIssue({code:V.custom,message:"Current probe using source nets requires both positive_source_net_id and negative_source_net_id."});return}e.addIssue({code:V.custom,message:"A current probe must have either positive/negative source port ids or positive/negative source net ids."})});v(!0);var p0=kt.extend({type:g("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:T("simulation_unknown_experiment_error"),error_type:g("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),simulation_experiment_id:h().optional(),subcircuit_id:h().optional()}).describe("An unknown error occurred during the simulation experiment.");v(!0);var h0=A({type:g("simulation_op_amp"),simulation_op_amp_id:T("simulation_op_amp"),source_component_id:h().optional(),inverting_input_source_port_id:h(),non_inverting_input_source_port_id:h(),output_source_port_id:h(),positive_supply_source_port_id:h(),negative_supply_source_port_id:h()}).describe("Defines a simple ideal operational amplifier for simulation");v(!0);var d0=A({type:g("simulation_spice_subcircuit"),simulation_spice_subcircuit_id:T("simulation_spice_subcircuit"),source_component_id:h(),spice_pin_to_source_port_map:Rn(h(),h()),subcircuit_source:h()}).describe("Defines a custom SPICE subcircuit model for simulation");v(!0);var Um=(t)=>t!==void 0,m0=A({type:g("simulation_oscilloscope_trace"),simulation_oscilloscope_trace_id:T("simulation_oscilloscope_trace"),simulation_transient_voltage_graph_id:h().optional(),simulation_transient_current_graph_id:h().optional(),simulation_voltage_probe_id:h().optional(),simulation_current_probe_id:h().optional(),display_name:h().optional(),color:h().optional(),display_center_value:w().optional(),display_center_offset_divs:w().optional(),volts_per_div:w().positive().optional(),amps_per_div:w().positive().optional()}).describe("Defines how a simulation measurement is rendered as an oscilloscope-style trace.").superRefine((t,e)=>{let r=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(Um).length,i=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(Um).length;if(r+i!==1)e.addIssue({code:V.custom,message:"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."});if(r>0&&t.amps_per_div!==void 0)e.addIssue({code:V.custom,message:"Voltage oscilloscope traces must use volts_per_div, not amps_per_div."});if(i>0&&t.volts_per_div!==void 0)e.addIssue({code:V.custom,message:"Current oscilloscope traces must use amps_per_div, not volts_per_div."})});v(!0);var u0=Et([wu,vu,Su,bu,Bu,Au,dc,lc,$n,hc,pc,mc,uc,yc,gc,xc,bc,Bc,vc,Sc,wc,Ac,_c,fc,Iu,ku,Fu,Fc,Pc,Ic,Mc,Cu,kc,Yu,Lu,Eu,Tu,Nu,Cc,Yc,Pu,yy,Sy,bf,vf,Sf,Bf,Ff,Pf,wy,uf,Ay,Oy,Iy,Ly,Ey,jy,Fy,Py,$y,Xy,wf,Dy,Uy,Gy,Qy,ef,Hy,Zy,Ky,Jy,tf,Ty,Ny,Vy,zy,Wy,Ry,Of,jf,$f,Xf,nf,rf,of,af,sf,cf,lf,pf,hf,Af,df,mf,If,xf,Mf,kf,Cf,Tf,Nf,Wf,Rf,Vf,zf,Df,Uf,Gf,Wu,Zu,Du,Uu,Gu,Qu,Vu,zu,Ku,Hu,Ru,qu,ty,Ju,ny,oy,ay,sy,py,cy,ly,Hf,Jf,e0,n0,o0,a0,s0,c0,l0,m0,p0,h0,d0]),zr=u0;v(!0);ar(!0);function P(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function y0(t){let{a:e,b:r,c:i,d:n,e:a,f:o}=t,c=e*n-r*i;return{a:n/c,b:r/-c,c:i/-c,d:e/c,e:(n*a-i*o)/-c,f:(r*a-e*o)/c}}function sr(t){return typeof t>"u"}function Lt(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Ge(...t){t=Array.isArray(t[0])?t[0]:t;let e=(r,i)=>({a:r.a*i.a+r.c*i.b,c:r.a*i.c+r.c*i.d,e:r.a*i.e+r.c*i.f+r.e,b:r.b*i.a+r.d*i.b,d:r.b*i.c+r.d*i.d,f:r.b*i.e+r.d*i.f+r.f});switch(t.length){case 0:throw Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[r,i,...n]=t,a=e(r,i);return Ge(a,...n)}}}function Ft(...t){return Ge(...t)}var{cos:W9,sin:R9,PI:UO}=Math;function ye(t,e,r){let i=W9(t),n=R9(t),a={a:i,c:-n,e:0,b:n,d:i,f:0};if(sr(e)||sr(r))return a;return Ge([Lt(e,r),a,Lt(-e,-r)])}function Jt(t,e=void 0,r=void 0,i=void 0){if(sr(e))e=t;let n={a:t,c:0,e:0,b:0,d:e,f:0};if(sr(r)||sr(i))return n;return Ge([Lt(r,i),n,Lt(-r,-i)])}var{tan:qO}=Math;function f0(t){return cr(t)}function cr(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function _0(t,e=10000000000){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function g0(t,e){let r=t[0].x!=null?t[0].x:t[0][0],i=t[0].y!=null?t[0].y:t[0][1],n=e[0].x!=null?e[0].x:e[0][0],a=e[0].y!=null?e[0].y:e[0][1],o=t[1].x!=null?t[1].x:t[1][0],c=t[1].y!=null?t[1].y:t[1][1],l=e[1].x!=null?e[1].x:e[1][0],s=e[1].y!=null?e[1].y:e[1][1],p=t[2].x!=null?t[2].x:t[2][0],d=t[2].y!=null?t[2].y:t[2][1],m=e[2].x!=null?e[2].x:e[2][0],u=e[2].y!=null?e[2].y:e[2][1],y={a:r-p,b:i-d,c:o-p,d:c-d,e:p,f:d},f={a:n-m,b:a-u,c:l-m,d:s-u,e:m,f:u},_=y0(y),x=Ge([f,_]);return _0(x)}function O9(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function zn(t,e,r,i){var n=Error.call(this,t);if(Object.setPrototypeOf)Object.setPrototypeOf(n,zn.prototype);return n.expected=e,n.found=r,n.location=i,n.name="SyntaxError",n}O9(zn,Error);function Nc(t,e,r){if(r=r||" ",t.length>e)return t;return e-=t.length,r+=r.repeat(e),t+r.slice(0,e)}zn.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r=null,i;for(i=0;i<t.length;i++)if(t[i].source===this.location.source){r=t[i].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,a=this.location.source&&typeof this.location.source.offset==="function"?this.location.source.offset(n):n,o=this.location.source+":"+a.line+":"+a.column;if(r){var c=this.location.end,l=Nc("",a.line.toString().length," "),s=r[n.line-1],p=n.line===c.line?c.column:s.length+1,d=p-n.column||1;e+=`
 --> `+o+`
`+l+` |
`+a.line+" | "+s+`
`+l+" | "+Nc("",n.column-1," ")+Nc("",d,"^")}else e+=`
 at `+o}return e};zn.buildMessage=function(t,e){var r={literal:function(s){return'"'+n(s.text)+'"'},class:function(s){var p=s.parts.map(function(d){return Array.isArray(d)?a(d[0])+"-"+a(d[1]):a(d)});return"["+(s.inverted?"^":"")+p.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(s){return s.description}};function i(s){return s.charCodeAt(0).toString(16).toUpperCase()}function n(s){return s.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+i(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+i(p)})}function a(s){return s.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+i(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+i(p)})}function o(s){return r[s.type](s)}function c(s){var p=s.map(o),d,m;if(p.sort(),p.length>0){for(d=1,m=1;d<p.length;d++)if(p[d-1]!==p[d])p[m]=p[d],m++;p.length=m}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function l(s){return s?'"'+n(s)+'"':"end of input"}return"Expected "+c(t)+" but "+l(e)+" found."};function x0(t,e,r){if(!e||!r)return;let i=t.get(e);if(!i)i=new Set,t.set(e,i);i.add(r);let n=t.get(r);if(!n)n=new Set,t.set(r,n);n.add(e)}function $9(t,e){if(!e.subcircuit_id&&!e.source_group_id)return[...t];let r=e;if(e.subcircuit_id){let c=new Set([e.subcircuit_id]),l=new Map,s=new Map;for(let d of t)if(d.type==="source_group"){let{source_group_id:m,subcircuit_id:u}=d;if(u)s.set(m,u);let y=d.parent_source_group_id;if(y){if(!l.has(y))l.set(y,[]);l.get(y).push(m)}}let p;for(let[d,m]of s)if(m===e.subcircuit_id){p=d;break}if(p){let d=(m)=>{let u=l.get(m)||[];for(let y of u){let f=s.get(y);if(f)c.add(f);d(y)}};d(p),r={...e,subcircuit_ids:Array.from(c)}}}let i=new Map;for(let c of t){let l=`${c.type}_id`,s=c[l];if(typeof s==="string")i.set(s,c)}let n=new Map;for(let c of t){let l=Object.entries(c);for(let[s,p]of l){if(s==="parent_source_group_id")continue;if(s.endsWith("_id")&&typeof p==="string"){let d=i.get(p);x0(n,c,d)}else if(s.endsWith("_ids")&&Array.isArray(p)){for(let d of p)if(typeof d==="string"){let m=i.get(d);x0(n,c,m)}}}}let a=[],o=new Set;for(let c of t){let l=!1;if(r.subcircuit_id&&"subcircuit_id"in c&&c.subcircuit_id===r.subcircuit_id)l=!0;else if(r.subcircuit_ids&&"subcircuit_id"in c&&c.subcircuit_id&&r.subcircuit_ids.includes(c.subcircuit_id))l=!0;else if(r.source_group_id&&"source_group_id"in c&&c.source_group_id===r.source_group_id)l=!0;else if(r.source_group_id&&"member_source_group_ids"in c&&Array.isArray(c.member_source_group_ids)&&c.member_source_group_ids.includes(r.source_group_id))l=!0;if(l)a.push(c),o.add(c)}while(a.length>0){let c=a.shift(),l=n.get(c);if(!l)continue;for(let s of l)if(!o.has(s))o.add(s),a.push(s)}return t.filter((c)=>o.has(c))}var Qi=(t,e={})=>{let r=t,i=r._internal_store;if(!i){i={counts:{},editCount:0},r._internal_store=i;for(let a of r){let o=a.type,c=a[`${o}_id`];if(!c)continue;let l=Number.parseInt(c.split("_").pop());if(!Number.isNaN(l))i.counts[o]=Math.max(i.counts[o]??0,l)}}let n=new Proxy({},{get:(a,o)=>{if(o==="toArray")return()=>(r.editCount=i.editCount,r);if(o==="editCount")return i.editCount;if(o==="subtree")return(l)=>Qi($9(r,l),e);if(o==="insert")return(l)=>{let s=l.type;if(!s)throw Error("insert requires an element with a type");i.counts[s]??=-1,i.counts[s]++;let p=i.counts[s],d={...l,type:s,[`${s}_id`]:`${s}_${p}`};if(e.validateInserts)(Dr[s]??zr).parse(d);return r.push(d),i.editCount++,d};if(o==="insertAll")return(l)=>l.map((s)=>n.insert(s));let c=o;return{get:(l)=>r.find((s)=>s.type===c&&s[`${c}_id`]===l),getUsing:(l)=>{let s=Object.keys(l);if(s.length!==1)throw Error("getUsing requires exactly one key, e.g. { pcb_component_id }");let p=s[0],d=p.replace("_id",""),m=r.find((u)=>u.type===d&&u[p]===l[p]);if(!m)return null;return r.find((u)=>u.type===c&&u[`${c}_id`]===m[`${c}_id`])},getWhere:(l)=>{let s=Object.keys(l);return r.find((p)=>p.type===c&&s.every((d)=>p[d]===l[d]))},list:(l)=>{let s=!l?[]:Object.keys(l);return r.filter((p)=>p.type===c&&s.every((d)=>p[d]===l[d]))},insert:(l)=>{i.counts[c]??=-1,i.counts[c]++;let s=i.counts[c],p={type:c,[`${c}_id`]:`${c}_${s}`,...l};if(e.validateInserts)(Dr[c]??zr).parse(p);return r.push(p),i.editCount++,p},delete:(l)=>{let s=r.find((p)=>p[`${c}_id`]===l);if(!s)return;r.splice(r.indexOf(s),1),i.editCount++},update:(l,s)=>{let p=r.find((d)=>d.type===c&&d[`${c}_id`]===l);if(!p)return null;return Object.assign(p,s),i.editCount++,p},select:(l)=>{if(c==="source_component")return r.find((s)=>s.type==="source_component"&&s.name===l.replace(/\./g,""));else if(c==="pcb_port"||c==="source_port"||c==="schematic_port"){let[s,p]=l.replace(/\./g,"").split(/[\s\>]+/),d=r.find((u)=>u.type==="source_component"&&u.name===s);if(!d)return null;let m=r.find((u)=>u.type==="source_port"&&u.source_component_id===d.source_component_id&&(u.name===p||(u.port_hints??[]).includes(p)));if(!m)return null;if(c==="source_port")return m;if(c==="pcb_port")return r.find((u)=>u.type==="pcb_port"&&u.source_port_id===m.source_port_id);else if(c==="schematic_port")return r.find((u)=>u.type==="schematic_port"&&u.source_port_id===m.source_port_id)}}}}});return n};Qi.unparsed=Qi;var Gt=Qi,Rc=Qi;function Wc(t){let e=t.type;return`${e}:${t[`${e}_id`]}`}var b0=(t,e={})=>{let r=t._internal_store_indexed;if(!r){r={counts:{},editCount:0,indexes:{}};for(let o of t){let c=o.type,l=o[`${c}_id`];if(!l)continue;let s=Number.parseInt(l.split("_").pop()||"");if(!Number.isNaN(s))r.counts[c]=Math.max(r.counts[c]??0,s)}let n=e.indexConfig||{},a=r.indexes;if(n.byId)a.byId=new Map;if(n.byType)a.byType=new Map;if(n.byRelation)a.byRelation=new Map;if(n.bySubcircuit)a.bySubcircuit=new Map;if(n.byCustomField&&n.byCustomField.length>0){a.byCustomField=new Map;for(let o of n.byCustomField)a.byCustomField.set(o,new Map)}for(let o of t){if(n.byId){let c=Wc(o);a.byId.set(c,o)}if(n.byType){let c=a.byType.get(o.type)||[];c.push(o),a.byType.set(o.type,c)}if(n.byRelation){let c=Object.entries(o);for(let[l,s]of c)if(l.endsWith("_id")&&l!==`${o.type}_id`&&typeof s==="string"){let p=a.byRelation.get(l)||new Map,d=p.get(s)||[];d.push(o),p.set(s,d),a.byRelation.set(l,p)}}if(n.bySubcircuit&&"subcircuit_id"in o){let c=o.subcircuit_id;if(c&&typeof c==="string"){let l=a.bySubcircuit.get(c)||[];l.push(o),a.bySubcircuit.set(c,l)}}if(n.byCustomField&&a.byCustomField){for(let c of n.byCustomField)if(c in o){let l=o[c];if(l!==void 0&&(typeof l==="string"||typeof l==="number")){let s=String(l),p=a.byCustomField.get(c),d=p.get(s)||[];d.push(o),p.set(s,d)}}}}t._internal_store_indexed=r}return new Proxy({},{get:(n,a)=>{if(a==="toArray")return()=>(t.editCount=r.editCount,t);if(a==="editCount")return r.editCount;let o=a;return{get:(c)=>{let l=e.indexConfig||{};if(l.byId&&r.indexes.byId)return r.indexes.byId.get(`${o}:${c}`)||null;if(l.byType&&r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((p)=>p[`${o}_id`]===c)||null;return t.find((s)=>s.type===o&&s[`${o}_id`]===c)||null},getUsing:(c)=>{let l=e.indexConfig||{},s=Object.keys(c);if(s.length!==1)throw Error("getUsing requires exactly one key, e.g. { pcb_component_id }");let p=s[0],d=p.replace("_id","");if(l.byRelation&&r.indexes.byRelation){let u=r.indexes.byRelation.get(p);if(u){let f=(u.get(c[p])||[]).find((x)=>x.type===d);if(!f)return null;let _=f[`${o}_id`];if(l.byId&&r.indexes.byId)return r.indexes.byId.get(`${o}:${_}`)||null;if(l.byType&&r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((Y)=>Y[`${o}_id`]===_)||null;return t.find((x)=>x.type===o&&x[`${o}_id`]===_)||null}}let m=t.find((u)=>u.type===d&&u[p]===c[p]);if(!m)return null;return t.find((u)=>u.type===o&&u[`${o}_id`]===m[`${o}_id`])||null},getWhere:(c)=>{let l=e.indexConfig||{},s=Object.keys(c);if(s.length===1&&l.byCustomField&&r.indexes.byCustomField){let p=s[0],d=r.indexes.byCustomField.get(p);if(d){let m=String(c[p]);return(d.get(m)||[]).find((y)=>y.type===o)||null}}if("subcircuit_id"in c&&l.bySubcircuit&&r.indexes.bySubcircuit){let p=c.subcircuit_id;return(r.indexes.bySubcircuit.get(p)||[]).find((m)=>m.type===o&&s.every((u)=>m[u]===c[u]))||null}if(l.byType&&r.indexes.byType)return(r.indexes.byType.get(o)||[]).find((d)=>s.every((m)=>d[m]===c[m]))||null;return t.find((p)=>p.type===o&&s.every((d)=>p[d]===c[d]))||null},list:(c)=>{let l=e.indexConfig||{},s=!c?[]:Object.keys(c);if(s.length===0&&l.byType&&r.indexes.byType)return r.indexes.byType.get(o)||[];if(s.length===1&&s[0]==="subcircuit_id"&&l.bySubcircuit&&r.indexes.bySubcircuit){let d=c.subcircuit_id;return(r.indexes.bySubcircuit.get(d)||[]).filter((u)=>u.type===o)}let p;if(l.byType&&r.indexes.byType)p=r.indexes.byType.get(o)||[];else p=t.filter((d)=>d.type===o);if(s.length>0)return p.filter((d)=>s.every((m)=>d[m]===c[m]));return p},insert:(c)=>{r.counts[o]??=-1,r.counts[o]++;let l=r.counts[o],s={type:o,[`${o}_id`]:`${o}_${l}`,...c};if(e.validateInserts)(Dr[o]??zr).parse(s);t.push(s),r.editCount++;let p=e.indexConfig||{};if(p.byId&&r.indexes.byId){let d=Wc(s);r.indexes.byId.set(d,s)}if(p.byType&&r.indexes.byType){let d=r.indexes.byType.get(o)||[];d.push(s),r.indexes.byType.set(o,d)}if(p.byRelation&&r.indexes.byRelation){let d=Object.entries(s);for(let[m,u]of d)if(m.endsWith("_id")&&m!==`${s.type}_id`&&typeof u==="string"){let y=r.indexes.byRelation.get(m)||new Map,f=y.get(u)||[];f.push(s),y.set(u,f),r.indexes.byRelation.set(m,y)}}if(p.bySubcircuit&&r.indexes.bySubcircuit&&"subcircuit_id"in s){let d=s.subcircuit_id;if(d&&typeof d==="string"){let m=r.indexes.bySubcircuit.get(d)||[];m.push(s),r.indexes.bySubcircuit.set(d,m)}}if(p.byCustomField&&r.indexes.byCustomField){for(let d of p.byCustomField)if(d in s){let m=s[d];if(m!==void 0&&(typeof m==="string"||typeof m==="number")){let u=String(m),y=r.indexes.byCustomField.get(d),f=y.get(u)||[];f.push(s),y.set(u,f)}}}return s},delete:(c)=>{let l=e.indexConfig||{},s;if(l.byId&&r.indexes.byId)s=r.indexes.byId.get(`${o}:${c}`);else if(l.byType&&r.indexes.byType)s=(r.indexes.byType.get(o)||[]).find((m)=>m[`${o}_id`]===c);else s=t.find((d)=>d[`${o}_id`]===c);if(!s)return;let p=t.indexOf(s);if(p>=0)t.splice(p,1),r.editCount++;if(l.byId&&r.indexes.byId){let d=Wc(s);r.indexes.byId.delete(d)}if(l.byType&&r.indexes.byType){let m=(r.indexes.byType.get(o)||[]).filter((u)=>u[`${o}_id`]!==c);r.indexes.byType.set(o,m)}if(l.byRelation&&r.indexes.byRelation)for(let[d,m]of r.indexes.byRelation.entries())for(let[u,y]of m.entries()){let f=y.filter((_)=>_!==s);if(f.length===0)m.delete(u);else m.set(u,f)}if(l.bySubcircuit&&r.indexes.bySubcircuit&&"subcircuit_id"in s){let d=s.subcircuit_id;if(d){let u=(r.indexes.bySubcircuit.get(d)||[]).filter((y)=>y!==s);if(u.length===0)r.indexes.bySubcircuit.delete(d);else r.indexes.bySubcircuit.set(d,u)}}if(l.byCustomField&&r.indexes.byCustomField)for(let d of r.indexes.byCustomField.values())for(let[m,u]of d.entries()){let y=u.filter((f)=>f!==s);if(y.length===0)d.delete(m);else d.set(m,y)}},update:(c,l)=>{let s=e.indexConfig||{},p;if(s.byId&&r.indexes.byId)p=r.indexes.byId.get(`${o}:${c}`);else if(s.byType&&r.indexes.byType)p=(r.indexes.byType.get(o)||[]).find((m)=>m[`${o}_id`]===c);else p=t.find((d)=>d.type===o&&d[`${o}_id`]===c);if(!p)return null;if(s.byRelation&&r.indexes.byRelation){let d=Object.entries(p);for(let[m,u]of d)if(m.endsWith("_id")&&m!==`${p.type}_id`&&typeof u==="string"){if(m in l&&l[m]!==u){let y=r.indexes.byRelation.get(m);if(y){let _=(y.get(u)||[]).filter((x)=>x!==p);if(_.length===0)y.delete(u);else y.set(u,_)}}}}if(s.bySubcircuit&&r.indexes.bySubcircuit&&"subcircuit_id"in p&&"subcircuit_id"in l){let d=p.subcircuit_id,m=l.subcircuit_id;if(d!==m){let y=(r.indexes.bySubcircuit.get(d)||[]).filter((f)=>f!==p);if(y.length===0)r.indexes.bySubcircuit.delete(d);else r.indexes.bySubcircuit.set(d,y)}}if(s.byCustomField&&r.indexes.byCustomField){for(let d of s.byCustomField)if(d in p&&d in l&&p[d]!==l[d]){let m=r.indexes.byCustomField.get(d);if(m){let u=String(p[d]),f=(m.get(u)||[]).filter((_)=>_!==p);if(f.length===0)m.delete(u);else m.set(u,f)}}}if(Object.assign(p,l),r.editCount++,s.byRelation&&r.indexes.byRelation){let d=Object.entries(p);for(let[m,u]of d)if(m.endsWith("_id")&&m!==`${p.type}_id`&&typeof u==="string"){if(m in l){let y=r.indexes.byRelation.get(m)||new Map,f=y.get(u)||[];if(!f.includes(p))f.push(p),y.set(u,f),r.indexes.byRelation.set(m,y)}}}if(s.bySubcircuit&&r.indexes.bySubcircuit&&"subcircuit_id"in p&&"subcircuit_id"in l){let d=p.subcircuit_id;if(d&&typeof d==="string"){let m=r.indexes.bySubcircuit.get(d)||[];if(!m.includes(p))m.push(p),r.indexes.bySubcircuit.set(d,m)}}if(s.byCustomField&&r.indexes.byCustomField){for(let d of s.byCustomField)if(d in p&&d in l){let m=p[d];if(m!==void 0&&(typeof m==="string"||typeof m==="number")){let u=String(m),y=r.indexes.byCustomField.get(d),f=y.get(u)||[];if(!f.includes(p))f.push(p),y.set(u,f)}}}return p},select:(c)=>{if(o==="source_component")return t.find((l)=>l.type==="source_component"&&l.name===c.replace(/\./g,""))||null;else if(o==="pcb_port"||o==="source_port"||o==="schematic_port"){let[l,s]=c.replace(/\./g,"").split(/[\s\>]+/),p=t.find((m)=>m.type==="source_component"&&m.name===l);if(!p)return null;let d=t.find((m)=>m.type==="source_port"&&m.source_component_id===p.source_component_id&&(m.name===s||(m.port_hints??[]).includes(s)));if(!d)return null;if(o==="source_port")return d;if(o==="pcb_port")return t.find((m)=>m.type==="pcb_port"&&m.source_port_id===d.source_port_id)||null;else if(o==="schematic_port")return t.find((m)=>m.type==="schematic_port"&&m.source_port_id===d.source_port_id)||null}return null}}}})};b0.unparsed=b0;var Ur=(t)=>{let e=new Map;for(let r of t)if(r.type==="schematic_sheet"&&r.name)e.set(r.schematic_sheet_id,r.name);return e};var X9=(t)=>t.type==="schematic_box",v0=(t)=>t.type==="schematic_component",Oc=(t)=>t.schematic_sheet_id,V9=(t,e)=>{if(!e)return;return Rc(t).source_component.get(e)?.name},z9=(t,e)=>{if(!t.schematic_component_id)return{};let r=Rc(e),i=r.schematic_component.get(t.schematic_component_id);if(!i?.source_component_id)return{};let n=r.source_component.get(i.source_component_id);return{sourceComponentId:i.source_component_id,sourceComponentName:n?.name}},D9=(t,e,r,i)=>{let n=Oc(t);if(n===void 0&&i)n=Oc(i);let a;if(n)a=r.get(n);let o={lineItemType:"SchematicBoxPlacement",positionAnchor:"center",schX:t.center.x,schY:t.center.y,width:i?.width??t.size.width,height:i?.height??t.size.height,sourceComponentId:t.source_component_id,sourceComponentName:V9(e,t.source_component_id),schematicComponentId:t.schematic_component_id,schematicSymbolId:i?.schematic_symbol_id??t.schematic_symbol_id,subcircuitId:t.subcircuit_id??i?.subcircuit_id};if(n)o.schematicSheetId=n;if(a)o.schematicSheetName=a;return o},U9=(t,e,r)=>{let i=Oc(t),n;if(i)n=r.get(i);let a={lineItemType:"SchematicBoxPlacement",positionAnchor:"center",schX:t.x+t.width/2,schY:t.y+t.height/2,width:t.width,height:t.height,...z9(t,e),schematicComponentId:t.schematic_component_id,schematicSymbolId:t.schematic_symbol_id,subcircuitId:t.subcircuit_id};if(i)a.schematicSheetId=i;if(n)a.schematicSheetName=n;return a},S0=(t)=>{let e=t.filter(X9).filter((a)=>a.schematic_component_id||a.schematic_symbol_id),r=Ur(t),i=new Set(t.filter(v0).map((a)=>a.schematic_component_id)),n=[...t.filter(v0).map((a)=>D9(a,t,r,e.find((o)=>o.schematic_component_id===a.schematic_component_id))),...e.filter((a)=>!a.schematic_component_id||!i.has(a.schematic_component_id)).map((a)=>U9(a,t,r))];return{circuitJson:t,componentPlacements:n}};class Dn extends at{params;constructor(t){super();this.params=t}_step(){let t=new At(this.params.ctx);for(let e of Gs(t)){let{resistor:r,switchBox:i,signalPort:n,signalSchY:a,pullDirection:o}=e;if(e.horizontalPushbutton)continue;let c=t.connected(n.source_port_id);if(t.portsByNet.get(c)?.length!==2)continue;if(n.needs_external_pullup||n.needs_external_pulldown)continue;let l=o==="up"?a-(r.schY+r.height/2):r.schY-r.height/2-a;if(l<=1.5)continue;let s=o==="up"?"above":"below";this.params.issues.push({lineItemType:"PullResistorOnWrongSide",resistorSchematicBox:r,hostSchematicBox:i,signalSourcePortId:n.source_port_id,signalPinName:n.name,signalSchY:a,pullDirection:o,preferredSide:s,wrongSideGap:l,maxRecommendedWrongSideGap:1.5,message:`place ${r.sourceComponentName} ${s} ${i.sourceComponentName} so the pull-${o} branch reads toward ${o==="up"?"power":"ground"}`})}this.solved=!0}}function Un(t,e){let r=t.find((l)=>l.type==="source_trace"&&l.source_trace_id===e.source_trace_id);if(r?.type==="source_trace"&&r.name)return r.name;let i=e.edges[0],n=e.edges.at(-1),a=(l,s)=>{let p=t.filter((x)=>x.type==="schematic_port"&&x.schematic_sheet_id===e.schematic_sheet_id&&(s?x.schematic_port_id===s:Math.hypot(x.center.x-l.x,x.center.y-l.y)<=0.01));if(p.length!==1||p[0]?.type!=="schematic_port")return;let d=p[0],m=t.find((x)=>x.type==="source_port"&&x.source_port_id===d.source_port_id),u=t.find((x)=>x.type==="schematic_component"&&x.schematic_component_id===d.schematic_component_id),y=m?.type==="source_port"?m.source_component_id:u?.type==="schematic_component"?u.source_component_id:void 0,f=t.find((x)=>x.type==="source_component"&&x.source_component_id===y);if(f?.type!=="source_component"||!f.name)return;let _=m?.type==="source_port"&&m.name?m.name:d.pin_number!==void 0?`pin${d.pin_number}`:d.display_pin_label;return _?`${f.name}.${_}`:f.name},o=i&&a(i.from,i.from_schematic_port_id),c=n&&a(n.to,n.to_schematic_port_id);if(o&&c)return`${o} to ${c}`;return r?.type==="source_trace"&&r.display_name||o||c||"trace"}var w0=(t,e,r)=>{let i=[{x:t.x,y:t.y}],n=(t.x+e.x)/2,a=(t.y+e.y)/2,o={x:e.x,y:e.y};switch(e.facingDirection){case"x+":o.x+=r;break;case"x-":o.x-=r;break;case"y+":o.y+=r;break;case"y-":o.y-=r;break}let c=t.facingDirection??"none",l=e.facingDirection??"none",s=(m)=>{let u=i[i.length-1];if(u.x!==m.x||u.y!==m.y)i.push(m)},p=Math.abs(t.y-e.y)<=Math.max(0.000001,r*0.1),d=Math.abs(t.x-e.x)<=Math.max(0.000001,r*0.1);if(c==="none"&&l==="none")globalThis.__DEBUG_CALCULATE_ELBOW_CASE=1,s({x:n,y:t.y}),s({x:n,y:e.y});else if(c==="x+"&&l==="y+")if(globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2,t.x>e.x&&t.y<e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.1,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y+r}),s({x:e.x,y:e.y+r});else if(!d&&!p&&t.x<e.x&&t.y>e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.2,s({x:e.x,y:t.y});else if(d)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.3,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y+r}),s({x:e.x,y:e.y+r});else if(t.x<e.x)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.4,s({x:n,y:t.y}),s({x:n,y:o.y}),s({x:e.x,y:o.y});else if(t.y<=e.y+r)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.5,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x,y:t.y+r}),s({x:e.x,y:e.y});else globalThis.__DEBUG_CALCULATE_ELBOW_CASE=2.6,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:(t.y+e.y)/2}),s({x:e.x,y:(t.y+e.y)/2});else if(c==="x+"&&l==="x+"&&!p){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=3;let m=Math.max(t.x+r,o.x);s({x:m,y:t.y}),s({x:m,y:e.y})}else if(c==="x+"&&l==="x+"&&p)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=3.1,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x+r,y:t.y+r}),s({x:e.x+r,y:e.y});else if(c==="x+"&&l==="y-")if(d&&t.y<=e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.11,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:a}),s({x:e.x,y:a});else if(d&&t.y>e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.12,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:e.y-r}),s({x:e.x,y:e.y-r});else if(t.x<e.x&&t.y<e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.2,s({x:e.x,y:t.y});else if(t.x>e.x&&t.y<e.y){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.3;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:a}),s({x:e.x,y:a})}else if(t.x>e.x&&t.y>e.y){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.4;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:o.y}),s({x:e.x,y:o.y})}else if(t.y===e.y)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.5,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y-r}),s({x:e.x,y:t.y-r});else globalThis.__DEBUG_CALCULATE_ELBOW_CASE=4.6,s({x:n,y:t.y}),s({x:n,y:o.y}),s({x:e.x,y:o.y});else if(c==="x+"&&l==="x-"&&t.x+r>=e.x-r&&!p){globalThis.__DEBUG_CALCULATE_ELBOW_CASE=5;let m=t.x+r;s({x:m,y:t.y}),s({x:m,y:a}),s({x:o.x,y:a}),s({x:o.x,y:o.y})}else if(c==="x+"&&l==="x-"&&p&&e.x>t.x);else if(c==="x+"&&l==="x-"&&p)globalThis.__DEBUG_CALCULATE_ELBOW_CASE=7,s({x:t.x+r,y:t.y}),s({x:t.x+r,y:t.y+r}),s({x:e.x-r,y:t.y+r}),s({x:e.x-r,y:t.y});else{if(globalThis.__DEBUG_CALCULATE_ELBOW_CASE=8,c==="x+")s({x:t.x+r,y:t.y});s({x:n,y:i[i.length-1].y}),s({x:n,y:o.y}),s({x:o.x,y:o.y})}return s({x:e.x,y:e.y}),i};var jc=(t,e,r={})=>{let i=t,n=e,a=!1;if(i.x>n.x||i.x===n.x&&i.y>n.y)a=!0,[i,n]=[n,i];let o=i.facingDirection==="x-",c=i.facingDirection==="y-",l=(Y)=>{let b=o?i.x-(Y.x-i.x):Y.x,M=c?i.y-(Y.y-i.y):Y.y,O=Y.facingDirection;if(o){if(O==="x+")O="x-";else if(O==="x-")O="x+"}if(c){if(O==="y+")O="y-";else if(O==="y-")O="y+"}return{x:b,y:M,facingDirection:O}},s=(Y,b)=>{let M=Y.x-b.x,O=Y.y-b.y,X=b.x+O,E=b.y-M,I=Y.facingDirection;switch(I){case"x+":I="y-";break;case"y-":I="x-";break;case"x-":I="y+";break;case"y+":I="x+";break}return{x:X,y:E,facingDirection:I}},p=(Y,b)=>{let M=Y.x-b.x,O=Y.y-b.y;return{x:b.x-O,y:b.y+M}},d=o||c?l(i):i,m=o||c?l(n):n,u=d,y=m,f=!1;if(d.facingDirection==="y+")f=!0,u={...d,facingDirection:"x+"},y=s(m,d);let _=r?.overshoot??0.1*Math.max(Math.abs(u.x-y.x),Math.abs(u.y-y.y)),x=w0(u,y,_);if(f)x=x.map((Y)=>p(Y,u));if(o||c)x=x.map(({x:Y,y:b})=>({x:o?i.x-(Y-i.x):Y,y:c?i.y-(b-i.y):b}));return a?x.reverse():x};class ne extends at{static EPSILON=0.01;ctx;out;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e}_step(){let t=this.ctx.circuitJson.filter((n)=>n.type==="schematic_port"),e=new Map(t.map((n)=>[n.schematic_port_id,n])),r=new Map(this.ctx.componentPlacements.flatMap((n)=>n.schematicComponentId?[[n.schematicComponentId,n]]:[])),i=new Set;for(let n of this.ctx.circuitJson.filter((a)=>a.type==="schematic_trace")){let a=this.getTracePoints(n),o=this.countTurns(a);if(o!==3)continue;let c=[this.getCandidate({trace:n,points:a,atStart:!0,currentTurnCount:o,ports:t,portsById:e,placementsByComponentId:r}),this.getCandidate({trace:n,points:a,atStart:!1,currentTurnCount:o,ports:t,portsById:e,placementsByComponentId:r})].filter((s)=>Boolean(s));for(let s of[...c]){if(!s.target.sourceComponentName?.startsWith("U"))continue;for(let p of[a[0],a.at(-1)]){let d=this.findPortAtPoint(t,p,n.schematic_sheet_id),m=d?.schematic_component_id?r.get(d.schematic_component_id):void 0;if(!m||!/^[CR]/.test(m.sourceComponentName??""))continue;c.push({target:m,deltaSchX:-s.deltaSchX,deltaSchY:-s.deltaSchY,currentTurnCount:o,suggestedTurnCount:s.suggestedTurnCount})}}let l=(s)=>/^[CR]/.test(s.target.sourceComponentName??"")?0:s.target.sourceComponentName?.startsWith("U")?2:1;c.sort((s,p)=>l(s)-l(p));for(let s of c){if(this.wouldOverlapAnotherComponent(s))continue;if(!this.validateMove(n,s,t))continue;let p=[s.target.schematicComponentId,s.deltaSchX.toFixed(3),s.deltaSchY.toFixed(3)].join("\x00");if(i.has(p))break;i.add(p),this.out.push(this.makeIssue(n,s));break}}this.solved=!0}getCandidate({trace:t,points:e,atStart:r,currentTurnCount:i,ports:n,portsById:a,placementsByComponentId:o}){if(e.length<4)return;let c=r?0:e.length-1,l=r?1:e.length-2,s=r?2:e.length-3,p=r?3:e.length-4,d=e[c],m=e[l],u=e[s],y=e[p],f=r?t.edges[0]:t.edges.at(-1);if(!f)return;let _=r?f.from_schematic_port_id:f.to_schematic_port_id,x=_?a.get(_):this.findPortAtPoint(n,d,t.schematic_sheet_id);if(!x?.schematic_component_id||!x.facing_direction)return;let Y=this.getAxis(d,m),b=this.getAxis(m,u),M=this.getAxis(u,y),O=x.facing_direction==="left"||x.facing_direction==="right"?"horizontal":"vertical";if(!Y||!b||!M)return;if(Y!==O||b===O||M!==O)return;if(!this.isPointInFacingDirection(d,m,x.facing_direction)||!this.isPointInFacingDirection(u,y,x.facing_direction))return;let X=o.get(x.schematic_component_id);if(!X)return;let E=u.x-m.x,I=u.y-m.y;if(Math.abs(E)<=ne.EPSILON&&Math.abs(I)<=ne.EPSILON)return;let U={x:d.x+E,y:d.y+I},q=r?[U,...e.slice(2)]:[...e.slice(0,-2),U],ct=this.countTurns(q);if(ct===void 0||ct!==1||ct>=i)return;return{target:X,deltaSchX:E,deltaSchY:I,currentTurnCount:i,suggestedTurnCount:ct}}validateMove(t,e,r){let i=e.target.schematicComponentId,n=e.target.schematicSheetId,a=r.filter((b)=>b.schematic_sheet_id===n),o=a.filter((b)=>b.schematic_component_id===i),c=this.ctx.circuitJson.filter((b)=>b.type==="schematic_trace"&&b.schematic_sheet_id===n),l=(b,M)=>b.edges.some((O)=>O.from_schematic_port_id===M.schematic_port_id||O.to_schematic_port_id===M.schematic_port_id||this.pointsEqual(O.from,M.center)||this.pointsEqual(O.to,M.center)),s=c.filter((b)=>o.some((M)=>l(b,M)));if(!s.includes(t))return!1;if(this.ctx.circuitJson.some((b)=>b.type==="schematic_net_label"&&b.schematic_sheet_id===n&&o.some((M)=>this.pointsEqual(b.anchor_position??b.center,M.center))))return!1;let p=(b)=>({x:b.x+e.deltaSchX,y:b.y+e.deltaSchY}),d={left:"x-",right:"x+",up:"y+",down:"y-"},m=(b,M)=>({...M&&b.schematic_component_id===i?p(b.center):b.center,facingDirection:d[b.facing_direction]}),u=(b)=>b.slice(1).reduce((M,O,X)=>M+Math.abs(O.x-b[X].x)+Math.abs(O.y-b[X].y),0),y=(b)=>b.slice(1).map((M,O)=>({from:b[O],to:M})),f=Ut(e.target.schX+e.deltaSchX,e.target.schY+e.deltaSchY,e.target.width,e.target.height),_=c.filter((b)=>!s.includes(b));if(_.some((b)=>b.edges.some((M)=>Yr(M.from,M.to,Ve(f)))))return!1;let x=this.ctx.circuitJson.flatMap((b)=>{if(b.type==="schematic_net_label"&&b.schematic_sheet_id===n)return[Ve(kr(b))];if(b.type!=="schematic_text"||b.schematic_sheet_id!==n)return[];return Mi(b.schematic_component_id===i?{...b,position:p(b.position)}:b)});if(x.some((b)=>ki(b,Ve(f))))return!1;let Y=[];for(let b of s){let M=this.getTracePoints(b);if(M.length<2||b.junctions?.length)return!1;let O=(Q,k)=>{let st=a.filter((ot)=>k?ot.schematic_port_id===k:this.pointsEqual(ot.center,Q));return st.length===1&&this.pointsEqual(st[0].center,Q)?st[0]:void 0},X=O(M[0],b.edges[0].from_schematic_port_id),E=O(M.at(-1),b.edges.at(-1).to_schematic_port_id);if(!X?.facing_direction||!E?.facing_direction)return!1;if(o.some((Q)=>l(b,Q)&&Q!==X&&Q!==E))return!1;let I=(Q)=>!this.pointsEqual(Q,X.center)&&!this.pointsEqual(Q,E.center)&&y(M).some(({from:k,to:st})=>Math.abs(Math.hypot(Q.x-k.x,Q.y-k.y)+Math.hypot(Q.x-st.x,Q.y-st.y)-Math.hypot(st.x-k.x,st.y-k.y))<0.000001);if(c.some((Q)=>Q!==b&&Q.edges.some((k)=>I(k.from)||I(k.to))))return!1;if(this.ctx.circuitJson.some((Q)=>Q.type==="schematic_net_label"&&Q.schematic_sheet_id===n&&I(Q.anchor_position??Q.center)))return!1;let U=jc(m(X,!0),m(E,!0)).filter((Q,k,st)=>k===0||!this.pointsEqual(Q,st[k-1])),q=this.countTurns(U),ct=this.countTurns(M);if(U.length<2||q===void 0||ct===void 0||q>ct||u(U)>u(M)+0.000001)return!1;if(!this.isPointInFacingDirection(U[0],U[1],X.facing_direction)||!this.isPointInFacingDirection(U.at(-1),U.at(-2),E.facing_direction))return!1;if(b===t){let Q=this.countTurns(jc(m(X,!1),m(E,!1)));if(q>=ct||Q===void 0||q>=Q)return!1;e.suggestedTurnCount=q}for(let Q of y(U)){if(x.some((ot)=>Yr(Q.from,Q.to,ot)))return!1;if(this.ctx.componentPlacements.some((ot)=>{if(ot.schematicSheetId!==n)return!1;let Z=ot.schematicComponentId===i?f:Ut(ot.schX,ot.schY,ot.width,ot.height);return Yr(Q.from,Q.to,Ve(Z))}))return!1;let k=Ci(Q.from,Q.to);if(!k)continue;if([..._.flatMap((ot)=>ot.edges),...Y.flatMap((ot)=>y(ot.points))].some((ot)=>{if([X,E].some((N)=>N.schematic_component_id!==i&&[Q.from,Q.to].some((tt)=>this.pointsEqual(tt,N.center))&&[ot.from,ot.to].some((tt)=>this.pointsEqual(tt,N.center)))&&this.getAxis(Q.from,Q.to)!==this.getAxis(ot.from,ot.to))return!1;let Z=Ci(ot.from,ot.to);return Z&&ki(k,Z)}))return!1}Y.push({schematicTraceId:b.schematic_trace_id,points:U})}return e.suggestedTraces=Y,!0}getTracePoints(t){let e=t.edges[0];if(!e)return[];let r=[e.from];for(let i of t.edges){let n=r.at(-1);if(!this.pointsEqual(n,i.from))return[];r.push(i.to)}return r}countTurns(t){let e=[];for(let[r,i]of t.slice(1).entries()){let n=t[r];if(this.pointsEqual(n,i))continue;let a=this.getAxis(n,i);if(!a)return;e.push(a)}return e.slice(1).filter((r,i)=>r!==e[i]).length}pointsEqual(t,e){let{EPSILON:r}=ne;return Math.abs(t.x-e.x)<=r&&Math.abs(t.y-e.y)<=r}getAxis(t,e){let r=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y),{EPSILON:n}=ne;if(r<=n&&i>n)return"vertical";if(i<=n&&r>n)return"horizontal";return}isPointInFacingDirection(t,e,r){let{EPSILON:i}=ne;switch(r){case"left":return e.x<t.x-i;case"right":return e.x>t.x+i;case"up":return e.y>t.y+i;case"down":return e.y<t.y-i}}findPortAtPoint(t,e,r){let{EPSILON:i}=ne;return t.find((n)=>n.schematic_sheet_id===r&&Math.abs(n.center.x-e.x)<=i&&Math.abs(n.center.y-e.y)<=i)}wouldOverlapAnotherComponent(t){let e=Ut(t.target.schX+t.deltaSchX,t.target.schY+t.deltaSchY,t.target.width,t.target.height);return this.ctx.componentPlacements.some((r)=>{if(r===t.target)return!1;if(r.schematicSheetId!==t.target.schematicSheetId)return!1;return Boolean(Je(e,Ut(r.schX,r.schY,r.width,r.height)))})}makeIssue(t,e){let r=e.target.sourceComponentName||"component",i=this.getMoveDirection(e.deltaSchX,e.deltaSchY),n=Math.abs(e.deltaSchX||e.deltaSchY),a=e.target.schX+e.deltaSchX,o=e.target.schY+e.deltaSchY;return{lineItemType:"TraceCanBeSimplifiedByMovingComponent",schematicTraceId:t.schematic_trace_id,traceName:Un(this.ctx.circuitJson,t),targetComponent:e.target,deltaSchX:e.deltaSchX,deltaSchY:e.deltaSchY,newSchX:a,newSchY:o,currentTurnCount:e.currentTurnCount,suggestedTurnCount:e.suggestedTurnCount,suggestedTraces:e.suggestedTraces,message:`move ${r} ${i} by ${yr(n)} (to schX=${yr(a)}, schY=${yr(o)}) to reduce this trace from ${e.currentTurnCount} turns to ${e.suggestedTurnCount}`}}getMoveDirection(t,e){if(Math.abs(t)>ne.EPSILON)return t>0?"right":"left";return e>0?"up":"down"}static issueToString(t){let e=[];return S(e,"traceName",t.traceName),S(e,"targetComponentName",t.targetComponent.sourceComponentName),S(e,"deltaSchX",t.deltaSchX,{formatDelta:!0}),S(e,"deltaSchY",t.deltaSchY,{formatDelta:!0}),S(e,"newSchX",t.newSchX),S(e,"newSchY",t.newSchY),S(e,"currentTurnCount",t.currentTurnCount),S(e,"suggestedTurnCount",t.suggestedTurnCount),S(e,"message",t.message),`<TraceCanBeSimplifiedByMovingComponent ${e.join(" ")} />`}}function A0(t){let e=new Set,r=new Map;for(let a of t){if(a.type!=="source_net"&&a.type!=="source_port")continue;let o=a.type==="source_net"?a.source_net_id:a.source_port_id;if(a.type==="source_net"?a.is_power||a.is_ground||a.is_positive_voltage_source:a.provides_power||a.requires_power||a.provides_ground||a.requires_ground)e.add(o);let l=a.subcircuit_connectivity_map_key;if(l!==void 0){let s=r.get(l)??[];s.push(o),r.set(l,s)}}let i=Sn(t),n=Us([...Object.values(i.netMap),...r.values()]);for(let a of Object.values(n))if(a.some((o)=>e.has(o)))for(let o of a)e.add(o);return e}class oe extends at{static EPSILON=0.01;ctx;out;powerOrGroundConnectionIds;constructor({ctx:t,issues:e}){super();this.ctx=t,this.out=e,this.powerOrGroundConnectionIds=A0(t.circuitJson)}_step(){let t=this.ctx.circuitJson.filter((a)=>a.type==="schematic_port"),e=new Map(t.map((a)=>[a.schematic_port_id,a])),r=new Map;for(let a of t){if(!a.schematic_component_id)continue;let o=r.get(a.schematic_component_id)??[];o.push(a),r.set(a.schematic_component_id,o)}let i=new Map(this.ctx.componentPlacements.flatMap((a)=>a.schematicComponentId?[[a.schematicComponentId,a]]:[])),n=new Map;for(let a of this.ctx.circuitJson.filter((o)=>o.type==="schematic_trace")){let o=this.getTracePoints(a),c=this.countTurns(o);if(c===void 0||c<2)continue;let l=this.getTraceEndpoints(a,o,t,e);if(!l)continue;for(let[s,p]of[l,[l[1],l[0]]]){let d=this.getFlipCandidate({trace:a,targetEndpoint:s,connectedEndpoint:p,currentTurnCount:c,portsByComponentId:r,placementsByComponentId:i});if(!d)continue;let m=d.targetPort.schematic_component_id,u=n.get(m);if(!u||this.isBetterCandidate(d,u))n.set(m,d)}}for(let a of n.values())this.out.push(this.makeIssue(a));this.solved=!0}getFlipCandidate({trace:t,targetEndpoint:e,connectedEndpoint:r,currentTurnCount:i,portsByComponentId:n,placementsByComponentId:a}){let o=e.port,c=r.port,l=o.schematic_component_id,s=c.schematic_component_id;if(!l||!s||l===s||o.schematic_sheet_id!==c.schematic_sheet_id)return;let p=n.get(l);if(p?.length!==2)return;if(p.some((b)=>b.source_port_id&&this.powerOrGroundConnectionIds.has(b.source_port_id)))return;if((n.get(s)??[]).length<=2)return;let m=p.find((b)=>b.schematic_port_id!==o.schematic_port_id);if(!m||!this.areOppositePorts(o,m))return;let u=o.facing_direction,y=m.facing_direction;if(!u||!y)return;if(!this.traceLeavesPortInFacingDirection(e))return;let f=c.center;if(this.isPointInFacingDirection(o.center,f,u)||!this.isPointInFacingDirection(m.center,f,y)||!c.facing_direction||!this.isPointInFacingDirection(f,m.center,c.facing_direction))return;let _=this.getMinimumTurnCount(m.center,f,y);if(_>=i)return;let x=a.get(l),Y=a.get(s);if(!x||!Y)return;return{trace:t,targetPort:o,targetPlacement:x,connectedPlacement:Y,suggestedFacingDirection:y,currentTurnCount:i,suggestedTurnCount:_,traceLength:this.getTraceLength(e.pointsFromEndpoint)}}getTraceEndpoints(t,e,r,i){let n=t.edges[0],a=t.edges.at(-1);if(!n||!a||e.length<2)return;let o=n.from_schematic_port_id?i.get(n.from_schematic_port_id):this.findPortAtPoint(r,e[0],t.schematic_sheet_id),c=a.to_schematic_port_id?i.get(a.to_schematic_port_id):this.findPortAtPoint(r,e.at(-1),t.schematic_sheet_id);if(!o||!c)return;return[{port:o,pointsFromEndpoint:e},{port:c,pointsFromEndpoint:[...e].reverse()}]}getTracePoints(t){let e=t.edges[0];if(!e)return[];let r=[e.from];for(let i of t.edges){if(!this.pointsEqual(r.at(-1),i.from))return[];r.push(i.to)}return r}countTurns(t){let e=[];for(let[r,i]of t.slice(1).entries()){let n=t[r];if(this.pointsEqual(n,i))continue;let a=this.getAxis(n,i);if(!a)return;if(e.at(-1)!==a)e.push(a)}return Math.max(0,e.length-1)}traceLeavesPortInFacingDirection(t){let e=t.pointsFromEndpoint.find((r)=>!this.pointsEqual(r,t.port.center));return Boolean(e&&t.port.facing_direction&&this.isPointInFacingDirection(t.port.center,e,t.port.facing_direction))}areOppositePorts(t,e){let r=(t.facing_direction==="left"&&e.facing_direction==="right"||t.facing_direction==="right"&&e.facing_direction==="left")&&Math.abs(t.center.y-e.center.y)<=oe.EPSILON,i=(t.facing_direction==="up"&&e.facing_direction==="down"||t.facing_direction==="down"&&e.facing_direction==="up")&&Math.abs(t.center.x-e.center.x)<=oe.EPSILON;return r||i}getMinimumTurnCount(t,e,r){return(r==="left"||r==="right"?Math.abs(t.y-e.y)<=oe.EPSILON:Math.abs(t.x-e.x)<=oe.EPSILON)?0:1}isPointInFacingDirection(t,e,r){let{EPSILON:i}=oe;switch(r){case"left":return e.x<t.x-i;case"right":return e.x>t.x+i;case"up":return e.y>t.y+i;case"down":return e.y<t.y-i}}getAxis(t,e){let r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),{EPSILON:n}=oe;if(r<=n&&i>n)return"vertical";if(i<=n&&r>n)return"horizontal";return}pointsEqual(t,e){let{EPSILON:r}=oe;return Math.abs(t.x-e.x)<=r&&Math.abs(t.y-e.y)<=r}findPortAtPoint(t,e,r){return t.find((i)=>i.schematic_sheet_id===r&&this.pointsEqual(i.center,e))}getTraceLength(t){return t.slice(1).reduce((e,r,i)=>{let n=t[i];return e+Math.abs(r.x-n.x)+Math.abs(r.y-n.y)},0)}isBetterCandidate(t,e){let r=t.currentTurnCount-t.suggestedTurnCount,i=e.currentTurnCount-e.suggestedTurnCount;return r>i||r===i&&t.traceLength>e.traceLength}makeIssue(t){let e=t.targetPlacement.sourceComponentName||"component",r=t.connectedPlacement.sourceComponentName||"component",i=t.targetPort.pin_number?`pin${t.targetPort.pin_number}`:t.targetPort.display_pin_label;return{lineItemType:"TwoPinComponentCouldBeFlipped",schematicTraceId:t.trace.schematic_trace_id,traceName:Un(this.ctx.circuitJson,t.trace),targetComponent:t.targetPlacement,connectedComponent:t.connectedPlacement,targetPin:i,currentFacingDirection:t.targetPort.facing_direction,suggestedFacingDirection:t.suggestedFacingDirection,deltaSchRotation:180,currentTurnCount:t.currentTurnCount,suggestedTurnCount:t.suggestedTurnCount,message:`rotate ${e} by 180° so ${i??"its connected pin"} faces ${r} and reduce this trace from ${t.currentTurnCount} turns to ${t.suggestedTurnCount}`}}static issueToString(t){let e=[];return S(e,"traceName",t.traceName),S(e,"targetComponentName",t.targetComponent.sourceComponentName),S(e,"connectedComponentName",t.connectedComponent.sourceComponentName),S(e,"targetPin",t.targetPin),S(e,"currentFacingDirection",t.currentFacingDirection),S(e,"suggestedFacingDirection",t.suggestedFacingDirection),S(e,"deltaSchRotation",t.deltaSchRotation),S(e,"currentTurnCount",t.currentTurnCount),S(e,"suggestedTurnCount",t.suggestedTurnCount),S(e,"message",t.message),`<TwoPinComponentCouldBeFlipped ${e.join(" ")} />`}}class Gr extends at{params;VERBOSE_NET_LABEL_MESSAGE="Create trace with schDisplayLabel";netLabels;tokenToInvolvedPin;schematicSheetNameById;currentIndex=0;seen=new Set;constructor(t){super();this.params=t;let{circuitJson:e}=t.ctx;this.netLabels=e.filter((r)=>this.isSchematicNetLabel(r)),this.tokenToInvolvedPin=this.buildTokenToInvolvedPinMap(e),this.schematicSheetNameById=Ur(e),this.solved=this.netLabels.length===0}_step(){let t=this.netLabels[this.currentIndex++];if(!t){this.solved=!0;return}this.solved=this.currentIndex>=this.netLabels.length;let e=`${t.schematic_sheet_id??""}:${t.text}`;if(!t.text.includes("/")||this.seen.has(e))return;this.seen.add(e);let r;if(t.schematic_sheet_id)r=this.schematicSheetNameById.get(t.schematic_sheet_id);let i={lineItemType:"VerboseSchematicNetLabel",schematicNetLabelId:t.schematic_net_label_id,sourceNetId:t.source_net_id,schematicSheetId:t.schematic_sheet_id,schematicSheetName:r,text:t.text,involvedPins:this.getInvolvedPins(t.text,this.tokenToInvolvedPin),schX:t.center.x,schY:t.center.y,message:this.VERBOSE_NET_LABEL_MESSAGE};this.params.issues.push(i)}static issueToString(t){let e=[];return S(e,"message",t.message),S(e,"text",t.text),S(e,"involvedPins",t.involvedPins.join(",")),S(e,"schSheetName",t.schematicSheetName),S(e,"schX",t.schX),S(e,"schY",t.schY),`<VerboseSchematicNetLabel ${e.join(" ")} />`}isSchematicNetLabel(t){return t.type==="schematic_net_label"}isSourcePort(t){return t.type==="source_port"}getSourceComponentWithName(t){if(t.type!=="source_component"||!("source_component_id"in t)||!("name"in t)||typeof t.source_component_id!=="string"||typeof t.name!=="string")return null;return{source_component_id:t.source_component_id,name:t.name}}getSourcePortNameCandidates(t){return[t.most_frequently_referenced_by_name,t.name,...t.port_hints??[],t.pin_number===void 0?void 0:String(t.pin_number)].filter((e)=>Boolean(e))}getBestSourcePortName(t){return t.most_frequently_referenced_by_name??t.name??(t.pin_number===void 0?"":`pin${t.pin_number}`)}buildTokenToInvolvedPinMap(t){let e=new Map(t.flatMap((i)=>{let n=this.getSourceComponentWithName(i);return n?[n]:[]}).map((i)=>[i.source_component_id,i])),r=new Map;for(let i of t.filter((n)=>this.isSourcePort(n))){if(!i.source_component_id)continue;let n=e.get(i.source_component_id);if(!n?.name)continue;let a=`${n.name}.${this.getBestSourcePortName(i)}`;for(let o of this.getSourcePortNameCandidates(i))r.set(`${n.name}_${o}`,a)}return r}getInvolvedPins(t,e){let r=new Set;for(let i of t.split("/")){let n=e.get(i);if(n)r.add(n)}return Array.from(r)}}class Qr extends at{params;texts;obstacles;sheetNames;index=0;constructor(t){super();this.params=t;let{ctx:e}=t;this.sheetNames=Ur(e.circuitJson);let r=new Set(e.circuitJson.flatMap((n)=>n.type==="schematic_component"&&n.is_box_with_pins===!1&&!n.symbol_name?[n.schematic_component_id]:[])),i=new Set;this.texts=e.circuitJson.flatMap((n)=>{if(n.type!=="schematic_text")return[];if(n.schematic_component_id||n.schematic_symbol_id)return[];let a=Mi(n);if(!a.length)return[];let o=n.schematic_sheet_id,c=JSON.stringify([o,n.text,n.position.x,n.position.y,n.font_size,n.anchor,n.rotation,n.color]);if(i.has(c))return[];return i.add(c),[{text:n,isTraceLabel:Boolean("source_trace_id"in n&&n.source_trace_id),polygons:a,sheetId:o,object:{type:"text",id:n.schematic_text_id,text:n.text}}]}),this.obstacles=[...e.componentPlacements.flatMap((n)=>n.schematicComponentId&&!r.has(n.schematicComponentId)?[{object:{type:"component",id:n.schematicComponentId,componentName:n.sourceComponentName,schematicComponentId:n.schematicComponentId},polygons:[Ve(Ut(n.schX,n.schY,n.width,n.height))],sheetId:n.schematicSheetId}]:[]),...e.circuitJson.flatMap((n)=>n.type==="schematic_trace"?[{object:{type:"trace",id:n.schematic_trace_id},sheetId:n.schematic_sheet_id,segments:n.edges,polygons:n.edges.flatMap((a)=>{let o=Ci(a.from,a.to);return o?[o]:[]})}]:[])],this.solved=this.texts.length===0}_step(){let t=this.texts[this.index],r=[...this.obstacles,...this.texts.slice(this.index+1)].filter((i)=>this.collides(t,i));if(r.length){let i=t.isTraceLabel?void 0:this.findClearPosition(t);for(let n of r){let a=n.object.componentName??n.object.text;this.params.issues.push({lineItemType:"SchematicTextCollision",schematicSheetId:t.sheetId,schematicSheetName:t.sheetId?this.sheetNames.get(t.sheetId):void 0,schematicTextId:t.text.schematic_text_id,text:t.text.text,collidingObject:n.object,textBounds:Qs(t.polygons),collidingObjectBounds:Qs(n.polygons),suggestedMove:i,message:`Text "${t.text.text}" overlaps ${n.object.type}${a?` ${a}`:""}; ${t.isTraceLabel?"adjust the owning trace's label placement or remove stale duplicates to leave the visible text area clear.":"reposition the text to leave its visible area clear."}`})}}this.index++,this.solved=this.index>=this.texts.length}collides(t,e){if(t.sheetId!==e.sheetId)return!1;return t.polygons.some((r)=>e.segments?e.segments.some((i)=>Yr(i.from,i.to,r)):e.polygons.some((i)=>ki(r,i)))}findClearPosition(t){let e=[...this.obstacles,...this.texts.filter((i)=>i!==t)],r=Math.max(0.1,t.text.font_size/2);for(let i=r;i<=Math.max(4,t.text.font_size*8);i+=r)for(let[n,a]of[[0,i],[0,-i],[-i,0],[i,0]]){let o=Math.round((t.text.position.x+n)*1000)/1000,c=Math.round((t.text.position.y+a)*1000)/1000,l={...t,polygons:Mi({...t.text,position:{x:o,y:c}})};if(e.every((s)=>!this.collides(l,s)))return{newSchX:o,newSchY:c}}return}static issueToString(t){let e=[];return S(e,"text",t.text),S(e,"collidingObjectType",t.collidingObject.type),S(e,"collidingText",t.collidingObject.text),S(e,"newSchX",t.suggestedMove?.newSchX),S(e,"newSchY",t.suggestedMove?.newSchY),S(e,"message",t.message),`<SchematicTextCollision ${e.join(" ")} />`}}class lr extends at{params;static MIN_DISTANCE=6;networks;index=0;constructor(t){super();this.params=t;this.networks=this.findNetworks(t.ctx),this.solved=this.networks.length===0}_step(){let t=this.networks[this.index],e=t.members.slice(0,2),r=Math.max(lr.MIN_DISTANCE,...e.map((n)=>3*Math.max(n.width,n.height))),i=e.map((n)=>Math.hypot(Math.max(0,Math.abs(n.schX-t.pinPosition.x)-n.width/2),Math.max(0,Math.abs(n.schY-t.pinPosition.y)-n.height/2)));if(i.some((n)=>n>r)){let n=t.host.sourceComponentName||"component",a=B0(t.pin),o=e.map((c)=>c.sourceComponentName||"component").join(", ");this.params.issues.push({lineItemType:"ResetNetworkNotGrouped",hostSchematicBox:t.host,resetSourcePortId:t.pin.source_port_id,resetPinName:a,supportNetworkComponents:t.members,maxDistanceFromResetPin:Math.round(Math.max(...i)*100)/100,maxRecommendedDistance:r,message:`Group ${o} near ${n}.${a} so the reset pull-up and capacitor can be read together. Preserve all net connections; associated test points may remain in a debug area.`})}this.index++,this.solved=this.index>=this.networks.length}findNetworks(t){let e=_n(t.circuitJson),r=t.circuitJson.filter((y)=>y.type==="source_component"),i=new Map(r.map((y)=>[y.source_component_id,y])),n=t.circuitJson.filter((y)=>y.type==="source_port"),a=new Map,o=new Map,c=new Set,l=new Set;for(let y of n){if(!y.source_component_id)continue;let f=a.get(y.source_component_id)??[];f.push(y),a.set(y.source_component_id,f);let _=e(y.source_port_id),x=o.get(_)??[];if(x.push(y),o.set(_,x),y.provides_power||y.requires_power)c.add(_);if(y.provides_ground||y.requires_ground)l.add(_)}for(let y of t.circuitJson){if(y.type!=="source_net")continue;if(y.is_power||y.is_positive_voltage_source)c.add(e(y.source_net_id));if(y.is_ground)l.add(e(y.source_net_id))}let s=new Map(t.componentPlacements.flatMap((y)=>y.sourceComponentId?[[y.sourceComponentId,y]]:[])),p=t.circuitJson.filter((y)=>y.type==="schematic_port"),d=new Map(t.circuitJson.filter((y)=>y.type==="schematic_component").map((y)=>[y.schematic_component_id,y])),m=[],u=new Set;for(let y of n){if(!y.source_component_id||!B0(y)||y.do_not_connect)continue;if(i.get(y.source_component_id)?.ftype!=="simple_chip")continue;let f=e(y.source_port_id);if(u.has(f)||c.has(f)||l.has(f))continue;u.add(f);let _=o.get(f)??[];if(new Set(_.filter((q)=>q.source_component_id&&i.get(q.source_component_id)?.ftype==="simple_chip").map((q)=>q.source_component_id)).size!==1)continue;let Y=s.get(y.source_component_id),b=p.find((q)=>q.source_port_id===y.source_port_id&&q.schematic_component_id===Y?.schematicComponentId);if(!Y||!b||b.schematic_sheet_id!==Y.schematicSheetId)continue;let M=[],O=[],X=[],E=!1;for(let q of new Set(_.map((ct)=>ct.source_component_id))){if(!q||q===y.source_component_id)continue;let ct=i.get(q)?.ftype,Q=a.get(q)??[],k=s.get(q);if(ct==="simple_connector"||ct==="simple_pin_header")continue;if(!k){E=!0;break}if(ct==="simple_test_point"&&Q.length===1){X.push(k);continue}if(Q.length!==2){E=!0;break}let st=Q.find((Z)=>e(Z.source_port_id)!==f);if(!st){E=!0;break}let ot=e(st.source_port_id);if(ct==="simple_resistor"&&c.has(ot)&&!l.has(ot))M.push(k);else if(ct==="simple_capacitor"&&l.has(ot)&&!c.has(ot))O.push(k);else{E=!0;break}}if(E||M.length!==1||O.length!==1)continue;let I=[...M,...O,...X],U=Y.schematicComponentId?d.get(Y.schematicComponentId)?.schematic_group_id:void 0;if(I.some((q)=>{let ct=q.schematicComponentId?d.get(q.schematicComponentId)?.schematic_group_id:void 0;return q.schematicSheetId!==Y.schematicSheetId||q.subcircuitId!==Y.subcircuitId||ct!==U}))continue;m.push({host:Y,pin:y,pinPosition:b.center,members:I})}return m}static issueToString(t){let e=[];return S(e,"hostComponentName",t.hostSchematicBox.sourceComponentName),S(e,"resetPin",t.resetPinName),S(e,"supportNetworkComponents",t.supportNetworkComponents.map((r)=>r.sourceComponentName||"component").join(",")),S(e,"maxDistanceFromResetPin",t.maxDistanceFromResetPin),S(e,"maxRecommendedDistance",t.maxRecommendedDistance),S(e,"message",t.message),`<ResetNetworkNotGrouped ${e.join(" ")} />`}}var B0=(t)=>[t.name,...t.port_hints??[]].find((e)=>/^N?(RESET|RST)(N|B)?$/.test(e.toUpperCase().replace(/[_\-!~#/]/g,"")));var G9={RailPathTooSpreadOut:[gr],CapacitorSeparatedFromChipPins:[xr],PiFilterComponentsNotGrouped:[br],MosfetGateNetworkNotGrouped:[vr],FlybackDiodeSeparatedFromRelayCoil:[Sr],ComponentOverlap:[tr],SchematicBoxHasALotOfSurroundingWhitespace:[],CapacitorSymbolHorizontal:[re,le],VerboseSchematicNetLabel:[Gr],PinHeaderSchematicBoxTooWide:[er],GenericSchematicBoxTooWide:[er],SchematicBoxInnerLabelCollision:[Lr],SchematicPinPaddingToEdgeTooLarge:[Tr],DiodeResistorNotAligned:[he],ParallelDiodeResistorNotAligned:[fr],ComponentPinsWouldAlignWithVerticalShift:[je],TraceCanBeSimplifiedByMovingComponent:[ne],CrystalNotCenteredOverLoadCapacitors:[$e],ComponentNetLabelCollision:[Oe],ComponentBoxNetLabelCollision:[Oe],NetLabelCollision:[Oe],FeedbackNetworkNotCompact:[qe],PullResistorOnWrongSide:[Xe,Dn],SchematicTextCollision:[Qr],ResetNetworkNotGrouped:[lr],TwoPinComponentCouldBeFlipped:[oe],TwoPinComponentShouldBeVertical:[le],TwoPinComponentHasInvertedRails:[le],DecouplingCapacitorsNotCloseTogether:[Se],ConnectorPositionCausesTraceDetours:[Pr],LowSideTransistorNotAlignedWithLoad:[Ir],UsbSeriesResistorsNotAligned:[Mr],CurrentSenseShuntSeparatedFromInputs:[wr],VoltageDividerSupplyResistorBelowGroundResistor:[Ar],RegulatorCapacitorsOnWrongSides:[Br]};class $c extends bm{ctx;issues=[];pipelineDef=[Mt("ParallelDiodeResistorPlacementSolver",fr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SchematicTextClearanceSolver",Qr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("ResetNetworkGroupingSolver",lr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SchematicBoxOverlapSolver",tr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("CapacitorOrientationSolver",re,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("VerboseNetLabelSolver",Gr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SchematicBoxTooWideSolver",er,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SchematicPinPaddingToEdgeSolver",Tr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SchematicBoxInnerLabelCollisionSolver",Lr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("DiodeResistorAlignmentSolver",he,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("ComponentPinAlignmentSolver",je,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("TraceSimplificationSolver",ne,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("CrystalLoadCapacitorPlacementSolver",$e,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("TwoPinComponentOrientationSolver",oe,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("FeedbackNetworkPlacementSolver",qe,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("TwoPinComponentRailOrientationSolver",le,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("PullResistorPlacementSolver",Xe,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("SwitchPullResistorPlacementSolver",Dn,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("ComponentNetLabelCollisionSolver",Oe,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("DecouplingCapacitorGroupingSolver",Se,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("ConnectorPlacementSolver",Pr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("LowSideTransistorPlacementSolver",Ir,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("UsbSeriesResistorPlacementSolver",Mr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("RegulatorInputOutputCapacitorPlacementSolver",Br,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("VoltageDividerPlacementSolver",Ar,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("CurrentSenseShuntPlacementSolver",wr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("RelayFlybackDiodePlacementSolver",Sr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("PiFilterPlacementSolver",br,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("MosfetGateNetworkPlacementSolver",vr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("ChipPinPairCapacitorPlacementSolver",xr,(t)=>[{ctx:t.ctx,issues:t.issues}]),Mt("RailPathVisibilitySolver",gr,(t)=>[{ctx:t.ctx,issues:t.issues,maxSpan:t.railPathVisibility?.maxSpan,maxLength:t.railPathVisibility?.maxPathLength}])];selectedIssueTypes;railPathVisibility;constructor(t,e={}){super(t);if(this.railPathVisibility=e.railPathVisibility,e.issueTypes!==void 0){this.selectedIssueTypes=new Set(e.issueTypes);let r=new Set(e.issueTypes.flatMap((i)=>G9[i]));this.pipelineDef=this.pipelineDef.filter((i)=>r.has(i.solverClass))}}_setup(){this.ctx=S0(this.inputProblem)}getOutput(){let t=new Set(this.issues.flatMap((e)=>e.lineItemType==="TwoPinComponentShouldBeVertical"&&e.schematicBox.schematicComponentId?[e.schematicBox.schematicComponentId]:[]));return{issues:this.issues.filter((e)=>e.lineItemType!=="CapacitorSymbolHorizontal"||!t.has(e.schematicBox.schematicComponentId??"")).filter((e)=>this.selectedIssueTypes===void 0||this.selectedIssueTypes.has(e.lineItemType)),componentPlacements:this.ctx.componentPlacements}}}var Gn=({issues:t,componentPlacements:e,circuitJson:r})=>{let i=new Set,n=new Map(e.flatMap((l)=>l.schematicComponentId?[[l.schematicComponentId,l]]:[])),a=new Map;for(let l of e){if(!l.sourceComponentName)continue;let s=a.get(l.sourceComponentName);if(s)s.push(l);else a.set(l.sourceComponentName,[l])}let o=(l)=>{if(!l)return;let s=l.schematicComponentId?n.get(l.schematicComponentId):e.find((p)=>p.sourceComponentId===l.sourceComponentId&&p.schX===l.schX&&p.schY===l.schY);if(s)i.add(s)},c=(l,s)=>{if(!l)return;for(let p of a.get(l)??[])if(s===void 0||p.schematicSheetId===s)i.add(p)};for(let l of t)switch(l.lineItemType){case"CapacitorSeparatedFromChipPins":o(l.hostSchematicBox),o(l.capacitorSchematicBox);break;case"PiFilterComponentsNotGrouped":o(l.inductorSchematicBox),o(l.firstCapacitorSchematicBox),o(l.secondCapacitorSchematicBox);break;case"MosfetGateNetworkNotGrouped":o(l.mosfetSchematicBox),o(l.seriesGateResistorSchematicBox),o(l.gateSourceResistorSchematicBox);break;case"FlybackDiodeSeparatedFromRelayCoil":o(l.relaySchematicBox),o(l.diodeSchematicBox);break;case"CurrentSenseShuntSeparatedFromInputs":o(l.amplifierSchematicBox),o(l.shuntSchematicBox);break;case"VoltageDividerSupplyResistorBelowGroundResistor":o(l.supplyResistorSchematicBox),o(l.groundResistorSchematicBox);break;case"RegulatorCapacitorsOnWrongSides":o(l.regulatorSchematicBox),o(l.inputCapacitorSchematicBox),o(l.outputCapacitorSchematicBox);break;case"UsbSeriesResistorsNotAligned":o(l.positiveResistorSchematicBox),o(l.negativeResistorSchematicBox);break;case"LowSideTransistorNotAlignedWithLoad":o(l.transistorSchematicBox),o(l.loadSchematicBox),o(l.baseResistorSchematicBox),o(l.clampDiodeSchematicBox);break;case"DecouplingCapacitorsNotCloseTogether":for(let s of l.capacitorSchematicBoxes)o(s);break;case"ConnectorPositionCausesTraceDetours":o(l.connectorSchematicBox);for(let s of l.connectedComponents)o(s);break;case"ResetNetworkNotGrouped":o(l.hostSchematicBox);for(let s of l.supportNetworkComponents)o(s);break;case"SchematicTextCollision":if(l.collidingObject.schematicComponentId)o(n.get(l.collidingObject.schematicComponentId));if(l.collidingObject.type==="trace")for(let s of F0({schematicTraceId:l.collidingObject.id,circuitJson:r,placementByComponentId:n}))o(s);break;case"ComponentOverlap":o(l.firstComponent),o(l.secondComponent);break;case"SchematicBoxHasALotOfSurroundingWhitespace":case"CapacitorSymbolHorizontal":case"PinHeaderSchematicBoxTooWide":case"GenericSchematicBoxTooWide":case"SchematicBoxInnerLabelCollision":case"SchematicPinPaddingToEdgeTooLarge":o(l.schematicBox);break;case"VerboseSchematicNetLabel":for(let s of l.involvedPins)c(Q9(s),l.schematicSheetId);break;case"ParallelDiodeResistorNotAligned":case"DiodeResistorNotAligned":o(l.diodeSchematicBox),o(l.resistorSchematicBox);break;case"ComponentPinsWouldAlignWithVerticalShift":o(l.firstComponent),o(l.secondComponent),o(l.targetComponent);break;case"TraceCanBeSimplifiedByMovingComponent":o(l.targetComponent);for(let s of F0({schematicTraceId:l.schematicTraceId,circuitJson:r,placementByComponentId:n}))i.add(s);break;case"CrystalNotCenteredOverLoadCapacitors":o(l.crystalSchematicBox),o(l.firstLoadCapacitorSchematicBox),o(l.secondLoadCapacitorSchematicBox);break;case"TwoPinComponentCouldBeFlipped":o(l.targetComponent),o(l.connectedComponent);break;case"FeedbackNetworkNotCompact":o(l.amplifierSchematicBox);for(let s of l.feedbackComponents)o(s);break;case"TwoPinComponentShouldBeVertical":case"TwoPinComponentHasInvertedRails":o(l.schematicBox);break;case"RailPathTooSpreadOut":o(l.hostSchematicBox);for(let s of l.supportSchematicBoxes)o(s);break;case"PullResistorOnWrongSide":o(l.resistorSchematicBox),o(l.hostSchematicBox);break;case"ComponentNetLabelCollision":o(l.firstComponent),o(l.secondComponent);break;case"ComponentBoxNetLabelCollision":o(l.boxComponent),o(l.labelComponent);break;case"NetLabelCollision":for(let s of l.pairs)c(s.comp1Name,l.schematicSheetId),c(s.comp2Name,l.schematicSheetId);for(let s of l.moves)c(s.componentName,l.schematicSheetId);break}return e.filter((l)=>i.has(l))},pr=(t)=>{if("schematicSheetId"in t||"schematicSheetName"in t){let e="schematicSheetId"in t&&typeof t.schematicSheetId==="string"?t.schematicSheetId:void 0,r="schematicSheetName"in t&&typeof t.schematicSheetName==="string"?t.schematicSheetName:void 0;if(e||r)return{schematicSheetId:e,schematicSheetName:r}}for(let e of Object.values(t).flat())if(H9(e))return{schematicSheetId:e.schematicSheetId,schematicSheetName:e.schematicSheetName};return{}},Q9=(t)=>{let e=t.lastIndexOf(".");return e===-1?t:t.slice(0,e)},H9=(t)=>Boolean(t&&typeof t==="object"&&"positionAnchor"in t&&t.positionAnchor==="center"&&"schX"in t&&"schY"in t&&"width"in t&&"height"in t),F0=({schematicTraceId:t,circuitJson:e,placementByComponentId:r})=>{let i=e.find((s)=>s.type==="schematic_trace"&&s.schematic_trace_id===t),n=i?.edges[0],a=i?.edges.at(-1);if(!i||!n||!a)return[];let o=e.filter((s)=>s.type==="schematic_port"),c=new Map(o.map((s)=>[s.schematic_port_id,s]));return[n.from_schematic_port_id?c.get(n.from_schematic_port_id):P0(o,n.from,i.schematic_sheet_id),a.to_schematic_port_id?c.get(a.to_schematic_port_id):P0(o,a.to,i.schematic_sheet_id)].flatMap((s)=>{let p=s?.schematic_component_id?r.get(s.schematic_component_id):void 0;return p?[p]:[]})},P0=(t,e,r)=>t.find((i)=>i.schematic_sheet_id===r&&Math.abs(i.center.x-e.x)<=0.01&&Math.abs(i.center.y-e.y)<=0.01);class Xc{lineItems;groupBySchematicSheet;constructor(t,e=!1){this.lineItems=t;this.groupBySchematicSheet=e}getLineItems(){return this.lineItems}getIssues(t={}){return this.lineItems.flatMap((e)=>e.lineItemType==="SchematicPlacementIssues"?e.issues:[]).filter((e)=>(t.issueTypes===void 0||t.issueTypes.includes(e.lineItemType))&&(t.schematicSheetId===void 0||(pr(e).schematicSheetId??"")===t.schematicSheetId))}getIssueCounts(t={}){let e={FlybackDiodeSeparatedFromRelayCoil:0,ComponentOverlap:0,SchematicBoxHasALotOfSurroundingWhitespace:0,CapacitorSymbolHorizontal:0,VerboseSchematicNetLabel:0,PinHeaderSchematicBoxTooWide:0,GenericSchematicBoxTooWide:0,SchematicBoxInnerLabelCollision:0,SchematicPinPaddingToEdgeTooLarge:0,DiodeResistorNotAligned:0,ParallelDiodeResistorNotAligned:0,ComponentPinsWouldAlignWithVerticalShift:0,TraceCanBeSimplifiedByMovingComponent:0,CrystalNotCenteredOverLoadCapacitors:0,ComponentNetLabelCollision:0,ComponentBoxNetLabelCollision:0,NetLabelCollision:0,FeedbackNetworkNotCompact:0,PullResistorOnWrongSide:0,SchematicTextCollision:0,ResetNetworkNotGrouped:0,TwoPinComponentCouldBeFlipped:0,TwoPinComponentShouldBeVertical:0,TwoPinComponentHasInvertedRails:0,DecouplingCapacitorsNotCloseTogether:0,ConnectorPositionCausesTraceDetours:0,LowSideTransistorNotAlignedWithLoad:0,UsbSeriesResistorsNotAligned:0,RegulatorCapacitorsOnWrongSides:0,VoltageDividerSupplyResistorBelowGroundResistor:0,CurrentSenseShuntSeparatedFromInputs:0,PiFilterComponentsNotGrouped:0,MosfetGateNetworkNotGrouped:0,CapacitorSeparatedFromChipPins:0,RailPathTooSpreadOut:0};for(let r of this.getIssues(t))e[r.lineItemType]++;return e}getString(){return this.toString()}schematicBoxPlacementsToString(t){let e=[];return S(e,"componentName",t.sourceComponentName),S(e,"positionAnchor",t.positionAnchor),S(e,"schX",t.schX),S(e,"schY",t.schY),S(e,"width",t.width),S(e,"height",t.height),`<SchematicBoxPlacement ${e.join(" ")} />`}schematicIssuesToString(t){switch(t.lineItemType){case"CapacitorSeparatedFromChipPins":return xr.issueToString(t);case"PiFilterComponentsNotGrouped":return br.issueToString(t);case"MosfetGateNetworkNotGrouped":return vr.issueToString(t);case"CurrentSenseShuntSeparatedFromInputs":return wr.issueToString(t);case"ComponentOverlap":return tr.issueToString(t);case"CapacitorSymbolHorizontal":return re.issueToString(t);case"DecouplingCapacitorsNotCloseTogether":return Se.issueToString(t);case"VerboseSchematicNetLabel":return Gr.issueToString(t);case"PinHeaderSchematicBoxTooWide":case"GenericSchematicBoxTooWide":return er.issueToString(t);case"SchematicBoxInnerLabelCollision":return Lr.issueToString(t);case"SchematicPinPaddingToEdgeTooLarge":return Tr.issueToString(t);case"ParallelDiodeResistorNotAligned":return fr.issueToString(t);case"DiodeResistorNotAligned":return he.issueToString(t);case"ComponentPinsWouldAlignWithVerticalShift":return je.issueToString(t);case"TraceCanBeSimplifiedByMovingComponent":return ne.issueToString(t);case"CrystalNotCenteredOverLoadCapacitors":return $e.issueToString(t);case"TwoPinComponentCouldBeFlipped":return oe.issueToString(t);case"FeedbackNetworkNotCompact":return qe.issueToString(t);case"TwoPinComponentShouldBeVertical":case"TwoPinComponentHasInvertedRails":return le.issueToString(t);case"RailPathTooSpreadOut":return gr.issueToString(t);case"PullResistorOnWrongSide":return Xe.issueToString(t);case"NetLabelCollision":return Oe.netLabelCollisionToString(t);case"SchematicTextCollision":return Qr.issueToString(t);case"ResetNetworkNotGrouped":return lr.issueToString(t);case"ConnectorPositionCausesTraceDetours":return Pr.issueToString(t);case"LowSideTransistorNotAlignedWithLoad":return Ir.issueToString(t);case"FlybackDiodeSeparatedFromRelayCoil":return Sr.issueToString(t);case"VoltageDividerSupplyResistorBelowGroundResistor":return Ar.issueToString(t);case"RegulatorCapacitorsOnWrongSides":return Br.issueToString(t);case"UsbSeriesResistorsNotAligned":return Mr.issueToString(t);default:return""}}toString(){let t=this.lineItems.filter((n)=>n.lineItemType==="SchematicBoxPlacement"),e=this.lineItems.flatMap((n)=>n.lineItemType==="SchematicPlacementIssues"?n.issues:[]);if(e.length===0)return"";if(!this.groupBySchematicSheet)return this.issueContextToLines(t,e).join(`
`);let r=new Map,i=(n)=>{let a=n.schematicSheetId??n.schematicSheetName??"__default__",o=r.get(a);if(o)return o;let c={...n,placements:[],issues:[]};return r.set(a,c),c};for(let n of e)i(pr(n)).issues.push(n);for(let n of t)i({schematicSheetId:n.schematicSheetId,schematicSheetName:n.schematicSheetName}).placements.push(n);return[...r.values()].flatMap((n)=>{let a=[];return S(a,"name",n.schematicSheetName),S(a,"id",n.schematicSheetId),[`<SchematicSheet${a.length>0?` ${a.join(" ")}`:""}>`,...this.issueContextToLines(n.placements,n.issues),"</SchematicSheet>"]}).join(`
`)}issueContextToLines(t,e){return[...t.length>0?["<SchematicBoxPositions>",...t.map(this.schematicBoxPlacementsToString),"</SchematicBoxPositions>"]:[],"<SchematicPlacementIssues>",...e.map(this.schematicIssuesToString),"</SchematicPlacementIssues>"]}}var Vc=(t,e={})=>{let r=new $c(t,e);r.solve();let{issues:i,componentPlacements:n}=r.getOutput(),o=[...Gn({issues:i,componentPlacements:n,circuitJson:t}),...i.length>0?[{lineItemType:"SchematicPlacementIssues",issues:i}]:[]],c=new Set(t.flatMap((l)=>("schematic_sheet_id"in l)&&typeof l.schematic_sheet_id==="string"?[l.schematic_sheet_id]:[]));return new Xc(o,c.size>1)};function Z9(t){let e=t.match(/<svg([^>]*)>/);if(!e)throw Error("Invalid SVG string: No <svg> tag found");let r={},i={},n=e[1]??"",a=/([A-Za-z_:][A-Za-z0-9_.:-]*)=(?:"([^"]*)"|'([^']*)')/g,o;while((o=a.exec(n))!==null){let _=o[1],x=o[2]??o[3];if(!_||x===void 0)continue;if(_==="xmlns"||_.startsWith("xmlns:"))i[_]=x;r[_]=x}let c=0,l=0,s,p,d,m,u;if(r.viewBox){s=r.viewBox;let _=s.trim().split(/[\s,]+/).map((x)=>Number.parseFloat(x));if(Number.isFinite(_[0]))p=_[0];if(Number.isFinite(_[1]))d=_[1];if(Number.isFinite(_[2]))m=_[2];if(Number.isFinite(_[3]))u=_[3];if(!r.width&&Number.isFinite(m))c=m;if(!r.height&&Number.isFinite(u))l=u}if(r.width){let _=Number.parseFloat(r.width);if(Number.isFinite(_))c=_}if(r.height){let _=Number.parseFloat(r.height);if(Number.isFinite(_))l=_}if(!Number.isFinite(c))c=0;if(!Number.isFinite(l))l=0;let f=t.match(/<svg[^>]*>([\s\S]*)<\/svg>/)?.[1]?.trim()??"";return{width:c,height:l,viewBox:s,viewBoxMinX:p,viewBoxMinY:d,viewBoxWidth:m,viewBoxHeight:u,content:f,attributes:r,xmlnsAttributes:i}}function K9(t,e,r){let i=[];if(i.push(`translate(${e}, ${r})`),t.viewBoxMinX!==void 0&&t.viewBoxMinY!==void 0&&t.viewBoxWidth&&t.viewBoxHeight){let{viewBoxMinX:a,viewBoxMinY:o}=t,c=t.width||t.viewBoxWidth,l=t.height||t.viewBoxHeight,s=c/t.viewBoxWidth,p=l/t.viewBoxHeight;i.push(`scale(${s}, ${p})`),i.push(`translate(${-a}, ${-o})`)}return i.join(" ")}function J9(t,e){let r=new Map,i=/\bid="([^"]+)"/g,n;while((n=i.exec(t))!==null){let o=n[1];if(!o)continue;let c=`${o}${e}`;r.set(o,c)}if(r.size===0)return t;let a=t.replace(i,(o,c)=>`id="${r.get(c)||c}"`);return a=a.replace(/url\(#([^)]+)\)/g,(o,c)=>r.has(c)?`url(#${r.get(c)})`:o),a=a.replace(/(xlink:href|href)="#([^"]+)"/g,(o,c,l)=>r.has(l)?`${c}="#${r.get(l)}"`:o),a=a.replace(/style="([^"]*)"/g,(o,c)=>`style="${c.replace(/url\(#([^)]+)\)/g,(s,p)=>r.has(p)?`url(#${r.get(p)})`:s)}"`),a}function q9(t,e){if(t.length===0)return t;let r=0;for(let n of t){let a=Math.max(n.width,n.height);if(a>r)r=a}if(r===0)return t;let i=e??r;return t.map((n)=>{let a=Math.max(n.width,n.height);if(a===0)return n;let o=i/a;return{...n,width:n.width*o,height:n.height*o}})}function t4(t){let e={};e.xmlns="http://www.w3.org/2000/svg";for(let r of t)for(let[i,n]of Object.entries(r.xmlnsAttributes))if(!e[i])e[i]=n;return e}function e4(t){return Object.entries(t).map(([e,r])=>`${e}="${r}"`).join(" ")}function I0(t,e={}){let r=e.gap??0;if(!Number.isFinite(r))r=0;let i=e.normalizeSize??!0;if(t.length===0)return'<svg width="0" height="0" viewBox="0 0 0 0" xmlns="http://www.w3.org/2000/svg"></svg>';let n=t.map((u,y)=>{try{return Z9(u)}catch(f){throw Error(`Failed to parse SVG at index ${y}: ${f.message}`)}}),a=i?q9(n,e.targetSize):n,o=Math.max(...a.map((u)=>u.width)),c=a.reduce((u,y)=>u+y.height,0)+r*(a.length-1),l=0,s=[];for(let u=0;u<a.length;u++){let y=a[u];if(!y)continue;let f=(o-y.width)/2,_=u===0?y.content:J9(y.content,`__stack${u}`),x=K9(y,f,l);s.push(`  <g transform="${x}">
    ${_}
  </g>`),l+=y.height+r}let p=t4(a),d={width:o.toString(),height:c.toString(),viewBox:`0 0 ${o} ${c}`,...p,...e.rootAttributes||{}};return`<svg ${e4(d)}>
${s.join(`
`)}
</svg>`}var M0="T1RUTwAJAIAAAwAQQ0ZGIFhQSpcAAAcwAABJ3U9TLzJqmmVhAAABAAAAAGBjbWFwFN0WswAABEwAAALEaGVhZC1P1HwAAACcAAAANmhoZWEDrgI1AAAA1AAAACRobXR44xAAAAAAURAAAAFQbWF4cABUUAAAAAD4AAAABm5hbWUZQ94BAAABYAAAAutwb3N0AAMAAAAABxAAAAAgAAEAAAABAADb+Z65Xw889QADA+gAAAAA5e9IsgAAAADl70iy/9P/PwKHAvkAAAADAAIAAAAAAAAAAQAAA6z/LAAAArQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAFQAAFAAAFQAAAADArQB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAABYWFhYAEAAIQB6A6z/LAAAAvkAwQAAAAEAAAAAAiwC1wAAAAAAAAAAACIBngABAAAAAAAAAAEAWQABAAAAAAABABEAAAABAAAAAAACAAcAMwABAAAAAAADABsA/AABAAAAAAAEABkASAABAAAAAAAFAAsA2wABAAAAAAAGABgAkwABAAAAAAAHAAEAWQABAAAAAAAIAAEAWQABAAAAAAAJAAEAWQABAAAAAAAKAAEAWQABAAAAAAALAAEAWQABAAAAAAAMAAEAWQABAAAAAAANAAEAWQABAAAAAAAOAAEAWQABAAAAAAAQABEAAAABAAAAAAARAAcAMwADAAEECQAAAAIAgwADAAEECQABACIAEQADAAEECQACAA4AOgADAAEECQADADYBFwADAAEECQAEADIAYQADAAEECQAFABYA5gADAAEECQAGADAAqwADAAEECQAHAAIAgwADAAEECQAIAAIAgwADAAEECQAJAAIAgwADAAEECQAKAAIAgwADAAEECQALAAIAgwADAAEECQAMAAIAgwADAAEECQANAAIAgwADAAEECQAOAAIAgwADAAEECQAQACIAEQADAAEECQARAA4AOlRzY2lyY3VpdEFscGhhYmV0AFQAcwBjAGkAcgBjAHUAaQB0AEEAbABwAGgAYQBiAGUAdFJlZ3VsYXIAUgBlAGcAdQBsAGEAclRzY2lyY3VpdEFscGhhYmV0IFJlZ3VsYXIAVABzAGMAaQByAGMAdQBpAHQAQQBsAHAAaABhAGIAZQB0ACAAUgBlAGcAdQBsAGEAclRzY2lyY3VpdEFscGhhYmV0UmVndWxhcgBUAHMAYwBpAHIAYwB1AGkAdABBAGwAcABoAGEAYgBlAHQAUgBlAGcAdQBsAGEAclZlcnNpb24gMC4xAFYAZQByAHMAaQBvAG4AIAAwAC4AMSA6VHNjaXJjdWl0QWxwaGFiZXQgUmVndWxhcgAgADoAVABzAGMAaQByAGMAdQBpAHQAQQBsAHAAaABhAGIAZQB0ACAAUgBlAGcAdQBsAGEAcgAAAAABAAMAAQAAAAwABAK4AAAAqgCAAAYAKgAAACEAIgAjACQAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA8AD0APgBBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAev//AAAAAAAhACIAIwAkACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAPAA9AD4AQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBhAGIAYwBkAGUAZgBnAGgAaQBqAGsAbABtAG4AbwBwAHEAcgBzAHQAdQB2AHcAeAB5AHr//wAA/+D/4P/g/+D/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/e/97/3v/c/9z/3P/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9r/2v/a/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2f/Z/9n/2QABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEABAEAAQEBGVRzY2lyY3VpdEFscGhhYmV0UmVndWxhcgABAQEo+BsA+BwC+B0D+B4Ei/tV+kD5SAUdAAABOQ8dAAAB4BGLHQAASd0SAFcBAQwlNj0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkFZlcnNpb24gMC4xVHNjaXJjdWl0QWxwaGFiZXQgUmVndWxhclRzY2lyY3VpdEFscGhhYmV0UmVndWxhciEiIyQnKCkqKywtLi8wMTIzNDU2Nzg5PD0+QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2FiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6AAAAAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHPAdAB0QHSAdMB1AHVAdYB1wHYAdkB2gHbAdwB3QBUAgABAAQAeADuAgwFUgWPBmUHOwffCGMIzwkMCUgJhQq1CzwMhg5ADwwQUBHfEt8U3hYZFqIXFxeiGEIZtBsIHCccsh0sHpIfGh9XIC8gtiEFIjwjJSRTJWUmviftKXQp2CqzK0gsfS0ILW8uPy6iLuAvQy+2L/IxEDItM0A0XjWWNlQ39zjFOTk59zp9Oro76Dy1Pd8+/EAaQJVCDELOQ49EGEVZReRGgUdR+UgO+Uj37vlBFYv8VgWIewWBfQV8ggV6iAV6jgV8lAWBmQWImwWL+FYFjpsFlZkFmpQFnI8FnIcFmoIFlX0FL/z3Fe+LBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBSeLBXqOBX2UBYGZBYebBY+bBZWZBZmUBQ75SPdm+UEVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQX3p3sVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj3XvcoFYAiBYZ7BYB/BXyDBXmJBXqQBX6VBYOaBYmbBZPgBSR/BXqMBXuSBX+YBYaaBYycBZOaBZiVBZyRBfcPmgWe91QFKH8FeYwFfJIFf5gFhZoFjZwFkpkFmZYFm5EF9wyZBZ33RgWQmgWWmAWakwWdjQWchgWYgQWUfAWMewV7+zIF9zifBZr3JgWQmgWWmAWbkwWcjQWchgWZgQWTfAWNewV++xMF8JcFnIoFm4QFl34FkHwFinoFg30FfoAFeoUF+w19BXj7VQXslwWdigWahAWXfwWRewWKegWDfQV+gAV6hgX7CnwFfvscBYZ7BX9/BXyDBXqJBXqQBX2VBYOaBYmbBZf3CQX7MM0V9zifBZ/3VAX7OHcFDvlI9/T5XhWL/awFiHoFgX4FfIEFeogFeo4FfJUFgpgFh5wFi/msBY+bBZSZBZqUBZyOBZyIBZqCBZV9BfcB+2YVNd0FgpkFiJsFjpsFlZkFmpQFnI4FnIcFmoIF4DkFlX0FjnoFh3sFgX4FfYIFeYgFeo4FQ9sV+z+bBXuQBX2VBYOaBYmbBZCbBZeYBZqTBZ2MBfc+ewWchgWZgAWTfQWMegWGfAWAfgV8gwX7LqUVKjgFe4MFeogFeo8FfZUFgpkFiJwFkJsFlZgF7d4FmpMFnI0FnIcFmYEFlH0FjnsFh3sFLD4VZvsHBYN8BX2BBXqGBXqMBXuTBYCYBYabBY2bBa/3CAWTmQWZlgWckAWciQWbgwWWfwWQewVkIRWkSQWNegWHewWAfgV8gwV6iQV6jwV9lQWCmQVyzQWJmwWPmwWWmQWakwWcjQWchwWZgQWdTxXUWgWXfwWRewWKewWEfAV+fwV7hgV5iwV7kgVCvQV/lwWFmgWLnAWTmgWYlgWbkQWdigXTWhX3fFkFm4QFl38FkXwFi3oFhHwFfoAFe4UFeYwF+3y8BXuSBX+XBYWaBYycBZKaBZeWBZyRBfedUhXVWgWWfwWSewWKewWEfAV+fwV6hgV6iwV7kgVCvAV/mAWFmgWLnAWTmgWXlgWckQWcigX2PBWjOAWMewWGewV/fgV8hAV5igV6kAV+lgWDmQVz3gWKmwWQmwWXmAWakgWdjAWbhgWZgAWp+xAVW/sHBYF9BX2BBXqIBXmOBX2UBYGYBYebBY6cBbz3BwWUmQWalQWcjgWciAWaggWVfQWPewU/+y8V+w5aBXqHBXmOBX2UBYGZBYebBY6bBZWZBZmUBfcOvQWcjgWciAWaggWVfgWPewWIewWBfQX7M00V+zObBXuQBX2WBYOZBYqcBZCaBZaYBZuTBZyMBfczewWchgWYgAWTfAWNewWFewWAfwV7gwX7VqAVNb0Ff5YFg5oFi5sFkZsFl5cFm5IFnIsFnIYF4FkFmIAFknwFjHoFhXwFf38Fe4QFeYoF+wzZFWbuBYmbBY+bBZaYBZqUBZyNBZyHBZmBBZR9BbAnBY17BYd7BYB+BXyDBXmIBXqQBX2VBQ75SPfu+UEVi/uBBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3gQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj4Ko0VsmUFlX0FjnsFh3sFgX0FfYIFeYgFeo8FfZQFYrMFio0FiYwFY7sFiowFiowFYsMFiowFiowFY8oFio4FiY0FbcoFio4FiY4Fd8oFi44Fio0FgcMFi5IFi5IFlcMFjI0Fi44Fn8oFjY4FjI4FqcoFjY0FjI4Fs8oFjIwFjIwFtMMFjIwFjIwFs7sFjYwFjI0FtLMFmZQFnI8FnYgFmYIFlX0Fj3sFiHsFgX0FZGUFZV4FZFUFZE8Fb1AFeFEFg10Fk10FnlEFp1AFsk8FslUFDvlI95tWFYqJBWJjBX2CBXqHBXmOBX2UBYGZBYebBY6bBZWZBbKxBbG4BbLBBbLHBafGBZ7FBZO5BYO5BXjFBW/GBWTHBWTBBWW4BWSxBYGZBYibBY+bBZWZBZqUBZyOBZyHBZmCBbRjBYyJBY2KBbRbBYuKBY2KBbNTBYyKBYyKBbRMBYuIBY2JBapMBYuIBY2IBZ9MBYuIBYyJBZVTBYuEBYuEBYFTBYqJBYuIBXdMBYmIBYuIBWxMBYmJBYuIBWJMBYqKBYqKBWNTBYmKBYuKBWJbBQ75SPeU+FUV+zRWBXqIBXqPBX2VBYKZBYicBY+bBZaYBZqTBfc5wgUh9yQFhJoFi5sFkZsFmJYFm5IFnIsFm4UFmIAF8fsfBfH3HwWYlgWbkQWciwWchAWXgAWRewWLewWEfAUh+yQF9zlUBZqDBZZ+BY97BYh6BYJ9BX2BBXqHBXqOBfs0wAWL+yoFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFDvlI95T39hWL90sFjpwFlZgFmpUFnI4FnIgFmoEFlX4FjnoFi/tLBfdpiwWciAWaggWVfQWOewWIegWBfgV8ggV6hwX7aYsFi/tLBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv3SwX7aYsFeo8FfJQFgZgFiJwFjpsFlZkFmpQFnI4FDvlI96puFcJVBZV9BY56BYd7BYF+BXyCBXqIBXqOBX2VBTXfBYeRBYaRBYuMBYqMBYqSBYmSBYyMBYqMBY2SBYyTBYyLBYuMBZCRBY+RBfc/9zwFmpUFnI4FnIgFmoMFlX0Fj3sFiHsFgX0FDvlI90L35RX3kosFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogF+5KLBXqOBXyUBYGZBYibBY6bBZWZBZqUBQ75SPf/7RX7D4sFeY4FfZQFgZkFiJsFjpsFlZkFmZQFnY4F9w+LBZyIBZmCBZV9BY97BYd7BYF9BX2CBQ75SKOAFfhx+WMFl5cFm5EFnYwFm4UFmIAFknwFjHoFhXwF/HH9YwV/fwV7hQV5igV7kQV+lgWEmgWKnAUO+Uj4CfkPFUOeBUN4BUZQBWMvBYH7JQWj+wwFxi0F2F0FyYsF2LkFxukFo/cMBYH3JQVj5wVq9x4VjYoFkYgFkYgFjIoFjYoF4EEFi4sFjIoFj4UFkIUFi4oFjIoFuSEFjIQFjYUFlvsyBYqGBYuGBXH7GQWIhQWJhAVH+wIFiYoFiokFhocFh4YFiYoFiooFKVEFh4kFiIkFhooFh4oFh4sFh4oFM4sFh4wFh4sFh4wFhowFiI0Fh40FKcUFiowFiYwFh5AFho8Fio0FiowFRvcCBYmSBYiRBXH3GQWLkAWKkAWW9zIFjZEFjJIFufUFjIwFi4wFkJEFj5EFjIwFjIsF39UFjYwFjIwFkY4FkY4FjYwFjYsF6aMFjowFjowFkYoFkYwFjooFjooF6XMFDvlI9/v5ZRWQjgWNjAWNjAWSiwWSjQWMigWNiwWSigWSiQWMigWNiwWRhwWQhwWMigWNigWOhQWPhQWMigWLiQWMhQWNhAWL/REFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/i2BTRFBXuDBXqJBXqPBX2WBYOZBYmbBY+bBZaYBfc19xUFDvlI90rmFffoiwWdiAWZggWVfQWOewWIewWBfQV9ggV5iAX8TosFg4wFg4wFiowFiosFhY8FhI8Fi4sFiowFhpEFh5EFi4wFiowFipIFiZIFi4wFi4wFjJIFjJIFjIwFi4wFj5EFj5EF9zn3PgX3L/dKBcTlBZezBYueBYOqBXeiBV6dBUaQBWaGBVBzBWttBX9mBYN9BX6ABXqGBXmNBXyTBYCYBYaaBYycBZu6BYuMBYyNBY+QBY6RBYyMBYyNBbi2BYuLBYuLBZOQBZKQBYuLBYuLBdWoBZCNBZGMBbqSBZCKBZCMBd2FBZKJBZKKBclxBYyKBY2LBZCHBZGHBYyKBY2JBaxlBYyKBYuKBY+FBY6EBYuKBYyKBZdeBYuFBYyGBYptBYqGBYuGBX1ZBYiFBYmGBUwpBYmJBYqJBfsy+04FiooFiooFDvlI9wqUFYeMBVObBXySBX+YBYabBY2bBZOaBZmVBZuQBZ2KBcB8BdeABeiJBb2WBdGxBbW2BZy5BYOvBWWzBUStBTSiBT2UBYiMBYiLBYWOBYaMBYmNBYiNBYePBYeOBYmOBYmNBYmQBYmQBYuOBYqOBYuQBYuRBYyNBYuOBY2QBY2QBY2NBY2OBY+PBY+PBY6MBY2NBZCNBZGNBY6LBY6MBduVBeKdBdGpBauoBZGqBXWtBV2uBUagBTyPBUp2BVZxBWhxBXyEBXmKBXuQBX2WBYOZBYqcBZCaBZeYBbCnBY+MBY6OBceoBY6MBY6NBdikBZOMBZSMBemGBZCKBZGKBd1yBZKIBZOHBcVeBZCGBZCGBa9UBY2EBY6FBYuKBYyKBYqEBYuDBYBQBYmHBYqHBYmIBYmHBYiIBYiHBVxfBYWGBYSHBUduBdFqBZGGBZKHBcBUBYyIBY6JBY2GBY6HBYuIBY2HBZZQBYuJBYyIBYqFBYuGBYqIBYuJBXNKBYuLBYuLBYeEBYaEBYuLBYuLBVZUBYWHBYaHBTlfBYWJBYWIBU19BYWLBYWKBSeNBYiMBYiLBTmWBQ75SPgF98IVi+oFj5sFlJgFmpUFnI4FnIgFmoEFlX4FjnsFiywF6YsFnIcFmoIFlX0FjnsFiHsFgX0FfIIFeogFLYsFi/s9BYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBYv3PQX71IsFhIwFhYwFiYwFiYsFhY8FhY0Fio0FiYwFh5AFh5AFi40FiY0FipEFiZEFi40Fi40FjJEFjJEFjI0Fi40Fj5EFjpAF+Ab4PgWYlgWcjwWcigWbgwWWfgWQfAWKegWCfQX7yfv5BQ75SKn5QRWOmwWVmQWalAWcjwX4WIsFnIcFmoIFlX0FjnsFiHsFgX0FfIIFeogF/CuLBYv7dwX3HakFk4sFk4wF9x57BZOIBZOJBcJuBZGGBZGHBbFiBYyJBYyKBY6FBY+FBYuKBYyJBaj7BAWLigWLigWLhAWMhAWKigWLiQV9UQWLiwWLigWHhAWIhAWLiwWKigVnXgWFhQWFhgVFYQWFiQWFiAU5dQWGigWGigU+hwWFjAWGiwVKlwWGjQWGjAVWogWGjgWFjwVUugWAmAWHmwWOmwWUmQWZlQWcjwWciQWaggW9YQW0eQXCgQXNjgXSngXFrgWlqwWUswVz5wVxpwVjoAX7DZkF+01iBYaLBYaKBYeMBYiKBYaNBYaMBYiNBYeMBYePBYeNBYmOBYiNBYmQBYiPBYuOBYmPBYuPBYqQBQ75SPch96QVi4sFi4sFbW4FioMFnlkFm24FtWEFtHIFzoEF2o8FxaMFsqoFnrMFjaoFf7MFeKwFcqQFZ5sFUJcFU44FU4MFU28F+yxcFYqPBYyRBYy5BYuLBYuLBY7cBY2RBYyRBafaBYyNBYuNBbTfBZCSBZCRBcC7BY6NBY2NBdC4BZGOBZCOBdykBYyLBYuLBeKlBZ2NBZuGBZmBBZN8BY17BYZ7BYB+BXyDBTRyBUFzBU9kBV5jBWdABXJEBYp7BZGOBZCPBdGtBZKNBZKOBc6UBZCLBY+LBcuJBY+KBY+LBc58BZCKBZCJBbt2BZKGBZKHBa5oBY6GBY+GBaNhBYyHBY2HBZpZBYyEBYyFBYlbBYuLBYuLBYmDBYmDBYuLBYuLBW9UBYuKBYqKBYaGBYeFBYqKBYqLBVhiBYaIBYaIBUNtBYOJBYOJBS+GBYeMBYaLBTmXBYqLBYqLBYSOBYOOBYuLBYqLBVasBYiPBYaNBVq8BYeQBYeQBXaxBYqOBYqOBXXHBYqSBYmTBQ75SPfP90gVg/saBYd7BYF+BXyCBXmJBXqPBX2VBYKZBYmbBZL3HAWMjQWLjQWc9wcFi4wFjI0Fms0FjI0Fi4wFnsYFjIwFi40FoL4FjIwFi40ForcFjIwFi40Fo7EFjIwFjI0FoqoFjI0FjIwFoqYFjYwF+96LBXmOBX2UBYGZBYibBY6bBZWZBZmUBZ2PBfhfiwWQigWQigWOigWPigWPiAWQiQWOiQWNiQWOhwWPhwWMiAWNiAWMhgWNhgWLiAWMiAWJhgWLhgWKiAWKiAWIhwWJhgWIiQWJiAWHiAWHiAVqeQV9gQVkaAV3dAV2bgV1aAV2YgV4WwV5UwV8TAUO+Uj3pvf2FUR0BUpaBXBZBYleBaZdBcVnBdlzBciJBeCmBb6wBaLEBYLEBWK1BTi2BVKfBdH3sxU4kQVLgAVXcwVrXQWVaQW4ZQW/bAXDeAWwlgXetQWdpgWMwwV1rwVr9wEVi4sFk4gFk4kFi4sFjIsF0GgFjokFj4kFjocFj4gFjYgFjYgFrVIFjIkFjYgFjIYFjYYFiogFjIgFiTwFi4gFi4kFiYUFioYFiYkFiogFbVwFiYkFiYgFh4gFh4cFiIoFiYkFUm4F0mYFkIcFkYcFw1IFjYcFj4gFjIcFjYgFjIYFjIcFmDoFi4kFi4kFioUFi4UFiokFiokFbDwFiYcFiogFh4cFiYgFiIgFiIkFR1sFhYgFhYcFJ2sFg4oFg4oFP40FhY0FhIsFMqcFho4FhY0FQ7gFio0FiYwFho8Fh5AFio0FiYwFZc0Fio4Fio4FipAFiZAFjI4Fio4Fjs0Fi4wFi4sFjZMFjZIFi4wFi4sFr80Fi4wFjIwFkJAFkJEFi4wFjIsF2sYFkY4Fko8FmI8FaZ8FiI4Fh40FUrwFiY0FiI4FiY8FiI8Fio4FiY4FeMsFi40Fi4wFipIFi5IFi4wFi4wFjpIFjZIFjIsFjI0Fu9IFjo4FjY4Fj44Fj44Fjo0Fjo0F0KsFkYwFkY0F15gFkIsFkYwF7YQFDvlI+Fr4mBWVnQV8xwVwqwVfoAVIkwVHgwVTdAVnagV+XwWYYAWvaQXDdAXMhAXMmgW8qgVf/BoVi4oFZ0IFgX4FfIIFeYgFeo8FfZUFgpkFiJsFj5sFr9QFtuoFwPcXBYuLBYuMBZKcBT55BYOKBYKLBTuUBYWNBYWMBUWoBYSPBYSQBVm6BYqNBYmMBYiQBYeQBYuOBYqNBXfNBYqOBYqOBYyQBYqQBYyOBYyPBZ/NBYyNBYuNBY+QBY6QBY2NBYyNBb26BZKPBZKQBdGnBZGMBZGNBduVBZGKBZGMBduBBZKJBZKJBcdvBYyKBYyLBZGGBZGHBYuKBYyKBbNcBYyKBYyKBY6FBY6FBYuJBYyKBZ83BYuFBYyEBYqJBYuJBYmFBYmGBYqHBUH7SAVW+xgFi4oFiooFXysFDvlI9y/3yxX4OvtDBZqBBZR9BY57BYd7BYF9BXyCBXqJBXqOBfyY92oFhI8FhY8FiowFiowFh5EFh5EFi4wFiosFipMFiZIFi4wFi4wFjZIFjJIFjIwFi4wFj5EFj5EFjIwFjIsFkY8Fko8F+Jj3agWcjwWciAWaggWVfgWPewWIegWCfQV8ggUO+Ui2+GkV+JiLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfyYiwV6jgV8lAWBmQWImwWOmwWVmQWalAWc+4gV+JiLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfyYiwV6jgV8lAWBmQWImwWOmwWVmQWalAUO+Uj44/fpFYyKBY+FBY+FBYuKBYyKBYyEBY2EBYuKBYuKBYmEBYqDBYqLBYuKBYeFBYeFBYqKBYqKBYWHBYSHBfyY+2oFeogFeo0FfJQFgZkFh5sFjpsFlJkFmpUF+Dv3QwX8O/dDBXyUBYKZBYicBY+bBZWYBZqUBZyOBZyHBfiY+2oFkocFkYcFDvlI+Ev3kxWGigX7q4sFi4sFLPtyBYF9BX2CBXqIBXmOBX2UBYGYBYecBY6bBfek+REFkJIFkJIFi4sFi4sFko8FkpAFi4sFjIsFk40Fk40FjIsFi4sFk4kFlIoFi4sFi4sFkoYFkocFjIsFi4sFkIQFj4QF97r9EQWPewWIegWBfgV9gQV6iAV5jgV9lAWBmAX7IvfIFfsB94AFJvuABQ75SPe++GUV2bYFlMsFTL8F+weeBSmGBYv7VgX32vxEFYSJBYmLBYmLBfv7hwWKiwWLiwWDjAWCjQWLiwWLiwWEjwWEkAWKiwWLiwWGkgWHkQWLjAWKiwWKkwWJkgWLjAWLiwWL+QoFjJIFjZIFi4wFi4wFkJEFjpEFjIwFjIwFkY8FkY8FjYsFjIwFkowFk40F9yWTBZCKBZCLBfcZdQWOigWPigWQiQWQiQWNiQWOiQXlQQWNiAWPiQWNhwWOhwWMhwWNiAWLhgWMhwWLhwWLhwV9+wAFiokFi4gFiIYFiYYFiYkFiogFh4cFh4cFiIoFiYkFSGYF9wJmBY6JBY+KBY+IBY+JBY2IBY6IBdE3BY6GBY6FBYyJBYuKBYyEBYyEBYX7AAWLiQWLiQWJhQWJhQWKiQWKiQVsWwWIiQWKiAWHiAWHhwWIigWIiQU+ZAWJigWJigVu3BXEqAWeqAWP3QVYyQX7JLsF+1CWBYv7nAUO+Uj4ZPclFaDbBZOZBZiXBZuQBZ2KBZuEBZd/BZF7BYp7BXIwBYqIBYqHBYiHBYmHBYiIBYmIBUNLBYiJBYmJBYaJBYaIBYiLBYiJBSl1BYuLBYuLBYOLBYKLBYuLBYuLBfsEnAWJiwWKjAWEjQWEjgWKjAWKiwVRsQWFkQWFkQVU3QWLiwWLiwWIkwWIkgWLiwWLiwVm918Fi5MFi5MFuvdeBYyMBYuNBY+RBY2RBY2MBYyNBc7XBYyMBYuLBZGQBZKQBYuLBYuLBdGsBZKNBZKOBdqVBYyLBYyLBZOKBZKLBYyKBY2LBfVqBYyLBYyLBZKHBZGHBYyLBYyKBcNZBYyLBYuKBZCFBY+FBYyKBYuLBapEBY57BYh7BYF9BXyCBXqIBXqOBXyVBYGYBXDJBWKwBTSlBU6EBVVxBVRNBWD7TAWt+04FuUgFtG8F6H0F2JwFDvlI93uVFYaKBfs1iAWLiwWKiwWDjAWDjQWKiwWLiwWEjwWEjwWLjAWKiwWHkgWGkQWLjAWLiwWJkwWJkgWMjAWKiwWT+QQFjJAFi5EFjY0Fi48Fj48FjY8FjY4FjY0FkI4Fj44Fjo0FjowFkIwFkY0F7pgFj4sFjowF14kFkYoFkIsF9xBrBYuLBYuLBZOHBZKIBYyLBYuKBeZIBYyKBYuLBZCFBZGFBYuLBYuKBb8wBY2FBY6GBaAsBYuHBYyHBY1EBYqHBYuIBYJOBYmHBYqHBXhXBYeFBYmGBUw8BYWGBYWGBTdZBYWJBYWIBfsdaAV53hX3EasF0rUFwM4Fm7UFlMAFicsFeOAFXtoFPsQF+wGnBUiMBVGDBYX8tAUO+Uj3EeUV+CGLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfxOiwV6jgV8lAWCmQWHmwWL99MFi/fSBY+bBZSZBZqUBZyPBfhOiwWchwWaggWVfQWOewWIewWBfQV8ggV6iAX8IYsFi/t+BfeciwWdiAWZggWVfQWOewWIegWBfgV9ggV5hwX7nIsFDvlI9xf32hWL+6oFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY+bBZWZBZmUBZyPBZ2HBYyKBfgviwWciAWZggWVfQWPewWHewWBfQV9ggV6iAX8FYsFi/t4BffQiwWdiAWZggWVfQWOewWIewWBfQV9ggV5hwUO+Uj4fve0Ffs1iwV6jwV9lAWBmQWImwWOmwWVmQWZlAWdjgX3bIsFj4oFkIsFj4kFj4oFj4kFj4kFjogFj4kFjYgFjocFjYgFjYcFjIcFjYcFi4cFjIcFiocFi4cFXvtaBYqJBYuIBYiGBYiGBYmJBYqJBUtGBYmKBYqJBYWIBYaHBYmKBYmKBTpwBYqLBYuKBYOKBYOKBYqLBYqLBTWSBYSNBYSNBTmuBYWOBYaOBUfCBYaQBYaQBV/QBYuMBYqMBYmRBYiSBYuMBYuMBXf3UgWLkQWLkgWx90IFjIwFi40FjpEFjpEFjIwFjI0FzdsFjIwFi4wFkZAFkY8FjIwFjIsF37QFi4sFi4sFk40Fk44Fi4sFi4sF9xeVBZKKBZGLBfcQcQWbhQWXfwWRfAWLegWEfAV+gAV7hQV5iwX7CKMF+weCBUhrBVZJBWj7MwWe+0IFrlUFxFwF0W4Fz4UFx6AFvL8FDvlI+H74OhWL95sFj5sFlJkFmpQFnI8FnIcFmoIFlX0FjnsFi/0RBYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBYv3tgX8DosFi/u2BYd7BYJ9BXyCBXqIBXqOBXyUBYGZBYibBYv34AWL98UFjpsFlZkFmpQFnI8FnIcFmoIFlH0Fj3sFi/ubBQ75SPfu+UEVi/0RBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv5EQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Ui/9z4Vio4Fia8FjpsFlJkFmZUFnY4FnIkFmoIFlX4Fj3sFjGsFkXIFlXYFmXkFnX0FunoFzoQFu5EFwp8FoJkFnJ0Fl6EFk70FivhxBY6bBZWZBZqUBZyPBZyHBZqCBZR+BY96BYz8dAWKiAWLiAWCTgWJhQWJhAV5awWHhgWIhwVycQWHiAWIiAVtdwWGiQWGiAVKcwWGigWFigVRhAWGiwWGiwU8kwWFjAWFjAVRoQWFjwWFjQVvoQWHjwWHjgV2pQWJkAWIjwV+qAWKkAWJjwWEqwUO+Uj3Uff3FfsBOQWL+3UFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY+bBZWZBZmUBZyPBZ2HBZmCBZV9BY57BYv7xAX4Hve7BZuSBZyNBZyGBZiABZR8BYx7BYZ7BX9/Bfui+14F9+b70AWVfQWPewWHewWCfQV8ggV6iAV6jgV8lAUO+Uj3DOUV+CuLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBfxYiwV6jgV9lAWBmQWHmwWL+REFj5sFlZkFmZQFnI8FnYcFmYIFlX0FjnsFDvlI+KH5WxWOjwWNjQWNjQWRjQWPjgWOjAWOjAWRjAWRjAWOigWOiwWQiQWRigWNigWOigWQhwWPiAWNiQWNiQWOhgWOhgWMiQWMiAWLhgWNhQWL/REFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/h1BftD+6wFiYkFiokFhocFh4cFiYkFiYoFhYkFhYgFiYsFiIoFhYwFhYoFiIwFiYsFhY4FhY0FiYwFiY0Fh48Fho8Fio0FiY0F+0P3rAWL/HUFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/kRBY2RBYuQBYyOBYyNBY6QBY6QBY2NBY2NBY+OBZCPBY6MBY2MBZGMBZCNBY6LBY6MBZGKBZGKBY6KBY6KBY+IBZGJBY2JBY2JBY6HBY+HBfdw+/UF93D39QUO+Uj4e/dPFYT4hgWOmwWVmQWZlAWcjwWdiAWZggWVfQWPewWU/REFioYFi4cFiocFiocFiYgFiYcFiIgFiIcFiIkFiIgFh4kFh4kFh4oFh4oFhosFh4oFhosFh4sFh40Fh4wFh40Fh4wFiI4Fh44FiI4FiI4F/BT4oQWL/IkFh3sFgn0FfIIFeogFeo4FfJQFgZkFiJsFi/kRBYyPBYuPBYyPBYyPBY6PBYyOBY6OBY6PBY6NBY6OBZCNBY+NBY+MBY6NBZCLBZCMBY+KBY+LBY+JBZCKBY+JBY6KBY+IBY+IBY2IBY6IBQ75SPgblBWFiAWJiwWJiwUzgAWKiwWKigWEjAWDjAWKiwWKiwUypQWJjAWIjAWGjgWGjgWJjQWJjAU62gWJjgWIjgWJjwWIjwWLjwWJjgVP96AFi40Fi4wFi5IFi5IFjIwFi40FxPddBY2PBYyPBY6OBY2PBY6NBY6PBdHEBYyMBYyMBZKOBZGOBY2LBYyMBfcOqQWPiwWPjAWQigWPjAWPiQWPiwX3B2cFjIoFjYsFkYcFkYgFjIoFjYkFzkoFjYgFjYkFjocFjYYFjIgFjIgFxfuJBYuDBYuDBW/7LgWIhAWJhQVYMgWKiQWLigWGhgWGhgWKigWKigUwTgWJigWKigUg0BXOkwXUvAW11gWl9x8FVvd1BVm8BTCoBShzBVdgBVj7RgXD+4sFy00FDvlI93j3xxWJigX7AooFi/uVBYd7BYF9BX2CBXqIBXmOBX2UBYGZBYibBYv5BQWMkQWMkgWMjAWLjQWPkQWOkAWNjAWMjQWQjwWRjwWNiwWMjAWSjQWRjAX3HZcFjosFj4sF9w6EBY+KBZCLBdp2BY+KBY+KBa96BZCIBZCIBcRbBYuKBYuLBZCFBZCEBYuLBYyLBaRXBY2EBY2EBZA/BYuJBYuJBYqFBYqFBYqJBYuJBXRcBYqJBYqJBYeHBYeFBYmKBYqKBWhxBYWIBYWIBVN2BYeKBYeJBTp8BYiLBYmLBfsCggWF4BX1kwXWmQW5nAWgmwWZpwWGxAV6sAVesQVxlwVEnQX7BpIFL4MFi/uJBQ75SPiTtRXQOQWTfAWNewWFewWAfwV7gwV6igV6kAV+lQVRzwVUYAWIigWJiQWGiQWGiAWHiwWIigU1fgWJjAWJigWEjAWFiwWJjAWIiwU0qQWJjAWIjAWGjgWGjgWJjgWJjAU75AWKjgWJjQWJkAWIkAWLjgWKjQVQ98MFi4sFi4sFi5MFi5MFi4sFi4wFw/d2BY2OBYyPBY2PBY6PBY2OBY2OBdDLBY2MBYyNBZGOBZGOBY2MBY2MBfcLrAWRjAWRjAWNigWOjAWRiQWRigX3BGMFjYoFjooFj4cFkYgFjIkFjYoFzUEFjIkFjYkFjYYFjoYFjIgFjIkFw/uoBYuEBYuEBW/7QgWJhQWJhQX7K0AVMfUFg5oFipsFkJsFlpcFm5MFnIwFnIYFmIEF0zcFmqkFpfc1BVb3lgVZxAU0qgUucQVXWgVY+2IFwvuvBctDBcx2BcmUBQ75SPfz+EoV3JcFrpgFoJsFlqIFjLMFfbkFgZYFd5gFcZUFQZsF+xSQBfsofgWL+10F90g8FftIhQWL+7cFh3oFgn4FfIEFeogFeo4FfJUFgZgFiJwFi/j8BYyRBYyRBYyNBYuNBY+QBY6RBY2MBYyNBZGOBZCPBY2MBY2MBZGMBZKNBfdUmwWOiwWOjAX3G4UFj4oFj4sF3HoFj4kFj4sFrX0Fj4kFj4kFp3kFj4cFkIgFoHQFi4oFjIsFjoQFj4UFi4oFjIoFnU0FjIUFjIUFiVQFi4sFiYMFiYMFi4sFeWQFiooFi4oFhoUFhoUFiosFi4oFaXAFhIgFhYcFXXoFhooFhokFNX8F94H7rQWTfQWNegWGewV/fwV8gwV5igV6kAV+lgX7nPfLBYOaBQ75SOXBFYaOBYqNBYiNBYmQBYeQBVr3AQWHnAWOmwWVmQWZlAWcjgWdiAWZggWVfgW3KgXNaQX3IIcF7bgFq/AFdsUFS68F+4ezBYiNBYiLBYaNBYaNBYmOBYiMBUu+BYiPBYiOBYmOBYiOBYqQBYmOBXrHBYuPBYqOBYuQBYuPBYyPBYyPBbT3DAWOkAWNkAWNjQWMjQWQjwWPjwXvzAWRjgWQjgWOiwWNjAWRiwWRjAX3R4IFjYoFjIwFkogFkooFjIoFjYoFkIcFkYcFjIoFjIoF1zAFknwFjXoFhXwFgH4Fe4QFeYoFe5AFfpYFTNYF+yOTBUBaBWssBZVoBbZoBfeDYwWTiQWTiAXfWgWQhwWQhwWNiQWMigWOhQWOhgWrNgWLhgWNhwWLhwWLiAWKhgWKhgVi+xgFi4oFiooFh4UFiIQFiosFiooFhYYFhYcFiosFiooF+xJRBYmLBYqKBYSKBYSJBYmLBYmLBfs2jwWJjAWJiwWFjQWEjAWJjAWJjAUzuQUO+Uj3yflsFfeiiwWchwWaggWVfQWOewWIewWBfQV8ggV6iAX7dYsFi/znBYh7BYF9BX2CBXmIBXqOBXyUBYKZBYebBYv45wX7hYsFeo4FfJQFgZkFiJsFjpsFlZkFmpQFnI8FDvlI+HT3hxWQ+E4Fj5sFlZkFmZQFnY4FnIcFmYIFlX0FjnsFhvxQBYqIBYyJBYFHBYqHBYqGBXdYBYmIBYmHBX53BYiHBYiIBW1sBYWHBYaHBVhxBYSJBYSJBU2BBYWLBYSLBTOUBYaNBYWMBUWlBYWPBYWOBVyvBYeQBYWQBWjCBYiRBYiRBXnSBYqPBYqOBYTsBYuNBYuMBYr39wWOmwWVmQWalAWcjwWchwWaggWVfgWOegWM+/UFki8Fm00Fp2EFr28FxXYF14IFu5MFsJ4FoqIFk5cFnLYFDvlI99H3NRX3a/ivBZSZBZqVBZyPBZyIBZqCBZV+BY97BYh6BfuS/REFi4sFi4oFhoUFh4QFi4sFiooFhIcFhYYFiosFi4sFg4kFg4oFiosFi4sFg4wFgowFi4wFiosFhI8FhI8Fi4sFi4wFhpEFhpEFi4wFi4sF+7j5EgWHmwWOmwWVmQWZlAWcjwWciAWaggWVfQUO+Uj4dvdYFdf4gwWQmwWXlwWbkgWcjAWchgWYgAWTfAWMegUq/REFiYcFioYFiYgFiocFiIgFiIcFiIkFiIgFh4kFh4kFh4oFh4kFh4sFhooFh4sFh4sFho0Fh4sFh40Fh40FiI4Fh40FiI4FiI4FiY8FiI4F+0b3/wX7Ofv2BYiHBYiGBYmJBYmJBYaIBYeHBYiKBYiKBYaKBYWJBYiLBYiLBYWMBYaLBYiNBYiLBYaOBYaOBYmNBYiNBYiPBYiPBYqOBYmOBYqQBYmQBTv5CQWNnAWTmQWYlgWckAWcigWbhAWWfgWRewXH/G8F9x/3vgWPkAWPkQWMjAWMjAWRjwWRjwWNiwWMjAWSjAWSjQWNiwWMiwWSiQWTigWMiwWMigWRhwWSiAWMigWMigWPhQWPhQUO+Uj3/Pf/FfeZ+7QFlH0FjXsFhnsFgH4FfIMFeYkFeo8FfpYF+5D3qQX7kPupBX6ABXqHBXmNBXyTBYCYBYabBY2bBZSZBfeZ97QF+5/3uwWCmQWJnAWQmwWWlwWalAWdjAWchwWYgQX3lvuxBfeW97EFmZUFm48FnYoFmoIFln8FkHsFiXoFgn0FDvlI9+j4EhWV++EFiHsFgn0FfYEFeogFeY0FfJQFgZkFh5sFgffjBfud96cFgpkFiJsFj5sFlpkFmpMFnI4FnIcFmYEF94n7kQX3k/eQBZqVBZyPBZyIBZqCBZV+BY96BYh7BYJ9BQ75SPci5RX4KosFnYgFmYIFlX0FjnsFiHsFgX0FfYIFeYgF/IKLBYWMBYaLBYiMBYeMBYeOBYaNBYmNBYiNBYiPBYePBYqOBYmOBYqQBYmPBYuPBYuOBYyQBYuQBYyOBYyOBY6PBY2QBfhP+M4F/CqLBXmOBX2UBYGZBYibBY6bBZWZBZmUBZ2PBfiCiwWRigWQigWOigWPigWPiQWQiAWNiQWOiQWOhwWPhwWMiAWNiAWMhwWNhgWLiAWLhwWKhgWLhgWKiAWKiAWIhwWJhgUO+Uj3h3QV9zaLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqHBftjiwV5jwV9lAWBmQWImwWL+Z8FjpsFlZkFmZQFnY4F92OLBZyIBZmCBZV9BY97BYd7BYF9BX2CBXqIBfs2iwUO+Ujw+VgV+HH9YwWRfAWKegWEfAV+gAV7hQV5jAV7kQV/lwX8cfljBYWaBYycBZKaBZiWBZuRBZ2KBZuFBQ75SPhWShWHewWBfQV9ggV6hwX7Y4sFeY8FfZQFgZkFiJsFjpsFlZkFmZQFnY4F9zaLBYv5SwX7NosFeY4FfZQFgZkFiJsFjpsFlZkFmZQFnY4F92OLBZyIBZmCBZV9BY97BQ75SPeo+WQVko8FjIsFjIwFkowFk40FjIoFjIwFk4kFkooFjIoFjIsFkocFkYcF9577ggWVfgWPewWIegWBfQV9ggV6hwV6jgV8lAX7f/dmBft/+2YFfIIFeogFeo8FfZQFgZkFiJwFj5sFlZgF9573ggUO+UiL+wEV+O6LBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBfzuiwV6jgV8lAWBmQWImwWOmwWVmQWalAUO+Uj4POoVxcIFi/eQBVLBBVCnBS+LBVBvBUxQBWsvBYtQBaswBcpPBcdvBeaLBfcIZhWHiAWFhwVAZwWKigWJigWEigWFiQWJjAWJigX7BYsFiYwFiYoFhI0FhYwFiYwFiYwFQK8FhY8FhY8FP9MFiowFiowFiJEFh5EFiowFiowFZvYFipIFipIFi9IFjJIFjJEFsPcABYyNBYyMBY+RBY6RBYyMBYyMBdfTBZGPBZGPBdeuBYyMBY2MBZKMBZKNBYyKBY2MBfcFiwWMigWNjAWSiQWSigWMigWNigXWaAWQhwWQiAWLjwWPnAWUmAWalQWcjgWciAWagQWVfgWOegWL/IoFiHsFgX4FfIEFeogFeo4FfJUFgpgFh5sFDvlI9xOvFYaOBYuKBYd6BYF+BX2CBXqHBXmPBX2UBYGYBYicBYv5OAWOmwWVmQWZlAWdjgWciAWZggWVfQWPewWL+3YFkI4FkY8F1asFjIsFjIsFko0Fk40FjIoFjIwF9wSLBYyLBYuLBZOJBZOJBYyLBYuLBddrBZCHBZKIBdZKBYyKBY2KBY6FBY+GBYyJBYyKBbApBYyEBYyEBYtLBYqEBYqDBWYrBYqKBYqJBYeGBYiFBYmKBYqJBUBLBYWIBYWHBUBqBYqLBYqLBYSJBYOJBYqLBYqLBfsEiwWKjAWKigWDjQWEjQWKiwWKiwVBrAWA9w0VwlwFxnEF54sFx6UFycAFqdoFi70FbdsFTcAFT6QFL4sFUHIFVFwFDvlI+DLqFczNBZqVBZyPBZyIBZqDBZV9BY97BYl7BYF9BUVDBYWHBYWHBUZmBYiLBYmJBYWKBYWJBYiMBYmKBSGLBYmMBYiKBYWNBYWMBYmNBYmLBUSwBYWPBYWPBUXTBYqMBYqMBYeRBYeRBYuMBYqMBWn2BYqRBYqSBYvSBYyRBYySBa33AAWMjAWLjAWPkQWPkQWMjAWMjAXR0wWRjwWRjwXSrwWNiwWNjQWRjAWSjQWNigWNjAX1iwWNigWNjAWSiQWRigWNiQWNiwXRZwWRhwWRhwXRQwWVfQWNewWHewWBfQV8gwV6iAV6jwV8lQVKzQVWpgU3iwVVcAVRUAVtLgWLUAWoLwXGUAXCbwXdiwUO+Uj4PfUVwroFi/dxBVS6BVCkBS+LBU9yBU1WBW07BYtZBak8BclWBcdxBeeLBfcGYhWGiAWFhwVBagWKiwWKiwWEiQWDiQWKjAWKigX7BIsFiosFiosFhI0Fg40FiosFiosFQKwFhY8Fho4FP8sFio0FiYwFiJEFh5AFio0FiowFZusFipMFipIFi8sFjJIFjJIFsO0FjIwFjI0Fj5AFjpEFjYwFjIwF18wFkY4FkI8F16sFi4sFjIsFk40Fk40Fi4sFjIsF9wSLBYyKBYyMBZOJBZKJBYyLBYyLBdVrBZGHBZCIBYv3dgWPmwWVmQWZlAWcjgWdiAWZggWVfQWOewWL/TgFiHoFgX4FfYIFeYcFeo8FfZQFgZgFh5wFDvlI9x74IBV8YQX4GIsFg5QFZs0FbaYFS6cFJosFSm8F93r7/BXXzgWZlAWdjgWchwWZggWVfQWNegWIewWAfgU6QwWGiAWFhwU8ZgWJiwWKigWEigWEiQWJiwWKiwX7DYsFiosFiosFg40FhIwFiowFiosFOrAFhY8FhY4FO9MFiYwFiowFh5EFh5AFi40Fio0FY/YFipIFipIFi9IFjJIFjJIFs/cABYyNBYuNBY+QBY+QBYyNBY2MBdvTBZKOBZCPBdyvBYyLBYyMBZOMBZKNBYyLBYyLBfcNiwWMiwWMiwWTiQWSigWMigWMiwXbZwWQhwWRiAW1ZwWPhQWQhQWyRAWQewWJegWDfQV/ggWUhQWVfgWOegWIewWBfQV9ggV5iAX8SYsFi3UFrDAFz08FzG4F8IsFDvlI97n4VhWL/CQFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/gkBfsGiwV6jgV8lQWCmAWHmwWPnAWUmAWalQWcjgX3BosFi8AFi40Fi40FjZEFjJEFjY0Fi4wFwOoFkZEFkJEFi4sFi4wFk44Fko8F9asFkowFkowF9YsFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogFKIsFOXIFZEUFi2EF9zuLBZyIBZqBBZV+BY56BYh7BYF+BXyBBXqIBQ75SPg99yMVwroFi/dxBVS7BVCkBS+LBU9yBU1WBW06BYtaBak7BclWBcdxBeeLBfcGYhWGiAWFhwVBagWKiwWKigWEigWDiQWKiwWKiwX7BIsFiosFiosFg40FhIwFiowFiosFQKwFhY8FhY4FQMwFiowFiYwFiJEFh5AFio0FiowFZuwFipIFipIFi8wFjJIFjJIFsOwFjI0FjI0Fj5AFjpAFjY0FjIwF1swFko4FkI8F16sFi4sFjIwFk4wFk40Fi4sFjIsF9wSLBYyLBYyLBZOJBZKKBYyKBYyLBdVrBZGHBZCIBYuLBY+cBZWYBZmVBZyOBZ2IBZmBBZV+BY56BYv8mAWKhAWKhAVmKgWKigWKiQWHhgWIhQWJigWKiQVlawWFhwWFhwVBbAWKigWKiwWEiQWDigWKiwWKiwX7BIsFiosFi4sFg4wFg40FiosFi4sFP6sFho8FhI8FQMsFio0FiYwFiJAFh5AFio0Fio0FZuwFiZwFj5sFlZgFm5QFnI0FnIcFmYEFlH0FrDQFyVYFx3EF54sFxqUFpKAFqdoFDvlI+L34CRWNhAWL+9AFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/fIBW7TBVqfBSyLBU1yBS49BYv7vQWIewWBfQV8ggV6iAV6jgV8lAWBmQWImwWL+SwFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/uSBbKsBZGOBZGPBdeqBYyLBYuMBZOMBZONBYyLBYuLBfcGiwWMiwWLiwWTiQWTigWMigWLiwXXbAWLiwWLiwWShgWShwWLigWMiwWPhAWQhQWLigWLiwWxLAUO+Uj3mfmIFduLBZyIBZqCBZV9BY57BYh7BYF9BXyCBXqIBTuLBXqOBXyUBYGZBYibBY6bBZWZBZqUBfH7mRWL/E4FiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/hOBY6cBZWYBZqVBZyOBZyIBZqBBZV+BQ75SPgV+YgVyYsFnIgFmoIFlX0FjnsFiHsFgX0FfIIFeogFTYsFeo4FfJQFgpkFh5sFj5sFlJkFmpQF+wn+MhWGigWIjQWHiwUpqQV8kwWAmAWGmwWNmwWUmQWZlgWbjwWdiQXhcQXpoQWhyQWL+I4Fj5sFlJkFmpQFnI8FnIcFmoIFlX0FjnsFi/yVBYqEBYqFBWswBYiGBYmHBYmIBYmIBYeIBYeIBYiJBYiJBYaKBYaJBfsXbQWIiwWHigUO+Uj3f/eMFfsRLwWLIQWIewWBfQV8ggV6iAV6jgV8lAWCmQWHmwWL+SwFj5sFlJkFmpQFnI4FnIgFmoIFlX0FjnsFi/xXBff495sFm5IFnIwFnIYFmIEFk3wFjHoFhnwFgH4F+2v7MgX3mPtwBZV+BZB7BYh7BYJ9BX2BBXqHBXqNBXyTBQ75SPfu+WMVi/0xBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv5MQWOmwWVmQWalAWcjwWchwWaggWVfQUO+Uj43/iYFZCGBYuKBYyJBYyFBY2EBYuKBYyJBYv8WwWHewWBfQV9ggV6iAV5jgV9lAWBmQWImwWL+EgFfJYFXIsFdHgFVDEFi/vmBYh7BYF9BX2CBXmIBXqOBX2UBYGZBYebBYv36gVo4wV1nAVdiwVzeAVVMQWL++YFh3sFgX0FfYIFeogFeY4FfZQFgZkFiJsFi/h9BY6cBZWYBZmVBZ2OBZyIBZmBBZV+BY2ABa2mBZGOBZGPBY2LBYyMBZKLBZKNBduLBZKJBZKLBYyKBY2LBZGHBZGIBbZoBYyJBY2KBY+GBY+GBYuJBY2JBZN1BZynBZCQBZCRBbWtBZGPBZGPBY2LBYyMBZKLBZKNBdyLBZKJBZKLBYyKBY2LBZGHBZGIBbZoBYyKBYyKBQ75SPi++B0VjIUFi/vyBYh7BYF9BXyCBXqIBXqOBXyUBYGZBYibBYv36wVt3QVaoQUtiwVPcAUsMwWL++AFiHsFgX0FfIIFeogFeo4FfJQFgZkFiJsFi/h9BY6cBZWYBZqVBZyOBZyIBZqBBZV+BY56BYtlBbCtBZKPBZCPBdiuBYyLBYyMBZKMBZONBYyLBYyLBfcGiwWMiwWNiwWSiQWSigWMigWNiwXWaAWMiwWLiwWShgWRhgWMiwWLiwWPhAWPhAWLiwWLiwWyIQUO+Uj37Ph4FTWLBVRwBU9PBWwvBYtQBaowBcdPBcNvBeCLBcKnBcfHBarmBYvGBWznBU/HBWH3AxWNjAWRiQWSigWNiQWNiwXTaAWRhgWRhwXTQwWLigWMiwWPhAWPhQWLigWMigWv+wAFjIUFjIQFi0QFioQFioUFZyAFiooFi4oFh4QFh4UFiosFi4oFQ0MFhYcFhYcFQ2YFiYsFiYkFhYoFhIkFiYwFiYoF+wCLBYmMBYmKBYSNBYWMBYmNBYmLBUOwBYWPBYWPBUPTBYuMBYqLBYeRBYeSBYuMBYqMBWf2BYqRBYqSBYvSBYySBYyRBa/3AAWMjAWLjAWPkQWPkgWMiwWLjAXT0wWSjwWQkAXTrgWNiwWNjQWSjAWRjQWNigWNjAX3AIsFDvlI9xTXFYWPBYv7dQWHewWCfQV8ggV6iAV6jgV8lAWBmQWImwWL+TMFjpwFlZgFmpUFnI4FnIgFmoEFlH4Fj3oFi4sFkY8FkI4F1asFjIsFjIwFk4wFko0FjIsFjIsF9wSLBYyLBYuLBZOJBZOKBYyKBYuLBdZsBZGHBZGHBdZLBY2KBYyJBY+GBY+GBYuJBY2JBa8rBY2EBYyDBYtLBYqEBYmEBWYsBYqJBYuJBYeGBYeFBYqKBYmKBUBLBYWHBYaIBUBqBYqLBYqKBYOKBYSJBYqLBYqLBfsEiwWKiwWKiwWDjQWEjAWKjAWKiwVBrAWA9w0VwlwFxnEF54sFx6UFyb8FqdoFi7wFbdsFTb8FT6QFL4sFUHIFVFwFDvlI+D33JRXCugWL924FVLoFUKQFL4sFT3IFTVcFbTsFi1oFqTwFyVcFx3EF54sF9wZiFYaIBYWHBUFqBYqLBYqLBYSJBYOJBYqMBYqKBfsEiwWKjAWKigWEjQWDjQWKiwWKiwVArAWGjgWFjwVAywWJjAWKjQWHkAWHkAWLjQWKjQVm6gWJkgWKkwWLywWMkgWNkgWw6wWMjQWLjQWPkAWPkQWMjAWNjAXWywWRjwWRjwXWqgWLiwWMjAWTjAWTjQWLiwWMiwX3BIsFjIsFjIsFkokFk4oFjIoFjIsF1WwFkIcFkYgFi4sFj5sFlJkFmpQFnI4FnIgFmoIFlX0FjnsFi/00BYh7BYF9BXyCBXqIBXqOBXyUBYKZBYebBQ75SPfp+MsVk40F9yaLBZyIBZmBBZV+BY96BYd7BYF+BX2BBXqIBfsdiwU4bgU5TwViNAWL+6MFiHsFgX0FfYIFeYgFeo4FfZQFgZkFh5sFi/h9BY+cBZWYBZmVBZyOBZ2IBZmBBZV+BY56BYtWBdTABZGNBZGPBeutBQ75SO6nFYSQBYuLBYuMBYeSBYeSBXLSBYmcBY+bBZaYBZuTBZyNBZyGBZmBBZN9BZ9TBbt0BfWLBeSsBbuhBYuoBVHCBfsBygX7BIsFiYsFiosFhI0FhIwFiowFiYwFQK8FhY8Fho8FiowFiYwFiJEFh5EFi4wFio0FipEFipIFi9IFjJMFjZMFi4sFi4wFkJEFj5IF1tMFjIsFjIwFkY8Fko8FjIsFi4wF764Fk4wFk40F9xGLBYyKBY2MBZKJBZKKBYyKBY2KBdZoBZmBBZN8BY17BYd7BYB+BXyDBXmJBXqPBUqqBSGLBTluBVRWBYtuBbN4BfcGiwWOigWPiwWQiQWQigWOigWPiQX3EEQFj4cFkIgF1kQFj4QFkIQFi4sFi4sFjYMFjIMFi0MFioUFioQFiooFi4kFh4UFiIYFiYoFiokFhYgFhoYFQGgFiYsFiYkFJ2cFg4oFg4kF+xGLBYmMBYmKBYWNBYSMBYmMBYqMBUCvBQ75SPdd+DEV+wyLBXqOBXyUBYGZBYibBY6bBZWZBZqUBZyOBfcMiwWL9zcFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/s3BfdDiwWciAWaggWVfQWOewWIewWBfQV8ggV6iAX7Q4sFi/uCBbNMBeF0BfOLBZyHBZqCBZV9BY57BYh7BYF9BXyCBXqIBfsCiwWFjAWFjAX7AqgFg48FhI4Fi4sFiowFhpEFhZAFVOIFio4FiY4FipAFiZAFjI4Fio4FDvlI+GX3SRWL9+AFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/x9BYh6BYF+BXyBBXqIBXqOBXyVBYGYBYicBYuyBWZpBYWHBYWHBT9oBYmKBYqKBYSKBYSJBYmMBYqKBfsGiwWJjAWKigWEjQWEjAWJjAWKjAU/rgWEkAWEkAWLiwWLiwWHkgWHkgVk9AWKkgWKkQWL9/IFjpsFlZkFmpQFnI4FnIgFmoIFlX0FjnsFi/vrBak6Bb10BeeLBcinBQ75SPfB9xcV92j4JgWWmAWakwWcjQWchwWZgQWUfQWNegWHewX7kfxyBYiHBYiGBYiJBYqJBYaIBYaIBYiKBYiKBYaKBYWKBYiLBYiLBYWMBYaMBYiMBYiMBYaOBYaOBYqNBYiNBYiQBYiPBfuQ+HIFhpsFjZwFlJkFmZUFnI8FnIkFmoMFln4FDvlI+Fj3TRX29+kFk5oFmZUFm5AFnYoFmoMFl34FkHsFiXsF+yr8cgWIhwWKhwWIiAWKhwWHiQWIhwWHiQWIiQWGiQWHiQWHiwWHigWHiwWGiwWHjAWHiwWHjQWGjQWIjQWHjQWIjwWIjQWJjwWIjgWKjwWIjwUg9+kFIPvpBYiHBYqHBYiIBYmHBYiJBYiHBYeJBYiJBYaJBYeJBYeLBYeKBYeLBYaLBYeMBYeLBYeNBYaNBYiNBYeNBYiPBYiNBYmPBYiOBYqPBYiPBfsq+HIFiZsFkJsFl5gFmpMFnYwFm4YFmYEFk3wF9wD76QX29+kFjY8FjI8Fjo4FjY8Fj44Fjo4Fjo0Fj40Fj40Fj40Fj4sFj4wFkIsFkIsFj4oFj4sFj4kFkIkFjokFjokFjogFj4gFjYcFjogFjIcFjYcFDvlI+AL3pxX3evtlBZV+BY97BYh7BYF9BX2BBXqIBXmOBX2UBft992YF+337ZgV9ggV5iAV6jgV9lQWBmQWImwWPmwWVmAX3evdlBft692UFgZgFh5sFjpwFlZgFmZUFnI4FnYgFmYMF9337ZwX3ffdnBZmTBZ2OBZyIBZmBBZV+BY56BYd7BYF+BQ75SOj7TxWDigWLiwWLiwVjiwV6jgV8lAWBmQWImwWOmwWVmQWalAWcjgWqiwXLpQXOwQXJ7gX7dfg4BYebBY2bBZSaBZiVBZyPBZ2JBZqDBZZ+BfdX/AEF91n4AQWWmAWakwWdjQWbhwWZgQWUfAWNewWGewX7gfxMBYuKBYqJBT37EQWGhQWGhgU9TAWEiAWGhwU8bAWLiwWLiwUO+Uj3UtkV98+LBZ2IBZmCBZV9BY57BYh7BYF9BX2CBXmIBfwsiwWEjAWFiwWJjQWIiwWGjgWGjgWJjQWJjAWHkAWHkAWKjQWKjQWKkQWJkAWLjgWLjQWMkQWLkQWNjQWLjQWPkAWOkQX38vguBfvPiwV5jgV9lAWBmQWImwWOmwWVmQWZlAWdjgX4LIsFkooFkYsFjYoFjooFkIgFkYgFjIkFjYoFj4YFj4YFjIkFjIkFjIUFjYYFi4gFi4kFioUFi4UFiYkFi4kFh4YFiIYFDgAAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAA==";var s1=te(ee(),1);var AD=te(ee(),1);var c1=te(E0(),1);var CU=te(ee(),1);var jU=te(ee(),1);var QU=te(ee(),1);var iG=te(ee(),1);function ae(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function T0(t){return typeof t>"u"}function N0(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function Na(...t){t=Array.isArray(t[0])?t[0]:t;let e=(r,i)=>({a:r.a*i.a+r.c*i.b,c:r.a*i.c+r.c*i.d,e:r.a*i.e+r.c*i.f+r.e,b:r.b*i.a+r.d*i.b,d:r.b*i.c+r.d*i.d,f:r.b*i.e+r.d*i.f+r.f});switch(t.length){case 0:throw Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[r,i,...n]=t,a=e(r,i);return Na(a,...n)}}}var{cos:v4,sin:S4,PI:yV}=Math;function w4(t,e,r){let i=v4(t),n=S4(t),a={a:i,c:-n,e:0,b:n,d:i,f:0};return T0(e)||T0(r)?a:Na([N0(e,r),a,N0(-e,-r)])}var{tan:fV}=Math;function A4(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Wa(t,e,r,i){var n=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(n,Wa.prototype),n.expected=e,n.found=r,n.location=i,n.name="SyntaxError",n}A4(Wa,Error);function Dc(t,e,r){return r=r||" ",t.length>e?t:(e-=t.length,r+=r.repeat(e),t+r.slice(0,e))}Wa.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var r=null,i;for(i=0;i<t.length;i++)if(t[i].source===this.location.source){r=t[i].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,a=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(n):n,o=this.location.source+":"+a.line+":"+a.column;if(r){var c=this.location.end,l=Dc("",a.line.toString().length," "),s=r[n.line-1],p=n.line===c.line?c.column:s.length+1,d=p-n.column||1;e+=`
 --> `+o+`
`+l+` |
`+a.line+" | "+s+`
`+l+" | "+Dc("",n.column-1," ")+Dc("",d,"^")}else e+=`
 at `+o}return e};Wa.buildMessage=function(t,e){var r={literal:function(s){return'"'+n(s.text)+'"'},class:function(s){var p=s.parts.map(function(d){return Array.isArray(d)?a(d[0])+"-"+a(d[1]):a(d)});return"["+(s.inverted?"^":"")+p.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(s){return s.description}};function i(s){return s.charCodeAt(0).toString(16).toUpperCase()}function n(s){return s.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+i(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+i(p)})}function a(s){return s.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(p){return"\\x0"+i(p)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(p){return"\\x"+i(p)})}function o(s){return r[s.type](s)}function c(s){var p=s.map(o),d,m;if(p.sort(),p.length>0){for(d=1,m=1;d<p.length;d++)p[d-1]!==p[d]&&(p[m]=p[d],m++);p.length=m}switch(p.length){case 1:return p[0];case 2:return p[0]+" or "+p[1];default:return p.slice(0,-1).join(", ")+", or "+p[p.length-1]}}function l(s){return s?'"'+n(s)+'"':"end of input"}return"Expected "+c(t)+" but "+l(e)+" found."};function Ce(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,r=-1/0,i=1/0,n=-1/0,a=(o)=>{e=Math.min(e,o.x),r=Math.max(r,o.x),i=Math.min(i,o.y),n=Math.max(n,o.y)};return t.forEach((o)=>{switch(o.type){case"path":o.points.forEach(a);break;case"text":a({x:o.x,y:o.y});break;case"circle":{let{x:c,y:l,radius:s}=o;a({x:c-s,y:l-s}),a({x:c+s,y:l+s});break}case"box":{let{x:c,y:l,width:s,height:p}=o,d=s/2,m=p/2;a({x:c-d,y:l-m}),a({x:c+d,y:l+m});break}}}),{minX:e,maxX:r,minY:i,maxY:n}}var B4=(t,e="right")=>{switch(e){case"down":switch(t){case"middle_top":return"middle_right";case"middle_bottom":return"middle_left";case"middle_left":return"middle_bottom";case"middle_right":return"middle_top"}break;case"up":switch(t){case"middle_top":return"middle_left";case"middle_bottom":return"middle_right";case"middle_left":return"middle_top";case"middle_right":return"middle_bottom"}break;case"left":switch(t){case"middle_top":return"middle_bottom";case"middle_bottom":return"middle_top";case"middle_left":return"middle_right";case"middle_right":return"middle_left"}break;case"right":return t}return t},ri=(t,e)=>{let{primitives:r,center:i,ports:n,size:a}=t,o=Na({a:1,b:0,c:0,d:-1,e:0,f:2*i.y}),c=r.map((s)=>{switch(s={...s},s.type){case"path":return{...s,points:s.points.map((u)=>ae(o,u))};case"text":let p=ae(o,{x:s.x,y:s.y}),d={top_left:"bottom_left",top_right:"bottom_right",bottom_left:"top_left",bottom_right:"top_right",center:"center",middle_top:"middle_bottom",middle_bottom:"middle_top",middle_left:"middle_left",middle_right:"middle_right"};return{...s,x:p.x,y:p.y,anchor:d[s.anchor]};case"circle":case"box":let m=ae(o,{x:s.x,y:s.y});return{...s,x:m.x,y:m.y}}}),l=n.map((s)=>({...s,...ae(o,s)}));return{primitives:c,center:i,ports:l,size:a,...e}},ii=(t,e)=>{let{primitives:r,center:i,ports:n,size:a}=t,o=Na({a:-1,b:0,c:0,d:1,e:0,f:2*i.x}),c=r.map((s)=>{switch(s={...s},s.type){case"path":return{...s,points:s.points.map((u)=>ae(o,u))};case"text":let p=ae(o,{x:s.x,y:s.y}),d={top_left:"top_right",top_right:"top_left",bottom_left:"bottom_right",bottom_right:"bottom_left",center:"center",middle_top:"middle_top",middle_bottom:"middle_bottom",middle_left:"middle_right",middle_right:"middle_left"};return{...s,x:p.x,y:p.y,anchor:d[s.anchor]};case"circle":case"box":let m=ae(o,{x:s.x,y:s.y});return{...s,x:m.x,y:m.y}}}),l=n.map((s)=>({...s,...ae(o,s)}));return{primitives:c,center:i,ports:l,size:a,...e}},en=(t,e)=>{let{newOrientation:r,overrides:i}=e,n={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},a=w4(r?n[r]:Math.PI/2,t.center.x,t.center.y),{primitives:o,center:c,size:l,ports:s}=t,p=o.map((u)=>{switch(u={...u},u.type){case"path":return{...u,points:u.points.map((x)=>ae(a,x))};case"text":let y=ae(a,{x:u.x,y:u.y});return u.anchor=B4(u.anchor,r??"right"),{...u,x:y.x,y:y.y};case"circle":let f=ae(a,{x:u.x,y:u.y});return{...u,x:f.x,y:f.y};case"box":let _=ae(a,{x:u.x,y:u.y});return{...u,x:_.x,y:_.y,width:u.height,height:u.width}}}),d=s.map((u)=>({...u,...ae(a,u)})),m=Ce(p);return{primitives:p,center:c,ports:d,size:{width:m.maxX-m.minX,height:m.maxY-m.minY},...i}},z=(t,e="down",r={})=>en(t,{newOrientation:e,overrides:r}),F4=class{symbol;constructor(t){this.symbol=JSON.parse(JSON.stringify(t)),this.symbol.size=this.computeSize()}changeTextAnchor(t,e,r){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map((i)=>i.type==="text"&&i.text===t?{...i,anchor:e,...r?{x:i.x+r.x,y:i.y+r.y}:{}}:i)},this}labelPort(t,e){return this.symbol={...this.symbol,ports:this.symbol.ports.map((r)=>r.labels.includes(t)?{...r,labels:e}:r)},this}rotateRightFacingSymbol(t){return this.symbol=en(this.symbol,{newOrientation:t}),this}computeSize(){let t=Ce(this.symbol.primitives);return{width:t.maxX-t.minX,height:t.maxY-t.minY}}build(){return{...this.symbol,size:this.computeSize()}}},F=(t)=>{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],r=t.ports??Object.entries(t.refblocks).flatMap(([n,a])=>[{...a,labels:[n]}]),i=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return r.length===2&&(i={x:(r[0].x+r[1].x)/2,y:(r[0].y+r[1].y)/2}),new F4({...t,primitives:e,ports:r,center:i})},ni={paths:{path11:{type:"path",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0.04},{x:0.54,y:0.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:"primary",fill:!1},path17:{type:"path",points:[{x:0,y:-0.13},{x:0.07,y:-0.11}],color:"primary",fill:!1},path18:{type:"path",points:[{x:0.07,y:-0.11},{x:0.14,y:-0.13}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-0.15,y:-0.13},{x:-0.07,y:-0.11}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-0.07,y:-0.11},{x:0,y:-0.13}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.17,y:0.4},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.04,radius:0.29,color:"primary",fill:!1}}},{paths:P4,texts:_V,bounds:Zn,refblocks:W0,circles:I4}=ni,M4=F({primitives:[...Object.values(P4),...Object.values(I4),{type:"text",text:"{REF}",x:-0.15,y:0.3894553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.3894553499999995}],ports:[{...W0.left1,labels:["1"]},{...W0.right1,labels:["2"]}],size:{width:Zn.width,height:Zn.height},center:{x:Zn.centerX,y:Zn.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:k4,texts:gV,bounds:Kn,refblocks:R0,circles:C4}=ni,Y4=F({primitives:[...Object.values(k4),...Object.values(C4),{type:"text",text:"{REF}",x:-0,y:0.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-0.4094553499999995}],ports:[{...R0.left1,labels:["1"]},{...R0.right1,labels:["2"]}],size:{width:Kn.width,height:Kn.height},center:{x:Kn.centerX,y:Kn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:L4,texts:xV,bounds:Jn,refblocks:O0,circles:E4}=ni,T4=F({primitives:[...Object.values(L4),...Object.values(E4),{type:"text",text:"{REF}",x:-0,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:0,y:0.4094553499999995}],ports:[{...O0.left1,labels:["1"]},{...O0.right1,labels:["2"]}],size:{width:Jn.width,height:Jn.height},center:{x:Jn.centerX,y:Jn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:N4,texts:bV,bounds:qn,refblocks:j0,circles:W4}=ni,R4=F({primitives:[...Object.values(N4),...Object.values(W4),{type:"text",text:"{REF}",x:-0,y:0.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-0.4094553499999995}],ports:[{...j0.left1,labels:["1"]},{...j0.right1,labels:["2"]}],size:{width:qn.width,height:qn.height},center:{x:qn.centerX,y:qn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:O4,texts:vV,bounds:to,refblocks:$0,circles:j4}=ni,$4=F({primitives:[...Object.values(O4),...Object.values(j4),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...$0.left1,labels:["1"]},{...$0.right1,labels:["2"]}],size:{width:to.width,height:to.height},center:{x:to.centerX,y:to.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:X4,texts:SV,bounds:eo,refblocks:X0,circles:V4}=ni,z4=F({primitives:[...Object.values(X4),...Object.values(V4),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...X0.left1,labels:["1"]},{...X0.right1,labels:["2"]}],size:{width:eo.width,height:eo.height},center:{x:eo.centerX,y:eo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),oi={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:0.14,y:0.18},{x:0.08,y:0.2}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:0.21,y:-0.11},{x:0.15,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:D4,texts:wV,bounds:ro,refblocks:V0,circles:U4}=oi,G4=F({primitives:[...Object.values(D4),...Object.values(U4),{type:"text",text:"{REF}",x:-0.15,y:0.3294553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.3294553499999995}],ports:[{...V0.left1,labels:["1"]},{...V0.right1,labels:["2"]}],size:{width:ro.width,height:ro.height},center:{x:ro.centerX,y:ro.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Q4=F(oi).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:H4,texts:AV,bounds:io,refblocks:z0,circles:Z4}=oi,K4=F({primitives:[...Object.values(H4),...Object.values(Z4),{type:"text",text:"{REF}",x:-0,y:-0.2294553499999995},{type:"text",text:"{VAL}",x:0,y:0.3294553499999995}],ports:[{...z0.left1,labels:["1"]},{...z0.right1,labels:["2"]}],size:{width:io.width,height:io.height},center:{x:io.centerX,y:io.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),J4=F(oi).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:q4,texts:BV,bounds:no,refblocks:D0,circles:t5}=oi,e5=F({primitives:[...Object.values(q4),...Object.values(t5),{type:"text",text:"{REF}",x:0.15,y:-0.2294553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2294553499999995}],ports:[{...D0.left1,labels:["1"]},{...D0.right1,labels:["2"]}],size:{width:no.width,height:no.height},center:{x:no.centerX,y:no.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:r5,texts:FV,bounds:oo,refblocks:U0,circles:i5}=oi,n5=F({primitives:[...Object.values(r5),...Object.values(i5),{type:"text",text:"{REF}",x:0.15,y:-0.2294553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2294553499999995}],ports:[{...U0.left1,labels:["1"]},{...U0.right1,labels:["2"]}],size:{width:oo.width,height:oo.height},center:{x:oo.centerX,y:oo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Ra={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:0.14,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:0.18,y:0.18},{x:0.11,y:0.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:0.18,y:-0.09},{x:0.11,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:o5,texts:PV,bounds:ao,refblocks:G0,circles:a5}=Ra,s5=F({primitives:[...Object.values(o5),...Object.values(a5),{type:"text",text:"{REF}",x:-0.16,y:0.2294553499999995},{type:"text",text:"{VAL}",x:0.16,y:0.2294553499999995}],ports:[{...G0.left1,labels:["1"]},{...G0.right1,labels:["2"]}],size:{width:ao.width,height:ao.height},center:{x:ao.centerX,y:ao.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:c5,texts:IV,bounds:so,refblocks:Q0,circles:l5}=Ra,hx=F({primitives:[...Object.values(c5),...Object.values(l5),{type:"text",text:"{REF}",x:-0.0001118,y:-0.18},{type:"text",text:"{VAL}",x:0.0001118,y:0.2738453}],ports:[{...Q0.left1,labels:["1"]},{...Q0.right1,labels:["2"]}],size:{width:so.width,height:so.height},center:{x:so.centerX,y:so.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:p5,texts:MV,bounds:co,refblocks:H0,circles:h5}=Ra,d5=F({primitives:[...Object.values(p5),...Object.values(h5),{type:"text",text:"{REF}",x:-0.0050250999999996715,y:0.27384529999999985,anchor:"middle_left"},{type:"text",text:"{VAL}",x:-0.00011179999999999524,y:-0.27384530000000007,anchor:"middle_left"}],ports:[{...H0.left1,labels:["1"]},{...H0.right1,labels:["2"]}],size:{width:co.width,height:co.height},center:{x:co.centerX,y:co.centerY}}).changeTextAnchor("{VAL}","middle_top").labelPort("right1",["2"]).labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:kV,texts:CV,bounds:YV,refblocks:LV,circles:EV}=Ra,Sl=z(hx,"down"),wl=Sl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Al=Sl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");wl.anchor="middle_left";Al.anchor="middle_left";wl.x=0.25;wl.y+=0.21;Al.y-=0.21;Al.x=0.25;var m5=Sl,rn={paths:{path43:{type:"path",points:[{x:-0.06,y:0.19},{x:-0.06,y:-0.12}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:0.02,y:0.13},{x:0.02,y:-0.06}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.06,y:0.03},{x:-0.5,y:0.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.5,y:0.03},{x:0.03,y:0.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.03,y:0.27},bottom1:{type:"text",text:"{VAL}",x:-0.03,y:-0.28}},refblocks:{left1:{x:-0.5,y:0.03},right1:{x:0.5,y:0.03}},bounds:{minX:-0.5,maxX:0.5,minY:-0.38,maxY:0.27,width:1,height:0.29,centerX:0,centerY:0.06},circles:{}},{paths:u5,bounds:Z0,refblocks:K0,circles:y5}=rn,f5=F({primitives:[...Object.values(u5),...Object.values(y5),{type:"text",text:"{REF}",x:-0.2,y:0.31},{type:"text",text:"{VAL}",x:0.2,y:0.31}],ports:[{...K0.left1,labels:["1"]},{...K0.right1,labels:["2"]}],center:{x:Z0.centerX,y:Z0.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").build(),_5={...f5,size:{width:1,height:0.9}};function It(t){let e=t.size;if(!e){let r=Ce(t.primitives);e={width:r.maxX-r.minX,height:r.maxY-r.minY}}return{...t,size:e}}var{paths:g5,texts:J0,bounds:lo,refblocks:q0,circles:x5}=rn,dx=It({primitives:[...Object.values(g5),...Object.values(x5),{...J0.top1,anchor:"middle_bottom"},{...J0.bottom1,anchor:"middle_top"}],ports:[{...q0.left1,labels:["1"]},{...q0.right1,labels:["2"]}],size:{width:lo.width,height:lo.height},center:{x:lo.centerX,y:lo.centerY}}),{paths:b5,bounds:t_,refblocks:e_,circles:v5}=rn,S5=F({primitives:[...Object.values(b5),...Object.values(v5),{type:"text",text:"{REF}",x:0,y:-0.22},{type:"text",text:"{VAL}",x:0,y:0.28}],ports:[{...e_.left1,labels:["1"]},{...e_.right1,labels:["2"]}],center:{x:t_.centerX,y:t_.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").build(),w5={...S5,size:{width:1,height:0.65}},{paths:A5,bounds:r_,refblocks:i_,circles:B5}=rn,F5=F({primitives:[...Object.values(A5),...Object.values(B5),{type:"text",text:"{REF}",x:0,y:0.28},{type:"text",text:"{VAL}",x:0,y:-0.22}],ports:[{...i_.left1,labels:["1"]},{...i_.right1,labels:["2"]}],center:{x:r_.centerX,y:r_.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_bottom").build(),P5={...F5,size:{width:1,height:0.65}},{paths:I5,bounds:n_,refblocks:o_,circles:M5}=rn,k5=F({primitives:[...Object.values(I5),...Object.values(M5),{type:"text",text:"{REF}",x:0.2,y:-0.25},{type:"text",text:"{VAL}",x:-0.2,y:-0.25}],ports:[{...o_.left1,labels:["1"]},{...o_.right1,labels:["2"]}],center:{x:n_.centerX,y:n_.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").build(),C5={...k5,size:{width:1,height:0.9}},Y5=en(dx,{newOrientation:"up"}),Oa={paths:{path1:{type:"path",points:[{x:-0.3,y:0},{x:-0.19998,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path2:{type:"path",points:[{x:0.19998,y:0},{x:0.3,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path3:{type:"path",points:[{x:-0.19998,y:0.07998},{x:0.19998,y:0.07998},{x:0.19998,y:-0.07998},{x:-0.19998,y:-0.07998},{x:-0.19998,y:0.07998}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.3,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.45,anchor:"middle_bottom"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.45,maxY:0.3,width:0.6,height:0.75,centerX:0,centerY:0},circles:{}},{paths:L5,texts:TV,bounds:a_,refblocks:s_,circles:E5}=Oa,T5=F({primitives:[...Object.values(L5),...Object.values(E5),{type:"text",text:"{REF}",x:-0.16,y:0.16},{type:"text",text:"{VAL}",x:0.16,y:0.16}],ports:[{...s_.left1,labels:["1"]},{...s_.right1,labels:["2"]}],center:{x:a_.centerX,y:a_.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),N5={...T5,size:{width:0.9,height:0.6}},{paths:W5,texts:NV,bounds:c_,refblocks:l_,circles:R5}=Oa,O5=F({primitives:[...Object.values(W5),...Object.values(R5),{type:"text",text:"{REF}",x:0,y:-0.16},{type:"text",text:"{VAL}",x:0,y:0.16}],ports:[{...l_.left1,labels:["1"]},{...l_.right1,labels:["2"]}],center:{x:c_.centerX,y:c_.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),j5={...O5,size:{width:0.6,height:0.65}},{paths:$5,texts:WV,bounds:p_,refblocks:h_,circles:X5}=Oa,V5=F({primitives:[...Object.values($5),...Object.values(X5),{type:"text",text:"{REF}",x:0,y:0.16},{type:"text",text:"{VAL}",x:0,y:-0.16}],ports:[{...h_.left1,labels:["1"]},{...h_.right1,labels:["2"]}],center:{x:p_.centerX,y:p_.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),z5={...V5,size:{width:0.6,height:0.65}},ja={paths:{"left-lead":{type:"path",points:[{x:-0.25,y:0},{x:-0.175,y:0}],color:"primary",fill:!1,strokeWidth:0.012},body:{type:"path",points:[{x:-0.175,y:0.075},{x:0.175,y:0.075},{x:0.175,y:-0.075},{x:-0.175,y:-0.075},{x:-0.175,y:0.075}],color:"primary",fill:!1,strokeWidth:0.012},"right-lead":{type:"path",points:[{x:0.175,y:0},{x:0.25,y:0}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},D5={boxresistor:{horizontalOffset:0.16,horizontalHeight:0.65,verticalX:0.16,verticalRefY:0.16,verticalValY:-0.16,verticalWidth:0.9},capacitor:{horizontalOffset:0.24,horizontalHeight:0.65,verticalX:0.2,verticalRefY:0.095,verticalValY:-0.095,verticalWidth:0.9},resistor:{horizontalOffset:0.22,horizontalHeight:0.65,verticalX:0.2,verticalRefY:0.14,verticalValY:-0.14,verticalWidth:0.9}},Nt=(t,{kind:e,orientation:r,pin1Labels:i=["1"],pin2Labels:n=["2"]})=>{let a=D5[e],o=F({...t,texts:{}}).rotateRightFacingSymbol(r).labelPort("left1",i).labelPort("right1",n).build(),c=r==="right"||r==="left",l=c?[{type:"text",text:"{REF}",x:0,y:a.horizontalOffset,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-a.horizontalOffset,anchor:"middle_top"}]:[{type:"text",text:"{REF}",x:a.verticalX,y:a.verticalRefY,anchor:"middle_left"},{type:"text",text:"{VAL}",x:a.verticalX,y:a.verticalValY,anchor:"middle_left"}],[s,p]=o.ports,d=Math.hypot(p.x-s.x,p.y-s.y);return{...o,primitives:[...o.primitives,...l],size:c?{width:d,height:a.horizontalHeight}:{width:a.verticalWidth,height:d}}},U5=Nt(ja,{kind:"boxresistor",orientation:"down"}),G5=Nt(ja,{kind:"boxresistor",orientation:"left"}),Q5=Nt(ja,{kind:"boxresistor",orientation:"right"}),H5=Nt(ja,{kind:"boxresistor",orientation:"up"}),$a={paths:{path2:{type:"path",points:[{x:0.15,y:-0.01},{x:0.55,y:-0.01}],color:"primary",fill:!0},"path2-5":{type:"path",points:[{x:-0.15,y:0.06},{x:0.14,y:0.06}],color:"primary",fill:!0},"path2-5-1":{type:"path",points:[{x:0.14,y:0.06},{x:0.14,y:-0.08}],color:"primary",fill:!0},"path2-5-1-6":{type:"path",points:[{x:-0.16,y:0.06},{x:-0.16,y:-0.08}],color:"primary",fill:!0},"path2-5-4":{type:"path",points:[{x:-0.15,y:-0.08},{x:0.14,y:-0.08}],color:"primary",fill:!0},"path2-9":{type:"path",points:[{x:-0.55,y:-0.01},{x:-0.17,y:-0.01}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.17},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.17}},refblocks:{left1:{x:-0.55,y:-0.01},right1:{x:0.55,y:-0.01}},bounds:{minX:-0.58,maxX:0.58,minY:-0.17,maxY:0.17,width:1.16,height:0.35,centerX:0,centerY:0},circles:{}},{paths:Z5,texts:RV,bounds:po,refblocks:d_,circles:K5}=$a,J5=F({primitives:[...Object.values(Z5),...Object.values(K5),{type:"text",text:"{REF}",x:-0.2,y:0.1404553499999995},{type:"text",text:"{VAL}",x:0.2,y:0.1494553499999995}],ports:[{...d_.left1,labels:["1"]},{...d_.right1,labels:["2"]}],size:{width:po.width,height:po.height},center:{x:po.centerX,y:po.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:q5,texts:OV,bounds:ho,refblocks:m_,circles:tv}=$a,ev=F({primitives:[...Object.values(q5),...Object.values(tv),{type:"text",text:"{REF}",x:0,y:-0.2294553499999995},{type:"text",text:"{VAL}",x:0,y:0.1704553499999995}],ports:[{...m_.left1,labels:["1"]},{...m_.right1,labels:["2"]}],size:{width:ho.width,height:ho.height},center:{x:ho.centerX,y:ho.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:rv,texts:jV,bounds:mo,refblocks:u_,circles:iv}=$a,nv=F({primitives:[...Object.values(rv),...Object.values(iv),{type:"text",text:"{REF}",x:0,y:0.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-0.1704553499999995}],ports:[{...u_.left1,labels:["1"]},{...u_.right1,labels:["2"]}],size:{width:mo.width,height:mo.height},center:{x:mo.centerX,y:mo.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:ov,texts:$V,bounds:uo,refblocks:y_,circles:av}=$a,sv=F({primitives:[...Object.values(ov),...Object.values(av),{type:"text",text:"{REF}",x:0.2,y:-0.1404553499999995},{type:"text",text:"{VAL}",x:-0.2,y:-0.1494553499999995}],ports:[{...y_.left1,labels:["1"]},{...y_.right1,labels:["2"]}],size:{width:uo.width,height:uo.height},center:{x:uo.centerX,y:uo.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:cv,texts:XV,bounds:f_,refblocks:__,circles:lv}=Oa,pv=F({primitives:[...Object.values(cv),...Object.values(lv),{type:"text",text:"{REF}",x:0.16,y:-0.16},{type:"text",text:"{VAL}",x:-0.16,y:-0.16}],ports:[{...__.left1,labels:["1"]},{...__.right1,labels:["2"]}],center:{x:f_.centerX,y:f_.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),hv={...pv,size:{width:0.9,height:0.6}},Xa={paths:{"left-lead":{type:"path",points:[{x:-0.175,y:0},{x:-0.14,y:0}],color:"primary",fill:!1,strokeWidth:0.012},body:{type:"path",points:[{x:-0.14,y:0.065},{x:0.14,y:0.065},{x:0.14,y:-0.065},{x:-0.14,y:-0.065},{x:-0.14,y:0.065}],color:"primary",fill:!1,strokeWidth:0.012},"right-lead":{type:"path",points:[{x:0.14,y:0},{x:0.175,y:0}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},dv=Nt(Xa,{kind:"boxresistor",orientation:"down"}),mv=Nt(Xa,{kind:"boxresistor",orientation:"left"}),uv=Nt(Xa,{kind:"boxresistor",orientation:"right"}),yv=Nt(Xa,{kind:"boxresistor",orientation:"up"}),Bl={paths:{"horizontal-bar":{type:"path",points:[{x:-0.4,y:0},{x:0.4,y:0}],color:"primary",fill:!1},"middle-dash-1":{type:"path",points:[{x:0,y:0.2},{x:0,y:0.07}],color:"primary",fill:!1},"middle-dash-2":{type:"path",points:[{x:0,y:0.01},{x:0,y:-0.12}],color:"primary",fill:!1},"middle-dash-3":{type:"path",points:[{x:0,y:-0.18},{x:0,y:-0.31}],color:"primary",fill:!1},"left-vertical":{type:"path",points:[{x:-0.25,y:0},{x:-0.25,y:-0.2}],color:"primary",fill:!1},"right-vertical":{type:"path",points:[{x:0.25,y:0},{x:0.25,y:-0.2}],color:"primary",fill:!1},"left-ground":{type:"path",points:[{x:-0.3,y:-0.2},{x:-0.25,y:-0.3},{x:-0.2,y:-0.2},{x:-0.3,y:-0.2}],color:"primary",fill:!1},"right-ground":{type:"path",points:[{x:0.2,y:-0.2},{x:0.25,y:-0.3},{x:0.3,y:-0.2},{x:0.2,y:-0.2}],color:"primary",fill:!1}},refblocks:{left1:{x:-0.4,y:0},right1:{x:0.4,y:0}},texts:{ref:{type:"text",text:"{REF}",x:0,y:0.35}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.35,width:0.8,height:0.75,centerX:0,centerY:-0.02},circles:{}},{paths:fv,texts:VV,bounds:g_,refblocks:x_,circles:_v}=Bl,gv=F({primitives:[...Object.values(fv),...Object.values(_v),{type:"text",text:"{REF}",x:0,y:0.2594553499999995}],ports:[{...x_.left1,labels:["1"]},{...x_.right1,labels:["2"]}],center:{x:g_.centerX,y:g_.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:xv,texts:zV,bounds:b_,refblocks:v_,circles:bv}=Bl,mx=F({primitives:[...Object.values(xv),...Object.values(bv),{type:"text",text:"{REF}",x:0,y:0.2594553499999995}],ports:[{...v_.left1,labels:["1"]},{...v_.right1,labels:["2"]}],center:{x:b_.centerX,y:b_.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),vv=ii(mx),{paths:Sv,texts:DV,bounds:S_,refblocks:w_,circles:wv}=Bl,Av=F({primitives:[...Object.values(Sv),...Object.values(wv),{type:"text",text:"{REF}",x:0,y:0.2594553499999995}],ports:[{...w_.left1,labels:["1"]},{...w_.right1,labels:["2"]}],center:{x:S_.centerX,y:S_.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),Va={paths:{path27:{type:"path",points:[{x:0.3,y:0},{x:0.06,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path28:{type:"path",points:[{x:-0.06,y:0},{x:-0.3,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path29:{type:"path",points:[{x:0.06,y:0.16002},{x:0.06,y:-0.16002}],color:"primary",fill:!1,strokeWidth:0.012},path30:{type:"path",points:[{x:-0.06,y:0.16002},{x:-0.06,y:-0.16002}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.24,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.24,anchor:"middle_top"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.24,maxY:0.24,width:0.6,height:0.48,centerX:0,centerY:0},circles:{}},{paths:Bv,texts:UV,bounds:yo,refblocks:A_,circles:Fv}=Va,Pv=F({primitives:[...Object.values(Bv),...Object.values(Fv),{type:"text",text:"{REF}",x:-0.2,y:0.115},{type:"text",text:"{VAL}",x:0.2,y:0.115}],ports:[{...A_.left1,labels:["1"]},{...A_.right1,labels:["2"]}],size:{width:yo.width,height:yo.height},center:{x:yo.centerX,y:yo.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),Iv={...Pv,size:{width:0.9,height:0.6}},Mv=F(Va).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),kv={...Mv,size:{width:0.6,height:0.65}},za={paths:{path27:{type:"path",points:[{x:0.3,y:0},{x:0.000657,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path28:{type:"path",points:[{x:-0.038683,y:0},{x:-0.3,y:0}],color:"primary",fill:!1,strokeWidth:0.012},path30:{type:"path",points:[{x:-0.074255,y:0.16002},{x:-0.074255,y:0.16002},{x:-0.069544,y:0.149352},{x:-0.065126,y:0.138684},{x:-0.061005,y:0.128016},{x:-0.057182,y:0.117348},{x:-0.053663,y:0.10668},{x:-0.05045,y:0.096012},{x:-0.047547,y:0.085344},{x:-0.044957,y:0.074676},{x:-0.042684,y:0.064008},{x:-0.040732,y:0.05334},{x:-0.039103,y:0.042672},{x:-0.037801,y:0.032004},{x:-0.03683,y:0.021336},{x:-0.036193,y:0.010668},{x:-0.035893,y:0},{x:-0.036193,y:-0.010668},{x:-0.03683,y:-0.021336},{x:-0.037801,y:-0.032004},{x:-0.039103,y:-0.042672},{x:-0.040732,y:-0.05334},{x:-0.042684,y:-0.064008},{x:-0.044957,y:-0.074676},{x:-0.047547,y:-0.085344},{x:-0.05045,y:-0.096012},{x:-0.053663,y:-0.10668},{x:-0.057182,y:-0.117348},{x:-0.061005,y:-0.128016},{x:-0.065126,y:-0.138684},{x:-0.069544,y:-0.149352},{x:-0.074255,y:-0.16002},{x:-0.074255,y:-0.16002}],color:"primary",fill:!1,strokeWidth:0.012},"path30-7":{type:"path",points:[{x:-0.000385,y:0.16002},{x:-0.000385,y:-0.16002}],color:"primary",fill:!1,strokeWidth:0.012},"path30-9-2":{type:"path",points:[{x:0.156026,y:0.2},{x:0.085846,y:0.2}],color:"primary",fill:!1,strokeWidth:0.012},"path30-9-2-9":{type:"path",points:[{x:0.120936,y:0.16491},{x:0.120936,y:0.23509}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.42,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.42,anchor:"middle_top"}},refblocks:{left1:{x:-0.3,y:0},right1:{x:0.3,y:0}},bounds:{minX:-0.3,maxX:0.3,minY:-0.55,maxY:0.55,width:0.6,height:1.1,centerX:0,centerY:0},circles:{"viewbox-padding-min":{type:"circle",x:-0.3,y:-0.55,radius:0,fill:!1,color:"transparent"},"viewbox-padding-max":{type:"circle",x:0.3,y:0.55,radius:0,fill:!1,color:"transparent"}}},Cv=F(za).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:0.7,y:0.3}).changeTextAnchor("{VAL}","middle_left",{x:-0.12,y:-0.3}).build(),Yv=F(za).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Lv=F(za).rotateRightFacingSymbol("left").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.78}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-0.78}).build(),Ev=F(za).rotateRightFacingSymbol("down").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:-0.12,y:0.3}).changeTextAnchor("{VAL}","middle_left",{x:0.72,y:-0.3}).build(),Tv=F(Va).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").build(),Nv={...Tv,size:{width:0.6,height:0.65}},Da={paths:{"left-lead":{type:"path",points:[{x:-0.25,y:0},{x:-0.06,y:0}],color:"primary",fill:!1,strokeWidth:0.012},"left-plate":{type:"path",points:[{x:-0.06,y:0.16},{x:-0.06,y:-0.16}],color:"primary",fill:!1,strokeWidth:0.012},"right-plate":{type:"path",points:[{x:0.06,y:0.16},{x:0.06,y:-0.16}],color:"primary",fill:!1,strokeWidth:0.012},"right-lead":{type:"path",points:[{x:0.06,y:0},{x:0.25,y:0}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},Wv=Nt(Da,{kind:"capacitor",orientation:"down",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),Rv=Nt(Da,{kind:"capacitor",orientation:"left",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),Ov=Nt(Da,{kind:"capacitor",orientation:"right",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),jv=Nt(Da,{kind:"capacitor",orientation:"up",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),{paths:$v,texts:GV,bounds:fo,refblocks:B_,circles:Xv}=Va,Vv=F({primitives:[...Object.values($v),...Object.values(Xv),{type:"text",text:"{REF}",x:0.2,y:-0.095},{type:"text",text:"{VAL}",x:-0.2,y:-0.095}],ports:[{...B_.left1,labels:["1"]},{...B_.right1,labels:["2"]}],size:{width:fo.width,height:fo.height},center:{x:fo.centerX,y:fo.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),zv={...Vv,size:{width:0.9,height:0.6}},Ua={paths:{"left-lead":{type:"path",points:[{x:-0.175,y:0},{x:-0.05,y:0}],color:"primary",fill:!1,strokeWidth:0.012},"left-plate":{type:"path",points:[{x:-0.05,y:0.14},{x:-0.05,y:-0.14}],color:"primary",fill:!1,strokeWidth:0.012},"right-plate":{type:"path",points:[{x:0.05,y:0.14},{x:0.05,y:-0.14}],color:"primary",fill:!1,strokeWidth:0.012},"right-lead":{type:"path",points:[{x:0.05,y:0},{x:0.175,y:0}],color:"primary",fill:!1,strokeWidth:0.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},Dv=Nt(Ua,{kind:"capacitor",orientation:"down",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),Uv=Nt(Ua,{kind:"capacitor",orientation:"left",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),Gv=Nt(Ua,{kind:"capacitor",orientation:"right",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),Qv=Nt(Ua,{kind:"capacitor",orientation:"up",pin1Labels:["1","pos"],pin2Labels:["2","neg"]}),ai={paths:{path11:{type:"path",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.29,y:0.29},{x:0.29,y:-0.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.02,y:0.37},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:-0.37}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.04,radius:0.29,color:"primary",fill:!1}}},{paths:Hv,texts:QV,bounds:_o,refblocks:F_,circles:Zv}=ai,Kv=F({primitives:[...Object.values(Hv),...Object.values(Zv),{type:"text",text:"{REF}",x:-0.15,y:0.3894553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.3894553499999995}],ports:[{...F_.left1,labels:["1"]},{...F_.right1,labels:["2"]}],size:{width:_o.width,height:_o.height},center:{x:_o.centerX,y:_o.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Jv=F(ai).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:qv,texts:HV,bounds:go,refblocks:P_,circles:tS}=ai,eS=F({primitives:[...Object.values(qv),...Object.values(tS),{type:"text",text:"{REF}",x:-0,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:0,y:0.3894553499999995}],ports:[{...P_.left1,labels:["1"]},{...P_.right1,labels:["2"]}],size:{width:go.width,height:go.height},center:{x:go.centerX,y:go.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),rS=F(ai).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:iS,texts:ZV,bounds:xo,refblocks:I_,circles:nS}=ai,oS=F({primitives:[...Object.values(iS),...Object.values(nS),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...I_.left1,labels:["1"]},{...I_.right1,labels:["2"]}],size:{width:xo.width,height:xo.height},center:{x:xo.centerX,y:xo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:aS,texts:KV,bounds:bo,refblocks:M_,circles:sS}=ai,cS=F({primitives:[...Object.values(aS),...Object.values(sS),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...M_.left1,labels:["1"]},{...M_.right1,labels:["2"]}],size:{width:bo.width,height:bo.height},center:{x:bo.centerX,y:bo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Ga={paths:{path27:{type:"path",points:[{x:0.54,y:-0.01},{x:0.13,y:-0.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:0.13,y:0.25},{x:0.13,y:-0.27}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:0.07,y:0.25},{x:0.07,y:-0.28}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-0.14,y:0.25},{x:-0.14,y:-0.27}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-0.08,y:0.26},{x:-0.08,y:-0.27}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:0.07,y:0.26},{x:-0.08,y:0.26}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:0.07,y:-0.28},{x:-0.08,y:-0.28}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-0.21,y:0.32},{x:0.2,y:0.32}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:0.71},{x:0,y:0.33},{x:0,y:0.32}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-0.21,y:0.32},{x:-0.21,y:0.25}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:0.2,y:0.32},{x:0.2,y:0.25}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:0.19,y:-0.35},{x:-0.22,y:-0.35}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-0.02,y:-0.71},{x:-0.02,y:-0.36},{x:-0.02,y:-0.35}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:0.19,y:-0.35},{x:0.19,y:-0.28}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-0.22,y:-0.35},{x:-0.22,y:-0.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-0.14,y:-0.01},{x:-0.54,y:-0.01}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:0.53,y:0.28},right1:{type:"text",text:"{VAL}",x:0.54,y:-0.28}},refblocks:{top1:{x:0,y:0.71},bottom1:{x:-0.02,y:-0.71},left1:{x:-0.54,y:-0.01},right1:{x:0.54,y:-0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.74,maxY:0.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:lS,texts:JV,bounds:vo,refblocks:So,circles:pS}=Ga,hS=F({primitives:[...Object.values(lS),...Object.values(pS),{type:"text",text:"{REF}",x:-0.4,y:0.4094554499999995},{type:"text",text:"{VAL}",x:0.4,y:0.4094553499999995}],ports:[{...So.left1,labels:["1"]},{...So.right1,labels:["3"]},{...So.bottom1,labels:["2"]},{...So.top1,labels:["4"]}],size:{width:vo.width,height:vo.height},center:{x:vo.centerX,y:vo.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),dS=F(Ga).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["3"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),mS=F(Ga).labelPort("top1",["4","gnd1"]).labelPort("bottom1",["2","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),{paths:uS,texts:qV,bounds:wo,refblocks:Ao,circles:yS}=Ga,fS=F({primitives:[...Object.values(uS),...Object.values(yS),{type:"text",text:"{VAL}",x:-0.4,y:-0.4094554499999995},{type:"text",text:"{REF}",x:0.4,y:-0.4094553499999995}],ports:[{...Ao.left1,labels:["1"]},{...Ao.right1,labels:["3"]},{...Ao.bottom1,labels:["2"]},{...Ao.top1,labels:["4"]}],size:{width:wo.width,height:wo.height},center:{x:wo.centerX,y:wo.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),Qa={paths:{path27:{type:"path",points:[{x:0.55,y:-0.01},{x:0.13,y:-0.01}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-0.14,y:-0.01},{x:-0.55,y:-0.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:0.13,y:-0.28},{x:0.13,y:0.25}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:0.07,y:-0.28},{x:0.07,y:0.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-0.14,y:-0.28},{x:-0.14,y:0.25}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-0.08,y:-0.28},{x:-0.08,y:0.25}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:0.07,y:-0.28},{x:-0.08,y:-0.28}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:0.07,y:0.26},{x:-0.08,y:0.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{VAL}",x:-0.01,y:-0.42},bottom1:{type:"text",text:"{REF}",x:0,y:0.43}},refblocks:{left1:{x:-0.55,y:-0.01},right1:{x:0.55,y:-0.01}},bounds:{minX:-0.58,maxX:0.58,minY:-0.52,maxY:0.43,width:1.16,height:1,centerX:0,centerY:-0.04},circles:{}},{paths:_S,texts:tz,bounds:Bo,refblocks:k_,circles:gS}=Qa,xS=F({primitives:[...Object.values(_S),...Object.values(gS),{type:"text",text:"{REF}",x:-0.3,y:0.3094553499999995},{type:"text",text:"{VAL}",x:0.3,y:0.3094553499999995}],ports:[{...k_.left1,labels:["1"]},{...k_.right1,labels:["2"]}],size:{width:Bo.width,height:Bo.height},center:{x:Bo.centerX,y:Bo.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),bS=F(Qa).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),vS=F(Qa).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:SS,texts:ez,bounds:Fo,refblocks:C_,circles:wS}=Qa,AS=F({primitives:[...Object.values(SS),...Object.values(wS),{type:"text",text:"{REF}",x:0.3,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:-0.3094553499999995}],ports:[{...C_.left1,labels:["1"]},{...C_.right1,labels:["2"]}],size:{width:Fo.width,height:Fo.height},center:{x:Fo.centerX,y:Fo.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),Zi=0.6,Uc=0.3,BS=[{type:"path",points:[{x:-Zi,y:0},{x:-Uc,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:Uc,y:0},{x:Zi,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:Uc,color:"primary",fill:!1},{type:"path",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:"primary",fill:!1}],FS=F({primitives:[...BS,{type:"text",text:"{REF}",x:-0.2,y:0.35},{type:"text",text:"{VAL}",x:0.2,y:0.35}],ports:[{x:-Zi,y:0,labels:["1"]},{x:Zi,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:Zi*2,height:0.9}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Ki=0.6,Gc=0.3,PS=[{type:"path",points:[{x:-Ki,y:0},{x:-Gc,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:Gc,y:0},{x:Ki,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:Gc,color:"primary",fill:!1},{type:"path",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:"primary",fill:!1}],IS=F({primitives:[...PS,{type:"text",text:"{REF}",x:0,y:-0.4},{type:"text",text:"{VAL}",x:0,y:0.4}],ports:[{x:-Ki,y:0,labels:["1"]},{x:Ki,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:Ki*2,height:0.9}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Ji=0.6,Qc=0.3,MS=[{type:"path",points:[{x:-Ji,y:0},{x:-Qc,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:Qc,y:0},{x:Ji,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:Qc,color:"primary",fill:!1},{type:"path",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:"primary",fill:!1}],kS=F({primitives:[...MS,{type:"text",text:"{REF}",x:0,y:0.4},{type:"text",text:"{VAL}",x:0,y:-0.4}],ports:[{x:-Ji,y:0,labels:["1"]},{x:Ji,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:Ji*2,height:0.9}}).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),qi=0.6,Hc=0.3,CS=[{type:"path",points:[{x:-qi,y:0},{x:-Hc,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:Hc,y:0},{x:qi,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:Hc,color:"primary",fill:!1},{type:"path",points:[{x:-0.1,y:0},{x:0.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:0.08}],color:"primary",fill:!1},{type:"path",points:[{x:0.15,y:0},{x:0.05,y:-0.08}],color:"primary",fill:!1}],YS=F({primitives:[...CS,{type:"text",text:"{REF}",x:0.2,y:-0.35},{type:"text",text:"{VAL}",x:-0.2,y:-0.35}],ports:[{x:-qi,y:0,labels:["1"]},{x:qi,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:qi*2,height:0.9}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),si={paths:{path11:{type:"path",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.88,y:-1.94},right1:{type:"text",text:"{REF}",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:0.77,height:0.86,centerX:1.96,centerY:-1.55},circles:{"path1-0":{type:"circle",x:2.05,y:-1.54,radius:0.3,color:"primary",fill:!1}}},LS=F(si).rotateRightFacingSymbol("down").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0.8,y:-0.15}).changeTextAnchor("{REF}","middle_left",{x:0,y:0.15}).build(),ES=F(si).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),TS=F(si).rotateRightFacingSymbol("left").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-0.8}).changeTextAnchor("{REF}","middle_left",{x:0,y:0.8}).build(),NS=F(si).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),WS=F(si).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-0.15}).changeTextAnchor("{REF}","middle_left",{x:0.8,y:0.15}).build(),RS=F(si).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-0.15}).changeTextAnchor("{REF}","middle_left",{x:0.8,y:0.15}).build(),OS={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-0.12,y:0.09},{x:0.12,y:0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.45},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.35},left1:{type:"text",text:"A",x:0,y:-0.1}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:-0.09,maxY:0.09,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:Y_,bounds:Po,refblocks:L_,circles:jS}=OS,nn=It({primitives:[Y_.path11,Y_.path12,{type:"path",points:[{x:-0.12,y:0.14},{x:0.12,y:0.14}],color:"primary",fill:!1},...Object.values(jS),{type:"text",text:"{REF}",x:0,y:0.3594553499999995,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-0.35,anchor:"middle_top"},{type:"path",points:[{x:-0.095,y:-0.16},{x:0,y:0.09}],color:"primary",fill:!1},{type:"path",points:[{x:0,y:0.09},{x:0.095,y:-0.16}],color:"primary",fill:!1},{type:"path",points:[{x:-0.048,y:-0.045},{x:0.048,y:-0.045}],color:"primary",fill:!1}],ports:[{...L_.left1,labels:["1"]},{...L_.right1,labels:["2"]}],size:{width:Po.width,height:Po.height},center:{x:Po.centerX,y:Po.centerY}}),gl=structuredClone(nn);gl.primitives=gl.primitives.map((t)=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:-0.16,y:0.3594553499999995,anchor:"middle_bottom"}:t.text==="{VAL}"?{...t,x:0.16,y:0.35,anchor:"middle_bottom"}:t);var E_=en(gl,{newOrientation:"down"}),$S=ii(nn),XS=nn,xl=structuredClone(nn);xl.primitives=xl.primitives.map((t)=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:0.16,y:-0.3594553499999995,anchor:"middle_top"}:t.text==="{VAL}"?{...t,x:-0.16,y:-0.35,anchor:"middle_top"}:t);var VS=en(xl,{newOrientation:"up"}),ci={paths:{path11:{type:"path",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0.04},{x:0.54,y:0.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-0.12,y:-0.14},{x:0.12,y:-0.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.17,y:0.4},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.04,radius:0.29,color:"primary",fill:!1}}},{paths:zS,texts:rz,bounds:Io,refblocks:T_,circles:DS}=ci,US=F({primitives:[...Object.values(zS),...Object.values(DS),{type:"text",text:"{REF}",x:-0.15,y:0.3894553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.3894553499999995}],ports:[{...T_.left1,labels:["1"]},{...T_.right1,labels:["2"]}],size:{width:Io.width,height:Io.height},center:{x:Io.centerX,y:Io.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:GS,texts:iz,bounds:Mo,refblocks:N_,circles:QS}=ci,HS=F({primitives:[...Object.values(GS),...Object.values(QS),{type:"text",text:"{REF}",x:-0,y:0.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-0.3294553499999995}],ports:[{...N_.left1,labels:["1"]},{...N_.right1,labels:["2"]}],size:{width:Mo.width,height:Mo.height},center:{x:Mo.centerX,y:Mo.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ZS,texts:nz,bounds:ko,refblocks:W_,circles:KS}=ci,JS=F({primitives:[...Object.values(ZS),...Object.values(KS),{type:"text",text:"{REF}",x:-0,y:-0.3294553499999995},{type:"text",text:"{VAL}",x:0,y:0.4294553499999995}],ports:[{...W_.left1,labels:["1"]},{...W_.right1,labels:["2"]}],size:{width:ko.width,height:ko.height},center:{x:ko.centerX,y:ko.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:qS,texts:oz,bounds:Co,refblocks:R_,circles:t3}=ci,e3=F({primitives:[...Object.values(qS),...Object.values(t3),{type:"text",text:"{REF}",x:-0,y:0.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-0.3294553499999995}],ports:[{...R_.left1,labels:["1"]},{...R_.right1,labels:["2"]}],size:{width:Co.width,height:Co.height},center:{x:Co.centerX,y:Co.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:r3,texts:az,bounds:Yo,refblocks:O_,circles:i3}=ci,n3=F({primitives:[...Object.values(r3),...Object.values(i3),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...O_.left1,labels:["1"]},{...O_.right1,labels:["2"]}],size:{width:Yo.width,height:Yo.height},center:{x:Yo.centerX,y:Yo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:o3,texts:sz,bounds:Lo,refblocks:j_,circles:a3}=ci,s3=F({primitives:[...Object.values(o3),...Object.values(a3),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...j_.left1,labels:["1"]},{...j_.right1,labels:["2"]}],size:{width:Lo.width,height:Lo.height},center:{x:Lo.centerX,y:Lo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),li={paths:{path11:{type:"path",points:[{x:-0.54,y:0.04},{x:-0.11,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.1,y:0.04},{x:0.54,y:0.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.09,y:-0.15},{x:-0.09,y:0.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:0.09,y:-0.15},{x:0.09,y:0.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.15},{x:0.09,y:-0.05},{x:-0.08,y:0.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:0.08,y:0.26},{x:0.08,y:0.05},{x:-0.09,y:0.15},{x:0.07,y:0.26}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.03,y:0.42},bottom1:{type:"text",text:"{VAL}",x:-0.03,y:-0.42}},refblocks:{left1:{x:-0.54,y:0.04},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.42,maxY:0.42,width:1.14,height:0.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.05,radius:0.29,color:"primary",fill:!1}}},c3=F(li).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:-0.03,y:0.2}).changeTextAnchor("{VAL}","middle_left",{x:0.8,y:-0.2}).build(),l3=F(li).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.1}).changeTextAnchor("{VAL}","middle_top").build(),p3=F(li).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.8}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-0.9}).build(),h3=F(li).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.1}).changeTextAnchor("{VAL}","middle_top").build(),d3=F(li).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:0.7,y:0.2}).changeTextAnchor("{VAL}","middle_left",{x:-0.13,y:-0.2}).build(),m3=F(li).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:0.7,y:0.2}).changeTextAnchor("{VAL}","middle_left",{x:-0.13,y:-0.2}).build(),Ha={paths:{triangle:{type:"path",points:[{x:-0.06,y:-0.09},{x:-0.06,y:0.09},{x:0.06,y:0},{x:-0.06,y:-0.09}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-0.11,y:0},{x:-0.06,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.03}},refblocks:{left1:{x:-0.11,y:0}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{}},{paths:u3,bounds:$_,refblocks:y3}=Ha,f3=F({primitives:[...Object.values(u3),{type:"text",text:"{REF}",x:-0.13,y:-0}],ports:[{...y3.left1,labels:["1"]}],center:{x:$_.centerX,y:$_.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:_3,bounds:X_,refblocks:g3}=Ha,x3=F({primitives:[...Object.values(_3),{type:"text",text:"{REF}",x:-0.13,y:0}],ports:[{...g3.left1,labels:["1"]}],center:{x:X_.centerX,y:X_.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:b3,bounds:V_,refblocks:v3}=Ha,S3=F({primitives:[...Object.values(b3),{type:"text",text:"{REF}",x:-0.13,y:-0}],ports:[{...v3.left1,labels:["1"]}],center:{x:V_.centerX,y:V_.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:w3,bounds:z_,refblocks:A3}=Ha,B3=F({primitives:[...Object.values(w3),{type:"text",text:"{REF}",x:-0.13,y:0}],ports:[{...A3.left1,labels:["1"]}],center:{x:z_.centerX,y:z_.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),F3={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},Za=F(F3).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),P3=z(Za,"down"),I3=z(Za,"left"),M3=z(Za,"up"),k3={paths:{path1:{type:"path",points:[{x:-0.37,y:0.22},{x:-0.13,y:0.22}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-0.07,y:0.22},{x:0.11,y:0.16}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.1,y:0.13},{x:0.37,y:0.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0.12,y:0.36},{x:0.37,y:0.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-0.37,y:-0.18},{x:-0.13,y:-0.18}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-0.07,y:-0.19},{x:0.1,y:-0.24}],color:"primary",fill:!1},path5:{type:"path",points:[{x:0.1,y:-0.27},{x:0.37,y:-0.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:0.12,y:-0.04},{x:0.37,y:-0.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-0.2},{x:0,y:0.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.56},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.42}},refblocks:{left1:{x:-0.37,y:0.22},left2:{x:-0.37,y:-0.18},right1:{x:0.37,y:0.36},right2:{x:0.37,y:0.13},right3:{x:0.37,y:-0.04},right5:{x:0.37,y:-0.27}},bounds:{minX:-0.4,maxX:0.4,minY:-0.47,maxY:0.56,width:1,height:1.04,centerX:0,centerY:0.05},circles:{"circle-2":{type:"circle",x:0.08,y:0.13,radius:0.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:0.08,y:-0.27,radius:0.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:0.08,y:0.37,radius:0.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:0.08,y:-0.04,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0.22,radius:0.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-0.1,y:-0.18,radius:0.02,color:"primary",fill:!1}}},Ka=F(k3).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Fl=z(Ka,"down"),Pl=Fl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Il=Fl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Pl.anchor="middle_bottom";Il.anchor="middle_top";Pl.x=0;Pl.y+=0.537;Il.y-=0.5375;Il.x=0;var C3=Fl,Ml=z(Ka,"left"),kl=Ml.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Cl=Ml.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");kl.anchor="middle_bottom";Cl.anchor="middle_top";kl.x=0;kl.y+=1;Cl.y-=1;Cl.x=0;var Y3=Ml,Yl=z(Ka,"up"),Ll=Yl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),El=Yl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ll.anchor="middle_bottom";El.anchor="middle_top";Ll.x=0;Ll.y+=0.537;El.y-=0.5375;El.x=0;var L3=Yl,E3={paths:{path1:{type:"path",points:[{x:-0.37,y:0.22},{x:-0.13,y:0.22}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-0.07,y:0.23},{x:0.11,y:0.33}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.1,y:0.13},{x:0.37,y:0.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0.12,y:0.36},{x:0.37,y:0.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-0.37,y:-0.18},{x:-0.13,y:-0.18}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-0.07,y:-0.18},{x:0.11,y:-0.07}],color:"primary",fill:!1},path5:{type:"path",points:[{x:0.1,y:-0.27},{x:0.37,y:-0.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:0.12,y:-0.04},{x:0.37,y:-0.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-0.12},{x:0,y:0.27}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.61},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.52}},refblocks:{left1:{x:-0.37,y:0.22},left2:{x:-0.37,y:-0.18},right1:{x:0.37,y:0.36},right2:{x:0.37,y:0.13},right3:{x:0.37,y:-0.04},right5:{x:0.37,y:-0.27}},bounds:{minX:-0.4,maxX:0.4,minY:-0.47,maxY:0.56,width:1,height:1.04,centerX:0,centerY:0.05},circles:{"circle-2":{type:"circle",x:0.08,y:0.13,radius:0.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:0.08,y:-0.27,radius:0.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:0.08,y:0.37,radius:0.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:0.08,y:-0.04,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0.22,radius:0.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-0.1,y:-0.18,radius:0.02,color:"primary",fill:!1}}},Ja=F(E3).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Tl=z(Ja,"down"),Nl=Tl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Wl=Tl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Nl.anchor="middle_bottom";Wl.anchor="middle_top";Nl.x=0;Nl.y+=0.565;Wl.y-=0.555;Wl.x=0;var T3=Tl,Rl=z(Ja,"left"),Ol=Rl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),jl=Rl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ol.anchor="middle_bottom";jl.anchor="middle_top";Ol.x=0;Ol.y+=1.09;jl.y-=1.09;jl.x=0;var N3=Rl,$l=z(Ja,"up"),Xl=$l.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Vl=$l.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Xl.anchor="middle_bottom";Vl.anchor="middle_top";Xl.x=0;Xl.y+=0.565;Vl.y-=0.555;Vl.x=0;var W3=$l,R3={paths:{path11:{type:"path",points:[{x:-0.38,y:0.06},{x:-0.14,y:0.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.09,y:0.07},{x:0.11,y:0.11}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.13,y:0.06},{x:0.38,y:0.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-0.38,y:-0.17},{x:-0.14,y:-0.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-0.09,y:-0.17},{x:0.11,y:-0.12}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:0.13,y:-0.17},{x:0.38,y:-0.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.31}},refblocks:{left1:{x:-0.38,y:-0.17},left3:{x:-0.38,y:0.06},right1:{x:0.38,y:-0.17},right3:{x:0.38,y:0.06}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.81,height:0.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:0.1,y:0.06,radius:0.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:0.1,y:-0.17,radius:0.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-0.11,y:0.06,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.11,y:-0.17,radius:0.02,color:"primary",fill:!1}}},qa=F(R3).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),zl=z(qa,"down"),Dl=zl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ul=zl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Dl.anchor="middle_bottom";Ul.anchor="middle_top";Dl.x=0.4;Dl.y+=0.265;Ul.y-=0.265;Ul.x=0.4;var O3=zl,Gl=z(qa,"left"),Ql=Gl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Hl=Gl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ql.anchor="middle_bottom";Hl.anchor="middle_top";Ql.x=0;Ql.y+=0.67;Hl.y-=0.67;Hl.x=0;var j3=Gl,Zl=z(qa,"up"),Kl=Zl.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Jl=Zl.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Kl.anchor="middle_bottom";Jl.anchor="middle_top";Kl.x=0.46;Kl.y+=0.265;Jl.y-=0.265;Jl.x=0.46;var $3=Zl,X3={paths:{path11:{type:"path",points:[{x:-0.38,y:0.06},{x:-0.14,y:0.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.09,y:0.07},{x:0.1,y:0.2}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.13,y:0.06},{x:0.38,y:0.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-0.38,y:-0.17},{x:-0.14,y:-0.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-0.09,y:-0.16},{x:0.1,y:-0.03}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:0.13,y:-0.17},{x:0.38,y:-0.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.42}},refblocks:{left1:{x:-0.38,y:-0.17},left3:{x:-0.38,y:0.06},right1:{x:0.38,y:-0.17},right3:{x:0.38,y:0.06}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.81,height:0.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:0.1,y:0.06,radius:0.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:0.1,y:-0.17,radius:0.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-0.11,y:0.06,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.11,y:-0.17,radius:0.02,color:"primary",fill:!1}}},ts=F(X3).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ql=z(ts,"down"),tp=ql.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),ep=ql.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");tp.anchor="middle_bottom";ep.anchor="middle_top";tp.x=0.4;tp.y+=0.295;ep.y-=0.295;ep.x=0.42;var V3=ql,rp=z(ts,"left"),ip=rp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),np=rp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ip.anchor="middle_bottom";np.anchor="middle_top";ip.x=0;ip.y+=0.795;np.y-=0.795;np.x=0;var z3=rp,op=z(ts,"up"),ap=op.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),sp=op.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ap.anchor="middle_bottom";sp.anchor="middle_top";ap.x=0.46;ap.y+=0.315;sp.y-=0.315;sp.x=0.46;var D3=op,ux={paths:{path5:{type:"path",points:[{x:-0.44,y:0},{x:-0.16,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:0.17,y:0},{x:0.44,y:0.01}],color:"primary",fill:!1},path9:{type:"path",points:[{x:-0.25,y:-0.16},{x:0.02,y:0.3},{x:0.25,y:0.17},{x:-0.02,y:-0.29},{x:-0.25,y:-0.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.37}},refblocks:{left1:{x:-0.44,y:0},right1:{x:0.44,y:0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.25,maxY:0.25,width:1.13,height:0.5,centerX:0,centerY:0},circles:{}},{paths:U3,texts:cz,bounds:Eo,refblocks:D_,circles:G3}=ux,yx=F({primitives:[...Object.values(U3),...Object.values(G3),{type:"text",text:"{REF}",x:0.18,y:-0.3204553499999995},{type:"text",text:"{VAL}",x:-0.25,y:-0.3294553499999995}],ports:[{...D_.left1,labels:["1"]},{...D_.right1,labels:["2"]}],size:{width:Eo.width,height:Eo.height},center:{x:Eo.centerX,y:Eo.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),cp=ri(yx),lp=cp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),pp=cp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");lp.anchor="middle_left";pp.anchor="middle_left";lp.y+=0.4;lp.x=0.32;pp.y-=0.45;pp.x=0.32;var Q3=cp,fx=F(ux).labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),H3=ii(fx),pi={paths:{path11:{type:"path",points:[{x:-0.56,y:0.04},{x:-0.22,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.14,y:0.05},{x:0.48,y:0.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:0.14,y:-0.15},{x:0.14,y:0.25}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.22,y:0.25},{x:-0.21,y:-0.15},{x:0.14,y:0.05},{x:-0.22,y:0.25}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.09,y:0.38},bottom1:{type:"text",text:"{VAL}",x:-0.07,y:-0.38},right1:{type:"text",text:"",x:0.59,y:-0.33}},refblocks:{left1:{x:-0.56,y:0.04},right1:{x:0.48,y:0.05}},bounds:{minX:-0.59,maxX:0.59,minY:-0.38,maxY:0.38,width:1.18,height:0.76,centerX:0,centerY:0},circles:{}},{paths:Z3,texts:lz,bounds:To,refblocks:U_,circles:K3}=pi,J3=F({primitives:[...Object.values(Z3),...Object.values(K3),{type:"text",text:"{REF}",x:-0.15,y:0.3294553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.3294553499999995}],ports:[{...U_.left1,labels:["1"]},{...U_.right1,labels:["2"]}],size:{width:To.width,height:To.height},center:{x:To.centerX,y:To.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:q3,texts:pz,bounds:No,refblocks:G_,circles:tw}=pi,ew=F({primitives:[...Object.values(q3),...Object.values(tw),{type:"text",text:"{REF}",x:-0,y:0.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-0.4094553499999995}],ports:[{...G_.left1,labels:["1"]},{...G_.right1,labels:["2"]}],size:{width:No.width,height:No.height},center:{x:No.centerX,y:No.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:rw,texts:hz,bounds:Wo,refblocks:Q_,circles:iw}=pi,nw=F({primitives:[...Object.values(rw),...Object.values(iw),{type:"text",text:"{REF}",x:-0,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:0,y:0.4094553499999995}],ports:[{...Q_.left1,labels:["1"]},{...Q_.right1,labels:["2"]}],size:{width:Wo.width,height:Wo.height},center:{x:Wo.centerX,y:Wo.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ow,texts:dz,bounds:Ro,refblocks:H_,circles:aw}=pi,sw=F({primitives:[...Object.values(ow),...Object.values(aw),{type:"text",text:"{REF}",x:-0,y:0.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-0.4094553499999995}],ports:[{...H_.left1,labels:["1"]},{...H_.right1,labels:["2"]}],size:{width:Ro.width,height:Ro.height},center:{x:Ro.centerX,y:Ro.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:cw,texts:mz,bounds:Oo,refblocks:Z_,circles:lw}=pi,pw=F({primitives:[...Object.values(cw),...Object.values(lw),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...Z_.left1,labels:["1"]},{...Z_.right1,labels:["2"]}],size:{width:Oo.width,height:Oo.height},center:{x:Oo.centerX,y:Oo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:hw,texts:uz,bounds:jo,refblocks:K_,circles:dw}=pi,mw=F({primitives:[...Object.values(hw),...Object.values(dw),{type:"text",text:"{REF}",x:0.15,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2894553499999995}],ports:[{...K_.left1,labels:["1"]},{...K_.right1,labels:["2"]}],size:{width:jo.width,height:jo.height},center:{x:jo.centerX,y:jo.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),uw={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"Hz",x:0,y:-0.04}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:yw,texts:fw,bounds:$o,refblocks:J_,circles:_w}=uw,hp=It({primitives:[...Object.values(yw),...Object.values(_w),{type:"text",text:"{REF}",x:0,y:-0.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:0.35,anchor:"middle_bottom"},{...fw.left1,x:0,y:0.01,anchor:"center",fontSize:0.2}],ports:[{...J_.left1,labels:["1"]},{...J_.right1,labels:["2"]}],size:{width:$o.width,height:$o.height},center:{x:$o.centerX,y:$o.centerY}}),{5:gw,...xw}=hp.primitives;function bw(t){return typeof t=="object"}var q_=z({...hp,primitives:Object.values(xw).filter(bw)}),vw={...q_,primitives:[...q_.primitives,gw]},Sw={paths:{path10:{type:"path",points:[{x:-0.53,y:0.04},{x:0.53,y:0.04}],color:"primary",fill:!1},path14:{type:"path",points:[{x:0,y:0.17},{x:0.27,y:0.17},{x:0.27,y:-0.1},{x:-0.26,y:-0.1},{x:-0.26,y:0.17},{x:0,y:0.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.24},bottom1:{type:"text",text:"{VAL}",x:-0.17,y:-0.24}},refblocks:{left1:{x:-0.53,y:0.04},right1:{x:0.53,y:0.04}},bounds:{minX:-0.56,maxX:0.56,minY:-0.24,maxY:0.24,width:1.13,height:0.47,centerX:0,centerY:0},circles:{}},{paths:ww,texts:Aw,bounds:Xo,refblocks:tg}=Sw,_x=It({primitives:[...Object.values(ww),{...Aw.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-0.2,anchor:"middle_top"}],ports:[{...tg.left1,labels:["1"]},{...tg.right1,labels:["2"]}],size:{width:Xo.width,height:Xo.height},center:{x:Xo.centerX,y:Xo.centerY}}),Bw=z(_x),hi={paths:{path1:{type:"path",points:[{x:-0.29,y:0.01},{x:0.04,y:0}],color:"primary",fill:!0},path2:{type:"path",points:[{x:0.04,y:-0.22},{x:0.04,y:0.22}],color:"primary",fill:!0},path3:{type:"path",points:[{x:0.12,y:-0.17},{x:0.12,y:0.17}],color:"primary",fill:!0},path4:{type:"path",points:[{x:0.19,y:-0.06},{x:0.19,y:0.06}],color:"primary",fill:!0}},texts:{right1:{type:"text",text:"{REF}",x:0.31,y:-0.02}},refblocks:{left1:{x:-0.29,y:0.01}},bounds:{minX:-0.31,maxX:0.31,minY:-0.22,maxY:0.22,width:0.62,height:0.45,centerX:0,centerY:0},circles:{}},Fw=F(hi).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),Pw=F(hi).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),Iw=F(hi).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),Mw=F(hi).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),kw=F(hi).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),Cw=F(hi).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),dp={paths:{path11:{type:"path",points:[{x:-0.52,y:0.03},{x:-0.18,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.19,y:0.04},{x:0.52,y:0.04}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.31,y:0.2},{x:-0.31,y:-0.11},{x:-0.01,y:0.04},{x:-0.3,y:0.2}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:0.33,y:0.2},{x:0.33,y:-0.1},{x:0.04,y:0.04},{x:0.33,y:0.2}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:0.04,y:0.32},bottom1:{type:"text",text:"{VAL}",x:0.04,y:-0.32}},refblocks:{left1:{x:-0.52,y:0.03},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.32,maxY:0.32,width:1.09,height:0.63,centerX:0,centerY:0},circles:{}},{paths:yz,texts:fz,bounds:_z,refblocks:gz,circles:xz}=dp,Yw=F(dp).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Lw=F(dp).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),Ew={paths:{path45:{type:"path",points:[{x:0.14,y:0},{x:-0.13,y:-0.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:0.13,y:0},{x:0.3,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-0.13,y:0.13},{x:0.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-0.13,y:-0.14},{x:-0.13,y:0.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:0.14,y:0.13},{x:0.14,y:-0.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-0.13,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:0.16,y:0.29},{x:0.25,y:0.3},{x:0.22,y:0.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:0.08,y:0.17},{x:0.09,y:0.17},{x:0.21,y:0.27},{x:0.21,y:0.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-0.02,y:0.31},{x:0.08,y:0.32},{x:0.04,y:0.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-0.1,y:0.19},{x:-0.09,y:0.2},{x:0.04,y:0.29},{x:0.04,y:0.29}],color:"primary",fill:!1},box:{type:"path",points:[{x:-0.3,y:-0.4},{x:0.3,y:-0.4},{x:0.3,y:0.4},{x:-0.3,y:0.4},{x:-0.3,y:-0.4},{x:-0.3,y:0.4}],color:"primary",fill:!1},"path48-1":{type:"path",points:[{x:-0.3,y:0.13},{x:-0.54,y:0.13}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-0.3,y:-0.13},{x:-0.54,y:-0.13}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:0.3,y:-0.13},{x:0.54,y:-0.13}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:0.3,y:0.13},{x:0.54,y:0.13}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-0.43},right1:{type:"text",text:"{REF}",x:0,y:0.43}},refblocks:{left1:{x:-0.54,y:0.13},left2:{x:-0.54,y:-0.13},right1:{x:0.54,y:-0.13},right2:{x:0.54,y:0.13}},bounds:{minX:-0.56,maxX:0.56,minY:-0.32,maxY:0.32,width:1.13,height:0.65,centerX:0,centerY:0},circles:{}},es=F(Ew).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["3","GND"]).labelPort("right2",["4","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Tw=z(es,"down"),Nw=ii(es),mp=z(es,"up"),up=mp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),yp=mp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");up.anchor="middle_left";yp.anchor="middle_left";up.y+=0.21;up.x=0.44;yp.y-=0.21;yp.x=0.44;var Ww=mp,Rw={paths:{path11:{type:"path",points:[{x:-0.4,y:0},{x:-0.01,y:0}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:"primary",fill:!1},path42:{type:"path",points:[{x:0.01,y:-0.12},{x:0.01,y:0.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.28,y:-0.25},{x:0.28,y:-0.56}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.28,y:0.56},{x:0.28,y:0.27}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.17,y:-0.22},{x:0.28,y:-0.23},{x:0.23,y:-0.14}],color:"primary",fill:!0},path17:{type:"path",points:[{x:0.08,y:-0.09},{x:0.23,y:-0.2}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.07,y:0.11},{x:0.28,y:0.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.02,y:-0.42}},refblocks:{top1:{x:0.28,y:0.56},bottom1:{x:0.28,y:-0.56},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.14,y:0.01,radius:0.29,color:"primary",fill:!1}}},gx=F(Rw).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),fp=z(gx),_p=fp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),xx=fp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");_p.anchor="middle_left";xx.anchor="middle_right";_p.x=0.45;_p.y+=0.065;xx.y+=0.065;var Ow=fp,jw={paths:{"path12-1-8-6-9":{type:"path",points:[{x:0.02,y:-0.02},{x:0.02,y:-0.1}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-0.47,y:-0.19},{x:-0.17,y:-0.19}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:0.02,y:0.17},{x:0.02,y:0.11}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-0.15,y:-0.03},{x:0.2,y:-0.19}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.2,y:-0.19},{x:0.47,y:-0.19}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:0.02,y:0.12},{x:0.02,y:0.02}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:0.08,y:0.11},{x:0.08,y:0.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-0.04,y:0.11},{x:-0.04,y:0.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:0.08,y:0.11},{x:-0.04,y:0.11}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-0.01,y:0.28},{x:0.01,y:0.25},{x:0.04,y:0.23},{x:0.06,y:0.2}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-0.01,y:0.2},{x:0.01,y:0.23},{x:0.04,y:0.25},{x:0.06,y:0.28}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:0.01,y:0.38},bottom1:{type:"text",text:"{VAL}",x:0.06,y:-0.38}},refblocks:{left1:{x:-0.47,y:-0.19},right1:{x:0.47,y:-0.19}},bounds:{minX:-0.5,maxX:0.5,minY:-0.38,maxY:0.38,width:1,height:0.76,centerX:0,centerY:0},circles:{path9:{type:"circle",x:0.02,y:0.24,radius:0.06,color:"primary",fill:!1}}},bx=F(jw).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),vx=z(bx),Sx=vx.primitives.filter((t)=>t.type==="text"),gp=Sx.find((t)=>t.text==="{VAL}");gp.x=-0.35;gp.y=0;gp.anchor="middle_right";var xp=Sx.find((t)=>t.text==="{REF}");xp.y=0;xp.x=0.35;xp.anchor="middle_left";var $w=vx,rs={paths:{path8698:{type:"path",points:[{x:-0.19796749999999919,y:-0.023826854587889912},{x:-0.2004570399999992,y:-0.018993393814014044},{x:-0.2029465799999992,y:-0.014174384106555204},{x:-0.20543611999999922,y:-0.009384187436300498},{x:-0.20792565999999923,y:-0.004636988132081332},{x:-0.21041519999999925,y:0.00005329457033053167},{x:-0.21290473999999926,y:0.004673092344940184},{x:-0.21539427999999927,y:0.009209271428771242},{x:-0.21788381999999928,y:0.013649213595881985},{x:-0.2203733599999993,y:0.01798089395292432},{x:-0.2228628999999993,y:0.022192955076609913},{x:-0.22535243999999932,y:0.02627477703600152},{x:-0.22784197999999933,y:0.030216542867918667},{x:-0.23033151999999935,y:0.03400929910178016},{x:-0.23282105999999936,y:0.03764501096072756},{x:-0.23531059999999937,y:0.04111661189869628},{x:-0.23780013999999938,y:0.04441804716802203},{x:-0.2402896799999994,y:0.04754431114897349},{x:-0.2427792199999994,y:0.05049147821106258},{x:-0.24526875999999942,y:0.053256726915861724},{x:-0.24775829999999943,y:0.05583835741211009},{x:-0.25024783999999944,y:0.05823580191586174},{x:-0.25273737999999946,y:0.060449628211062575},{x:-0.25522691999999947,y:0.0624815361489735},{x:-0.2577164599999995,y:0.06433434716802203},{x:-0.2602059999999995,y:0.06601198689869628},{x:-0.2626955399999995,y:0.06751946096072757},{x:-0.2651850799999995,y:0.06886282410178016},{x:-0.26767461999999953,y:0.07004914286791866},{x:-0.27016415999999954,y:0.0710864520360015},{x:-0.27265369999999955,y:0.07198370507660991},{x:-0.27514323999999957,y:0.07275071895292433},{x:-0.2776327799999996,y:0.07339811359588198},{x:-0.2801223199999996,y:0.07393724642877124},{x:-0.2826118599999996,y:0.07438014234494018},{x:-0.2851013999999996,y:0.07473941957033053},{x:-0.28759093999999963,y:0.07502821186791866},{x:-0.29008047999999964,y:0.07526008756369952},{x:-0.29257001999999965,y:0.07544896589344477},{x:-0.29505955999999967,y:0.07560903118598594},{x:-0.2975490999999997,y:0.07575464541211008},{x:-0.30003863749999965,y:0.07560903118598594},{x:-0.3025281749999997,y:0.07544896589344477},{x:-0.30501771249999965,y:0.07526008756369951},{x:-0.3075072499999996,y:0.07502821186791866},{x:-0.30999678749999965,y:0.07473941957033052},{x:-0.3124863249999996,y:0.07438014234494018},{x:-0.3149758624999996,y:0.07393724642877124},{x:-0.31746539999999956,y:0.07339811359588198},{x:-0.3199549374999996,y:0.07275071895292431},{x:-0.32244447499999956,y:0.07198370507660991},{x:-0.32493401249999954,y:0.0710864520360015},{x:-0.32742354999999956,y:0.07004914286791866},{x:-0.32991308749999954,y:0.06886282410178016},{x:-0.3324026249999995,y:0.06751946096072756},{x:-0.33489216249999954,y:0.06601198689869628},{x:-0.3373816999999995,y:0.06433434716802203},{x:-0.3398712374999995,y:0.06248153614897349},{x:-0.3423607749999995,y:0.06044962821106258},{x:-0.3448503124999994,y:0.05823580191586174},{x:-0.34733984999999945,y:0.05583835741211009},{x:-0.3498293874999995,y:0.053256726915861724},{x:-0.35231892499999945,y:0.050491478211062576},{x:-0.3548084624999994,y:0.0475443111489735},{x:-0.3572979999999994,y:0.04441804716802203},{x:-0.35978753749999937,y:0.04111661189869628},{x:-0.3622770749999994,y:0.03764501096072756},{x:-0.36476661249999937,y:0.03400929910178016},{x:-0.36725614999999934,y:0.030216542867918673},{x:-0.36974568749999936,y:0.02627477703600152},{x:-0.37223522499999934,y:0.022192955076609917},{x:-0.3747247624999993,y:0.017980893952924324},{x:-0.37721429999999934,y:0.013649213595881985},{x:-0.3797038374999993,y:0.00920927142877125},{x:-0.3821933749999993,y:0.004673092344940191},{x:-0.3846829124999993,y:0.00005329457033053514},{x:-0.3871724499999993,y:-0.004636988132081328},{x:-0.38966198749999925,y:-0.009384187436300498},{x:-0.3921515249999992,y:-0.014174384106555197},{x:-0.39464106249999925,y:-0.01899339381401404},{x:-0.3971305999999992,y:-0.023826854587889912}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:0.0011955000000007932,y:-0.02382615458789039},{x:-0.00129403749999919,y:-0.01899269131401453},{x:-0.0037835749999991734,y:-0.014173679106555696},{x:-0.006273112499999156,y:-0.009383479936300985},{x:-0.00876264999999914,y:-0.004636278132081827},{x:-0.011252187499999122,y:0.00005400707033003174},{x:-0.013741724999999105,y:0.004673807344939681},{x:-0.016231262499999087,y:0.009209988928770731},{x:-0.018720799999999073,y:0.013649933595881476},{x:-0.021210337499999055,y:0.017981616452923805},{x:-0.023699874999999038,y:0.022193680076609393},{x:-0.026189412499999024,y:0.026275504536001},{x:-0.028678949999999002,y:0.030217272867918137},{x:-0.03116848749999899,y:0.034010031601779636},{x:-0.03365802499999897,y:0.03764574596072702},{x:-0.03614756249999895,y:0.04111734939869574},{x:-0.03863709999999894,y:0.04441878716802149},{x:-0.04112663749999892,y:0.04754505364897295},{x:-0.043616174999998904,y:0.05049222321106203},{x:-0.04610571249999888,y:0.05325747441586117},{x:-0.04859524999999887,y:0.055839107412109526},{x:-0.051084787499998854,y:0.05823655441586117},{x:-0.05357432499999884,y:0.06045038321106201},{x:-0.05606386249999881,y:0.06248229364897292},{x:-0.0585533999999988,y:0.06433510716802145},{x:-0.061042937499998784,y:0.0660127493986957},{x:-0.06353247499999877,y:0.06752022596072697},{x:-0.06602201249999876,y:0.06886359160177957},{x:-0.06851154999999873,y:0.07004991286791806},{x:-0.07100108749999871,y:0.07108722453600091},{x:-0.0734906249999987,y:0.0719844800766093},{x:-0.07598016249999869,y:0.07275149645292371},{x:-0.07846969999999867,y:0.07339889359588138},{x:-0.08095923749999864,y:0.07393802892877062},{x:-0.08344877499999863,y:0.07438092734493956},{x:-0.08593831249999861,y:0.07474020707032991},{x:-0.0884278499999986,y:0.07502900186791804},{x:-0.09091738749999859,y:0.07526088006369888},{x:-0.09340692499999856,y:0.07544976089344414},{x:-0.09589646249999854,y:0.0756098286859853},{x:-0.09838599999999853,y:0.07575544541210943},{x:-0.10087553999999854,y:0.0756098286859853},{x:-0.10336507999999855,y:0.07544976089344414},{x:-0.10585461999999857,y:0.07526088006369887},{x:-0.10834415999999858,y:0.07502900186791804},{x:-0.11083369999999859,y:0.0747402070703299},{x:-0.1133232399999986,y:0.07438092734493956},{x:-0.11581277999999862,y:0.07393802892877062},{x:-0.11830231999999863,y:0.07339889359588138},{x:-0.12079185999999864,y:0.07275149645292371},{x:-0.12328139999999865,y:0.0719844800766093},{x:-0.12577093999999867,y:0.07108722453600091},{x:-0.12826047999999868,y:0.07004991286791806},{x:-0.1307500199999987,y:0.06886359160177957},{x:-0.1332395599999987,y:0.06752022596072697},{x:-0.13572909999999871,y:0.0660127493986957},{x:-0.13821863999999873,y:0.06433510716802145},{x:-0.14070817999999874,y:0.06248229364897291},{x:-0.14319771999999875,y:0.06045038321106202},{x:-0.14568725999999876,y:0.05823655441586117},{x:-0.14817679999999878,y:0.055839107412109526},{x:-0.1506663399999988,y:0.05325747441586117},{x:-0.1531558799999988,y:0.05049222321106202},{x:-0.1556454199999988,y:0.047545053648972956},{x:-0.15813495999999883,y:0.04441878716802149},{x:-0.16062449999999884,y:0.04111734939869574},{x:-0.16311403999999885,y:0.03764574596072702},{x:-0.16560357999999886,y:0.034010031601779636},{x:-0.16809311999999887,y:0.03021727286791814},{x:-0.1705826599999989,y:0.026275504536001},{x:-0.1730721999999989,y:0.022193680076609396},{x:-0.1755617399999989,y:0.017981616452923805},{x:-0.17805127999999892,y:0.013649933595881474},{x:-0.18054081999999894,y:0.00920998892877074},{x:-0.18303035999999895,y:0.0046738073449396865},{x:-0.18551989999999896,y:0.00005400707033003521},{x:-0.18800943999999897,y:-0.004636278132081827},{x:-0.19049897999999899,y:-0.009383479936300985},{x:-0.192988519999999,y:-0.01417367910655569},{x:-0.19547805999999898,y:-0.018992691314014522},{x:-0.19796759999999902,y:-0.02382615458789039}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:0.2003586000000006,y:-0.02382615458789039},{x:0.19786906000000057,y:-0.01899269131401453},{x:0.19537952000000058,y:-0.014173679106555696},{x:0.19288998000000057,y:-0.009383479936300985},{x:0.1904004400000006,y:-0.004636278132081827},{x:0.18791090000000055,y:0.00005400707033003174},{x:0.1854213600000005,y:0.004673807344939681},{x:0.18293182000000052,y:0.009209988928770731},{x:0.1804422800000005,y:0.013649933595881476},{x:0.17795274000000053,y:0.017981616452923805},{x:0.17546320000000049,y:0.022193680076609393},{x:0.17297366000000047,y:0.026275504536001},{x:0.17048412000000046,y:0.030217272867918137},{x:0.16799458000000045,y:0.034010031601779636},{x:0.16550504000000044,y:0.03764574596072702},{x:0.16301550000000042,y:0.04111734939869574},{x:0.1605259600000004,y:0.04441878716802149},{x:0.1580364200000004,y:0.04754505364897295},{x:0.1555468800000004,y:0.05049222321106203},{x:0.15305734000000037,y:0.05325747441586117},{x:0.15056780000000036,y:0.055839107412109526},{x:0.14807826000000035,y:0.05823655441586117},{x:0.14558872000000034,y:0.06045038321106201},{x:0.14309918000000033,y:0.06248229364897292},{x:0.1406096400000003,y:0.06433510716802145},{x:0.1381201000000003,y:0.0660127493986957},{x:0.1356305600000003,y:0.06752022596072697},{x:0.13314102000000028,y:0.06886359160177957},{x:0.13065148000000026,y:0.07004991286791806},{x:0.12816194000000025,y:0.07108722453600091},{x:0.12567240000000024,y:0.0719844800766093},{x:0.12318286000000023,y:0.07275149645292371},{x:0.12069332000000021,y:0.07339889359588138},{x:0.1182037800000002,y:0.07393802892877062},{x:0.11571424000000019,y:0.07438092734493956},{x:0.11322470000000018,y:0.07474020707032991},{x:0.11073516000000017,y:0.07502900186791804},{x:0.10824562000000015,y:0.07526088006369888},{x:0.10575608000000014,y:0.07544976089344414},{x:0.10326654000000013,y:0.0756098286859853},{x:0.10077700000000012,y:0.07575544541210943},{x:0.09828746250000013,y:0.0756098286859853},{x:0.09579792500000014,y:0.07544976089344414},{x:0.09330838750000017,y:0.07526088006369887},{x:0.09081885000000019,y:0.07502900186791804},{x:0.0883293125000002,y:0.0747402070703299},{x:0.08583977500000022,y:0.07438092734493956},{x:0.08335023750000023,y:0.07393802892877062},{x:0.08086070000000026,y:0.07339889359588138},{x:0.07837116250000027,y:0.07275149645292371},{x:0.07588162500000029,y:0.0719844800766093},{x:0.0733920875000003,y:0.07108722453600091},{x:0.07090255000000031,y:0.07004991286791806},{x:0.06841301250000034,y:0.06886359160177957},{x:0.06592347500000036,y:0.06752022596072697},{x:0.06343393750000037,y:0.0660127493986957},{x:0.060944400000000384,y:0.06433510716802145},{x:0.0584548625000004,y:0.06248229364897291},{x:0.05596532500000043,y:0.06045038321106202},{x:0.05347578750000044,y:0.05823655441586117},{x:0.050986250000000455,y:0.055839107412109526},{x:0.04849671250000047,y:0.05325747441586117},{x:0.04600717500000048,y:0.05049222321106202},{x:0.04351763750000051,y:0.047545053648972956},{x:0.041028100000000525,y:0.04441878716802149},{x:0.03853856250000054,y:0.04111734939869574},{x:0.036049025000000554,y:0.03764574596072702},{x:0.03355948750000057,y:0.034010031601779636},{x:0.031069950000000596,y:0.03021727286791814},{x:0.02858041250000061,y:0.026275504536001},{x:0.026090875000000624,y:0.022193680076609396},{x:0.023601337500000638,y:0.017981616452923805},{x:0.021111800000000652,y:0.013649933595881474},{x:0.01862226250000068,y:0.00920998892877074},{x:0.016132725000000694,y:0.0046738073449396865},{x:0.013643187500000709,y:0.00005400707033003521},{x:0.011153650000000723,y:-0.004636278132081827},{x:0.008664112500000737,y:-0.009383479936300985},{x:0.006174575000000764,y:-0.01417367910655569},{x:0.0036850375000007786,y:-0.018992691314014522},{x:0.0011955000000007932,y:-0.02382615458789039}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:0.3995216000000006,y:-0.02382615458789039},{x:0.39703206250000056,y:-0.01899269131401453},{x:0.3945425250000006,y:-0.014173679106555696},{x:0.3920529875000006,y:-0.009383479936300985},{x:0.38956345000000064,y:-0.004636278132081827},{x:0.38707391250000067,y:0.00005400707033003174},{x:0.3845843750000007,y:0.004673807344939681},{x:0.38209483750000073,y:0.009209988928770731},{x:0.37960530000000076,y:0.013649933595881476},{x:0.3771157625000008,y:0.017981616452923805},{x:0.37462622500000076,y:0.022193680076609393},{x:0.37213668750000073,y:0.026275504536001},{x:0.36964715000000076,y:0.030217272867918137},{x:0.3671576125000008,y:0.034010031601779636},{x:0.3646680750000008,y:0.03764574596072702},{x:0.36217853750000084,y:0.04111734939869574},{x:0.3596890000000008,y:0.04441878716802149},{x:0.3571994625000009,y:0.04754505364897295},{x:0.35470992500000087,y:0.05049222321106203},{x:0.35222038750000095,y:0.05325747441586117},{x:0.3497308500000009,y:0.055839107412109526},{x:0.3472413125000009,y:0.05823655441586117},{x:0.344751775000001,y:0.06045038321106201},{x:0.34226223750000095,y:0.06248229364897292},{x:0.33977270000000104,y:0.06433510716802145},{x:0.337283162500001,y:0.0660127493986957},{x:0.334793625000001,y:0.06752022596072697},{x:0.33230408750000107,y:0.06886359160177957},{x:0.3298145500000011,y:0.07004991286791806},{x:0.32732501250000107,y:0.07108722453600091},{x:0.3248354750000011,y:0.0719844800766093},{x:0.3223459375000011,y:0.07275149645292371},{x:0.3198564000000011,y:0.07339889359588138},{x:0.3173668625000012,y:0.07393802892877062},{x:0.31487732500000115,y:0.07438092734493956},{x:0.3123877875000012,y:0.07474020707032991},{x:0.3098982500000012,y:0.07502900186791804},{x:0.30740871250000124,y:0.07526088006369888},{x:0.30491917500000126,y:0.07544976089344414},{x:0.30242963750000124,y:0.0756098286859853},{x:0.29994010000000126,y:0.07575544541210943},{x:0.29745056000000125,y:0.0756098286859853},{x:0.29496102000000124,y:0.07544976089344414},{x:0.2924714800000012,y:0.07526088006369887},{x:0.2899819400000012,y:0.07502900186791804},{x:0.2874924000000012,y:0.0747402070703299},{x:0.2850028600000012,y:0.07438092734493956},{x:0.2825133200000012,y:0.07393802892877062},{x:0.28002378000000117,y:0.07339889359588138},{x:0.27753424000000115,y:0.07275149645292371},{x:0.27504470000000114,y:0.0719844800766093},{x:0.27255516000000113,y:0.07108722453600091},{x:0.2700656200000011,y:0.07004991286791806},{x:0.2675760800000011,y:0.06886359160177957},{x:0.2650865400000011,y:0.06752022596072697},{x:0.2625970000000011,y:0.0660127493986957},{x:0.26010746000000107,y:0.06433510716802145},{x:0.25761792000000105,y:0.06248229364897291},{x:0.25512838000000104,y:0.06045038321106202},{x:0.25263884000000103,y:0.05823655441586117},{x:0.250149300000001,y:0.055839107412109526},{x:0.247659760000001,y:0.05325747441586117},{x:0.245170220000001,y:0.05049222321106202},{x:0.24268068000000098,y:0.047545053648972956},{x:0.24019114000000097,y:0.04441878716802149},{x:0.23770160000000096,y:0.04111734939869574},{x:0.23521206000000094,y:0.03764574596072702},{x:0.23272252000000093,y:0.034010031601779636},{x:0.23023298000000092,y:0.03021727286791814},{x:0.2277434400000009,y:0.026275504536001},{x:0.2252539000000009,y:0.022193680076609396},{x:0.22276436000000088,y:0.017981616452923805},{x:0.22027482000000087,y:0.013649933595881474},{x:0.21778528000000086,y:0.00920998892877074},{x:0.21529574000000085,y:0.0046738073449396865},{x:0.21280620000000083,y:0.00005400707033003521},{x:0.21031666000000082,y:-0.004636278132081827},{x:0.2078271200000008,y:-0.009383479936300985},{x:0.2053375800000008,y:-0.01417367910655569},{x:0.20284804000000078,y:-0.018992691314014522},{x:0.20035850000000077,y:-0.02382615458789039}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-0.40026109999999937,y:-0.022544054587890106},{x:-0.5272914999999991,y:-0.022544054587890106}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:0.5282280000000006,y:-0.027111054587890093},{x:0.4011975999999997,y:-0.027111054587890093}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.0020145999999989783,y:0.22997364541210996},bottom1:{type:"text",text:"{VAL}",x:-0.002185205294839676,y:-0.22997364541210996}},refblocks:{left1:{x:-0.5279125,y:-0.021272154587890446},right1:{x:0.5279125,y:-0.026521254587889898}},bounds:{minX:-0.556070941,maxX:0.556070941,minY:-0.22997364541210996,maxY:0.22997364541210996,width:1.112141882,height:0.4599472908242199,centerX:0,centerY:0},circles:{}},Xw=F(rs).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right",{x:-0.5,y:0}).changeTextAnchor("{VAL}","middle_left",{x:0.5,y:0}).build(),Vw=F(rs).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.5}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-0.5}).build(),zw=F(rs).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Dw=F(rs).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_left").build(),wx={paths:{path11:{type:"path",points:[{x:-0.54,y:-0.06},{x:-0.15,y:-0.06}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.13,y:-0.05},{x:-0.13,y:-0.18}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.13,y:0.08},{x:0.13,y:-0.05}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.13,y:-0.18},{x:-0.13,y:0.08}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.13,y:0.08},{x:0.13,y:-0.18}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.14,y:-0.05},{x:0.54,y:-0.06}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-0.03,y:0.39},{x:-0.05,y:0.47},{x:-0.08,y:0.39}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-0.05,y:0.27},{x:-0.05,y:0.29},{x:-0.05,y:0.41},{x:-0.05,y:0.42}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:0.07,y:0.39},{x:0.04,y:0.47},{x:0.02,y:0.39}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:0.04,y:0.27},{x:0.04,y:0.29},{x:0.04,y:0.41},{x:0.04,y:0.42}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:0.03,y:0.06},{x:0.03,y:-0.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.38,y:0.38},bottom1:{type:"text",text:"{VAL}",x:0.38,y:-0.47}},refblocks:{left1:{x:-0.54,y:-0.06},right1:{x:0.54,y:-0.06}},bounds:{minX:-0.57,maxX:0.57,minY:-0.47,maxY:0.47,width:1.14,height:0.93,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-0.05,radius:0.29,color:"primary",fill:!1}}};wx.bounds.width+=0.2;var is=F(wx).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),bp=z(is,"down"),vp=bp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Sp=bp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");vp.anchor="middle_left";Sp.anchor="middle_left";vp.y+=0.9;vp.x=0.3;Sp.y-=0.1;Sp.x=0.3;var Uw=bp,wp=z(is,"left"),Ap=wp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Bp=wp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ap.anchor="middle_left";Bp.anchor="middle_left";Ap.y+=0.71;Ap.x=0.44;Bp.y-=0.71;Bp.x=0.44;var Gw=wp,Fp=z(is,"up"),Pp=Fp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ip=Fp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Pp.anchor="middle_left";Ip.anchor="middle_left";Pp.y+=0.1;Pp.x=0.3;Ip.y-=0.71;Ip.x=0.3;var Qw=Fp,Hw={paths:{path45:{type:"path",points:[{x:0.14,y:0},{x:-0.13,y:-0.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:0.13,y:0},{x:0.54,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-0.13,y:0.13},{x:0.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-0.13,y:-0.14},{x:-0.13,y:0.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:0.14,y:0.13},{x:0.14,y:-0.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-0.13,y:0},{x:-0.54,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:0.16,y:0.29},{x:0.25,y:0.3},{x:0.22,y:0.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:0.08,y:0.17},{x:0.09,y:0.17},{x:0.21,y:0.27},{x:0.21,y:0.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-0.02,y:0.31},{x:0.08,y:0.32},{x:0.04,y:0.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-0.1,y:0.19},{x:-0.09,y:0.2},{x:0.04,y:0.29},{x:0.04,y:0.29}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-0.21},right1:{type:"text",text:"{REF}",x:0,y:0.41}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.56,maxX:0.56,minY:-0.32,maxY:0.32,width:1.13,height:0.65,centerX:0,centerY:0},circles:{}},{paths:Zw,texts:eg,bounds:Vo,refblocks:rg,circles:Kw}=Hw,Mp=It({primitives:[...Object.values(Zw),...Object.values(Kw),{...eg.bottom1,anchor:"middle_top"},{...eg.right1,anchor:"middle_bottom"}],ports:[{...rg.left1,labels:["1"]},{...rg.right1,labels:["2"]}],size:{width:Vo.width,height:Vo.height},center:{x:Vo.centerX,y:Vo.centerY}}),kp=z(Mp,"up"),Cp=kp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Yp=kp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Cp.anchor="middle_left";Yp.anchor="middle_left";Cp.y+=0.21;Cp.x=0.21;Yp.y-=0.21;Yp.x=0.21;var Ax=kp,Lp=ri(Ax),Ep=Lp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Tp=Lp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ep.anchor="middle_left";Tp.anchor="middle_left";Ep.y+=0.4;Ep.x=0.2;Tp.y-=0.41;Tp.x=0.2;var Jw=Lp,qw=ii(Mp),t8={paths:{path11:{type:"path",points:[{x:-0.52,y:-0.01},{x:-0.18,y:-0.01}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-0.17,y:-0.11},{x:-0.17,y:0.08}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-0.17,y:-0.12},{x:0.16,y:-0.12}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-0.17,y:0.08},{x:0.16,y:0.08}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.17,y:-0.01},{x:0.52,y:-0.01}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:0.16,y:-0.12},{x:0.16,y:0.08}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-0.4,y:-0.21},{x:-0.33,y:-0.18},{x:-0.34,y:-0.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-0.45,y:-0.34},{x:-0.44,y:-0.32},{x:-0.35,y:-0.22},{x:-0.35,y:-0.22}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-0.3,y:-0.34},{x:-0.22,y:-0.31},{x:-0.24,y:-0.4}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-0.35,y:-0.46},{x:-0.34,y:-0.45},{x:-0.25,y:-0.35},{x:-0.25,y:-0.35}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.17,y:-0.41},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.46}},refblocks:{left1:{x:-0.52,y:-0.01},right1:{x:0.52,y:-0.01}},bounds:{minX:-0.55,maxX:0.55,minY:-0.51,maxY:0.46,width:1.1,height:0.62,centerX:0,centerY:-0.02},circles:{path1:{type:"circle",x:0,y:-0.02,radius:0.28,color:"primary",fill:!1}}},{paths:e8,texts:ig,bounds:zo,refblocks:ng,circles:r8}=t8,Bx=It({primitives:[...Object.values(e8),...Object.values(r8),{...ig.top1,anchor:"middle_left",x:0},{...ig.bottom1,anchor:"middle_left",x:0}],ports:[{...ng.left1,labels:["1"]},{...ng.right1,labels:["2"]}],size:{width:zo.width,height:zo.height},center:{x:zo.centerX,y:zo.centerY}}),Fx=z(Bx),Px=Fx.primitives.filter((t)=>t.type==="text"),Np=Px.find((t)=>t.text==="{VAL}");Np.x=-0.35;Np.y=0;Np.anchor="middle_right";var Wp=Px.find((t)=>t.text==="{REF}");Wp.y=0;Wp.x=0.35;Wp.anchor="middle_left";var i8=Fx,n8={paths:{path208:{type:"path",points:[{x:0.38,y:0.13},{x:0.52,y:-0.13}],color:"primary",fill:!1},path209:{type:"path",points:[{x:0.25,y:-0.13},{x:0.38,y:0.13}],color:"primary",fill:!1},path210:{type:"path",points:[{x:0.52,y:-0.13},{x:0.25,y:-0.13}],color:"primary",fill:!1},path211:{type:"path",points:[{x:0.25,y:0.13},{x:0.52,y:0.13}],color:"primary",fill:!1},path212:{type:"path",points:[{x:0.12,y:-0.4},{x:0.38,y:-0.4}],color:"primary",fill:!1},path213:{type:"path",points:[{x:0.38,y:0.4},{x:0.12,y:0.4}],color:"primary",fill:!1},path214:{type:"path",points:[{x:0.12,y:0.54},{x:0.12,y:0.18}],color:"primary",fill:!1},path215:{type:"path",points:[{x:0.12,y:-0.54},{x:0.12,y:0}],color:"primary",fill:!1},path216:{type:"path",points:[{x:0.38,y:-0.4},{x:0.38,y:0.4}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-0.14,y:0.26},{x:-0.14,y:-0.27}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-0.22,y:-0.27},{x:-0.22,y:0.26}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-0.54,y:-0.27},{x:-0.22,y:-0.27}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-0.14,y:-0.19},{x:0.12,y:-0.19}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-0.14,y:0.18},{x:0.12,y:0.18}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-0.07,y:0},{x:0.12,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:0.57,y:0.02},right2:{type:"text",text:"{REF}",x:0.57,y:0.21}},refblocks:{top1:{x:0.12,y:0.54},bottom1:{x:0.12,y:-0.54},left1:{x:-0.54,y:-0.27}},bounds:{minX:-0.57,maxX:0.57,minY:-0.57,maxY:0.57,width:1.14,height:1.14,centerX:0,centerY:0},circles:{}};function on(t,e){return{width:Math.max(...e.map((r)=>Math.abs(r.x-t.x)))*2,height:Math.max(...e.map((r)=>Math.abs(r.y-t.y)))*2}}var{paths:o8,texts:og,bounds:ag,refblocks:Jr}=n8,sg={x:ag.centerX+0.2,y:ag.centerY},Ix=It({primitives:[...Object.values(o8),{...og.right1,anchor:"middle_left"},{...og.right2,anchor:"middle_left"}],ports:[{...Jr.top1,labels:["1"]},{...Jr.bottom1,labels:["2"]},{...Jr.left1,labels:["3"]}],size:on(sg,[Jr.top1,Jr.bottom1,Jr.left1]),center:sg}),Rp=z(Ix),Mx=Rp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Op=Rp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Mx.anchor="middle_top";Op.anchor="middle_top";Mx.x=Op.x;Op.y+=0.15;var a8=Rp,s8={paths:{"path12-1-8-6-9":{type:"path",points:[{x:0.01,y:0.07},{x:0.01,y:-0.01}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-0.47,y:-0.09},{x:-0.17,y:-0.09}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-0.16,y:-0.01},{x:0.17,y:-0.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.2,y:-0.09},{x:0.47,y:-0.09}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-0.1,y:0.06},{x:-0.1,y:0.06},{x:-0.1,y:0.07},{x:-0.1,y:0.07},{x:-0.1,y:0.07},{x:-0.1,y:0.08},{x:-0.1,y:0.08},{x:-0.1,y:0.08},{x:-0.1,y:0.09},{x:-0.09,y:0.09},{x:-0.09,y:0.09},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.1},{x:-0.09,y:0.11},{x:-0.09,y:0.11},{x:-0.08,y:0.11},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.08,y:0.12},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.07,y:0.13},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.06,y:0.14},{x:-0.05,y:0.14},{x:-0.05,y:0.15},{x:-0.05,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.04,y:0.15},{x:-0.03,y:0.16},{x:-0.03,y:0.16},{x:-0.03,y:0.16},{x:-0.02,y:0.16},{x:-0.02,y:0.16},{x:-0.02,y:0.16},{x:-0.01,y:0.16},{x:-0.01,y:0.16},{x:0,y:0.16},{x:0,y:0.16},{x:0,y:0.16},{x:0.01,y:0.16},{x:0.01,y:0.16},{x:0.01,y:0.16},{x:0.02,y:0.16},{x:0.02,y:0.16},{x:0.02,y:0.16},{x:0.03,y:0.16},{x:0.03,y:0.16},{x:0.03,y:0.16},{x:0.04,y:0.16},{x:0.04,y:0.16},{x:0.04,y:0.16},{x:0.05,y:0.15},{x:0.05,y:0.15},{x:0.05,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.15},{x:0.06,y:0.14},{x:0.07,y:0.14},{x:0.07,y:0.14},{x:0.07,y:0.14},{x:0.08,y:0.14},{x:0.08,y:0.13},{x:0.08,y:0.13},{x:0.08,y:0.13},{x:0.09,y:0.13},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.09,y:0.12},{x:0.1,y:0.11},{x:0.1,y:0.11},{x:0.1,y:0.1},{x:0.1,y:0.1},{x:0.11,y:0.09},{x:0.11,y:0.09},{x:0.11,y:0.09},{x:0.11,y:0.08},{x:0.11,y:0.08},{x:0.11,y:0.08},{x:0.11,y:0.07},{x:0.11,y:0.07},{x:0.11,y:0.07},{x:0.11,y:0.06},{x:0.11,y:0.06},{x:0.1,y:0.06},{x:0.1,y:0.06},{x:0.09,y:0.06},{x:0.09,y:0.06},{x:0.08,y:0.06},{x:0.07,y:0.06},{x:0.07,y:0.06},{x:0.06,y:0.06},{x:0.05,y:0.06},{x:0.05,y:0.06},{x:0.04,y:0.06},{x:0.03,y:0.06},{x:0.03,y:0.06},{x:0.02,y:0.06},{x:0.01,y:0.06},{x:0.01,y:0.06},{x:0,y:0.06},{x:-0.01,y:0.06},{x:-0.01,y:0.06},{x:-0.02,y:0.06},{x:-0.03,y:0.06},{x:-0.03,y:0.06},{x:-0.04,y:0.06},{x:-0.05,y:0.06},{x:-0.05,y:0.06},{x:-0.06,y:0.06},{x:-0.07,y:0.06},{x:-0.07,y:0.06},{x:-0.08,y:0.06},{x:-0.09,y:0.06},{x:-0.09,y:0.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:-0.16,y:-0.27}},refblocks:{left1:{x:-0.47,y:-0.09},right1:{x:0.47,y:-0.09}},bounds:{minX:-0.5,maxX:0.5,minY:-0.27,maxY:0.27,width:1,height:0.53,centerX:0,centerY:0},circles:{}},{paths:c8,texts:cg,bounds:Do,refblocks:lg,circles:l8}=s8,kx=It({primitives:[...Object.values(c8),...Object.values(l8),{...cg.top1,anchor:"middle_bottom",x:0},{...cg.bottom1,anchor:"middle_top",x:0}],ports:[{...lg.left1,labels:["1"]},{...lg.right1,labels:["2"]}],size:{width:Do.width,height:Do.height},center:{x:Do.centerX+0.006,y:Do.centerY+0.06}}),jp=z(kx),tn=jp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ta=jp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");tn.anchor="middle_left";Ta.anchor="middle_right";tn.x=tn.x-0.03;tn.y=tn.y;Ta.x=Ta.x;Ta.y=0;var p8=jp,Ct=({horizontalSymbol:t,verticalSymbol:e,gateSide:r,drainSide:i})=>{let n=r==="left"||r==="right",a=i==="left"||i==="right";if(n===a)throw Error(`Invalid MOSFET orientation: gate ${r}, drain ${i}. Gate and drain must be perpendicular.`);let o=n?t:e;return(r==="right"||a&&i==="left")&&(o=ii(o)),(r==="bottom"||!a&&i==="bottom")&&(o=ri(o)),o},h8={paths:{path11:{type:"path",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.09,y:0.19},{x:0.09,y:-0.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.27,y:-0.04},{x:0.27,y:0.03},{x:0.2,y:0},{x:0.27,y:-0.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.05,y:0.17},{x:0.05,y:-0.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.13,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.16,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:d8,texts:pg,bounds:hg,refblocks:dr,circles:m8}=h8,Cx={x:hg.centerX,y:hg.centerY},u8={x:Cx.x,y:dr.left1.y},fe=It({primitives:[...Object.values(d8),...Object.values(m8),{...pg.top1,anchor:"middle_right",x:0},{...pg.bottom1,anchor:"middle_right",x:0}],ports:[{...dr.top1,labels:["1","drain"]},{...dr.bottom1,labels:["2","source"]},{...dr.left1,labels:["3","gate"]}],size:on(Cx,[dr.top1,dr.bottom1,dr.left1]),center:u8}),Yx=z(fe),Lx=Yx.primitives.filter((t)=>t.type==="text"),$p=Lx.find((t)=>t.text==="{VAL}");$p.x=-0.35;$p.y=0;$p.anchor="middle_right";var Xp=Lx.find((t)=>t.text==="{REF}");Xp.y=0;Xp.x=0.35;Xp.anchor="middle_left";var Ye=Yx,y8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"bottom",drainSide:"left"}),f8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"bottom",drainSide:"right"}),_8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"left",drainSide:"bottom"}),g8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"left",drainSide:"top"}),x8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"right",drainSide:"bottom"}),b8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"right",drainSide:"top"}),v8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"top",drainSide:"left"}),S8=Ct({horizontalSymbol:fe,verticalSymbol:Ye,gateSide:"top",drainSide:"right"}),w8={paths:{path11:{type:"path",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:0.09,y:0.15},{x:0.09,y:0.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:0.09,y:-0.08},{x:0.09,y:-0.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:0.09,y:0.03},{x:0.09,y:-0.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.27,y:-0.04},{x:0.27,y:0.03},{x:0.2,y:0},{x:0.27,y:-0.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.05,y:0.11},{x:0.05,y:-0.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.13,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.16,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:A8,texts:dg,bounds:mg,refblocks:qr,circles:B8}=w8,ug={x:mg.centerX,y:mg.centerY},_e=It({primitives:[...Object.values(A8),...Object.values(B8),{...dg.top1,anchor:"middle_right",x:0},{...dg.bottom1,anchor:"middle_right",x:0}],ports:[{...qr.top1,labels:["1","drain"]},{...qr.bottom1,labels:["2","source"]},{...qr.left1,labels:["3","gate"]}],size:on(ug,[qr.top1,qr.bottom1,qr.left1]),center:ug}),Ex=z(_e),Tx=Ex.primitives.filter((t)=>t.type==="text"),Vp=Tx.find((t)=>t.text==="{VAL}");Vp.x=-0.35;Vp.y=0;Vp.anchor="middle_right";var zp=Tx.find((t)=>t.text==="{REF}");zp.y=0;zp.x=0.35;zp.anchor="middle_left";var Le=Ex,F8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"bottom",drainSide:"left"}),P8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"bottom",drainSide:"right"}),I8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"left",drainSide:"bottom"}),M8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"left",drainSide:"top"}),k8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"right",drainSide:"bottom"}),C8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"right",drainSide:"top"}),Y8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"top",drainSide:"left"}),L8=Ct({horizontalSymbol:_e,verticalSymbol:Le,gateSide:"top",drainSide:"right"}),E8={paths:{path11:{type:"path",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.28,y:0.55},{x:0.28,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.07,y:0.11},{x:0.29,y:0.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.07,y:-0.1},{x:0.29,y:-0.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.07},{x:0.01,y:0},{x:-0.08,y:0.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.15,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.04,y:-0.42}},refblocks:{top1:{x:0.28,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.14,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:T8,texts:yg,bounds:Uo,refblocks:Zc,circles:N8}=E8,Nx=It({primitives:[...Object.values(T8),...Object.values(N8),{...yg.top1,anchor:"middle_right",x:0},{...yg.bottom1,anchor:"middle_right",x:0}],ports:[{...Zc.top1,labels:["1","drain"]},{...Zc.bottom1,labels:["2","source"]},{...Zc.left1,labels:["3","gate"]}],size:{width:Uo.width,height:Uo.height},center:{x:Uo.centerX,y:Uo.centerY}}),Wx=z(Nx),Rx=Wx.primitives.filter((t)=>t.type==="text"),Dp=Rx.find((t)=>t.text==="{VAL}");Dp.x=-0.35;Dp.y=0;Dp.anchor="middle_right";var Up=Rx.find((t)=>t.text==="{REF}");Up.y=0;Up.x=0.35;Up.anchor="middle_left";var W8=Wx,R8={paths:{diag1:{type:"path",points:[{x:-0.1,y:-0.1},{x:0.1,y:0.1}],color:"primary",fill:!1},diag2:{type:"path",points:[{x:-0.1,y:0.1},{x:0.1,y:-0.1}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-0.2,y:0},{x:0,y:0}],color:"primary",fill:!1}},texts:{},refblocks:{left1:{x:-0.2,y:0}},bounds:{minX:-0.19,maxX:0.2,minY:-0.12,maxY:0.12,width:0.39,height:0.24,centerX:0,centerY:0},circles:{}},{paths:O8,bounds:fg,refblocks:j8}=R8,ns=F({primitives:[...Object.values(O8)],ports:[{...j8.left1,labels:["1"]}],center:{x:fg.centerX,y:fg.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).build(),$8=z(ns,"down"),X8=z(ns,"left"),V8=z(ns,"up"),di={paths:{path11:{type:"path",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:0.07,y:0.27},{x:0.07,y:-0.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:0.28,y:0.24},{x:0.08,y:0.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:0.29,y:-0.24},{x:0.09,y:-0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.29,y:0.25},{x:0.29,y:0.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.19,y:-0.1},{x:0.12,y:-0.2},{x:0.22,y:-0.2},{x:0.19,y:-0.1}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.08,y:0.36},bottom1:{type:"text",text:"{VAL}",x:-0.07,y:-0.41}},refblocks:{top1:{x:0.29,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:0.14,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:z8,texts:bz,bounds:Go,refblocks:Kc,circles:D8}=di,U8=F({primitives:[...Object.values(z8),...Object.values(D8),{type:"text",text:"{REF}",x:-0.3,y:0.5094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:-0.5094553499999995}],ports:[{...Kc.top1,labels:["1","collector"]},{...Kc.bottom1,labels:["3","emitter"]},{...Kc.left1,labels:["2","base"]}],size:{width:Go.width,height:Go.height},center:{x:Go.centerX,y:Go.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:G8,texts:vz,bounds:Qo,refblocks:Jc,circles:Q8}=di,H8=F({primitives:[...Object.values(G8),...Object.values(Q8),{type:"text",text:"{REF}",x:0.55,y:-0.4094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:-0.4094553499999995}],ports:[{...Jc.top1,labels:["1","collector"]},{...Jc.bottom1,labels:["3","emitter"]},{...Jc.left1,labels:["2","base"]}],size:{width:Qo.width,height:Qo.height},center:{x:Qo.centerX,y:Qo.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Z8,texts:Sz,bounds:Ho,refblocks:qc,circles:K8}=di,J8=F({primitives:[...Object.values(Z8),...Object.values(K8),{type:"text",text:"{REF}",x:-0.5,y:0.3094553499999995},{type:"text",text:"{VAL}",x:0.55,y:0.3094553499999995}],ports:[{...qc.top1,labels:["1","collector"]},{...qc.bottom1,labels:["3","emitter"]},{...qc.left1,labels:["2","base"]}],size:{width:Ho.width,height:Ho.height},center:{x:Ho.centerX,y:Ho.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:q8,texts:wz,bounds:Zo,refblocks:tl,circles:tA}=di,eA=F({primitives:[...Object.values(q8),...Object.values(tA),{type:"text",text:"{REF}",x:0.55,y:-0.4094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:-0.4094553499999995}],ports:[{...tl.top1,labels:["1","collector"]},{...tl.bottom1,labels:["3","emitter"]},{...tl.left1,labels:["2","base"]}],size:{width:Zo.width,height:Zo.height},center:{x:Zo.centerX,y:Zo.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:rA,texts:Az,bounds:Ko,refblocks:el,circles:iA}=di,nA=F({primitives:[...Object.values(rA),...Object.values(iA),{type:"text",text:"{REF}",x:-0.3,y:-0.4094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:0.4094553499999995}],ports:[{...el.top1,labels:["1","collector"]},{...el.bottom1,labels:["3","emitter"]},{...el.left1,labels:["2","base"]}],size:{width:Ko.width,height:Ko.height},center:{x:Ko.centerX,y:Ko.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:oA,texts:Bz,bounds:Jo,refblocks:rl,circles:aA}=di,sA=F({primitives:[...Object.values(oA),...Object.values(aA),{type:"text",text:"{REF}",x:-0.3,y:-0.4094553499999995},{type:"text",text:"{VAL}",x:-0.3,y:0.4094553499999995}],ports:[{...rl.top1,labels:["1","collector"]},{...rl.bottom1,labels:["3","emitter"]},{...rl.left1,labels:["2","base"]}],size:{width:Jo.width,height:Jo.height},center:{x:Jo.centerX,y:Jo.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),cA={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.32,y:-0.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.32,y:0.31},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.32,y:-0.21},{x:-0.32,y:0.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.32,y:0.18},{x:-0.57,y:0.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-0.32,y:-0.09},{x:-0.57,y:-0.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.43,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-0.19,y:-0.09},{x:-0.27,y:-0.09}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-0.19,y:0.18},{x:-0.27,y:0.18}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-0.23,y:0.14},{x:-0.23,y:0.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.3}},refblocks:{left1:{x:-0.57,y:0.18},left2:{x:-0.57,y:-0.09},right1:{x:0.43,y:0.04}},bounds:{minX:-0.57,maxX:0.43,minY:-0.38,maxY:0.27,width:1.09,height:0.3,centerX:-0.07,centerY:0.05},circles:{}},os=F(cA).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),lA=z(os,"down"),pA=ri(z(os,"left")),hA=z(os,"up"),dA={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.32,y:-0.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.32,y:0.31},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.32,y:-0.21},{x:-0.32,y:0.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.32,y:0.18},{x:-0.57,y:0.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-0.32,y:-0.09},{x:-0.57,y:-0.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.43,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-0.1,y:0.44},{x:-0.1,y:0.18}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-0.09,y:-0.34},{x:-0.09,y:-0.09}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-0.19,y:0.18},{x:-0.27,y:0.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-0.19,y:-0.09},{x:-0.27,y:-0.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-0.23,y:0.14},{x:-0.23,y:0.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:0.25,y:0.32},bottom1:{type:"text",text:"{VAL}",x:0.25,y:-0.24}},refblocks:{left1:{x:-0.57,y:0.18},left2:{x:-0.57,y:-0.09},right1:{x:0.43,y:0.04},top2:{x:-0.1,y:0.44},bottom1:{x:-0.09,y:-0.34}},bounds:{minX:-0.57,maxX:0.43,minY:-0.38,maxY:0.27,width:1.09,height:0.3,centerX:-0.07,centerY:0.05},circles:{}},as=F(dA).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["4","out"]).labelPort("top2",["5","V+"]).labelPort("bottom1",["3","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),mA=z(as,"down"),uA=ri(z(as,"left")),yA=z(as,"up"),fA={paths:{path11:{type:"path",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.09,y:0.19},{x:0.09,y:-0.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.2,y:0.03},{x:0.2,y:-0.04},{x:0.27,y:-0.01},{x:0.2,y:0.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.05,y:0.17},{x:0.05,y:-0.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.13,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.16,y:0,radius:0.29,color:"primary",fill:!1}}};var{paths:_A,texts:_g,bounds:gg,refblocks:ti,circles:gA}=fA,xg={x:gg.centerX,y:gg.centerY},ge=It({primitives:[...Object.values(_A),...Object.values(gA),{..._g.top1,anchor:"middle_right",x:0},{..._g.bottom1,anchor:"middle_right",x:0}],ports:[{...ti.top1,labels:["1","drain"]},{...ti.bottom1,labels:["2","source"]},{...ti.left1,labels:["3","gate"]}],size:on(xg,[ti.top1,ti.bottom1,ti.left1]),center:xg}),Ox=z(ge),jx=Ox.primitives.filter((t)=>t.type==="text"),Gp=jx.find((t)=>t.text==="{VAL}");Gp.x=-0.35;Gp.y=0;Gp.anchor="middle_right";var Qp=jx.find((t)=>t.text==="{REF}");Qp.y=0;Qp.x=0.35;Qp.anchor="middle_left";var Ee=Ox,xA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"bottom",drainSide:"left"}),bA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"bottom",drainSide:"right"}),vA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"left",drainSide:"bottom"}),SA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"left",drainSide:"top"}),wA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"right",drainSide:"bottom"}),AA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"right",drainSide:"top"}),BA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"top",drainSide:"left"}),FA=Ct({horizontalSymbol:ge,verticalSymbol:Ee,gateSide:"top",drainSide:"right"}),PA={paths:{path11:{type:"path",points:[{x:-0.42,y:-0.1},{x:0.05,y:-0.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.3,y:0.55},{x:0.3,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.31,y:-0.55},{x:0.31,y:-0.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.09,y:0.11},{x:0.31,y:0.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:0.09,y:0.15},{x:0.09,y:0.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.09,y:-0.1},{x:0.31,y:-0.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:0.09,y:-0.08},{x:0.09,y:-0.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:0.09,y:0.03},{x:0.09,y:-0.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.2,y:0.03},{x:0.2,y:-0.04},{x:0.27,y:-0.01},{x:0.2,y:0.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:0.09,y:0},{x:0.31,y:-0.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:0.05,y:0.11},{x:0.05,y:-0.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.13,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.06,y:-0.42}},refblocks:{top1:{x:0.3,y:0.55},bottom1:{x:0.31,y:-0.55},left1:{x:-0.42,y:-0.1}},bounds:{minX:-0.45,maxX:0.45,minY:-0.58,maxY:0.58,width:0.89,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.16,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:IA,texts:bg,bounds:vg,refblocks:ei,circles:MA}=PA,Sg={x:vg.centerX,y:vg.centerY},xe=It({primitives:[...Object.values(IA),...Object.values(MA),{...bg.top1,anchor:"middle_right",x:0},{...bg.bottom1,anchor:"middle_right",x:0}],ports:[{...ei.top1,labels:["1","drain"]},{...ei.bottom1,labels:["2","source"]},{...ei.left1,labels:["3","gate"]}],size:on(Sg,[ei.top1,ei.bottom1,ei.left1]),center:Sg}),$x=z(xe),Xx=$x.primitives.filter((t)=>t.type==="text"),Hp=Xx.find((t)=>t.text==="{VAL}");Hp.x=-0.35;Hp.y=0;Hp.anchor="middle_right";var Zp=Xx.find((t)=>t.text==="{REF}");Zp.y=0;Zp.x=0.35;Zp.anchor="middle_left";var Te=$x,kA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"bottom",drainSide:"left"}),CA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"bottom",drainSide:"right"}),YA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"left",drainSide:"bottom"}),LA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"left",drainSide:"top"}),EA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"right",drainSide:"bottom"}),TA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"right",drainSide:"top"}),NA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"top",drainSide:"left"}),WA=Ct({horizontalSymbol:xe,verticalSymbol:Te,gateSide:"top",drainSide:"right"}),RA={paths:{path11:{type:"path",points:[{x:-0.54,y:-0.01},{x:-0.15,y:-0.02}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.13,y:0},{x:-0.13,y:-0.13}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.13,y:0.13},{x:0.13,y:0}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.13,y:-0.13},{x:-0.13,y:0.13}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.13,y:0.13},{x:0.13,y:-0.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.14,y:0},{x:0.54,y:-0.01}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:0.2,y:0.38},{x:0.16,y:0.28},{x:0.26,y:0.3}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:0.33,y:0.43},{x:0.32,y:0.42},{x:0.21,y:0.31},{x:0.21,y:0.31}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:0.35,y:0.35},{x:0.31,y:0.26},{x:0.41,y:0.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:0.48,y:0.4},{x:0.47,y:0.39},{x:0.35,y:0.29},{x:0.35,y:0.29}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.1,y:0.35},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.43}},refblocks:{left1:{x:-0.54,y:-0.01},right1:{x:0.54,y:-0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.43,maxY:0.43,width:1.14,height:0.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-0.01,radius:0.29,color:"primary",fill:!1}}},Vx=F(RA).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),zx=z(Vx),OA=zx.primitives.filter((t)=>t.type==="text"),Dx=OA.find((t)=>t.text==="{REF}");Dx.y=0;Dx.anchor="middle_left";var jA=zx,$A={paths:{path11:{type:"path",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:0.07,y:0.19},{x:0.07,y:-0.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:0.28,y:0.55},{x:0.28,y:0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.07,y:0.11},{x:0.29,y:0.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:0.07,y:-0.1},{x:0.29,y:-0.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.01,y:-0.07},{x:0.01,y:0.06},{x:-0.08,y:0},{x:0.01,y:-0.07}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.15,y:0.36},bottom1:{type:"text",text:"{VAL}",x:0.04,y:-0.42}},refblocks:{top1:{x:0.28,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.14,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:XA,texts:wg,bounds:qo,refblocks:il,circles:VA}=$A,Ux=It({primitives:[...Object.values(XA),...Object.values(VA),{...wg.top1,anchor:"middle_right",x:0},{...wg.bottom1,anchor:"middle_right"}],ports:[{...il.top1,labels:["1","drain"]},{...il.bottom1,labels:["2","source"]},{...il.left1,labels:["3","gate"]}],size:{width:qo.width,height:qo.height},center:{x:qo.centerX,y:qo.centerY}}),Gx=z(Ux),Qx=Gx.primitives.filter((t)=>t.type==="text"),Kp=Qx.find((t)=>t.text==="{VAL}");Kp.x=-0.35;Kp.y=0;Kp.anchor="middle_right";var Jp=Qx.find((t)=>t.text==="{REF}");Jp.y=0;Jp.x=0.35;Jp.anchor="middle_left";var zA=Gx,mr={paths:{path11:{type:"path",points:[{x:-0.4,y:0},{x:0.06,y:-0.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:0.07,y:0.27},{x:0.07,y:-0.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:0.28,y:0.24},{x:0.08,y:0.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:0.29,y:-0.24},{x:0.09,y:-0.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:0.29,y:0.25},{x:0.29,y:0.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:0.29,y:-0.55},{x:0.29,y:-0.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0.15,y:-0.23},{x:0.22,y:-0.12},{x:0.12,y:-0.12},{x:0.15,y:-0.23}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.08,y:0.37},bottom1:{type:"text",text:"{VAL}",x:-0.07,y:-0.41}},refblocks:{top1:{x:0.29,y:0.55},bottom1:{x:0.29,y:-0.55},left1:{x:-0.4,y:0}},bounds:{minX:-0.43,maxX:0.43,minY:-0.58,maxY:0.58,width:0.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:0.14,y:0,radius:0.29,color:"primary",fill:!1}}},{paths:DA,texts:Fz,bounds:ta,refblocks:nl,circles:UA}=mr,GA=F({primitives:[...Object.values(DA),...Object.values(UA),{type:"text",text:"{REF}",x:-0.1,y:0.3094553499999995},{type:"text",text:"{VAL}",x:-0.1,y:-0.3094553499999995}],ports:[{...nl.top1,labels:["1","collector"]},{...nl.bottom1,labels:["3","emitter"]},{...nl.left1,labels:["2","base"]}],size:{width:ta.width,height:ta.height},center:{x:ta.centerX,y:ta.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:Pz,texts:Iz,bounds:Mz,refblocks:kz,circles:Cz}=mr,QA=F(mr).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["2","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["3","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:HA,texts:Yz,bounds:ea,refblocks:ol,circles:ZA}=mr,KA=F({primitives:[...Object.values(HA),...Object.values(ZA),{type:"text",text:"{REF}",x:-0.1,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:-0.1,y:0.3094553499999995}],ports:[{...ol.top1,labels:["1","collector"]},{...ol.bottom1,labels:["3","emitter"]},{...ol.left1,labels:["2","base"]}],size:{width:ea.width,height:ea.height},center:{x:ea.centerX,y:ea.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:JA,texts:Lz,bounds:ra,refblocks:al,circles:qA}=mr,t6=F({primitives:[...Object.values(JA),...Object.values(qA),{type:"text",text:"{REF}",x:-0.1,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:-0.1,y:0.3094553499999995}],ports:[{...al.top1,labels:["1","collector"]},{...al.bottom1,labels:["3","emitter"]},{...al.left1,labels:["2","base"]}],size:{width:ra.width,height:ra.height},center:{x:ra.centerX,y:ra.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:e6,texts:Ez,bounds:ia,refblocks:sl,circles:r6}=mr,i6=F({primitives:[...Object.values(e6),...Object.values(r6),{type:"text",text:"{REF}",x:-0.1,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:-0.1,y:0.3094553499999995}],ports:[{...sl.top1,labels:["1","collector"]},{...sl.bottom1,labels:["3","emitter"]},{...sl.left1,labels:["2","base"]}],size:{width:ia.width,height:ia.height},center:{x:ia.centerX,y:ia.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:n6,texts:Tz,bounds:na,refblocks:cl,circles:o6}=mr,a6=F({primitives:[...Object.values(n6),...Object.values(o6),{type:"text",text:"{REF}",x:-0.1,y:-0.3094553499999995},{type:"text",text:"{VAL}",x:-0.1,y:0.3094553499999995}],ports:[{...cl.top1,labels:["1","collector"]},{...cl.bottom1,labels:["3","emitter"]},{...cl.left1,labels:["2","base"]}],size:{width:na.width,height:na.height},center:{x:na.centerX,y:na.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),s6={paths:{path40:{type:"path",points:[{x:-0.19,y:0.33},{x:-0.26,y:0.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.38,y:0.26},{x:-0.19,y:0.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.26,y:0.14},{x:-0.38,y:0.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-0.26,y:0.39},{x:-0.13,y:0.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.32,y:0.2},{x:-0.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:0.52},{x:-0.19,y:0.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-0.19,y:-0.32},{x:-0.38,y:-0.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-0.26,y:-0.13},{x:-0.19,y:-0.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-0.38,y:-0.26},{x:-0.26,y:-0.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-0.13,y:-0.26},{x:-0.26,y:-0.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-0.32,y:-0.19},{x:-0.51,y:-0.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-0.01,y:-0.5},{x:-0.19,y:-0.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:0.32,y:0.19},{x:0.13,y:0.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:0.26,y:0.38},{x:0.32,y:0.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:0.13,y:0.26},{x:0.26,y:0.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:0.39,y:0.26},{x:0.26,y:0.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:0.2,y:0.32},{x:0.01,y:0.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:0.52,y:0},{x:0.32,y:0.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:0.32,y:-0.19},{x:0.26,y:-0.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:0.13,y:-0.26},{x:0.32,y:-0.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:0.26,y:-0.38},{x:0.13,y:-0.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:0.26,y:-0.13},{x:0.39,y:-0.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:0.19,y:-0.32},{x:0,y:-0.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:0.5,y:-0.01},{x:0.32,y:-0.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.29,y:0.46},bottom1:{type:"text",text:"{VAL}",x:-0.29,y:-0.5}},refblocks:{top1:{x:0,y:0.52},bottom1:{x:0,y:-0.52},left1:{x:-0.52,y:0},right1:{x:0.52,y:0}},bounds:{minX:-0.55,maxX:0.55,minY:-0.55,maxY:0.55,width:1.09,height:1.09,centerX:0,centerY:0},circles:{}},{paths:c6,texts:Ag,bounds:oa,refblocks:Bg}=s6,Hx=It({primitives:[...Object.values(c6),{...Ag.bottom1,y:0.35,anchor:"middle_top"},{...Ag.top1,anchor:"middle_left"}],ports:[{...Bg.left1,labels:["1"]},{...Bg.right1,labels:["2"]}],size:{width:oa.width+0.05,height:oa.height},center:{x:oa.centerX,y:oa.centerY}}),l6=z(Hx),p6=l6,h6={paths:{path18:{type:"path",points:[{x:-0.53,y:0},{x:-0.27,y:0}],color:"primary",fill:!1},path19:{type:"path",points:[{x:0.26,y:0},{x:0.53,y:0}],color:"primary",fill:!1},path20:{type:"path",points:[{x:0,y:0.13},{x:0.26,y:0.13},{x:0.26,y:-0.13},{x:-0.27,y:-0.13},{x:-0.27,y:0.13},{x:0,y:0.13}],color:"primary",fill:!1},path24:{type:"path",points:[{x:0.29,y:-0.29},{x:0.26,y:-0.16},{x:0.16,y:-0.26},{x:0.29,y:-0.29}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-0.3,y:0.29},{x:0.2,y:-0.2}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.06,y:0.2},bottom1:{type:"text",text:"{VAL}",x:-0.1,y:-0.28}},refblocks:{left1:{x:-0.53,y:0},right1:{x:0.53,y:0}},bounds:{minX:-0.56,maxX:0.56,minY:-0.29,maxY:0.29,width:1.13,height:0.58,centerX:0,centerY:0},circles:{}},{paths:d6,texts:Fg,bounds:aa,refblocks:Pg}=h6,ss=It({primitives:[...Object.values(d6),{...Fg.bottom1,x:0,y:-0.35,anchor:"middle_top"},{...Fg.top1,x:0,y:0.35,anchor:"middle_bottom"}],ports:[{...Pg.left1,labels:["1"]},{...Pg.right1,labels:["2"]}],size:{width:aa.width+0.05,height:aa.height},center:{x:aa.centerX,y:aa.centerY}}),qp=z(ss,"down"),th=qp.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),eh=qp.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");th.anchor="middle_left";eh.anchor="middle_left";th.y+=0.31;th.x=0.34;eh.y-=0.31;eh.x=0.34;var m6=qp,rh=z(ss,"left"),ih=rh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),nh=rh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ih.anchor="middle_bottom";nh.anchor="middle_top";ih.y+=0.73;ih.x=0;nh.y-=0.7;nh.x=0;var u6=rh,oh=z(ss,"up"),ah=oh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),sh=oh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ah.anchor="middle_left";sh.anchor="middle_left";ah.y+=0.21;ah.x=0.34;sh.y-=0.21;sh.x=0.34;var y6=oh,cs={paths:{path1:{type:"path",points:[{x:-0.42,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},"path1-2-1":{type:"path",points:[{x:-0.3,y:0},{x:-0.25,y:0.1},{x:-0.15,y:-0.1},{x:-0.05,y:0.1},{x:0.05,y:-0.1},{x:0.15,y:0.1},{x:0.25,y:-0.1},{x:0.3,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.3,y:0},{x:0.42,y:0}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0,y:-0.17},{x:0,y:-0.4}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0,y:-0.12},{x:0.05,y:-0.2},{x:-0.05,y:-0.2},{x:0,y:-0.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:0.3,y:0.25},bottom1:{type:"text",text:"{VAL}",x:0.3,y:-0.25}},refblocks:{left:{x:-0.42,y:0},right:{x:0.42,y:0},bottom:{x:0,y:-0.4}},bounds:{minX:-0.42,maxX:0.42,minY:-0.2,maxY:0.2,width:0.84,height:0.4,centerX:0,centerY:0},circles:{}},{paths:f6,texts:Nz,bounds:sa,refblocks:ll,circles:_6}=cs,g6=F({primitives:[...Object.values(f6),...Object.values(_6),{type:"text",text:"{REF}",x:-0.15,y:0.2394553499999995},{type:"text",text:"{VAL}",x:0.15,y:0.2394553499999995}],ports:[{...ll.left,labels:["1"]},{...ll.right,labels:["3"]},{...ll.bottom,labels:["2"]}],size:{width:sa.width,height:sa.height},center:{x:sa.centerX,y:sa.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:x6,texts:Wz,bounds:ca,refblocks:pl,circles:b6}=cs,v6=F({primitives:[...Object.values(x6),...Object.values(b6),{type:"text",text:"{REF}",x:-0.3,y:-0.3894553499999995},{type:"text",text:"{VAL}",x:-0.3,y:0.3194553499999995}],ports:[{...pl.left,labels:["1"]},{...pl.right,labels:["3"]},{...pl.bottom,labels:["2"]}],size:{width:ca.width,height:ca.height},center:{x:ca.centerX,y:ca.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),S6=F(cs).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:w6,texts:Rz,bounds:la,refblocks:hl,circles:A6}=cs,B6=F({primitives:[...Object.values(w6),...Object.values(A6),{type:"text",text:"{REF}",x:0.3,y:-0.2894553499999995},{type:"text",text:"{VAL}",x:-0.3,y:-0.2894553499999995}],ports:[{...hl.left,labels:["1"]},{...hl.right,labels:["3"]},{...hl.bottom,labels:["2"]}],size:{width:la.width,height:la.height},center:{x:la.centerX,y:la.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),F6={paths:{path11:{type:"path",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.16,y:0.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.4},left1:{type:"text",text:"COS φ",x:-0.15,y:0.01}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.04,radius:0.29,color:"primary",fill:!1}}},{paths:P6,texts:Oz,bounds:pa,refblocks:Ig,circles:I6}=F6,Zx=It({primitives:[...Object.values(P6),...Object.values(I6),{type:"text",text:"{REF}",x:0,y:0.43330070000000065,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-0.43330070000000065,anchor:"middle_top"},{type:"text",text:"COS φ",x:0,y:0.014279000000000375,anchor:"center"}],ports:[{...Ig.left1,labels:["1"]},{...Ig.right1,labels:["2"]}],size:{width:pa.width,height:pa.height},center:{x:pa.centerX,y:pa.centerY}}),Kx=z(Zx),ch=Kx.primitives.filter((t)=>t.type==="text"),bl=ch.find((t)=>t.text==="{REF}"),lh=ch.find((t)=>t.text==="{VAL}"),vl=ch.find((t)=>t.text==="COS φ");bl.x=0.35;bl.y=0.4279000000000375,bl.anchor="middle_left";lh.anchor="middle_left";lh.x=0.35;lh.y=-0.4279000000000375,vl.x=0;vl.y=0.014279000000000375,vl.anchor="center";var M6=Kx,k6={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:0.01,y:0.03},{x:0.01,y:-0.09}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-0.47,y:-0.05},{x:-0.17,y:-0.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-0.16,y:-0.09},{x:0.18,y:-0.09}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:0.2,y:-0.05},{x:0.47,y:-0.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.01,y:0.22},bottom1:{type:"text",text:"{VAL}",x:-0.16,y:-0.22}},refblocks:{left1:{x:-0.47,y:-0.05},right1:{x:0.47,y:-0.05}},bounds:{minX:-0.5,maxX:0.5,minY:-0.22,maxY:0.22,width:1,height:0.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-0.14,y:-0.05,radius:0.02,color:"primary",fill:!1},circle:{type:"circle",x:0.17,y:-0.05,radius:0.02,color:"primary",fill:!1}}},{paths:C6,texts:Mg,bounds:kg,refblocks:Cg,circles:Y6}=k6,Jx=It({primitives:[...Object.values(C6),...Object.values(Y6),{...Mg.top1,anchor:"middle_left"},{...Mg.bottom1,anchor:"middle_left"}],ports:[{...Cg.left1,labels:["1"]},{...Cg.right1,labels:["2"]}],center:{x:kg.centerX,y:kg.centerY}}),L6=z(Jx,"up"),qx={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-0.05,y:0.09},{x:-0.05,y:0.04}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-0.05,y:0.09},{x:0.07,y:0.09}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:0.07,y:0.09},{x:0.07,y:0.04}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-0.47,y:-0.05},{x:-0.17,y:-0.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-0.16,y:0.04},{x:0.18,y:0.04}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:0.2,y:-0.05},{x:0.47,y:-0.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.01,y:0.29},bottom1:{type:"text",text:"{VAL}",x:-0.16,y:-0.22}},refblocks:{left1:{x:-0.47,y:-0.05},right1:{x:0.47,y:-0.05}},bounds:{minX:-0.5,maxX:0.5,minY:-0.22,maxY:0.22,width:1,height:0.45,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-0.14,y:-0.05,radius:0.02,color:"primary",fill:!1},circle:{type:"circle",x:0.17,y:-0.05,radius:0.02,color:"primary",fill:!1}}},{paths:E6,texts:Yg,bounds:T6,refblocks:dl,circles:N6}=qx,an=It({primitives:[...Object.values(E6),...Object.values(N6),{...Yg.top1,x:0,y:0.3594553499999995,anchor:"middle_bottom"},{...Yg.bottom1,x:0,y:-0.3594553499999995,anchor:"middle_top"}],ports:[{...dl.left1,labels:["1"]},{...dl.right1,labels:["2"]}],center:{x:T6.centerX,y:dl.left1.y}}),ph=z(an,"down"),hh=ph.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),dh=ph.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");hh.anchor="middle_bottom";dh.anchor="middle_top";hh.y=0.4;hh.x=0.35;dh.y=-0.4;dh.x=0.35;var W6=ph,{paths:R6,texts:Lg,bounds:O6,refblocks:ml,circles:j6}=qx,$6=It({primitives:[...Object.values(R6),...Object.values(j6),{...Lg.top1,x:0,y:0.3594553499999995,anchor:"middle_bottom"},{...Lg.bottom1,x:0,y:-0.3594553499999995,anchor:"middle_top"}],ports:[{...ml.left1,labels:["1"]},{...ml.right1,labels:["2"]}],center:{x:O6.centerX,y:ml.left1.y}}),mh=z(an,"left"),uh=mh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),yh=mh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");uh.anchor="middle_bottom";yh.anchor="middle_top";uh.y=0.4;uh.x=0;yh.y=-0.4;yh.x=0;var X6=mh,fh=z(an,"up"),_h=fh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),gh=fh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");_h.anchor="middle_left";gh.anchor="middle_left";_h.y+=0.4;_h.x=0.34;gh.y-=0.41;gh.x=0.34;var V6=fh,xh=z(an,"up"),bh=xh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),vh=xh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");bh.anchor="middle_left";vh.anchor="middle_left";bh.y+=0.4;bh.x=0.34;vh.y-=0.41;vh.x=0.34;var z6=xh,ls={paths:{path12_rotated:{type:"path",points:[{x:-0.09,y:0.12},{x:-0.09,y:-0.12}],color:"primary",fill:!1},path2_rotated:{type:"path",points:[{x:-0.09,y:0},{x:0.09,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.03}},refblocks:{left1:{x:0.09,y:0}},bounds:{minX:-0.57,maxX:0.57,minY:-0.37,maxY:0.37,width:1.14,height:0.74,centerX:0,centerY:0},circles:{}},{paths:D6,texts:jz,bounds:Eg,refblocks:U6,circles:G6}=ls,Q6=F({primitives:[...Object.values(D6),...Object.values(G6),{type:"text",text:"{REF}",x:-0.14,y:-0}],ports:[{...U6.left1,labels:["1"]}],center:{x:Eg.centerX,y:Eg.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:H6,texts:$z,bounds:Tg,refblocks:Z6,circles:K6}=ls,J6=F({primitives:[...Object.values(H6),...Object.values(K6),{type:"text",text:"{REF}",x:-0.13,y:0}],ports:[{...Z6.left1,labels:["1"]}],center:{x:Tg.centerX,y:Tg.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:q6,texts:Xz,bounds:Ng,refblocks:tB,circles:eB}=ls,rB=F({primitives:[...Object.values(q6),...Object.values(eB),{type:"text",text:"{REF}",x:-0.14,y:-0}],ports:[{...tB.left1,labels:["1"]}],center:{x:Ng.centerX,y:Ng.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:iB,texts:Vz,bounds:Wg,refblocks:nB}=ls,oB=F({primitives:[...Object.values(iB),{type:"text",text:"{REF}",x:-0.14,y:0}],ports:[{...nB.left1,labels:["1"]}],center:{x:Wg.centerX,y:Wg.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),aB={paths:{path40:{type:"path",points:[{x:-0.19,y:-0.33},{x:-0.26,y:-0.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.38,y:-0.26},{x:-0.19,y:-0.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.26,y:-0.14},{x:-0.38,y:-0.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-0.26,y:-0.39},{x:-0.13,y:-0.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.32,y:-0.2},{x:-0.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:-0.52},{x:-0.19,y:-0.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-0.19,y:0.32},{x:-0.38,y:0.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-0.26,y:0.13},{x:-0.19,y:0.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-0.38,y:0.26},{x:-0.26,y:0.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-0.13,y:0.26},{x:-0.26,y:0.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-0.32,y:0.19},{x:-0.51,y:0.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-0.01,y:0.5},{x:-0.19,y:0.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:0.32,y:-0.19},{x:0.13,y:-0.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:0.26,y:-0.38},{x:0.32,y:-0.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:0.13,y:-0.26},{x:0.26,y:-0.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:0.39,y:-0.26},{x:0.26,y:-0.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:0.2,y:-0.32},{x:0.01,y:-0.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:0.52,y:0},{x:0.32,y:-0.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:0.32,y:0.19},{x:0.26,y:0.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:0.13,y:0.26},{x:0.32,y:0.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:0.26,y:0.38},{x:0.13,y:0.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:0.26,y:0.13},{x:0.39,y:0.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:0.19,y:0.32},{x:0,y:0.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:0.5,y:0.01},{x:0.32,y:0.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.29,y:-0.46},bottom1:{type:"text",text:"{VAL}",x:-0.29,y:0.5}},refblocks:{top1:{x:0,y:-0.52},bottom1:{x:0,y:0.52},left1:{x:-0.52,y:0},right1:{x:0.52,y:0}},bounds:{minX:-0.55,maxX:0.55,minY:-0.56,maxY:0.55,width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:sB,texts:Rg,bounds:ha,refblocks:da,circles:cB}=aB,tb=It({primitives:[...Object.values(sB),...Object.values(cB),{...Rg.top1,anchor:"middle_right"},{...Rg.bottom1,anchor:"middle_right"}],ports:[{...da.top1,labels:["1"]},{...da.bottom1,labels:["2"]},{...da.left1,labels:["3"]},{...da.right1,labels:["4"]}],size:{width:ha.width,height:ha.height},center:{x:ha.centerX,y:ha.centerY}}),Sh=z(tb),lB=Sh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),pB=Sh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");lB.anchor="middle_left";pB.anchor="middle_right";var hB=Sh,ps={paths:{path27:{type:"path",points:[{x:0.47,y:0.04},{x:0.21,y:0.04}],color:"primary",fill:!1},"path27-0":{type:"path",points:[{x:-0.21,y:0.04},{x:-0.47,y:0.04}],color:"primary",fill:!1},"path27-8-2-4":{type:"path",points:[{x:0.21,y:0.04},{x:0.19,y:-0.05}],color:"primary",fill:!1},"path27-8-2-4-29":{type:"path",points:[{x:-0.19,y:0.14},{x:-0.21,y:0.04}],color:"primary",fill:!1},"path27-8-2-4-5":{type:"path",points:[{x:0.19,y:-0.05},{x:0.13,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1":{type:"path",points:[{x:0.08,y:-0.05},{x:0.13,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9":{type:"path",points:[{x:0.08,y:-0.05},{x:0.03,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2":{type:"path",points:[{x:-0.03,y:-0.05},{x:0.03,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1":{type:"path",points:[{x:-0.03,y:-0.05},{x:-0.08,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2":{type:"path",points:[{x:-0.13,y:-0.05},{x:-0.08,y:0.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2-2":{type:"path",points:[{x:-0.13,y:-0.05},{x:-0.19,y:0.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.05,y:0.42},bottom1:{type:"text",text:"{VAL}",x:-0.04,y:-0.42}},refblocks:{left1:{x:-0.47,y:0.04},right1:{x:0.47,y:0.04}},bounds:{minX:-0.49,maxX:0.49,minY:-0.42,maxY:0.42,width:0.99,height:0.84,centerX:0,centerY:0},circles:{}},{paths:dB,texts:zz,bounds:ma,refblocks:Og,circles:mB}=ps,uB=F({primitives:[...Object.values(dB),...Object.values(mB),{type:"text",text:"{REF}",x:-0.2,y:0.2194553499999995},{type:"text",text:"{VAL}",x:0.2,y:0.2194553499999995}],ports:[{...Og.left1,labels:["1"]},{...Og.right1,labels:["2"]}],size:{width:ma.width,height:ma.height},center:{x:ma.centerX,y:ma.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:yB,texts:Dz,bounds:ua,refblocks:jg,circles:fB}=ps,_B=F({primitives:[...Object.values(yB),...Object.values(fB),{type:"text",text:"{REF}",x:0,y:-0.1704553499999995},{type:"text",text:"{VAL}",x:0,y:0.2294553499999995}],ports:[{...jg.left1,labels:["1"]},{...jg.right1,labels:["2"]}],size:{width:ua.width,height:ua.height},center:{x:ua.centerX,y:ua.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:gB,texts:Uz,bounds:ya,refblocks:$g,circles:xB}=ps,bB=F({primitives:[...Object.values(gB),...Object.values(xB),{type:"text",text:"{REF}",x:0,y:0.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-0.1704553499999995}],ports:[{...$g.left1,labels:["1"]},{...$g.right1,labels:["2"]}],size:{width:ya.width,height:ya.height},center:{x:ya.centerX,y:ya.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),hs={paths:{"left-lead":{type:"path",points:[{x:-0.25,y:0},{x:-0.16,y:0}],color:"primary",fill:!1,strokeWidth:0.02},zigzag:{type:"path",points:[{x:-0.16,y:0},{x:-0.12,y:0.095},{x:-0.07,y:-0.095},{x:-0.02,y:0.095},{x:0.02,y:-0.095},{x:0.07,y:0.095},{x:0.12,y:-0.095},{x:0.16,y:0}],color:"primary",fill:!1,strokeWidth:0.02},"right-lead":{type:"path",points:[{x:0.16,y:0},{x:0.25,y:0}],color:"primary",fill:!1,strokeWidth:0.02}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.25,y:0},right1:{x:0.25,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.25,maxY:0.25,width:0.5,height:0.5,centerX:0,centerY:0},circles:{}},vB=Nt(hs,{kind:"resistor",orientation:"down"}),SB=Nt(hs,{kind:"resistor",orientation:"left"}),wB=Nt(hs,{kind:"resistor",orientation:"right"}),AB=Nt(hs,{kind:"resistor",orientation:"up"}),{paths:BB,texts:Gz,bounds:fa,refblocks:Xg,circles:FB}=ps,PB=F({primitives:[...Object.values(BB),...Object.values(FB),{type:"text",text:"{REF}",x:0.2,y:-0.1404553499999995},{type:"text",text:"{VAL}",x:-0.2,y:-0.1494553499999995}],ports:[{...Xg.left1,labels:["1"]},{...Xg.right1,labels:["2"]}],size:{width:fa.width,height:fa.height},center:{x:fa.centerX,y:fa.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),ds={paths:{"left-lead":{type:"path",points:[{x:-0.175,y:0},{x:-0.115,y:0}],color:"primary",fill:!1,strokeWidth:0.02},zigzag:{type:"path",points:[{x:-0.115,y:0},{x:-0.07,y:0.095},{x:-0.025,y:-0.095},{x:0.025,y:0.095},{x:0.07,y:-0.095},{x:0.115,y:0}],color:"primary",fill:!1,strokeWidth:0.02},"right-lead":{type:"path",points:[{x:0.115,y:0},{x:0.175,y:0}],color:"primary",fill:!1,strokeWidth:0.02}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25,anchor:"middle_top"}},refblocks:{left1:{x:-0.175,y:0},right1:{x:0.175,y:0}},bounds:{minX:-0.175,maxX:0.175,minY:-0.25,maxY:0.25,width:0.35,height:0.5,centerX:0,centerY:0},circles:{}},IB=Nt(ds,{kind:"resistor",orientation:"down"}),MB=Nt(ds,{kind:"resistor",orientation:"left"}),kB=Nt(ds,{kind:"resistor",orientation:"right"}),CB=Nt(ds,{kind:"resistor",orientation:"up"}),eb={paths:{path27:{type:"path",points:[{x:0.76,y:-0.28},{x:0.31,y:-0.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-0.3,y:-0.02},{x:-0.77,y:-0.02}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-0.3,y:0.35},{x:-0.3,y:-0.28}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:0.77,y:0.35},{x:0.32,y:0.35}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-0.07,y:-0.28},{x:-0.3,y:-0.28}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:0.33,y:-0.28},{x:0.11,y:-0.28}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-0.06,y:-0.17},{x:-0.06,y:-0.39}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:0.09,y:-0.17},{x:0.09,y:-0.39}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-0.07,y:0.35},{x:-0.3,y:0.35}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:0.33,y:0.35},{x:0.11,y:0.35}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-0.06,y:0.46},{x:-0.06,y:0.24}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:0.09,y:0.46},{x:0.09,y:0.24}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:0.33,y:0.13},{x:0.33,y:0.35}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:0.33,y:-0.28},{x:0.33,y:-0.05}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:0.44,y:0.11},{x:0.22,y:0.11}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:0.44,y:-0.04},{x:0.22,y:-0.04}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:0.44,y:0.07},{x:0.22,y:0.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:0.44,y:0},{x:0.44,y:0.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:0.22,y:0},{x:0.22,y:0.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:0.44,y:0},{x:0.22,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.02,y:0.53},bottom1:{type:"text",text:"{VAL}",x:0.01,y:-0.54}},refblocks:{left1:{x:-0.77,y:-0.02},right1:{x:0.76,y:-0.28},right2:{x:0.77,y:0.35}},bounds:{minX:-0.79,maxX:0.79,minY:-0.54,maxY:0.54,width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:YB,texts:Vg,bounds:_a,refblocks:ul,circles:LB}=eb,ms=It({primitives:[...Object.values(YB),...Object.values(LB),{...Vg.top1,anchor:"middle_bottom"},{...Vg.bottom1,anchor:"middle_top"}],ports:[{...ul.left1,labels:["1"]},{...ul.right1,labels:["2"]},{...ul.right2,labels:["3"]}],size:{width:_a.width,height:_a.height},center:{x:_a.centerX,y:_a.centerY}}),wh=z(ms,"down"),Ah=wh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Bh=wh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ah.anchor="middle_bottom";Bh.anchor="middle_top";Ah.y+=0.3;Ah.x+=0.101;Bh.y-=0.49999;Bh.x+=1.19999;var EB=wh,{paths:TB,texts:Qz,bounds:ga,refblocks:yl,circles:NB}=eb,rb=It({primitives:[...Object.values(TB),...Object.values(NB),{type:"text",text:"{REF}",x:0.01596175000000022,y:-0.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0.013116750000000454,y:0.5408501499999989,anchor:"middle_bottom"}],ports:[{...yl.left1,labels:["1"]},{...yl.right1,labels:["2"]},{...yl.right2,labels:["3"]}],size:{width:ga.width,height:ga.height},center:{x:ga.centerX,y:ga.centerY}}),Fh=z(ms,"left"),Ph=Fh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ih=Fh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ph.anchor="middle_bottom";Ih.anchor="middle_top";Ph.y+=0.99;Ph.x-=0;Ih.y-=1.10999;Ih.x=0;var WB=Fh,Mh=z(ms,"up"),kh=Mh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ch=Mh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");kh.anchor="middle_bottom";Ch.anchor="middle_top";kh.y+=0.499;kh.x=0.62;Ch.y-=0.29999;Ch.x+=0.1;var RB=Mh,OB=z(rb),jB={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:0.21,y:0.18},{x:0.14,y:0.18}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:0.21,y:0.13},{x:0.21,y:0.18}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:0.08,y:-0.09},{x:0.14,y:-0.09}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:0.08,y:-0.04},{x:0.08,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},us=F(jB).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),Yh=z(us,"down"),Lh=Yh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Eh=Yh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Lh.anchor="middle_left";Eh.anchor="middle_left";Lh.y+=0.3;Lh.x=0.3;Eh.y-=0.3;Eh.x=0.3;var $B=Yh,Th=z(us,"left"),Nh=Th.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Wh=Th.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Nh.anchor="middle_bottom";Wh.anchor="middle_top";Nh.y+=0.5;Nh.x=0;Wh.y-=0.55;Wh.x=0;var XB=Th,Rh=z(us,"up"),Oh=Rh.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),jh=Rh.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Oh.anchor="middle_left";jh.anchor="middle_left";Oh.y+=0.3;Oh.x=0.3;jh.y-=0.3;jh.x=0.3;var VB=Rh,ib={paths:{path11:{type:"path",points:[{x:-0.52,y:0.04},{x:-0.18,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.19,y:0.05},{x:0.52,y:0.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:0.18,y:-0.15},{x:0.18,y:0.25}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:0.19,y:0},{x:0.35,y:-0.14}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:0.35,y:-0.14},{x:0.34,y:-0.35}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.17,y:0.27},{x:-0.17,y:-0.15},{x:0.18,y:0.05},{x:-0.17,y:0.27}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.22,y:0.38},bottom1:{type:"text",text:"{VAL}",x:0.11,y:-0.38}},refblocks:{bottom1:{x:0.34,y:-0.35},left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.05}},bounds:{minX:-0.55,maxX:0.55,minY:-0.38,maxY:0.38,width:1.09,height:0.77,centerX:0,centerY:0},circles:{}},{paths:Hz,texts:Zz,bounds:Kz,refblocks:Jz,circles:qz}=ib,nb=F(ib).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),ob=z(nb),zB=ob.primitives.filter((t)=>t.type==="text"),ab=zB.find((t)=>t.text==="{REF}");ab.y=0;ab.anchor="middle_left";var DB=ob,sb={paths:{path44:{type:"path",points:[{x:-0.195,y:-0.025},{x:-0.45,y:-0.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:-0.025},{x:0.195,y:-0.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:0.07,y:-0.025},{x:-0.07,y:-0.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.07,y:0.1},{x:0.07,y:-0.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.07,y:0.1},{x:-0.07,y:-0.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.07,y:0.1},{x:-0.082252,y:0.099398},{x:-0.094386,y:0.097598},{x:-0.106286,y:0.094618},{x:-0.117835,y:0.090485},{x:-0.128925,y:0.08524},{x:-0.139446,y:0.078934},{x:-0.149299,y:0.071626},{x:-0.158388,y:0.063388},{x:-0.166626,y:0.054299},{x:-0.173934,y:0.044446},{x:-0.18024,y:0.033925},{x:-0.185485,y:0.022835},{x:-0.189618,y:0.011286},{x:-0.192598,y:-0.000614},{x:-0.194398,y:-0.012748},{x:-0.195,y:-0.025},{x:-0.194398,y:-0.037252},{x:-0.192598,y:-0.049386},{x:-0.189618,y:-0.061286},{x:-0.185485,y:-0.072835},{x:-0.18024,y:-0.083925},{x:-0.173934,y:-0.094446},{x:-0.166626,y:-0.104299},{x:-0.158388,y:-0.113388},{x:-0.149299,y:-0.121626},{x:-0.139446,y:-0.128934},{x:-0.128925,y:-0.13524},{x:-0.117835,y:-0.140485},{x:-0.106286,y:-0.144618},{x:-0.094386,y:-0.147598},{x:-0.082252,y:-0.149398},{x:-0.07,y:-0.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.07,y:0.1},{x:0.082252,y:0.099398},{x:0.094386,y:0.097598},{x:0.106286,y:0.094618},{x:0.117835,y:0.090485},{x:0.128925,y:0.08524},{x:0.139446,y:0.078934},{x:0.149299,y:0.071626},{x:0.158388,y:0.063388},{x:0.166626,y:0.054299},{x:0.173934,y:0.044446},{x:0.18024,y:0.033925},{x:0.185485,y:0.022835},{x:0.189618,y:0.011286},{x:0.192598,y:-0.000614},{x:0.194398,y:-0.012748},{x:0.195,y:-0.025},{x:0.194398,y:-0.037252},{x:0.192598,y:-0.049386},{x:0.189618,y:-0.061286},{x:0.185485,y:-0.072835},{x:0.18024,y:-0.083925},{x:0.173934,y:-0.094446},{x:0.166626,y:-0.104299},{x:0.158388,y:-0.113388},{x:0.149299,y:-0.121626},{x:0.139446,y:-0.128934},{x:0.128925,y:-0.13524},{x:0.117835,y:-0.140485},{x:0.106286,y:-0.144618},{x:0.094386,y:-0.147598},{x:0.082252,y:-0.149398},{x:0.07,y:-0.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.020635199999998965,y:0.15414649999999952}},refblocks:{left1:{x:-0.4458008,y:-0.025023700000000426},right1:{x:0.4458008,y:-0.02514810000000045}},bounds:{minX:-0.45,maxX:0.45,minY:-0.15,maxY:0.1,width:0.9,height:0.25,centerX:0,centerY:-0.025},circles:{}},UB=F(sb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),$h=F(sb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),cb=z($h,"left"),Xh=cb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Xh.anchor="middle_bottom";Xh.y+=0.4;Xh.x=0;var GB=cb,lb=z($h,"up"),Vh=lb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Vh.anchor="middle_left";Vh.y+=0;Vh.x=0.2;var QB=lb,pb={paths:{path44:{type:"path",points:[{x:-0.195,y:-0.025},{x:-0.45,y:-0.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:-0.025},{x:0.195,y:-0.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.07,y:0.1},{x:0.07,y:-0.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.07,y:0.1},{x:-0.07,y:-0.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.07,y:0.1},{x:-0.082252,y:0.099398},{x:-0.094386,y:0.097598},{x:-0.106286,y:0.094618},{x:-0.117835,y:0.090485},{x:-0.128925,y:0.08524},{x:-0.139446,y:0.078934},{x:-0.149299,y:0.071626},{x:-0.158388,y:0.063388},{x:-0.166626,y:0.054299},{x:-0.173934,y:0.044446},{x:-0.18024,y:0.033925},{x:-0.185485,y:0.022835},{x:-0.189618,y:0.011286},{x:-0.192598,y:-0.000614},{x:-0.194398,y:-0.012748},{x:-0.195,y:-0.025},{x:-0.194398,y:-0.037252},{x:-0.192598,y:-0.049386},{x:-0.189618,y:-0.061286},{x:-0.185485,y:-0.072835},{x:-0.18024,y:-0.083925},{x:-0.173934,y:-0.094446},{x:-0.166626,y:-0.104299},{x:-0.158388,y:-0.113388},{x:-0.149299,y:-0.121626},{x:-0.139446,y:-0.128934},{x:-0.128925,y:-0.13524},{x:-0.117835,y:-0.140485},{x:-0.106286,y:-0.144618},{x:-0.094386,y:-0.147598},{x:-0.082252,y:-0.149398},{x:-0.07,y:-0.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.07,y:0.1},{x:0.082252,y:0.099398},{x:0.094386,y:0.097598},{x:0.106286,y:0.094618},{x:0.117835,y:0.090485},{x:0.128925,y:0.08524},{x:0.139446,y:0.078934},{x:0.149299,y:0.071626},{x:0.158388,y:0.063388},{x:0.166626,y:0.054299},{x:0.173934,y:0.044446},{x:0.18024,y:0.033925},{x:0.185485,y:0.022835},{x:0.189618,y:0.011286},{x:0.192598,y:-0.000614},{x:0.194398,y:-0.012748},{x:0.195,y:-0.025},{x:0.194398,y:-0.037252},{x:0.192598,y:-0.049386},{x:0.189618,y:-0.061286},{x:0.185485,y:-0.072835},{x:0.18024,y:-0.083925},{x:0.173934,y:-0.094446},{x:0.166626,y:-0.104299},{x:0.158388,y:-0.113388},{x:0.149299,y:-0.121626},{x:0.139446,y:-0.128934},{x:0.128925,y:-0.13524},{x:0.117835,y:-0.140485},{x:0.106286,y:-0.144618},{x:0.094386,y:-0.147598},{x:0.082252,y:-0.149398},{x:0.07,y:-0.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.020635199999998965,y:0.15414649999999952}},refblocks:{left1:{x:-0.44,y:-0.02},right1:{x:0.4458008,y:-0.02514810000000045}},bounds:{minX:-0.45,maxX:0.45,minY:-0.15,maxY:0.1,width:0.9,height:0.25,centerX:0,centerY:-0.025},circles:{}},HB=F(pb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),zh=F(pb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),hb=z(zh,"left"),Dh=hb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Dh.anchor="middle_bottom";Dh.y+=0.4;Dh.x=0;var ZB=hb,db=z(zh,"up"),Uh=db.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Uh.anchor="middle_left";Uh.y+=0.05;Uh.x=0.2;var KB=db,mb={paths:{path44:{type:"path",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-0.045,y:0.1},{x:-0.125,y:0.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.020635199999998965,y:0.28075747049999955}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},JB=F(mb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),Gh=F(mb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),ub=z(Gh,"left"),Qh=ub.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Qh.anchor="middle_left";Qh.y+=0.5;Qh.x=0.2;var qB=ub,yb=z(Gh,"up"),Hh=yb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Hh.anchor="middle_left";Hh.y+=0.3;Hh.x=0.2;var t7=yb,fb={paths:{path44:{type:"path",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-0.045,y:0.1},{x:-0.125,y:0.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:0.125,y:0.1},{x:0.045,y:0.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.28}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},e7=F(fb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),Zh=F(fb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),_b=z(Zh,"left"),Kh=_b.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Kh.anchor="middle_left";Kh.y+=0.5;Kh.x=0.2;var r7=_b,gb=z(Zh,"up"),Jh=gb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Jh.anchor="middle_left";Jh.y+=0.4;Jh.x=0.2;var i7=gb,xb={paths:{path44:{type:"path",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:0.125,y:0.1},{x:0.045,y:0.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.28}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},n7=F(xb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),qh=F(xb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),bb=z(qh,"left"),td=bb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");td.anchor="middle_left";td.y+=0.6;td.x=0.3;var o7=bb,vb=z(qh,"up"),ed=vb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");ed.anchor="middle_left";ed.y+=0.4;ed.x=0.2;var a7=vb,Sb={paths:{path44:{type:"path",points:[{x:-0.25,y:0.1},{x:-0.45,y:0.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.45,y:0.1},{x:0.25,y:0.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-0.025},{x:0,y:-0.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.125,y:0.225},{x:0.125,y:-0.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:0.045,y:0.225},{x:0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-0.045,y:0.225},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:0.045,y:0.225},{x:-0.045,y:0.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:0.045,y:-0.025},{x:-0.045,y:-0.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.125,y:-0.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-0.125,y:0.225},{x:-0.137252,y:0.224398},{x:-0.149386,y:0.222598},{x:-0.161286,y:0.219618},{x:-0.172835,y:0.215485},{x:-0.183925,y:0.21024},{x:-0.194446,y:0.203934},{x:-0.204299,y:0.196626},{x:-0.213388,y:0.188388},{x:-0.221626,y:0.179299},{x:-0.228934,y:0.169446},{x:-0.23524,y:0.158925},{x:-0.240485,y:0.147835},{x:-0.244618,y:0.136286},{x:-0.247598,y:0.124386},{x:-0.249398,y:0.112252},{x:-0.25,y:0.1},{x:-0.249398,y:0.087748},{x:-0.247598,y:0.075614},{x:-0.244618,y:0.063714},{x:-0.240485,y:0.052165},{x:-0.23524,y:0.041075},{x:-0.228934,y:0.030554},{x:-0.221626,y:0.020701},{x:-0.213388,y:0.011612},{x:-0.204299,y:0.003374},{x:-0.194446,y:-0.003934},{x:-0.183925,y:-0.01024},{x:-0.172835,y:-0.015485},{x:-0.161286,y:-0.019618},{x:-0.149386,y:-0.022598},{x:-0.137252,y:-0.024398},{x:-0.125,y:-0.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:0.125,y:0.225},{x:0.137252,y:0.224398},{x:0.149386,y:0.222598},{x:0.161286,y:0.219618},{x:0.172835,y:0.215485},{x:0.183925,y:0.21024},{x:0.194446,y:0.203934},{x:0.204299,y:0.196626},{x:0.213388,y:0.188388},{x:0.221626,y:0.179299},{x:0.228934,y:0.169446},{x:0.23524,y:0.158925},{x:0.240485,y:0.147835},{x:0.244618,y:0.136286},{x:0.247598,y:0.124386},{x:0.249398,y:0.112252},{x:0.25,y:0.1},{x:0.249398,y:0.087748},{x:0.247598,y:0.075614},{x:0.244618,y:0.063714},{x:0.240485,y:0.052165},{x:0.23524,y:0.041075},{x:0.228934,y:0.030554},{x:0.221626,y:0.020701},{x:0.213388,y:0.011612},{x:0.204299,y:0.003374},{x:0.194446,y:-0.003934},{x:0.183925,y:-0.01024},{x:0.172835,y:-0.015485},{x:0.161286,y:-0.019618},{x:0.149386,y:-0.022598},{x:0.137252,y:-0.024398},{x:0.125,y:-0.025}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.020635199999998965,y:0.28075747049999955}},refblocks:{left1:{x:-0.45,y:0.1},right1:{x:0.45,y:0.1},bottom1:{x:0,y:-0.275}},bounds:{minX:-0.45,maxX:0.45,minY:-0.28,maxY:0.28,width:0.9,height:0.56,centerX:0,centerY:0},circles:{}},s7=F(Sb).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),rd=F(Sb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),wb=z(rd,"left"),id=wb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");id.anchor="middle_left";id.y+=0.5;id.x=0.3;var c7=wb,Ab=z(rd,"up"),nd=Ab.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");nd.anchor="middle_left";nd.y+=0.3;nd.x=0.2;var l7=Ab,p7={paths:{path1:{type:"path",points:[{x:-0.37,y:0.03},{x:-0.13,y:0.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-0.07,y:0.03},{x:0.11,y:-0.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.1,y:-0.06},{x:0.37,y:-0.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0.12,y:0.17},{x:0.37,y:0.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.37}},refblocks:{left1:{x:-0.37,y:0.03},right1:{x:0.37,y:-0.06},right2:{x:0.37,y:0.17}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.79,height:0.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:0.08,y:-0.07,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0.03,radius:0.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:0.08,y:0.17,radius:0.02,color:"primary",fill:!1}}},ys=F(p7).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),od=z(ys,"down"),ad=od.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),sd=od.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ad.anchor="middle_bottom";sd.anchor="middle_top";ad.x=0.44;ad.y+=0.28;sd.y-=0.28;sd.x=0.44;var h7=od,cd=z(ys,"left"),ld=cd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),pd=cd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");ld.anchor="middle_bottom";pd.anchor="middle_top";ld.x=0;ld.y+=0.625;pd.y-=0.695;pd.x=0;var d7=cd,hd=z(ys,"up"),dd=hd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),md=hd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");dd.anchor="middle_bottom";md.anchor="middle_top";dd.x=0.4;dd.y+=0.28;md.y-=0.28;md.x=0.4;var m7=hd,u7={paths:{path1:{type:"path",points:[{x:-0.37,y:0.03},{x:-0.13,y:0.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-0.07,y:0.03},{x:0.11,y:0.14}],color:"primary",fill:!1},path2:{type:"path",points:[{x:0.1,y:-0.06},{x:0.37,y:-0.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0.12,y:0.17},{x:0.37,y:0.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.4}},refblocks:{left1:{x:-0.37,y:0.03},right1:{x:0.37,y:-0.06},right3:{x:0.37,y:0.17}},bounds:{minX:-0.4,maxX:0.4,minY:-0.4,maxY:0.4,width:0.79,height:0.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:0.08,y:-0.07,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0.03,radius:0.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:0.08,y:0.17,radius:0.02,color:"primary",fill:!1}}},fs=F(u7).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),ud=z(fs,"down"),yd=ud.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),fd=ud.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");yd.anchor="middle_bottom";fd.anchor="middle_top";yd.x=0.44;yd.y+=0.28;fd.y-=0.28;fd.x=0.44;var y7=ud,_d=z(fs,"left"),gd=_d.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),xd=_d.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");gd.anchor="middle_bottom";xd.anchor="middle_top";gd.x=0;gd.y+=0.625;xd.y-=0.695;xd.x=0;var f7=_d,bd=z(fs,"up"),vd=bd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Sd=bd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");vd.anchor="middle_bottom";Sd.anchor="middle_top";vd.x=0.4;vd.y+=0.28;Sd.y-=0.28;Sd.x=0.4;var _7=bd,mi={paths:{"lead-positive":{type:"path",points:[{x:-0.4,y:0.19999999999999996},{x:-0.20000000000000007,y:0.19999999999999996}],color:"primary",fill:!1},"lead-negative":{type:"path",points:[{x:-0.4,y:-0.20000000000000018},{x:-0.20000000000000007,y:-0.20000000000000018}],color:"primary",fill:!1},"voice-coil":{type:"path",points:[{x:-0.20000000000000007,y:0.19999999999999996},{x:0,y:0.19999999999999996},{x:0,y:-0.20000000000000018},{x:-0.20000000000000007,y:-0.20000000000000018},{x:-0.20000000000000007,y:0.19999999999999996}],color:"primary",fill:!1},cone:{type:"path",points:[{x:0,y:0.19999999999999996},{x:0.3999999999999999,y:0.3999999999999999},{x:0.3999999999999999,y:-0.40000000000000013},{x:0,y:-0.20000000000000018},{x:0,y:0.19999999999999996}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.6},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.6000000000000001}},refblocks:{left1:{x:-0.4,y:-0.20000000000000018},left2:{x:-0.4,y:0.19999999999999996}},bounds:{minX:-0.4,maxX:0.3999999999999999,minY:-0.6000000000000001,maxY:0.6,width:0.7999999999999999,height:1.2000000000000002,centerX:-0.00000000000000005551115123125783,centerY:-0.00000000000000005551115123125783},circles:{}},Bb=F(mi).rotateRightFacingSymbol("down").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),xa=Ce(Bb.primitives),g7={...Bb,center:{x:(xa.minX+xa.maxX)/2,y:(xa.minY+xa.maxY)/2}},Fb=F(mi).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ba=Ce(Fb.primitives),x7={...Fb,center:{x:(ba.minX+ba.maxX)/2,y:(ba.minY+ba.maxY)/2}},Pb=F(mi).rotateRightFacingSymbol("left").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),va=Ce(Pb.primitives),b7={...Pb,center:{x:(va.minX+va.maxX)/2,y:(va.minY+va.maxY)/2}},Ib=F(mi).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Sa=Ce(Ib.primitives),v7={...Ib,center:{x:(Sa.minX+Sa.maxX)/2,y:(Sa.minY+Sa.maxY)/2}},Mb=F(mi).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),wa=Ce(Mb.primitives),S7={...Mb,center:{x:(wa.minX+wa.maxX)/2,y:(wa.minY+wa.maxY)/2}},kb=F(mi).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Aa=Ce(kb.primitives),w7={...kb,center:{x:(Aa.minX+Aa.maxX)/2,y:(Aa.minY+Aa.maxY)/2}},_s={paths:{path11:{type:"path",points:[{x:-0.38,y:0},{x:-0.12,y:-0.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.07,y:0},{x:0.11,y:0.05}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.12,y:-0.01},{x:0.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.28}},refblocks:{left1:{x:-0.12,y:-0.01},left2:{x:-0.38,y:0},right1:{x:0.12,y:-0.01},right2:{x:0.38,y:0}},bounds:{minX:-0.4,maxX:0.4,minY:-0.25,maxY:0.25,width:0.81,height:0.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:0.1,y:0,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0,radius:0.02,color:"primary",fill:!1}}};delete _s.refblocks.left1;delete _s.refblocks.right1;_s.bounds.width+=0.2;var gs=F(_s).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),wd=z(gs,"down"),Ad=wd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Bd=wd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ad.anchor="middle_bottom";Bd.anchor="middle_top";Ad.x=0.3;Ad.y+=0.265;Bd.y-=0.265;Bd.x=0.3;var A7=wd,Fd=z(gs,"left"),Pd=Fd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Id=Fd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Pd.anchor="middle_bottom";Id.anchor="middle_top";Pd.x=0;Pd.y+=0.57;Id.y-=0.57;Id.x=0;var B7=Fd,Md=z(gs,"up"),kd=Md.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Cd=Md.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");kd.anchor="middle_bottom";Cd.anchor="middle_top";kd.x=0.3;kd.y+=0.265;Cd.y-=0.265;Cd.x=0.3;var F7=Md,xs={paths:{path11:{type:"path",points:[{x:-0.38,y:0},{x:-0.12,y:-0.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.07,y:0.01},{x:0.1,y:0.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.12,y:-0.01},{x:0.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:0.25},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.25}},refblocks:{left1:{x:-0.12,y:-0.01},left2:{x:-0.38,y:0},right1:{x:0.12,y:-0.01},right2:{x:0.38,y:0}},bounds:{minX:-0.4,maxX:0.4,minY:-0.25,maxY:0.25,width:0.81,height:0.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:0.1,y:0,radius:0.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-0.1,y:0,radius:0.02,color:"primary",fill:!1}}};delete xs.refblocks.left1;delete xs.refblocks.right1;xs.bounds.width+=0.2;var bs=F(xs).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Yd=z(bs,"down"),Ld=Yd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Ed=Yd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Ld.anchor="middle_bottom";Ed.anchor="middle_top";Ld.x=0.3;Ld.y+=0.265;Ed.y-=0.265;Ed.x=0.3;var P7=Yd,Td=z(bs,"left"),Nd=Td.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Wd=Td.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Nd.anchor="middle_bottom";Wd.anchor="middle_top";Nd.x=0;Nd.y+=0.57;Wd.y-=0.57;Wd.x=0;var I7=Td,Rd=z(bs,"up"),Od=Rd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),jd=Rd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Od.anchor="middle_bottom";jd.anchor="middle_top";Od.x=0.3;Od.y+=0.265;jd.y-=0.265;jd.x=0.3;var M7=Rd,vs={paths:{path44:{type:"path",points:[{x:-0.16845120000000047,y:0.02621170000000017},{x:-0.4458008,y:0.02709619999999968}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.4458008,y:0.026971799999999657},{x:0.1677968999999997,y:0.027926399999999685}],color:"primary",fill:!1},"path8704-1":{type:"path",points:[{x:-0.0040837000000002455,y:-0.13467459999999964},{x:-0.0040837000000002455,y:-0.13467459999999964},{x:-0.017668143940740948,y:-0.1311205263185182},{x:-0.03043520885925943,y:-0.12727072121481456},{x:-0.04240966440000013,y:-0.1231399985999998},{x:-0.05361628020740751,y:-0.11874317238518502},{x:-0.064079825925926,y:-0.11409505648148131},{x:-0.07382507120000005,y:-0.10921046479999987},{x:-0.0828767856740741,y:-0.10410421125185171},{x:-0.0912597389925926,y:-0.09879110974814802},{x:-0.09899870079999995,y:-0.0932859741999998},{x:-0.10611844074074069,y:-0.08760361851851838},{x:-0.11264372845925916,y:-0.0817588566148146},{x:-0.11859933359999993,y:-0.07576650239999982},{x:-0.12401002580740728,y:-0.06964136978518495},{x:-0.12890057472592584,y:-0.06339827268148127},{x:-0.13329574999999985,y:-0.05705202499999972},{x:-0.13722032127407394,y:-0.05061744065185156},{x:-0.14069905819259243,y:-0.04410933354814783},{x:-0.14375673039999987,y:-0.03754251759999966},{x:-0.14641810754074058,y:-0.030931806718518143},{x:-0.1487079592592591,y:-0.0242920148148144},{x:-0.15065105519999983,y:-0.017637955799999563},{x:-0.15227216500740723,y:-0.01098444358518472},{x:-0.15359605832592574,y:-0.004346292081480994},{x:-0.1546475047999998,y:0.00226168480000051},{x:-0.15545127407407386,y:0.008824673148148676},{x:-0.1560321357925924,y:0.015327859051852397},{x:-0.1564148595999998,y:0.02175642860000056},{x:-0.1566242151407405,y:0.028095567881482052},{x:-0.15668497205925902,y:0.03433046298518576},{x:-0.15662189999999976,y:0.04044630000000058},{x:-0.15662189999999976,y:0.0404463000000006},{x:-0.15662189999999976,y:0.0404463000000006},{x:-0.15622857394444417,y:0.04717166472222282},{x:-0.1553217675555553,y:0.05388046444444503},{x:-0.15392183849999977,y:0.060558907500000585},{x:-0.1520491444444442,y:0.0671932022222228},{x:-0.1497240430555553,y:0.07376955694444502},{x:-0.14696689199999974,y:0.08027418000000058},{x:-0.14379804894444415,y:0.0866932797222228},{x:-0.1402378715555553,y:0.09301306444444506},{x:-0.13630671749999965,y:0.09921974250000057},{x:-0.13202494444444415,y:0.10529952222222282},{x:-0.12741291005555522,y:0.11123861194444501},{x:-0.1224909719999997,y:0.1170232200000006},{x:-0.11727948794444407,y:0.12263955472222278},{x:-0.11179881555555524,y:0.12807382444444504},{x:-0.10606931249999965,y:0.13331223750000057},{x:-0.1001113364444441,y:0.13834100222222284},{x:-0.09394524505555521,y:0.14314632694444504},{x:-0.08759139599999967,y:0.14771442000000062},{x:-0.08107014694444413,y:0.15203148972222283},{x:-0.07440185555555523,y:0.15608374444444503},{x:-0.0676068794999997,y:0.15985739250000058},{x:-0.06070557644444415,y:0.16333864222222283},{x:-0.05371830405555529,y:0.16651370194444504},{x:-0.04666541999999976,y:0.1693687800000006},{x:-0.03956728194444424,y:0.1718900847222228},{x:-0.03244424755555539,y:0.17406382444444501},{x:-0.025316674499999876,y:0.17587620750000055},{x:-0.01820492044444437,y:0.17731344222222278},{x:-0.01112934305555553,y:0.178361736944445},{x:-0.004110300000000034,y:0.17900730000000054},{x:-0.004110300000000011,y:0.17900730000000054}],color:"primary",fill:!1},"path8704-1-9":{type:"path",points:[{x:0.004158700000000071,y:-0.1355885000000001},{x:0.004158700000000071,y:-0.1355885000000001},{x:0.017743143940740766,y:-0.1320344263185187},{x:0.03051020885925925,y:-0.12818462121481505},{x:0.042484664399999955,y:-0.12405389860000024},{x:0.053691280207407335,y:-0.11965707238518546},{x:0.0641548259259258,y:-0.11500895648148178},{x:0.07390007119999986,y:-0.1101243648000003},{x:0.0829517856740739,y:-0.10501811125185218},{x:0.0913347389925924,y:-0.09970500974814848},{x:0.09907370079999973,y:-0.09419987420000027},{x:0.10619344074074046,y:-0.08851751851851883},{x:0.11271872845925893,y:-0.08267275661481507},{x:0.11867433359999968,y:-0.07668040240000029},{x:0.12408502580740703,y:-0.0705552697851854},{x:0.12897557472592555,y:-0.06431217268148172},{x:0.13337074999999957,y:-0.05796592500000018},{x:0.13729532127407365,y:-0.05153134065185202},{x:0.14077405819259214,y:-0.045023233548148286},{x:0.14383173039999952,y:-0.038456417600000126},{x:0.14649310754074024,y:-0.03184570671851861},{x:0.14878295925925875,y:-0.02520591481481487},{x:0.1507260551999995,y:-0.01855185580000003},{x:0.15234716500740686,y:-0.011898343585185192},{x:0.15367105832592537,y:-0.005260192081481464},{x:0.15472250479999944,y:0.001347784800000043},{x:0.1555262740740735,y:0.007910773148148207},{x:0.156107135792592,y:0.01441395905185193},{x:0.1564898595999994,y:0.020842528600000094},{x:0.15669921514074014,y:0.02718166788148159},{x:0.15675997205925862,y:0.03341656298518529},{x:0.15669689999999936,y:0.03953240000000011},{x:0.15669689999999936,y:0.039532400000000134},{x:0.15669689999999936,y:0.039532400000000134},{x:0.1563035739444438,y:0.04625776472222235},{x:0.15539676755555493,y:0.05296656444444457},{x:0.15399683849999934,y:0.05964500750000013},{x:0.1521241444444438,y:0.06627930222222234},{x:0.14979904305555491,y:0.07285565694444456},{x:0.14704189199999937,y:0.07936028000000013},{x:0.1438730489444438,y:0.08577937972222234},{x:0.1403128715555549,y:0.09209916444444458},{x:0.13638171749999925,y:0.0983058425000001},{x:0.13209994444444376,y:0.10438562222222235},{x:0.12748791005555482,y:0.11032471194444453},{x:0.12256597199999929,y:0.11610932000000013},{x:0.1173544879444437,y:0.1217256547222223},{x:0.11187381555555485,y:0.12715992444444457},{x:0.10614431249999925,y:0.1323983375000001},{x:0.10018633644444369,y:0.13742710222222235},{x:0.09402024505555481,y:0.14223242694444457},{x:0.08766639599999927,y:0.14680052000000016},{x:0.08114514694444372,y:0.15111758972222236},{x:0.07447685555555483,y:0.15516984444444457},{x:0.06768187949999929,y:0.15894349250000012},{x:0.06078057644444377,y:0.16242474222222236},{x:0.053793304055554894,y:0.16559980194444457},{x:0.046740419999999366,y:0.16845488000000014},{x:0.039642281944443844,y:0.17097618472222234},{x:0.03251924755555499,y:0.17314992444444455},{x:0.02539167449999948,y:0.17496230750000008},{x:0.018279920444443973,y:0.17639954222222232},{x:0.011204343055555134,y:0.17744783694444452},{x:0.004185299999999637,y:0.17809340000000007},{x:0.004185299999999614,y:0.17809340000000007}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-0.08039130000000005,y:0.0179576999999993},{x:-0.08039130000000005,y:0.09650599999999931}],color:"primary",fill:!0},"path4-5":{type:"path",points:[{x:0.01494479999999987,y:-0.055216500000000224},{x:0.01494479999999987,y:0.09691909999999937}],color:"primary",fill:!0},"path4-5-8":{type:"path",points:[{x:0.06871169999999927,y:-0.056870000000000864},{x:0.06871169999999927,y:0.018784499999999538}],color:"primary",fill:!0},"path4-1":{type:"path",points:[{x:-0.08179359999999969,y:0.09650570000000003},{x:0.015771699999999722,y:0.09650570000000003}],color:"primary",fill:!0},"path4-1-6":{type:"path",points:[{x:0.0117995999999998,y:-0.05594970000000088},{x:0.06843709999999925,y:-0.05594970000000088}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-0.17162450000000073,y:0.11125030000000025},{x:-0.2688274000000015,y:0.11125030000000025},{x:-0.2688274000000015,y:0.11469129999999961},{x:-0.17162450000000073,y:0.11469129999999961}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-0.2184661999999995,y:0.16159429999999997},{x:-0.2184661999999995,y:0.06439139999999943},{x:-0.22190719999999908,y:0.06439139999999943},{x:-0.22190719999999908,y:0.16159429999999997}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.0024445000000006267,y:0.23933980000000044},bottom1:{type:"text",text:"{VAL}",x:0.00341719999999901,y:-0.23933980000000066}},refblocks:{left1:{x:-0.4458008,y:0.02709619999999968},right1:{x:0.4458008,y:0.026971799999999657}},bounds:{minX:-0.473959241,maxX:0.473959241,minY:-0.23933980000000066,maxY:0.23933980000000044,width:0.947918482,height:0.4786796000000011,centerX:0,centerY:-0.00000000000000011102230246251565},circles:{}},k7=F(vs).rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_left",{x:0.02,y:0.2}).changeTextAnchor("{VAL}","middle_left",{x:0.5,y:-0.2}).build(),C7=F(vs).rotateRightFacingSymbol("left").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:0.45}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-0.55}).build(),Y7=F(vs).rotateRightFacingSymbol("right").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),L7=F(vs).rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_left",{x:0.02,y:-0.2}).changeTextAnchor("{REF}","middle_left",{x:0.5,y:0.2}).build(),Cb={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:0.19,y:-0.09},{x:0.15,y:-0.09}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:0.19,y:-0.14},{x:0.19,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:tD,texts:eD,bounds:rD,refblocks:iD,circles:nD}=Cb,Yb=F(Cb).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),E7=z(Yb),T7={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"RPM",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:N7,texts:W7,bounds:Ba,refblocks:zg,circles:R7}=T7,$d=It({primitives:[...Object.values(N7),...Object.values(R7),{type:"text",text:"{REF}",x:0,y:-0.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:0.35,anchor:"middle_bottom"},{...W7.left1,y:0.01,anchor:"center",fontSize:0.2}],ports:[{...zg.left1,labels:["1"]},{...zg.right1,labels:["2"]}],size:{width:Ba.width,height:Ba.height},center:{x:Ba.centerX,y:Ba.centerY}}),{5:O7,...j7}=$d.primitives;function $7(t){return typeof t=="object"}var Dg=z({...$d,primitives:Object.values(j7).filter($7)}),X7={...Dg,primitives:[...Dg.primitives,O7]},Ss=It({primitives:[{type:"path",points:[{x:-0.2,y:0},{x:0,y:0}],color:"primary",fill:!1},{type:"path",points:Array.from({length:32},(t,e)=>{let r=Math.PI/2-e*Math.PI/31,i=0.1;return{x:0.1-i*Math.cos(r),y:i*Math.sin(r)}}),color:"primary",fill:!1},{type:"text",text:"{REF}",x:0.125,y:0,anchor:"middle_left"}],ports:[{x:-0.2,y:0,labels:["1"]}],center:{x:0,y:0}}),Lb=z(Ss,"down"),Ug=Lb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Ug&&(Ug.anchor="middle_top");var V7=Lb,z7=z(Ss,"left"),Eb=z(Ss,"up"),Gg=Eb.primitives.find((t)=>t.type==="text"&&t.text==="{REF}");Gg&&(Gg.anchor="middle_bottom");var D7=Eb,U7={paths:{path40:{type:"path",points:[{x:0.44,y:0.04},{x:0.19,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:0.19,y:0.18},{x:0.44,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:0.19,y:-0.09},{x:0.19,y:0.18}],color:"primary",fill:!1},path44:{type:"path",points:[{x:0.19,y:0.04},{x:-0.11,y:0.04}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-0.43,y:0.22},{x:-0.11,y:0.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{right1:{x:-0.43,y:0.22}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},Xd=F(U7).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Vd=z(Xd,"up"),zd=Vd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Dd=Vd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");zd.anchor="middle_bottom";Dd.anchor="middle_top";zd.x=0.4;zd.y+=0.2;Dd.y-=0.3;Dd.x=0.4;var Tb=Vd,Ud=ri(Tb),Gd=Ud.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Qd=Ud.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Gd.anchor="middle_bottom";Qd.anchor="middle_top";Gd.x=0.35;Gd.y+=0.4;Qd.y-=0.4;Qd.x=0.35;var G7=Ud,Hd=z(Xd,"left"),Zd=Hd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),Kd=Hd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");Zd.anchor="middle_bottom";Kd.anchor="middle_top";Zd.x=0;Zd.y+=0.5;Kd.y-=0.6;Kd.x=0;var Q7=Hd,Nb={paths:{path11:{type:"path",points:[{x:-0.54,y:0.04},{x:-0.11,y:0.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.1,y:0.04},{x:0.54,y:0.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.09,y:-0.15},{x:-0.09,y:0.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:0.09,y:-0.15},{x:0.09,y:0.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.08,y:0.06},{x:-0.08,y:-0.15},{x:0.09,y:-0.05},{x:-0.08,y:0.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:0.08,y:0.26},{x:0.08,y:0.05},{x:-0.09,y:0.15},{x:0.07,y:0.26}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:0.09,y:-0.06},{x:0.27,y:-0.17}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:0.27,y:-0.18},{x:0.27,y:-0.31}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0.01,y:0.42},bottom1:{type:"text",text:"{VAL}",x:-0.03,y:-0.42}},refblocks:{bottom1:{x:0.27,y:-0.31},left1:{x:-0.54,y:0.04},right1:{x:0.54,y:0.04}},bounds:{minX:-0.57,maxX:0.57,minY:-0.42,maxY:0.42,width:1.14,height:0.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.05,radius:0.29,color:"primary",fill:!1}}},{paths:oD,texts:aD,bounds:sD,refblocks:cD,circles:lD}=Nb,Wb=F(Nb).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Rb=z(Wb),Ob=Rb.primitives.filter((t)=>t.type==="text"),H7=Ob.find((t)=>t.text==="{REF}"),Z7=Ob.find((t)=>t.text==="{VAL}");H7.y=0;Z7.y=0;var K7=Rb,J7={paths:{path40:{type:"path",points:[{x:0.14,y:0.04},{x:-0.12,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.12,y:0.18},{x:0.14,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.12,y:-0.09},{x:-0.12,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14,y:0.18},{x:0.14,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.15,y:0.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:0.14,y:0.18},{x:0.08,y:0.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:0.14,y:-0.09},{x:0.08,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:q7,texts:Qg,bounds:Fa,refblocks:Hg,circles:tF}=J7,jb=It({primitives:[...Object.values(q7),...Object.values(tF),{...Qg.top1,anchor:"middle_bottom"},{...Qg.bottom1,anchor:"middle_top"}],ports:[{...Hg.left1,labels:["1"]},{...Hg.right1,labels:["2"]}],size:{width:Fa.width,height:Fa.height},center:{x:Fa.centerX,y:Fa.centerY}}),Jd=z(jb),eF=Jd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),rF=Jd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");eF.anchor="middle_left";rF.anchor="middle_right";var iF=Jd,nF={paths:{path11:{type:"path",points:[{x:-0.34,y:0.22},{x:-0.02,y:0.01}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.23,y:0.13},{x:0.23,y:0.4}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:0.23,y:-0.08},{x:0.23,y:-0.35}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-0.01,y:-0.18},{x:-0.01,y:0.23}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:0.23,y:0.12},{x:-0.01,y:0.12}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-0.11,y:0.13},{x:-0.17,y:0.04},{x:-0.06,y:0.03},{x:-0.11,y:0.13}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:0.23,y:-0.08},{x:-0.01,y:-0.08}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.2,y:0.39},bottom1:{type:"text",text:"{VAL}",x:-0.03,y:-0.42}},refblocks:{top1:{x:0.23,y:0.4},bottom1:{x:0.23,y:-0.35},left1:{x:-0.34,y:0.22}},bounds:{minX:-0.37,maxX:0.37,minY:-0.42,maxY:0.42,width:0.74,height:0.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0.08,y:0.01,radius:0.29,color:"primary",fill:!1}}},{paths:oF,texts:Zg,bounds:Pa,refblocks:fl,circles:aF}=nF,$b=It({primitives:[...Object.values(oF),...Object.values(aF),{...Zg.top1,anchor:"middle_left"},{...Zg.bottom1,anchor:"middle_right"}],ports:[{...fl.top1,labels:["1"]},{...fl.bottom1,labels:["2"]},{...fl.left1,labels:["3"]}],size:{width:Pa.width,height:Pa.height},center:{x:Pa.centerX,y:Pa.centerY}}),Xb=z($b),Vb=Xb.primitives.filter((t)=>t.type==="text"),sF=Vb.find((t)=>t.text==="{REF}");sF.y=0.1;var zb=Vb.find((t)=>t.text==="{VAL}");zb.y=0.1;zb.x=-0.4;var cF=Xb,lF={paths:{capsule_outer:{type:"path",points:[{x:-0.44,y:0.34},{x:-0.45,y:0.39},{x:-0.46,y:0.42},{x:-0.49,y:0.44},{x:-0.52,y:0.46},{x:-0.56,y:0.46},{x:-0.6,y:0.46},{x:-0.63,y:0.44},{x:-0.65,y:0.42},{x:-0.67,y:0.39},{x:-0.68,y:0.34},{x:-0.68,y:-0.34},{x:-0.67,y:-0.39},{x:-0.65,y:-0.42},{x:-0.63,y:-0.44},{x:-0.6,y:-0.45},{x:-0.56,y:-0.46},{x:-0.52,y:-0.45},{x:-0.49,y:-0.44},{x:-0.46,y:-0.42},{x:-0.45,y:-0.39},{x:-0.44,y:-0.34},{x:-0.44,y:0.34}],color:"primary",fill:!1},capsule_inner:{type:"path",points:[{x:-0.51,y:0.28},{x:-0.52,y:0.32},{x:-0.53,y:0.34},{x:-0.56,y:0.35},{x:-0.57,y:0.35},{x:-0.58,y:0.34},{x:-0.6,y:0.32},{x:-0.61,y:0.28},{x:-0.61,y:-0.28},{x:-0.6,y:-0.32},{x:-0.58,y:-0.34},{x:-0.57,y:-0.35},{x:-0.56,y:-0.35},{x:-0.53,y:-0.34},{x:-0.52,y:-0.32},{x:-0.51,y:-0.28},{x:-0.51,y:0.28}],color:"primary",fill:!0},usb_vertical:{type:"path",points:[{x:0.1,y:-0.4},{x:0.1,y:0.4}],color:"primary",fill:!1},usb_left_branch:{type:"path",points:[{x:0.1,y:-0.1},{x:-0.03,y:0.05},{x:-0.03,y:0.15}],color:"primary",fill:!1},usb_right_branch:{type:"path",points:[{x:0.1,y:0},{x:0.25,y:0.15},{x:0.25,y:0.25}],color:"primary",fill:!1},usb_arrow:{type:"path",points:[{x:0.05,y:0.4},{x:0.1,y:0.5},{x:0.15,y:0.4},{x:0.05,y:0.4}],color:"primary",fill:!0},usb_square:{type:"path",points:[{x:0.2,y:0.25},{x:0.3,y:0.25},{x:0.3,y:0.35},{x:0.2,y:0.35},{x:0.2,y:0.25}],color:"primary",fill:!0}},circles:{usb_base:{type:"circle",x:0.1,y:-0.4,radius:0.07,color:"primary",fill:!0},usb_tip_circle:{type:"circle",x:-0.03,y:0.15,radius:0.04,color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-0.25,y:0.7}},refblocks:{},bounds:{minX:-0.75,maxX:0.35,minY:-0.6,maxY:0.75,width:1.1,height:1.35,centerX:-0.2,centerY:0.08}},pF=F(lF).changeTextAnchor("{REF}","middle_bottom").build(),hF={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"Var",x:-0.19,y:0.07}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:dF,texts:_l,bounds:Ia,refblocks:Kg,circles:mF}=hF,Db=It({primitives:[...Object.values(dF),...Object.values(mF),{..._l.top1,x:0,y:-0.3594553499999995,anchor:"middle_top"},{..._l.bottom1,x:0,y:0.35,anchor:"middle_bottom"},{..._l.left1,x:-0.02,y:0.01,fontSize:0.2,anchor:"center"}],ports:[{...Kg.left1,labels:["1"]},{...Kg.right1,labels:["2"]}],size:{width:Ia.width,height:Ia.height},center:{x:Ia.centerX,y:Ia.centerY}}),uF=z(Db),yF={paths:{path40:{type:"path",points:[{x:0.08,y:0.04},{x:-0.18,y:-0.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.18,y:0.18},{x:0.08,y:0.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.18,y:-0.09},{x:-0.18,y:0.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.09,y:0.17},{x:0.1,y:-0.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.2,y:0.04},{x:-0.52,y:0.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.52,y:0.04},{x:0.21,y:0.04}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:0.19,y:0.17},{x:0.19,y:-0.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.01,y:0.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-0.27}},refblocks:{left1:{x:-0.52,y:0.04},right1:{x:0.52,y:0.04}},bounds:{minX:-0.55,maxX:0.55,minY:-0.27,maxY:0.27,width:1.09,height:0.55,centerX:0,centerY:0},circles:{}},{paths:fF,texts:Jg,bounds:Ma,refblocks:qg,circles:_F}=yF,Ub=It({primitives:[...Object.values(fF),...Object.values(_F),{...Jg.top1,anchor:"middle_bottom"},{...Jg.bottom1,anchor:"middle_top"}],ports:[{...qg.left1,labels:["1"]},{...qg.right1,labels:["2"]}],size:{width:Ma.width,height:Ma.height},center:{x:Ma.centerX,y:Ma.centerY}}),qd=z(Ub),gF=qd.primitives.find((t)=>t.type==="text"&&t.text==="{REF}"),xF=qd.primitives.find((t)=>t.type==="text"&&t.text==="{VAL}");gF.anchor="middle_left";xF.anchor="middle_right";var bF=qd,vF={paths:{path5:{type:"path",points:[{x:-0.54,y:0},{x:-0.26,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:0.27,y:0},{x:0.54,y:0.01}],color:"primary",fill:!1},path7:{type:"path",points:[{x:0.27,y:-0.23},{x:-0.26,y:0.24}],color:"primary",fill:!1},path8:{type:"path",points:[{x:0.38,y:-0.23},{x:0.27,y:-0.23}],color:"primary",fill:!1},path9:{type:"path",points:[{x:0,y:0.14},{x:0.27,y:0.14},{x:0.27,y:-0.13},{x:-0.26,y:-0.13},{x:-0.26,y:0.14},{x:0,y:0.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.06,y:0.25},bottom1:{type:"text",text:"{VAL}",x:0.01,y:-0.25}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0.01}},bounds:{minX:-0.57,maxX:0.57,minY:-0.25,maxY:0.25,width:1.13,height:0.5,centerX:0,centerY:0},circles:{}},{paths:SF,texts:tx,bounds:ka,refblocks:ex}=vF,Gb=It({primitives:[...Object.values(SF),{...tx.top1,anchor:"middle_left"},{...tx.bottom1,anchor:"middle_right"}],ports:[{...ex.left1,labels:["1","-"]},{...ex.right1,labels:["2","+"]}],size:{width:ka.width,height:ka.height},center:{x:ka.centerX,y:ka.centerY}}),wF=z(Gb),AF={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"Var",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:BF,texts:FF,bounds:Ca,refblocks:rx,circles:PF}=AF,tm=It({primitives:[...Object.values(BF),...Object.values(PF),{type:"text",text:"{REF}",x:0,y:-0.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:0.35,anchor:"middle_bottom"},{...FF.left1,anchor:"center",y:0.02,fontSize:0.2}],ports:[{...rx.left1,labels:["1"]},{...rx.right1,labels:["2"]}],size:{width:Ca.width,height:Ca.height},center:{x:Ca.centerX,y:Ca.centerY}}),{5:IF,...MF}=tm.primitives;function kF(t){return typeof t=="object"}var ix=z({...tm,primitives:Object.values(MF).filter(kF)}),CF={...ix,primitives:[...ix.primitives,IF]},ws={paths:{"path28-2":{type:"path",points:[{x:0.19,y:0},{x:0,y:0.09}],color:"primary",fill:!1},"path28-2-6":{type:"path",points:[{x:0.19,y:0},{x:0,y:-0.09}],color:"primary",fill:!1},"path29-3":{type:"path",points:[{x:0.19,y:0},{x:-0.23,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{REF}",x:0.25,y:0}},refblocks:{left1:{x:-0.23,y:0}},bounds:{minX:-0.25,maxX:0.25,minY:-0.09,maxY:0.09,width:0.5,height:0.19,centerX:0,centerY:0},circles:{}};function As(t,e){let{width:r,height:i}=t.size,n=1,a=1;e.width!==void 0&&e.height!==void 0?(n=e.width/r,a=e.height/i):e.width!==void 0?n=a=e.width/r:e.height!==void 0&&(n=a=e.height/i);let o=t.primitives.map((c)=>{switch(c.type){case"path":return{...c,points:c.points.map((l)=>({x:l.x*n,y:l.y*a}))};case"text":return{...c,x:c.x*n,y:c.y*a,fontSize:c.fontSize?c.fontSize*n:void 0};case"circle":return{...c,x:c.x*n,y:c.y*a,radius:c.radius*n};case"box":return{...c,x:c.x*n,y:c.y*a,width:c.width*n,height:c.height*a};default:return c}});return{...t,primitives:o,center:{x:t.center.x*n,y:t.center.y*a},ports:t.ports.map((c)=>({...c,x:c.x*n,y:c.y*a})),size:{width:r*n,height:i*a}}}var YF=F(ws).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),LF=As(YF,{width:0.24,height:0.23}),EF=F(ws).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),TF=As(EF,{width:0.23,height:0.24}),NF=F(ws).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),WF=As(NF,{width:0.23,height:0.24}),RF=F(ws).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),OF=As(RF,{width:0.24,height:0.23}),em={paths:{path11:{type:"path",points:[{x:-0.54,y:0.03},{x:-0.3,y:0.03}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:0.1,y:0.13},{x:0,y:-0.06},{x:-0.11,y:0.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0.03},{x:0.54,y:0.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.02,y:0.4},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:-0.4}},refblocks:{left1:{x:-0.54,y:0.03},right1:{x:0.54,y:0.03}},bounds:{minX:-0.57,maxX:0.57,minY:-0.4,maxY:0.4,width:1.14,height:0.8,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0.04,radius:0.29,color:"primary",fill:!1}}},{paths:pD,texts:hD,bounds:dD,circles:mD,refblocks:uD}=em,jF=F(em).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:$F,texts:yD,bounds:nx,circles:XF,refblocks:ox}=em,VF=F({primitives:[...Object.values($F),...Object.values(XF),{type:"text",text:"{REF}",x:-0.2,y:0.35},{type:"text",text:"{VAL}",x:0.2,y:0.35}],ports:[{...ox.left1,labels:["left1"]},{...ox.right1,labels:["right1"]}],center:{x:nx.centerX,y:nx.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),zF=VF,DF={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"Wh",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:UF,texts:GF,bounds:Ya,refblocks:ax,circles:QF}=DF,rm=It({primitives:[...Object.values(UF),...Object.values(QF),{type:"text",text:"{REF}",x:0,y:-0.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:0.35,anchor:"middle_bottom"},{...GF.left1,anchor:"center",y:0.01,fontSize:0.2}],ports:[{...ax.left1,labels:["1"]},{...ax.right1,labels:["2"]}],size:{width:Ya.width,height:Ya.height},center:{x:Ya.centerX,y:Ya.centerY}}),{5:HF,...ZF}=rm.primitives;function KF(t){return typeof t=="object"}var sx=z({...rm,primitives:Object.values(ZF).filter(KF)}),JF={...sx,primitives:[...sx.primitives,HF]},qF={paths:{path11:{type:"path",points:[{x:-0.54,y:0},{x:-0.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:0.29,y:0},{x:0.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.18,y:-0.36},bottom1:{type:"text",text:"{VAL}",x:-0.01,y:0.43},left1:{type:"text",text:"W",x:0,y:-0.02}},refblocks:{left1:{x:-0.54,y:0},right1:{x:0.54,y:0}},bounds:{minX:-0.53,maxX:0.53,minY:0,maxY:0,width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-0.01,y:-0.01,radius:0.29,color:"primary",fill:!1}}},{paths:tP,texts:eP,bounds:La,refblocks:cx,circles:rP}=qF,im=It({primitives:[...Object.values(tP),...Object.values(rP),{type:"text",text:"{REF}",x:0,y:-0.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:0.35,anchor:"middle_bottom"},{...eP.left1,anchor:"center",y:0.01,fontSize:0.3}],ports:[{...cx.left1,labels:["1"]},{...cx.right1,labels:["2"]}],size:{width:La.width,height:La.height},center:{x:La.centerX,y:La.centerY}}),{5:iP,...nP}=im.primitives;function oP(t){return typeof t=="object"}var lx=z({...im,primitives:Object.values(nP).filter(oP)}),aP={...lx,primitives:[...lx.primitives,iP]},Qb={paths:{path40:{type:"path",points:[{x:0.14458890000000002,y:0.04403629999999992},{x:-0.1199943999999995,y:-0.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-0.1199943999999995,y:0.17632800000000026},{x:0.14458890000000002,y:0.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-0.1199943999999995,y:-0.0882553999999991},{x:-0.1199943999999995,y:0.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:0.14458890000000002,y:0.17632800000000026},{x:0.14458890000000002,y:-0.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-0.12219909999999956,y:0.04403629999999992},{x:-0.5168693999999996,y:0.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0.5233797000000002,y:0.043951100000000354},{x:0.1496715999999998,y:0.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:0.14458890000000002,y:0.17632800000000026},{x:0.21069330000000042,y:0.17632800000000026}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:0.14458890000000002,y:-0.0882553999999991},{x:0.07848449999999962,y:-0.0882553999999991}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-0.0050250999999996715,y:0.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-0.00011179999999977319,y:-0.27384529999999985}},refblocks:{left1:{x:-0.5191471000000001,y:0.044920700000000924},right1:{x:0.5191470999999999,y:0.04389609999999999}},bounds:{minX:-0.5473055410000001,maxX:0.5473055409999998,minY:-0.27384529999999985,maxY:0.27384530000000007,width:1.094611082,height:0.5476905999999999,centerX:-0.00000000000000011102230246251565,centerY:0.00000000000000011102230246251565},circles:{}},sP=F(Qb).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:cP,bounds:Ea,refblocks:px,circles:lP}=Qb,pP=F({primitives:[...Object.values(cP),...Object.values(lP),{type:"text",text:"{REF}",x:0.15,y:-0.2294553499999995},{type:"text",text:"{VAL}",x:-0.15,y:-0.2294553499999995}],ports:[{...px.left1,labels:["1"]},{...px.right1,labels:["2"]}],size:{width:Ea.width,height:Ea.height},center:{x:Ea.centerX,y:Ea.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),ur={ac_voltmeter_down:M4,ac_voltmeter_horz:Y4,ac_voltmeter_left:T4,ac_voltmeter_right:R4,ac_voltmeter_up:$4,ac_voltmeter_vert:z4,avalanche_diode_down:G4,avalanche_diode_horz:Q4,avalanche_diode_left:K4,avalanche_diode_right:J4,avalanche_diode_up:e5,avalanche_diode_vert:n5,backward_diode_down:s5,backward_diode_left:hx,backward_diode_right:d5,backward_diode_up:m5,battery_down:_5,battery_horz:dx,battery_left:w5,battery_right:P5,battery_up:C5,battery_vert:Y5,boxresistor_down:N5,boxresistor_left:j5,boxresistor_right:z5,boxresistor_sm_down:U5,boxresistor_sm_left:G5,boxresistor_sm_right:Q5,boxresistor_sm_up:H5,boxresistor_small_down:J5,boxresistor_small_left:ev,boxresistor_small_right:nv,boxresistor_small_up:sv,boxresistor_up:hv,boxresistor_xs_down:dv,boxresistor_xs_left:mv,boxresistor_xs_right:uv,boxresistor_xs_up:yv,bridged_ground_down:gv,bridged_ground_left:vv,bridged_ground_right:mx,bridged_ground_up:Av,capacitor_down:Iv,capacitor_left:kv,capacitor_polarized_down:Cv,capacitor_polarized_left:Yv,capacitor_polarized_right:Lv,capacitor_polarized_up:Ev,capacitor_right:Nv,capacitor_sm_down:Wv,capacitor_sm_left:Rv,capacitor_sm_right:Ov,capacitor_sm_up:jv,capacitor_up:zv,capacitor_xs_down:Dv,capacitor_xs_left:Uv,capacitor_xs_right:Gv,capacitor_xs_up:Qv,constant_current_diode_down:Kv,constant_current_diode_horz:Jv,constant_current_diode_left:eS,constant_current_diode_right:rS,constant_current_diode_up:oS,constant_current_diode_vert:cS,crystal_4pin_down:hS,crystal_4pin_left:dS,crystal_4pin_right:mS,crystal_4pin_up:fS,crystal_down:xS,crystal_left:bS,crystal_right:vS,crystal_up:AS,current_source_down:FS,current_source_left:IS,current_source_right:kS,current_source_up:YS,darlington_pair_transistor_down:LS,darlington_pair_transistor_horz:ES,darlington_pair_transistor_left:TS,darlington_pair_transistor_right:NS,darlington_pair_transistor_up:WS,darlington_pair_transistor_vert:RS,dc_ammeter_down:E_,dc_ammeter_horz:nn,dc_ammeter_left:$S,dc_ammeter_right:XS,dc_ammeter_up:VS,dc_ammeter_vert:E_,dc_voltmeter_down:US,dc_voltmeter_horz:HS,dc_voltmeter_left:JS,dc_voltmeter_right:e3,dc_voltmeter_up:n3,dc_voltmeter_vert:s3,diac_down:c3,diac_horz:l3,diac_left:p3,diac_right:h3,diac_up:d3,diac_vert:m3,digital_ground_down:f3,digital_ground_left:x3,digital_ground_right:S3,digital_ground_up:B3,diode_down:P3,diode_left:I3,diode_right:Za,diode_up:M3,dpdt_normally_closed_switch_down:C3,dpdt_normally_closed_switch_left:Y3,dpdt_normally_closed_switch_right:Ka,dpdt_normally_closed_switch_up:L3,dpdt_switch_down:T3,dpdt_switch_left:N3,dpdt_switch_right:Ja,dpdt_switch_up:W3,dpst_normally_closed_switch_down:O3,dpst_normally_closed_switch_left:j3,dpst_normally_closed_switch_right:qa,dpst_normally_closed_switch_up:$3,dpst_switch_down:V3,dpst_switch_left:z3,dpst_switch_right:ts,dpst_switch_up:D3,ferrite_bead_down:Q3,ferrite_bead_left:H3,ferrite_bead_right:fx,ferrite_bead_up:yx,filled_diode_down:J3,filled_diode_horz:ew,filled_diode_left:nw,filled_diode_right:sw,filled_diode_up:pw,filled_diode_vert:mw,frequency_meter_horz:hp,frequency_meter_vert:vw,fuse_horz:_x,fuse_vert:Bw,ground_down:Fw,ground_horz:Pw,ground_left:Iw,ground_right:Mw,ground_up:kw,ground_vert:Cw,gunn_diode_horz:Yw,gunn_diode_vert:Lw,icled_down:Tw,icled_left:Nw,icled_right:es,icled_up:Ww,igbt_transistor_horz:gx,igbt_transistor_vert:Ow,illuminated_push_button_normally_open_horz:bx,illuminated_push_button_normally_open_vert:$w,inductor_down:Xw,inductor_left:Vw,inductor_right:zw,inductor_up:Dw,laser_diode_down:Uw,laser_diode_left:Gw,laser_diode_right:is,laser_diode_up:Qw,led_down:Jw,led_left:qw,led_right:Mp,led_up:Ax,light_dependent_resistor_horz:Bx,light_dependent_resistor_vert:i8,mosfet_depletion_normally_on_horz:Ix,mosfet_depletion_normally_on_vert:a8,mushroom_head_normally_open_momentary_horz:kx,mushroom_head_normally_open_momentary_vert:p8,n_channel_d_mosfet_transistor_gate_bottom_drain_left:y8,n_channel_d_mosfet_transistor_gate_bottom_drain_right:f8,n_channel_d_mosfet_transistor_gate_left_drain_bottom:_8,n_channel_d_mosfet_transistor_gate_left_drain_top:g8,n_channel_d_mosfet_transistor_gate_right_drain_bottom:x8,n_channel_d_mosfet_transistor_gate_right_drain_top:b8,n_channel_d_mosfet_transistor_gate_top_drain_left:v8,n_channel_d_mosfet_transistor_gate_top_drain_right:S8,n_channel_d_mosfet_transistor_horz:fe,n_channel_d_mosfet_transistor_vert:Ye,n_channel_e_mosfet_transistor_gate_bottom_drain_left:F8,n_channel_e_mosfet_transistor_gate_bottom_drain_right:P8,n_channel_e_mosfet_transistor_gate_left_drain_bottom:I8,n_channel_e_mosfet_transistor_gate_left_drain_top:M8,n_channel_e_mosfet_transistor_gate_right_drain_bottom:k8,n_channel_e_mosfet_transistor_gate_right_drain_top:C8,n_channel_e_mosfet_transistor_gate_top_drain_left:Y8,n_channel_e_mosfet_transistor_gate_top_drain_right:L8,n_channel_e_mosfet_transistor_horz:_e,n_channel_e_mosfet_transistor_vert:Le,njfet_transistor_horz:Nx,njfet_transistor_vert:W8,not_connected_down:$8,not_connected_left:X8,not_connected_right:ns,not_connected_up:V8,npn_bipolar_transistor_down:U8,npn_bipolar_transistor_horz:H8,npn_bipolar_transistor_left:J8,npn_bipolar_transistor_right:eA,npn_bipolar_transistor_up:nA,npn_bipolar_transistor_vert:sA,opamp_no_power_down:lA,opamp_no_power_left:pA,opamp_no_power_right:os,opamp_no_power_up:hA,opamp_with_power_down:mA,opamp_with_power_left:uA,opamp_with_power_right:as,opamp_with_power_up:yA,p_channel_d_mosfet_transistor_gate_bottom_drain_left:xA,p_channel_d_mosfet_transistor_gate_bottom_drain_right:bA,p_channel_d_mosfet_transistor_gate_left_drain_bottom:vA,p_channel_d_mosfet_transistor_gate_left_drain_top:SA,p_channel_d_mosfet_transistor_gate_right_drain_bottom:wA,p_channel_d_mosfet_transistor_gate_right_drain_top:AA,p_channel_d_mosfet_transistor_gate_top_drain_left:BA,p_channel_d_mosfet_transistor_gate_top_drain_right:FA,p_channel_d_mosfet_transistor_horz:ge,p_channel_d_mosfet_transistor_vert:Ee,p_channel_e_mosfet_transistor_gate_bottom_drain_left:kA,p_channel_e_mosfet_transistor_gate_bottom_drain_right:CA,p_channel_e_mosfet_transistor_gate_left_drain_bottom:YA,p_channel_e_mosfet_transistor_gate_left_drain_top:LA,p_channel_e_mosfet_transistor_gate_right_drain_bottom:EA,p_channel_e_mosfet_transistor_gate_right_drain_top:TA,p_channel_e_mosfet_transistor_gate_top_drain_left:NA,p_channel_e_mosfet_transistor_gate_top_drain_right:WA,p_channel_e_mosfet_transistor_horz:xe,p_channel_e_mosfet_transistor_vert:Te,photodiode_horz:Vx,photodiode_vert:jA,pjfet_transistor_horz:Ux,pjfet_transistor_vert:zA,pnp_bipolar_transistor_down:GA,pnp_bipolar_transistor_horz:QA,pnp_bipolar_transistor_left:KA,pnp_bipolar_transistor_right:t6,pnp_bipolar_transistor_up:i6,pnp_bipolar_transistor_vert:a6,potentiometer_horz:Hx,potentiometer_vert:p6,potentiometer2_down:m6,potentiometer2_left:u6,potentiometer2_right:ss,potentiometer2_up:y6,potentiometer3_down:g6,potentiometer3_left:v6,potentiometer3_right:S6,potentiometer3_up:B6,power_factor_meter_horz:Zx,power_factor_meter_vert:M6,push_button_normally_closed_momentary_horz:Jx,push_button_normally_closed_momentary_vert:L6,push_button_normally_open_momentary_down:W6,push_button_normally_open_momentary_horz:$6,push_button_normally_open_momentary_left:X6,push_button_normally_open_momentary_right:an,push_button_normally_open_momentary_up:V6,push_button_normally_open_momentary_vert:z6,rail_down:Q6,rail_left:J6,rail_right:rB,rail_up:oB,rectifier_diode_horz:tb,rectifier_diode_vert:hB,resistor_down:uB,resistor_left:_B,resistor_right:bB,resistor_sm_down:vB,resistor_sm_left:SB,resistor_sm_right:wB,resistor_sm_up:AB,resistor_up:PB,resistor_xs_down:IB,resistor_xs_left:MB,resistor_xs_right:kB,resistor_xs_up:CB,resonator_down:EB,resonator_horz:rb,resonator_left:WB,resonator_right:ms,resonator_up:RB,resonator_vert:OB,schottky_diode_down:$B,schottky_diode_left:XB,schottky_diode_right:us,schottky_diode_up:VB,silicon_controlled_rectifier_horz:nb,silicon_controlled_rectifier_vert:DB,solderjumper2_bridged12_down:UB,solderjumper2_bridged12_left:GB,solderjumper2_bridged12_right:$h,solderjumper2_bridged12_up:QB,solderjumper2_down:HB,solderjumper2_left:ZB,solderjumper2_right:zh,solderjumper2_up:KB,solderjumper3_bridged12_down:JB,solderjumper3_bridged12_left:qB,solderjumper3_bridged12_right:Gh,solderjumper3_bridged12_up:t7,solderjumper3_bridged123_down:e7,solderjumper3_bridged123_left:r7,solderjumper3_bridged123_right:Zh,solderjumper3_bridged123_up:i7,solderjumper3_bridged23_down:n7,solderjumper3_bridged23_left:o7,solderjumper3_bridged23_right:qh,solderjumper3_bridged23_up:a7,solderjumper3_down:s7,solderjumper3_left:c7,solderjumper3_right:rd,solderjumper3_up:l7,spdt_normally_closed_switch_down:h7,spdt_normally_closed_switch_left:d7,spdt_normally_closed_switch_right:ys,spdt_normally_closed_switch_up:m7,spdt_switch_down:y7,spdt_switch_left:f7,spdt_switch_right:fs,spdt_switch_up:_7,speaker_down:g7,speaker_horz:x7,speaker_left:b7,speaker_right:v7,speaker_up:S7,speaker_vert:w7,spst_normally_closed_switch_down:A7,spst_normally_closed_switch_left:B7,spst_normally_closed_switch_right:gs,spst_normally_closed_switch_up:F7,spst_switch_down:P7,spst_switch_left:I7,spst_switch_right:bs,spst_switch_up:M7,square_wave_down:k7,square_wave_left:C7,square_wave_right:Y7,square_wave_up:L7,step_recovery_diode_horz:Yb,step_recovery_diode_vert:E7,tachometer_horz:$d,tachometer_vert:X7,testpoint_down:V7,testpoint_left:z7,testpoint_right:Ss,testpoint_up:D7,tilted_ground_down:G7,tilted_ground_left:Q7,tilted_ground_right:Xd,tilted_ground_up:Tb,triac_horz:Wb,triac_vert:K7,tunnel_diode_horz:jb,tunnel_diode_vert:iF,unijunction_transistor_horz:$b,unijunction_transistor_vert:cF,usbc:pF,var_meter_horz:Db,var_meter_vert:uF,varactor_diode_horz:Ub,varactor_diode_vert:bF,varistor_horz:Gb,varistor_vert:wF,varmeter_horz:tm,varmeter_vert:CF,vcc_down:LF,vcc_left:TF,vcc_right:WF,vcc_up:OF,volt_meter_horz:jF,volt_meter_vert:zF,watt_hour_meter_horz:rm,watt_hour_meter_vert:JF,wattmeter_horz:im,wattmeter_vert:aP,zener_diode_horz:sP,zener_diode_vert:pP};var fD=Object.fromEntries(Object.keys(ur).map((t)=>[t,t]));var OG=te(ee(),1);var VG=te(ee(),1);var FI=te(ee(),1);var PI=te(ee(),1);var cQ=te(ee(),1);var hP="TscircuitAlphabet",Hb="data-tscircuit-alphabet-font";function dP(t){let e=(i)=>({...i,children:(i.children??[]).filter((n)=>!(Hb in(n.attributes??{}))).map(e)}),r=e(t);return r.children.push({name:"style",type:"element",value:"",attributes:{[Hb]:"",type:"text/css"},children:[{name:"",type:"text",value:`@font-face { font-family: '${hP}'; src: url('data:font/ttf;base64,${M0}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),s1.stringify(r)}var l1=c1.default("circuit-to-svg"),YD=l1.extend("pcb"),LD=l1.extend("sch");var Zt={"3d_viewer":{background_bottom:"rgb(102, 102, 128)",background_top:"rgb(204, 204, 230)",board:"rgb(51, 43, 23)",copper:"rgb(179, 156, 0)",silkscreen_bottom:"rgb(230, 230, 230)",silkscreen_top:"rgb(230, 230, 230)",soldermask:"rgb(20, 51, 36)",solderpaste:"rgb(128, 128, 128)"},board:{anchor:"rgb(255, 38, 226)",aux_items:"rgb(255, 255, 255)",b_adhes:"rgb(0, 0, 132)",b_crtyd:"rgb(255, 38, 226)",b_fab:"rgb(88, 93, 132)",b_mask:"rgba(2, 255, 238, 0.400)",b_paste:"rgb(0, 194, 194)",b_silks:"rgb(232, 178, 167)",background:"rgb(0, 16, 35)",cmts_user:"rgb(89, 148, 220)",copper:{b:"rgb(77, 127, 196)",f:"rgb(200, 52, 52)",in1:"rgb(127, 200, 127)",in10:"rgb(237, 124, 51)",in11:"rgb(91, 195, 235)",in12:"rgb(247, 111, 142)",in13:"rgb(167, 165, 198)",in14:"rgb(40, 204, 217)",in15:"rgb(232, 178, 167)",in16:"rgb(242, 237, 161)",in17:"rgb(237, 124, 51)",in18:"rgb(91, 195, 235)",in19:"rgb(247, 111, 142)",in2:"rgb(206, 125, 44)",in20:"rgb(167, 165, 198)",in21:"rgb(40, 204, 217)",in22:"rgb(232, 178, 167)",in23:"rgb(242, 237, 161)",in24:"rgb(237, 124, 51)",in25:"rgb(91, 195, 235)",in26:"rgb(247, 111, 142)",in27:"rgb(167, 165, 198)",in28:"rgb(40, 204, 217)",in29:"rgb(232, 178, 167)",in3:"rgb(79, 203, 203)",in30:"rgb(242, 237, 161)",in4:"rgb(219, 98, 139)",in5:"rgb(167, 165, 198)",in6:"rgb(40, 204, 217)",in7:"rgb(232, 178, 167)",in8:"rgb(242, 237, 161)",in9:"rgb(141, 203, 129)"},cursor:"rgb(255, 255, 255)",drc:"rgb(194, 194, 194)",drc_error:"rgba(215, 91, 107, 0.800)",drc_exclusion:"rgb(255, 255, 255)",drc_warning:"rgba(255, 208, 66, 0.902)",dwgs_user:"rgb(194, 194, 194)",eco1_user:"rgb(180, 219, 210)",eco2_user:"rgb(216, 200, 82)",edge_cuts:"rgb(208, 210, 205)",f_adhes:"rgb(132, 0, 132)",f_crtyd:"rgb(255, 0, 245)",f_fab:"rgb(175, 175, 175)",f_mask:"rgba(216, 100, 255, 0.400)",f_paste:"rgba(180, 160, 154, 0.902)",f_silks:"rgb(242, 237, 161)",footprint_text_back:"rgb(0, 0, 132)",footprint_text_front:"rgb(194, 194, 194)",footprint_text_invisible:"rgb(132, 132, 132)",grid:"rgb(132, 132, 132)",grid_axes:"rgb(194, 194, 194)",margin:"rgb(255, 38, 226)",microvia:"rgb(0, 132, 132)",no_connect:"rgb(0, 0, 132)",pad_back:"rgb(77, 127, 196)",pad_front:"rgb(200, 52, 52)",pad_plated_hole:"rgb(194, 194, 0)",pad_through_hole:"rgb(227, 183, 46)",plated_hole:"rgb(26, 196, 210)",ratsnest:"rgba(245, 255, 213, 0.702)",select_overlay:"rgb(4, 255, 67)",through_via:"rgb(236, 236, 236)",user_1:"rgb(194, 194, 194)",user_2:"rgb(89, 148, 220)",user_3:"rgb(180, 219, 210)",user_4:"rgb(216, 200, 82)",user_5:"rgb(194, 194, 194)",user_6:"rgb(89, 148, 220)",user_7:"rgb(180, 219, 210)",user_8:"rgb(216, 200, 82)",user_9:"rgb(232, 178, 167)",via_blind_buried:"rgb(187, 151, 38)",via_hole:"rgb(227, 183, 46)",via_micro:"rgb(0, 132, 132)",via_through:"rgb(236, 236, 236)",worksheet:"rgb(200, 114, 171)"},gerbview:{axes:"rgb(0, 0, 132)",background:"rgb(0, 0, 0)",dcodes:"rgb(255, 255, 255)",grid:"rgb(132, 132, 132)",layers:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)"],negative_objects:"rgb(132, 132, 132)",worksheet:"rgb(0, 0, 132)"},meta:{filename:"kicad_2020",name:"KiCad 2020",version:2},simulation_palette:["#1f77b4","#d62728","#2ca02c","#ff7f0e","#9467bd","#17becf","#8c564b","#e377c2","#7f7f7f","#bcbd22"],palette:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)"],schematic:{aux_items:"rgb(46, 46, 46)",background:"rgb(245, 241, 237)",brightened:"rgb(255, 0, 255)",bus:"rgb(0, 0, 132)",bus_junction:"rgb(0, 0, 132)",component_body:"rgb(255, 255, 194)",component_outline:"rgb(132, 0, 0)",cursor:"rgb(15, 15, 15)",erc_error:"rgba(230, 9, 13, 0.800)",erc_warning:"rgba(209, 146, 0, 0.800)",fields:"rgb(132, 0, 132)",grid:"rgb(181, 181, 181)",grid_axes:"rgb(0, 0, 132)",hidden:"rgb(194, 194, 194)",junction:"rgb(0, 150, 0)",label_global:"rgb(132, 0, 0)",label_background:"rgba(255, 255, 255, 0.6)",label_hier:"rgb(114, 86, 0)",label_local:"rgb(15, 15, 15)",net_name:"rgb(132, 132, 132)",no_connect:"rgb(132, 0, 0)",note:"rgb(0, 0, 194)",override_item_colors:!1,pin:"rgb(132, 0, 0)",pin_name:"rgb(0, 100, 100)",pin_number:"rgb(169, 0, 0)",reference:"rgb(0, 100, 100)",shadow:"rgba(102, 179, 255, 0.800)",sheet:"rgb(132, 0, 0)",sheet_background:"rgba(253, 255, 231, 0.000)",sheet_fields:"rgb(132, 0, 132)",sheet_filename:"rgb(114, 86, 0)",sheet_label:"rgb(0, 100, 100)",sheet_name:"rgb(0, 100, 100)",table:"rgb(102, 102, 102)",value:"rgb(0, 100, 100)",wire:"rgb(0, 150, 0)",wire_crossing:"rgb(30, 180, 30)",worksheet:"rgb(132, 0, 0)"}};var jD=Zt.board.user_2;var XD=Zt.board.user_2,VD=Zt.board.user_2;var DD=Zt.board.user_2;var GD=Zt.board.user_2;var Zb=0.94,Bs=0.045,mP=Object.fromEntries(Object.entries(xi).map(([t,e])=>{let r=e.flatMap((n)=>[n.x1,n.x2]),i=e.flatMap((n)=>[n.y1,n.y2]);return[t,e.length?{minX:Math.min(...r)-Bs,maxX:Math.max(...r)+Bs,minY:-(Math.max(...i)+Bs)*Zb,maxY:-(Math.min(...i)-Bs)*Zb}:null]})),tU=Math.round(Math.max(...Object.values(mP).map((t)=>t?t.maxX-t.minX:0))*1000)/1000;var Ts={copper:{top:"rgb(200, 52, 52)",inner1:"rgb(255, 140, 0)",inner2:"rgb(255, 215, 0)",inner3:"rgb(50, 205, 50)",inner4:"rgb(64, 224, 208)",inner5:"rgb(138, 43, 226)",inner6:"rgb(255, 105, 180)",inner7:"rgb(0, 191, 255)",inner8:"rgb(160, 82, 45)",bottom:"rgb(77, 127, 196)"},soldermaskWithCopperUnderneath:{top:"rgb(18, 82, 50)",bottom:"rgb(18, 82, 50)"},soldermask:{top:"rgb(12, 55, 33)",bottom:"rgb(12, 55, 33)"},soldermaskOverCopper:{top:"rgb(52, 135, 73)",bottom:"rgb(52, 135, 73)"},substrate:"rgb(201, 162, 110)",drill:"#FF26E2",silkscreen:{top:"#f2eda1",bottom:"#5da9e9"},boardOutline:"rgba(255, 255, 255, 0.5)",courtyard:{top:"#FF00FF",bottom:"rgb(38, 233, 255)"},keepout:"#FF6B6B",debugComponent:{fill:null,stroke:null}},iU=Ts.drill,nU=Ts.silkscreen.top,oU=Ts.silkscreen.bottom,aU={...Ts.copper};var uP=4;var p1=5;var yP=2,BU=p1+2,FU=yP+2,PU=p1+uP+6;function fP(t){return t.find((r)=>r.type==="project_software_metadata"||r.type==="source_project_metadata")?.software_used_string}var _P={name:"circuit-to-svg",type:"module",version:"0.0.426",repository:{type:"git",url:"https://github.com/tscircuit/circuit-to-svg.git"},description:"Convert Circuit JSON to SVG",main:"dist/index.js",files:["dist"],scripts:{start:"cosmos",prepublish:"npm run build",prepare:"node scripts/prepare-git.cjs",build:"tsup-node ./lib/index.ts --format esm --dts --sourcemap --external tscircuit",format:"biome format . --write","format:check":"biome format .",cosmos:"cosmos","cosmos-export":"cosmos-export"},license:"ISC",devDependencies:{"@biomejs/biome":"^1.9.4","@resvg/resvg-js":"^2.6.2","@tscircuit/alphabet":"^0.0.27","@tscircuit/checks-latest":"npm:@tscircuit/checks@0.0.179","@types/bun":"^1.2.8","@types/debug":"^4.1.12","@vitejs/plugin-react":"5.0.0",biome:"^0.3.3","bun-match-svg":"^0.0.12","circuit-json":"^0.0.491",esbuild:"^0.20.2","format-si-unit":"^0.0.12","performance-now":"^2.1.0",react:"19.1.0","react-cosmos":"7.0.0","react-cosmos-plugin-vite":"7.0.0","react-dom":"19.1.0",tscircuit:"^0.0.2018",tsup:"^8.0.2",typescript:"^5.4.5","vite-tsconfig-paths":"^5.0.1"},peerDependencies:{"@tscircuit/alphabet":"*"},dependencies:{"@types/node":"^22.5.5","bun-types":"^1.1.40","calculate-elbow":"0.0.12",debug:"^4.4.3","svg-path-commander":"^2.1.11",svgson:"^5.3.1","transformation-matrix":"^2.16.1"}},gP=_P.version;function xP(t,e="error_text_overlay"){let r=t.filter((a)=>a.type.endsWith("_error"));if(r.length===0)return null;let i=r.map((a)=>a.message).filter((a)=>!!a);if(i.length===0)return null;return{name:"text",type:"element",value:"",attributes:{x:"10",y:"20",fill:"red","font-family":"monospace","font-size":"12px","data-type":e,"data-layer":"global"},children:i.map((a,o)=>({name:"tspan",type:"element",value:"",attributes:{x:"10",dy:o===0?"0":"1.2em"},children:[{type:"text",value:a,name:"",attributes:{},children:[]}]}))}}var bP={pin_number:0.15,negated_pin_number:0.12,reference_designator:0.18,manufacturer_number:0.18,net_label:0.18,error:0.05},He=(t,e)=>e??bP[t],se=(t,e,r)=>Math.abs(t.a)*He(e,r);function vP(t){let{minX:e,minY:r,maxX:i,maxY:n}=t.bounds,a=t.cellSize??1,o=t.labelCells??!1,c=[],l=(s,p)=>{let[d,m]=P(t.transform,[s,p]);return{x:d,y:m}};for(let s=Math.floor(e);s<=Math.ceil(i);s+=a){let p=l(s,r),d=l(s,n);c.push({name:"line",type:"element",attributes:{x1:p.x.toString(),y1:p.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:Zt.schematic.grid,"stroke-width":(0.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}for(let s=Math.floor(r);s<=Math.ceil(n);s+=a){let p=l(e,s),d=l(i,s);c.push({name:"line",type:"element",attributes:{x1:p.x.toString(),y1:p.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:Zt.schematic.grid,"stroke-width":(0.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}if(o){let s=(p,d)=>{if(a<=0.1)return`${p.toFixed(1)},${d.toFixed(1)}`;return`${p},${d}`};for(let p=Math.floor(e);p<=Math.ceil(i);p+=a)for(let d=Math.floor(r);d<=Math.ceil(n);d+=a){let m=l(p,d);c.push({name:"text",type:"element",attributes:{x:(m.x-2.5).toString(),y:(m.y-5).toString(),fill:Zt.schematic.grid,"font-size":(a/5*Math.abs(t.transform.a)).toString(),"fill-opacity":"0.5","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif"},children:[{type:"text",value:s(p,d),name:"",attributes:{},children:[]}]})}}return{name:"g",value:"",type:"element",attributes:{class:"grid sch-grid"},children:c}}function SP(t){let{points:e,transform:r}=t,i=[];for(let n of e){let[a,o]=P(r,[n.x-0.1,n.y-0.1]),[c,l]=P(r,[n.x+0.1,n.y+0.1]),[s,p]=P(r,[n.x-0.1,n.y+0.1]),[d,m]=P(r,[n.x+0.1,n.y-0.1]);i.push({name:"path",type:"element",attributes:{d:`M${a},${o} L${c},${l} M${s},${p} L${d},${m}`,stroke:Zt.schematic.grid,"stroke-width":(0.02*Math.abs(r.a)).toString(),"stroke-opacity":"0.7"}});let[u,y]=P(r,[n.x+0.15,n.y-0.15]);i.push({name:"text",type:"element",attributes:{x:u.toString(),y:y.toString(),fill:Zt.schematic.grid,"font-size":(0.1*Math.abs(r.a)).toString(),"fill-opacity":"0.7","text-anchor":"start","font-family":"sans-serif","dominant-baseline":"middle"},children:[{type:"text",value:n.label||`(${n.x},${n.y})`,name:"",attributes:{},children:[]}]})}return{name:"g",value:"",type:"element",attributes:{class:"labeled-points sch-labeled-points"},children:i}}function wP(t){return t.reduce((e,r)=>{if(!e)return r;if(r.sheet_index===void 0)return e;if(e.sheet_index===void 0)return r;return r.sheet_index<e.sheet_index?r:e},void 0)}var Kb={"0":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"1":{width:13,height:27,ascent:22,descent:5,left:-3,right:9},"2":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"3":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"4":{width:13,height:27,ascent:22,descent:5,left:0,right:12},"5":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"6":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"7":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"8":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"9":{width:13,height:27,ascent:22,descent:5,left:-1,right:12}," ":{width:7,height:27,ascent:22,descent:5,left:0,right:0},"!":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},"#":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"%":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},"&":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},"'":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},"(":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},")":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"*":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},"+":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},",":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"-":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},".":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"/":{width:7,height:27,ascent:22,descent:5,left:0,right:7},":":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},";":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"<":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"=":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},">":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"?":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"@":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},"[":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},"\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},"]":{width:7,height:27,ascent:22,descent:5,left:0,right:5},"^":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},"`":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},"{":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"|":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},"}":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"~":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},hn=(t)=>{if(!t)return 0;let e=0;for(let r of t){let i=Kb[r];if(i)e+=i.width;else e+=Kb["?"].width}return e/27},h1=0.65,d1=0.08;function Ls(t){return hn(t.text||"")+(t.display_superscript?d1+hn(t.display_superscript)*h1:0)}function am(t,e,r,i="central"){let n=[{type:"text",value:t,name:"",attributes:{},children:[]}];if(e)n.push({type:"element",name:"tspan",value:"",attributes:{class:"sch-net-label-superscript","font-size":`${r*h1}px`,dx:`${r*d1}`,dy:`${-r*(i==="ideographic"?0.5:0.25)}`},children:[{type:"text",value:e,name:"",attributes:{},children:[]}]});return n}var gi=(t)=>{switch(t){case"top":return{x:0,y:-1};case"bottom":return{x:0,y:1};case"left":return{x:1,y:0};case"right":return{x:-1,y:0}}throw Error(`Invalid side: ${t}`)},Qe=0.3,fi=0.3,_i=0.06,m1=0.2,u1=(t)=>({"data-circuit-json-type":"schematic_net_label","data-schematic-net-label-id":t.schematic_net_label_id}),AP={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},Jb={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"};function BP(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function FP(t,e,r){let i=r+Qe*2+_i*t.text.length+fi,n=gi(t.anchor_side);return t.anchor_position??{x:t.center.x-n.x*i*e/2,y:t.center.y-n.y*i*e/2}}var PP=(t,e)=>{let r=t<0?t+2*Math.PI:t,i=e<0?e+2*Math.PI:e,n=Math.abs(r-i);if(n>Math.PI)n=2*Math.PI-n;return n},y1=({schPorts:t,symbol:e,schComponent:r})=>{let i=t.map((c)=>{let l=c.center.x-r.center.x,s=c.center.y-r.center.y;return{port:c,angle:Math.atan2(s,l)}}),n=e.ports.map((c)=>{let l=c.x-e.center.x,s=c.y-e.center.y;return{port:c,angle:Math.atan2(s,l)}});i.sort((c,l)=>c.angle-l.angle),n.sort((c,l)=>c.angle-l.angle);let a=[],o=new Set;for(let c of i){let l=null;for(let s of n){if(o.has(s.port))continue;let p=PP(c.angle,s.angle);if(l===null||p<l.angleDiff)l={symbolPort:s.port,angleDiff:p}}if(l&&l.angleDiff<Math.PI/4)a.push({schPort:c.port,symbolPort:l.symbolPort}),o.add(l.symbolPort)}return a};function f1(t,e,r,i){let n=Math.sqrt((r.x-t.x)**2+(r.y-t.y)**2),o=Math.sqrt((i.x-e.x)**2+(i.y-e.y)**2)/n,c=e.x-o*t.x,l=e.y-o*t.y,s=Lt(c,l),p=Jt(o,o);return Ft(s,p)}function IP(t){let e=[],r=new Map,i=new Map,n=null;for(let a of t)if(a.type==="schematic_component")e.push(a);else if(a.type==="schematic_port"&&a.schematic_component_id){let o=r.get(a.schematic_component_id)??[];o.push(a),r.set(a.schematic_component_id,o)}else if(a.type==="source_component")i.set(a.source_component_id,a);for(let a of e){let o=MP({component:a,schematicPorts:r.get(a.schematic_component_id)??[],sourceComponent:a.source_component_id?i.get(a.source_component_id):void 0});if(!o)continue;n=n?_1(n,o):o}return n}function MP({component:t,schematicPorts:e,sourceComponent:r}){if(!t.symbol_name)return null;let i=ur[t.symbol_name];if(!i)return null;let n=y1({schPorts:e,symbol:i,schComponent:t});if(!n[0])return null;let a=f1(n[1]?.symbolPort??i.center,n[1]?.schPort.center??t.center,n[0].symbolPort,n[0].schPort.center),o=null;for(let c of i.primitives){if(c.type!=="text")continue;let l=kP({primitive:c,component:t,sourceComponent:r});if(!l)continue;let s=P(a,c),p=He("reference_designator"),d=CP({x:s.x,y:s.y,width:hn(l)*p,height:p,anchor:c.anchor});o=o?_1(o,d):d}return o}function kP({primitive:t,component:e,sourceComponent:r}){if(t.text==="{REF}")return r?.display_name??r?.name??"";if(t.text==="{VAL}")return e.symbol_display_value??"";return""}function CP({x:t,y:e,width:r,height:i,anchor:n}){let a=t,o=t,c=e-i/2,l=e+i/2;if(n.includes("left"))o=t+r;else if(n.includes("right"))a=t-r;else a=t-r/2,o=t+r/2;if(n.includes("top"))c=e-i,l=e;else if(n.includes("bottom"))c=e,l=e+i;return{minX:a,minY:c,maxX:o,maxY:l}}function _1(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var g1=(t,e)=>{if(t.column_widths&&t.column_widths.length>0&&t.row_heights&&t.row_heights.length>0){let p=(d)=>{if(typeof d==="number")return d;if(d.endsWith("mm"))return parseFloat(d);if(d.endsWith("in"))return parseFloat(d)*25.4;return parseFloat(d)};return{column_widths:t.column_widths.map(p),row_heights:t.row_heights.map(p)}}let r=e.filter((p)=>p.type==="schematic_table_cell"&&p.schematic_table_id===t.schematic_table_id);if(r.length===0)return{column_widths:[],row_heights:[]};let i=r.reduce((p,d)=>Math.max(p,d.end_column_index),-1)+1,n=r.reduce((p,d)=>Math.max(p,d.end_row_index),-1)+1,{cell_padding:a=0.2}=t,o=Array(i).fill(0),c=Array(n).fill(0),l={},s={};for(let p of r){let d=He("reference_designator",p.font_size),u=hn(p.text??"")*d+2*a,y=d*1.2+2*a,f=`${p.start_row_index}-${p.start_column_index}`;l[f]=u,s[f]=y}for(let p=0;p<n;p++)for(let d=0;d<i;d++){let m=`${p}-${d}`;if(l[m]&&l[m]>o[d])o[d]=l[m];if(s[m]&&s[m]>c[p])c[p]=s[m]}for(let p of r){if(p.start_column_index===p.end_column_index&&p.start_row_index===p.end_row_index)continue;let d=`${p.start_row_index}-${p.start_column_index}`,m=l[d],u=s[d];if(m===void 0||u===void 0)continue;let y=0;for(let _=p.start_column_index;_<=p.end_column_index;_++)y+=o[_];if(m>y){let x=(m-y)/(p.end_column_index-p.start_column_index+1);for(let Y=p.start_column_index;Y<=p.end_column_index;Y++)o[Y]+=x}let f=0;for(let _=p.start_row_index;_<=p.end_row_index;_++)f+=c[_];if(u>f){let x=(u-f)/(p.end_row_index-p.start_row_index+1);for(let Y=p.start_row_index;Y<=p.end_row_index;Y++)c[Y]+=x}}return{column_widths:o,row_heights:c}},YP=10.16,LP=1.1,Ze=YP/LP,EP=297/Ze,TP=210/Ze,AG=20/Ze,Fs=5/Ze;function sm(t={}){let e=t.center??{x:0,y:0},r=t.sheet_width===void 0?EP:t.sheet_width/Ze,i=t.sheet_height===void 0?TP:t.sheet_height/Ze,n=e.x-r/2,a=e.x+r/2,o=e.y-i/2,c=e.y+i/2;return{center:e,width:r,height:i,minX:n,maxX:a,minY:o,maxY:c,innerMinX:n+Fs,innerMaxX:a-Fs,innerMinY:o+Fs,innerMaxY:c-Fs}}function NP(t,e=0.5){let{POSITIVE_INFINITY:r,POSITIVE_INFINITY:i,NEGATIVE_INFINITY:n,NEGATIVE_INFINITY:a}=Number,o=0.2;for(let s of t)if(s.type==="schematic_sheet"){let p=sm(s);l(p.center,{width:p.width,height:p.height},0)}else if(s.type==="schematic_component")l(s.center,s.size,0);else if(s.type==="schematic_port")l(s.center,{width:o,height:o},0);else if(s.type==="schematic_debug_object"){if(s.shape==="rect")l(s.center,s.size,0);else if(s.shape==="line")l(s.start,{width:0.1,height:0.1},0),l(s.end,{width:0.1,height:0.1},0)}else if(s.type==="schematic_net_label"){let p=He("net_label"),d=Ls(s),u=(d+Qe*2+_i*(s.text?.length||0)+fi)*p,y=m1,f=BP(s.anchor_side)/180*Math.PI,_=FP(s,p,d),x=gi(s.anchor_side),Y={x:_.x+x.x*u/2,y:_.y+x.y*u/2};l(Y,{width:u,height:y},f)}else if(s.type==="schematic_trace")for(let p of s.edges)l(p.from,{width:0.1,height:0.1},0),l(p.to,{width:0.1,height:0.1},0);else if(s.type==="schematic_text"){let d=He("reference_designator",s.font_size)??0.18,m=s.text??"",u=s.display_superscript;if(u){let y=m.split(`
`),f=Math.max(...y.map((X,E)=>Ls({text:X,display_superscript:E===y.length-1?u:void 0})))*d,_=s.anchor,x=_==="left"||_.endsWith("_left")?f/2:_==="right"||_.endsWith("_right")?-f/2:0,Y=_==="top"||_.startsWith("top_")?0:_==="bottom"||_.startsWith("bottom_")?-d:-d/2,b=(y.length+0.3)*d,M=-(Y-0.3*d+b/2),O=-(s.rotation??0)*Math.PI/180;l({x:s.position.x+x*Math.cos(O)-M*Math.sin(O),y:s.position.y+x*Math.sin(O)+M*Math.cos(O)},{width:f,height:b},O)}else{let y=m.length*d,f=d;l(s.position,{width:y,height:f},s.rotation??0)}}else if(s.type==="schematic_voltage_probe"){if(l(s.position,{width:0.2,height:0.4},0),s.name){let p=He("net_label"),d=hn(s.name)*p,m=p,u=0.3,y=s.label_alignment??"top_right",f=s.position.x,_=s.position.y;if(y.includes("top"))_+=0.3+m/2;else if(y.includes("bottom"))_-=0.3+m/2;if(y.includes("right"))f+=0.3+d/2;else if(y.includes("left"))f-=0.3+d/2;l({x:f,y:_},{width:d,height:m},0)}}else if(s.type==="schematic_box")l({x:s.x+s.width/2,y:s.y+s.height/2},{width:s.width,height:s.height},0);else if(s.type==="schematic_table"){let{column_widths:p,row_heights:d}=g1(s,t),m=p.reduce((b,M)=>b+M,0),u=d.reduce((b,M)=>b+M,0),y=s.anchor??"center",f=s.anchor_position.x,_=s.anchor_position.y;if(y.includes("center"))f-=m/2;else if(y.includes("right"))f-=m;if(y.includes("center"))_+=u/2;else if(y.includes("bottom"))_+=u;let x=f+m/2,Y=_-u/2;l({x,y:Y},{width:m,height:u},0)}else if(s.type==="schematic_line")l({x:s.x1,y:s.y1},{width:0.02,height:0.02},0),l({x:s.x2,y:s.y2},{width:0.02,height:0.02},0);else if(s.type==="schematic_circle")l(s.center,{width:s.radius*2,height:s.radius*2},0);else if(s.type==="schematic_rect")l(s.center,{width:s.width,height:s.height},s.rotation);else if(s.type==="schematic_arc")l(s.center,{width:s.radius*2,height:s.radius*2},0);else if(s.type==="schematic_path"){if(s.points&&s.points.length>0)for(let p of s.points)l(p,{width:0.02,height:0.02},0)}if(!Number.isFinite(r))r=-1,i=-1,n=1,a=1;r-=e,i-=e,n+=e,a+=e;let c=IP(t);if(c){if(c.minX<r)r=c.minX-e;if(c.minY<i)i=c.minY-e;if(c.maxX>n)n=c.maxX+e;if(c.maxY>a)a=c.maxY+e}return{minX:r,minY:i,maxX:n,maxY:a};function l(s,p,d){let m=[{x:-p.width/2,y:-p.height/2},{x:p.width/2,y:-p.height/2},{x:p.width/2,y:p.height/2},{x:-p.width/2,y:p.height/2}];for(let u of m){let y=u.x*Math.cos(d)-u.y*Math.sin(d)+s.x,f=u.x*Math.sin(d)+u.y*Math.cos(d)+s.y;r=Math.min(r,y),i=Math.min(i,f),n=Math.max(n,y),a=Math.max(a,f)}}}function Ps(t){if(!Number.isFinite(t))return"0";return Number.parseFloat(t.toFixed(6)).toString()}var dn="image/svg+xml";function WP({schematicGraphic:t,viewport:e}){let r=RP(t);return{name:"g",type:"element",value:"",attributes:{class:"schematic-graphic","pointer-events":"none","data-circuit-json-type":"schematic_graphic","data-schematic-graphic-id":t.schematic_graphic_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"image",type:"element",value:"",attributes:{href:r,x:Ps(e.x),y:Ps(e.y),width:Ps(e.width),height:Ps(e.height),preserveAspectRatio:"xMidYMid meet",overflow:"hidden","pointer-events":"none"},children:[]}]}}function RP(t){let e=`Unable to render schematic graphic "${t.schematic_graphic_id}"`,{asset:r,svg_content:i}=t;if(!r){if(i!==void 0)return qb(i);throw Error(`${e}: asset or svg_content is required`)}if(x1(r.mimetype)!==dn)throw Error(`${e}: asset.mimetype must be "${dn}" (received ${JSON.stringify(r.mimetype)})`);let n=r.url.trim();if(n.toLowerCase().startsWith("data:"))return OP(n,e),n;if(i!==void 0)return qb(i);throw Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(r.url)}`)}function OP(t,e){let r=t.match(/^data:([^,]*),(.*)$/is);if(!r)throw Error(`${e}: asset.url is not a valid SVG data URL`);let i=r[1].split(";").map((l)=>l.trim());if(x1(i.shift()??"")!==dn)throw Error(`${e}: asset.url must use the "${dn}" media type`);let a=r[2],o=i.findIndex((l)=>l.toLowerCase()==="base64"),c=o!==-1;if(c&&o!==i.length-1)throw Error(`${e}: asset.url must place "base64" as its final metadata token`);if(c){let l=a.replace(/\s+/g,"");if(!/^(?:[a-z\d+/]{4})*(?:[a-z\d+/]{2}==|[a-z\d+/]{3}=)?$/i.test(l))throw Error(`${e}: asset.url is not a valid SVG data URL`);return}if(a.includes("#"))throw Error(`${e}: asset.url must percent-encode "#" in a non-base64 SVG data URL`);try{decodeURIComponent(a)}catch(l){throw Error(`${e}: asset.url is not a valid SVG data URL`,{cause:l})}}function qb(t){let e=new TextEncoder().encode(t),r="",i=32768;for(let n=0;n<e.length;n+=i)r+=String.fromCharCode(...e.subarray(n,n+i));return`data:${dn};base64,${btoa(r)}`}function x1(t){return(t.split(";",1)[0]??"").trim().toLowerCase()}var $t=(t)=>Math.abs(t.a)*0.02,om=({text:t,realCenter:e,realToScreenTransform:r})=>{let i=P(r,e);return{type:"element",name:"text",value:"",attributes:{x:i.x.toString(),y:i.y.toString(),fill:"red","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${se(r,"error")}px`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}},jP=({schNetLabel:t,realToScreenTransform:e,colorMap:r})=>{if(!t.text)return[];let i=t.text.startsWith("N_"),n=i?t.text.slice(2):t.text,a=u1(t),o=[],c=ur[t.symbol_name];if(!c){let Z=om({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return Z.attributes={...Z.attributes,...a},o.push(Z),o}let l=c.primitives.filter((Z)=>Z.type==="path"),s=c.primitives.filter((Z)=>Z.type==="text"),p=c.primitives.filter((Z)=>Z.type==="circle"),d=c.primitives.filter((Z)=>Z.type==="box"),m={minX:Math.min(...l.flatMap((Z)=>Z.points.map((N)=>N.x))),maxX:Math.max(...l.flatMap((Z)=>Z.points.map((N)=>N.x))),minY:Math.min(...l.flatMap((Z)=>Z.points.map((N)=>N.y))),maxY:Math.max(...l.flatMap((Z)=>Z.points.map((N)=>N.y)))},u=He("net_label"),f=Ls({...t,text:n})+Qe*2+_i*n.length+fi,_=gi(t.anchor_side),x=t.anchor_position??{x:t.center.x-_.x*f*u/2,y:t.center.y-_.y*f*u/2},b=ye(0/180*Math.PI),M={minX:Math.min(...c.primitives.flatMap((Z)=>Z.type==="path"?Z.points.map((N)=>N.x):[])),maxX:Math.max(...c.primitives.flatMap((Z)=>Z.type==="path"?Z.points.map((N)=>N.x):[])),minY:Math.min(...c.primitives.flatMap((Z)=>Z.type==="path"?Z.points.map((N)=>N.y):[])),maxY:Math.max(...c.primitives.flatMap((Z)=>Z.type==="path"?Z.points.map((N)=>N.y):[]))},O=c.ports?.[0]?{x:c.ports[0].x,y:c.ports[0].y}:{x:M.minX,y:(M.minY+M.maxY)/2},X=P(b,O),E=Ft(Lt(x.x-X.x,x.y-X.y),b,Jt(1)),[I,U]=P(Ft(e,E),[m.minX,m.minY]),[q,ct]=P(Ft(e,E),[m.maxX,m.maxY]),Q=Math.abs(ct-U),k=Math.min(U,ct),st=Math.abs(q-I),ot=Math.min(I,q);o.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay sch-net-label-overlay",...a,x:ot.toString(),y:k.toString(),width:st.toString(),height:Q.toString(),fill:"transparent"},children:[]});for(let Z of l){let N=Z.points.map((tt,J)=>{let[W,j]=P(Ft(e,E),[tt.x,tt.y]);return`${J===0?"M":"L"} ${W} ${j}`}).join(" ");o.push({name:"path",type:"element",attributes:{class:"sch-net-label-symbol-path",...a,d:N+(Z.closed?" Z":""),stroke:r.schematic.component_outline,fill:"none","stroke-width":`${$t(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(let Z of s){let N=P(Ft(e,E),Z),tt=Z.text;if(tt==="{REF}")tt=n||"";else if(tt==="{VAL}")tt="";let W=Math.abs(e.a)*0.1,j={x:N.x,y:N.y};o.push({name:"text",type:"element",attributes:{class:"sch-net-label-symbol-text",...a,x:j.x.toString(),y:j.y.toString(),fill:r.schematic.label_local,"font-family":"sans-serif","text-anchor":AP[Z.anchor],"dominant-baseline":Jb[Z.anchor],"font-size":`${se(e,"reference_designator")}px`,...i&&tt===n?{style:"text-decoration: overline;"}:{}},children:am(tt,Z.text==="{REF}"?t.display_superscript:void 0,se(e,"reference_designator"),Jb[Z.anchor]),value:""})}for(let Z of d){let N=P(Ft(e,E),Z),tt=Ft(e,E).a;o.push({name:"rect",type:"element",attributes:{class:"sch-net-label-symbol-box",...a,x:N.x.toString(),y:N.y.toString(),width:(Z.width*tt).toString(),height:(Z.height*tt).toString(),fill:"red"},value:"",children:[]})}for(let Z of p){let N=P(Ft(e,E),Z),tt=Ft(e,E).a;o.push({name:"circle",type:"element",attributes:{class:"sch-net-label-symbol-circle",...a,cx:N.x.toString(),cy:N.y.toString(),r:(Z.radius*tt).toString(),fill:"none",stroke:r.schematic.component_outline,"stroke-width":`${$t(e)}px`},value:"",children:[]})}return o},$P=({schNetLabel:t,realToScreenTransform:e,colorMap:r})=>{if(!t.text)return[];let i=t.text;if(t.symbol_name)return jP({schNetLabel:t,realToScreenTransform:e,colorMap:r});let n=u1(t),a=[],o=se(e,"net_label"),c=He("net_label"),l=m1/c/2,s=Ls({...t,text:i}),p=P(e,t.center),d=gi(t.anchor_side),m={...d};m.y*=-1;let u=s+Qe*2+_i*i.length+fi,y=t.anchor_position?P(e,t.anchor_position):{x:p.x-m.x*u*o/2,y:p.y-m.y*u*o/2},f=t.anchor_position??{x:t.center.x-d.x*u*c/2,y:t.center.y-d.y*u*c/2},_={left:0,top:-90,bottom:90,right:180}[t.anchor_side],x=[{x:0,y:0},{x:Qe,y:l},{x:Qe*2+fi+_i*i.length+s,y:l},{x:Qe*2+fi+_i*i.length+s,y:-l},{x:Qe,y:-l}].map((X)=>P(Ft(e,Lt(f.x,f.y),Jt(c),ye(_/180*Math.PI)),X)),Y=`
    M ${x[0].x},${x[0].y}
    L ${x[1].x},${x[1].y}
    L ${x[2].x},${x[2].y}
    L ${x[3].x},${x[3].y}
    L ${x[4].x},${x[4].y}
    Z
  `;a.push({name:"path",type:"element",attributes:{class:"net-label sch-net-label",...n,d:Y,fill:r.schematic.label_background,stroke:r.schematic.label_global,"stroke-width":`${$t(e)}px`},value:"",children:[]});let b={x:y.x+m.x*o*0.5,y:y.y+m.y*o*0.5},M={left:"start",top:"start",bottom:"start",right:"end"}[t.anchor_side],O={left:"",right:"",top:`rotate(90 ${b.x} ${b.y})`,bottom:`rotate(-90 ${b.x} ${b.y})`}[t.anchor_side];return a.push({name:"text",type:"element",attributes:{class:"net-label-text sch-net-label-text",...n,x:b.x.toString(),y:b.y.toString(),fill:r.schematic.label_global,"text-anchor":M,"dominant-baseline":"central","font-family":"sans-serif","font-variant-numeric":"tabular-nums","font-size":`${o}px`,transform:O},children:am(i,t.display_superscript,o),value:""}),a},XP=0.02,VP=({schPort:t,transform:e})=>{let r=P(e,t.center),i=Math.abs(e.a)*XP*2;return[{name:"g",type:"element",value:"",attributes:{class:"schematic-port-hover sch-port-hover","data-schematic-port-id":t.source_port_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"circle",type:"element",value:"",attributes:{cx:r.x.toString(),cy:r.y.toString(),r:i.toString(),fill:"red",opacity:"0"},children:[]}]}]},zP=({component:t,transform:e,circuitJson:r})=>{let i=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id}),n=[];for(let a of i)n.push(...VP({schPort:a,transform:e}));return n},DP=({schPort:t,transform:e,colorMap:r})=>{let{x:n,y:a}=t.center,o=[-1,1].map((c)=>{let l=P(e,{x:n-0.05,y:a-c*0.05}),s=P(e,{x:n+0.05,y:a+c*0.05});return`M ${l.x} ${l.y} L ${s.x} ${s.y}`}).join(" ");return{name:"path",type:"element",value:"",attributes:{class:"sch-port-no-connect","data-schematic-port-id":t.schematic_port_id,"data-source-port-id":t.source_port_id,d:o,fill:"none",stroke:r.schematic.no_connect,"stroke-width":`${$t(e)}px`,"stroke-linecap":"round"},children:[]}},t1=0.02,UP=({schPort:t,transform:e,circuitJson:r,colorMap:i})=>{let n=[],a=Math.abs(e.a)*t1,o=Math.abs(e.a)*t1,c=P(e,t.center),l=r.find((p)=>p.type==="source_port"&&p.source_port_id===t.source_port_id);if(!l?.do_not_connect)n.push({name:"circle",type:"element",value:"",attributes:{class:"component-pin sch-component-pin sch-port-indicator",cx:c.x.toString(),cy:c.y.toString(),r:a.toString(),fill:"none",stroke:i.schematic.component_outline,"stroke-width":o.toString(),"data-schematic-port-id":t.schematic_port_id},children:[]});let s=t.display_pin_label??l?.name;if(s){let p={...t.center},d=t.distance_from_component_edge??0,m=0.05,u="middle",y="";switch(t.facing_direction){case"left":p.x+=d/2,p.y+=0.05,u="start";break;case"right":p.x-=d/2,p.y+=0.05,u="end";break;case"up":p.y-=d/2,p.x-=0.05,u="middle";break;case"down":p.y+=d/2,p.x-=0.05,u="middle";break}let f=P(e,p),_=se(e,"pin_number");if(t.facing_direction==="up"||t.facing_direction==="down")y=`rotate(-90 ${f.x} ${f.y})`;n.push({name:"text",type:"element",value:"",attributes:{class:"port-indicator-label sch-port-label",x:f.x.toString(),y:f.y.toString(),fill:i.schematic.component_outline,"font-family":"sans-serif","font-size":`${_*0.7}px`,"text-anchor":u,"dominant-baseline":"middle",...y&&{transform:y}},children:[{type:"text",value:s,name:"",attributes:{},children:[]}]})}return n},b1=(t)=>({type:"element",name:"tspan",value:"",attributes:t.is_overlined?{"text-decoration":"overline"}:{},children:[{type:"text",name:"",value:t.text,attributes:{},children:[]}]}),GP=(t)=>t.filter((e)=>e.text).map(b1),QP=(t)=>{let e=[[]];for(let r of t)r.text.split(`
`).forEach((i,n)=>{if(n>0)e.push([]);if(i)e.at(-1).push(b1({...r,text:i}))});return e},cm=({elm:t,transform:e,colorMap:r})=>{let i=P(e,t.position),n={center:"middle",center_right:"end",bottom_left:"start",bottom_center:"middle",bottom_right:"end",left:"start",right:"end",top:"middle",bottom:"middle",top_left:"start",top_center:"middle",top_right:"end",center_left:"start"},a={center:"middle",center_right:"middle",bottom_left:"ideographic",bottom_center:"ideographic",bottom_right:"ideographic",left:"middle",right:"middle",top:"hanging",bottom:"ideographic",top_left:"hanging",top_center:"hanging",top_right:"hanging",center_left:"middle"},o=t.text.split(`
`),c=QP(t.text_parts??[]),l=o.length===1?t.text_parts?.length?c[0]:[{type:"text",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:o.map((s,p)=>({type:"element",name:"tspan",value:"",attributes:{x:i.x.toString(),...p>0?{dy:"1em"}:{}},children:t.text_parts?.length?c[p]??[]:[{type:"text",value:s,name:p===0?t.schematic_text_id:"",attributes:{},children:[]}]}));if(t.display_superscript)(o.length===1?l:l[l.length-1].children).push(...am("",t.display_superscript,se(e,"reference_designator",t.font_size),a[t.anchor]).slice(1));return{type:"element",name:"text",value:"",attributes:{class:"sch-text",x:i.x.toString(),y:i.y.toString(),fill:t.color??r.schematic.sheet_label,"text-anchor":n[t.anchor],"dominant-baseline":a[t.anchor],"font-family":"sans-serif","font-size":`${se(e,"reference_designator",t.font_size)}px`,transform:`rotate(${t.rotation}, ${i.x}, ${i.y})`},children:l}};function v1({schArc:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.radius,a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=t.start_angle_degrees*Math.PI/180,l=t.end_angle_degrees*Math.PI/180,s=i.x+n*Math.cos(c),p=i.y+n*Math.sin(c),d=i.x+n*Math.cos(l),m=i.y+n*Math.sin(l),u=t.end_angle_degrees-t.start_angle_degrees;if(t.direction==="clockwise")u=-u;if(u<0)u+=360;let y=u>180?1:0,f=t.direction==="clockwise"?1:0;return[{name:"path",type:"element",attributes:{class:"sch-arc",d:`M ${s} ${p} A ${n} ${n} 0 ${y} ${f} ${d} ${m}`,fill:"none",stroke:t.color,"stroke-width":o.toString(),...t.is_dashed&&{"stroke-dasharray":(o*3).toString()},"data-schematic-arc-id":t.schematic_arc_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var HP=({schematicBox:t,transform:e,colorMap:r})=>{let i=P(e,{x:t.x,y:t.y}),n=P(e,{x:t.x+t.width,y:t.y+t.height}),a=Math.min(i.y,n.y),o=Math.max(i.y,n.y),c=Math.min(i.x,n.x),l=Math.max(i.x,n.x),s=$t(e),p={class:"schematic-box sch-box",x:c.toString(),y:a.toString(),width:(l-c).toString(),height:(o-a).toString(),"stroke-width":`${s}px`,stroke:r.schematic.component_outline||"black",fill:"transparent"};if(t.is_dashed){let d=8*s,m=4*s;p["stroke-dasharray"]=`${d} ${m}`}return[{name:"rect",type:"element",value:"",attributes:p,children:[]}]};function S1({schCircle:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.radius,a=t.stroke_width??0.02,o=Math.abs(e.a)*a;return[{name:"circle",type:"element",attributes:{class:"sch-circle",cx:i.x.toString(),cy:i.y.toString(),r:n.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":o.toString(),...t.is_dashed&&{"stroke-dasharray":(o*3).toString()},"data-schematic-circle-id":t.schematic_circle_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var w1=(t,e)=>{for(let r of t){if(r.type!=="source_trace")continue;let i=r;if(Array.isArray(i.connected_source_port_ids)&&i.connected_source_port_ids.includes(e))return!0}return!1},ZP={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},KP={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"},JP=({component:t,transform:e,circuitJson:r,colorMap:i})=>{let n=[],a=ur[t.symbol_name];if(!a)return[om({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];let o=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id}),c=Gt(r).source_component.get(t.source_component_id),l=y1({schPorts:o,symbol:a,schComponent:t});if(!l[0])return[om({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];let s=f1(l[1]?.symbolPort??a.center,l[1]?.schPort.center??t.center,l[0].symbolPort,l[0].schPort.center),p=a.primitives.filter((I)=>I.type==="path"),d=a.primitives.filter((I)=>I.type==="text"),m=a.primitives.filter((I)=>I.type==="circle"),u=a.primitives.filter((I)=>I.type==="box"),y=new Set;for(let I of l)if(w1(r,I.schPort.source_port_id)||Gt(r).source_port.get(I.schPort.source_port_id)?.do_not_connect)y.add(I.symbolPort);let f={minX:Math.min(...p.flatMap((I)=>I.points.map((U)=>U.x))),maxX:Math.max(...p.flatMap((I)=>I.points.map((U)=>U.x))),minY:Math.min(...p.flatMap((I)=>I.points.map((U)=>U.y))),maxY:Math.max(...p.flatMap((I)=>I.points.map((U)=>U.y)))},[_,x]=P(Ft(e,s),[f.minX,f.minY]),[Y,b]=P(Ft(e,s),[f.maxX,f.maxY]),M=Math.abs(b-x),O=Math.min(x,b),X=Math.abs(Y-_),E=Math.min(_,Y);n.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:E.toString(),y:O.toString(),width:X.toString(),height:M.toString(),fill:"transparent"},children:[]});for(let I of p){let{points:U,color:q,closed:ct,fill:Q}=I;n.push({type:"element",name:"path",attributes:{class:"sch-component-symbol-path",d:U.map((k,st)=>{let[ot,Z]=P(Ft(e,s),[k.x,k.y]);return`${st===0?"M":"L"} ${ot} ${Z}`}).join(" ")+(ct?" Z":""),stroke:i.schematic.component_outline,fill:"none","stroke-width":`${$t(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(let I of d){let U=P(Ft(e,s),I),q="",ct=I.text==="{REF}";if(ct)q=c?.display_name??c?.name??"";else if(I.text==="{VAL}")q=t.symbol_display_value??"";let Q=KP[I.anchor];n.push({name:"text",type:"element",attributes:{class:ct?"sch-component-name sch-component-text":"sch-component-text",x:U.x.toString(),y:U.y.toString(),...ct?{stroke:i.schematic.background,"stroke-width":`${$t(e)}px`,"paint-order":"stroke"}:{},fill:i.schematic.label_local,"font-family":"sans-serif","text-anchor":ZP[I.anchor],"dominant-baseline":Q,"font-size":`${se(e,"reference_designator")}px`},value:"",children:[{type:"text",value:q,name:"",attributes:{},children:[]}]})}for(let I of u){let U=P(Ft(e,s),I),q=Ft(e,s).a;n.push({name:"rect",type:"element",attributes:{class:"sch-component-symbol-box",x:U.x.toString(),y:U.y.toString(),width:(I.width*q).toString(),height:(I.height*q).toString(),fill:"red"},value:"",children:[]})}for(let I of a.ports){if(y.has(I))continue;let U=P(Ft(e,s),I);n.push({type:"element",name:"circle",attributes:{class:"component-pin sch-component-pin",cx:U.x.toString(),cy:U.y.toString(),r:`${Math.abs(e.a)*0.02}px`,"stroke-width":`${$t(e)}px`,fill:"none",stroke:i.schematic.component_outline},value:"",children:[]})}for(let I of m){let U=P(Ft(e,s),I),q=Math.abs(I.radius*e.a);n.push({type:"element",name:"circle",attributes:{class:"sch-component-symbol-circle",cx:U.x.toString(),cy:U.y.toString(),r:`${q}px`,"stroke-width":`${$t(e)}px`,fill:"none",stroke:i.schematic.component_outline},value:"",children:[]})}return n},sn=0.02,e1=(t,e,r,i,n)=>{let a=Math.PI/6,o={x:t.x-r*Math.cos(e-a),y:t.y-r*Math.sin(e-a)},c={x:t.x-r*Math.cos(e+a),y:t.y-r*Math.sin(e+a)};return{name:"polygon",type:"element",attributes:{points:`${t.x},${t.y} ${o.x},${o.y} ${c.x},${c.y}`,fill:"white",stroke:i,"stroke-width":`${n}px`},value:"",children:[]}},qP=({schPort:t,schComponent:e,transform:r,circuitJson:i})=>{let n=[],a=Gt(i).source_port.get(t.source_port_id),o={x:t.center.x,y:t.center.y},c=t.distance_from_component_edge??0.4;switch(t.side_of_component){case"left":o.x+=c;break;case"right":o.x-=c;break;case"top":o.y-=c;break;case"bottom":o.y+=c;break}let l=P(r,t.center),s=P(r,o),p=a!=null&&a.source_component_id==null&&typeof t.is_connected==="boolean"?t.is_connected:w1(i,t.source_port_id),d=t.is_drawn_with_inversion_circle??!1,m=0.06,u={...t.center};if(!p&&!a?.do_not_connect)switch(t.side_of_component){case"left":u.x+=sn;break;case"right":u.x-=sn;break;case"top":u.y-=sn;break;case"bottom":u.y+=sn;break}let y=P(r,u);if(d){let b=Math.abs(r.a)*m,M={...s};switch(t.side_of_component){case"left":M.x-=b,s.x-=b*2;break;case"right":M.x+=b,s.x+=b*2;break;case"top":M.y-=b,s.y-=b*2;break;case"bottom":M.y+=b,s.y+=b*2;break}n.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-inversion-bubble",cx:M.x.toString(),cy:M.y.toString(),r:b.toString(),fill:"white",stroke:Zt.schematic.component_outline,"stroke-width":`${$t(r)}px`},value:"",children:[]})}n.push({name:"line",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-line",x1:s.x.toString(),y1:s.y.toString(),x2:y.x.toString(),y2:y.y.toString(),"stroke-width":`${$t(r)}px`},value:"",children:[]});let f=Math.abs(r.a)*sn,_=[];if(!p&&!a?.do_not_connect)_.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-terminal",cx:l.x.toString(),cy:l.y.toString(),r:f.toString(),"stroke-width":`${$t(r)}px`},value:"",children:[]});_.push({name:"rect",type:"element",attributes:{x:(l.x-f).toString(),y:(l.y-f).toString(),width:(f*2).toString(),height:(f*2).toString(),opacity:"0"},value:"",children:[]}),n.push({name:"g",type:"element",value:"",attributes:{class:"sch-port","data-schematic-port-id":t.source_port_id},children:_});let{has_input_arrow:x,has_output_arrow:Y}=t;if((x||Y)&&t.side_of_component){let b=Math.abs(r.a)*0.1,M=Zt.schematic.component_outline,O=b*Math.cos(Math.PI/6),X=$t(r)/3,E=0,I=0;if(t.side_of_component==="left")E=0,I=Math.PI;else if(t.side_of_component==="right")E=Math.PI,I=0;else if(t.side_of_component==="top")E=Math.PI/2,I=-Math.PI/2;else if(t.side_of_component==="bottom")E=-Math.PI/2,I=Math.PI/2;let U=x&&Y,q={...s},ct={...s};if(U){let Q=O;if(t.side_of_component==="left")ct.x-=Q;else if(t.side_of_component==="right")ct.x+=Q;else if(t.side_of_component==="top")ct.y-=Q;else if(t.side_of_component==="bottom")ct.y+=Q}if(x)n.push(e1(q,E,b,M,X));if(Y){let Q={x:ct.x+b*Math.cos(I),y:ct.y+b*Math.sin(I)};n.push(e1(Q,I,b,M,X))}}return n},tI=(t)=>{let e=[],{schPort:r,schComponent:i,transform:n,circuitJson:a}=t,o={x:r.center.x,y:r.center.y};if(!r.side_of_component)return[];let c=gi(r.side_of_component),l=r.distance_from_component_edge??0.4;if(o.x+=c.x*l/2,o.y+=c.y*l/2,r.side_of_component==="top"||r.side_of_component==="bottom")o.x-=0.02;else o.y+=0.02;let s=P(n,o);return e.push({name:"text",type:"element",attributes:{class:"pin-number sch-pin-number",x:s.x.toString(),y:s.y.toString(),style:"font-family: sans-serif;",fill:Zt.schematic.pin_number,"text-anchor":"middle","dominant-baseline":"auto","font-size":`${se(n,"pin_number")}px`,transform:r.side_of_component==="top"||r.side_of_component==="bottom"?`rotate(-90 ${s.x} ${s.y})`:""},children:[{type:"text",value:r.pin_number?.toString()||"",name:"",attributes:{},children:[]}],value:""}),e},r1=0.1,A1=(t)=>{let e=[],{schPort:r,schComponent:i,transform:n,labelColor:a=Zt.schematic.pin_number,labelClassName:o="pin-number sch-pin-label"}=t,c={x:r.center.x,y:r.center.y};if(!r.side_of_component)return[];let l=gi(r.side_of_component),s=r.distance_from_component_edge??0.4;c.x+=l.x*(s+r1),c.y+=l.y*(s+r1);let p=P(n,c),d=r.display_pin_label??i.port_labels?.[`${r.pin_number}`];if(!d)return[];let m=d.startsWith("N_"),u=m?d.slice(2):d,y=r.display_pin_label_text_parts,f=r.is_drawn_with_inversion_circle??!1,_=se(n,m||f?"negated_pin_number":"pin_number",r.display_pin_label_font_size);return e.push({name:"text",type:"element",attributes:{class:o,x:p.x.toString(),y:p.y.toString(),style:`font-family: sans-serif;${m&&!y?.length?" text-decoration: overline;":""}`,fill:a,"text-anchor":r.side_of_component==="left"||r.side_of_component==="bottom"?"start":"end","dominant-baseline":"middle","font-size":`${_}px`,transform:r.side_of_component==="top"||r.side_of_component==="bottom"?`rotate(-90 ${p.x} ${p.y})`:""},children:y?.length?GP(y):[{type:"text",value:u||"",name:"",attributes:{},children:[]}],value:""}),e},eI=(t)=>{let e=[],{schPort:r,schComponent:i,transform:n,circuitJson:a}=t;return e.push(...qP(t)),e.push(...tI(t)),e.push(...A1(t)),e},rI=({component:t,transform:e,circuitJson:r,colorMap:i})=>{let n=[],a=P(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=P(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),c=o.x-a.x,l=o.y-a.y;n.push({name:"rect",type:"element",value:"",attributes:{class:"component chip sch-component-body",x:a.x.toString(),y:a.y.toString(),width:c.toString(),height:l.toString(),"stroke-width":`${$t(e)}px`,fill:i.schematic.component_body,stroke:i.schematic.component_outline},children:[]}),n.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:a.x.toString(),y:a.y.toString(),width:c.toString(),height:l.toString(),fill:"transparent"},children:[]});let s=Gt(r).schematic_text.list();for(let d of s)if(d.schematic_component_id===t.schematic_component_id)n.push(cm({elm:d,transform:e,colorMap:i}));let p=Gt(r).schematic_port.list({schematic_component_id:t.schematic_component_id});for(let d of p)n.push(...eI({schPort:d,schComponent:t,transform:e,circuitJson:r}));return n};function B1({isDashed:t,dashLength:e,dashGap:r,strokeWidth:i,transform:n}){if(!t)return;let a=Math.abs(n.a),o=i*a*3,c=e!==void 0?e*a:o,l=r!==void 0?r*a:o;return`${c} ${l}`}function F1({schLine:t,transform:e,colorMap:r}){let i=P(e,{x:t.x1,y:t.y1}),n=P(e,{x:t.x2,y:t.y2}),a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=B1({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:a,transform:e});return[{name:"line",type:"element",attributes:{class:"sch-line",x1:i.x.toString(),y1:i.y.toString(),x2:n.x.toString(),y2:n.y.toString(),stroke:t.color,"stroke-width":o.toString(),...c&&{"stroke-dasharray":c},"data-schematic-line-id":t.schematic_line_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function P1({schRect:t,transform:e,colorMap:r}){let i=P(e,t.center),n=Math.abs(e.a)*t.width,a=Math.abs(e.d)*t.height,o=t.stroke_width??0.02,c=Math.abs(e.a)*o,l=i.x-n/2,s=i.y-a/2;return[{name:"rect",type:"element",attributes:{class:"sch-rect",x:l.toString(),y:s.toString(),width:n.toString(),height:a.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":c.toString(),...t.is_dashed&&{"stroke-dasharray":(c*3).toString()},...t.rotation!==0&&{transform:`rotate(${t.rotation} ${i.x} ${i.y})`},"data-schematic-rect-id":t.schematic_rect_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function I1({schPath:t,transform:e,colorMap:r}){let i=t.stroke_color??r.schematic.component_outline,n=t.fill_color??"none",a=t.stroke_width??0.02,o=Math.abs(e.a)*a,c=B1({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:a,transform:e});if(!t.points||t.points.length<2)return[];return[{name:"path",type:"element",attributes:{class:"sch-path",d:t.points.map((p)=>P(e,{x:p.x,y:p.y})).map((p,d)=>`${d===0?"M":"L"} ${p.x} ${p.y}`).join(" "),stroke:i,"stroke-width":o.toString(),fill:t.is_filled?n:"none","stroke-linecap":"round","stroke-linejoin":"round",...c&&{"stroke-dasharray":c},...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var iI=({component:t,transform:e,circuitJson:r,colorMap:i})=>{let n=[],a=t.schematic_component_id;for(let o of r){if(!("schematic_component_id"in o)||o.schematic_component_id!==a)continue;if(o.type==="schematic_text"&&t.is_box_with_pins===!1)n.push(cm({elm:o,transform:e,colorMap:i}));else if(o.type==="schematic_line")n.push(...F1({schLine:o,transform:e,colorMap:i}));else if(o.type==="schematic_circle")n.push(...S1({schCircle:o,transform:e,colorMap:i}));else if(o.type==="schematic_rect")n.push(...P1({schRect:o,transform:e,colorMap:i}));else if(o.type==="schematic_arc")n.push(...v1({schArc:o,transform:e,colorMap:i}));else if(o.type==="schematic_path")n.push(...I1({schPath:o,transform:e,colorMap:i}))}if(t.is_box_with_pins===!1){let o=r.filter((l)=>l.type==="schematic_line"&&l.schematic_component_id===a),c=r.filter((l)=>l.type==="schematic_port"&&l.schematic_component_id===a);for(let l of c){let s=o.find((f)=>f.x1===l.center.x&&f.y1===l.center.y||f.x2===l.center.x&&f.y2===l.center.y);if(!s)continue;let p=s.x1===l.center.x&&s.y1===l.center.y?{x:s.x2,y:s.y2}:{x:s.x1,y:s.y1},d=p.x-l.center.x,m=p.y-l.center.y,u=Math.abs(d)>Math.abs(m)?d>0?"left":"right":m>0?"bottom":"top",y=Math.max(Math.abs(d),Math.abs(m));n.push(...A1({schPort:{...l,side_of_component:u,distance_from_component_edge:y},schComponent:t,transform:e,circuitJson:r,labelClassName:"port-label sch-pin-label",labelColor:i.schematic.pin_name}))}}return n};function nI(t){let{component:e}=t,r=[];if(e.is_box_with_pins!==!1)if(e.symbol_name)r=JP(t);else r=rI(t);let i=iI(t),n=[...r,...i];return[{type:"element",name:"g",attributes:{class:"sch-component","data-circuit-json-type":"schematic_component","data-schematic-component-id":e.schematic_component_id,...e.schematic_sheet_id?{"data-schematic-sheet-id":e.schematic_sheet_id}:{}},children:n,value:""}]}function oI({debugObject:t,transform:e}){if(t.shape==="rect"){let[r,i]=P(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[n,a]=P(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[i,a]=[Math.min(i,a),Math.max(i,a)];let o=Math.abs(n-r),c=Math.abs(a-i),[l,s]=P(e,[t.center.x,t.center.y]);return[{name:"rect",type:"element",value:"",attributes:{x:r.toString(),y:i.toString(),width:o.toString(),height:c.toString(),fill:"none",stroke:"red","stroke-width":(0.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:l.toString(),y:(s-10).toString(),"text-anchor":"middle","font-size":(0.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}if(t.shape==="line"){let[r,i]=P(e,[t.start.x,t.start.y]),[n,a]=P(e,[t.end.x,t.end.y]),o=(r+n)/2,c=(i+a)/2;return[{name:"line",type:"element",value:"",attributes:{x1:r.toString(),y1:i.toString(),x2:n.toString(),y2:a.toString(),stroke:"red","stroke-width":(0.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:o.toString(),y:(c-10).toString(),"text-anchor":"middle","font-size":(0.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}return[]}var M1=0.2/Ze,aI=3/Ze,Is=["1","2","3","4","5","6"],cn=["A","B","C","D"];function sI({schematicSheet:t,transform:e,colorMap:r}){let i=sm(t),n=r.schematic.sheet,a=r.schematic.net_name,o=[i1({id:`${t.schematic_sheet_id}_outer`,center:i.center,width:i.width,height:i.height,transform:e,color:n}),i1({id:`${t.schematic_sheet_id}_inner`,center:i.center,width:i.innerMaxX-i.innerMinX,height:i.innerMaxY-i.innerMinY,transform:e,color:n})];for(let c=1;c<Is.length;c++){let l=i.innerMinX+(i.innerMaxX-i.innerMinX)*c/Is.length;o.push(Ms({id:`${t.schematic_sheet_id}_top_column_${c}`,x1:l,y1:i.maxY,x2:l,y2:i.innerMaxY,transform:e,color:n}),Ms({id:`${t.schematic_sheet_id}_bottom_column_${c}`,x1:l,y1:i.minY,x2:l,y2:i.innerMinY,transform:e,color:n}))}for(let c=1;c<cn.length;c++){let l=i.innerMinY+(i.innerMaxY-i.innerMinY)*c/cn.length;o.push(Ms({id:`${t.schematic_sheet_id}_left_row_${c}`,x1:i.minX,y1:l,x2:i.innerMinX,y2:l,transform:e,color:n}),Ms({id:`${t.schematic_sheet_id}_right_row_${c}`,x1:i.maxX,y1:l,x2:i.innerMaxX,y2:l,transform:e,color:n}))}return Is.forEach((c,l)=>{let s=i.innerMinX+(i.innerMaxX-i.innerMinX)*(l+0.5)/Is.length;o.push(ks({text:c,x:s,y:(i.maxY+i.innerMaxY)/2,transform:e,color:a}),ks({text:c,x:s,y:(i.minY+i.innerMinY)/2,transform:e,color:a}))}),cn.forEach((c,l)=>{let s=i.innerMinY+(i.innerMaxY-i.innerMinY)*(cn.length-l-0.5)/cn.length;o.push(ks({text:c,x:(i.minX+i.innerMinX)/2,y:s,transform:e,color:a}),ks({text:c,x:(i.maxX+i.innerMaxX)/2,y:s,transform:e,color:a}))}),[{name:"g",type:"element",value:"",attributes:{class:"schematic-sheet","data-circuit-json-type":"schematic_sheet","data-schematic-sheet-id":t.schematic_sheet_id},children:o}]}function i1({id:t,center:e,width:r,height:i,transform:n,color:a}){let o=P(n,e),c=Math.abs(n.a)*r,l=Math.abs(n.d)*i;return{name:"rect",type:"element",value:"",attributes:{class:"sch-rect",x:(o.x-c/2).toString(),y:(o.y-l/2).toString(),width:c.toString(),height:l.toString(),fill:"none",stroke:a,"stroke-width":(Math.abs(n.a)*M1).toString(),"data-schematic-rect-id":t},children:[]}}function Ms({id:t,x1:e,y1:r,x2:i,y2:n,transform:a,color:o}){let c=P(a,{x:e,y:r}),l=P(a,{x:i,y:n});return{name:"line",type:"element",value:"",attributes:{class:"sch-line",x1:c.x.toString(),y1:c.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:o,"stroke-width":(Math.abs(a.a)*M1).toString(),"data-schematic-line-id":t},children:[]}}function ks({text:t,x:e,y:r,transform:i,color:n}){let a=P(i,{x:e,y:r});return{type:"element",name:"text",value:"",attributes:{class:"sch-text",x:a.x.toString(),y:a.y.toString(),fill:n,"text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${se(i,"reference_designator",aI)}px`,transform:`rotate(0, ${a.x}, ${a.y})`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}}var cI=({schematicTable:t,transform:e,colorMap:r,circuitJson:i})=>{let{anchor_position:n,border_width:a=0.05,anchor:o="center"}=t,{column_widths:c,row_heights:l}=g1(t,i),s=c.reduce((E,I)=>E+I,0),p=l.reduce((E,I)=>E+I,0),{x:d,y:m}=n;if(o.includes("center"))d-=s/2;else if(o.includes("right"))d-=s;if(o.includes("center"))m+=p/2;else if(o.includes("bottom"))m+=p;let u=[],y=a*Math.abs(e.a),f=$t(e),[_,x]=P(e,[d,m]),[Y,b]=P(e,[d+s,m-p]);u.push({name:"rect",type:"element",attributes:{class:"sch-table-border",x:_.toString(),y:x.toString(),width:(Y-_).toString(),height:(b-x).toString(),fill:"none",stroke:r.schematic.table,"stroke-width":y.toString()},children:[],value:""});let M=i.filter((E)=>E.type==="schematic_table_cell"&&E.schematic_table_id===t.schematic_table_id),O=d;for(let E=0;E<c.length-1;E++){O+=c[E];let I=m;for(let U=0;U<l.length;U++){let q=I-l[U];if(!M.some((Q)=>Q.start_column_index<=E&&Q.end_column_index>E&&Q.start_row_index<=U&&Q.end_row_index>=U)){let Q=P(e,{x:O,y:I}),k=P(e,{x:O,y:q});u.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:Q.x.toString(),y1:Q.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:r.schematic.table,"stroke-width":f.toString()},children:[],value:""})}I=q}}let X=m;for(let E=0;E<l.length-1;E++){X-=l[E];let I=d;for(let U=0;U<c.length;U++){let q=I+c[U];if(!M.some((Q)=>Q.start_row_index<=E&&Q.end_row_index>E&&Q.start_column_index<=U&&Q.end_column_index>=U)){let Q=P(e,{x:I,y:X}),k=P(e,{x:q,y:X});u.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:Q.x.toString(),y1:Q.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:r.schematic.table,"stroke-width":f.toString()},children:[],value:""})}I=q}}for(let E of M)if(E.text){let I=c.slice(E.start_column_index,E.end_column_index+1).reduce((W,j)=>W+j,0),U=l.slice(E.start_row_index,E.end_row_index+1).reduce((W,j)=>W+j,0),q=d+c.slice(0,E.start_column_index).reduce((W,j)=>W+j,0),ct=m-l.slice(0,E.start_row_index).reduce((W,j)=>W+j,0),{cell_padding:Q=0.2}=t,k=E.horizontal_align??"center",st=E.vertical_align??"middle",ot={x:q+I/2,y:ct-U/2};if(k==="left")ot.x=q+Q;else if(k==="right")ot.x=q+I-Q;if(st==="top")ot.y=ct-Q;else if(st==="bottom")ot.y=ct-U+Q;let Z=P(e,ot),N=se(e,"reference_designator",E.font_size),tt={left:"start",center:"middle",right:"end"},J={top:"hanging",middle:"middle",bottom:"ideographic"};u.push({name:"text",type:"element",attributes:{class:"sch-table-text",x:Z.x.toString(),y:Z.y.toString(),"font-size":`${N}px`,"text-anchor":tt[k],"dominant-baseline":J[st],fill:r.schematic.table,"font-family":"sans-serif"},children:[{type:"text",value:E.text,name:"",attributes:{},children:[]}],value:""})}return[{name:"g",type:"element",attributes:{class:"sch-table","data-schematic-table-id":t.schematic_table_id},children:u,value:""}]};function lI({trace:t,transform:e,colorMap:r}){let i=t.edges;if(i.length===0)return[];let n=[],a=[],o="";for(let c=0;c<i.length;c++){let l=i[c];if(l.is_crossing)continue;let[s,p]=P(e,[l.from.x,l.from.y]),[d,m]=P(e,[l.to.x,l.to.y]);if(c===0||i[c-1]?.is_crossing)o+=`M ${s} ${p} L ${d} ${m}`;else o+=` L ${d} ${m}`}if(o)n.push({name:"path",type:"element",attributes:{d:o,class:"trace-invisible-hover-outline sch-trace-hitbox",stroke:r.schematic.wire,fill:"none","stroke-width":`${$t(e)*8}px`,"stroke-linecap":"round",opacity:"0","stroke-linejoin":"round"},value:"",children:[]}),n.push({name:"path",type:"element",attributes:{class:"sch-trace-path",d:o,stroke:r.schematic.wire,fill:"none","stroke-width":`${$t(e)}px`,"stroke-linecap":"round","stroke-linejoin":"round"},value:"",children:[]});for(let c of i){if(!c.is_crossing)continue;let[l,s]=P(e,[c.from.x,c.from.y]),[p,d]=P(e,[c.to.x,c.to.y]),m=(l+p)/2,u=(s+d)/2,y=p-l,f=d-s,_=Math.sqrt(y*y+f*f),x=_*0.7,Y=-f/_*x,b=y/_*x,M=m+Y,O=u-Math.abs(b);a.push({name:"path",type:"element",attributes:{class:"trace-crossing-outline sch-trace-crossing-outline",d:`M ${l} ${s} Q ${M} ${O} ${p} ${d}`,stroke:r.schematic.background,fill:"none","stroke-width":`${$t(e)*1.5}px`,"stroke-linecap":"butt"},value:"",children:[]}),a.push({name:"path",type:"element",attributes:{class:"sch-trace-crossing-path",d:`M ${l} ${s} Q ${M} ${O} ${p} ${d}`,stroke:r.schematic.wire,fill:"none","stroke-width":`${$t(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}if(t.junctions)for(let c of t.junctions){let[l,s]=P(e,[c.x,c.y]);a.push({name:"circle",type:"element",attributes:{cx:l.toString(),cy:s.toString(),r:(Math.abs(e.a)*0.03).toString(),class:"trace-junction sch-trace-junction",fill:r.schematic.junction},value:"",children:[]})}return[{name:"g",type:"element",value:"",attributes:{class:"trace sch-trace","data-layer":"base","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:n},{name:"g",type:"element",value:"",attributes:{class:"trace-overlays sch-trace-overlays","data-layer":"overlay","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:a}]}function pI({probe:t,transform:e,colorMap:r,fallbackColor:i}){let[n,a]=P(e,[t.position.x,t.position.y]),o=t.color??i??r.schematic.reference,c=Math.abs(e.a)*0.6,l=Math.abs(e.a)*0.28,s=t.label_alignment??"top_right",p,d,m,u;switch(s){case"top_left":p=-135*Math.PI/180,d="end",m=-8,u=-8;break;case"top_center":p=-90*Math.PI/180,d="middle",m=0,u=-8;break;case"top_right":p=-45*Math.PI/180,d="start",m=8,u=-8;break;case"center_left":p=180*Math.PI/180,d="end",m=-8,u=0;break;case"center":p=-90*Math.PI/180,d="middle",m=0,u=-8;break;case"center_right":p=0*Math.PI/180,d="start",m=8,u=0;break;case"bottom_left":p=135*Math.PI/180,d="end",m=-8,u=8;break;case"bottom_center":p=90*Math.PI/180,d="middle",m=0,u=8;break;case"bottom_right":p=45*Math.PI/180,d="start",m=8,u=8;break;default:p=-50*Math.PI/180,d="start",m=8,u=0}let y=n+c*Math.cos(p),f=a+c*Math.sin(p),_=n,x=a,Y=[`M ${y},${f}`,`L ${_},${x}`,`M ${_},${x}`,`L ${_-l*Math.cos((p*180/Math.PI+150)*Math.PI/180)},${x-l*Math.sin((p*180/Math.PI+150)*Math.PI/180)}`,`L ${_-l*Math.cos((p*180/Math.PI+210)*Math.PI/180)},${x-l*Math.sin((p*180/Math.PI+210)*Math.PI/180)}`,"Z"].join(" "),b=(y+m).toString(),M=(f+u).toString(),O=[];if(t.name&&t.voltage!==void 0)O.push({type:"element",name:"tspan",value:"",attributes:{x:b},children:[{type:"text",value:t.name,name:"",attributes:{},children:[]}]}),O.push({type:"element",name:"tspan",value:"",attributes:{x:b,dy:"1.2em"},children:[{type:"text",value:`${t.voltage}V`,name:"",attributes:{},children:[]}]});else{let X=[];if(t.name)X.push(t.name);if(t.voltage!==void 0)X.push(`${t.voltage}V`);O.push({type:"text",value:X.join(" "),name:"",attributes:{},children:[]})}return[{name:"path",type:"element",attributes:{class:"sch-voltage-probe",d:Y,stroke:o,fill:o,"stroke-width":`${$t(e)}px`},value:"",children:[]},{type:"element",name:"text",value:"",attributes:{class:"sch-voltage-probe-label",x:b,y:M,fill:o,"text-anchor":d,"dominant-baseline":"middle","font-family":"sans-serif","font-size":`${se(e,"reference_designator")}px`,"font-weight":"bold","data-schematic-voltage-probe-id":t.schematic_voltage_probe_id},children:O}]}var pn=6,Cs=12,Qt=12,ui=6,n1=14,Ys=11,o1=280,hI=140,k1=(t)=>t.type==="schematic_component_overlap_warning"||t.type==="schematic_component_styling_warning"||t.type==="schematic_element_outside_sheet_warning"||t.type==="schematic_manual_edit_conflict_warning";function dI({circuitJson:t,transform:e,svgWidth:r,svgHeight:i,colorMap:n}){let a=n.schematic.erc_warning,o=[];return t.filter(k1).flatMap((c)=>{let l=mI(c,t,e);if(!l)return[];let s=Math.max(1,r-Qt*2),p=bI(c.message,Math.max(12,Math.floor((Math.min(o1,s)-ui*2)/(Ys*0.56)))),d=Math.max(...p.map((b)=>b.length)),m=Math.min(o1,s,Math.max(Math.min(hI,s),d*Ys*0.56+ui*2)),u=ui*2+p.length*n1,y=_I({targetBounds:l,calloutWidth:m,calloutHeight:u,svgWidth:r,svgHeight:i,occupiedCalloutBounds:o});o.push(y);let f=xI(c),_=Es(l,pn),x=gI(y,_);return[{name:"g",type:"element",value:"",attributes:{class:"schematic-warning","data-type":c.type,"data-warning-id":f,role:"note","aria-label":c.message},children:[{name:"rect",type:"element",value:"",attributes:{x:_.minX.toString(),y:_.minY.toString(),width:(_.maxX-_.minX).toString(),height:(_.maxY-_.minY).toString(),rx:"6",fill:"none",stroke:a,"stroke-width":"1","stroke-dasharray":"4,3","data-warning-reference":"target"},children:[]},{name:"line",type:"element",value:"",attributes:{x1:x.from.x.toString(),y1:x.from.y.toString(),x2:x.to.x.toString(),y2:x.to.y.toString(),stroke:a,"stroke-width":"1","data-warning-reference":"leader"},children:[]},{name:"rect",type:"element",value:"",attributes:{x:y.minX.toString(),y:y.minY.toString(),width:m.toString(),height:u.toString(),fill:"rgba(255, 250, 235, 0.97)",stroke:a,"stroke-width":"1","data-warning-reference":"callout"},children:[]},{name:"text",type:"element",value:"",attributes:{x:(y.minX+ui).toString(),y:(y.minY+ui+Ys).toString(),fill:"#5c4300","font-family":"sans-serif","font-size":Ys.toString()},children:p.map((b,M)=>({name:"tspan",type:"element",value:"",attributes:{x:(y.minX+ui).toString(),dy:M===0?"0":n1.toString()},children:[wI(b)]}))}]}]})}function mI(t,e,r){let n=uI(t).map((a)=>yI(e,a)).filter((a)=>Boolean(a)).map((a)=>fI(a,r)).filter((a)=>Boolean(a));if(n.length===0)return null;return n.reduce(vI)}function uI(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_ids;case"schematic_component_styling_warning":return[t.schematic_component_id,...t.schematic_port_ids??[]];case"schematic_manual_edit_conflict_warning":return[t.schematic_component_id];case"schematic_element_outside_sheet_warning":return[t.schematic_element_id]}}function yI(t,e){return t.find((r)=>{if(!r.type.startsWith("schematic_"))return!1;let i=`${r.type}_id`;return r[i]===e})}function fI(t,e){if(t.type==="schematic_component"){let r=P(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),i=P(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return nm([r,i])}if(t.type==="schematic_port"){let r=P(e,t.center);return Es(nm([r]),4)}if(t.type==="schematic_net_label"){let r=P(e,t.anchor_position??t.center),i=Math.max(28,t.text.length*8);return{minX:r.x-i/2,minY:r.y-10,maxX:r.x+i/2,maxY:r.y+10}}if(t.type==="schematic_trace"){let r=t.edges.flatMap((i)=>[P(e,i.from),P(e,i.to)]);if(r.length===0)return null;return Es(nm(r),4)}return null}function _I({targetBounds:t,calloutWidth:e,calloutHeight:r,svgWidth:i,svgHeight:n,occupiedCalloutBounds:a}){let o=(t.minX+t.maxX)/2,c=(t.minY+t.maxY)/2,l=t.minY-pn-Cs-r,s=t.maxY+pn+Cs,p=t.minX-pn-Cs-e,d=t.maxX+pn+Cs,m=[];if(l>=Qt)m.push(ln({x:yi(o-e/2,Qt,i-Qt-e),y:l,width:e,height:r,side:"top"}));if(s+r<=n-Qt)m.push(ln({x:yi(o-e/2,Qt,i-Qt-e),y:s,width:e,height:r,side:"bottom"}));if(d+e<=i-Qt)m.push(ln({x:d,y:yi(c-r/2,Qt,n-Qt-r),width:e,height:r,side:"right"}));if(p>=Qt)m.push(ln({x:p,y:yi(c-r/2,Qt,n-Qt-r),width:e,height:r,side:"left"}));let u=m.find((y)=>a.every((f)=>!SI(Es(y,4),f)));if(u)return u;if(m[0])return m[0];return ln({x:yi(o-e/2,Qt,i-Qt-e),y:yi(l,Qt,n-Qt-r),width:e,height:r,side:"top"})}function gI(t,e){let r=(e.minX+e.maxX)/2,i=(e.minY+e.maxY)/2,n=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2;switch(t.side){case"top":return{from:{x:n,y:t.maxY},to:{x:r,y:e.minY}};case"bottom":return{from:{x:n,y:t.minY},to:{x:r,y:e.maxY}};case"left":return{from:{x:t.maxX,y:a},to:{x:e.minX,y:i}};case"right":return{from:{x:t.minX,y:a},to:{x:e.maxX,y:i}}}}function xI(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_overlap_warning_id;case"schematic_component_styling_warning":return t.schematic_component_styling_warning_id;case"schematic_element_outside_sheet_warning":return t.schematic_element_outside_sheet_warning_id;case"schematic_manual_edit_conflict_warning":return t.schematic_manual_edit_conflict_warning_id}}function bI(t,e){let r=t.trim().split(/\s+/),i=[],n="";for(let a of r){let o=n?`${n} ${a}`:a;if(o.length<=e||n.length===0){n=o;continue}i.push(n),n=a}if(n)i.push(n);return i.length>0?i:["Warning"]}function nm(t){return{minX:Math.min(...t.map((e)=>e.x)),minY:Math.min(...t.map((e)=>e.y)),maxX:Math.max(...t.map((e)=>e.x)),maxY:Math.max(...t.map((e)=>e.y))}}function vI(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function Es(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function SI(t,e){return!(t.maxX<=e.minX||t.minX>=e.maxX||t.maxY<=e.minY||t.minY>=e.maxY)}function ln({x:t,y:e,width:r,height:i,side:n}){return{minX:t,minY:e,maxX:t+r,maxY:e+i,side:n}}function yi(t,e,r){if(r<e)return(e+r)/2;return Math.min(Math.max(t,e),r)}function wI(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}function C1(t,e){let r=t.filter((R)=>R.type==="schematic_sheet"),i=wP(r),n=i;if(e?.schematicSheetId!==void 0)n=r.find((R)=>R.schematic_sheet_id===e.schematicSheetId)??i;else if(e?.schematicSheetIndex!==void 0)n=r.find((R)=>R.sheet_index===e.schematicSheetIndex)??i;let a=n?t.filter((R)=>!R.type.startsWith("schematic_")||k1(R)||("schematic_sheet_id"in R)&&R.schematic_sheet_id===n.schematic_sheet_id):t,o=NP(a),c=o.maxX-o.minX,l=o.maxY-o.minY,s=e?.width??1200,p=e?.height??600,d=e?.colorOverrides,m={...Zt,schematic:{...Zt.schematic,...d?.schematic??{}}},u=c/l,y=s/p,f;if(u>y){let R=s/u;f={x:0,y:(p-R)/2}}else{let R=p*u;f={x:(s-R)/2,y:0}}let _=g0([{x:o.minX,y:o.maxY},{x:o.maxX,y:o.maxY},{x:o.maxX,y:o.minY}],[{x:f.x,y:f.y},{x:s-f.x,y:f.y},{x:s-f.x,y:p-f.y}]),x=[];if(x.push({name:"rect",type:"element",attributes:{class:"boundary",x:"0",y:"0",width:s.toString(),height:p.toString()},children:[],value:""}),e?.grid){let R=typeof e.grid==="object"?e.grid:{};x.push(vP({bounds:o,transform:_,...R}))}let Y=[],b=[],M=[],O=[],X=[],E=[],I=[],U=[],q=[],ct=[],Q=[],k=[],st=[],ot=[],Z=[],N=[],tt=[],J=AI({transform:_,svgWidth:s,svgHeight:p,schematicSheet:n}),W=Array.isArray(m.simulation_palette)?m.simulation_palette:Array.isArray(m.palette)?m.palette:[],j=0;for(let R of a)if(R.type==="schematic_sheet")N.push(...sI({schematicSheet:R,transform:_,colorMap:m}));else if(R.type==="schematic_graphic")tt.push(WP({schematicGraphic:R,viewport:BI({availableViewport:J,schematicGraphic:R,transform:_})}));else if(R.type==="schematic_debug_object")Y.push(...oI({debugObject:R,transform:_}));else if(R.type==="schematic_component")b.push(...nI({component:R,transform:_,circuitJson:a,colorMap:m})),q.push(...zP({component:R,transform:_,circuitJson:a}));else if(R.type==="schematic_box")I.push(...HP({schematicBox:R,transform:_,colorMap:m}));else if(R.type==="schematic_trace")M.push(...lI({trace:R,transform:_,colorMap:m}));else if(R.type==="schematic_net_label")O.push(...$P({schNetLabel:R,realToScreenTransform:_,colorMap:m}));else if(R.type==="schematic_text"&&!R.schematic_component_id)X.push(cm({elm:R,transform:_,colorMap:m}));else if(R.type==="schematic_voltage_probe"){let pt=W.length>0?W[j%W.length]:void 0;j+=1,E.push(...pI({probe:R,transform:_,colorMap:m,fallbackColor:pt}))}else if(R.type==="schematic_table")U.push(...cI({schematicTable:R,transform:_,colorMap:m,circuitJson:a}));else if(R.type==="schematic_line"){if(R.schematic_component_id)continue;Q.push(...F1({schLine:R,transform:_,colorMap:m}))}else if(R.type==="schematic_circle"){if(R.schematic_component_id)continue;k.push(...S1({schCircle:R,transform:_,colorMap:m}))}else if(R.type==="schematic_rect"){if(R.schematic_component_id)continue;st.push(...P1({schRect:R,transform:_,colorMap:m}))}else if(R.type==="schematic_arc"){if(R.schematic_component_id)continue;ot.push(...v1({schArc:R,transform:_,colorMap:m}))}else if(R.type==="schematic_path"){if(R.schematic_component_id)continue;Z.push(...I1({schPath:R,transform:_,colorMap:m}))}else if(R.type==="schematic_port"){let pt=a.find((xt)=>xt.type==="source_port"&&xt.source_port_id===R.source_port_id);if(pt?.type==="source_port"&&pt.do_not_connect===!0)ct.push(DP({schPort:R,transform:_,colorMap:m}));if(e?.drawPorts)ct.push(...UP({schPort:R,transform:_,circuitJson:a,colorMap:m}))}let G=M.filter((R)=>R.attributes?.["data-layer"]!=="overlay"),D=M.filter((R)=>R.attributes?.["data-layer"]==="overlay");if(x.push(...tt,...Y,...N,...G,...D,...Q,...k,...st,...ot,...Z,...b,...q,...ct,...O,...X,...I,...E,...U),e?.labeledPoints)x.push(SP({points:e.labeledPoints,transform:_}));if(e?.shouldDrawWarnings)x.push(...dI({circuitJson:a,transform:_,svgWidth:s,svgHeight:p,colorMap:m}));let et=fP(t),mt=gP;if(e?.showErrorsInTextOverlay){let R=xP(t);if(R)x.push(R)}let dt={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",class:["tscircuit-schematic",e?.className].filter(Boolean).join(" "),width:s.toString(),height:p.toString(),style:`background-color: ${m.schematic.background}`,"data-real-to-screen-transform":f0(_),...et&&{"data-software-used-string":et},...e?.includeVersion&&{"data-circuit-to-svg-version":mt}},children:[{name:"style",type:"element",children:[{type:"text",value:`
              .boundary { fill: ${m.schematic.background}; }
              .schematic-boundary { fill: none; stroke: #fff; }
              .component { fill: none; stroke: ${m.schematic.component_outline}; }
              .chip { fill: ${m.schematic.component_body}; stroke: ${m.schematic.component_outline}; }
              .component-pin { fill: none; stroke: ${m.schematic.component_outline}; }
              .text { font-family: sans-serif; fill: ${m.schematic.wire}; }
              .pin-number { fill: ${m.schematic.pin_number}; }
              .port-label { fill: ${m.schematic.reference}; }
              .component-name { fill: ${m.schematic.reference}; }
              ${e?.css??""}
            `,name:"",attributes:{},children:[]}],value:"",attributes:{}},...x],value:""};return dP(dt)}function AI({transform:t,svgWidth:e,svgHeight:r,schematicSheet:i}){if(!i)return{x:0,y:0,width:e,height:r};let n=sm(i),a=P(t,{x:n.innerMinX,y:n.innerMaxY}),o=P(t,{x:n.innerMaxX,y:n.innerMinY});return{x:Math.min(a.x,o.x),y:Math.min(a.y,o.y),width:Math.abs(o.x-a.x),height:Math.abs(o.y-a.y)}}function BI({availableViewport:t,schematicGraphic:e,transform:r}){if(e.width===void 0&&e.height===void 0)return t;let i=e.width===void 0?t.width:a1(e.width*Math.hypot(r.a,r.b),t.width),n=e.height===void 0?t.height:a1(e.height*Math.hypot(r.c,r.d),t.height);return{x:t.x+(t.width-i)/2,y:t.y+(t.height-n)/2,width:i,height:n}}function a1(t,e){if(!Number.isFinite(t))return e;return Math.max(0,Math.min(t,e))}var lm=11;function Y1(t,e=1){let r=12*e,i=26*e,n=t.left+r,a=t.right-r,o=t.top+r,c=t.bottom-r,l=[],s=Math.ceil(Math.max(t.right-t.left,t.bottom-t.top)/i);return(p)=>{let d={x:Math.max(n,Math.min(a,p.x)),y:Math.max(o,Math.min(c,p.y))};for(let m=0;m<=s;m++)for(let u=-m;u<=m;u++)for(let y=-m;y<=m;y++){if(Math.max(Math.abs(u),Math.abs(y))!==m)continue;let f={x:d.x+u*i,y:d.y+y*i};if(f.x<n||f.x>a||f.y<o||f.y>c)continue;if(l.some((_)=>Math.hypot(_.x-f.x,_.y-f.y)<i-0.000001*e))continue;return l.push(f),f}throw Error("Not enough room for issue markers; increase the schematic width or height")}}function II(t){return[...new Set(t.flatMap((r)=>r.type.startsWith("schematic_")&&!r.type.endsWith("_warning")&&!r.type.endsWith("_error")&&r.type!=="schematic_symbol"&&!(r.type==="schematic_group"&&r.is_subcircuit&&!r.show_as_schematic_box)?[("schematic_sheet_id"in r?r.schematic_sheet_id:void 0)??""]:[]))].map((r)=>{let i=t.find((n)=>n.type==="schematic_sheet"&&n.schematic_sheet_id===r);return{id:r,name:i?.type==="schematic_sheet"?i.name||r:r||"Unassigned sheet"}})}var MI=(t)=>t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll('"',"&quot;").replaceAll(">","&gt;"),Ns=(t)=>Ut(t.schX,t.schY,t.width,t.height);function L1(t){let{circuitJson:e,analysis:r}=t,i=t.schematicSheetId??II(e)[0]?.id??"",n=e.filter((k)=>!k.type.startsWith("schematic_")||k.type==="schematic_symbol"||(("schematic_sheet_id"in k?k.schematic_sheet_id:void 0)??"")===i),a=C1(n,{width:t.width??1400,height:t.height??900}),o=a.match(/data-real-to-screen-transform="matrix\(([^)]+)\)"/);if(!o)throw Error("Schematic renderer did not provide its coordinate transform");let c=o[1].split(/[\s,]+/).map(Number);if(c.length!==6||c.some((k)=>!Number.isFinite(k)))throw Error("Invalid schematic transform");let[l,s,p,d,m,u]=c,y=(k,st)=>({x:l*k+p*st+m,y:s*k+d*st+u}),f=[],_=[],x=(k)=>{f.push(k);for(let st of[k.left,k.right])for(let ot of[k.bottom,k.top])_.push(y(st,ot))},Y=r.getLineItems().filter((k)=>k.lineItemType==="SchematicBoxPlacement"),b=new Set,M=r.getIssues().flatMap((k,st)=>{if((pr(k).schematicSheetId??"")!==i||t.issueTypes!==void 0&&!t.issueTypes.includes(k.lineItemType)||t.issueIndex!==void 0&&st!==t.issueIndex)return[];let ot=Gn({issues:[k],componentPlacements:Y,circuitJson:e}),Z=[],N,tt=new Map,J=(G,D=!1)=>{x(G),N??={x:G.left,y:G.top};let et=[D?"context":"issue",G.left,G.bottom,G.right,G.top].join(":");if(!D)tt.set(et,{x:G.left,y:G.top});if(b.has(et))return;b.add(et);let mt=`<rect x="${G.left}" y="${G.bottom}" width="${G.right-G.left}" height="${G.top-G.bottom}" fill="${D?"none":"#ef444433"}" stroke="${D?"#2563eb":"#dc2626"}" stroke-width="${D?0.35:0.5}" ${D?'stroke-dasharray="5 3"':""} vector-effect="non-scaling-stroke" />`;Z.push(mt)};for(let G of ot)J(Ns(G),!0);switch(N=void 0,k.lineItemType){case"RailPathTooSpreadOut":{x(k.pathBounds),N=k.pathPoints[0],Z.push(`<polyline points="${k.pathPoints.map((G)=>`${G.x},${G.y}`).join(" ")}" fill="none" stroke="#dc2626" stroke-width="3" stroke-opacity="0.75" vector-effect="non-scaling-stroke" />`);break}case"ComponentOverlap":{let G=Ns(k.firstComponent),D=Ns(k.secondComponent);J({left:Math.max(G.left,D.left),right:Math.min(G.right,D.right),top:Math.min(G.top,D.top),bottom:Math.max(G.bottom,D.bottom)});break}case"NetLabelCollision":for(let G of k.collisionBounds??[])J(G);break;case"SchematicTextCollision":J(k.textBounds),J(k.collidingObjectBounds);break;case"ComponentNetLabelCollision":J(k.overlappingLabel1Bounds),J(k.overlappingLabel2Bounds);break;case"ComponentBoxNetLabelCollision":J(k.boxBounds),J(k.labelBounds);break;case"VerboseSchematicNetLabel":{N={x:k.schX,y:k.schY},x(Ut(N.x,N.y,18/Math.abs(l),18/Math.abs(d))),Z.push(`<circle cx="${N.x}" cy="${N.y}" r="${9/Math.abs(l)}" fill="#ef444433" stroke="#dc2626" stroke-width="0.5" vector-effect="non-scaling-stroke" />`);break}case"TraceCanBeSimplifiedByMovingComponent":{if(k.suggestedTraces){let D=Ut(k.newSchX,k.newSchY,k.targetComponent.width,k.targetComponent.height);x(D),Z.push(`<rect x="${D.left}" y="${D.bottom}" width="${D.right-D.left}" height="${D.top-D.bottom}" fill="#16a34a22" stroke="#16a34a" stroke-width="1.5" vector-effect="non-scaling-stroke" />`);for(let et of k.suggestedTraces)for(let[mt,dt]of et.points.slice(1).entries()){let R=et.points[mt];x({left:Math.min(R.x,dt.x),right:Math.max(R.x,dt.x),bottom:Math.min(R.y,dt.y),top:Math.max(R.y,dt.y)}),Z.push(`<line x1="${R.x}" y1="${R.y}" x2="${dt.x}" y2="${dt.y}" stroke="#16a34a" stroke-width="1.5" vector-effect="non-scaling-stroke" />`)}}let G=n.find((D)=>D.type==="schematic_trace"&&D.schematic_trace_id===k.schematicTraceId);if(G?.type==="schematic_trace")for(let D of G.edges)x({left:Math.min(D.from.x,D.to.x),right:Math.max(D.from.x,D.to.x),bottom:Math.min(D.from.y,D.to.y),top:Math.max(D.from.y,D.to.y)}),N??=D.from,Z.push(`<line x1="${D.from.x}" y1="${D.from.y}" x2="${D.to.x}" y2="${D.to.y}" stroke="#dc2626" stroke-width="0.5" vector-effect="non-scaling-stroke" />`);break}default:for(let G of ot)J(Ns(G))}N??=ot[0]?{x:ot[0].schX,y:ot[0].schY}:void 0;let W=(tt.size?[...tt.values()]:N?[N]:[]).map((G)=>y(G.x,G.y)),j=MI(`#${st+1} ${k.lineItemType}
${r.schematicIssuesToString(k)}`);return[{index:st,points:W,title:j,geometry:`<title>${j}</title><g transform="matrix(${c.join(" ")})">${Z.join("")}</g>`,issueType:k.lineItemType}]}),O=a,X=1,E={left:0,top:0,right:t.width??1400,bottom:t.height??900};if(!t.showFullSchematic&&_.length>0){let k=Math.min(..._.map((et)=>et.x)),st=Math.max(..._.map((et)=>et.x)),ot=Math.min(..._.map((et)=>et.y)),Z=Math.max(..._.map((et)=>et.y)),N=Math.max((st-k)/2,12),tt=Math.max((Z-ot)/2,12),J=st-k+N*2,W=Z-ot+tt*2;E={left:k-N,top:ot-tt,right:st+N,bottom:Z+tt};let j=`${E.left} ${E.top} ${J} ${W}`;O=a.replace(/^<svg\b[^>]*>/,(et)=>et.replace(/\sviewBox="[^"]*"/,"").replace(/>$/,` viewBox="${j}">`)),X=Math.max(J/(t.width??1400),W/(t.height??900));let G=(t.width??1400)*X,D=(t.height??900)*X;E={left:(k+st-G)/2,right:(k+st+G)/2,top:(ot+Z-D)/2,bottom:(ot+Z+D)/2}}let I=f.length?{left:Math.min(...f.map((k)=>k.left)),right:Math.max(...f.map((k)=>k.right)),top:Math.max(...f.map((k)=>k.top)),bottom:Math.min(...f.map((k)=>k.bottom))}:void 0;if(t.showOverlay===!1)return{svg:O,bounds:I};let U=Y1(E,X),q=[],ct=[],Q=M.map(({index:k,points:st,title:ot,geometry:Z,issueType:N})=>{for(let tt of st){let J={x:tt.x,y:tt.y-(lm+1)*X},W=U(J);if(W.x!==J.x||W.y!==J.y)q.push(`<line x1="${tt.x}" y1="${tt.y}" x2="${W.x}" y2="${W.y}" stroke="#b91c1c" stroke-width="0.5" />`);ct.push(`<g data-issue-number="${k+1}" data-issue-type="${N}" transform="translate(${W.x} ${W.y}) scale(${X})"><title>${ot}</title><circle r="${lm}" fill="#b91c1c" /><text y="4" text-anchor="middle" fill="white" font-family="sans-serif" font-size="11">${k+1}</text></g>`)}return`<g data-issue-index="${k}" data-issue-type="${N}">${Z}</g>`});return{bounds:I,svg:O.replace(/<\/svg>\s*$/,`<g class="placement-issue-overlays">${Q.join(`
`)}${q.join(`
`)}${ct.join(`
`)}</g></svg>`)}}function E1(t,e,r=[]){let i=Math.max(20,Math.floor((e-(r.length?70:36))/10)),n=[],a=[],o=[...r],c=0,l;for(let u of t?t.split(`
`):[]){if(u.startsWith("<SchematicSheet "))l=u.match(/\bid="([^"]*)"/)?.[1];let y=o.findIndex((f)=>f.text&&t.startsWith(f.text,c)&&(l===void 0||l===f.sheetId));if(y!==-1){let[f]=o.splice(y,1);a.push({number:f.number,lineIndex:n.length})}n.push(...CI(u,Math.min(96,i))),c+=u.length+1}let s=22,p=18,d=a.length?52:p,m=p*2+n.length*s;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${m}" viewBox="0 0 ${e} ${m}">`,'<rect width="100%" height="100%" fill="#fff" />',`<text x="${d}" y="${p+s}" fill="#d00" font-family="Menlo, Consolas, monospace" font-size="16">`,...n.map((u,y)=>`<tspan x="${d}" dy="${y===0?0:s}">${kI(u)}</tspan>`),"</text>",...a.map(({number:u,lineIndex:y})=>{let f=p+(y+1)*s-5;return`<g data-listing-issue-number="${u}"><circle cx="${p+6}" cy="${f}" r="11" fill="#b91c1c" /><text x="${p+6}" y="${f}" dy="0.35em" text-anchor="middle" font-family="sans-serif" font-size="11" fill="white">${u}</text></g>`}),"</svg>"].join(`
`)}function kI(t){return t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;")}function CI(t,e){if(t.length<=e)return[t];let r=[],i=t;while(i.length>e){let n=i.lastIndexOf(" ",e),a=n>0?n:e;r.push(i.slice(0,a)),i=`  ${i.slice(a).trimStart()}`}return r.push(i),r}function YI(t,e={}){let r=e.width??1400,i=e.height??900;if(!Number.isFinite(r)||r<320||!Number.isFinite(i)||i<=0)throw Error("Artifact width must be at least 320 and height must be positive (finite pixels)");let n=e.analysis??Vc(t),a=n.getIssues();return n.getIssues(e).map((o)=>{let c=a.indexOf(o),{schematicSheetId:l}=pr(o),{svg:s,bounds:p}=L1({circuitJson:t,analysis:n,issueIndex:c,schematicSheetId:l??"",width:r,height:i}),d=n.schematicIssuesToString(o)||`<${o.lineItemType} details="${Xs(JSON.stringify(o))}" />`,m=I0([`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${i}">${s}</svg>`,E1(d,r)],{normalizeSize:!1,gap:0}).replace(/[ \t]+$/gm,"");return{issueIndex:c,issue:o,schematicSheetId:l,bounds:p,descriptionXml:d,fileName:`issue-${String(c+1).padStart(4,"0")}-${o.lineItemType}.svg`,contentType:"image/svg+xml",content:m}})}export{Xc as SchematicPlacementAnalysis,Vc as analyzeSchematicPlacement,YI as createSchematicPlacementIssueArtifacts};